Ignore:
Timestamp:
Jun 26, 2009, 10:43:23 AM (15 years ago)
Author:
rosiere
Message:

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h

    r116 r128  
    109109      for (uint32_t i=0; i<NB_GROUP; i++)
    110110        {
    111           _spr               [i] = NULL;
     111          _spr [i] = NULL;
    112112        }
    113113    }
     
    117117      for (uint32_t x=0; x<NB_GROUP; x++)
    118118        if (_spr[x] != NULL)
    119           delete _spr[x];
    120       delete _spr;
    121       delete _spr_access_mode;
     119          delete [] _spr[x];
     120      delete [] _spr;
     121      delete    _spr_access_mode;
    122122    }
    123123
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp

    r122 r128  
    3232        DELETE0_SIGNAL( in_EXECUTE_IN_VAL                   ,1);
    3333        DELETE0_SIGNAL(out_EXECUTE_IN_ACK                   ,1);
    34         DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID            , _param->_size_context_id   );
    35         DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID          , _param->_size_front_end_id );
    36         DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID         , _param->_size_ooo_engine_id);
    37         DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID             , _param->_size_rob_ptr    );
    38         DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION             , _param->_size_operation    );
    39         DELETE0_SIGNAL( in_EXECUTE_IN_TYPE                  , _param->_size_type         );
     34        DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID            ,_param->_size_context_id   );
     35        DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID          ,_param->_size_front_end_id );
     36        DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID         ,_param->_size_ooo_engine_id);
     37        DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID             ,_param->_size_rob_ptr      );
     38        DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION             ,_param->_size_operation    );
     39        DELETE0_SIGNAL( in_EXECUTE_IN_TYPE                  ,_param->_size_type         );
    4040        DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE ,_param->_size_store_queue_ptr);
    4141        DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_READ  ,_param->_size_store_queue_ptr);
    42         DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_EMPTY     , 1);
     42        DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_EMPTY     ,1);
    4343        DELETE0_SIGNAL( in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  ,_param->_size_load_queue_ptr);
    44         DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT          , 1);
    45         DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT              , _param->_size_general_data);
    46         DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA               , _param->_size_general_data);
    47         DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB               , _param->_size_general_data);
    48         DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC               , _param->_size_special_data);
    49         DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD              , 1);
    50         DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD            , _param->_size_general_register);
    51         DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE              , 1);
    52         DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE            , _param->_size_special_register);
     44        DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT          ,1);
     45        DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT              ,_param->_size_general_data);
     46        DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA               ,_param->_size_general_data);
     47        DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB               ,_param->_size_general_data);
     48        DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC               ,_param->_size_special_data);
     49        DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD              ,1);
     50        DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD            ,_param->_size_general_register);
     51        DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE              ,1);
     52        DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE            ,_param->_size_special_register);
    5353
    5454        DELETE0_SIGNAL(out_EXECUTE_OUT_VAL            ,1);
     
    7272        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    7373       
     74        for (uint32_t i=0; i<_param->_nb_type; i++)
     75        delete [] _function_execute [i];
     76        delete [] _function_execute;
     77
    7478        for (uint32_t i=0; i<_param->_nb_context; i++)
    75           for (uint32_t j=0; j<_param->_nb_front_end; j++)
    76             for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
    77               delete _execute_register [i][j][k];
     79          {
     80            for (uint32_t j=0; j<_param->_nb_front_end; j++)
     81              {
     82                for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
     83                delete    _execute_register [i][j][k];
     84                delete [] _execute_register [i][j];
     85              }
     86            delete [] _execute_register [i];
     87          }
     88        delete [] _execute_register;
    7889
    79         DELETE3(_execute_register,_param->_nb_context,_param->_nb_front_end,_param->_nb_ooo_engine);
    80         DELETE0(_execute_param);
     90        delete    _execute_param;
     91        delete    _execute_operation_out;
    8192        if (_param->_have_pipeline_in)
    82         DELETE0(_execute_operation_in);
    83         DELETE0(_execute_operation_out);
    84         DELETE2(_function_execute,_param->_nb_type,_param->_nb_operation);
     93        delete    _execute_operation_in;
    8594      }
    8695
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp

    r118 r128  
    132132            execute_operation->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
    133133            execute_operation->_data_re       = 0; // no necessaray
     134            execute_operation->_exception     = 0; // no necessaray
     135            execute_operation->_no_sequence   = 0; // no necessaray
     136            execute_operation->_address       = 0; // no necessaray
    134137
    135138            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * context_id    : %d",execute_operation->_context_id   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp

    r124 r128  
    122122
    123123#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
    124     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    125       if (_param->_num_thread_valid [i])
    126         {
    127           memory_log_file [i].close();
    128         }
     124    {
     125      for (uint32_t i=0; i<_param->_nb_thread; ++i)
     126        if (_param->_num_thread_valid [i])
     127          {
     128            memory_log_file [i].close();
     129          }
     130      delete [] memory_log_file;
     131    }
    129132#endif
    130133
  • 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

    r124 r128  
    239239        _speculative_access_queue_control->clear();
    240240
    241         reg_STORE_QUEUE_PTR_READ = 0;
     241        reg_STORE_QUEUE_PTR_READ       = 0;
    242242        reg_LOAD_QUEUE_CHECK_PRIORITY  = 0;
    243243
    244244        for (uint32_t i=0; i< _param->_size_store_queue             ; i++)
    245245          {
    246           reg_STORE_QUEUE_NB_CHECK  [i] = 0;
    247           _store_queue              [i]._state = STORE_QUEUE_EMPTY;
     246            reg_STORE_QUEUE_NB_CHECK  [i] = 0;
     247            _store_queue              [i]._state                 = STORE_QUEUE_EMPTY;
     248            _store_queue              [i]._context_id            = 0; // not necessary
     249            _store_queue              [i]._front_end_id          = 0; // not necessary
     250            _store_queue              [i]._ooo_engine_id         = 0; // not necessary
     251            _store_queue              [i]._packet_id             = 0; // not necessary
     252            _store_queue              [i]._operation             = 0; // not necessary
     253            _store_queue              [i]._load_queue_ptr_write  = 0; // not necessary
     254            _store_queue              [i]._address               = 0; // not necessary
     255            _store_queue              [i]._wdata                 = 0; // not necessary
     256//          _store_queue              [i]._write_rd              = 0; // not necessary
     257//          _store_queue              [i]._num_reg_rd            = 0; // not necessary
     258            _store_queue              [i]._exception             = 0; // not necessary
     259            _store_queue              [i]._send_commit           = 0; // not necessary
    248260          }
    249261
    250262        for (uint32_t i=0; i< _param->_size_load_queue              ; i++)
    251           _load_queue               [i]._state = LOAD_QUEUE_EMPTY;
     263          {
     264            _load_queue               [i]._state                 = LOAD_QUEUE_EMPTY;
     265            _load_queue               [i]._context_id            = 0; // not necessary
     266            _load_queue               [i]._front_end_id          = 0; // not necessary
     267            _load_queue               [i]._ooo_engine_id         = 0; // not necessary
     268            _load_queue               [i]._packet_id             = 0; // not necessary
     269            _load_queue               [i]._operation             = 0; // not necessary
     270            _load_queue               [i]._store_queue_ptr_write = 0; // not necessary
     271            _load_queue               [i]._store_queue_ptr_read  = 0; // not necessary
     272            _load_queue               [i]._store_queue_empty     = 0; // not necessary
     273            _load_queue               [i]._address               = 0; // not necessary
     274            _load_queue               [i]._check_hit_byte        = 0; // not necessary
     275            _load_queue               [i]._check_hit             = 0; // not necessary
     276            _load_queue               [i]._shift                 = 0; // not necessary
     277            _load_queue               [i]._is_load_signed        = 0; // not necessary
     278            _load_queue               [i]._access_size           = 0; // not necessary
     279            _load_queue               [i]._rdata                 = 0; // not necessary
     280            _load_queue               [i]._write_rd              = 0; // not necessary
     281            _load_queue               [i]._num_reg_rd            = 0; // not necessary
     282            _load_queue               [i]._exception             = 0; // not necessary
     283          }
    252284
    253285        for (uint32_t i=0; i< _param->_size_speculative_access_queue; i++)
    254           _speculative_access_queue [i]._state = SPECULATIVE_ACCESS_QUEUE_EMPTY;
     286          {
     287            _speculative_access_queue [i]._state                 = SPECULATIVE_ACCESS_QUEUE_EMPTY;
     288            _speculative_access_queue [i]._context_id            = 0; // not necessary
     289            _speculative_access_queue [i]._front_end_id          = 0; // not necessary
     290            _speculative_access_queue [i]._ooo_engine_id         = 0; // not necessary
     291            _speculative_access_queue [i]._packet_id             = 0; // not necessary
     292            _speculative_access_queue [i]._operation             = 0; // not necessary
     293            _speculative_access_queue [i]._load_queue_ptr_write  = 0; // not necessary
     294            _speculative_access_queue [i]._store_queue_ptr_write = 0; // not necessary
     295            _speculative_access_queue [i]._store_queue_ptr_read  = 0; // not necessary
     296            _speculative_access_queue [i]._store_queue_empty     = 0; // not necessary
     297            _speculative_access_queue [i]._address               = 0; // not necessary
     298            _speculative_access_queue [i]._write_rd              = 0; // not necessary
     299            _speculative_access_queue [i]._num_reg_rd            = 0; // not necessary
     300            _speculative_access_queue [i]._exception             = 0; // not necessary
     301          }
    255302      }
    256303    else
     
    10001047            bool         have_exception = (exception != EXCEPTION_MEMORY_NONE);
    10011048            bool         need_check= false;
    1002             Tlsq_ptr_t        store_queue_ptr_write = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_write;
    1003             Tlsq_ptr_t        store_queue_ptr_read  = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_read ;
    1004             Tcontrol_t        store_queue_empty     = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_empty    ;
     1049            Tlsq_ptr_t   store_queue_ptr_write = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_write;
     1050            Tlsq_ptr_t   store_queue_ptr_read  = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_read ;
     1051            Tcontrol_t   store_queue_empty     = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_empty    ;
    10051052           
    10061053            if (have_exception)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_deallocation.cpp

    r122 r128  
    6262        DELETE0_SIGNAL(out_READ_QUEUE_OUT_OPERATION            ,_param->_size_operation        );
    6363        DELETE0_SIGNAL(out_READ_QUEUE_OUT_TYPE                 ,_param->_size_type             );
    64         DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE, _param->_size_store_queue_ptr );
     64        DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_size_store_queue_ptr  );
     65        DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr  );
     66        DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_EMPTY    ,1                              );
    6567        DELETE0_SIGNAL(out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE , _param->_size_load_queue_ptr  );
    6668        DELETE0_SIGNAL(out_READ_QUEUE_OUT_HAS_IMMEDIAT         ,1                              );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp

    r123 r128  
    4242
    4343        // Init, else error in registerfile
    44         _queue_head->_ooo_engine_id = 0;
    45         // not necessary
    46         _queue_head->_read_ra_val = false;
    47         _queue_head->_read_rb_val = false;
    48         _queue_head->_read_rc_val = false;
    49 
    50         _queue_head->_data_ra_val = false;
    51         _queue_head->_data_rb_val = false;
    52         _queue_head->_data_rc_val = false;
    53 
    54         _queue_head->_num_reg_ra  = 0;
    55         _queue_head->_num_reg_rb  = 0;
    56         _queue_head->_num_reg_rc  = 0;
     44        _queue_head->_context_id           = 0;// not necessary
     45        _queue_head->_front_end_id         = 0;// not necessary
     46        _queue_head->_ooo_engine_id        = 0;// not necessary
     47
     48        _queue_head->_rob_id                = 0;// not necessary
     49        _queue_head->_operation             = 0;// not necessary
     50        _queue_head->_type                  = 0;// not necessary
     51        _queue_head->_store_queue_ptr_write = 0;// not necessary
     52        _queue_head->_store_queue_ptr_read  = 0;// not necessary
     53        _queue_head->_store_queue_empty     = 0;// not necessary
     54        _queue_head->_load_queue_ptr_write  = 0;// not necessary
     55        _queue_head->_has_immediat          = 0;// not necessary
     56        _queue_head->_immediat              = 0;// not necessary
     57
     58        _queue_head->_read_ra               = 0;// not necessary
     59        _queue_head->_read_rb               = 0;// not necessary
     60        _queue_head->_read_rc               = 0;// not necessary
     61        _queue_head->_write_rd              = 0;// not necessary
     62        _queue_head->_write_re              = 0;// not necessary
     63
     64        _queue_head->_read_ra_val          = false;
     65        _queue_head->_read_rb_val          = false;
     66        _queue_head->_read_rc_val          = false;
     67
     68        _queue_head->_data_ra_val          = false;
     69        _queue_head->_data_rb_val          = false;
     70        _queue_head->_data_rc_val          = false;
     71
     72        _queue_head->_num_reg_ra           = 0;// not necessary
     73        _queue_head->_num_reg_rb           = 0;// not necessary
     74        _queue_head->_num_reg_rc           = 0;// not necessary
     75        _queue_head->_num_reg_rd           = 0;// not necessary
     76        _queue_head->_num_reg_re           = 0;// not necessary
    5777      }
    5878    else
     
    7696            Tread_queue_entry_t * entry = new Tread_queue_entry_t;
    7797
    78             if(_param->_have_port_context_id   )
    79             entry->_context_id   = PORT_READ(in_READ_QUEUE_IN_CONTEXT_ID  );
    80             if(_param->_have_port_front_end_id )
    81             entry->_front_end_id = PORT_READ(in_READ_QUEUE_IN_FRONT_END_ID);
    82             if(_param->_have_port_ooo_engine_id)
    83             entry->_ooo_engine_id= PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID);
    84             if(_param->_have_port_rob_ptr      )
    85             entry->_rob_id       = PORT_READ(in_READ_QUEUE_IN_ROB_ID      );
    86             entry->_operation    = PORT_READ(in_READ_QUEUE_IN_OPERATION   );
    87             entry->_type         = PORT_READ(in_READ_QUEUE_IN_TYPE        );
     98            entry->_context_id            = (_param->_have_port_context_id    )?PORT_READ(in_READ_QUEUE_IN_CONTEXT_ID   ):0;
     99            entry->_front_end_id          = (_param->_have_port_front_end_id  )?PORT_READ(in_READ_QUEUE_IN_FRONT_END_ID ):0;
     100            entry->_ooo_engine_id         = (_param->_have_port_ooo_engine_id )?PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID):0;
     101            entry->_rob_id                = (_param->_have_port_rob_ptr       )?PORT_READ(in_READ_QUEUE_IN_ROB_ID       ):0;
     102            entry->_operation             = PORT_READ(in_READ_QUEUE_IN_OPERATION   );
     103            entry->_type                  = PORT_READ(in_READ_QUEUE_IN_TYPE        );
    88104            entry->_store_queue_ptr_write = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE);
    89105            entry->_store_queue_ptr_read  = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_READ );
    90106            entry->_store_queue_empty     = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_EMPTY    );
    91             if (_param->_have_port_load_queue_ptr)
    92             entry->_load_queue_ptr_write  = PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE );
    93             entry->_has_immediat = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT);
    94             entry->_immediat     = PORT_READ(in_READ_QUEUE_IN_IMMEDIAT    );
    95             entry->_read_ra      = PORT_READ(in_READ_QUEUE_IN_READ_RA     );
    96             entry->_num_reg_ra   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RA  );
    97             entry->_read_rb      = PORT_READ(in_READ_QUEUE_IN_READ_RB     );
    98             entry->_num_reg_rb   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RB  );
    99             entry->_read_rc      = PORT_READ(in_READ_QUEUE_IN_READ_RC     );
    100             entry->_num_reg_rc   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RC  );
    101             entry->_write_rd     = PORT_READ(in_READ_QUEUE_IN_WRITE_RD    );
    102             entry->_num_reg_rd   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RD  );
    103             entry->_write_re     = PORT_READ(in_READ_QUEUE_IN_WRITE_RE    );
    104             entry->_num_reg_re   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE  );
     107            entry->_load_queue_ptr_write  = (_param->_have_port_load_queue_ptr)?PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ):0;
     108            entry->_has_immediat          = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT);
     109            entry->_immediat              = PORT_READ(in_READ_QUEUE_IN_IMMEDIAT    );
     110            entry->_read_ra               = PORT_READ(in_READ_QUEUE_IN_READ_RA     );
     111            entry->_num_reg_ra            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RA  );
     112            entry->_read_rb               = PORT_READ(in_READ_QUEUE_IN_READ_RB     );
     113            entry->_num_reg_rb            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RB  );
     114            entry->_read_rc               = PORT_READ(in_READ_QUEUE_IN_READ_RC     );
     115            entry->_num_reg_rc            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RC  );
     116            entry->_write_rd              = PORT_READ(in_READ_QUEUE_IN_WRITE_RD    );
     117            entry->_num_reg_rd            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RD  );
     118            entry->_write_re              = PORT_READ(in_READ_QUEUE_IN_WRITE_RE    );
     119            entry->_num_reg_re            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE  );
    105120
    106121            log_printf(TRACE,Read_queue,FUNCTION,"    * push (id : %d-%d)",entry->_context_id, entry->_rob_id);
     
    122137            // Pop the entry
    123138            log_printf(TRACE,Read_queue,FUNCTION,"    * pop  (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);
     139            delete _queue->front();
    124140            _queue->pop_front();
    125141
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp

    r122 r128  
    112112        _queue_control->clear();
    113113#endif
     114
     115        for (uint32_t i=0; i<_param->_size_queue; i++)
     116          {
     117            _queue[i]._context_id            = 0; // not necessary
     118            _queue[i]._front_end_id          = 0; // not necessary
     119            _queue[i]._ooo_engine_id         = 0; // not necessary
     120            _queue[i]._rob_id                = 0; // not necessary
     121            _queue[i]._operation             = 0; // not necessary
     122            _queue[i]._type                  = 0; // not necessary
     123            _queue[i]._store_queue_ptr_write = 0; // not necessary
     124            _queue[i]._store_queue_ptr_read  = 0; // not necessary
     125            _queue[i]._store_queue_empty     = 0; // not necessary
     126            _queue[i]._load_queue_ptr_write  = 0; // not necessary
     127            _queue[i]._has_immediat          = 0; // not necessary
     128            _queue[i]._immediat              = 0; // not necessary
     129//          _queue[i]._read_ra               = 0; // not necessary
     130            _queue[i]._num_reg_ra            = 0; // not necessary
     131            _queue[i]._data_ra_val           = 0; // not necessary
     132            _queue[i]._data_ra               = 0; // not necessary
     133//          _queue[i]._read_rb               = 0; // not necessary
     134            _queue[i]._num_reg_rb            = 0; // not necessary
     135            _queue[i]._data_rb_val           = 0; // not necessary
     136            _queue[i]._data_rb               = 0; // not necessary
     137//          _queue[i]._read_rc               = 0; // not necessary
     138            _queue[i]._num_reg_rc            = 0; // not necessary
     139            _queue[i]._data_rc_val           = 0; // not necessary
     140            _queue[i]._data_rc               = 0; // not necessary
     141            _queue[i]._write_rd              = 0; // not necessary
     142            _queue[i]._num_reg_rd            = 0; // not necessary
     143            _queue[i]._write_re              = 0; // not necessary
     144            _queue[i]._num_reg_re            = 0; // not necessary
     145          }
    114146      }
    115147    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_deallocation.cpp

    r112 r128  
    3838        DELETE0_SIGNAL( in_READ_UNIT_IN_TYPE                 ,_param->_size_type         );
    3939        DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_size_store_queue_ptr);
     40        DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr);
     41        DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_EMPTY    ,1);
    4042        DELETE0_SIGNAL( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_size_load_queue_ptr);
    4143        DELETE0_SIGNAL( in_READ_UNIT_IN_HAS_IMMEDIAT         ,1);
     
    6163        DELETE1_SIGNAL(out_READ_UNIT_OUT_TYPE                 ,_param->_nb_inst_retire,_param->_size_type            );
    6264        DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire,_param->_size_store_queue_ptr);
     65        DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_retire,_param->_size_store_queue_ptr);
     66        DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_retire,1);
    6367        DELETE1_SIGNAL(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire,_param->_size_load_queue_ptr);
    6468        DELETE1_SIGNAL(out_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_inst_retire,1                             );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp

    r113 r128  
    9191    delete _queue;
    9292
     93#ifdef VHDL
     94     if (usage_is_set(_usage,USE_VHDL))
     95       {
     96         delete _component_queue;
     97         delete _param_queue;
     98       }
     99#endif
     100
    93101    delete _component;
    94     delete _component_queue;
    95     delete _param_queue;
    96102
    97103    log_printf(FUNC,Write_queue,FUNCTION,"End");
     
    104110}; // end namespace multi_execute_loop
    105111}; // end namespace core
    106 
    107112}; // end namespace behavioural
    108113}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp

    r101 r128  
    1818namespace write_unit {
    1919namespace write_queue {
    20 
    2120
    2221#undef  FUNCTION
     
    114113                     (*it)->_no_sequence  ,
    115114                     (*it)->_address      );
     115
     116//           log_printf(TRACE,Write_queue,FUNCTION,"    * context_id   : %d",  (*it)->_context_id   );
     117//           log_printf(TRACE,Write_queue,FUNCTION,"    * front_end_id : %d",  (*it)->_front_end_id );
     118//           log_printf(TRACE,Write_queue,FUNCTION,"    * ooo_engine_id: %d",  (*it)->_ooo_engine_id);
     119//           log_printf(TRACE,Write_queue,FUNCTION,"    * packet_id    : %d",  (*it)->_packet_id    );
     120//           log_printf(TRACE,Write_queue,FUNCTION,"    * write_rd     : %d",  (*it)->_write_rd     );
     121//           log_printf(TRACE,Write_queue,FUNCTION,"    * num_reg_rd   : %d",  (*it)->_num_reg_rd   );
     122//           log_printf(TRACE,Write_queue,FUNCTION,"    * data_rd      : %d",  (*it)->_data_rd      );
     123//           log_printf(TRACE,Write_queue,FUNCTION,"    * write_re     : %d",  (*it)->_write_re     );
     124//           log_printf(TRACE,Write_queue,FUNCTION,"    * num_reg_re   : %d",  (*it)->_num_reg_re   );
     125//           log_printf(TRACE,Write_queue,FUNCTION,"    * data_re      : %d",  (*it)->_data_re      );
     126//           log_printf(TRACE,Write_queue,FUNCTION,"    * exception    : %d",  (*it)->_exception    );
     127//           log_printf(TRACE,Write_queue,FUNCTION,"    * no_sequence  : %d",  (*it)->_no_sequence  );
     128//           log_printf(TRACE,Write_queue,FUNCTION,"    * address      : %d",  (*it)->_address      );
     129
    116130          i++;
    117131        }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_deallocation.cpp

    r115 r128  
    3838         DELETE2_SIGNAL( in_READ_UNIT_OUT_TYPE                   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_type             );
    3939         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE  , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr  );
     40         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_READ   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr  );
     41         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_EMPTY      , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
    4042         DELETE2_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_load_queue_ptr   );
    4143         DELETE2_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT           , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     
    6365         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE           , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_special_register );
    6466         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE, _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr  );
     67         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_READ , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr  );
     68         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_EMPTY    , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
    6569         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_load_queue_ptr   );
    6670         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT             , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_data     );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h

    r88 r128  
    6161  public    : SC_CLOCK                      *  in_CLOCK  ;
    6262  public    : SC_IN (Tcontrol_t)            *  in_NRESET ;
    63   public    : SC_OUT(Tcontrol_t        )    * out_CONST_0;
    64   public    : SC_OUT(Tcontrol_t        )    * out_CONST_1;
     63//public    : SC_OUT(Tcontrol_t        )    * out_CONST_0;
     64//public    : SC_OUT(Tcontrol_t        )    * out_CONST_1;
    6565
    6666    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    7777  public    : SC_OUT(Tcontrol_t        )  *** out_GPR_READ_STATUS_VAL       ;
    7878  public    : SC_IN (Tcontrol_t        )  ***  in_GPR_READ_STATUS_ACK       ;
    79   public    : SC_IN (Tcontrol_t        )  ***  in_GPR_READ_STATUS_DATA_VAL  ;
     79  public    : SC_IN (Tgeneral_data_t   )  ***  in_GPR_READ_STATUS_DATA_VAL  ; // type for compatibility with the registerFile
    8080
    8181    // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    9292  public    : SC_OUT(Tcontrol_t        )  *** out_SPR_READ_STATUS_VAL       ;
    9393  public    : SC_IN (Tcontrol_t        )  ***  in_SPR_READ_STATUS_ACK       ;
    94   public    : SC_IN (Tcontrol_t        )  ***  in_SPR_READ_STATUS_DATA_VAL  ;
     94  public    : SC_IN (Tspecial_data_t   )  ***  in_SPR_READ_STATUS_DATA_VAL  ; // type for compatibility with the registerFile
    9595
    9696    // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    104104  public    : SC_OUT(Tcontrol_t        )  *** out_GPR_WRITE_STATUS_VAL      ;
    105105  public    : SC_IN (Tcontrol_t        )  ***  in_GPR_WRITE_STATUS_ACK      ;
     106  public    : SC_OUT(Tgeneral_data_t   )  *** out_GPR_WRITE_STATUS_DATA     ; // type for compatibility with the registerFile
    106107   
    107108    // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    115116  public    : SC_OUT(Tcontrol_t        )  *** out_SPR_WRITE_STATUS_VAL      ;
    116117  public    : SC_IN (Tcontrol_t        )  ***  in_SPR_WRITE_STATUS_ACK      ;
     118  public    : SC_OUT(Tspecial_data_t   )  *** out_SPR_WRITE_STATUS_DATA     ; // type for compatibility with the registerFile
    117119
    118120    // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    124126  public    : SC_OUT(Tcontrol_t        )  *** out_INSERT_ROB_GPR_STATUS_VAL            ;
    125127  public    : SC_IN (Tcontrol_t        )  ***  in_INSERT_ROB_GPR_STATUS_ACK            ;
     128  public    : SC_OUT(Tgeneral_data_t   )  *** out_INSERT_ROB_GPR_STATUS_DATA           ; // type for compatibility with the registerFile
    126129
    127130  public    : SC_OUT(Tcontrol_t        )  *** out_INSERT_ROB_SPR_STATUS_VAL            ;
    128131  public    : SC_IN (Tcontrol_t        )  ***  in_INSERT_ROB_SPR_STATUS_ACK            ;
     132  public    : SC_OUT(Tspecial_data_t   )  *** out_INSERT_ROB_SPR_STATUS_DATA           ; // type for compatibility with the registerFile
    129133
    130134//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp

    r123 r128  
    7171      {
    7272    // Constant
    73 
    74     PORT_WRITE(out_CONST_0 ,0);
    75     PORT_WRITE(out_CONST_1 ,1);
     73//     PORT_WRITE(out_CONST_0 ,0);
     74//     PORT_WRITE(out_CONST_1 ,1);
     75        for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
     76          {
     77            for (uint32_t j=0; j<_param->_nb_gpr_write; ++j)
     78              PORT_WRITE(out_GPR_WRITE_STATUS_DATA [i][j],1);
     79            for (uint32_t j=0; j<_param->_nb_spr_write; ++j)
     80              PORT_WRITE(out_SPR_WRITE_STATUS_DATA [i][j],1);
     81
     82            for (uint32_t j=0; j<_param->_nb_inst_insert_rob[i]; ++j)
     83              {
     84                PORT_WRITE(out_INSERT_ROB_GPR_STATUS_DATA [i][j],0);
     85                PORT_WRITE(out_INSERT_ROB_SPR_STATUS_DATA [i][j],0);
     86              }
     87          }
    7688
    7789    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp

    r112 r128  
    4848     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
    4949     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_NO);
    50     out_CONST_0      = interface->set_signal_out <Tcontrol_t> ("const_0",1);
    51     out_CONST_1      = interface->set_signal_out <Tcontrol_t> ("const_1",1);
     50//     out_CONST_0      = interface->set_signal_out <Tcontrol_t> ("const_0",1);
     51//     out_CONST_1      = interface->set_signal_out <Tcontrol_t> ("const_1",1);
    5252
    5353    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    7979      ALLOC2_VALACK_OUT(out_GPR_READ_STATUS_VAL      ,VAL);
    8080      ALLOC2_VALACK_IN ( in_GPR_READ_STATUS_ACK      ,ACK);
    81       ALLOC2_SIGNAL_IN ( in_GPR_READ_STATUS_DATA_VAL,"data_val",Tcontrol_t,1);
     81      ALLOC2_SIGNAL_IN ( in_GPR_READ_STATUS_DATA_VAL,"data_val",Tgeneral_data_t,1);
    8282
    8383      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_gpr_read);
     
    112112      ALLOC2_VALACK_OUT(out_SPR_READ_STATUS_VAL      ,VAL);
    113113      ALLOC2_VALACK_IN ( in_SPR_READ_STATUS_ACK      ,ACK);
    114       ALLOC2_SIGNAL_IN ( in_SPR_READ_STATUS_DATA_VAL,"data_val",Tcontrol_t,1);
     114      ALLOC2_SIGNAL_IN ( in_SPR_READ_STATUS_DATA_VAL,"data_val",Tspecial_data_t,1);
    115115     
    116116      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_spr_read);
     
    140140      ALLOC2_INTERFACE_BEGIN("gpr_write_status",IN,NORTH,_("Interface to write generalist register - from/to status"),_param->_nb_ooo_engine,_param->_nb_gpr_write);
    141141     
    142       ALLOC2_VALACK_OUT(out_GPR_WRITE_STATUS_VAL,VAL);
    143       ALLOC2_VALACK_IN ( in_GPR_WRITE_STATUS_ACK,ACK);
     142      ALLOC2_VALACK_OUT(out_GPR_WRITE_STATUS_VAL ,VAL);
     143      ALLOC2_VALACK_IN ( in_GPR_WRITE_STATUS_ACK ,ACK);
     144      ALLOC2_SIGNAL_OUT(out_GPR_WRITE_STATUS_DATA,"data",Tgeneral_data_t,1);
    144145
    145146      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_gpr_write);
     
    171172      ALLOC2_VALACK_OUT(out_SPR_WRITE_STATUS_VAL,VAL);
    172173      ALLOC2_VALACK_IN ( in_SPR_WRITE_STATUS_ACK,ACK);
     174      ALLOC2_SIGNAL_OUT(out_SPR_WRITE_STATUS_DATA,"data",Tspecial_data_t,1);
    173175
    174176      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_spr_write);
     
    190192      ALLOC2_INTERFACE_BEGIN("insert_rob_gpr_status",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    191193     
    192       _ALLOC2_VALACK_OUT(out_INSERT_ROB_GPR_STATUS_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    193       _ALLOC2_VALACK_IN ( in_INSERT_ROB_GPR_STATUS_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     194      _ALLOC2_VALACK_OUT(out_INSERT_ROB_GPR_STATUS_VAL ,VAL                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     195      _ALLOC2_VALACK_IN ( in_INSERT_ROB_GPR_STATUS_ACK ,ACK                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     196      _ALLOC2_SIGNAL_OUT(out_INSERT_ROB_GPR_STATUS_DATA,"data",Tgeneral_data_t,1,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    194197
    195198      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     
    199202      ALLOC2_INTERFACE_BEGIN("insert_rob_spr_status",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    200203     
    201       _ALLOC2_VALACK_OUT(out_INSERT_ROB_SPR_STATUS_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    202       _ALLOC2_VALACK_IN ( in_INSERT_ROB_SPR_STATUS_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     204      _ALLOC2_VALACK_OUT(out_INSERT_ROB_SPR_STATUS_VAL ,VAL                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     205      _ALLOC2_VALACK_IN ( in_INSERT_ROB_SPR_STATUS_ACK ,ACK                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     206      _ALLOC2_SIGNAL_OUT(out_INSERT_ROB_SPR_STATUS_DATA,"data",Tspecial_data_t,1,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    203207
    204208      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_deallocation.cpp

    r112 r128  
    2424    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2525
    26     if (usage_is_set(_usage,USE_VHDL))
     26//     if (usage_is_set(_usage,USE_VHDL))
    2727      {
    2828//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    3030//#endif
    3131    delete  in_NRESET;
    32     delete out_CONST_0;
    33     delete out_CONST_1;
     32//     delete out_CONST_0;
     33//     delete out_CONST_1;
    3434
    3535    DELETE1_SIGNAL( in_GPR_READ_VAL           ,_param->_nb_gpr_read,1  );
     
    6969    DELETE2_SIGNAL( in_GPR_WRITE_REGISTERFILE_ACK,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
    7070
    71     DELETE2_SIGNAL(out_GPR_WRITE_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
    72     DELETE2_SIGNAL( in_GPR_WRITE_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
     71    DELETE2_SIGNAL(out_GPR_WRITE_STATUS_VAL      ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
     72    DELETE2_SIGNAL( in_GPR_WRITE_STATUS_ACK      ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
     73    DELETE2_SIGNAL(out_GPR_WRITE_STATUS_DATA     ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
    7374
    74     DELETE1_SIGNAL( in_SPR_WRITE_VAL          ,_param->_nb_spr_write,1  );
    75     DELETE1_SIGNAL(out_SPR_WRITE_ACK          ,_param->_nb_spr_write,1  );
    76     DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID,_param->_nb_spr_write,_param->_size_ooo_engine_id);
     75    DELETE1_SIGNAL( in_SPR_WRITE_VAL             ,_param->_nb_spr_write,1  );
     76    DELETE1_SIGNAL(out_SPR_WRITE_ACK             ,_param->_nb_spr_write,1  );
     77    DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID   ,_param->_nb_spr_write,_param->_size_ooo_engine_id);
    7778
    7879    DELETE2_SIGNAL(out_SPR_WRITE_REGISTERFILE_VAL,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    7980    DELETE2_SIGNAL( in_SPR_WRITE_REGISTERFILE_ACK,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    8081
    81     DELETE2_SIGNAL(out_SPR_WRITE_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    82     DELETE2_SIGNAL( in_SPR_WRITE_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
     82    DELETE2_SIGNAL(out_SPR_WRITE_STATUS_VAL      ,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
     83    DELETE2_SIGNAL( in_SPR_WRITE_STATUS_ACK      ,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
     84    DELETE2_SIGNAL(out_SPR_WRITE_STATUS_DATA     ,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    8385
    84     DELETE2_SIGNAL( in_INSERT_ROB_VAL   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    85     DELETE2_SIGNAL(out_INSERT_ROB_ACK   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    86     DELETE2_SIGNAL( in_INSERT_ROB_RD_USE,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    87     DELETE2_SIGNAL( in_INSERT_ROB_RE_USE,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     86    DELETE2_SIGNAL( in_INSERT_ROB_VAL            ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     87    DELETE2_SIGNAL(out_INSERT_ROB_ACK            ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     88    DELETE2_SIGNAL( in_INSERT_ROB_RD_USE         ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     89    DELETE2_SIGNAL( in_INSERT_ROB_RE_USE         ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    8890
    89     DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    90     DELETE2_SIGNAL( in_INSERT_ROB_GPR_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     91    DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     92    DELETE2_SIGNAL( in_INSERT_ROB_GPR_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     93    DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_DATA,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    9194
    92     DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    93     DELETE2_SIGNAL( in_INSERT_ROB_SPR_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     95    DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     96    DELETE2_SIGNAL( in_INSERT_ROB_SPR_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     97    DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_DATA,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    9498      }
    9599    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_write_status.cpp

    r123 r128  
    3838              {
    3939                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     40
     41                log_printf(TRACE,Register_unit_Glue,FUNCTION,"  * GPR_WRITE_STATUS_VAL [%d (%d)][%d] : %d (%d and %d)",i, ooo_engine_id,j,id and status_val, id, status_val);
     42
    4043                PORT_WRITE(out_GPR_WRITE_STATUS_VAL       [i][j], (id and status_val));
    4144              }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp

    r123 r128  
    4646                                       gpr_status_ack);
    4747
    48           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"  * insert_rob [%d][%d]",i,j);
    49           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * val            (r) : %d",val           );
    50           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * ack            (w) : %d",ack           );
    51           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_use (rd)   (r) : %d",gpr_use       );
    52           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_status_val (w) : %d",gpr_status_val);
    53           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_status_ack (r) : %d",gpr_status_ack);
    54           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_use (re)   (r) : %d",spr_use       );
    55           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_status_val (w) : %d",spr_status_val);
    56           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_status_ack (r) : %d",spr_status_ack);
     48          log_printf(TRACE,Register_unit_Glue,FUNCTION,"  * insert_rob [%d][%d]",i,j);
     49          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * val            (r) : %d",val           );
     50          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * ack            (w) : %d",ack           );
     51          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * gpr_use (rd)   (r) : %d",gpr_use       );
     52          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * gpr_status_val (w) : %d",gpr_status_val);
     53          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * gpr_status_ack (r) : %d",gpr_status_ack);
     54          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * spr_use (re)   (r) : %d",spr_use       );
     55          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * spr_status_val (w) : %d",spr_status_val);
     56          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * spr_status_ack (r) : %d",spr_status_ack);
    5757
    5858          PORT_WRITE(out_INSERT_ROB_ACK            [i][j], ack           );
    5959          PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val);
    6060          PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val);
    61 
    6261        }
    6362      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read.cpp

    r123 r128  
     1
    12#ifdef SYSTEMC
    23//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp

    r88 r128  
    2121  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    2222#endif
     23
     24  _model.set_model(NAME_Register_unit            ,MODEL_SYSTEMC, true);
     25  _model.set_model(NAME_RegisterFile             ,MODEL_SYSTEMC, true);
     26  _model.set_model(NAME_RegisterFile_Monolithic  ,MODEL_SYSTEMC, true);
     27  _model.set_model(NAME_RegisterFile_Multi_Banked,MODEL_SYSTEMC, true);
     28  _model.set_model(NAME_Register_unit_Glue       ,MODEL_SYSTEMC, true);
    2329
    2430  Tusage_t _usage = USE_ALL;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp

    r112 r128  
    292292     
    293293    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    294     std::string name_component;
     294    std::string src,dest;
    295295   
    296296    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    297297      {
    298         name_component = _name+"_gpr_"+toString(i);
     298        src = _name+"_gpr_"+toString(i);
    299299       
    300         log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
     300        log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());
    301301       
    302 #ifdef POSITION
    303         _component->interface_map (name_component,"",
    304                                    _name         ,"");
    305 #endif
    306        
    307         _component->port_map(name_component,"in_CLOCK"   , _name, "in_CLOCK");
    308         _component->port_map(name_component,"in_NRESET"  , _name, "in_NRESET");
     302        {
     303          dest = _name;
     304#ifdef POSITION
     305          _component->interface_map (src ,"",
     306                                     dest,"");
     307#endif
     308          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     309          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     310        }
    309311
    310312        for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    311313          {
    312             _component->port_map(name_component,
    313                                  "in_READ_"+toString(j)+"_VAL",
    314                                  _name+"_glue",
    315                                  "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    316             _component->port_map(name_component,
    317                                  "out_READ_"+toString(j)+"_ACK",
    318                                  _name+"_glue",
    319                                  "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    320             _component->port_map(name_component,
    321                                  "out_READ_"+toString(j)+"_DATA",
    322                                  _name+"_glue",
    323                                  "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
    324             _component->port_map(name_component,
    325                                  "in_READ_"+toString(j)+"_ADDRESS",
    326                                  _name,
    327                                  "in_GPR_READ_"+toString(j)+"_NUM_REG");
     314            dest = _name+"_glue";
     315           
     316#ifdef POSITION
     317            _component->interface_map (src ,    "read_"+toString(j),
     318                                       dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j));
     319#endif
     320
     321            COMPONENT_MAP(_component,src , "in_READ_"                                 +toString(j)+"_VAL",
     322                                     dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     323            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_ACK",
     324                                     dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     325            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_DATA",
     326                                     dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
     327
     328            dest = _name;
     329
     330            PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     331                                     dest, "in_GPR_READ_"+toString(j)+"_NUM_REG");
    328332          }
     333
    329334        for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    330335          {
    331             _component->port_map(name_component,
    332                                  "in_WRITE_"+toString(j)+"_VAL",
    333                                  _name+"_glue",
    334                                  "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    335             _component->port_map(name_component,
    336                                  "out_WRITE_"+toString(j)+"_ACK",
    337                                  _name+"_glue",
    338                                  "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    339             _component->port_map(name_component,
    340                                  "in_WRITE_"+toString(j)+"_ADDRESS",
    341                                  _name,
    342                                  "in_GPR_WRITE_"+toString(j)+"_NUM_REG"
    343                                  );
    344             _component->port_map(name_component,
    345                                  "in_WRITE_"+toString(j)+"_DATA",
    346                                  _name,
    347                                  "in_GPR_WRITE_"+toString(j)+"_DATA");
     336            dest = _name+"_glue";
     337           
     338#ifdef POSITION
     339            _component->interface_map (src ,    "write_"+toString(j),
     340                                       dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j));
     341#endif
     342
     343            COMPONENT_MAP(_component,src , "in_WRITE_"                                 +toString(j)+"_VAL",
     344                                     dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     345            COMPONENT_MAP(_component,src ,"out_WRITE_"                                 +toString(j)+"_ACK",
     346                                     dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     347
     348            dest = _name;
     349
     350            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_ADDRESS",
     351                                     dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG");
     352            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_DATA",
     353                                     dest, "in_GPR_WRITE_"+toString(j)+"_DATA");
    348354          }
    349355
     
    353359      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    354360        {
    355           name_component = _name+"_gpr_status_"+toString(i);
     361          src = _name+"_gpr_status_"+toString(i);
    356362         
    357           log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
    358          
    359 #ifdef POSITION
    360           _component->interface_map (name_component,"",
    361                                      _name         ,"");
    362 #endif
    363          
    364           _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK");
    365           _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    366          
     363          log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());
     364
     365          {
     366            dest = _name;
     367#ifdef POSITION
     368            _component->interface_map (src ,"",
     369                                       dest,"");
     370#endif
     371            PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     372            PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     373          }
     374         
    367375          for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    368376            {
    369               _component->port_map(name_component,
    370                                    "in_READ_"+toString(j)+"_VAL" ,
    371                                    _name+"_glue",
    372                                    "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        );
    373               _component->port_map(name_component,
    374                                    "out_READ_"+toString(j)+"_ACK",
    375                                    _name+"_glue",
    376                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    377               _component->port_map(name_component,
    378                                    "out_READ_"+toString(j)+"_DATA",
    379                                    _name+"_glue",
    380                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   );
    381               _component->port_map(name_component,
    382                                    "in_READ_"+toString(j)+"_ADDRESS",
    383                                    _name,
    384                                    "in_GPR_READ_"+toString(j)+"_NUM_REG");
     377              dest = _name+"_glue";
     378             
     379#ifdef POSITION
     380              _component->interface_map (src ,    "read_"+toString(j),
     381                                         dest,"gpr_read_status_"+toString(i)+"_"+toString(j));
     382#endif
     383
     384              COMPONENT_MAP(_component,src , "in_READ_"                           +toString(j)+"_VAL",
     385                                       dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     386              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_ACK",
     387                                       dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     388              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_DATA",
     389                                       dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL");
     390
     391              dest = _name;
     392             
     393              PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     394                                       dest, "in_GPR_READ_"+toString(j)+"_NUM_REG");
    385395            }
    386396
     
    388398          for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    389399            {
    390               _component->port_map(name_component,
    391                                    "in_WRITE_"+toString(x)+"_VAL" ,
    392                                    _name+"_glue",
    393                                    "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    394               _component->port_map(name_component,
    395                                    "out_WRITE_"+toString(x)+"_ACK",
    396                                    _name+"_glue",
    397                                    "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    398               _component->port_map(name_component,
    399                                    "in_WRITE_"+toString(x)+"_DATA" ,
    400                                    _name+"_glue",
    401                                    "out_CONST_1");
    402 
    403               _component->port_map(_name+"_glue",
    404                                    "out_CONST_1",
    405                                    name_component,
    406                                    "in_WRITE_"+toString(x)+"_DATA" );
    407 
    408 
    409               _component->port_map(name_component,
    410                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    411                                    _name,
    412                                    "in_GPR_WRITE_"+toString(j)+"_NUM_REG");
     400              dest = _name+"_glue";
     401             
     402#ifdef POSITION
     403              _component->interface_map (src ,    "write_"+toString(j),
     404                                         dest,"gpr_write_status_"+toString(i)+"_"+toString(j));
     405#endif
     406
     407              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_VAL",
     408                                       dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     409              COMPONENT_MAP(_component,src ,"out_WRITE_"                           +toString(x)+"_ACK",
     410                                       dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     411              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_DATA",
     412                                       dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     413//                                     dest,"out_CONST_1");
     414             
     415              dest = _name;
     416             
     417              PORT_MAP     (_component,src , "in_WRITE_"    +toString(x)+"_ADDRESS",
     418                                       dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG");
     419
     420              x++;
    413421            }
    414422         
    415423          for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++)
    416424            {
    417               _component->port_map(name_component,
    418                                    "in_WRITE_"+toString(x)+"_VAL" ,
    419                                    _name+"_glue",
    420                                    "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    421               _component->port_map(name_component,
    422                                    "out_WRITE_"+toString(x)+"_ACK",
    423                                    _name+"_glue",
    424                                    "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    425 
    426               _component->port_map(name_component,
    427                                    "in_WRITE_"+toString(x)+"_DATA",
    428                                     _name+"_glue",
    429                                    "out_CONST_0"
    430                                    );
    431               _component->port_map( _name+"_glue",
    432                                     "out_CONST_0",
    433                                     name_component,
    434                                    "in_WRITE_"+toString(x)+"_DATA");
    435 
    436               _component->port_map(name_component,
    437                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    438                                    _name,
    439                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG");
    440 
     425              dest = _name+"_glue";
     426             
     427#ifdef POSITION
     428              _component->interface_map (src ,    "write_"+toString(j),
     429                                         dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j));
     430#endif
     431
     432              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_VAL",
     433                                       dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     434              COMPONENT_MAP(_component,src ,"out_WRITE_"                                +toString(x)+"_ACK",
     435                                       dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     436              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_DATA",
     437                                       dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     438//                                     dest,"out_CONST_0");
     439             
     440              dest = _name;
     441             
     442              PORT_MAP     (_component,src , "in_WRITE_"                     +toString(x)+"_ADDRESS",
     443                                       dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG");
     444
     445              x++;
    441446            }
    442 
    443 //        for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    444 //          {
    445 //            _component->port_map(name_component,
    446 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    447 //                                 _name+"_glue",
    448 //                                 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
    449 //            _component->port_map(name_component,
    450 //                                 "out_WRITE_"+toString(x)+"_ACK",
    451 //                                 _name+"_glue",
    452 //                                 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
    453 
    454 //            _component->port_map(name_component,
    455 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    456 //                                 _name+"_glue",
    457 //                                 "out_CONST_0");
    458 //            _component->port_map(_name+"_glue",
    459 //                                 "out_CONST_0",
    460 //                                 name_component,
    461 //                                 "in_WRITE_"+toString(x)+"_DATA" );
    462 
    463 //            _component->port_map(name_component,
    464 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    465 //                                 _name,
    466 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");
    467              
    468 //            _component->port_map(name_component,
    469 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    470 //                                 _name+"_glue",
    471 //                                 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
    472 //            _component->port_map(name_component,
    473 //                                 "out_WRITE_"+toString(x)+"_ACK",
    474 //                                 _name+"_glue",
    475 //                                 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
    476 
    477 //            _component->port_map(name_component,
    478 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    479 //                                 _name+"_glue",
    480 //                                 "out_CONST_1"
    481 //                                 );
    482 //            _component->port_map(_name+"_glue",
    483 //                                 "out_CONST_1",
    484 //                                 name_component,
    485 //                                 "in_WRITE_"+toString(x)+"_DATA"
    486 //                                 );
    487 
    488 //            _component->port_map(name_component,
    489 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    490 //                                 _name,
    491 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");
    492 //          }
    493447
    494448        }
     
    497451    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    498452      {
    499         name_component = _name+"_spr_"+toString(i);
     453        src = _name+"_spr_"+toString(i);
    500454       
    501         log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
     455        log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());
    502456       
    503 #ifdef POSITION
    504         _component->interface_map (name_component,"",
    505                                    _name         ,"");
    506 #endif
    507        
    508         _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK");
    509         _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
     457        {
     458          dest = _name;
     459#ifdef POSITION
     460          _component->interface_map (src ,"",
     461                                     dest,"");
     462#endif
     463          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     464          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     465        }
    510466
    511467        for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    512468          {
    513             _component->port_map(name_component,
    514                                  "in_READ_"+toString(j)+"_VAL",
    515                                  _name+"_glue",
    516                                  "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    517             _component->port_map(name_component,
    518                                  "out_READ_"+toString(j)+"_ACK",
    519                                  _name+"_glue",
    520                                  "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    521             _component->port_map(name_component,
    522                                  "out_READ_"+toString(j)+"_DATA",
    523                                  _name+"_glue",
    524                                  "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
    525             _component->port_map(name_component,
    526                                  "in_READ_"+toString(j)+"_ADDRESS",
    527                                  _name,
    528                                  "in_SPR_READ_"+toString(j)+"_NUM_REG");
     469            dest = _name+"_glue";
     470           
     471#ifdef POSITION
     472            _component->interface_map (src ,    "read_"+toString(j),
     473                                       dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j));
     474#endif
     475
     476            COMPONENT_MAP(_component,src , "in_READ_"                                 +toString(j)+"_VAL",
     477                                     dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     478            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_ACK",
     479                                     dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     480            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_DATA",
     481                                     dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
     482
     483            dest = _name;
     484
     485            PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     486                                     dest, "in_SPR_READ_"+toString(j)+"_NUM_REG");
    529487          }
     488
    530489        for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    531490          {
    532             _component->port_map(name_component,
    533                                  "in_WRITE_"+toString(j)+"_VAL",
    534                                  _name+"_glue",
    535                                  "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    536             _component->port_map(name_component,
    537                                  "out_WRITE_"+toString(j)+"_ACK",
    538                                  _name+"_glue",
    539                                  "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    540             _component->port_map(name_component,
    541                                  "in_WRITE_"+toString(j)+"_ADDRESS",
    542                                  _name,
    543                                  "in_SPR_WRITE_"+toString(j)+"_NUM_REG"
    544                                  );
    545             _component->port_map(name_component,
    546                                  "in_WRITE_"+toString(j)+"_DATA",
    547                                  _name,
    548                                  "in_SPR_WRITE_"+toString(j)+"_DATA");
     491            dest = _name+"_glue";
     492           
     493#ifdef POSITION
     494            _component->interface_map (src ,    "write_"+toString(j),
     495                                       dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j));
     496#endif
     497
     498            COMPONENT_MAP(_component,src , "in_WRITE_"                                 +toString(j)+"_VAL",
     499                                     dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     500            COMPONENT_MAP(_component,src ,"out_WRITE_"                                 +toString(j)+"_ACK",
     501                                     dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     502
     503            dest = _name;
     504
     505            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_ADDRESS",
     506                                     dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG");
     507            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_DATA",
     508                                     dest, "in_SPR_WRITE_"+toString(j)+"_DATA");
    549509          }
    550510
     
    554514      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    555515        {
    556           name_component = _name+"_spr_status_"+toString(i);
     516          src = _name+"_spr_status_"+toString(i);
    557517         
    558           log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());   
     518          log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());       
    559519 
    560 #ifdef POSITION
    561           _component->interface_map (name_component,"",
    562                                      _name         ,"");
    563 #endif
    564          
    565           _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK");
    566           _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    567          
     520          {
     521            dest = _name;
     522#ifdef POSITION
     523            _component->interface_map (src ,"",
     524                                       dest,"");
     525#endif
     526            PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     527            PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     528          }
     529
    568530          for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    569531            {
    570               _component->port_map(name_component,
    571                                    "in_READ_"+toString(j)+"_VAL" ,
    572                                    _name+"_glue",
    573                                    "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        );
    574               _component->port_map(name_component,
    575                                    "out_READ_"+toString(j)+"_ACK",
    576                                    _name+"_glue",
    577                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    578               _component->port_map(name_component,
    579                                    "out_READ_"+toString(j)+"_DATA",
    580                                    _name+"_glue",
    581                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   );
    582               _component->port_map(name_component,
    583                                    "in_READ_"+toString(j)+"_ADDRESS",
    584                                    _name,
    585                                    "in_SPR_READ_"+toString(j)+"_NUM_REG");
     532              dest = _name+"_glue";
     533             
     534#ifdef POSITION
     535              _component->interface_map (src ,    "read_"+toString(j),
     536                                         dest,"spr_read_status_"+toString(i)+"_"+toString(j));
     537#endif
     538
     539              COMPONENT_MAP(_component,src , "in_READ_"                           +toString(j)+"_VAL",
     540                                       dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     541              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_ACK",
     542                                       dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     543              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_DATA",
     544                                       dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL");
     545
     546              dest = _name;
     547             
     548              PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     549                                       dest, "in_SPR_READ_"+toString(j)+"_NUM_REG");
    586550            }
    587551
     
    589553          for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    590554            {
    591               _component->port_map(name_component,
    592                                    "in_WRITE_"+toString(x)+"_VAL" ,
    593                                    _name+"_glue",
    594                                    "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    595               _component->port_map(name_component,
    596                                    "out_WRITE_"+toString(x)+"_ACK",
    597                                    _name+"_glue",
    598                                    "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    599               _component->port_map(name_component,
    600                                    "in_WRITE_"+toString(x)+"_DATA" ,
    601                                    _name+"_glue",
    602                                    "out_CONST_1");
    603               _component->port_map(_name+"_glue",
    604                                    "out_CONST_1",
    605                                    name_component,
    606                                    "in_WRITE_"+toString(x)+"_DATA"
    607                                    );
    608 
    609               _component->port_map(name_component,
    610                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    611                                    _name,
    612                                    "in_SPR_WRITE_"+toString(j)+"_NUM_REG");
     555              dest = _name+"_glue";
     556             
     557#ifdef POSITION
     558              _component->interface_map (src ,    "write_"+toString(j),
     559                                         dest,"spr_write_status_"+toString(i)+"_"+toString(j));
     560#endif
     561
     562              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_VAL",
     563                                       dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     564              COMPONENT_MAP(_component,src ,"out_WRITE_"                           +toString(x)+"_ACK",
     565                                       dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     566              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_DATA",
     567                                       dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     568//                                     dest,"out_CONST_1");
     569             
     570              dest = _name;
     571             
     572              PORT_MAP     (_component,src , "in_WRITE_"    +toString(x)+"_ADDRESS",
     573                                       dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG");
     574
     575              x++;
    613576            }
    614577         
    615578          for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++)
    616579            {
    617               _component->port_map(name_component,
    618                                    "in_WRITE_"+toString(x)+"_VAL" ,
    619                                    _name+"_glue",
    620                                    "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    621               _component->port_map(name_component,
    622                                    "out_WRITE_"+toString(x)+"_ACK",
    623                                    _name+"_glue",
    624                                    "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    625 
    626               _component->port_map(name_component,
    627                                    "in_WRITE_"+toString(x)+"_DATA",
    628                                     _name+"_glue",
    629                                    "out_CONST_0"
    630                                    );
    631               _component->port_map( _name+"_glue",
    632                                     "out_CONST_0",
    633                                    name_component,
    634                                    "in_WRITE_"+toString(x)+"_DATA"
    635                                    );
    636 
    637               _component->port_map(name_component,
    638                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    639                                    _name,
    640                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG");
    641 
     580              dest = _name+"_glue";
     581             
     582#ifdef POSITION
     583              _component->interface_map (src ,    "write_"+toString(j),
     584                                         dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j));
     585#endif
     586
     587              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_VAL",
     588                                       dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     589              COMPONENT_MAP(_component,src ,"out_WRITE_"                                +toString(x)+"_ACK",
     590                                       dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     591              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_DATA",
     592                                       dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     593//                                     dest,"out_CONST_0");
     594             
     595              dest = _name;
     596             
     597              PORT_MAP     (_component,src , "in_WRITE_"                     +toString(x)+"_ADDRESS",
     598                                       dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG");
     599
     600              x++;
    642601            }
    643602
    644 //        for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    645 //          {
    646 //            _component->port_map(name_component,
    647 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    648 //                                 _name+"_glue",
    649 //                                 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
    650 //            _component->port_map(name_component,
    651 //                                 "out_WRITE_"+toString(x)+"_ACK",
    652 //                                 _name+"_glue",
    653 //                                 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
    654 
    655 //            _component->port_map(name_component,
    656 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    657 //                                 _name+"_glue",
    658 //                                 "out_CONST_0");
    659 //            _component->port_map(_name+"_glue",
    660 //                                 "out_CONST_0",
    661 //                                 name_component,
    662 //                                 "in_WRITE_"+toString(x)+"_DATA"
    663 //                                 );
    664 
    665 //            _component->port_map(name_component,
    666 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    667 //                                 _name,
    668 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");
    669              
    670 //            _component->port_map(name_component,
    671 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    672 //                                 _name+"_glue",
    673 //                                 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
    674 //            _component->port_map(name_component,
    675 //                                 "out_WRITE_"+toString(x)+"_ACK",
    676 //                                 _name+"_glue",
    677 //                                 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
    678 
    679 //            _component->port_map(name_component,
    680 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    681 //                                 _name+"_glue",
    682 //                                 "out_CONST_1"
    683 //                                 );
    684 //            _component->port_map(_name+"_glue",
    685 //                                 "out_CONST_1",
    686 //                                 name_component,
    687 //                                 "in_WRITE_"+toString(x)+"_DATA"
    688 //                                 );
    689 
    690 //            _component->port_map(name_component,
    691 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    692 //                                 _name,
    693 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");
    694 //          }
    695603
    696604        }
     
    698606
    699607    {
    700       name_component = _name+"_glue";
     608      src = _name+"_glue";
    701609     
    702       log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 
     610      log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 
    703611   
    704 #ifdef POSITION
    705       _component->interface_map (name_component,"",
    706                                  _name         ,"");
    707 #endif
    708    
    709       _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK" );
    710       _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    711 //       _component->port_map(name_component,"out_CONST_0",_name,"out_CONST_0");
    712 //       _component->port_map(name_component,"out_CONST_1",_name,"out_CONST_1");
     612        {
     613          dest = _name;
     614#ifdef POSITION
     615          _component->interface_map (src ,"",
     616                                     dest,"");
     617#endif
     618          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     619          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     620        }
    713621
    714622      for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    715623        {
    716           _component->port_map(name_component,
    717                                "in_GPR_READ_"+toString(j)+"_VAL",
    718                                _name,
    719                                "in_GPR_READ_"+toString(j)+"_VAL");
    720           _component->port_map(name_component,
    721                                "out_GPR_READ_"+toString(j)+"_ACK",
    722                                _name,
    723                                "out_GPR_READ_"+toString(j)+"_ACK"           );
     624          dest = _name;
     625             
     626#ifdef POSITION
     627          _component->interface_map (src ,"gpr_read_"+toString(j),
     628                                     dest,"gpr_read_"+toString(j));
     629#endif
     630
     631          PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL",
     632                              dest, "in_GPR_READ_"+toString(j)+"_VAL");
     633          PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK",
     634                              dest,"out_GPR_READ_"+toString(j)+"_ACK");
    724635          if (_param->_have_port_ooo_engine_id == true)
    725             _component->port_map(name_component,
    726                                  "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID" ,
    727                                  _name,
    728                                  "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
    729           _component->port_map(name_component,
    730                                "out_GPR_READ_"+toString(j)+"_DATA"          ,
    731                                _name,
    732                                "out_GPR_READ_"+toString(j)+"_DATA");
    733           _component->port_map(name_component,
    734                                "out_GPR_READ_"+toString(j)+"_DATA_VAL"      ,
    735                                _name,
    736                                "out_GPR_READ_"+toString(j)+"_DATA_VAL");
    737 
    738           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    739             {
    740               _component->port_map(name_component ,
    741                                    "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL",
    742                                    _name+"_gpr_"+toString(i),
    743                                    "in_READ_"+toString(j)+"_VAL"  );
    744               _component->port_map(name_component,
    745                                    "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    746                                    _name+"_gpr_"+toString(i),
    747                                    "out_READ_"+toString(j)+"_ACK" );
    748               _component->port_map(name_component,
    749                                    "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" ,
    750                                    _name+"_gpr_"+toString(i),
    751                                    "out_READ_"+toString(j)+"_DATA");
    752               _component->port_map(name_component,
    753                                    "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    754                                    _name+"_gpr_status_"+toString(i),
    755                                    "in_READ_"+toString(j)+"_VAL" );
    756               _component->port_map(name_component,
    757                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ,
    758                                    _name+"_gpr_status_"+toString(i),
    759                                    "out_READ_"+toString(j)+"_ACK");
    760               _component->port_map(name_component,
    761                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   ,
    762                                    _name+"_gpr_status_"+toString(i),
    763                                    "out_READ_"+toString(j)+"_DATA");
    764             }
     636          PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID",
     637                              dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
     638          PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA",
     639                              dest,"out_GPR_READ_"+toString(j)+"_DATA");
     640          PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL",
     641                              dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL");
     642
     643          // out_GPR_READ_REGISTERFILE_VAL   - gpr. in_READ_VAL
     644          //  in_GPR_READ_REGISTERFILE_ACK   - gpr.out_READ_ACK
     645          //  in_GPR_READ_REGISTERFILE_DATA  - gpr.out_READ_DATA
     646         
     647          // out_GPR_READ_STATUS_VAL         - gpr. in_READ_VAL
     648          //  in_GPR_READ_STATUS_ACK         - gpr.out_READ_ACK
     649          //  in_GPR_READ_STATUS_DATA_VAL    - gpr.out_READ_DATA
    765650        }
    766651
    767652      for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    768653        {
    769           _component->port_map(name_component,
    770                                "in_GPR_WRITE_"+toString(j)+"_VAL",
    771                                _name,
    772                                "in_GPR_WRITE_"+toString(j)+"_VAL"           );
    773           _component->port_map(name_component,
    774                                "out_GPR_WRITE_"+toString(j)+"_ACK",
    775                                _name,
    776                                "out_GPR_WRITE_"+toString(j)+"_ACK"           );
     654          dest = _name;
     655
     656#ifdef POSITION
     657          _component->interface_map (src ,"gpr_write_"+toString(j),
     658                                     dest,"gpr_write_"+toString(j));
     659#endif
     660
     661          PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL",
     662                              dest, "in_GPR_WRITE_"+toString(j)+"_VAL");
     663          PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK",
     664                              dest,"out_GPR_WRITE_"+toString(j)+"_ACK");
    777665          if (_param->_have_port_ooo_engine_id == true)
    778             _component->port_map(name_component,
    779                                  "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
    780                                  _name,
    781                                  "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" );
    782          
    783           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     666          PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
     667                              dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID");
     668
     669          // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL
     670          //  in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK
     671          // out_GPR_WRITE_STATUS_VAL       - gpr. in_WRITE_VAL
     672          //  in_GPR_WRITE_STATUS_ACK       - gpr.out_WRITE_ACK
     673          // out_GPR_WRITE_STATUS_DATA      - gpr. in_WRITE_DATA
     674        }
     675
     676      for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     677        {
     678          dest = _name;
     679             
     680#ifdef POSITION
     681          _component->interface_map (src ,"spr_read_"+toString(j),
     682                                     dest,"spr_read_"+toString(j));
     683#endif
     684
     685          PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL",
     686                              dest, "in_SPR_READ_"+toString(j)+"_VAL");
     687          PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK",
     688                              dest,"out_SPR_READ_"+toString(j)+"_ACK");
     689          if (_param->_have_port_ooo_engine_id == true)
     690          PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID",
     691                              dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
     692          PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA",
     693                              dest,"out_SPR_READ_"+toString(j)+"_DATA");
     694          PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL",
     695                              dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL");
     696
     697          // out_SPR_READ_REGISTERFILE_VAL   - spr. in_READ_VAL
     698          //  in_SPR_READ_REGISTERFILE_ACK   - spr.out_READ_ACK
     699          //  in_SPR_READ_REGISTERFILE_DATA  - spr.out_READ_DATA
     700         
     701          // out_SPR_READ_STATUS_VAL         - spr. in_READ_VAL
     702          //  in_SPR_READ_STATUS_ACK         - spr.out_READ_ACK
     703          //  in_SPR_READ_STATUS_DATA_VAL    - spr.out_READ_DATA
     704        }
     705
     706      for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     707        {
     708          dest = _name;
     709
     710#ifdef POSITION
     711          _component->interface_map (src ,"spr_write_"+toString(j),
     712                                     dest,"spr_write_"+toString(j));
     713#endif
     714
     715          PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL",
     716                              dest, "in_SPR_WRITE_"+toString(j)+"_VAL");
     717          PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK",
     718                              dest,"out_SPR_WRITE_"+toString(j)+"_ACK");
     719          if (_param->_have_port_ooo_engine_id == true)
     720          PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
     721                              dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID");
     722
     723          // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL
     724          //  in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK
     725          // out_SPR_WRITE_STATUS_VAL       - spr. in_WRITE_VAL
     726          //  in_SPR_WRITE_STATUS_ACK       - spr.out_WRITE_ACK
     727          // out_SPR_WRITE_STATUS_DATA      - spr. in_WRITE_DATA
     728        }
     729
     730      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     731        {
     732          uint32_t x     =_param->_nb_inst_insert_rob [i];
     733
     734          for (uint32_t j=0; j<x; j++)
    784735            {
    785               _component->port_map(name_component,
    786                                    "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"  ,
    787                                    _name+"_gpr_"+toString(i),
    788                                    "in_WRITE_"+toString(j)+"_VAL" );
    789               _component->port_map(name_component,
    790                                    "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    791                                    _name+"_gpr_"+toString(i),
    792                                    "out_WRITE_"+toString(j)+"_ACK" );
    793               _component->port_map(name_component,
    794                                    "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    795                                    _name+"_gpr_status_"+toString(i),
    796                                    "in_WRITE_"+toString(j)+"_VAL" );
    797               _component->port_map(name_component,
    798                                    "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"        ,
    799                                    _name+"_gpr_status_"+toString(i),
    800                                    "out_WRITE_"+toString(j)+"_ACK" );
     736              dest = _name;
     737
     738#ifdef POSITION
     739              _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j),
     740                                         dest,"insert_rob_"+toString(i)+"_"+toString(j));
     741#endif
     742
     743              PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
     744                                  dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
     745              PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
     746                                  dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
     747              PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE",
     748                                  dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE");
     749              PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE",
     750                                  dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE");
     751             
     752              // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status.  in_WRITE_VAL
     753              //  in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK
     754              // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status.  in_WRITE_DATA
     755              // out_INSERT_ROB_SPR_STATUS_VAL - spr_status.  in_WRITE_VAL
     756              //  in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK
     757              //  in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA
    801758            }
    802759        }
    803760     
    804       for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    805         {
    806           _component->port_map(name_component,
    807                                "in_SPR_READ_"+toString(j)+"_VAL",
    808                                _name,
    809                                "in_SPR_READ_"+toString(j)+"_VAL");
    810           _component->port_map(name_component,
    811                                "out_SPR_READ_"+toString(j)+"_ACK",
    812                                _name,
    813                                "out_SPR_READ_"+toString(j)+"_ACK"           );
    814           if (_param->_have_port_ooo_engine_id == true)
    815             _component->port_map(name_component,
    816                                  "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID" ,
    817                                  _name,
    818                                  "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
    819           _component->port_map(name_component,
    820                                "out_SPR_READ_"+toString(j)+"_DATA"          ,
    821                                _name,
    822                                "out_SPR_READ_"+toString(j)+"_DATA");
    823           _component->port_map(name_component,
    824                                "out_SPR_READ_"+toString(j)+"_DATA_VAL"      ,
    825                                _name,
    826                                "out_SPR_READ_"+toString(j)+"_DATA_VAL");
    827 
    828           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    829             {
    830               _component->port_map(name_component ,
    831                                    "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL",
    832                                    _name+"_spr_"+toString(i),
    833                                    "in_READ_"+toString(j)+"_VAL"  );
    834               _component->port_map(name_component,
    835                                    "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    836                                    _name+"_spr_"+toString(i),
    837                                    "out_READ_"+toString(j)+"_ACK" );
    838               _component->port_map(name_component,
    839                                    "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" ,
    840                                    _name+"_spr_"+toString(i),
    841                                    "out_READ_"+toString(j)+"_DATA");
    842               _component->port_map(name_component,
    843                                    "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    844                                    _name+"_spr_status_"+toString(i),
    845                                    "in_READ_"+toString(j)+"_VAL" );
    846               _component->port_map(name_component,
    847                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ,
    848                                    _name+"_spr_status_"+toString(i),
    849                                    "out_READ_"+toString(j)+"_ACK");
    850               _component->port_map(name_component,
    851                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   ,
    852                                    _name+"_spr_status_"+toString(i),
    853                                    "out_READ_"+toString(j)+"_DATA");
    854             }
    855         }
    856 
    857       for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    858         {
    859           _component->port_map(name_component,
    860                                "in_SPR_WRITE_"+toString(j)+"_VAL",
    861                                _name,
    862                                "in_SPR_WRITE_"+toString(j)+"_VAL"           );
    863           _component->port_map(name_component,
    864                                "out_SPR_WRITE_"+toString(j)+"_ACK",
    865                                _name,
    866                                "out_SPR_WRITE_"+toString(j)+"_ACK"           );
    867           if (_param->_have_port_ooo_engine_id == true)
    868             _component->port_map(name_component,
    869                                  "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
    870                                  _name,
    871                                  "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" );
    872          
    873           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    874             {
    875               _component->port_map(name_component,
    876                                    "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"  ,
    877                                    _name+"_spr_"+toString(i),
    878                                    "in_WRITE_"+toString(j)+"_VAL" );
    879               _component->port_map(name_component,
    880                                    "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    881                                    _name+"_spr_"+toString(i),
    882                                    "out_WRITE_"+toString(j)+"_ACK" );
    883               _component->port_map(name_component,
    884                                    "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    885                                    _name+"_spr_status_"+toString(i),
    886                                    "in_WRITE_"+toString(j)+"_VAL" );
    887               _component->port_map(name_component,
    888                                    "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"        ,
    889                                    _name+"_spr_status_"+toString(i),
    890                                    "out_WRITE_"+toString(j)+"_ACK" );
    891             }
    892         }
    893 
    894       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    895         {
    896           uint32_t x     =_param->_nb_inst_insert_rob [i];
    897           uint32_t gpr_j = _param->_nb_gpr_write;
    898           uint32_t spr_j = _param->_nb_spr_write;
    899 
    900           for (uint32_t j=0; j<x; j++)
    901             {
    902               _component->port_map(name_component,
    903                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
    904                                    _name,
    905                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
    906               _component->port_map(name_component,
    907                                    "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
    908                                    _name,
    909                                    "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
    910               _component->port_map(name_component,
    911                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE",
    912                                    _name,
    913                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE");
    914               _component->port_map(name_component,
    915                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE",
    916                                    _name,
    917                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE");
    918               _component->port_map(name_component,
    919                                    "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL",
    920                                    _name+"_gpr_status_"+toString(i),
    921                                    "in_WRITE_"+toString(gpr_j)+"_VAL");
    922               _component->port_map(name_component,
    923                                    "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK",
    924                                    _name+"_gpr_status_"+toString(i),
    925                                    "out_WRITE_"+toString(gpr_j++)+"_ACK");
    926               _component->port_map(name_component,
    927                                    "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL",
    928                                    _name+"_spr_status_"+toString(i),
    929                                    "in_WRITE_"+toString(spr_j)+"_VAL");
    930               _component->port_map(name_component,
    931                                    "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK",
    932                                    _name+"_spr_status_"+toString(i),
    933                                    "out_WRITE_"+toString(spr_j++)+"_ACK");
    934             }
    935         }
    936 
    937 //       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    938 //      {
    939 //        uint32_t x     =_param->_nb_inst_retire_rob [i];
    940 //        uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i];
    941 //        uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i];
    942 
    943 //        for (uint32_t j=0; j<x; j++)
    944 //          {
    945 //            _component->port_map(name_component,
    946 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
    947 //                                 _name,
    948 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
    949 //            _component->port_map(name_component,
    950 //                                 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
    951 //                                 _name,
    952 //                                 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
    953 //            _component->port_map(name_component,
    954 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE",
    955 //                                 _name,
    956 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE");
    957 //            _component->port_map(name_component,
    958 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE",
    959 //                                 _name,
    960 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE");
    961 //            _component->port_map(name_component,
    962 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE",
    963 //                                 _name,
    964 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE");
    965 //            _component->port_map(name_component,
    966 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE",
    967 //                                 _name,
    968 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE");
    969            
    970 //            _component->port_map(name_component,
    971 //                                 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
    972 //                                 _name+"_gpr_status_"+toString(i),
    973 //                                 "in_WRITE_"+toString(gpr_j)+"_VAL");
    974 //            _component->port_map(name_component,
    975 //                                 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
    976 //                                 _name+"_gpr_status_"+toString(i),
    977 //                                 "out_WRITE_"+toString(gpr_j++)+"_ACK");
    978 //            _component->port_map(name_component,
    979 //                                 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
    980 //                                 _name+"_gpr_status_"+toString(i),
    981 //                                 "in_WRITE_"+toString(gpr_j)+"_VAL");
    982 //            _component->port_map(name_component,
    983 //                                 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
    984 //                                 _name+"_gpr_status_"+toString(i),
    985 //                                 "out_WRITE_"+toString(gpr_j++)+"_ACK");
    986 //            _component->port_map(name_component,
    987 //                                 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
    988 //                                 _name+"_spr_status_"+toString(i),
    989 //                                 "in_WRITE_"+toString(spr_j)+"_VAL");
    990 //            _component->port_map(name_component,
    991 //                                 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
    992 //                                 _name+"_spr_status_"+toString(i),
    993 //                                 "out_WRITE_"+toString(spr_j++)+"_ACK");
    994 //            _component->port_map(name_component,
    995 //                                 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
    996 //                                 _name+"_spr_status_"+toString(i),
    997 //                                 "in_WRITE_"+toString(spr_j)+"_VAL");
    998 //            _component->port_map(name_component,
    999 //                                 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
    1000 //                                 _name+"_spr_status_"+toString(i),
    1001 //                                 "out_WRITE_"+toString(spr_j++)+"_ACK");
    1002 //          }
    1003 //      }
    1004761    }// glue
    1005762
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_deallocation.cpp

    r112 r128  
    7474
    7575    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    76 
     76    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     77      {
     78    delete    component_gpr        [i];
     79    delete    component_gpr_status [i];
     80    delete    component_spr        [i];
     81    delete    component_spr_status [i];
     82      }
    7783    delete [] component_gpr       ;
    7884    delete [] component_gpr_status;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/main.cpp

    r115 r128  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/include/test.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011#define NB_PARAMS 18
     
    309310  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information);
    310311
     312  bool * num_thread_valid;
     313  ALLOC1(num_thread_valid              ,bool, nb_thread);
     314  for (uint32_t i=0; i<nb_thread; ++i)
     315    num_thread_valid [i] = true;
     316
    311317  try
    312318    {
     
    367373         is_load_store_unit                            , //[nb_execute_unit]
    368374         translate_num_execute_unit                    , //[nb_execute_unit]
     375         num_thread_valid                              , //[nb_thread]
    369376         true // is_toplevel
    370377         );
    371378     
    372379      test (name,param);
     380
     381      delete param;
    373382    }
    374383  catch (morpheo::ErrorMorpheo & error)
     
    383392    }
    384393
     394  for (uint32_t i=0; i< nb_functionnal_unit; i++)
     395    {
     396  for (uint32_t j=0; j< MAX_TYPE; j++)
     397  delete [] timing [i][j];
     398  delete [] timing [i];
     399    }
     400  delete [] timing;
     401
     402  DELETE1(translate_num_execute_unit    ,_nb_execute_unit);
     403  DELETE1(is_load_store_unit            ,_nb_execute_unit);
     404
     405  for (uint32_t i=0; i<nb_execute_unit; i++)
     406  delete    read_unit_to_execution_unit_table_thread [i];
     407  delete [] read_unit_to_execution_unit_table_thread;
     408
     409  for (uint32_t i=0; i<nb_read_unit; i++)
     410    {
     411  for (uint32_t j=0; j<nb_execute_unit; j++)
     412  delete [] read_unit_to_execution_unit_table_routing [i][j];
     413  delete [] read_unit_to_execution_unit_table_routing [i];
     414   }
     415  delete [] read_unit_to_execution_unit_table_routing;
     416
     417  for (uint32_t i=0; i<nb_write_unit; i++)
     418  delete    execution_unit_to_write_unit_table_thread [i];
     419  delete [] execution_unit_to_write_unit_table_thread;
     420
     421  for (uint32_t i=0; i<nb_execute_unit; i++)
     422    {
     423      uint32_t nb_execute_unit_port = (i<nb_load_store_unit)?nb_inst_memory[i]:nb_inst_functionnal_unit[i-nb_load_store_unit];
     424  for (uint32_t j=0; j<nb_execute_unit_port; j++)
     425  delete [] execution_unit_to_write_unit_table_routing [i][j];
     426  delete [] execution_unit_to_write_unit_table_routing [i];
     427   }
     428  delete [] execution_unit_to_write_unit_table_routing;
     429
     430  DELETE1(nb_inst_retire_rob            ,_nb_ooo_engine);
     431  DELETE1(nb_inst_insert_rob            ,_nb_ooo_engine);
     432  DELETE1(nb_special_register           ,_nb_ooo_engine);
     433  DELETE1(nb_general_register           ,_nb_ooo_engine);
     434  DELETE1(write_queue_scheme            ,_nb_write_unit);
     435  DELETE1(nb_bypass_write               ,_nb_write_unit);
     436  DELETE1(size_execute_queue            ,_nb_write_unit);
     437  DELETE1(size_write_queue              ,_nb_write_unit);
     438  DELETE1(nb_inst_memory                ,_nb_load_store_unit);
     439  DELETE1(nb_cache_port                 ,_nb_load_store_unit);
     440  DELETE1(nb_bypass_memory              ,_nb_load_store_unit);
     441  DELETE1(speculative_load              ,_nb_load_store_unit);
     442  DELETE1(nb_port_check                 ,_nb_load_store_unit);
     443  DELETE1(size_speculative_access_queue ,_nb_load_store_unit);
     444  DELETE1(size_load_queue               ,_nb_load_store_unit);
     445  DELETE1(size_store_queue              ,_nb_load_store_unit);
     446  DELETE1(nb_inst_functionnal_unit      ,_nb_functionnal_unit);
     447  DELETE1(nb_inst_retire                ,_nb_read_unit);
     448  DELETE1(size_reservation_station      ,_nb_read_unit);
     449  DELETE1(size_read_queue               ,_nb_read_unit);
     450  DELETE1(num_thread_valid              , nb_thread);
     451
    385452  return (EXIT_SUCCESS);
    386453}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/test.cpp

    r97 r128  
    5050  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5151  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     52
     53  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_VAL                  ;
     54  sc_signal<Tcontrol_t        >  ** out_EXECUTE_LOOP_IN_ACK                  ;
     55  sc_signal<Tcontext_t        >  **  in_EXECUTE_LOOP_IN_CONTEXT_ID           ;
     56  sc_signal<Tcontext_t        >  **  in_EXECUTE_LOOP_IN_FRONT_END_ID         ;
     57  sc_signal<Tcontext_t        >  **  in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ;
     58  sc_signal<Tpacket_t         >  **  in_EXECUTE_LOOP_IN_PACKET_ID            ;
     59  sc_signal<Toperation_t      >  **  in_EXECUTE_LOOP_IN_OPERATION            ;
     60  sc_signal<Ttype_t           >  **  in_EXECUTE_LOOP_IN_TYPE                 ;
     61  sc_signal<Tlsq_ptr_t        >  **  in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE;
     62  sc_signal<Tlsq_ptr_t        >  **  in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ;
     63  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ;
     64  sc_signal<Tgeneral_data_t   >  **  in_EXECUTE_LOOP_IN_IMMEDIAT             ;
     65  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_READ_RA              ;
     66  sc_signal<Tgeneral_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RA           ;
     67  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_READ_RB              ;
     68  sc_signal<Tgeneral_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RB           ;
     69  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_READ_RC              ;
     70  sc_signal<Tspecial_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RC           ;
     71  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_WRITE_RD             ;
     72  sc_signal<Tgeneral_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RD           ;
     73  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_WRITE_RE             ;
     74  sc_signal<Tspecial_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RE           ;
     75  sc_signal<Tcontrol_t        >  ** out_EXECUTE_LOOP_OUT_VAL                 ;
     76  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_OUT_ACK                 ;
     77  sc_signal<Tcontext_t        >  ** out_EXECUTE_LOOP_OUT_CONTEXT_ID          ;
     78  sc_signal<Tcontext_t        >  ** out_EXECUTE_LOOP_OUT_FRONT_END_ID        ;
     79  sc_signal<Tcontext_t        >  ** out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ;
     80  sc_signal<Tpacket_t         >  ** out_EXECUTE_LOOP_OUT_PACKET_ID           ;
     81//sc_signal<Toperation_t      >  ** out_EXECUTE_LOOP_OUT_OPERATION           ;
     82//sc_signal<Ttype_t           >  ** out_EXECUTE_LOOP_OUT_TYPE                ;
     83  sc_signal<Tspecial_data_t   >  ** out_EXECUTE_LOOP_OUT_FLAGS               ;
     84  sc_signal<Texception_t      >  ** out_EXECUTE_LOOP_OUT_EXCEPTION           ;
     85  sc_signal<Tcontrol_t        >  ** out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ;
     86  sc_signal<Taddress_t        >  ** out_EXECUTE_LOOP_OUT_ADDRESS             ;
     87  sc_signal<Tgeneral_data_t   >  ** out_EXECUTE_LOOP_OUT_DATA                ;
     88  sc_signal<Tcontrol_t        > *** out_DCACHE_REQ_VAL                       ;
     89  sc_signal<Tcontrol_t        > ***  in_DCACHE_REQ_ACK                       ;
     90  sc_signal<Tcontext_t        > *** out_DCACHE_REQ_CONTEXT_ID                ;
     91  sc_signal<Tpacket_t         > *** out_DCACHE_REQ_PACKET_ID                 ;
     92  sc_signal<Tdcache_address_t > *** out_DCACHE_REQ_ADDRESS                   ;
     93  sc_signal<Tdcache_type_t    > *** out_DCACHE_REQ_TYPE                      ;
     94  sc_signal<Tdcache_data_t    > *** out_DCACHE_REQ_WDATA                     ;
     95  sc_signal<Tcontrol_t        > ***  in_DCACHE_RSP_VAL                       ;
     96  sc_signal<Tcontrol_t        > *** out_DCACHE_RSP_ACK                       ;
     97  sc_signal<Tcontext_t        > ***  in_DCACHE_RSP_CONTEXT_ID                ;
     98  sc_signal<Tpacket_t         > ***  in_DCACHE_RSP_PACKET_ID                 ;
     99  sc_signal<Tdcache_data_t    > ***  in_DCACHE_RSP_RDATA                     ;
     100  sc_signal<Tdcache_error_t   > ***  in_DCACHE_RSP_ERROR                     ;
     101  sc_signal<Tcontrol_t        > ***  in_INSERT_ROB_VAL                       ;
     102  sc_signal<Tcontrol_t        > *** out_INSERT_ROB_ACK                       ;
     103  sc_signal<Tcontrol_t        > ***  in_INSERT_ROB_RD_USE                    ;
     104  sc_signal<Tgeneral_address_t> ***  in_INSERT_ROB_RD_NUM_REG                ;
     105  sc_signal<Tcontrol_t        > ***  in_INSERT_ROB_RE_USE                    ;
     106  sc_signal<Tspecial_address_t> ***  in_INSERT_ROB_RE_NUM_REG                ;
     107//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_VAL                       ;
     108//sc_signal<Tcontrol_t        > *** out_RETIRE_ROB_ACK                       ;
     109//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RD_OLD_USE                ;
     110//sc_signal<Tgeneral_address_t> ***  in_RETIRE_ROB_RD_OLD_NUM_REG            ;
     111//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RD_NEW_USE                ;
     112//sc_signal<Tgeneral_address_t> ***  in_RETIRE_ROB_RD_NEW_NUM_REG            ;
     113//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RE_OLD_USE                ;
     114//sc_signal<Tspecial_address_t> ***  in_RETIRE_ROB_RE_OLD_NUM_REG            ;
     115//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RE_NEW_USE                ;
     116//sc_signal<Tspecial_address_t> ***  in_RETIRE_ROB_RE_NEW_NUM_REG            ;
    52117 
    53118  ALLOC1_SC_SIGNAL( in_EXECUTE_LOOP_IN_VAL                  ," in_EXECUTE_LOOP_IN_VAL                  ",Tcontrol_t        ,_param->_nb_read_unit);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters.cpp

    r124 r128  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h"
     9#include "Behavioural/include/Allocation.h"
    910#include "Common/include/Max.h"
    1011
     
    139140    _nb_execute_unit                            = _nb_functionnal_unit + _nb_load_store_unit;
    140141
    141     _nb_execute_unit_port                       = new uint32_t [_nb_execute_unit];
    142    
    143     _read_unit_to_execution_unit_table_execute_type = new bool * [_nb_execute_unit];
     142    ALLOC1(_nb_execute_unit_port                          ,uint32_t,_nb_execute_unit);
     143    ALLOC2(_read_unit_to_execution_unit_table_execute_type,bool    ,_nb_execute_unit,_nb_type);
     144
    144145    for (uint32_t i=0; i<_nb_execute_unit; i++)
    145       {
    146         _read_unit_to_execution_unit_table_execute_type [i] = new bool [_nb_type];
    147         for (uint32_t j=0; j<_nb_type; j++)
    148           _read_unit_to_execution_unit_table_execute_type [i][j] = false;
    149       }
     146      for (uint32_t j=0; j<_nb_type; j++)
     147        _read_unit_to_execution_unit_table_execute_type [i][j] = false;
    150148
    151149    // Fill execute_type
     
    203201    uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit);
    204202
    205     _set_read_unit_source_register_write = new std::set<uint32_t> [_nb_read_unit];
    206     _set_read_unit_source_bypass_write   = new std::set<uint32_t> [_nb_read_unit];
    207     _set_read_unit_source_bypass_memory  = new std::set<uint32_t> [_nb_read_unit];
    208    
    209     _read_unit_nb_register_write          = new uint32_t [_nb_read_unit];
    210     _read_unit_nb_bypass_write            = new uint32_t [_nb_read_unit];
    211     _read_unit_nb_bypass_memory           = new uint32_t [_nb_read_unit];
    212 
    213     _link_read_unit_with_load_store_unit  = new bool ** [nb_read_unit];
    214     _link_read_unit_with_write_unit       = new bool *  [nb_read_unit];
    215     _link_read_unit_with_thread           = new bool *  [nb_read_unit];
     203    ALLOC1(_set_read_unit_source_register_write  ,std::set<uint32_t>,_nb_read_unit);
     204    ALLOC1(_set_read_unit_source_bypass_write    ,std::set<uint32_t>,_nb_read_unit);
     205    ALLOC1(_set_read_unit_source_bypass_memory   ,std::set<uint32_t>,_nb_read_unit);
     206
     207    ALLOC1(_read_unit_nb_register_write          ,uint32_t          ,_nb_read_unit);
     208    ALLOC1(_read_unit_nb_bypass_write            ,uint32_t          ,_nb_read_unit);
     209    ALLOC1(_read_unit_nb_bypass_memory           ,uint32_t          ,_nb_read_unit);
     210
     211    ALLOC3(_link_read_unit_with_load_store_unit  ,bool              ,_nb_read_unit,_nb_execute_unit,_max_nb_inst_memory);
     212    ALLOC2(_link_read_unit_with_write_unit       ,bool              ,_nb_read_unit,_nb_write_unit  );
     213    ALLOC2(_link_read_unit_with_thread           ,bool              ,_nb_read_unit,_nb_thread      );
    216214
    217215    for (uint32_t i=0; i<_nb_read_unit; i++)
     
    221219        _read_unit_nb_bypass_memory  [i] = 0;
    222220
    223         _link_read_unit_with_load_store_unit [i] = new bool * [_nb_execute_unit];
    224         _link_read_unit_with_write_unit      [i] = new bool   [_nb_write_unit];
    225         _link_read_unit_with_thread          [i] = new bool   [_nb_thread];
    226 
    227221        for (uint32_t j=0; j<_nb_execute_unit; j++)
    228           {
    229             _link_read_unit_with_load_store_unit [i][j] = new bool [_max_nb_inst_memory];
    230 
    231             for (uint32_t k=0; k<_max_nb_inst_memory; k++)
    232               _link_read_unit_with_load_store_unit [i][j][k] = false;
    233           }
     222          for (uint32_t k=0; k<_max_nb_inst_memory; k++)
     223            _link_read_unit_with_load_store_unit [i][j][k] = false;
     224
    234225        for (uint32_t j=0; j<_nb_write_unit; j++)
    235226          _link_read_unit_with_write_unit [i][j] = false;
     
    594585    delete    _param_read_unit [i];
    595586    delete [] _param_read_unit;
    596 
     587   
    597588    for (uint32_t i=0; i<_nb_execute_unit; i++)
    598589      {
    599590        uint32_t x = _translate_num_execute_unit [i];
    600 
     591       
    601592        if (_is_load_store_unit [i] == false)
    602593          delete _param_functionnal_unit [x];
    603594        else
    604           delete _param_load_store_unit [x];
     595          delete _param_load_store_unit  [x];
    605596      }
    606597    delete [] _param_functionnal_unit;
     
    613604    delete    _param_register_unit;
    614605
    615     delete [] _read_unit_to_execution_unit_table_execute_type;
    616     delete [] _read_unit_nb_register_write;
    617     delete [] _read_unit_nb_bypass_write;
    618     delete [] _read_unit_nb_bypass_memory;
    619     delete [] _set_read_unit_source_register_write ;
    620     delete [] _set_read_unit_source_bypass_write   ;
    621     delete [] _set_read_unit_source_bypass_memory  ;
    622     delete [] _link_read_unit_with_load_store_unit;
    623     delete [] _link_read_unit_with_write_unit;
    624     delete [] _link_read_unit_with_thread;
    625     delete [] _is_load_store_unit;
    626     delete [] _translate_num_execute_unit;
    627     delete [] _nb_execute_unit_port;
     606    uint32_t _nb_thread = get_nb_thread(_nb_context,
     607                                        _nb_front_end,
     608                                        _nb_ooo_engine);
     609    uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit);
     610
     611    DELETE2(_link_read_unit_with_thread           ,_nb_read_unit,_nb_thread      );
     612    DELETE2(_link_read_unit_with_write_unit       ,_nb_read_unit,_nb_write_unit  );
     613    DELETE3(_link_read_unit_with_load_store_unit  ,_nb_read_unit,_nb_execute_unit,_max_nb_inst_memory);
     614
     615    DELETE1(_read_unit_nb_bypass_memory           ,_nb_read_unit);
     616    DELETE1(_read_unit_nb_bypass_write            ,_nb_read_unit);
     617    DELETE1(_read_unit_nb_register_write          ,_nb_read_unit);
     618
     619    DELETE1(_set_read_unit_source_bypass_memory   ,_nb_read_unit);
     620    DELETE1(_set_read_unit_source_bypass_write    ,_nb_read_unit);
     621    DELETE1(_set_read_unit_source_register_write  ,_nb_read_unit);
     622
     623    DELETE2(_read_unit_to_execution_unit_table_execute_type,_nb_execute_unit,_nb_type);
     624    DELETE1(_nb_execute_unit_port                          ,_nb_execute_unit);
     625
    628626    log_printf(FUNC,Execute_loop,FUNCTION,"End");
    629627  };
Note: See TracChangeset for help on using the changeset viewer.