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/Register_unit
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.