Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters.cpp
r81 r88 19 19 #undef FUNCTION 20 20 #define FUNCTION "Register_unit_Glue::Parameters" 21 Parameters::Parameters (const uint32_t nb_ooo_engine , 22 const uint32_t size_general_data , 23 const uint32_t size_special_data , 24 const uint32_t nb_gpr_read , 25 const uint32_t nb_spr_read , 26 const uint32_t nb_gpr_write , 27 const uint32_t nb_spr_write , 28 const uint32_t * nb_inst_insert_rob , 29 const uint32_t * nb_inst_retire_rob ): 30 _nb_ooo_engine (nb_ooo_engine ), 31 _size_general_data (size_general_data), 32 _size_special_data (size_special_data), 33 _nb_gpr_read (nb_gpr_read ), 34 _nb_spr_read (nb_spr_read ), 35 _nb_gpr_write (nb_gpr_write ), 36 _nb_spr_write (nb_spr_write ), 37 _nb_inst_insert_rob (nb_inst_insert_rob), 38 _nb_inst_retire_rob (nb_inst_retire_rob), 39 _have_port_ooo_engine_id (nb_ooo_engine>1) 21 Parameters::Parameters (uint32_t nb_ooo_engine , 22 uint32_t size_general_data , 23 uint32_t size_special_data , 24 uint32_t nb_gpr_read , 25 uint32_t nb_spr_read , 26 uint32_t nb_gpr_write , 27 uint32_t nb_spr_write , 28 uint32_t * nb_inst_insert_rob , 29 uint32_t * nb_inst_retire_rob , 30 bool is_toplevel ) 40 31 { 41 32 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 33 34 _nb_ooo_engine = nb_ooo_engine ; 35 _nb_gpr_read = nb_gpr_read ; 36 _nb_spr_read = nb_spr_read ; 37 _nb_gpr_write = nb_gpr_write ; 38 _nb_spr_write = nb_spr_write ; 39 _nb_inst_insert_rob = nb_inst_insert_rob; 40 _nb_inst_retire_rob = nb_inst_retire_rob; 41 42 42 test(); 43 44 if (is_toplevel) 45 { 46 _size_ooo_engine_id = log2(nb_ooo_engine); 47 _size_general_data = size_general_data ; 48 _size_special_data = size_special_data ; 49 50 _have_port_ooo_engine_id = _size_ooo_engine_id > 0; 51 52 copy(); 53 } 54 43 55 log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); 44 56 }; 45 57 58 // #undef FUNCTION 59 // #define FUNCTION "Register_unit_Glue::Parameters (copy)" 60 // Parameters::Parameters (Parameters & param): 61 // _nb_ooo_engine (param._nb_ooo_engine ), 62 // _size_general_data (param._size_general_data), 63 // _size_special_data (param._size_special_data), 64 // _nb_gpr_read (param._nb_gpr_read ), 65 // _nb_spr_read (param._nb_spr_read ), 66 // _nb_gpr_write (param._nb_gpr_write ), 67 // _nb_spr_write (param._nb_spr_write ), 68 // _nb_inst_insert_rob (param._nb_inst_insert_rob), 69 // _nb_inst_retire_rob (param._nb_inst_retire_rob), 70 // _have_port_ooo_engine_id (param._have_port_ooo_engine_id) 71 // { 72 // log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 73 // test(); 74 // log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); 75 // }; 76 46 77 #undef FUNCTION 47 #define FUNCTION "Register_unit_Glue::Parameters (copy)" 48 Parameters::Parameters (Parameters & param): 49 _nb_ooo_engine (param._nb_ooo_engine ), 50 _size_general_data (param._size_general_data), 51 _size_special_data (param._size_special_data), 52 _nb_gpr_read (param._nb_gpr_read ), 53 _nb_spr_read (param._nb_spr_read ), 54 _nb_gpr_write (param._nb_gpr_write ), 55 _nb_spr_write (param._nb_spr_write ), 56 _nb_inst_insert_rob (param._nb_inst_insert_rob), 57 _nb_inst_retire_rob (param._nb_inst_retire_rob), 58 _have_port_ooo_engine_id (param._have_port_ooo_engine_id) 78 #define FUNCTION "Register_unit_Glue::~Parameters" 79 Parameters::~Parameters (void) 59 80 { 60 81 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 61 test();62 82 log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); 63 83 }; 64 84 65 85 #undef FUNCTION 66 #define FUNCTION "Register_unit_Glue:: ~Parameters"67 Parameters::~Parameters ()86 #define FUNCTION "Register_unit_Glue::copy" 87 void Parameters::copy (void) 68 88 { 69 89 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp
r81 r88 38 38 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Register_unit_Glue == true 41 log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 43 std::cout << *param << std::endl; 44 #endif 45 40 46 log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation"); 41 47 allocation (); 42 48 43 49 #ifdef STATISTICS 44 log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics"); 45 46 // Allocation of statistics 47 statistics_declaration(param_statistics); 50 if (usage_is_set(_usage,USE_STATISTICS)) 51 { 52 log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics"); 53 54 // Allocation of statistics 55 statistics_declaration(param_statistics); 56 } 48 57 #endif 49 58 50 59 #ifdef VHDL 51 // generate the vhdl 52 log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl"); 53 54 vhdl(); 60 if (usage_is_set(_usage,USE_VHDL)) 61 { 62 // generate the vhdl 63 log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl"); 64 65 vhdl(); 66 } 55 67 #endif 56 68 57 69 #ifdef SYSTEMC 70 if (usage_is_set(_usage,USE_SYSTEMC)) 71 { 58 72 // Constant 59 73 … … 473 487 #endif 474 488 475 log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire");476 477 SC_METHOD (genMealy_retire);478 dont_initialize ();479 // sensitive_neg << *(in_CLOCK);480 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)481 {482 uint32_t x=_param->_nb_inst_retire_rob [i];483 for (uint32_t j=0; j<x; j++)484 sensitive << *( in_RETIRE_ROB_VAL [i][j])485 << *( in_RETIRE_ROB_RD_OLD_USE [i][j])486 << *( in_RETIRE_ROB_RD_NEW_USE [i][j])487 << *( in_RETIRE_ROB_RE_OLD_USE [i][j])488 << *( in_RETIRE_ROB_RE_NEW_USE [i][j])489 << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])490 << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])491 << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])492 << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]);493 }494 #ifdef SYSTEMCASS_SPECIFIC495 // List dependency information496 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)497 {498 uint32_t x=_param->_nb_inst_retire_rob [i];499 for (uint32_t j=0; j<x; j++)500 {501 (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));502 (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));503 (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));504 (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));505 506 (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j]));507 (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j]));508 (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));509 (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));510 (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));511 512 (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j]));513 (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j]));514 (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));515 (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));516 (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));517 518 (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j]));519 (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j]));520 (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));521 (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));522 (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));523 524 (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j]));525 (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j]));526 (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));527 (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));528 (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));529 }530 }531 #endif532 489 // log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire"); 490 491 // SC_METHOD (genMealy_retire); 492 // dont_initialize (); 493 // // sensitive_neg << *(in_CLOCK); 494 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 495 // { 496 // uint32_t x=_param->_nb_inst_retire_rob [i]; 497 // for (uint32_t j=0; j<x; j++) 498 // sensitive << *( in_RETIRE_ROB_VAL [i][j]) 499 // << *( in_RETIRE_ROB_RD_OLD_USE [i][j]) 500 // << *( in_RETIRE_ROB_RD_NEW_USE [i][j]) 501 // << *( in_RETIRE_ROB_RE_OLD_USE [i][j]) 502 // << *( in_RETIRE_ROB_RE_NEW_USE [i][j]) 503 // << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]) 504 // << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]) 505 // << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]) 506 // << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]); 507 // } 508 // #ifdef SYSTEMCASS_SPECIFIC 509 // // List dependency information 510 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 511 // { 512 // uint32_t x=_param->_nb_inst_retire_rob [i]; 513 // for (uint32_t j=0; j<x; j++) 514 // { 515 // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); 516 // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); 517 // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); 518 // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); 519 520 // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); 521 // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j])); 522 // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); 523 // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); 524 // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); 525 526 // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); 527 // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j])); 528 // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); 529 // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); 530 // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); 531 532 // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); 533 // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j])); 534 // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); 535 // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); 536 // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); 537 538 // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); 539 // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j])); 540 // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); 541 // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); 542 // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); 543 // } 544 // } 545 // #endif 546 } 533 547 #endif 534 548 log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); … … 542 556 543 557 #ifdef STATISTICS 544 log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file"); 545 546 delete _stat; 558 if (usage_is_set(_usage,USE_STATISTICS)) 559 { 560 log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file"); 561 562 delete _stat; 563 } 547 564 #endif 548 565 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp
r82 r88 90 90 out_GPR_READ_ACK [j] = interface->set_signal_valack_out (ACK); 91 91 if (_param->_have_port_ooo_engine_id == true) 92 in_GPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", log2(_param->_nb_ooo_engine));92 in_GPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", _param->_size_ooo_engine_id); 93 93 out_GPR_READ_DATA [j] = interface->set_signal_out<Tgeneral_data_t> ("data" , _param->_size_general_data); 94 94 out_GPR_READ_DATA_VAL [j] = interface->set_signal_out<Tcontrol_t > ("data_val" , 1); … … 166 166 out_SPR_READ_ACK [j] = interface->set_signal_valack_out (ACK); 167 167 if (_param->_have_port_ooo_engine_id == true) 168 in_SPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", log2(_param->_nb_ooo_engine));168 in_SPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", _param->_size_ooo_engine_id); 169 169 out_SPR_READ_DATA [j] = interface->set_signal_out<Tspecial_data_t> ("data" , _param->_size_special_data); 170 170 out_SPR_READ_DATA_VAL [j] = interface->set_signal_out<Tcontrol_t > ("data_val" , 1); … … 236 236 out_GPR_WRITE_ACK [j] = interface->set_signal_valack_out (ACK); 237 237 if (_param->_have_port_ooo_engine_id == true) 238 in_GPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", log2(_param->_nb_ooo_engine));238 in_GPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", _param->_size_ooo_engine_id); 239 239 240 240 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) … … 302 302 out_SPR_WRITE_ACK [j] = interface->set_signal_valack_out (ACK); 303 303 if (_param->_have_port_ooo_engine_id == true) 304 in_SPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", log2(_param->_nb_ooo_engine));304 in_SPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", _param->_size_ooo_engine_id); 305 305 306 306 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) … … 400 400 } 401 401 402 // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~403 in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];404 out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];405 in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];406 in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];407 in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];408 in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];409 out_RETIRE_ROB_GPR_STATUS_OLD_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];410 out_RETIRE_ROB_GPR_STATUS_NEW_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];411 in_RETIRE_ROB_GPR_STATUS_OLD_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];412 in_RETIRE_ROB_GPR_STATUS_NEW_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];413 out_RETIRE_ROB_SPR_STATUS_OLD_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];414 out_RETIRE_ROB_SPR_STATUS_NEW_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];415 in_RETIRE_ROB_SPR_STATUS_OLD_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];416 in_RETIRE_ROB_SPR_STATUS_NEW_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];417 418 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)419 {420 uint32_t x=_param->_nb_inst_retire_rob [i];421 422 in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t) * [x];423 out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t) * [x];424 in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t) * [x];425 in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t) * [x];426 in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t) * [x];427 in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t) * [x];428 out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i] = new SC_OUT(Tcontrol_t) * [x];429 out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i] = new SC_OUT(Tcontrol_t) * [x];430 in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i] = new SC_IN (Tcontrol_t) * [x];431 in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i] = new SC_IN (Tcontrol_t) * [x];432 out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i] = new SC_OUT(Tcontrol_t) * [x];433 out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i] = new SC_OUT(Tcontrol_t) * [x];434 in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i] = new SC_IN (Tcontrol_t) * [x];435 in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i] = new SC_IN (Tcontrol_t) * [x];402 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 403 // in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 404 // out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine]; 405 // in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 406 // in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 407 // in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 408 // in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 409 // out_RETIRE_ROB_GPR_STATUS_OLD_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine]; 410 // out_RETIRE_ROB_GPR_STATUS_NEW_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine]; 411 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 412 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 413 // out_RETIRE_ROB_SPR_STATUS_OLD_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine]; 414 // out_RETIRE_ROB_SPR_STATUS_NEW_VAL = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine]; 415 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 416 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine]; 417 418 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 419 // { 420 // uint32_t x=_param->_nb_inst_retire_rob [i]; 421 422 // in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t) * [x]; 423 // out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t) * [x]; 424 // in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t) * [x]; 425 // in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t) * [x]; 426 // in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t) * [x]; 427 // in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t) * [x]; 428 // out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i] = new SC_OUT(Tcontrol_t) * [x]; 429 // out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i] = new SC_OUT(Tcontrol_t) * [x]; 430 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i] = new SC_IN (Tcontrol_t) * [x]; 431 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i] = new SC_IN (Tcontrol_t) * [x]; 432 // out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i] = new SC_OUT(Tcontrol_t) * [x]; 433 // out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i] = new SC_OUT(Tcontrol_t) * [x]; 434 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i] = new SC_IN (Tcontrol_t) * [x]; 435 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i] = new SC_IN (Tcontrol_t) * [x]; 436 436 437 for (uint32_t j=0; j<x; j++)438 {439 {440 Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j)441 #ifdef POSITION442 ,IN443 ,WEST444 ,"Interface to update status (retire)"445 #endif446 );447 448 in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL);449 out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out(ACK);450 in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_old_use", 1);451 in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_new_use", 1);452 in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("re_old_use", 1);453 in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("re_new_use", 1);454 }455 {456 Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_old_"+toString(i)+"_"+toString(j)457 #ifdef POSITION458 ,IN459 ,EAST460 ,"Interface to update status (retire)"461 #endif462 );463 464 out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL);465 in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK);466 }467 {468 Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_new_"+toString(i)+"_"+toString(j)469 #ifdef POSITION470 ,IN471 ,EAST472 ,"Interface to update status (retire)"473 #endif474 );475 476 out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL);477 in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK);478 }479 {480 Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_old_"+toString(i)+"_"+toString(j)481 #ifdef POSITION482 ,IN483 ,EAST484 ,"Interface to update status (retire)"485 #endif486 );487 488 out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL);489 in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK);490 }491 {492 Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_new_"+toString(i)+"_"+toString(j)493 #ifdef POSITION494 ,IN495 ,EAST496 ,"Interface to update status (retire)"497 #endif498 );499 500 out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL);501 in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK);502 }503 }504 }437 // for (uint32_t j=0; j<x; j++) 438 // { 439 // { 440 // Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) 441 // #ifdef POSITION 442 // ,IN 443 // ,WEST 444 // ,"Interface to update status (retire)" 445 // #endif 446 // ); 447 448 // in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); 449 // out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out(ACK); 450 // in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_old_use", 1); 451 // in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_new_use", 1); 452 // in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("re_old_use", 1); 453 // in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t> ("re_new_use", 1); 454 // } 455 // { 456 // Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_old_"+toString(i)+"_"+toString(j) 457 // #ifdef POSITION 458 // ,IN 459 // ,EAST 460 // ,"Interface to update status (retire)" 461 // #endif 462 // ); 463 464 // out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL); 465 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK); 466 // } 467 // { 468 // Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_new_"+toString(i)+"_"+toString(j) 469 // #ifdef POSITION 470 // ,IN 471 // ,EAST 472 // ,"Interface to update status (retire)" 473 // #endif 474 // ); 475 476 // out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL); 477 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK); 478 // } 479 // { 480 // Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_old_"+toString(i)+"_"+toString(j) 481 // #ifdef POSITION 482 // ,IN 483 // ,EAST 484 // ,"Interface to update status (retire)" 485 // #endif 486 // ); 487 488 // out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL); 489 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK); 490 // } 491 // { 492 // Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_new_"+toString(i)+"_"+toString(j) 493 // #ifdef POSITION 494 // ,IN 495 // ,EAST 496 // ,"Interface to update status (retire)" 497 // #endif 498 // ); 499 500 // out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL); 501 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK); 502 // } 503 // } 504 // } 505 505 506 506 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 507 507 508 508 #ifdef POSITION 509 _component->generate_file(); 509 if (usage_is_set(_usage,USE_POSITION)) 510 _component->generate_file(); 510 511 #endif 511 512 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_deallocation.cpp
r81 r88 23 23 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 24 24 25 if (usage_is_set(_usage,USE_VHDL)) 26 { 25 27 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) 26 28 delete in_CLOCK ; … … 95 97 delete [] in_INSERT_ROB_SPR_STATUS_ACK ; 96 98 97 // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~98 delete [] in_RETIRE_ROB_VAL ;99 delete [] out_RETIRE_ROB_ACK ;100 delete [] in_RETIRE_ROB_RD_OLD_USE ;101 delete [] in_RETIRE_ROB_RD_NEW_USE ;102 delete [] in_RETIRE_ROB_RE_OLD_USE ;103 delete [] in_RETIRE_ROB_RE_NEW_USE ;104 delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL ;105 delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL ;106 delete [] in_RETIRE_ROB_GPR_STATUS_OLD_ACK ;107 delete [] in_RETIRE_ROB_GPR_STATUS_NEW_ACK ;108 delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL ;109 delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL ;110 delete [] in_RETIRE_ROB_SPR_STATUS_OLD_ACK ;111 delete [] in_RETIRE_ROB_SPR_STATUS_NEW_ACK ;112 99 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 // delete [] in_RETIRE_ROB_VAL ; 101 // delete [] out_RETIRE_ROB_ACK ; 102 // delete [] in_RETIRE_ROB_RD_OLD_USE ; 103 // delete [] in_RETIRE_ROB_RD_NEW_USE ; 104 // delete [] in_RETIRE_ROB_RE_OLD_USE ; 105 // delete [] in_RETIRE_ROB_RE_NEW_USE ; 106 // delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL ; 107 // delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL ; 108 // delete [] in_RETIRE_ROB_GPR_STATUS_OLD_ACK ; 109 // delete [] in_RETIRE_ROB_GPR_STATUS_NEW_ACK ; 110 // delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL ; 111 // delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL ; 112 // delete [] in_RETIRE_ROB_SPR_STATUS_OLD_ACK ; 113 // delete [] in_RETIRE_ROB_SPR_STATUS_NEW_ACK ; 114 } 113 115 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 114 116 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_end_cycle.cpp
r81 r88 24 24 25 25 #ifdef STATISTICS 26 _stat->end_cycle(); 26 if (usage_is_set(_usage,USE_STATISTICS)) 27 _stat->end_cycle(); 27 28 #endif 28 29 … … 30 31 // Evaluation before read the ouput signal 31 32 // sc_start(0); 32 _interfaces->testbench(); 33 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 34 _interfaces->testbench(); 33 35 #endif 34 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_read.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_gpr_read (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 31 // PORT_WRITE(out_GPR_READ_ACK [j], 0); 32 // } 33 // else 28 34 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 31 Tcontrol_t status_ack = PORT_READ(in_GPR_READ_STATUS_ACK [ooo_engine_id][j]); 32 33 // multiplexor 34 PORT_WRITE(out_GPR_READ_ACK [j], registerfile_ack and status_ack); 35 PORT_WRITE(out_GPR_READ_DATA [j], PORT_READ(in_GPR_READ_REGISTERFILE_DATA[ooo_engine_id][j])); 36 PORT_WRITE(out_GPR_READ_DATA_VAL [j], PORT_READ(in_GPR_READ_STATUS_DATA_VAL [ooo_engine_id][j])); 35 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 36 { 37 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0; 38 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 39 Tcontrol_t status_ack = PORT_READ(in_GPR_READ_STATUS_ACK [ooo_engine_id][j]); 40 41 // multiplexor 42 PORT_WRITE(out_GPR_READ_ACK [j], registerfile_ack and status_ack); 43 PORT_WRITE(out_GPR_READ_DATA [j], PORT_READ(in_GPR_READ_REGISTERFILE_DATA[ooo_engine_id][j])); 44 PORT_WRITE(out_GPR_READ_DATA_VAL [j], PORT_READ(in_GPR_READ_STATUS_DATA_VAL [ooo_engine_id][j])); 45 } 37 46 } 38 47 39 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");48 log_end(Register_unit_Glue,FUNCTION); 40 49 }; 41 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_read_registerfile.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_gpr_read_registerfile (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_GPR_READ_REGISTERFILE_VAL [i][j],0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_GPR_READ_VAL [j]); 31 Tcontrol_t status_ack = PORT_READ(in_GPR_READ_STATUS_ACK [ooo_engine_id][j]); 32 33 Tcontrol_t registerfile_val = val and status_ack; 34 35 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 36 37 { 37 Tcontrol_t id = (i == ooo_engine_id)?1:0; 38 PORT_WRITE(out_GPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_GPR_READ_VAL [j]); 40 Tcontrol_t status_ack = PORT_READ(in_GPR_READ_STATUS_ACK [ooo_engine_id][j]); 41 42 Tcontrol_t registerfile_val = val and status_ack; 43 44 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 45 { 46 Tcontrol_t id = (i == ooo_engine_id)?1:0; 47 PORT_WRITE(out_GPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 48 } 39 49 } 40 50 } 41 51 42 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");52 log_end(Register_unit_Glue,FUNCTION); 43 53 }; 44 54 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_read_status.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_gpr_read_status (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_GPR_READ_STATUS_VAL [i][j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_GPR_READ_VAL [j]); 31 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 32 33 Tcontrol_t status_val = val and registerfile_ack; 34 35 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 36 37 { 37 Tcontrol_t id = (i == ooo_engine_id)?1:0; 38 PORT_WRITE(out_GPR_READ_STATUS_VAL [i][j], (id and status_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_GPR_READ_VAL [j]); 40 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 41 42 Tcontrol_t status_val = val and registerfile_ack; 43 44 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 45 { 46 Tcontrol_t id = (i == ooo_engine_id)?1:0; 47 PORT_WRITE(out_GPR_READ_STATUS_VAL [i][j], (id and status_val)); 48 } 39 49 } 40 50 } 41 51 42 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");52 log_end(Register_unit_Glue,FUNCTION); 43 53 }; 44 54 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_registerfile.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_gpr_write_registerfile (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_GPR_WRITE_REGISTERFILE_VAL [i][j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_GPR_WRITE_VAL [j]); 31 Tcontrol_t status_ack = PORT_READ(in_GPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 32 Tcontrol_t registerfile_val = val and status_ack; 33 34 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 35 37 { 36 Tcontrol_t id = (i == ooo_engine_id)?1:0; 37 PORT_WRITE(out_GPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_GPR_WRITE_VAL [j]); 40 Tcontrol_t status_ack = PORT_READ(in_GPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 41 Tcontrol_t registerfile_val = val and status_ack; 42 43 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 44 { 45 Tcontrol_t id = (i == ooo_engine_id)?1:0; 46 PORT_WRITE(out_GPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 47 } 38 48 } 39 49 } 40 50 41 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");51 log_end(Register_unit_Glue,FUNCTION); 42 52 }; 43 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_write.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_gpr_write (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 26 27 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 27 // if (not PORT_READ(in_NRESET)) 28 // { 29 // for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 30 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 31 // PORT_WRITE(out_GPR_WRITE_ACK [j], 0); 32 // } 33 // else 28 34 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 31 Tcontrol_t status_ack = PORT_READ(in_GPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 32 33 // multiplexor 34 PORT_WRITE(out_GPR_WRITE_ACK [j],registerfile_ack and status_ack); 35 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 36 { 37 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; 38 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 39 Tcontrol_t status_ack = PORT_READ(in_GPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 40 41 // multiplexor 42 PORT_WRITE(out_GPR_WRITE_ACK [j],registerfile_ack and status_ack); 43 } 35 44 } 36 37 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");45 46 log_end(Register_unit_Glue,FUNCTION); 38 47 }; 39 48 -
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
r81 r88 23 23 void Register_unit_Glue::genMealy_gpr_write_status (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_GPR_WRITE_STATUS_VAL [i][j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_GPR_WRITE_VAL [j]); 31 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 32 Tcontrol_t status_val = val and registerfile_ack; 33 34 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 35 37 { 36 Tcontrol_t id = (i == ooo_engine_id)?1:0; 37 PORT_WRITE(out_GPR_WRITE_STATUS_VAL [i][j], (id and status_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_GPR_WRITE_VAL [j]); 40 Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 41 Tcontrol_t status_val = val and registerfile_ack; 42 43 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 44 { 45 Tcontrol_t id = (i == ooo_engine_id)?1:0; 46 PORT_WRITE(out_GPR_WRITE_STATUS_VAL [i][j], (id and status_val)); 47 } 38 48 } 39 49 } 40 50 41 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");51 log_end(Register_unit_Glue,FUNCTION); 42 52 }; 43 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_insert (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 28 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 28 { 29 uint32_t x=_param->_nb_inst_insert_rob [i]; 29 for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) 30 { 31 Tcontrol_t val = PORT_READ(in_INSERT_ROB_VAL [i][j]); 32 Tcontrol_t gpr_use = PORT_READ(in_INSERT_ROB_RD_USE [i][j]); 33 Tcontrol_t spr_use = PORT_READ(in_INSERT_ROB_RE_USE [i][j]); 34 Tcontrol_t gpr_status_ack = PORT_READ(in_INSERT_ROB_GPR_STATUS_ACK [i][j]); 35 Tcontrol_t spr_status_ack = PORT_READ(in_INSERT_ROB_SPR_STATUS_ACK [i][j]); 36 37 Tcontrol_t ack = (gpr_status_ack and 38 spr_status_ack); 39 Tcontrol_t gpr_status_val = (val and 40 gpr_use and 41 spr_status_ack); 42 Tcontrol_t spr_status_val = (val and 43 spr_use and 44 gpr_status_ack); 30 45 31 for (uint32_t j=0; j<x; j++) 32 { 33 Tcontrol_t val = PORT_READ(in_INSERT_ROB_VAL [i][j]); 34 Tcontrol_t gpr_use = PORT_READ(in_INSERT_ROB_RD_USE [i][j]); 35 Tcontrol_t spr_use = PORT_READ(in_INSERT_ROB_RE_USE [i][j]); 36 Tcontrol_t gpr_ack = PORT_READ(in_INSERT_ROB_GPR_STATUS_ACK [i][j]); 37 Tcontrol_t spr_ack = PORT_READ(in_INSERT_ROB_SPR_STATUS_ACK [i][j]); 38 39 PORT_WRITE(out_INSERT_ROB_ACK [i][j], gpr_ack and spr_ack); 40 PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], val and gpr_use and spr_ack); 41 PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], val and spr_use and gpr_ack); 42 } 43 } 46 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_rob [%d][%d]",i,j); 47 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * val (r) : %d",val ); 48 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * ack (w) : %d",ack ); 49 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * gpr_use (rd) (r) : %d",gpr_use ); 50 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * gpr_status_val (w) : %d",gpr_status_val); 51 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * gpr_status_ack (r) : %d",gpr_status_ack); 52 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * spr_use (re) (r) : %d",spr_use ); 53 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * spr_status_val (w) : %d",spr_status_val); 54 log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * spr_status_ack (r) : %d",spr_status_ack); 44 55 45 log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); 56 PORT_WRITE(out_INSERT_ROB_ACK [i][j], ack ); 57 PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val); 58 PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val); 59 60 } 61 62 log_end(Register_unit_Glue,FUNCTION); 46 63 }; 47 64 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_retire.cpp
r81 r88 8 8 */ 9 9 10 /* 10 11 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h" 11 12 … … 23 24 void Register_unit_Glue::genMealy_retire (void) 24 25 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 26 log_begin(Register_unit_Glue,FUNCTION); 27 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 28 27 29 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) … … 57 59 } 58 60 59 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");61 log_end(Register_unit_Glue,FUNCTION); 60 62 }; 61 63 … … 68 70 }; // end namespace behavioural 69 71 }; // end namespace morpheo 72 */ 70 73 #endif 71 74 //#endif -
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
r81 r88 23 23 void Register_unit_Glue::genMealy_spr_read (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_spr_read; j++) 31 // PORT_WRITE(out_SPR_READ_ACK [j], 0); 32 // } 33 // else 28 34 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 31 Tcontrol_t status_ack = PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]); 32 33 // multiplexor 34 PORT_WRITE(out_SPR_READ_ACK [j], registerfile_ack and status_ack); 35 PORT_WRITE(out_SPR_READ_DATA [j], PORT_READ(in_SPR_READ_REGISTERFILE_DATA[ooo_engine_id][j])); 36 PORT_WRITE(out_SPR_READ_DATA_VAL [j], PORT_READ(in_SPR_READ_STATUS_DATA_VAL [ooo_engine_id][j])); 35 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 36 { 37 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; 38 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 39 Tcontrol_t status_ack = PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]); 40 41 // multiplexor 42 PORT_WRITE(out_SPR_READ_ACK [j], registerfile_ack and status_ack); 43 PORT_WRITE(out_SPR_READ_DATA [j], PORT_READ(in_SPR_READ_REGISTERFILE_DATA[ooo_engine_id][j])); 44 PORT_WRITE(out_SPR_READ_DATA_VAL [j], PORT_READ(in_SPR_READ_STATUS_DATA_VAL [ooo_engine_id][j])); 45 } 37 46 } 38 47 39 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");48 log_end(Register_unit_Glue,FUNCTION); 40 49 }; 41 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read_registerfile.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_spr_read_registerfile (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_spr_read; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j],0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_SPR_READ_VAL [j]); 31 Tcontrol_t status_ack = PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]); 32 33 Tcontrol_t registerfile_val = val and status_ack; 34 35 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 36 37 { 37 Tcontrol_t id = (i == ooo_engine_id)?1:0; 38 PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_SPR_READ_VAL [j]); 40 41 Tcontrol_t registerfile_val = val and PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]); 42 43 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 44 { 45 Tcontrol_t id = (i == ooo_engine_id)?1:0; 46 PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 47 } 39 48 } 40 49 } 41 50 42 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");51 log_end(Register_unit_Glue,FUNCTION); 43 52 }; 44 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read_status.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_spr_read_status (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_spr_read; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_SPR_READ_STATUS_VAL [i][j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_SPR_READ_VAL [j]); 31 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 32 33 Tcontrol_t status_val = val and registerfile_ack; 34 35 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 36 37 { 37 Tcontrol_t id = (i == ooo_engine_id)?1:0; 38 PORT_WRITE(out_SPR_READ_STATUS_VAL [i][j], (id and status_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_SPR_READ_VAL [j]); 40 41 Tcontrol_t status_val = val and PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]); 42 43 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 44 { 45 Tcontrol_t id = (i == ooo_engine_id)?1:0; 46 PORT_WRITE(out_SPR_READ_STATUS_VAL [i][j], (id and status_val)); 47 } 39 48 } 40 49 } 41 50 42 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");51 log_end(Register_unit_Glue,FUNCTION); 43 52 }; 44 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_registerfile.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_spr_write_registerfile (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_spr_write; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_SPR_WRITE_REGISTERFILE_VAL [i][j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_SPR_WRITE_VAL [j]); 31 Tcontrol_t status_ack = PORT_READ(in_SPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 32 Tcontrol_t registerfile_val = val and status_ack; 33 34 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 35 37 { 36 Tcontrol_t id = (i == ooo_engine_id)?1:0; 37 PORT_WRITE(out_SPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_SPR_WRITE_VAL [j]); 40 Tcontrol_t status_ack = PORT_READ(in_SPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 41 Tcontrol_t registerfile_val = val and status_ack; 42 43 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 44 { 45 Tcontrol_t id = (i == ooo_engine_id)?1:0; 46 PORT_WRITE(out_SPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val)); 47 } 38 48 } 39 49 } 40 50 41 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");51 log_end(Register_unit_Glue,FUNCTION); 42 52 }; 43 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_write.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_spr_write (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_spr_write; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_SPR_WRITE_ACK [j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 31 Tcontrol_t status_ack = PORT_READ(in_SPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 32 33 // multiplexor 34 PORT_WRITE(out_SPR_WRITE_ACK [j],registerfile_ack and status_ack); 36 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 37 { 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 40 Tcontrol_t status_ack = PORT_READ(in_SPR_WRITE_STATUS_ACK [ooo_engine_id][j]); 41 42 // multiplexor 43 PORT_WRITE(out_SPR_WRITE_ACK [j],registerfile_ack and status_ack); 44 } 35 45 } 36 46 37 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");47 log_end(Register_unit_Glue,FUNCTION); 38 48 }; 39 49 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_write_status.cpp
r81 r88 23 23 void Register_unit_Glue::genMealy_spr_write_status (void) 24 24 { 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 log_begin(Register_unit_Glue,FUNCTION); 26 log_function(Register_unit_Glue,FUNCTION,_name.c_str()); 26 27 27 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 28 // if (not PORT_READ(in_NRESET)) 29 // { 30 // for (uint32_t j=0; j<_param->_nb_spr_write; j++) 31 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 32 // PORT_WRITE(out_SPR_WRITE_STATUS_VAL [i][j], 0); 33 // } 34 // else 28 35 { 29 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0; 30 Tcontrol_t val = PORT_READ(in_SPR_WRITE_VAL [j]); 31 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 32 Tcontrol_t status_val = val and registerfile_ack; 33 34 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 36 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 35 37 { 36 Tcontrol_t id = (i == ooo_engine_id)?1:0; 37 PORT_WRITE(out_SPR_WRITE_STATUS_VAL [i][j], (id and status_val)); 38 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0; 39 Tcontrol_t val = PORT_READ(in_SPR_WRITE_VAL [j]); 40 Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]); 41 Tcontrol_t status_val = val and registerfile_ack; 42 43 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 44 { 45 Tcontrol_t id = (i == ooo_engine_id)?1:0; 46 PORT_WRITE(out_SPR_WRITE_STATUS_VAL [i][j], (id and status_val)); 47 } 38 48 } 39 49 } 40 50 41 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");51 log_end(Register_unit_Glue,FUNCTION); 42 52 }; 43 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_transition.cpp
r81 r88 22 22 void Register_unit_Glue::transition (void) 23 23 { 24 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");24 log_begin(Register_unit_Glue,FUNCTION); 25 25 26 26 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 28 28 #endif 29 29 30 log_ printf(FUNC,Register_unit_Glue,FUNCTION,"End");30 log_end(Register_unit_Glue,FUNCTION); 31 31 }; 32 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_vhdl_body.cpp
r81 r88 37 37 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 38 38 { 39 vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");39 vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 40 40 } 41 41 vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_0_"+toString(j)+"_ACK and in_GPR_READ_STATUS_0_"+toString(j)+"_ACK;"); … … 48 48 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 49 49 { 50 vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");50 vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 51 51 } 52 52 vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_0_"+toString(j)+"_DATA;"); … … 59 59 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 60 60 { 61 vhdl->set_body ("\tin_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");61 vhdl->set_body ("\tin_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 62 62 } 63 63 vhdl->set_body ("\tin_GPR_READ_STATUS_0_"+toString(j)+"_DATA_VAL;"); … … 71 71 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 72 72 { 73 vhdl->set_body ("out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");73 vhdl->set_body ("out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 74 74 } 75 75 } … … 80 80 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 81 81 { 82 vhdl->set_body ("out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");82 vhdl->set_body ("out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 83 83 } 84 84 } … … 102 102 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 103 103 { 104 vhdl->set_body ("\tin_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");104 vhdl->set_body ("\tin_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 105 105 } 106 106 vhdl->set_body ("\tin_GPR_WRITE_REGISTERFILE_0_"+toString(j)+"_ACK and in_GPR_WRITE_STATUS_0_"+toString(j)+"_ACK;"); … … 114 114 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 115 115 { 116 vhdl->set_body ("out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");116 vhdl->set_body ("out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 117 117 } 118 118 } … … 123 123 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 124 124 { 125 vhdl->set_body ("out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");125 vhdl->set_body ("out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 126 126 } 127 127 } … … 145 145 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 146 146 { 147 vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");147 vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 148 148 } 149 149 vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_0_"+toString(j)+"_ACK and in_SPR_READ_STATUS_0_"+toString(j)+"_ACK;"); … … 156 156 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 157 157 { 158 vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");158 vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 159 159 } 160 160 vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_0_"+toString(j)+"_DATA;"); … … 167 167 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 168 168 { 169 vhdl->set_body ("\tin_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");169 vhdl->set_body ("\tin_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 170 170 } 171 171 vhdl->set_body ("\tin_SPR_READ_STATUS_0_"+toString(j)+"_DATA_VAL;"); … … 179 179 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 180 180 { 181 vhdl->set_body ("out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");181 vhdl->set_body ("out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 182 182 } 183 183 } … … 188 188 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 189 189 { 190 vhdl->set_body ("out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");190 vhdl->set_body ("out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 191 191 } 192 192 } … … 210 210 for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--) 211 211 { 212 vhdl->set_body ("\tin_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else");212 vhdl->set_body ("\tin_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else"); 213 213 } 214 214 vhdl->set_body ("\tin_SPR_WRITE_REGISTERFILE_0_"+toString(j)+"_ACK and in_SPR_WRITE_STATUS_0_"+toString(j)+"_ACK;"); … … 222 222 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 223 223 { 224 vhdl->set_body ("out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");224 vhdl->set_body ("out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 225 225 } 226 226 } … … 231 231 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 232 232 { 233 vhdl->set_body ("out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv( log2(_param->_nb_ooo_engine),i)+" else '0';");233 vhdl->set_body ("out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';"); 234 234 } 235 235 }
Note: See TracChangeset
for help on using the changeset viewer.