Ignore:
Timestamp:
Dec 4, 2007, 2:31:54 PM (17 years ago)
Author:
rosiere
Message:

Modification en profondeur de Component-port_map.
Compilation ok pour Register_unit ... a tester (systemC et vhdl)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp

    r59 r62  
    6767   in_MEMORY_IN_PACKET_ID             = interface->set_signal_in  <Tpacket_t         > ("packet_id"   ,_param->_size_packet_id       );
    6868   in_MEMORY_IN_OPERATION             = interface->set_signal_in  <Toperation_t      > ("operation"   ,_param->_size_operation        );
    69 #ifdef HAVE_MEMORY_OUT_TYPE
    70    in_MEMORY_IN_TYPE                  = interface->set_signal_in  <Ttype_t           > ("type"        ,_param->_size_type             );
    71 #endif
    7269   in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in  <Tlsq_ptr_t        > ("store_queue_ptr_write" ,_param->_size_address_store_queue);
    7370   in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in  <Tlsq_ptr_t        > ("load_queue_ptr_write"  ,_param->_size_address_load_queue );
     
    9794      out_MEMORY_OUT_CONTEXT_ID  = interface->set_signal_out <Tcontext_t        > ("context_id"  ,_param->_size_context_id       );
    9895      out_MEMORY_OUT_PACKET_ID   = interface->set_signal_out <Tpacket_t         > ("packet_id"   ,_param->_size_packet_id        );
    99 #ifdef HAVE_MEMORY_OUT_OPERATION
    100       out_MEMORY_OUT_OPERATION   = interface->set_signal_out <Toperation_t      > ("operation"   ,_param->_size_operation        );
    101 #endif
    102 #ifdef HAVE_MEMORY_OUT_TYPE
    103       out_MEMORY_OUT_TYPE        = interface->set_signal_out <Ttype_t           > ("type"        ,_param->_size_type             );
    104 #endif
    10596      out_MEMORY_OUT_WRITE_RD    = interface->set_signal_out <Tcontrol_t        > ("write_rd"    ,1                              );
    10697      out_MEMORY_OUT_NUM_REG_RD  = interface->set_signal_out <Tgeneral_address_t> ("num_reg_rd"  ,_param->_size_general_register );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp

    r59 r62  
    3838    delete     in_MEMORY_IN_PACKET_ID   ;
    3939    delete     in_MEMORY_IN_OPERATION   ;
    40 #ifdef HAVE_MEMORY_OUT_TYPE
    41     delete     in_MEMORY_IN_TYPE        ;
    42 #endif
    4340    delete     in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    4441    delete     in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
     
    5754    delete    out_MEMORY_OUT_CONTEXT_ID;
    5855    delete    out_MEMORY_OUT_PACKET_ID ;
    59 #ifdef HAVE_MEMORY_OUT_OPERATION
    60     delete    out_MEMORY_OUT_OPERATION ;
    61 #endif
    62 #ifdef HAVE_MEMORY_OUT_TYPE
    63     delete    out_MEMORY_OUT_TYPE      ;
    64 #endif
    6556    delete    out_MEMORY_OUT_WRITE_RD  ;
    6657    delete    out_MEMORY_OUT_NUM_REG_RD;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMoore.cpp

    r59 r62  
    2828    // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2929
    30     // Test store and load queue
    3130    Tcontext_t         memory_out_context_id = 0;
    3231    Tpacket_t          memory_out_packet_id  = 0;
    33 #ifdef HAVE_MEMORY_OUT_OPERATION
    34     Toperation_t       memory_out_operation  = 0;
    35 #endif
    36 #ifdef HAVE_MEMORY_OUT_TYPE
    37     Ttype_t            memory_out_type       = 0;
    38 #endif
    3932    Tcontrol_t         memory_out_write_rd   = 0;
    4033    Tgeneral_address_t memory_out_num_reg_rd = 0;
     
    4740    internal_MEMORY_OUT_VAL          = 0;
    4841
    49     // TODO : now only store queue
     42    // Test store and load queue
     43    // TODO : il faut d'abord tester si un elment de l'access queue n'est pas commitable !!!!!!!
    5044
    5145    // Test an store must be commited.
    52 
    53    
    5446    if (_store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state == STORE_QUEUE_COMMIT)
    5547      {
     
    5951        memory_out_context_id= _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._context_id;
    6052        memory_out_packet_id = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._packet_id ;
    61 #ifdef HAVE_MEMORY_OUT_OPERATION
    62         memory_out_operation = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._operation;
    63 #endif
    64 #ifdef HAVE_MEMORY_OUT_TYPE
    65         memory_out_type      = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._type;
    66 #endif
    6753//      memory_out_write_rd 
    6854//      memory_out_num_reg_rd
     
    7157      }
    7258
     59    // write output
    7360    PORT_WRITE(out_MEMORY_OUT_VAL       , internal_MEMORY_OUT_VAL);
    7461
    7562    PORT_WRITE(out_MEMORY_OUT_CONTEXT_ID, memory_out_context_id);
    7663    PORT_WRITE(out_MEMORY_OUT_PACKET_ID , memory_out_packet_id );
    77 #ifdef HAVE_MEMORY_OUT_OPERATION
    78     PORT_WRITE(out_MEMORY_OUT_OPERATION , memory_out_operation );
    79 #endif
    80 #ifdef HAVE_MEMORY_OUT_TYPE
    81     PORT_WRITE(out_MEMORY_OUT_TYPE      , memory_out_type      );
    82 #endif
    8364    PORT_WRITE(out_MEMORY_OUT_WRITE_RD  , memory_out_write_rd  );
    8465    PORT_WRITE(out_MEMORY_OUT_NUM_REG_RD, memory_out_num_reg_rd);
     
    8970    PORT_WRITE(out_MEMORY_OUT_EXCEPTION , memory_out_exception );
    9071
     72    // ~~~~~[ Interface "dache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9173
     74    Tcontext_t        dcache_req_context_id;
     75    Tpacket_t         dcache_req_packet_id ;
     76    Tdcache_address_t dcache_req_address   ;
     77    Tdcache_type_t    dcache_req_type      ;
     78    Tcontrol_t        dcache_req_uncached  ;
     79    Tdcache_data_t    dcache_req_wdata     ;
     80
     81    internal_DCACHE_REQ_VAL          = 0;
     82
     83    // Test store and load queue
     84
     85    // TODO : il faut d'abord tester si un elment de l'access queue n'est pas commitable !!!!!!!
     86
     87    // Test an store must be commited.
     88    if (_store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state == STORE_QUEUE_VALID_NO_SPECULATIVE)
     89      {
     90        internal_DCACHE_REQ_VAL          = 1;
     91        internal_DCACHE_REQ_SELECT_QUEUE = SELECT_STORE_QUEUE;
     92
     93        dcache_req_context_id = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._context_id;
     94        dcache_req_packet_id  = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._packet_id ;
     95        dcache_req_address    = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._address   ;
     96        dcache_req_type       = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._dcache_type;
     97        dcache_req_uncached   = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._uncached  ;
     98        dcache_req_wdata      = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._wdata     ;
     99      }
     100
     101    PORT_WRITE(out_DCACHE_REQ_VAL       , internal_DCACHE_REQ_VAL);
     102    PORT_WRITE(out_DCACHE_REQ_CONTEXT_ID, dcache_req_context_id);
     103    PORT_WRITE(out_DCACHE_REQ_PACKET_ID , dcache_req_packet_id );
     104    PORT_WRITE(out_DCACHE_REQ_ADDRESS   , dcache_req_address   );
     105    PORT_WRITE(out_DCACHE_REQ_TYPE      , dcache_req_type      );
     106    PORT_WRITE(out_DCACHE_REQ_UNCACHED  , dcache_req_uncached  );
     107    PORT_WRITE(out_DCACHE_REQ_WDATA     , dcache_req_wdata     );
     108   
    92109    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
    93110  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp

    r59 r62  
    5757            //  others in speculation_access_queue
    5858
    59             Toperation_t    operation           = PORT_READ(in_MEMORY_IN_OPERATION);
    60             Tgeneral_data_t address             = (PORT_READ(in_MEMORY_IN_IMMEDIAT) +
    61                                                    PORT_READ(in_MEMORY_IN_DATA_RA ));
    62            
    63             bool            exception_alignement= (mask_memory_access(operation) & address) != 0;
     59            Toperation_t    operation            = PORT_READ(in_MEMORY_IN_OPERATION);
     60            Tgeneral_data_t address              = (PORT_READ(in_MEMORY_IN_IMMEDIAT) +
     61                                                    PORT_READ(in_MEMORY_IN_DATA_RA ));
     62            bool            exception_alignement = (mask_memory_access(operation) & address) != 0;
    6463                                                   
    6564            if (is_operation_memory_store(operation) == true)
     
    159158                    _store_queue [index]._context_id           = PORT_READ(in_MEMORY_IN_CONTEXT_ID  );
    160159                    _store_queue [index]._packet_id            = PORT_READ(in_MEMORY_IN_PACKET_ID   );
    161 #ifdef HAVE_MEMORY_OUT_OPERATION
    162                     _store_queue [index]._operation            = operation;
    163 #endif
    164 #ifdef HAVE_MEMORY_OUT_TYPE
    165                     _store_queue [index]._type                 = PORT_READ(in_MEMORY_IN_TYPE        );
    166 #endif
     160                    _store_queue [index]._dcache_type          = operation_to_dcache_type(operation);
     161                    _store_queue [index]._uncached             = 0; // is the MMU that have this info
    167162                    _store_queue [index]._load_queue_ptr_write = PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
    168163                    _store_queue [index]._address              = address;
     
    217212              }
    218213          }
     214
     215        //================================================================
     216        // Interface "DCACHE_REQ"
     217        //================================================================
     218        if ((    internal_DCACHE_REQ_VAL  == 1) and
     219            (PORT_READ(in_DCACHE_REQ_ACK) == 1))
     220          {
     221            switch (internal_DCACHE_REQ_SELECT_QUEUE)
     222              {
     223              case SELECT_STORE_QUEUE :
     224                {
     225                  // =======================
     226                  // ===== STORE_QUEUE =====
     227                  // =======================
     228                 
     229                  // Entry flush and increase the read pointer
     230                 
     231                  _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state = STORE_QUEUE_COMMIT;
     232
     233                  break;
     234                }
     235              case SELECT_LOAD_QUEUE :
     236              case SELECT_LOAD_QUEUE_SPECULATIVE :
     237                break;
     238              }
     239          }
     240
     241#if DEBUG>=DEBUG_TRACE
     242        // ***** dump store queue
     243        cout << "Dump store queue" << endl
     244             << "ptr_read : " << toString(static_cast<uint32_t>(internal_MEMORY_STORE_QUEUE_PTR_READ)) << endl;
     245       
     246        for (uint32_t i=0; i<_param->_size_store_queue; i++)
     247          {
     248            uint32_t j = (internal_MEMORY_STORE_QUEUE_PTR_READ+i)%_param->_size_store_queue;
     249            cout << "{" << j << "}" << endl
     250                 << _store_queue[j] << endl;
     251          }
     252#endif
    219253      }
    220254
Note: See TracChangeset for help on using the changeset viewer.