Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
r82 r88 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h" 9 9 10 namespace morpheo 10 namespace morpheo { 11 11 namespace behavioural { 12 12 namespace core { … … 14 14 namespace execute_loop { 15 15 namespace register_unit { 16 17 18 16 19 17 #undef FUNCTION … … 40 38 _interfaces = entity->set_interfaces(); 41 39 42 // ~~~~~[ 40 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 41 44 42 Interface * interface = _interfaces->set_interface("" … … 53 51 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 54 52 55 // ~~~~~[ 53 // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 54 in_GPR_READ_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_gpr_read]; 57 55 out_GPR_READ_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_gpr_read]; … … 75 73 out_GPR_READ_ACK [i]= interface->set_signal_valack_out (ACK); 76 74 if (_param->_have_port_ooo_engine_id == true) 77 in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));75 in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , _param->_size_ooo_engine_id); 78 76 in_GPR_READ_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , _param->_size_gpr_address); 79 77 out_GPR_READ_DATA [i]= interface->set_signal_out<Tgeneral_data_t > ("data" , _param->_size_general_data); … … 81 79 } 82 80 83 // ~~~~~[ 81 // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 84 82 in_GPR_WRITE_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_gpr_write]; 85 83 out_GPR_WRITE_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_gpr_write]; … … 102 100 out_GPR_WRITE_ACK [i]= interface->set_signal_valack_out (ACK); 103 101 if (_param->_have_port_ooo_engine_id == true) 104 in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));102 in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , _param->_size_ooo_engine_id); 105 103 in_GPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , _param->_size_gpr_address); 106 104 in_GPR_WRITE_DATA [i]= interface->set_signal_in <Tgeneral_data_t > ("data" , _param->_size_general_data); 107 105 } 108 106 109 // ~~~~~[ 107 // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 110 108 in_SPR_READ_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_spr_read]; 111 109 out_SPR_READ_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_spr_read]; … … 129 127 out_SPR_READ_ACK [i]= interface->set_signal_valack_out (ACK); 130 128 if (_param->_have_port_ooo_engine_id == true) 131 in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));129 in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , _param->_size_ooo_engine_id); 132 130 in_SPR_READ_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , _param->_size_spr_address); 133 131 out_SPR_READ_DATA [i]= interface->set_signal_out<Tspecial_data_t > ("data" , _param->_size_special_data); … … 135 133 } 136 134 137 // ~~~~~[ 135 // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 138 136 in_SPR_WRITE_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_spr_write]; 139 137 out_SPR_WRITE_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_spr_write]; … … 156 154 out_SPR_WRITE_ACK [i]= interface->set_signal_valack_out (ACK); 157 155 if (_param->_have_port_ooo_engine_id == true) 158 in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));156 in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , _param->_size_ooo_engine_id); 159 157 in_SPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , _param->_size_spr_address); 160 158 in_SPR_WRITE_DATA [i]= interface->set_signal_in <Tspecial_data_t > ("data" , _param->_size_special_data); 161 159 } 162 160 163 // ~~~~~[ 161 // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 164 162 in_INSERT_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 165 163 out_INSERT_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; … … 201 199 } 202 200 203 // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 204 in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 205 out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; 206 in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 207 in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; 208 in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 209 in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; 210 in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 211 in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; 212 in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 213 in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; 214 215 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 216 { 217 uint32_t x=_param->_nb_inst_retire_rob [i]; 218 219 in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; 220 out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; 221 in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 222 in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; 223 in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 224 in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; 225 in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 226 in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; 227 in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 228 in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; 229 230 for (uint32_t j=0; j<x; j++) 231 { 232 Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) 233 #ifdef POSITION 234 ,IN 235 ,WEST 236 ,"Interface to update status (retire)" 237 #endif 238 ); 239 240 241 in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); 242 out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); 243 in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); 244 in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); 245 in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); 246 in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); 247 in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); 248 in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); 249 in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); 250 in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); 251 } 252 } 253 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 201 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 202 // in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 203 // out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; 204 // in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 205 // in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; 206 // in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 207 // in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; 208 // in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 209 // in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; 210 // in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; 211 // in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; 212 213 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 214 // { 215 // uint32_t x=_param->_nb_inst_retire_rob [i]; 216 217 // in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; 218 // out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; 219 // in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 220 // in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; 221 // in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 222 // in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; 223 // in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 224 // in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; 225 // in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; 226 // in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; 227 228 // for (uint32_t j=0; j<x; j++) 229 // { 230 // Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) 231 // #ifdef POSITION 232 // ,IN 233 // ,WEST 234 // ,"Interface to update status (retire)" 235 // #endif 236 // ); 237 238 239 // in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); 240 // out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); 241 // in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); 242 // in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); 243 // in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); 244 // in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); 245 // in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); 246 // in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); 247 // in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); 248 // in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); 249 // } 250 // } 251 252 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 254 253 255 254 std::string name; … … 263 262 { 264 263 name = _name+"_gpr_"+toString(i); 264 log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); 265 265 266 266 component_gpr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile … … 284 284 285 285 name = _name+"_gpr_status_"+toString(i); 286 log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); 286 287 287 288 component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile … … 305 306 306 307 name = _name+"_spr_"+toString(i); 308 log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); 307 309 308 310 component_spr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile … … 325 327 326 328 name = _name+"_spr_status_"+toString(i); 329 log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); 327 330 328 331 component_spr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile … … 347 350 348 351 name = _name+"_glue"; 352 log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); 349 353 350 354 component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue … … 373 377 name_component = _name+"_gpr_"+toString(i); 374 378 375 std::cout << "Instance : " << name_component << std::endl;379 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 376 380 377 381 #ifdef POSITION … … 430 434 name_component = _name+"_gpr_status_"+toString(i); 431 435 432 std::cout << "Instance : " << name_component << std::endl;436 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 433 437 434 438 #ifdef POSITION … … 516 520 } 517 521 518 for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)519 {520 _component->port_map(name_component,521 "in_WRITE_"+toString(x)+"_VAL" ,522 _name+"_glue",523 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");524 _component->port_map(name_component,525 "out_WRITE_"+toString(x)+"_ACK",526 _name+"_glue",527 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );528 529 _component->port_map(name_component,530 "in_WRITE_"+toString(x)+"_DATA" ,531 _name+"_glue",532 "out_CONST_0");533 _component->port_map(_name+"_glue",534 "out_CONST_0",535 name_component,536 "in_WRITE_"+toString(x)+"_DATA" );537 538 _component->port_map(name_component,539 "in_WRITE_"+toString(x++)+"_ADDRESS",540 _name,541 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");522 // for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++) 523 // { 524 // _component->port_map(name_component, 525 // "in_WRITE_"+toString(x)+"_VAL" , 526 // _name+"_glue", 527 // "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL"); 528 // _component->port_map(name_component, 529 // "out_WRITE_"+toString(x)+"_ACK", 530 // _name+"_glue", 531 // "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" ); 532 533 // _component->port_map(name_component, 534 // "in_WRITE_"+toString(x)+"_DATA" , 535 // _name+"_glue", 536 // "out_CONST_0"); 537 // _component->port_map(_name+"_glue", 538 // "out_CONST_0", 539 // name_component, 540 // "in_WRITE_"+toString(x)+"_DATA" ); 541 542 // _component->port_map(name_component, 543 // "in_WRITE_"+toString(x++)+"_ADDRESS", 544 // _name, 545 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG"); 542 546 543 _component->port_map(name_component,544 "in_WRITE_"+toString(x)+"_VAL" ,545 _name+"_glue",546 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");547 _component->port_map(name_component,548 "out_WRITE_"+toString(x)+"_ACK",549 _name+"_glue",550 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );551 552 _component->port_map(name_component,553 "in_WRITE_"+toString(x)+"_DATA" ,554 _name+"_glue",555 "out_CONST_1"556 );557 _component->port_map(_name+"_glue",558 "out_CONST_1",559 name_component,560 "in_WRITE_"+toString(x)+"_DATA"561 );562 563 _component->port_map(name_component,564 "in_WRITE_"+toString(x++)+"_ADDRESS",565 _name,566 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");567 }547 // _component->port_map(name_component, 548 // "in_WRITE_"+toString(x)+"_VAL" , 549 // _name+"_glue", 550 // "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL"); 551 // _component->port_map(name_component, 552 // "out_WRITE_"+toString(x)+"_ACK", 553 // _name+"_glue", 554 // "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" ); 555 556 // _component->port_map(name_component, 557 // "in_WRITE_"+toString(x)+"_DATA" , 558 // _name+"_glue", 559 // "out_CONST_1" 560 // ); 561 // _component->port_map(_name+"_glue", 562 // "out_CONST_1", 563 // name_component, 564 // "in_WRITE_"+toString(x)+"_DATA" 565 // ); 566 567 // _component->port_map(name_component, 568 // "in_WRITE_"+toString(x++)+"_ADDRESS", 569 // _name, 570 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG"); 571 // } 568 572 569 573 } … … 574 578 name_component = _name+"_spr_"+toString(i); 575 579 576 std::cout << "Instance : " << name_component << std::endl;580 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 577 581 578 582 #ifdef POSITION … … 631 635 name_component = _name+"_spr_status_"+toString(i); 632 636 633 std::cout << "Instance : " << name_component << std::endl;634 637 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 638 635 639 #ifdef POSITION 636 640 _component->interface_map (name_component,"", … … 717 721 } 718 722 719 for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)720 {721 _component->port_map(name_component,722 "in_WRITE_"+toString(x)+"_VAL" ,723 _name+"_glue",724 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");725 _component->port_map(name_component,726 "out_WRITE_"+toString(x)+"_ACK",727 _name+"_glue",728 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );729 730 _component->port_map(name_component,731 "in_WRITE_"+toString(x)+"_DATA" ,732 _name+"_glue",733 "out_CONST_0");734 _component->port_map(_name+"_glue",735 "out_CONST_0",736 name_component,737 "in_WRITE_"+toString(x)+"_DATA"738 );739 740 _component->port_map(name_component,741 "in_WRITE_"+toString(x++)+"_ADDRESS",742 _name,743 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");723 // for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++) 724 // { 725 // _component->port_map(name_component, 726 // "in_WRITE_"+toString(x)+"_VAL" , 727 // _name+"_glue", 728 // "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL"); 729 // _component->port_map(name_component, 730 // "out_WRITE_"+toString(x)+"_ACK", 731 // _name+"_glue", 732 // "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" ); 733 734 // _component->port_map(name_component, 735 // "in_WRITE_"+toString(x)+"_DATA" , 736 // _name+"_glue", 737 // "out_CONST_0"); 738 // _component->port_map(_name+"_glue", 739 // "out_CONST_0", 740 // name_component, 741 // "in_WRITE_"+toString(x)+"_DATA" 742 // ); 743 744 // _component->port_map(name_component, 745 // "in_WRITE_"+toString(x++)+"_ADDRESS", 746 // _name, 747 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG"); 744 748 745 _component->port_map(name_component,746 "in_WRITE_"+toString(x)+"_VAL" ,747 _name+"_glue",748 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");749 _component->port_map(name_component,750 "out_WRITE_"+toString(x)+"_ACK",751 _name+"_glue",752 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );753 754 _component->port_map(name_component,755 "in_WRITE_"+toString(x)+"_DATA" ,756 _name+"_glue",757 "out_CONST_1"758 );759 _component->port_map(_name+"_glue",760 "out_CONST_1",761 name_component,762 "in_WRITE_"+toString(x)+"_DATA"763 );764 765 _component->port_map(name_component,766 "in_WRITE_"+toString(x++)+"_ADDRESS",767 _name,768 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");769 }749 // _component->port_map(name_component, 750 // "in_WRITE_"+toString(x)+"_VAL" , 751 // _name+"_glue", 752 // "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL"); 753 // _component->port_map(name_component, 754 // "out_WRITE_"+toString(x)+"_ACK", 755 // _name+"_glue", 756 // "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" ); 757 758 // _component->port_map(name_component, 759 // "in_WRITE_"+toString(x)+"_DATA" , 760 // _name+"_glue", 761 // "out_CONST_1" 762 // ); 763 // _component->port_map(_name+"_glue", 764 // "out_CONST_1", 765 // name_component, 766 // "in_WRITE_"+toString(x)+"_DATA" 767 // ); 768 769 // _component->port_map(name_component, 770 // "in_WRITE_"+toString(x++)+"_ADDRESS", 771 // _name, 772 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG"); 773 // } 770 774 771 775 } … … 775 779 name_component = _name+"_glue"; 776 780 777 std::cout << "Instance : " << name_component << std::endl;778 781 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 782 779 783 #ifdef POSITION 780 784 _component->interface_map (name_component,"", … … 1010 1014 } 1011 1015 1012 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)1013 {1014 uint32_t x =_param->_nb_inst_retire_rob [i];1015 uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i];1016 uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i];1017 1018 for (uint32_t j=0; j<x; j++)1019 {1020 _component->port_map(name_component,1021 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL",1022 _name,1023 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL");1024 _component->port_map(name_component,1025 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK",1026 _name,1027 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK");1028 _component->port_map(name_component,1029 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE",1030 _name,1031 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE");1032 _component->port_map(name_component,1033 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE",1034 _name,1035 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE");1036 _component->port_map(name_component,1037 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE",1038 _name,1039 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE");1040 _component->port_map(name_component,1041 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE",1042 _name,1043 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE");1016 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 1017 // { 1018 // uint32_t x =_param->_nb_inst_retire_rob [i]; 1019 // uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i]; 1020 // uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i]; 1021 1022 // for (uint32_t j=0; j<x; j++) 1023 // { 1024 // _component->port_map(name_component, 1025 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL", 1026 // _name, 1027 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); 1028 // _component->port_map(name_component, 1029 // "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK", 1030 // _name, 1031 // "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); 1032 // _component->port_map(name_component, 1033 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE", 1034 // _name, 1035 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE"); 1036 // _component->port_map(name_component, 1037 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE", 1038 // _name, 1039 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE"); 1040 // _component->port_map(name_component, 1041 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE", 1042 // _name, 1043 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE"); 1044 // _component->port_map(name_component, 1045 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE", 1046 // _name, 1047 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE"); 1044 1048 1045 _component->port_map(name_component,1046 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",1047 _name+"_gpr_status_"+toString(i),1048 "in_WRITE_"+toString(gpr_j)+"_VAL");1049 _component->port_map(name_component,1050 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",1051 _name+"_gpr_status_"+toString(i),1052 "out_WRITE_"+toString(gpr_j++)+"_ACK");1053 _component->port_map(name_component,1054 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",1055 _name+"_gpr_status_"+toString(i),1056 "in_WRITE_"+toString(gpr_j)+"_VAL");1057 _component->port_map(name_component,1058 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",1059 _name+"_gpr_status_"+toString(i),1060 "out_WRITE_"+toString(gpr_j++)+"_ACK");1061 _component->port_map(name_component,1062 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",1063 _name+"_spr_status_"+toString(i),1064 "in_WRITE_"+toString(spr_j)+"_VAL");1065 _component->port_map(name_component,1066 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",1067 _name+"_spr_status_"+toString(i),1068 "out_WRITE_"+toString(spr_j++)+"_ACK");1069 _component->port_map(name_component,1070 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",1071 _name+"_spr_status_"+toString(i),1072 "in_WRITE_"+toString(spr_j)+"_VAL");1073 _component->port_map(name_component,1074 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",1075 _name+"_spr_status_"+toString(i),1076 "out_WRITE_"+toString(spr_j++)+"_ACK");1077 }1078 }1049 // _component->port_map(name_component, 1050 // "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL", 1051 // _name+"_gpr_status_"+toString(i), 1052 // "in_WRITE_"+toString(gpr_j)+"_VAL"); 1053 // _component->port_map(name_component, 1054 // "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK", 1055 // _name+"_gpr_status_"+toString(i), 1056 // "out_WRITE_"+toString(gpr_j++)+"_ACK"); 1057 // _component->port_map(name_component, 1058 // "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL", 1059 // _name+"_gpr_status_"+toString(i), 1060 // "in_WRITE_"+toString(gpr_j)+"_VAL"); 1061 // _component->port_map(name_component, 1062 // "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK", 1063 // _name+"_gpr_status_"+toString(i), 1064 // "out_WRITE_"+toString(gpr_j++)+"_ACK"); 1065 // _component->port_map(name_component, 1066 // "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL", 1067 // _name+"_spr_status_"+toString(i), 1068 // "in_WRITE_"+toString(spr_j)+"_VAL"); 1069 // _component->port_map(name_component, 1070 // "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK", 1071 // _name+"_spr_status_"+toString(i), 1072 // "out_WRITE_"+toString(spr_j++)+"_ACK"); 1073 // _component->port_map(name_component, 1074 // "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL", 1075 // _name+"_spr_status_"+toString(i), 1076 // "in_WRITE_"+toString(spr_j)+"_VAL"); 1077 // _component->port_map(name_component, 1078 // "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK", 1079 // _name+"_spr_status_"+toString(i), 1080 // "out_WRITE_"+toString(spr_j++)+"_ACK"); 1081 // } 1082 // } 1079 1083 }// glue 1080 1084 1081 // _component->test_map (); 1082 1083 #ifdef POSITION 1084 _component->generate_file(); 1085 #if DEBUG_Register_unit == true 1086 _component->test_map (); 1087 #endif 1088 1089 #ifdef POSITION 1090 if (usage_is_set(_usage,USE_POSITION)) 1091 _component->generate_file(); 1085 1092 #endif 1086 1093
Note: See TracChangeset
for help on using the changeset viewer.