Changeset 104


Ignore:
Timestamp:
Jan 21, 2009, 10:53:13 PM (15 years ago)
Author:
rosiere
Message:

Fix Bug :
1) Load Store Unit : check big endian
2) Commit unit & RAT : add retire_event interface

Location:
trunk/IPs/systemC/processor/Morpheo
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp

    r101 r104  
    441441  transaction_in.push_back(execute_transaction(_param,0,0,0,233,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - == -
    442442  transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  -
    443   transaction_in.push_back(execute_transaction(_param,0,0,0,235,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - <  -
     443  transaction_in.push_back(execute_transaction(_param,0,0,0,235,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - <  -
    444444  transaction_in.push_back(execute_transaction(_param,0,0,0,236,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0x21524111,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - == + (in unsigned)
    445445  transaction_in.push_back(execute_transaction(_param,0,0,0,237,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0x11111111,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  + (in unsigned)
     
    452452  transaction_in.push_back(execute_transaction(_param,0,0,0,252,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0x21071981,0x25071959,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // + <  +
    453453  transaction_in.push_back(execute_transaction(_param,0,0,0,253,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - == -
    454   transaction_in.push_back(execute_transaction(_param,0,0,0,254,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - >  -
    455   transaction_in.push_back(execute_transaction(_param,0,0,0,255,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - <  -
     454  transaction_in.push_back(execute_transaction(_param,0,0,0,254,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  -
     455  transaction_in.push_back(execute_transaction(_param,0,0,0,255,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - <  -
    456456  transaction_in.push_back(execute_transaction(_param,0,0,0,256,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0x21524111,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - == + (in unsigned)
    457457  transaction_in.push_back(execute_transaction(_param,0,0,0,257,OPERATION_TEST_L_SFGTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0x11111111,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  + (in unsigned)
     
    464464  transaction_in.push_back(execute_transaction(_param,0,0,0,272,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0x21071981,0x25071959,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // + <  +
    465465  transaction_in.push_back(execute_transaction(_param,0,0,0,273,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - == -
    466   transaction_in.push_back(execute_transaction(_param,0,0,0,274,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  -
    467   transaction_in.push_back(execute_transaction(_param,0,0,0,275,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - <  -
     466  transaction_in.push_back(execute_transaction(_param,0,0,0,274,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - >  -
     467  transaction_in.push_back(execute_transaction(_param,0,0,0,275,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - <  -
    468468  transaction_in.push_back(execute_transaction(_param,0,0,0,276,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbeef,0x21524111,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - == + (in unsigned)
    469469  transaction_in.push_back(execute_transaction(_param,0,0,0,277,OPERATION_TEST_L_SFLES   ,TYPE_TEST,0,0         ,0xdeadbeef,0x11111111,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - >  + (in unsigned)
     
    476476  transaction_in.push_back(execute_transaction(_param,0,0,0,292,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0x21071981,0x25071959,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // + <  +
    477477  transaction_in.push_back(execute_transaction(_param,0,0,0,293,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - == -
    478   transaction_in.push_back(execute_transaction(_param,0,0,0,294,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  -
    479   transaction_in.push_back(execute_transaction(_param,0,0,0,295,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - <  -
     478  transaction_in.push_back(execute_transaction(_param,0,0,0,294,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - >  -
     479  transaction_in.push_back(execute_transaction(_param,0,0,0,295,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - <  -
    480480  transaction_in.push_back(execute_transaction(_param,0,0,0,296,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0x21524111,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - == + (in unsigned)
    481481  transaction_in.push_back(execute_transaction(_param,0,0,0,297,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0xdeadbeef,0x11111111,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - >  + (in unsigned)
     
    572572  transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x00002107,0x00001981,0              ,1,63,0x034a5387,1,15,0              ,EXCEPTION_NONE     ,0));
    573573  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x00048698,0x0000dead,0              ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
    574   transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x40000000,0x00000002,0              ,1,63,0x80000000,1,15,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
    575   transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x40000000,0x00000004,0              ,1,63,0x00000000,1,15,FLAG_CY        ,EXCEPTION_NONE     ,0));
    576 
    577   transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00000001,0x00000001,0              ,1,63,0x00000001,1,15,0              ,EXCEPTION_NONE     ,0));
    578   transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00002107,0x00001981,0              ,1,63,0x034a5387,1,15,0              ,EXCEPTION_NONE     ,0));
    579   transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00048698,0x0000dead,0              ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
    580   transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x40000000,0x00000002,0              ,1,63,0x80000000,1,15,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
    581   transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x40000000,0x00000004,0              ,1,63,0x00000000,1,15,FLAG_CY        ,EXCEPTION_NONE     ,0));
     574  transaction_in.push_back(execute_transaction(_param,0,0,0,703,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x40000000,0x00000002,0              ,1,63,0x80000000,1,15,0              ,EXCEPTION_NONE     ,0));
     575  transaction_in.push_back(execute_transaction(_param,0,0,0,704,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x40000000,0x00000004,0              ,1,63,0x00000000,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
     576
     577  transaction_in.push_back(execute_transaction(_param,0,0,0,800,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00000001,0x00000001,0              ,1,63,0x00000001,1,15,0              ,EXCEPTION_NONE     ,0));
     578  transaction_in.push_back(execute_transaction(_param,0,0,0,801,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00002107,0x00001981,0              ,1,63,0x034a5387,1,15,0              ,EXCEPTION_NONE     ,0));
     579  transaction_in.push_back(execute_transaction(_param,0,0,0,802,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00048698,0x0000dead,0              ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
     580  transaction_in.push_back(execute_transaction(_param,0,0,0,803,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x40000000,0x00000002,0              ,1,63,0x80000000,1,15,0              ,EXCEPTION_NONE     ,0));
     581  transaction_in.push_back(execute_transaction(_param,0,0,0,804,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x40000000,0x00000004,0              ,1,63,0x00000000,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
    582582
    583583
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp

    r97 r104  
    613613                          else
    614614                            {
     615                              LABEL("out_MEMORY_OUT_DATA_RD[0]->read() : 0x%.8x",out_MEMORY_OUT_DATA_RD[0]->read());
     616                              LABEL("data_wait                         : 0x%.8x",tab_request[packet_id]._data_wait);
     617
    615618                              TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD[0]->read(), tab_request[packet_id]._data_wait);
    616619                            }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h

    r88 r104  
    6565  public : Tdcache_address_t   _mask_address_lsb                     ;
    6666  public : Tdcache_address_t   _mask_address_msb                     ;
    67 
     67  public : Tdcache_address_t   _mask_check_hit_byte                  ;
     68 
    6869    //-----[ methods ]-----------------------------------------------------------
    6970  public : Parameters  (uint32_t            size_store_queue       ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Types.h

    r97 r104  
    147147#define must_check(x)      (is_operation_memory_load(x))
    148148
    149 #define      MASK_CHECK_BYTE_HIT    0xff // 1111_1111
    150  
    151149  typedef enum
    152150    {
  • 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

    r101 r104  
    7474            log_printf(TRACE,Load_store_unit,FUNCTION,"    * data (old) : %.8x",data_old);
    7575            log_printf(TRACE,Load_store_unit,FUNCTION,"    * data (new) : %.8x",data_new);
     76            log_printf(TRACE,Load_store_unit,FUNCTION,"      * address      : %.8x",_load_queue [internal_MEMORY_OUT_PTR]._address);
    7677            log_printf(TRACE,Load_store_unit,FUNCTION,"      * rdata        : %.8x",_load_queue [internal_MEMORY_OUT_PTR]._rdata);
    7778            log_printf(TRACE,Load_store_unit,FUNCTION,"      * shift        : %d",_load_queue [internal_MEMORY_OUT_PTR]._shift);
     
    8687            memory_out_data_rd       = (have_exception)?data_old:data_new;
    8788            memory_out_exception     = (_load_queue[internal_MEMORY_OUT_PTR]._state == LOAD_QUEUE_COMMIT_CHECK)?EXCEPTION_MEMORY_LOAD_SPECULATIVE:exception;
     89
     90            log_printf(TRACE,Load_store_unit,FUNCTION,"      * exception    : %d",exception);
     91            log_printf(TRACE,Load_store_unit,FUNCTION,"      * exception    : %d",memory_out_exception);
    8892
    8993            break; // we have find a entry !!! stop the search
     
    203207            // FIXME : il peut avoir plusieurs store avec le même paquet_id ... pour l'instant pas très grave car pas de retour (enfin seul les bus error sont des retours)
    204208            dcache_req_packet_id  = DCACHE_REQ_IS_STORE(reg_STORE_QUEUE_PTR_READ);
    205             dcache_req_address    = _store_queue [reg_STORE_QUEUE_PTR_READ]._address   ;
     209            dcache_req_address    = _store_queue [reg_STORE_QUEUE_PTR_READ]._address;
    206210            dcache_req_type       = operation_to_dcache_type(_store_queue [reg_STORE_QUEUE_PTR_READ]._operation);
    207             dcache_req_wdata      = _store_queue [reg_STORE_QUEUE_PTR_READ]._wdata     ;
     211            dcache_req_wdata      = _store_queue [reg_STORE_QUEUE_PTR_READ]._wdata;
    208212          }
    209213      }
  • 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

    r101 r104  
    5757        for (uint32_t i=0, nb_check=0; (nb_check<_param->_nb_port_check) and (i<_param->_size_load_queue); i++)
    5858          {
     59            // Get an index from load queue
    5960            uint32_t index_load = (i + reg_LOAD_QUEUE_CHECK_PRIORITY)%_param->_size_load_queue;
    60            
    61             if (((_load_queue[index_load]._state == LOAD_QUEUE_WAIT_CHECK)   or
     61
     62            // Test if this load must ckecked store queue
     63            if (((_load_queue[index_load]._state == LOAD_QUEUE_WAIT_CHECK) or
    6264                 (_load_queue[index_load]._state == LOAD_QUEUE_COMMIT_CHECK) or
    6365                 (_load_queue[index_load]._state == LOAD_QUEUE_CHECK)) and
     
    6971
    7072                // find a entry that it need a check
    71 
    7273                Tlsq_ptr_t index_store  = _load_queue[index_load]._store_queue_ptr_write;
     74                // Init variable
    7375                bool       end_check    = false;
    7476                bool       change_state = false;
     
    9597                    log_printf(TRACE,Load_store_unit,FUNCTION,"      * index_store : %d",index_store);
    9698                   
     99                    // switch on store_queue state
    97100                    switch (_store_queue[index_store]._state)
    98101                      {
     
    107110                          bool test_thread_id = true;
    108111                         
    109                           // Test thread id.
     112                          // Test thread id
    110113                          if (_param->_have_port_context_id)
    111114                            test_thread_id &= (_load_queue[index_load]._context_id    == _store_queue[index_store]._context_id);
     
    117120                          if (test_thread_id)
    118121                            {
     122                              // the load and store are in the same thread. Now, we must test address.
     123
    119124                              log_printf(TRACE,Load_store_unit,FUNCTION,"        * load and store is the same thread.");
    120                               // the load and store are in the same thread. Now, we must test address.
    121125                              Tdcache_address_t load_addr  = _load_queue [index_load ]._address;
    122126                              Tdcache_address_t store_addr = _store_queue[index_store]._address;
     
    126130                              log_printf(TRACE,Load_store_unit,FUNCTION,"          * load_addr  & mask_address_msb : %.8x.",load_addr  & _param->_mask_address_msb);
    127131                              log_printf(TRACE,Load_store_unit,FUNCTION,"          * store_addr & mask_address_msb : %.8x.",store_addr & _param->_mask_address_msb);
    128                               // Test if the both address target the same word
     132                              // Test if the both address target the same "word"
    129133                              if ((load_addr  & _param->_mask_address_msb) ==
    130134                                  (store_addr & _param->_mask_address_msb))
     
    143147                                  // the only case is (4)
    144148                                 
     149                                  // Read data
    145150                                  Tgeneral_data_t load_data  = _load_queue [index_load ]._rdata  ;
    146151                                  Tgeneral_data_t store_data = _store_queue[index_store]._wdata  ;
    147152                                 
    148                                   log_printf(TRACE,Load_store_unit,FUNCTION,"              * load_data  (init) : %.8x",load_data);
    149                                   log_printf(TRACE,Load_store_unit,FUNCTION,"              * store_data (init) : %.8x",store_data);
     153                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * load_data  (before): 0x%.8x",load_data);
     154                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * store_data (before): 0x%.8x",store_data);
     155
     156                                  uint32_t store_nb_byte     = (1<<memory_access(_store_queue[index_store]._operation));
     157
     158                                  // Take interval to the store
    150159                                  uint32_t store_num_byte_min = (store_addr & _param->_mask_address_lsb);
    151                                   uint32_t store_num_byte_max = store_num_byte_min+(1<<memory_access(_store_queue[index_store]._operation));
     160                                  uint32_t store_num_byte_max = store_num_byte_min+store_nb_byte;
     161
    152162                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * store_num_byte_min : %d",store_num_byte_min);
    153163                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * store_num_byte_max : %d",store_num_byte_max);
     
    155165                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * check_hit_byte     : %x",_load_queue[index_load]._check_hit_byte);
    156166                                  // The bypass is checked byte per byte
    157                                   for (uint32_t byte=store_num_byte_min; byte<store_num_byte_max; byte ++)
     167                                  // Is same endianness : because to change endianness, we must write in special register. Also the pipeline is flushed.
     168                                  bool is_big_endian = true;
     169
     170                                  for (uint32_t num_store_byte=store_num_byte_min; num_store_byte<store_num_byte_max; num_store_byte ++)
    158171                                    {
    159                                       uint32_t mask  = 1<<byte;
    160                                       uint32_t index = byte<<3;
    161                                       log_printf(TRACE,Load_store_unit,FUNCTION,"              * byte  : %d",byte);
    162                                       log_printf(TRACE,Load_store_unit,FUNCTION,"              * mask  : %d",mask);
    163                                       log_printf(TRACE,Load_store_unit,FUNCTION,"              * index : %d",index);
    164                                       // Accept the bypass if they had not a previous bypass with an another store
     172                                      // Make a mask
     173                                      uint32_t num_load_byte;
     174
     175                                      if (is_big_endian)
     176                                        {
     177                                          // sd 0 : 0 1 2 3 4 5 6 7
     178                                          // ld 0 : 0 1 2 3 4 5 6 7 >>  0
     179                                          // lw 0 :         0 1 2 3 >>  0 -4
     180                                          // lw 4 : 4 5 6 7         >> 32 +4
     181                                          // lh 0 :             0 1 >>  0 -6
     182                                          // lh 2 :         2 3     >> 16 -2
     183                                          // lh 4 :     4 5         >> 32 +2
     184                                          // lh 6 : 6 7             >> 48 +6
     185                                          // lb 0 :               0 >>  0 -7
     186                                          // lb 1 :             1   >>  8 -5
     187                                          // lb 2 :           2     >> 16 -3
     188                                          // lb 3 :         3       >> 24 -1
     189                                          // lb 4 :       4         >> 32 +1
     190                                          // lb 5 :     5           >> 40 +3
     191                                          // lb 6 :   6             >> 48 +5
     192                                          // lb 7 : 7               >> 56 +7
     193
     194                                          // diff : (store_nb_byte + load_nb_byte) - 2*nb_load_byte*((num_store_byte+1)
     195
     196                                          // store duplicate = all store access can be see as full size_data store
     197                                          uint32_t load_nb_byte = (1<<memory_access(_load_queue [index_load ]._operation));
     198
     199//                                           log_printf(TRACE,Load_store_unit,FUNCTION,"                * num_store_byte       : %d",num_store_byte);
     200//                                           log_printf(TRACE,Load_store_unit,FUNCTION,"                * size_general_data>>3 : %d",(_param->_size_general_data>>3));
     201//                                           log_printf(TRACE,Load_store_unit,FUNCTION,"                * load_nb_byte         : %d",load_nb_byte);
     202//                                           log_printf(TRACE,Load_store_unit,FUNCTION,"                * x = ((_param->_size_general_data>>3)+load_nb_byte-2*load_nb_byte*(num_store_byte/load_nb_byte+1)) = %d+%d-%d*%d = %d"
     203//                                                      , (_param->_size_general_data>>3)
     204//                                                      , load_nb_byte
     205//                                                      , 2*load_nb_byte
     206//                                                      ,((num_store_byte/load_nb_byte)+1)
     207//                                                      ,((_param->_size_general_data>>3)+load_nb_byte-2*load_nb_byte*((num_store_byte/load_nb_byte)+1)));
     208                                         
     209
     210                                          num_load_byte =num_store_byte+((_param->_size_general_data>>3)+load_nb_byte-2*load_nb_byte*((num_store_byte/load_nb_byte)+1));
     211                                        }
     212                                      else
     213                                        {
     214                                          // sd 0 : 0 1 2 3 4 5 6 7
     215                                          // ld 0 : 0 1 2 3 4 5 6 7 >>  0
     216                                          // lw 0 :         4 5 6 7 >>  0
     217                                          // lw 4 : 0 1 2 3         >> 32
     218                                          // lh 0 :             6 7 >>  0
     219                                          // lh 2 :         4 5     >> 16
     220                                          // lh 4 :     2 3         >> 32
     221                                          // lh 6 : 0 1             >> 48
     222                                          // lb 0 :               7 >>  0
     223                                          // lb 1 :             6   >>  8
     224                                          // lb 2 :           5     >> 16
     225                                          // lb 3 :         4       >> 24
     226                                          // lb 4 :       3         >> 32
     227                                          // lb 5 :     2           >> 40
     228                                          // lb 6 :   1             >> 48
     229                                          // lb 7 : 0               >> 56
     230                                         
     231                                          num_load_byte = num_store_byte;
     232                                        }
     233                                     
     234                                      uint32_t mask  = 1<<num_load_byte;
     235
     236                                      log_printf(TRACE,Load_store_unit,FUNCTION,"              * num_store_byte : %d",num_store_byte);
     237                                      log_printf(TRACE,Load_store_unit,FUNCTION,"              * num_load_byte  : %d",num_load_byte);
     238                                      log_printf(TRACE,Load_store_unit,FUNCTION,"              * mask           : %d",mask);
     239
     240                                      // Accept the bypass if :
     241                                      //   * they have not a previous bypass with an another store
     242                                      //   * it's a valid request of load
    165243                                      if ((_load_queue[index_load]._check_hit_byte&mask)==0)
    166244                                        {
     245                                          // Note : Store is duplicate = all store access can be see as full size_data store
     246
     247                                          uint32_t num_store_bit_min = num_store_byte<<3; //*8
     248//                                         uint32_t num_store_bit_max = num_store_bit_min+8-1;
     249                                          uint32_t num_load_bit_min  = num_load_byte <<3; //*8
     250                                          uint32_t num_load_bit_max  = num_load_bit_min+8-1;
     251
    167252                                          log_printf(TRACE,Load_store_unit,FUNCTION,"              * bypass !!!");
    168                                           log_printf(TRACE,Load_store_unit,FUNCTION,"                * rdata_old : %.8x", load_data);
    169                                           load_data = insert<Tdcache_data_t>(load_data, store_data, index+8-1, index);
     253//                                        log_printf(TRACE,Load_store_unit,FUNCTION,"              * interval store : [%d:%d]",num_store_bit_max,num_store_bit_min);
     254                                          log_printf(TRACE,Load_store_unit,FUNCTION,"              * interval store : [..:%d]",num_store_bit_min);
     255                                          log_printf(TRACE,Load_store_unit,FUNCTION,"              * interval load  : [%d:%d]",num_load_bit_max,num_load_bit_min);
     256                                          log_printf(TRACE,Load_store_unit,FUNCTION,"                * rdata_old : 0x%.8x", load_data);
     257
     258                                          load_data = ((((store_data>>num_store_bit_min) & 0xff) << num_load_bit_min) |
     259                                                       mask_not<Tdcache_data_t>(load_data,num_load_bit_max,num_load_bit_min));
     260
    170261                                          _load_queue[index_load]._check_hit_byte |= mask;
    171262                                          _load_queue[index_load]._check_hit       = 1;
    172263                                          change_state = true;
    173264
    174                                           log_printf(TRACE,Load_store_unit,FUNCTION,"                * rdata_new : %.8x", load_data);
     265                                          log_printf(TRACE,Load_store_unit,FUNCTION,"                * rdata_new : 0x%.8x", load_data);
    175266                                        }
    176267                                    }
    177268
    178269                                  _load_queue[index_load]._rdata = load_data;
     270                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * load_data  (after) : 0x%.8x",load_data);
    179271
    180272                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * check_hit          : %x",_load_queue[index_load]._check_hit);
     
    182274
    183275                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * mask_end_check     : %x",(-1& _param->_mask_address_lsb));
     276                                  log_printf(TRACE,Load_store_unit,FUNCTION,"            * mask_check_hit_byte: %x",_param->_mask_check_hit_byte);
    184277                                  // The check is finish if all bit is set
    185                                   end_check = (_load_queue[index_load]._check_hit_byte == MASK_CHECK_BYTE_HIT);
     278                                  end_check = (_load_queue[index_load]._check_hit_byte == _param->_mask_check_hit_byte);
    186279                                }
    187280                            }
     
    387480
    388481                    // reordering data
    389                     _store_queue [index]._wdata                = duplicate<Tgeneral_data_t>(_param->_size_general_data,PORT_READ(in_MEMORY_IN_DATA_RB[internal_MEMORY_IN_PORT]), memory_size(operation), 0);
     482                    _store_queue [index]._wdata                = duplicate<Tgeneral_data_t>(_param->_size_general_data,PORT_READ(in_MEMORY_IN_DATA_RB[internal_MEMORY_IN_PORT]), memory_size(operation), 0); 
    390483//                  _store_queue [index]._num_reg_rd           = PORT_READ(in_MEMORY_IN_NUM_REG_RD  [internal_MEMORY_IN_PORT]);
    391484                  }
     
    500593            (PORT_READ(in_DCACHE_REQ_ACK[0]) == 1))
    501594          {
    502             log_printf(TRACE,Load_store_unit,FUNCTION,"  * DCACHE_REQ[0]");
     595            log_printf(TRACE,Load_store_unit,FUNCTION,"  * DCACHE_REQ [0]");
    503596
    504597            switch (internal_DCACHE_REQ_SELECT_QUEUE)
     
    542635            bool         have_exception = (exception != EXCEPTION_MEMORY_NONE);
    543636           
    544            
    545637            if (have_exception)
    546638              _load_queue [ptr_write]._state = LOAD_QUEUE_COMMIT;
     
    570662            Tdcache_address_t address        = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._address;
    571663            Tdcache_address_t address_lsb    = (address & _param->_mask_address_lsb);
    572             Tdcache_address_t check_hit_byte = gen_mask_not<Tdcache_address_t>(address_lsb+memory_access(operation)+1,address_lsb);
    573             _load_queue [ptr_write]._context_id        = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._context_id           ;
    574             _load_queue [ptr_write]._front_end_id      = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._front_end_id         ;
    575             _load_queue [ptr_write]._ooo_engine_id     = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._ooo_engine_id        ;
    576             _load_queue [ptr_write]._packet_id         = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._packet_id            ;
    577             _load_queue [ptr_write]._operation         = operation;
     664            Tdcache_address_t check_hit_byte = gen_mask_not<Tdcache_address_t>(address_lsb+(memory_size(operation)>>3)-1,address_lsb) & _param->_mask_check_hit_byte;
     665
     666            log_printf(TRACE,Load_store_unit,FUNCTION,"    * address                 : 0x%.8x", address);
     667            log_printf(TRACE,Load_store_unit,FUNCTION,"    * address_lsb             : 0x%.8x", address_lsb);
     668            log_printf(TRACE,Load_store_unit,FUNCTION,"    * operation               : %d", operation);
     669            log_printf(TRACE,Load_store_unit,FUNCTION,"    * memory_size             : %d", memory_size(operation));
     670            log_printf(TRACE,Load_store_unit,FUNCTION,"    * check_hit_byte          : 0x%x", check_hit_byte);
     671
     672            _load_queue [ptr_write]._context_id            = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._context_id;
     673            _load_queue [ptr_write]._front_end_id          = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._front_end_id;
     674            _load_queue [ptr_write]._ooo_engine_id         = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._ooo_engine_id;
     675            _load_queue [ptr_write]._packet_id             = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._packet_id;
     676            _load_queue [ptr_write]._operation             = operation;
    578677            _load_queue [ptr_write]._store_queue_ptr_write = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_write;
    579             _load_queue [ptr_write]._address           = address;
    580             _load_queue [ptr_write]._check_hit_byte    = check_hit_byte;
    581             _load_queue [ptr_write]._check_hit         = 0;
    582             _load_queue [ptr_write]._shift             = address<<3;
    583             _load_queue [ptr_write]._is_load_signed    = is_operation_memory_load_signed(operation);
    584             _load_queue [ptr_write]._access_size       = memory_size(operation);
     678            _load_queue [ptr_write]._address               = address;
     679            _load_queue [ptr_write]._check_hit_byte        = check_hit_byte;
     680            _load_queue [ptr_write]._check_hit             = 0;
     681            _load_queue [ptr_write]._shift                 = address_lsb<<3;// *8
     682            _load_queue [ptr_write]._is_load_signed        = is_operation_memory_load_signed(operation);
     683            _load_queue [ptr_write]._access_size           = memory_size(operation);
    585684            // NOTE : if have an exception, must write in register, because a depend instruction wait the load data.
    586             _load_queue [ptr_write]._write_rd          = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._write_rd             ;
     685            _load_queue [ptr_write]._write_rd              = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._write_rd             ;
    587686           
    588             _load_queue [ptr_write]._num_reg_rd        = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._num_reg_rd           ;
    589             _load_queue [ptr_write]._exception         = exception;
    590             _load_queue [ptr_write]._rdata             = address; // to the exception
     687            _load_queue [ptr_write]._num_reg_rd            = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._num_reg_rd           ;
     688            _load_queue [ptr_write]._exception             = exception;
     689            _load_queue [ptr_write]._rdata                 = address; // to the exception
    591690           
    592691            log_printf(TRACE,Load_store_unit,FUNCTION,"    * speculative_access_queue");
     
    628727#endif
    629728
    630                 _load_queue [packet_id]._rdata = rdata;
     729                Tdcache_data_t data = _load_queue [packet_id]._rdata;
     730
     731                log_printf(TRACE,Load_store_unit,FUNCTION,"    * data construction");
     732                log_printf(TRACE,Load_store_unit,FUNCTION,"      * data from cache     : 0x%.8x",rdata);
     733                log_printf(TRACE,Load_store_unit,FUNCTION,"      * data (before)       : 0x%.8x", data);
     734                log_printf(TRACE,Load_store_unit,FUNCTION,"      * check_hit_byte      : 0x%x"  ,_load_queue [packet_id]._check_hit_byte);
     735                for (uint32_t i=0;i<(_param->_size_general_data>>3)/*8*/; ++i)
     736                  // Test if this byte has been checked
     737                  if ((_load_queue [packet_id]._check_hit_byte & (1<<i)) == 0)
     738                    {
     739                      log_printf(TRACE,Load_store_unit,FUNCTION,"      * no previous check ]%d:%d]",(i+1)<<3,i<<3);
     740                      data = insert<Tdcache_data_t>(data,rdata,((i+1)<<3)-1,i<<3);
     741                    }
     742                log_printf(TRACE,Load_store_unit,FUNCTION,"      * data (after)        : 0x%.8x", data);
     743               
     744                _load_queue [packet_id]._rdata = data;
    631745               
    632746                if (error != DCACHE_ERROR_NONE)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp

    r97 r104  
    6464    _mask_address_lsb                      = gen_mask<Tdcache_address_t>(log2(size_general_data/8));
    6565    _mask_address_msb                      = gen_mask<Tdcache_address_t>(size_general_data) << log2(size_general_data/8);
     66    _mask_check_hit_byte                   = 0;
     67
     68    for (uint32_t i=0; i<(size_general_data>>3) /*8*/; ++i)
     69      _mask_check_hit_byte |= (1<<i);
    6670
    6771    test();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp

    r101 r104  
    9595  ALLOC2_SC_SIGNAL(out_RETIRE_CONTEXT_ID              ,"out_RETIRE_CONTEXT_ID              ",Tcontext_t        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    9696//ALLOC2_SC_SIGNAL(out_RETIRE_RENAME_UNIT_ID          ,"out_RETIRE_RENAME_UNIT_ID          ",Tcontext_t        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    97   ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_STATE             ,"out_RETIRE_EVENT_STATE             ",Tevent_state_t    ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    9897  ALLOC2_SC_SIGNAL(out_RETIRE_USE_STORE_QUEUE         ,"out_RETIRE_USE_STORE_QUEUE         ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    9998  ALLOC2_SC_SIGNAL(out_RETIRE_USE_LOAD_QUEUE          ,"out_RETIRE_USE_LOAD_QUEUE          ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    114113  ALLOC2_SC_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_OLD      ,"out_RETIRE_NUM_REG_RE_PHY_OLD      ",Tspecial_address_t,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    115114  ALLOC2_SC_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_NEW      ,"out_RETIRE_NUM_REG_RE_PHY_NEW      ",Tspecial_address_t,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     115
     116  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_VAL               ,"out_RETIRE_EVENT_VAL               ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     117  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_ACK               ," in_RETIRE_EVENT_ACK               ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     118  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_STATE             ,"out_RETIRE_EVENT_STATE             ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
     119
    116120  ALLOC1_SC_SIGNAL( in_COMMIT_VAL                     ," in_COMMIT_VAL               ",Tcontrol_t        ,_param->_nb_inst_commit);
    117121  ALLOC1_SC_SIGNAL(out_COMMIT_ACK                     ,"out_COMMIT_ACK               ",Tcontrol_t        ,_param->_nb_inst_commit);
     
    231235  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_CONTEXT_ID              ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    232236//INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    233   INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_STATE             ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    234237  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_USE_STORE_QUEUE         ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    235238  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_USE_LOAD_QUEUE          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    251254  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_NUM_REG_RE_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    252255  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_NUM_REG_RE_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    253   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_VAL               ,_param->_nb_inst_commit);
    254   INSTANCE1_SC_SIGNAL(_Commit_unit,out_COMMIT_ACK               ,_param->_nb_inst_commit);
    255   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_WEN               ,_param->_nb_inst_commit);
    256   if (_param->_have_port_rob_ptr  )
    257   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_PACKET_ID         ,_param->_nb_inst_commit);
    258 //INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_OPERATION         ,_param->_nb_inst_commit);
    259 //INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_TYPE              ,_param->_nb_inst_commit);
    260   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_FLAGS             ,_param->_nb_inst_commit);
    261   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_EXCEPTION         ,_param->_nb_inst_commit);
    262   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_NO_SEQUENCE       ,_param->_nb_inst_commit);
    263   INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_ADDRESS           ,_param->_nb_inst_commit);
    264   INSTANCE1_SC_SIGNAL(_Commit_unit,out_COMMIT_NUM_REG_RD        ,_param->_nb_inst_commit);
     256  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_VAL               ,_param->_nb_front_end,_param->_nb_context[it1]);
     257  INSTANCE2_SC_SIGNAL(_Commit_unit, in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1]);
     258  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1]);
     259  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_VAL                     ,_param->_nb_inst_commit);
     260  INSTANCE1_SC_SIGNAL(_Commit_unit,out_COMMIT_ACK                     ,_param->_nb_inst_commit);
     261  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_WEN                     ,_param->_nb_inst_commit);
     262  if (_param->_have_port_rob_ptr  )                                   
     263  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_PACKET_ID               ,_param->_nb_inst_commit);
     264//INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_OPERATION               ,_param->_nb_inst_commit);
     265//INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_TYPE                    ,_param->_nb_inst_commit);
     266  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_FLAGS                   ,_param->_nb_inst_commit);
     267  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_EXCEPTION               ,_param->_nb_inst_commit);
     268  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_NO_SEQUENCE             ,_param->_nb_inst_commit);
     269  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_ADDRESS                 ,_param->_nb_inst_commit);
     270  INSTANCE1_SC_SIGNAL(_Commit_unit,out_COMMIT_NUM_REG_RD              ,_param->_nb_inst_commit);
    265271  INSTANCE1_SC_SIGNAL(_Commit_unit,out_REEXECUTE_VAL                  ,_param->_nb_inst_reexecute);
    266272  INSTANCE1_SC_SIGNAL(_Commit_unit, in_REEXECUTE_ACK                  ,_param->_nb_inst_reexecute);
     
    636642  DELETE2_SC_SIGNAL(out_RETIRE_CONTEXT_ID              ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    637643//DELETE2_SC_SIGNAL(out_RETIRE_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    638   DELETE2_SC_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    639644  DELETE2_SC_SIGNAL(out_RETIRE_USE_STORE_QUEUE         ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    640645  DELETE2_SC_SIGNAL(out_RETIRE_USE_LOAD_QUEUE          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    655660  DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    656661  DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     662  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_VAL               ,_param->_nb_front_end,_param->_nb_context[it1]);
     663  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1]);
     664  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1]);
    657665  DELETE1_SC_SIGNAL( in_COMMIT_VAL               ,_param->_nb_inst_commit);
    658666  DELETE1_SC_SIGNAL(out_COMMIT_ACK               ,_param->_nb_inst_commit);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r101 r104  
    112112  public    : SC_OUT(Tcontext_t         ) *** out_RETIRE_CONTEXT_ID                ;//[nb_rename_unit][nb_inst_retire]
    113113//public    : SC_OUT(Tcontext_t         ) *** out_RETIRE_RENAME_UNIT_ID            ;//[nb_rename_unit][nb_inst_retire]
    114   public    : SC_OUT(Tevent_state_t     ) *** out_RETIRE_EVENT_STATE               ;//[nb_rename_unit][nb_inst_retire]
    115114  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_USE_STORE_QUEUE           ;//[nb_rename_unit][nb_inst_retire]
    116115  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_USE_LOAD_QUEUE            ;//[nb_rename_unit][nb_inst_retire]
     
    131130  public    : SC_OUT(Tspecial_address_t ) *** out_RETIRE_NUM_REG_RE_PHY_OLD        ;//[nb_rename_unit][nb_inst_retire]
    132131  public    : SC_OUT(Tspecial_address_t ) *** out_RETIRE_NUM_REG_RE_PHY_NEW        ;//[nb_rename_unit][nb_inst_retire]
     132
     133    // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     134  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_VAL                 ;//[nb_front_end][nb_context]
     135  public    : SC_IN (Tcontrol_t         ) ***  in_RETIRE_EVENT_ACK                 ;//[nb_front_end][nb_context]
     136  public    : SC_OUT(Tevent_state_t     ) *** out_RETIRE_EVENT_STATE               ;//[nb_front_end][nb_context]
    133137                                                                                   
    134138    // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     
    223227
    224228  private   : Tevent_state_t               ** reg_EVENT_STATE                      ;//[nb_front_end][nb_context]
     229  private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
     230
     231  private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
     232  private   : Taddress_t                   ** reg_PC_CURRENT                       ;//[nb_front_end][nb_context]
     233  private   : Taddress_t                   ** reg_PC_CURRENT_IS_DS                 ;//[nb_front_end][nb_context]
     234  private   : Taddress_t                   ** reg_PC_CURRENT_IS_DS_TAKE            ;//[nb_front_end][nb_context]
     235  private   : Taddress_t                   ** reg_PC_NEXT                          ;//[nb_front_end][nb_context]
    225236                                                                                   
    226237    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     
    250261
    251262  private   : Tcontrol_t                   ** internal_EVENT_ACK                   ;//[nb_front_end][nb_context]
     263
     264  private   : Tcontrol_t                   ** internal_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
    252265#endif
    253266
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit.cpp

    r88 r104  
    8181              internal_EVENT_ACK [i][j] = 1;
    8282              PORT_WRITE(out_EVENT_ACK [i][j], internal_EVENT_ACK [i][j]);
     83
     84              internal_RETIRE_EVENT_VAL [i][j] = 1;
     85              PORT_WRITE(out_RETIRE_EVENT_VAL [i][j], internal_RETIRE_EVENT_VAL [i][j]);
    8386            }
    8487
     
    152155                    (*(out_RETIRE_CONTEXT_ID            [i][j])) (*(in_RETIRE_ACK [x][y]));
    153156//                  (*(out_RETIRE_RENAME_UNIT_ID        [i][j])) (*(in_RETIRE_ACK [x][y]));
    154                     (*(out_RETIRE_EVENT_STATE           [i][j])) (*(in_RETIRE_ACK [x][y]));
    155157                    (*(out_RETIRE_USE_STORE_QUEUE       [i][j])) (*(in_RETIRE_ACK [x][y]));
    156158                    (*(out_RETIRE_USE_LOAD_QUEUE        [i][j])) (*(in_RETIRE_ACK [x][y]));
     
    183185                    (*(out_RETIRE_CONTEXT_ID            [i][j])) (*(in_SPR_WRITE_ACK [x][y]));
    184186//                  (*(out_RETIRE_RENAME_UNIT_ID        [i][j])) (*(in_SPR_WRITE_ACK [x][y]));
    185                     (*(out_RETIRE_EVENT_STATE           [i][j])) (*(in_SPR_WRITE_ACK [x][y]));
    186187                    (*(out_RETIRE_USE_STORE_QUEUE       [i][j])) (*(in_SPR_WRITE_ACK [x][y]));
    187188                    (*(out_RETIRE_USE_LOAD_QUEUE        [i][j])) (*(in_SPR_WRITE_ACK [x][y]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r101 r104  
    104104      _ALLOC2_SIGNAL_OUT(out_RETIRE_CONTEXT_ID              ,"context_id"           ,Tcontext_t        ,_param->_size_context_id            ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);   
    105105//    _ALLOC2_SIGNAL_OUT(out_RETIRE_RENAME_UNIT_ID          ,"rename_unit_id"       ,Tcontext_t        ,_param->_size_rename_unit_id        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    106       _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STATE             ,"event_state"          ,Tevent_state_t    ,_param->_size_event_state           ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    107106      _ALLOC2_SIGNAL_OUT(out_RETIRE_USE_STORE_QUEUE         ,"use_store_queue"      ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    108107      _ALLOC2_SIGNAL_OUT(out_RETIRE_USE_LOAD_QUEUE          ,"use_load_queue"       ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    125124    }
    126125
     126    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     127    {
     128      ALLOC2_INTERFACE("retire_event",OUT,SOUTH, _("Interface to update rename_unit."),_param->_nb_front_end,_param->_nb_context[it1]);
     129   
     130      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_VAL               ,VAL,_param->_nb_front_end,_param->_nb_context[it1]);
     131      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_ACK               ,ACK,_param->_nb_front_end,_param->_nb_context[it1]);
     132      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STATE             ,"state"                ,Tevent_state_t    ,_param->_size_event_state           ,_param->_nb_front_end,_param->_nb_context[it1]);
     133    }
     134
    127135    // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    128136    {
     
    243251      {
    244252    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    245     internal_BANK_INSERT_VAL             = new Tcontrol_t   [_param->_nb_bank];
    246     internal_BANK_INSERT_NUM_RENAME_UNIT = new uint32_t     [_param->_nb_bank];
    247     internal_BANK_INSERT_NUM_INST        = new uint32_t     [_param->_nb_bank];
    248 
    249     internal_BANK_COMMIT_VAL             = new Tcontrol_t * [_param->_nb_bank];
    250     internal_BANK_COMMIT_NUM_INST        = new uint32_t   * [_param->_nb_bank];
    251     internal_BANK_COMMIT_ENTRY           = new entry_t   ** [_param->_nb_bank];
     253    ALLOC1(internal_BANK_INSERT_VAL             ,Tcontrol_t,_param->_nb_bank);
     254    ALLOC1(internal_BANK_INSERT_NUM_RENAME_UNIT ,uint32_t  ,_param->_nb_bank);
     255    ALLOC1(internal_BANK_INSERT_NUM_INST        ,uint32_t  ,_param->_nb_bank);
     256
     257    ALLOC2(internal_BANK_COMMIT_VAL             ,Tcontrol_t,_param->_nb_bank,_param->_nb_bank_access_commit);
     258    ALLOC2(internal_BANK_COMMIT_NUM_INST        ,uint32_t  ,_param->_nb_bank,_param->_nb_bank_access_commit);
     259    ALLOC2(internal_BANK_COMMIT_ENTRY           ,entry_t * ,_param->_nb_bank,_param->_nb_bank_access_commit);
     260
     261    ALLOC1(internal_BANK_RETIRE_VAL             ,Tcontrol_t,_param->_nb_bank);
     262    ALLOC1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,uint32_t  ,_param->_nb_bank);
     263    ALLOC1(internal_BANK_RETIRE_NUM_INST        ,uint32_t  ,_param->_nb_bank);
     264
     265    ALLOC1(internal_REEXECUTE_VAL               ,Tcontrol_t,_param->_nb_inst_reexecute);
     266    ALLOC1(internal_REEXECUTE_NUM_BANK          ,uint32_t  ,_param->_nb_inst_reexecute);
     267
     268    ALLOC1(internal_BRANCH_COMPLETE_VAL         ,Tcontrol_t,_param->_nb_inst_branch_complete);
     269    ALLOC1(internal_BRANCH_COMPLETE_NUM_BANK    ,uint32_t  ,_param->_nb_inst_branch_complete);
     270
     271    ALLOC2(internal_EVENT_ACK                   ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context [it1]);
     272
     273    ALLOC2(internal_RETIRE_EVENT_VAL            ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]);
     274
     275    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     276    ALLOC1(_rob                     ,std::list<entry_t*>,_param->_nb_bank);
    252277   
    253     for (uint32_t i=0; i<_param->_nb_bank; i++)
    254       {
    255         internal_BANK_COMMIT_VAL              [i] = new Tcontrol_t [_param->_nb_bank_access_commit];
    256         internal_BANK_COMMIT_NUM_INST         [i] = new uint32_t   [_param->_nb_bank_access_commit];
    257         internal_BANK_COMMIT_ENTRY            [i] = new entry_t  * [_param->_nb_bank_access_commit];
    258       }
    259 
    260     internal_BANK_RETIRE_VAL             = new Tcontrol_t   [_param->_nb_bank];
    261     internal_BANK_RETIRE_NUM_RENAME_UNIT = new uint32_t     [_param->_nb_bank];
    262     internal_BANK_RETIRE_NUM_INST        = new uint32_t     [_param->_nb_bank];
    263 
    264     internal_REEXECUTE_VAL               = new Tcontrol_t   [_param->_nb_inst_reexecute];
    265     internal_REEXECUTE_NUM_BANK          = new uint32_t     [_param->_nb_inst_reexecute];
    266 
    267     internal_BRANCH_COMPLETE_VAL         = new Tcontrol_t   [_param->_nb_inst_branch_complete];
    268     internal_BRANCH_COMPLETE_NUM_BANK    = new uint32_t     [_param->_nb_inst_branch_complete];
    269 
    270     internal_EVENT_ACK                   = new Tcontrol_t * [_param->_nb_front_end];
    271     for (uint32_t i=0; i<_param->_nb_front_end; i++)
    272       internal_EVENT_ACK [i] = new Tcontrol_t [_param->_nb_context [i]];
    273 
    274     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    275     ALLOC1(_rob                   ,std::list<entry_t*>,_param->_nb_bank);
     278    ALLOC1(reg_BANK_PTR             ,uint32_t      ,_param->_nb_bank);
     279
     280    ALLOC2(reg_NB_INST_COMMIT_ALL   ,Tcounter_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     281    ALLOC2(reg_NB_INST_COMMIT_MEM   ,Tcounter_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
    276282   
    277     ALLOC1(reg_BANK_PTR           ,uint32_t      ,_param->_nb_bank);
    278 
    279     ALLOC2(reg_NB_INST_COMMIT_ALL ,Tcounter_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
    280     ALLOC2(reg_NB_INST_COMMIT_MEM ,Tcounter_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
    281    
    282     ALLOC2(reg_EVENT_STATE        ,Tevent_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
     283    ALLOC2(reg_EVENT_STATE          ,Tevent_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
     284    ALLOC2(reg_EVENT_FLUSH          ,bool          ,_param->_nb_front_end,_param->_nb_context [it1]);
     285
     286    ALLOC2(reg_PC_PREVIOUS          ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     287    ALLOC2(reg_PC_CURRENT           ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     288    ALLOC2(reg_PC_CURRENT_IS_DS     ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     289    ALLOC2(reg_PC_CURRENT_IS_DS_TAKE,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     290    ALLOC2(reg_PC_NEXT              ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
    283291      }
    284292
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r101 r104  
    6767        DELETE2_SIGNAL(out_RETIRE_CONTEXT_ID              ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_context_id            );   
    6868//      DELETE2_SIGNAL(out_RETIRE_RENAME_UNIT_ID          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_rename_unit_id        );
    69         DELETE2_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_event_state           );
    7069        DELETE2_SIGNAL(out_RETIRE_USE_STORE_QUEUE         ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
    7170        DELETE2_SIGNAL(out_RETIRE_USE_LOAD_QUEUE          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1                                   );
     
    8786        DELETE2_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register      );
    8887
     88        DELETE2_SIGNAL(out_RETIRE_EVENT_VAL               ,_param->_nb_front_end,_param->_nb_context[it1],1);
     89        DELETE2_SIGNAL( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1],1);
     90        DELETE2_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state);
     91
    8992        DELETE1_SIGNAL( in_COMMIT_VAL               ,_param->_nb_inst_commit,1                             );
    9093        DELETE1_SIGNAL(out_COMMIT_ACK               ,_param->_nb_inst_commit,1                             );
     
    156159
    157160        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
    158         delete [] internal_BANK_INSERT_VAL            ;
    159         delete [] internal_BANK_INSERT_NUM_RENAME_UNIT;
    160         delete [] internal_BANK_INSERT_NUM_INST       ;
    161        
    162         delete [] internal_BANK_COMMIT_VAL            ;
    163         delete [] internal_BANK_COMMIT_NUM_INST       ;
    164         delete [] internal_BANK_COMMIT_ENTRY          ;
    165        
    166         delete [] internal_BANK_RETIRE_VAL            ;
    167         delete [] internal_BANK_RETIRE_NUM_RENAME_UNIT;
    168         delete [] internal_BANK_RETIRE_NUM_INST       ;
    169        
    170         delete [] internal_REEXECUTE_VAL              ;
    171         delete [] internal_REEXECUTE_NUM_BANK         ;
    172        
    173         delete [] internal_BRANCH_COMPLETE_VAL        ;
    174         delete [] internal_BRANCH_COMPLETE_NUM_BANK   ;
    175        
    176         for (uint32_t i=0; i<_param->_nb_front_end; i++)
    177           delete [] internal_EVENT_ACK [i];
    178         delete [] internal_EVENT_ACK;
     161        DELETE1(internal_BANK_INSERT_VAL             ,_param->_nb_bank);
     162        DELETE1(internal_BANK_INSERT_NUM_RENAME_UNIT ,_param->_nb_bank);
     163        DELETE1(internal_BANK_INSERT_NUM_INST        ,_param->_nb_bank);
     164       
     165        DELETE2(internal_BANK_COMMIT_VAL             ,_param->_nb_bank,_param->_nb_bank_access_commit);
     166        DELETE2(internal_BANK_COMMIT_NUM_INST        ,_param->_nb_bank,_param->_nb_bank_access_commit);
     167        DELETE2(internal_BANK_COMMIT_ENTRY           ,_param->_nb_bank,_param->_nb_bank_access_commit);
     168       
     169        DELETE1(internal_BANK_RETIRE_VAL             ,_param->_nb_bank);
     170        DELETE1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,_param->_nb_bank);
     171        DELETE1(internal_BANK_RETIRE_NUM_INST        ,_param->_nb_bank);
     172       
     173        DELETE1(internal_REEXECUTE_VAL               ,_param->_nb_inst_reexecute);
     174        DELETE1(internal_REEXECUTE_NUM_BANK          ,_param->_nb_inst_reexecute);
     175       
     176        DELETE1(internal_BRANCH_COMPLETE_VAL         ,_param->_nb_inst_branch_complete);
     177        DELETE1(internal_BRANCH_COMPLETE_NUM_BANK    ,_param->_nb_inst_branch_complete);
     178       
     179        DELETE2(internal_EVENT_ACK                   ,_param->_nb_front_end,_param->_nb_context [it1]);
     180       
     181        DELETE2(internal_RETIRE_EVENT_VAL            ,_param->_nb_front_end,_param->_nb_context[it1]);
    179182       
    180183        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    181         DELETE1(_rob                   ,_param->_nb_bank);
    182         DELETE1(reg_BANK_PTR           ,_param->_nb_bank);
    183         DELETE2(reg_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context [it1]);
    184         DELETE2(reg_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context [it1]);
    185         DELETE2(reg_EVENT_STATE        ,_param->_nb_front_end,_param->_nb_context [it1]);
     184        DELETE1(_rob                     ,_param->_nb_bank);
     185        DELETE1(reg_BANK_PTR             ,_param->_nb_bank);
     186        DELETE2(reg_NB_INST_COMMIT_ALL   ,_param->_nb_front_end,_param->_nb_context [it1]);
     187        DELETE2(reg_NB_INST_COMMIT_MEM   ,_param->_nb_front_end,_param->_nb_context [it1]);
     188        DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
     189        DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
     190        DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
     191        DELETE2(reg_PC_CURRENT           ,_param->_nb_front_end,_param->_nb_context [it1]);
     192        DELETE2(reg_PC_CURRENT_IS_DS     ,_param->_nb_front_end,_param->_nb_context [it1]);
     193        DELETE2(reg_PC_CURRENT_IS_DS_TAKE,_param->_nb_front_end,_param->_nb_context [it1]);
     194        DELETE2(reg_PC_NEXT              ,_param->_nb_front_end,_param->_nb_context [it1]);
    186195      }
    187196
     
    199208}; // end namespace multi_ooo_engine
    200209}; // end namespace core
    201 
    202210}; // end namespace behavioural
    203211}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp

    r100 r104  
    3535    Tcontrol_t spr_write_sr_ov_val [_param->_nb_front_end][_param->_max_nb_context];
    3636    Tcontrol_t spr_write_sr_ov     [_param->_nb_front_end][_param->_max_nb_context];
    37 
    3837
    3938    // Initialisation
     
    148147                    PORT_WRITE(out_RETIRE_CONTEXT_ID            [x][y], context_id                  );
    149148//                  PORT_WRITE(out_RETIRE_RENAME_UNIT_ID        [x][y], entry->rename_unit_id       );
    150                     PORT_WRITE(out_RETIRE_EVENT_STATE           [x][y], reg_EVENT_STATE[front_end_id][context_id]);
    151149                    PORT_WRITE(out_RETIRE_USE_STORE_QUEUE       [x][y], entry->use_store_queue      );
    152150                    PORT_WRITE(out_RETIRE_USE_LOAD_QUEUE        [x][y], entry->use_load_queue       );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp

    r100 r104  
    143143        }
    144144
     145    // ===================================================================
     146    // =====[ RETIRE_EVENT ]==============================================
     147    // ===================================================================
     148    for (uint32_t i=0; i<_param->_nb_front_end; i++)
     149      for (uint32_t j=0; j<_param->_nb_context [i]; j++)
     150        PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], reg_EVENT_STATE[i][j]);
    145151
    146152    log_end(Commit_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r101 r104  
    4141          for (uint32_t j=0; j<_param->_nb_context [i]; j++)
    4242            {
    43               reg_NB_INST_COMMIT_ALL [i][j] = 0;
    44               reg_NB_INST_COMMIT_MEM [i][j] = 0;
    45 
    46               reg_EVENT_STATE        [i][j] = EVENT_STATE_NO_EVENT;
     43              reg_NB_INST_COMMIT_ALL    [i][j] = 0;
     44              reg_NB_INST_COMMIT_MEM    [i][j] = 0;
     45                                       
     46              reg_EVENT_STATE           [i][j] = EVENT_STATE_NO_EVENT;
     47              reg_EVENT_FLUSH           [i][j] = false;
     48
     49//            reg_PC_PREVIOUS           [i][j] = (0x100-4)>>2;
     50              reg_PC_CURRENT            [i][j] = (0x100  )>>2;
     51              reg_PC_CURRENT_IS_DS      [i][j] = 0;
     52              reg_PC_CURRENT_IS_DS_TAKE [i][j] = 0;
     53//            reg_PC_NEXT               [i][j] = (0x100+4)>>2;
    4754            }
    4855
     
    6269            switch (reg_EVENT_STATE [i][j])
    6370              {
    64               case EVENT_STATE_EVENT    : reg_EVENT_STATE [i][j] = EVENT_STATE_WAITEND ; break;
    65               case EVENT_STATE_END      : reg_EVENT_STATE [i][j] = EVENT_STATE_NO_EVENT; break;
     71              case EVENT_STATE_EVENT    :
     72                {
     73                  if (internal_RETIRE_EVENT_VAL [i][j] and in_RETIRE_EVENT_ACK [i][j])
     74                    reg_EVENT_STATE [i][j] = EVENT_STATE_WAITEND ;
     75                  break;
     76                }
     77              case EVENT_STATE_WAITEND  :
     78                {
     79                  if (reg_NB_INST_COMMIT_ALL [i][j] == 0)
     80                    {
     81                      reg_EVENT_STATE [i][j] = EVENT_STATE_END;
     82                      reg_EVENT_FLUSH [i][j] = false;
     83                    }
     84                  break;
     85                }
     86              case EVENT_STATE_END      :
     87                {
     88                  reg_EVENT_STATE [i][j] = EVENT_STATE_NO_EVENT;
     89                  break;
     90                }
    6691//            case EVENT_STATE_NO_EVENT :
    67 //            case EVENT_STATE_WAITEND  :
    6892              default : break;
    6993              }
     
    324348                {
    325349                  reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
    326 
    327                   // !!!!!!!!!!! Compute address
     350                  reg_EVENT_FLUSH [front_end_id][context_id] = true;
     351
     352                  // TODO Compute address !!!!!!!!!!!
    328353                }
    329354             
     
    332357              if (type == TYPE_MEMORY)
    333358                reg_NB_INST_COMMIT_MEM [front_end_id][context_id] --;
    334 
    335               if (reg_NB_INST_COMMIT_ALL [front_end_id][context_id] == 0)
    336                 reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_END;
    337359
    338360              reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank;
     
    416438
    417439              Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
    418               Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
    419               Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
     440//               Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
     441//               Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
    420442             
    421443              // is a valid instruction ?
     
    433455              // ....... max ...X... min ....... KO
    434456             
    435               Tcontrol_t   is_valid      = ((depth == depth_min) or
    436                                             depth_full or
    437                                             ((depth_min <= depth_max)?
    438                                              ((depth >= depth_min) and (depth <=depth_max)):
    439                                              ((depth >= depth_min) or  (depth <=depth_max))));
     457//               Tcontrol_t   is_valid      = ((depth == depth_min) or
     458//                                             depth_full or
     459//                                             ((depth_min <= depth_max)?
     460//                                              ((depth >= depth_min) and (depth <=depth_max)):
     461//                                              ((depth >= depth_min) or  (depth <=depth_max))));
     462
     463              bool         flush         = reg_EVENT_FLUSH [front_end_id][context_id];
     464              Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
    440465
    441466              log_printf(TRACE,Commit_unit,FUNCTION,"  * HEAD              [%d]",i);
     
    443468              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
    444469              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
    445               log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
     470//               log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
     471              log_printf(TRACE,Commit_unit,FUNCTION,"    * flush           : %d",flush);
    446472
    447473              //------------------------------------------------------
     
    522548    for (uint32_t i=0; i<_param->_nb_front_end; i++)
    523549      for (uint32_t j=0; j<_param->_nb_context [i]; j++)
    524         log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst[%d][%d] all : %d, mem : %d",i,j,reg_NB_INST_COMMIT_ALL[i][j],reg_NB_INST_COMMIT_MEM[i][j]);
     550        {
     551          log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] num_inst_all : %d, num_inst_mem : %d",i,j,reg_NB_INST_COMMIT_ALL[i][j],reg_NB_INST_COMMIT_MEM[i][j]);
     552          log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] state        : %s",i,j,toString(reg_EVENT_STATE [i][j]).c_str());
     553        }
    525554       
    526555    for (uint32_t i=0; i<_param->_nb_bank; i++)
    527556      {
    528         log_printf(TRACE,Commit_unit,FUNCTION,"    * Bank[%d] size : %d, ptr : %d",i,(int)_rob[i].size(), reg_BANK_PTR [i]);
     557        log_printf(TRACE,Commit_unit,FUNCTION,"    * Bank [%d] size : %d, ptr : %d",i,(int)_rob[i].size(), reg_BANK_PTR [i]);
    529558
    530559#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp

    r88 r104  
    8181  ALLOC1_SC_SIGNAL( in_RETIRE_FRONT_END_ID      ," in_RETIRE_FRONT_END_ID      ",Tcontext_t        ,_param->_nb_inst_retire);
    8282  ALLOC1_SC_SIGNAL( in_RETIRE_CONTEXT_ID        ," in_RETIRE_CONTEXT_ID        ",Tcontext_t        ,_param->_nb_inst_retire);
    83   ALLOC1_SC_SIGNAL( in_RETIRE_EVENT_STATE       ," in_RETIRE_EVENT_STATE       ",Tevent_state_t    ,_param->_nb_inst_retire);
    8483  ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RD          ," in_RETIRE_WRITE_RD          ",Tcontrol_t        ,_param->_nb_inst_retire);
    8584  ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RE          ," in_RETIRE_WRITE_RE          ",Tcontrol_t        ,_param->_nb_inst_retire);
     
    9089  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    9190  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
     91
     92  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_VAL         ," in_RETIRE_EVENT_VAL         ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     93  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_ACK         ,"out_RETIRE_EVENT_ACK         ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     94  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE       ," in_RETIRE_EVENT_STATE       ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
    9295 
    9396  /********************************************************
     
    136139  if (_param->_have_port_context_id)
    137140  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_CONTEXT_ID        ,_param->_nb_inst_retire);
    138   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_EVENT_STATE       ,_param->_nb_inst_retire);
    139141  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire);
    140142  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire);
     
    145147  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
    146148  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
     149
     150  INSTANCE2_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_EVENT_VAL         ,_param->_nb_front_end, _param->_nb_context[it1]);
     151  INSTANCE2_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_EVENT_ACK         ,_param->_nb_front_end, _param->_nb_context[it1]);
     152  INSTANCE2_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_EVENT_STATE       ,_param->_nb_front_end, _param->_nb_context[it1]);
    147153
    148154  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    192198  SC_START(0);
    193199  LABEL("Initialisation");
     200 
     201  for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     202    for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     203      in_RETIRE_EVENT_VAL [i][j]->write(1);
    194204
    195205  LABEL("Reset");
     
    251261
    252262              Tcontext_t front_end_id = rand() % _param->_nb_front_end;
     263              Tcontext_t context_id   = rand() % (_param->_nb_context[front_end_id]);
    253264
    254265              in_RETIRE_VAL                [i]->write(val);
    255266              in_RETIRE_FRONT_END_ID       [i]->write(front_end_id);
    256               in_RETIRE_CONTEXT_ID         [i]->write(rand() % (_param->_nb_context[front_end_id]));
    257               in_RETIRE_EVENT_STATE        [i]->write(EVENT_STATE_NO_EVENT);
     267              in_RETIRE_CONTEXT_ID         [i]->write(context_id);
    258268              in_RETIRE_WRITE_RD           [i]->write(rand() % 2);
    259269              in_RETIRE_WRITE_RE           [i]->write(rand() % 2);
     
    262272              in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rand() % _param->_nb_general_register);
    263273              in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(rand() % _param->_nb_special_register);
     274
     275              in_RETIRE_EVENT_STATE        [front_end_id][context_id]->write(EVENT_STATE_NO_EVENT);
    264276            }
    265277
     
    332344          in_RETIRE_FRONT_END_ID       [i]->write(retire_front_end_id [i]);
    333345          in_RETIRE_CONTEXT_ID         [i]->write(retire_context_id   [i]);
    334           in_RETIRE_EVENT_STATE        [i]->write(EVENT_STATE_EVENT);
    335346          in_RETIRE_WRITE_RD           [i]->write(0);
    336347          in_RETIRE_WRITE_RE           [i]->write(0);
    337348         
     349          in_RETIRE_EVENT_STATE [retire_front_end_id [i]][retire_context_id [i]]->write(EVENT_STATE_EVENT);
     350
    338351          do
    339352            {
     
    389402              in_RETIRE_FRONT_END_ID       [i]->write(retire_front_end_id [i]);
    390403              in_RETIRE_CONTEXT_ID         [i]->write(retire_context_id   [i]);
    391               in_RETIRE_EVENT_STATE        [i]->write(EVENT_STATE_WAITEND);
    392404              in_RETIRE_WRITE_RD           [i]->write(rand() % 2);
    393405              in_RETIRE_WRITE_RE           [i]->write(rand() % 2);
     
    396408              in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rand() % _param->_nb_general_register);
    397409              in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(rand() % _param->_nb_special_register);
     410
     411              in_RETIRE_EVENT_STATE [retire_front_end_id [i]][retire_context_id [i]]->write(EVENT_STATE_WAITEND);
    398412            }
    399413
     
    517531  if (_param->_have_port_context_id)
    518532  delete []  in_RETIRE_CONTEXT_ID        ;
    519   delete []  in_RETIRE_EVENT_STATE       ;
    520533  delete []  in_RETIRE_WRITE_RD          ;
    521534  delete []  in_RETIRE_WRITE_RE          ;
     
    527540  delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
    528541
     542  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1]);
     543  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1]);
     544  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
    529545#endif
    530546
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h

    r88 r104  
    9696  public    : SC_IN (Tcontext_t        )   **  in_RETIRE_FRONT_END_ID      ;//[nb_inst_retire]
    9797  public    : SC_IN (Tcontext_t        )   **  in_RETIRE_CONTEXT_ID        ;//[nb_inst_retire]
    98   public    : SC_IN (Tevent_state_t    )   **  in_RETIRE_EVENT_STATE       ;//[nb_inst_retire]
    9998  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_WRITE_RD          ;//[nb_inst_retire]
    10099  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_WRITE_RE          ;//[nb_inst_retire]
     
    105104  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
    106105  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
     106
     107    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
     109  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK            ;//[nb_front_end][nb_context]
     110  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE          ;//[nb_front_end][nb_context]
    107111
    108112    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    118122  private   : Tcontrol_t                    * internal_INSERT_ACK;          //[nb_inst_insert]
    119123  private   : Tcontrol_t                    * internal_RETIRE_ACK;          //[nb_inst_retire]
     124  public    : Tcontrol_t                   ** internal_RETIRE_EVENT_ACK    ;//[nb_front_end][nb_context]
    120125
    121126  private   : bool                        *** internal_rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp

    r100 r104  
    8484            PORT_WRITE(out_INSERT_ACK[i],internal_INSERT_ACK [i]);
    8585          }
     86
    8687        for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    8788          {
     
    9091            PORT_WRITE(out_RETIRE_ACK[i],internal_RETIRE_ACK [i]);
    9192          }
     93
     94        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     95          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     96            {
     97              internal_RETIRE_EVENT_ACK [i][j] = 1;
     98             
     99              PORT_WRITE(out_RETIRE_EVENT_ACK[i][j],internal_RETIRE_EVENT_ACK [i][j]);
     100            }
    92101
    93102        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - transition");
     
    119128                      << (*(in_RENAME_NUM_REG_RD_LOG [i]))
    120129                      << (*(in_RENAME_NUM_REG_RE_LOG [i]));
    121       }
    122 
     130          }
    123131
    124132# ifdef SYSTEMCASS_SPECIFIC
     
    138146            sensitive << (*(in_RETIRE_CONTEXT_ID     [i]));
    139147           
    140             sensitive << (*(in_RETIRE_EVENT_STATE    [i]))
    141                       << (*(in_RETIRE_WRITE_RD       [i]))
     148            sensitive << (*(in_RETIRE_WRITE_RD       [i]))
    142149                      << (*(in_RETIRE_WRITE_RE       [i]))
    143150                      << (*(in_RETIRE_NUM_REG_RD_LOG [i]))
    144151                      << (*(in_RETIRE_NUM_REG_RE_LOG [i]));
    145152          }
     153
     154        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     155          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     156            sensitive << (*(in_RETIRE_EVENT_STATE [i][j]));
    146157       
    147158# ifdef SYSTEMCASS_SPECIFIC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp

    r88 r104  
    77
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h"
     9#include "Behavioural/include/Allocation.h"
    910#include "Behavioural/include/Allocation.h"
    1011
     
    100101      ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID      ,"front_end_id"      ,Tcontext_t        ,_param->_size_front_end_id);
    101102      ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID        ,"context_id"        ,Tcontext_t        ,_param->_size_context_id  );
    102       ALLOC1_SIGNAL_IN ( in_RETIRE_EVENT_STATE       ,"event_state"       ,Tevent_state_t    ,_param->_size_event_state );
    103103      ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD          ,"write_rd"          ,Tcontrol_t        ,1);
    104104      ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RE          ,"write_re"          ,Tcontrol_t        ,1);
     
    111111    }
    112112
     113    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     114    {
     115      ALLOC2_INTERFACE("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
     116
     117      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL        ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
     118      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK        ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
     119      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE      ,"state"             ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
     120    }
     121
    113122    if (usage_is_set(_usage,USE_SYSTEMC))
    114123      {
    115     internal_RENAME_ACK = new Tcontrol_t [_param->_nb_inst_insert];
    116     internal_INSERT_ACK = new Tcontrol_t [_param->_nb_inst_insert];
    117     internal_RETIRE_ACK = new Tcontrol_t [_param->_nb_inst_retire];
     124    ALLOC1(internal_RENAME_ACK       ,Tcontrol_t,_param->_nb_inst_insert);
     125    ALLOC1(internal_INSERT_ACK       ,Tcontrol_t,_param->_nb_inst_insert);
     126    ALLOC1(internal_RETIRE_ACK       ,Tcontrol_t,_param->_nb_inst_retire);
     127    ALLOC2(internal_RETIRE_EVENT_ACK ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]);
    118128
    119129    rat_gpr                       = new Tgeneral_address_t ** [_param->_nb_front_end];
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp

    r88 r104  
    77
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    6566        if (_param->_have_port_context_id)
    6667        delete []  in_RETIRE_CONTEXT_ID        ;
    67         delete []  in_RETIRE_EVENT_STATE       ;
    6868        delete []  in_RETIRE_WRITE_RD          ;
    6969        delete []  in_RETIRE_WRITE_RE          ;
     
    7575        delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
    7676
    77         delete [] internal_RENAME_ACK;
    78         delete [] internal_INSERT_ACK;
    79         delete [] internal_RETIRE_ACK;
     77        DELETE1(internal_RENAME_ACK                    ,_param->_nb_inst_insert);
     78        DELETE1(internal_INSERT_ACK                    ,_param->_nb_inst_insert);
     79        DELETE1(internal_RETIRE_ACK                    ,_param->_nb_inst_retire);
     80        DELETE2(internal_RETIRE_EVENT_ACK              ,_param->_nb_front_end,_param->_nb_context[it1]);
     81
     82        DELETE2_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1],1);
     83        DELETE2_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1],1);
     84        DELETE2_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
    8085       
    8186        delete [] rat_gpr             ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_retire.cpp

    r88 r104  
    4343
    4444        // init -> need't restore old value
    45         Tcontrol_t     retire_restore_rd_phy_old = false;
    46         Tcontrol_t     retire_restore_re_phy_old = false;
    47         Tevent_state_t event_state               = PORT_READ(in_RETIRE_EVENT_STATE [i]);
     45        Tcontrol_t retire_restore_rd_phy_old = false;
     46        Tcontrol_t retire_restore_re_phy_old = false;
     47
     48        Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
     49        Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
    4850
    4951        // Test if event -> need restore ?
    50         if (event_state != EVENT_STATE_NO_EVENT)
     52        if (PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]) != EVENT_STATE_NO_EVENT)
    5153          {
    52             Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
    53             Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
    54 
    5554            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * Have event");
    5655            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id         : %d",front_end_id);
    5756            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id           : %d",context_id  );
    5857                       
    59             // Test if event have just occure -> reset update_table
    60             if (event_state == EVENT_STATE_EVENT)
    61               {
    62                 // Reset update_table
    63                 for (uint32_t j=0; j<_param->_nb_general_register_logic; j++)
    64                   internal_rat_gpr_update_table[front_end_id][context_id][j] = 0;
    65                 for (uint32_t j=0; j<_param->_nb_special_register_logic; j++)
    66                   internal_rat_spr_update_table[front_end_id][context_id][j] = 0;
    67               }
    68            
    6958            // Test and update update table
    7059            if (PORT_READ(in_RETIRE_WRITE_RD [i]))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp

    r100 r104  
    6060          if (PORT_READ(in_INSERT_VAL [i]) and internal_INSERT_ACK  [i])
    6161            {
     62              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * INSERT [%d]",i);
     63
    6264              Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0;
    6365              Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_CONTEXT_ID   [i]):0;
     
    7173
    7274        // =====================================================
     75        // ====[ RETIRE_EVENT ]=================================
     76        // =====================================================
     77        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     78          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     79            if (PORT_READ(in_RETIRE_EVENT_VAL [i][j]) and internal_RETIRE_EVENT_ACK [i][j])
     80              // Test if event have just occure
     81              if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT)
     82                {
     83                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * Reset Update Table");
     84                 
     85                  // Reset update_table
     86                  for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
     87                    rat_gpr_update_table [i][j][k] = 0;
     88                  for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
     89                    rat_spr_update_table [i][j][k] = 0;
     90                }
     91
     92        // =====================================================
    7393        // ====[ RETIRE ]=======================================
    7494        // =====================================================
     
    7898          if (PORT_READ(in_RETIRE_VAL [i]) and internal_RETIRE_ACK [i])
    7999            {
     100              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * RETIRE [%d]",i);
     101
    80102              // if no event : no effect, because the RAT content the most recently register
    81103              // but if they have a event (exception or miss speculation), the rat must restore the oldest value
    82104              // To restore the oldest valid value, we use the rat_update_table. if the bit is unset, also they have none update on this register
    83105              // the retire interface became of the Re Order Buffer, also is in program sequence !
    84               if (PORT_READ(in_RETIRE_EVENT_STATE [i]) != EVENT_STATE_NO_EVENT)
     106
     107              Tcontext_t         front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
     108              Tcontext_t         context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
     109              Tevent_state_t     event_state  = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]);
     110
     111              if (event_state != EVENT_STATE_NO_EVENT)
    85112                {
    86                   Tcontext_t         front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
    87                   Tcontext_t         context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
    88 
    89                   // Test if event have just occure
    90                   if (PORT_READ(in_RETIRE_EVENT_STATE [i]) == EVENT_STATE_EVENT)
    91                     {
    92                       // Reset update_table
    93                       for (uint32_t j=0; j<_param->_nb_general_register_logic; j++)
    94                         rat_gpr_update_table[front_end_id][context_id][j] = 0;
    95                       for (uint32_t j=0; j<_param->_nb_special_register_logic; j++)
    96                         rat_spr_update_table[front_end_id][context_id][j] = 0;
    97                     }
     113                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id : %d",front_end_id);
     114                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id   : %d",context_id);
     115                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * event_state  : %d",event_state);
    98116
    99117                  // Test if write and have not a previous update
     
    102120                      Tgeneral_address_t rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]);
    103121                     
    104                       log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * retire[%d]",i);
    105                       log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id : %d",front_end_id);
    106                       log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id   : %d",context_id  );
    107                       log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * rd_log       : %d",rd_log      );
     122                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * retire RD");
     123                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * rd_log       : %d",rd_log);
    108124                     
    109125//                    if (RETIRE_RESTORE_RD_PHY_OLD [i])
    110                       if (rat_gpr_update_table[front_end_id][context_id][rd_log] == 0)
    111                         {
    112                           rat_gpr             [front_end_id][context_id][rd_log] = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_OLD [i]);
    113                           rat_gpr_update_table[front_end_id][context_id][rd_log] = 1;
     126                      if (rat_gpr_update_table [front_end_id][context_id][rd_log] == 0)
     127                        {                     
     128                          rat_gpr              [front_end_id][context_id][rd_log] = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_OLD [i]);
     129                          rat_gpr_update_table [front_end_id][context_id][rd_log] = 1;
    114130                        }
    115131                    }
     
    119135                      Tspecial_address_t re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]);
    120136
     137                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * retire RE");
     138                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * re_log       : %d",re_log);
     139
    121140//                    if (RETIRE_RESTORE_RE_PHY_OLD [i])
    122                       if (rat_spr_update_table[front_end_id][context_id][re_log] == 0)
    123                         {
    124                           rat_spr             [front_end_id][context_id][re_log] = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_OLD [i]);
    125                           rat_spr_update_table[front_end_id][context_id][re_log] = 1;
     141                      if (rat_spr_update_table [front_end_id][context_id][re_log] == 0)
     142                        {                     
     143                          rat_spr              [front_end_id][context_id][re_log] = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_OLD [i]);
     144                          rat_spr_update_table [front_end_id][context_id][re_log] = 1;
    126145                        }
    127146                    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/SelfTest/src/test.cpp

    r88 r104  
    9191  ALLOC1_SC_SIGNAL( in_RETIRE_FRONT_END_ID      ," in_RETIRE_FRONT_END_ID      ",Tcontext_t        ,_param->_nb_inst_retire);
    9292  ALLOC1_SC_SIGNAL( in_RETIRE_CONTEXT_ID        ," in_RETIRE_CONTEXT_ID        ",Tcontext_t        ,_param->_nb_inst_retire);
    93   ALLOC1_SC_SIGNAL( in_RETIRE_EVENT_STATE       ," in_RETIRE_EVENT_STATE       ",Tevent_state_t    ,_param->_nb_inst_retire);
    9493  ALLOC1_SC_SIGNAL( in_RETIRE_READ_RA           ," in_RETIRE_READ_RA           ",Tcontrol_t        ,_param->_nb_inst_retire);
    9594  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RA_PHY    ," in_RETIRE_NUM_REG_RA_PHY    ",Tgeneral_address_t,_param->_nb_inst_retire);
     
    106105  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
    107106  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW," in_RETIRE_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_retire);
     107
     108  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ," in_RETIRE_EVENT_VAL            ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     109  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,"out_RETIRE_EVENT_ACK            ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     110  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ," in_RETIRE_EVENT_STATE          ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
    108111 
    109112  /********************************************************
     
    163166  if (_param->_have_port_context_id)
    164167  INSTANCE1_SC_SIGNAL(_Register_translation_unit, in_RETIRE_CONTEXT_ID        ,_param->_nb_inst_retire);
    165   INSTANCE1_SC_SIGNAL(_Register_translation_unit, in_RETIRE_EVENT_STATE       ,_param->_nb_inst_retire);
    166168  INSTANCE1_SC_SIGNAL(_Register_translation_unit, in_RETIRE_READ_RA           ,_param->_nb_inst_retire);
    167169  INSTANCE1_SC_SIGNAL(_Register_translation_unit, in_RETIRE_NUM_REG_RA_PHY    ,_param->_nb_inst_retire);
     
    178180  INSTANCE1_SC_SIGNAL(_Register_translation_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
    179181  INSTANCE1_SC_SIGNAL(_Register_translation_unit, in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire);
     182
     183  INSTANCE2_SC_SIGNAL(_Register_translation_unit, in_RETIRE_EVENT_VAL         ,_param->_nb_front_end, _param->_nb_context[it1]);
     184  INSTANCE2_SC_SIGNAL(_Register_translation_unit,out_RETIRE_EVENT_ACK         ,_param->_nb_front_end, _param->_nb_context[it1]);
     185  INSTANCE2_SC_SIGNAL(_Register_translation_unit, in_RETIRE_EVENT_STATE       ,_param->_nb_front_end, _param->_nb_context[it1]);
    180186
    181187  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    264270  delete []  in_RETIRE_FRONT_END_ID      ;
    265271  delete []  in_RETIRE_CONTEXT_ID        ;
    266   delete []  in_RETIRE_EVENT_STATE       ;
    267272  delete []  in_RETIRE_READ_RA           ;
    268273  delete []  in_RETIRE_NUM_REG_RA_PHY    ;
     
    279284  delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
    280285  delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
     286
     287  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1]);
     288  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1]);
     289  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
    281290#endif
    282291
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h

    r82 r104  
    111111  public    : SC_IN (Tcontext_t        )   **  in_RETIRE_FRONT_END_ID      ;//[nb_inst_retire]
    112112  public    : SC_IN (Tcontext_t        )   **  in_RETIRE_CONTEXT_ID        ;//[nb_inst_retire]
    113   public    : SC_IN (Tevent_state_t    )   **  in_RETIRE_EVENT_STATE       ;//[nb_inst_retire]
    114113  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_READ_RA           ;//[nb_inst_retire]
    115114  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RA_PHY    ;//[nb_inst_retire]
     
    127126  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire]
    128127
     128    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     129  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL         ;//[nb_front_end][nb_context]
     130  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK         ;//[nb_front_end][nb_context]
     131  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE       ;//[nb_front_end][nb_context]
     132
    129133    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    130134  public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Dependency_checking_unit                   * _component_dependency_checking_unit;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp

    r98 r104  
    110110      ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID      ,"front_end_id"      ,Tcontext_t        ,_param->_size_front_end_id          );
    111111      ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID        ,"context_id"        ,Tcontext_t        ,_param->_size_context_id            );
    112       ALLOC1_SIGNAL_IN ( in_RETIRE_EVENT_STATE       ,"event_state"       ,Tevent_state_t    ,_param->_size_event_state           );
    113112      ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA           ,"read_ra"           ,Tcontrol_t        ,1                                   );
    114113      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY    ,"num_reg_ra_phy"    ,Tgeneral_address_t,_param->_size_general_register      );
     
    126125      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW,"num_reg_re_phy_new",Tspecial_address_t,_param->_size_special_register      );
    127126    }
     127
     128    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     129    {
     130      ALLOC2_INTERFACE("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
     131
     132      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL           ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
     133      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
     134      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE      ,"state"             ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
     135    }
     136
    128137    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    129138    std::string name;
     
    329338          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        ,
    330339                              dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        );
    331           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_EVENT_STATE"       ,
    332                               dest, "in_RETIRE_"+toString(i)+"_EVENT_STATE"       );
    333340          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD"          ,
    334341                              dest, "in_RETIRE_"+toString(i)+"_WRITE_RD"          );
     
    356363                                   dest, "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD");
    357364        }
     365
     366      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     367        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     368          {
     369            dest = _name;
     370           
     371#ifdef POSITION
     372            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
     373                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
     374#endif     
     375            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  ,
     376                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  );
     377            PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  ,
     378                                dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  );
     379            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
     380                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
     381          }
    358382    }
    359383   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_deallocation.cpp

    r88 r104  
    77
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    7576        if (_param->_have_port_context_id)
    7677        delete []  in_RETIRE_CONTEXT_ID        ;
    77         delete []  in_RETIRE_EVENT_STATE       ;
    7878        delete []  in_RETIRE_READ_RA           ;
    7979        delete []  in_RETIRE_NUM_REG_RA_PHY    ;
     
    9090        delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
    9191        delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
     92
     93        DELETE2_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1],1);
     94        DELETE2_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1],1);
     95        DELETE2_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
    9296      }
     97
    9398    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    9499
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp

    r88 r104  
    115115  ALLOC1_SC_SIGNAL( in_RETIRE_STORE_QUEUE_PTR_WRITE," in_RETIRE_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_inst_retire);
    116116  ALLOC1_SC_SIGNAL( in_RETIRE_LOAD_QUEUE_PTR_WRITE ," in_RETIRE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_inst_retire);
    117   ALLOC1_SC_SIGNAL( in_RETIRE_EVENT_STATE          ," in_RETIRE_EVENT_STATE          ",Tevent_state_t    ,_param->_nb_inst_retire);
    118117  ALLOC1_SC_SIGNAL( in_RETIRE_READ_RA              ," in_RETIRE_READ_RA              ",Tcontrol_t        ,_param->_nb_inst_retire);
    119118  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RA_PHY       ," in_RETIRE_NUM_REG_RA_PHY       ",Tgeneral_address_t,_param->_nb_inst_retire);
     
    130129  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD   ," in_RETIRE_NUM_REG_RE_PHY_OLD   ",Tspecial_address_t,_param->_nb_inst_retire);
    131130  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW   ," in_RETIRE_NUM_REG_RE_PHY_NEW   ",Tspecial_address_t,_param->_nb_inst_retire);
     131  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ," in_RETIRE_EVENT_VAL            ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     132  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,"out_RETIRE_EVENT_ACK            ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     133  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ," in_RETIRE_EVENT_STATE          ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
    132134  ALLOC2_SC_SIGNAL( in_SPR_READ_SR                 ," in_SPR_READ_SR                 ",Tspr_t            ,_param->_nb_front_end,_param->_nb_context[it1]);
    133135 
     
    220222  if (_param->_have_port_load_queue_ptr)
    221223  INSTANCE1_SC_SIGNAL(_Rename_unit, in_RETIRE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire);
    222   INSTANCE1_SC_SIGNAL(_Rename_unit, in_RETIRE_EVENT_STATE          ,_param->_nb_inst_retire);
    223224  INSTANCE1_SC_SIGNAL(_Rename_unit, in_RETIRE_READ_RA              ,_param->_nb_inst_retire);
    224225  INSTANCE1_SC_SIGNAL(_Rename_unit, in_RETIRE_NUM_REG_RA_PHY       ,_param->_nb_inst_retire);
     
    235236  INSTANCE1_SC_SIGNAL(_Rename_unit, in_RETIRE_NUM_REG_RE_PHY_OLD   ,_param->_nb_inst_retire);
    236237  INSTANCE1_SC_SIGNAL(_Rename_unit, in_RETIRE_NUM_REG_RE_PHY_NEW   ,_param->_nb_inst_retire);
     238
     239  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1]);
     240  INSTANCE2_SC_SIGNAL(_Rename_unit,out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1]);
     241  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
    237242
    238243  INSTANCE2_SC_SIGNAL(_Rename_unit,in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     
    352357  DELETE1_SC_SIGNAL( in_RETIRE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire);
    353358  DELETE1_SC_SIGNAL( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire);
    354   DELETE1_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_inst_retire);
    355359  DELETE1_SC_SIGNAL( in_RETIRE_READ_RA              ,_param->_nb_inst_retire);
    356360  DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RA_PHY       ,_param->_nb_inst_retire);
     
    368372  DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW   ,_param->_nb_inst_retire);
    369373 
     374  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1]);
     375  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1]);
     376  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
     377
    370378  DELETE2_SC_SIGNAL(in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1]);
    371379    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h

    r97 r104  
    140140  public    : SC_IN (Tlsq_ptr_t        )   **  in_RETIRE_STORE_QUEUE_PTR_WRITE;//[nb_inst_retire]
    141141  public    : SC_IN (Tlsq_ptr_t        )   **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ;//[nb_inst_retire]
    142   public    : SC_IN (Tevent_state_t    )   **  in_RETIRE_EVENT_STATE          ;//[nb_inst_retire]
    143142  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_READ_RA              ;//[nb_inst_retire]
    144143  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RA_PHY       ;//[nb_inst_retire]
     
    156155  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_NEW   ;//[nb_inst_retire]
    157156
     157    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     158  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
     159  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK            ;//[nb_front_end][nb_context]
     160  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE          ;//[nb_front_end][nb_context]
     161
    158162    // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    159163  public    : SC_IN (Tspr_t            )  ***  in_SPR_READ_SR                 ;//[nb_front_end][nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp

    r97 r104  
    139139      ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
    140140      ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        );
    141       ALLOC1_SIGNAL_IN ( in_RETIRE_EVENT_STATE          ,"event_state"          ,Tevent_state_t    ,_param->_size_event_state           );
    142141      ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA              ,"read_ra"              ,Tcontrol_t        ,1                                   );
    143142      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY       ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      );
     
    154153      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD   ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      );
    155154      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW   ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      );
     155    }
     156
     157    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     158    {
     159      ALLOC2_INTERFACE("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
     160
     161      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL           ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
     162      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
     163      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE         ,"state"                ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
    156164    }
    157165
     
    537545          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        ,
    538546                              dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        );
    539           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_EVENT_STATE"       ,
    540                               dest, "in_RETIRE_"+toString(i)+"_EVENT_STATE"       );
    541547          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RA"           ,
    542548                              dest, "in_RETIRE_"+toString(i)+"_READ_RA"           );
     
    578584          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",dest, "in_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_ACK");
    579585        }
     586
     587      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     588        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     589          {
     590            dest = _name;
     591           
     592#ifdef POSITION
     593            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
     594                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
     595#endif     
     596            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  ,
     597                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  );
     598            PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  ,
     599                                dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  );
     600            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
     601                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
     602          }
    580603    }
    581604
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp

    r88 r104  
    9797        DELETE1_SIGNAL( in_RETIRE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire,_param->_size_store_queue_ptr       );
    9898        DELETE1_SIGNAL( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire,_param->_size_load_queue_ptr        );
    99         DELETE1_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_inst_retire,_param->_size_event_state           );
    10099        DELETE1_SIGNAL( in_RETIRE_READ_RA              ,_param->_nb_inst_retire,1                                   );
    101100        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RA_PHY       ,_param->_nb_inst_retire,_param->_size_general_register      );
     
    112111        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD   ,_param->_nb_inst_retire,_param->_size_special_register      );
    113112        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW   ,_param->_nb_inst_retire,_param->_size_special_register      );
     113
     114        DELETE2_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1],1);
     115        DELETE2_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1],1);
     116        DELETE2_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
    114117       
    115118        DELETE2_SIGNAL(in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h

    r88 r104  
    8181    // SPR
    8282  public : bool              *** _implement_group                  ;//[nb_front_end][nb_context][NB_GROUP]
    83 
    8483
    8584  public : std::vector<uint32_t>*_link_front_end_with_rename_unit              ;//[nb_rename_unit]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp

    r101 r104  
    378378
    379379        // ~~~~~[ Interface : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    380         std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
    381         uint32_t x = 0;
    382         for (uint32_t j=0; j<_param->_nb_front_end; j++)
    383           {
     380        {
     381          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
     382          uint32_t x = 0;
     383          for (uint32_t j=0; j<_param->_nb_front_end; j++)
    384384            if (i == *it)
    385385              {
     
    459459                it++;
    460460              }
    461           }
    462 
     461        }
     462       
    463463        // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    464464        for (uint32_t j=0; j<_param->_nb_inst_insert[i]; j++)
     
    551551          }
    552552
     553        // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    553554        for (uint32_t j=0; j<_param->_nb_inst_retire[i]; j++)
    554555          {
     
    581582            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_PHY_NEW",
    582583                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_PHY_NEW");
    583             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_EVENT_STATE"       ,
    584                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_EVENT_STATE"       );
    585 
    586584            if (_param->_have_port_context_id)
    587585            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_CONTEXT_ID"           ,
     
    616614            COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                "_NUM_REG_RE_LOG"       ,
    617615                                     dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE_LOG"       );
    618 
    619 //             dest = _name+"_glue";
    620            
    621 // #ifdef POSITION
    622 //             _component->interface_map (src ,"retire_"+toString(j),
    623 //                                        dest,"retire_"+toString(i)+"_"+toString(j));
    624 // #endif
    625            
    626 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_VAL"               ,
    627 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_VAL"               );
    628 //             COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(j)+                            "_ACK"               ,
    629 //                                      dest, "in_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_ACK"               );
    630 //             if (_param->_have_port_front_end_id)
    631 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_FRONT_END_ID"      ,
    632 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_FRONT_END_ID"      );
    633 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_WRITE_RD"          ,
    634 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_WRITE_RD"          );
    635 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RD_PHY_OLD",
    636 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RD_PHY_OLD");
    637 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RD_PHY_NEW",
    638 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RD_PHY_NEW");
    639 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_WRITE_RE"          ,
    640 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_WRITE_RE"          );
    641 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RE_PHY_OLD",
    642 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RE_PHY_OLD");
    643 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_NUM_REG_RE_PHY_NEW",
    644 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_NUM_REG_RE_PHY_NEW");
    645 //             COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(j)+                            "_EVENT_STATE"       ,
    646 //                                      dest,"out_RETIRE_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_EVENT_STATE"       );
    647616          }
    648617
    649618        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    650         for (uint32_t i=0; i<_param->_nb_front_end; i++)
    651           for (uint32_t j=0; j<_param->_nb_context[i]; j++)
    652             {
    653               dest = _name+"_glue";
    654            
    655 #ifdef POSITION
    656               _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j),
    657                                          dest,"spr_"     +toString(i)+"_"+toString(j));
    658 #endif
    659 
    660               COMPONENT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+            "_SR",
    661                                        dest,"out_SPR_"     +toString(i)+"_"+toString(j)+"_RENAME_UNIT_SR");
    662             }
    663     }
     619        {
     620          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
     621          uint32_t x = 0;
     622          for (uint32_t j=0; j<_param->_nb_front_end; j++)
     623            if (i == (*it))
     624              {
     625                for (uint32_t k=0; k<_param->_nb_context[i]; k++)
     626                  {
     627                    dest = _name+"_commit_unit";
     628                   
     629#ifdef POSITION
     630                    _component->interface_map (src ,"retire_event_"+toString(x)+"_"+toString(k),
     631                                               dest,"retire_event_"+toString(j)+"_"+toString(k));
     632#endif
     633                    COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_VAL",
     634                                             dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_VAL");
     635                    COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_ACK",
     636                                             dest, "in_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_ACK");
     637                    COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_STATE",
     638                                             dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_STATE");
     639                    x++;
     640                    ++it;
     641                  }
     642              }
     643        }
     644
     645        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     646        {
     647          std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
     648          uint32_t x = 0;
     649          for (uint32_t j=0; j<_param->_nb_front_end; j++)
     650            if (i == *it)
     651              {
     652                for (uint32_t k=0; k<_param->_nb_context[j]; k++)
     653                  {
     654                    dest = _name+"_glue";
     655                   
     656#ifdef POSITION
     657                    _component->interface_map (src ,"spr_read_"+toString(x)+"_"+toString(k),
     658                                               dest,"spr_"     +toString(j)+"_"+toString(k));
     659#endif
     660
     661                    COMPONENT_MAP(_component,src , "in_SPR_READ_"+toString(x)+"_"+toString(k)+            "_SR",
     662                                             dest,"out_SPR_"     +toString(j)+"_"+toString(k)+"_RENAME_UNIT_SR");
     663                  }
     664                x++;
     665                ++it;
     666              }
     667        }
     668      }
    664669
    665670    // ===================================================================
     
    821826          }
    822827     
     828      // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
     829        // out_RETIRE_VAL         - rename_unit.out_RETIRE_VAL       
     830        //  in_RETIRE_ACK         - rename_unit. in_RETIRE_ACK       
     831        // out_RETIRE_EVENT_STATE - rename_unit.out_RETIRE_EVENT_STATE
     832 
     833
    823834      // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
    824835      for (uint32_t i=0; i<_param->_nb_inst_commit; i++)
     
    10431054                                     dest, "in_SPR_COMMIT_"+toString(i)+"_"+toString(j)+"_SR_OV"    );
    10441055          }
    1045      
    10461056    }
    10471057
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h

    r101 r104  
    571571#  define SPR_MACHI                                2          // MAC High
    572572
    573 
    574 
    575573  // SR RENAME
    576574#  define NB_SPR_LOGIC                             2
     
    596594#  define EVENT_STATE_WAITEND                      2          // Wait end of manage event (restaure a good context)
    597595#  define EVENT_STATE_END                          3          // CPU can continue
    598 
    599 #  define SIZE_EVENT_TYPE                          3
    600 
     596                                                     
     597#  define SIZE_EVENT_TYPE                          3 
     598                                                     
    601599#  define EVENT_TYPE_NONE                          0          // no event
    602600#  define EVENT_TYPE_MISS_SPECULATION              1          // miss of speculation (load or branch miss speculation)
     
    10711069  };
    10721070
     1071//   template<> inline std::string toString<morpheo::behavioural::event_state_t>(const morpheo::behavioural::event_state_t& x)
     1072//   {
     1073//     switch (x)
     1074//       {
     1075//       case morpheo::behavioural::EVENT_STATE_NO_EVENT : return "EVENT_STATE_NO_EVENT";
     1076//       case morpheo::behavioural::EVENT_STATE_EVENT    : return "EVENT_STATE_EVENT"   ;
     1077//       case morpheo::behavioural::EVENT_STATE_WAITEND  : return "EVENT_STATE_WAITEND" ;
     1078//       case morpheo::behavioural::EVENT_STATE_END      : return "EVENT_STATE_END"     ;
     1079//       default : return "";
     1080//       }
     1081//   };
     1082
     1083//   template<> inline std::string toString<morpheo::behavioural::event_type_t>(const morpheo::behavioural::event_type_t& x)
     1084//   {
     1085//     switch (x)
     1086//       {
     1087//       case morpheo::behavioural::EVENT_TYPE_NONE               : return "EVENT_TYPE_NONE"              ;
     1088//       case morpheo::behavioural::EVENT_TYPE_MISS_SPECULATION   : return "EVENT_TYPE_MISS_SPECULATION"  ;
     1089//       case morpheo::behavioural::EVENT_TYPE_EXCEPTION          : return "EVENT_TYPE_EXCEPTION"         ;
     1090//       case morpheo::behavioural::EVENT_TYPE_BRANCH_NO_ACCURATE : return "EVENT_TYPE_BRANCH_NO_ACCURATE";
     1091//       case morpheo::behavioural::EVENT_TYPE_SPR_ACCESS         : return "EVENT_TYPE_SPR_ACCESS"        ;
     1092//       case morpheo::behavioural::EVENT_TYPE_MSYNC              : return "EVENT_TYPE_MSYNC"             ;
     1093//       case morpheo::behavioural::EVENT_TYPE_PSYNC              : return "EVENT_TYPE_PSYNC"             ;
     1094//       case morpheo::behavioural::EVENT_TYPE_CSYNC              : return "EVENT_TYPE_CSYNC"             ;
     1095//       default : return "";
     1096//       }
     1097//   };
     1098
    10731099}; // end namespace morpheo             
    10741100
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r103 r104  
    1010#define MORPHEO_MAJOR_VERSION 0
    1111#define MORPHEO_MINOR_VERSION 2
    12 #define MORPHEO_REVISION      "103"
     12#define MORPHEO_REVISION      "104"
    1313#define MORPHEO_CODENAME      "Castor"
    1414
    15 #define MORPHEO_DATE_DAY      "16
     15#define MORPHEO_DATE_DAY      "21
    1616#define MORPHEO_DATE_MONTH    "01"
    1717#define MORPHEO_DATE_YEAR     "2009"
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_debug.cfg

    r102 r104  
    11<?xml version="1.0" encoding="ISO-8859-1" ?>
    22
    3 <core name="Instance_min">
     3<core name="Instance_debug">
    44
    55  <thread id="0">             
    6     <parameter name="size_ifetch_queue"                     value="1" />
    7     <parameter name="nb_inst_fetch"                         value="2" />
     6    <parameter name="size_ifetch_queue"                     value="4" />
     7    <parameter name="nb_inst_fetch"                         value="1" />
    88    <parameter name="ras_size_queue"                        value="2" />
    9     <parameter name="upt_size_queue"                        value="1" />
     9    <parameter name="upt_size_queue"                        value="2" />
    1010    <parameter name="ufpt_size_queue"                       value="1" />
    1111
     
    1616                                                           
    1717  <decod_bloc id="0">                                       
    18     <parameter name="size_decod_queue"                      value="1" />
     18    <parameter name="size_decod_queue"                      value="4" />
    1919    <parameter name="nb_inst_decod"                         value="1" />
    2020    <parameter name="nb_context_select"                     value="1" />
     
    3333    <parameter name="nb_reg_free"                           value="1" />
    3434    <parameter name="nb_rename_unit_bank"                   value="1" />
    35     <parameter name="size_read_counter"                     value="1" />
     35    <parameter name="size_read_counter"                     value="4" />
    3636  </rename_bloc>                                           
    3737                                                           
    3838  <read_bloc id="0">                                       
    39     <parameter name="size_read_queue"                       value="1" />
    40     <parameter name="size_reservation_station"              value="1" />
     39    <parameter name="size_read_queue"                       value="4" />
     40    <parameter name="size_reservation_station"              value="4" />
    4141    <parameter name="nb_inst_retire_reservation_station"    value="1" />
    4242  </read_bloc>                                             
    4343                                                           
    4444  <write_bloc id="0">                                       
    45     <parameter name="size_write_queue"                      value="1" />
    46     <parameter name="size_execute_queue"                    value="1" />
     45    <parameter name="size_write_queue"                      value="4" />
     46    <parameter name="size_execute_queue"                    value="4" />
    4747    <parameter name="nb_bypass_write"                       value="0" />
    4848  </write_bloc>                                             
     
    7474    <parameter name="btb_size_counter"                      value="2" />
    7575    <parameter name="btb_victim_scheme"                     value="1" />
    76     <parameter name="dir_predictor_scheme"                  value="1" />
     76    <parameter name="dir_predictor_scheme"                  value="3" />
    7777                                                           
    7878    <predictor id="0">                                     
     
    115115    <parameter name="nb_rename_unit_select"                 value="1" />
    116116    <parameter name="nb_execute_loop_select"                value="1" />
    117     <parameter name="size_re_order_buffer"                  value="1" />
     117    <parameter name="size_re_order_buffer"                  value="16" />
    118118    <parameter name="nb_re_order_buffer_bank"               value="1" />
    119119    <parameter name="commit_priority"                       value="1" />
    120120    <parameter name="commit_load_balancing"                 value="1" />
    121     <parameter name="size_issue_queue"                      value="1" />
     121    <parameter name="size_issue_queue"                      value="4" />
    122122    <parameter name="nb_issue_queue_bank"                   value="1" />
    123123    <parameter name="issue_priority"                        value="1" />
    124124    <parameter name="issue_load_balancing"                  value="1" />
    125     <parameter name="size_reexecute_queue"                  value="1" />
     125    <parameter name="size_reexecute_queue"                  value="4" />
    126126    <parameter name="reexecute_priority"                    value="1" />
    127127    <parameter name="reexecute_load_balancing"              value="1" />
     
    132132    <parameter name="nb_write_unit"                         value="1" />
    133133    <parameter name="nb_gpr_bank"                           value="1" />
    134     <parameter name="nb_gpr_port_read_by_bank"              value="1" />
     134    <parameter name="nb_gpr_port_read_by_bank"              value="2" />
    135135    <parameter name="nb_gpr_port_write_by_bank"             value="1" />
    136136    <parameter name="nb_spr_bank"                           value="1" />
  • trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim

    r101 r104  
    88  <parameter name="use_vhdl_testbench_assert"  value="0" />
    99  <parameter name="use_position"               value="0" />
    10   <parameter name="use_statistics"             value="1" />
     10  <parameter name="use_statistics"             value="0" />
    1111  <parameter name="use_information"            value="0" />
    12   <parameter name="use_header"                 value="1" />
     12  <parameter name="use_header"                 value="0" />
    1313                                               
    1414  <parameter name="statistics_cycle_start"     value="0" />
     
    2525  <parameter name="debug_level"                value="3" />
    2626  <parameter name="debug_cycle_start"          value="0" />
    27   <parameter name="debug_cycle_stop"           value="300" />
     27  <parameter name="debug_cycle_stop"           value="200" />
    2828  <parameter name="debug_have_log_file"        value="0" />
    2929
Note: See TracChangeset for help on using the changeset viewer.