Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue
- 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
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/Makefile
r81 r88 24 24 library_clean : Register_unit_Glue_library_clean 25 25 26 local_clean : 27 26 28 include ../Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/include/test.h
r81 r88 15 15 #include <sys/time.h> 16 16 17 #include "Common/include/Time.h" 17 18 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h" 18 19 … … 29 30 void test (string name, 30 31 morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters * param); 31 32 class Time33 {34 private : timeval time_begin;35 // private : timeval time_end;36 37 public : Time ()38 {39 gettimeofday(&time_begin ,NULL);40 };41 42 public : ~Time ()43 {44 cout << *this;45 };46 47 public : friend ostream& operator<< (ostream& output_stream,48 const Time & x)49 {50 timeval time_end;51 52 gettimeofday(&time_end ,NULL);53 54 uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());55 56 double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);57 58 output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;59 60 return output_stream;61 }62 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/main.cpp
r81 r88 74 74 _nb_spr_write , 75 75 _nb_inst_insert_rob, 76 _nb_inst_retire_rob); 76 _nb_inst_retire_rob, 77 true //is_toplevel 78 ); 77 79 78 80 cout << param->print(1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp
r82 r88 22 22 #endif 23 23 24 Tusage_t _usage = USE_ALL; 25 26 // _usage = usage_unset(_usage,USE_SYSTEMC ); 27 // _usage = usage_unset(_usage,USE_VHDL ); 28 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 29 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 30 // _usage = usage_unset(_usage,USE_POSITION ); 31 _usage = usage_unset(_usage,USE_STATISTICS ); 32 // _usage = usage_unset(_usage,USE_INFORMATION ); 33 24 34 Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue 25 35 (name.c_str(), … … 28 38 #endif 29 39 _param, 30 USE_ALL);40 _usage); 31 41 32 42 #ifdef SYSTEMC … … 88 98 sc_signal<Tcontrol_t > *** in_INSERT_ROB_SPR_STATUS_ACK ; 89 99 90 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_VAL ;91 sc_signal<Tcontrol_t > *** out_RETIRE_ROB_ACK ;92 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RD_OLD_USE ;93 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RD_NEW_USE ;94 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RE_OLD_USE ;95 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RE_NEW_USE ;96 sc_signal<Tcontrol_t > *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL ;97 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_GPR_STATUS_NEW_ACK ;98 sc_signal<Tcontrol_t > *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL ;99 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_GPR_STATUS_OLD_ACK ;100 sc_signal<Tcontrol_t > *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL ;101 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_SPR_STATUS_NEW_ACK ;102 sc_signal<Tcontrol_t > *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL ;103 sc_signal<Tcontrol_t > *** in_RETIRE_ROB_SPR_STATUS_OLD_ACK ;100 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_VAL ; 101 // sc_signal<Tcontrol_t > *** out_RETIRE_ROB_ACK ; 102 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RD_OLD_USE ; 103 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RD_NEW_USE ; 104 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RE_OLD_USE ; 105 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RE_NEW_USE ; 106 // sc_signal<Tcontrol_t > *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL ; 107 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_GPR_STATUS_NEW_ACK ; 108 // sc_signal<Tcontrol_t > *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL ; 109 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_GPR_STATUS_OLD_ACK ; 110 // sc_signal<Tcontrol_t > *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL ; 111 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_SPR_STATUS_NEW_ACK ; 112 // sc_signal<Tcontrol_t > *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL ; 113 // sc_signal<Tcontrol_t > *** in_RETIRE_ROB_SPR_STATUS_OLD_ACK ; 104 114 105 115 string rename; … … 294 304 } 295 305 296 // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~297 in_RETIRE_ROB_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];298 out_RETIRE_ROB_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];299 in_RETIRE_ROB_RD_OLD_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];300 in_RETIRE_ROB_RD_NEW_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];301 in_RETIRE_ROB_RE_OLD_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];302 in_RETIRE_ROB_RE_NEW_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];303 out_RETIRE_ROB_GPR_STATUS_OLD_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];304 out_RETIRE_ROB_GPR_STATUS_NEW_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];305 in_RETIRE_ROB_GPR_STATUS_OLD_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];306 in_RETIRE_ROB_GPR_STATUS_NEW_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];307 out_RETIRE_ROB_SPR_STATUS_OLD_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];308 out_RETIRE_ROB_SPR_STATUS_NEW_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];309 in_RETIRE_ROB_SPR_STATUS_OLD_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];310 in_RETIRE_ROB_SPR_STATUS_NEW_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];311 312 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)313 {314 uint32_t x=_param->_nb_inst_retire_rob [i];315 316 in_RETIRE_ROB_VAL [i] = new sc_signal<Tcontrol_t> * [x];317 out_RETIRE_ROB_ACK [i] = new sc_signal<Tcontrol_t> * [x];318 in_RETIRE_ROB_RD_OLD_USE [i] = new sc_signal<Tcontrol_t> * [x];319 in_RETIRE_ROB_RD_NEW_USE [i] = new sc_signal<Tcontrol_t> * [x];320 in_RETIRE_ROB_RE_OLD_USE [i] = new sc_signal<Tcontrol_t> * [x];321 in_RETIRE_ROB_RE_NEW_USE [i] = new sc_signal<Tcontrol_t> * [x];322 out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i] = new sc_signal<Tcontrol_t> * [x];323 out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i] = new sc_signal<Tcontrol_t> * [x];324 in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i] = new sc_signal<Tcontrol_t> * [x];325 in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i] = new sc_signal<Tcontrol_t> * [x];326 out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i] = new sc_signal<Tcontrol_t> * [x];327 out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i] = new sc_signal<Tcontrol_t> * [x];328 in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i] = new sc_signal<Tcontrol_t> * [x];329 in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i] = new sc_signal<Tcontrol_t> * [x];306 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 // in_RETIRE_ROB_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 308 // out_RETIRE_ROB_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 309 // in_RETIRE_ROB_RD_OLD_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 310 // in_RETIRE_ROB_RD_NEW_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 311 // in_RETIRE_ROB_RE_OLD_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 312 // in_RETIRE_ROB_RE_NEW_USE = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 313 // out_RETIRE_ROB_GPR_STATUS_OLD_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 314 // out_RETIRE_ROB_GPR_STATUS_NEW_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 315 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 316 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 317 // out_RETIRE_ROB_SPR_STATUS_OLD_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 318 // out_RETIRE_ROB_SPR_STATUS_NEW_VAL = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 319 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 320 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine]; 321 322 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 323 // { 324 // uint32_t x=_param->_nb_inst_retire_rob [i]; 325 326 // in_RETIRE_ROB_VAL [i] = new sc_signal<Tcontrol_t> * [x]; 327 // out_RETIRE_ROB_ACK [i] = new sc_signal<Tcontrol_t> * [x]; 328 // in_RETIRE_ROB_RD_OLD_USE [i] = new sc_signal<Tcontrol_t> * [x]; 329 // in_RETIRE_ROB_RD_NEW_USE [i] = new sc_signal<Tcontrol_t> * [x]; 330 // in_RETIRE_ROB_RE_OLD_USE [i] = new sc_signal<Tcontrol_t> * [x]; 331 // in_RETIRE_ROB_RE_NEW_USE [i] = new sc_signal<Tcontrol_t> * [x]; 332 // out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i] = new sc_signal<Tcontrol_t> * [x]; 333 // out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i] = new sc_signal<Tcontrol_t> * [x]; 334 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i] = new sc_signal<Tcontrol_t> * [x]; 335 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i] = new sc_signal<Tcontrol_t> * [x]; 336 // out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i] = new sc_signal<Tcontrol_t> * [x]; 337 // out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i] = new sc_signal<Tcontrol_t> * [x]; 338 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i] = new sc_signal<Tcontrol_t> * [x]; 339 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i] = new sc_signal<Tcontrol_t> * [x]; 330 340 331 for (uint32_t j=0; j<x; j++)332 {333 in_RETIRE_ROB_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());334 out_RETIRE_ROB_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());335 in_RETIRE_ROB_RD_OLD_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());336 in_RETIRE_ROB_RD_NEW_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());337 in_RETIRE_ROB_RE_OLD_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());338 in_RETIRE_ROB_RE_NEW_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());339 out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());340 in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());341 out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());342 in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());343 out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());344 in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());345 out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());346 in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());347 }348 }341 // for (uint32_t j=0; j<x; j++) 342 // { 343 // in_RETIRE_ROB_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 344 // out_RETIRE_ROB_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 345 // in_RETIRE_ROB_RD_OLD_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 346 // in_RETIRE_ROB_RD_NEW_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 347 // in_RETIRE_ROB_RE_OLD_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 348 // in_RETIRE_ROB_RE_NEW_USE [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 349 // out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 350 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 351 // out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 352 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 353 // out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 354 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 355 // out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 356 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j] = new sc_signal<Tcontrol_t> (rename.c_str()); 357 // } 358 // } 349 359 350 360 … … 451 461 } 452 462 453 // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~454 455 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)456 {457 uint32_t x=_param->_nb_inst_retire_rob [i];458 459 for (uint32_t j=0; j<x; j++)460 {461 (*(_Register_unit_Glue-> in_RETIRE_ROB_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j]));462 (*(_Register_unit_Glue->out_RETIRE_ROB_ACK [i][j]))(*(out_RETIRE_ROB_ACK [i][j]));463 (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_OLD_USE [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j]));464 (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_NEW_USE [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j]));465 (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_OLD_USE [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j]));466 (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_NEW_USE [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j]));467 (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]));468 (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));469 (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]));470 (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));471 (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]));472 (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));473 (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]));474 (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));475 }476 }463 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 464 465 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 466 // { 467 // uint32_t x=_param->_nb_inst_retire_rob [i]; 468 469 // for (uint32_t j=0; j<x; j++) 470 // { 471 // (*(_Register_unit_Glue-> in_RETIRE_ROB_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); 472 // (*(_Register_unit_Glue->out_RETIRE_ROB_ACK [i][j]))(*(out_RETIRE_ROB_ACK [i][j])); 473 // (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_OLD_USE [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j])); 474 // (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_NEW_USE [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j])); 475 // (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_OLD_USE [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j])); 476 // (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_NEW_USE [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j])); 477 // (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j])); 478 // (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); 479 // (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j])); 480 // (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); 481 // (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j])); 482 // (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); 483 // (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j])); 484 // (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); 485 // } 486 // } 477 487 478 488 cout << "<" << name << "> Start Simulation ............" << endl; … … 487 497 const bool test_write = true; 488 498 const bool test_insert = true; 489 const bool test_retire = true;499 // const bool test_retire = true; 490 500 491 501 const int32_t percent_transaction = 75; … … 517 527 Tcontrol_t spr_write_status_val [_param->_nb_ooo_engine][_param->_nb_spr_write]; 518 528 519 uint32_t max_nb_inst_retire_rob = 0;520 521 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)522 if (_param->_nb_inst_retire_rob [i] > max_nb_inst_retire_rob)523 max_nb_inst_retire_rob = _param->_nb_inst_retire_rob [i];524 525 Tcontrol_t retire_rob_ack [_param->_nb_ooo_engine][max_nb_inst_retire_rob];526 Tcontrol_t retire_rob_gpr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];527 Tcontrol_t retire_rob_gpr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];528 Tcontrol_t retire_rob_spr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];529 Tcontrol_t retire_rob_spr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];529 // uint32_t max_nb_inst_retire_rob = 0; 530 531 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 532 // if (_param->_nb_inst_retire_rob [i] > max_nb_inst_retire_rob) 533 // max_nb_inst_retire_rob = _param->_nb_inst_retire_rob [i]; 534 535 // Tcontrol_t retire_rob_ack [_param->_nb_ooo_engine][max_nb_inst_retire_rob]; 536 // Tcontrol_t retire_rob_gpr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob]; 537 // Tcontrol_t retire_rob_gpr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob]; 538 // Tcontrol_t retire_rob_spr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob]; 539 // Tcontrol_t retire_rob_spr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob]; 530 540 531 541 uint32_t max_nb_inst_insert_rob = 0; … … 706 716 } 707 717 708 if (test_retire == true)709 {710 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)711 {712 uint32_t x = _param->_nb_inst_retire_rob [i];713 714 for (uint32_t j=0; j<x; j++)715 {716 Tcontrol_t val = (rand()%100)<=percent_transaction;717 Tcontrol_t rd_old_use = (rand()%100)<=percent_transaction;718 Tcontrol_t rd_new_use = (rand()%100)<=percent_transaction;719 Tcontrol_t re_old_use = (rand()%100)<=percent_transaction;720 Tcontrol_t re_new_use = (rand()%100)<=percent_transaction;721 Tcontrol_t gpr_status_old_ack = (rand()%100)<=percent_transaction;722 Tcontrol_t gpr_status_new_ack = (rand()%100)<=percent_transaction;723 Tcontrol_t spr_status_old_ack = (rand()%100)<=percent_transaction;724 Tcontrol_t spr_status_new_ack = (rand()%100)<=percent_transaction;725 726 in_RETIRE_ROB_VAL [i][j]->write(val );727 in_RETIRE_ROB_RD_OLD_USE [i][j]->write(rd_old_use );728 in_RETIRE_ROB_RD_NEW_USE [i][j]->write(rd_new_use );729 in_RETIRE_ROB_RE_OLD_USE [i][j]->write(re_old_use );730 in_RETIRE_ROB_RE_NEW_USE [i][j]->write(re_new_use );731 in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]->write(gpr_status_old_ack);732 in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]->write(gpr_status_new_ack);733 in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]->write(spr_status_old_ack);734 in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]->write(spr_status_new_ack);718 // if (test_retire == true) 719 // { 720 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 721 // { 722 // uint32_t x = _param->_nb_inst_retire_rob [i]; 723 724 // for (uint32_t j=0; j<x; j++) 725 // { 726 // Tcontrol_t val = (rand()%100)<=percent_transaction; 727 // Tcontrol_t rd_old_use = (rand()%100)<=percent_transaction; 728 // Tcontrol_t rd_new_use = (rand()%100)<=percent_transaction; 729 // Tcontrol_t re_old_use = (rand()%100)<=percent_transaction; 730 // Tcontrol_t re_new_use = (rand()%100)<=percent_transaction; 731 // Tcontrol_t gpr_status_old_ack = (rand()%100)<=percent_transaction; 732 // Tcontrol_t gpr_status_new_ack = (rand()%100)<=percent_transaction; 733 // Tcontrol_t spr_status_old_ack = (rand()%100)<=percent_transaction; 734 // Tcontrol_t spr_status_new_ack = (rand()%100)<=percent_transaction; 735 736 // in_RETIRE_ROB_VAL [i][j]->write(val ); 737 // in_RETIRE_ROB_RD_OLD_USE [i][j]->write(rd_old_use ); 738 // in_RETIRE_ROB_RD_NEW_USE [i][j]->write(rd_new_use ); 739 // in_RETIRE_ROB_RE_OLD_USE [i][j]->write(re_old_use ); 740 // in_RETIRE_ROB_RE_NEW_USE [i][j]->write(re_new_use ); 741 // in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]->write(gpr_status_old_ack); 742 // in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]->write(gpr_status_new_ack); 743 // in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]->write(spr_status_old_ack); 744 // in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]->write(spr_status_new_ack); 735 745 736 retire_rob_ack [i][j] = (gpr_status_new_ack and737 gpr_status_old_ack and738 spr_status_new_ack and739 spr_status_old_ack);740 741 742 retire_rob_gpr_status_old_val [i][j] = val and rd_old_use and gpr_status_new_ack and spr_status_old_ack and spr_status_new_ack;743 retire_rob_gpr_status_new_val [i][j] = val and rd_new_use and gpr_status_old_ack and spr_status_old_ack and spr_status_new_ack;744 retire_rob_spr_status_old_val [i][j] = val and re_old_use and gpr_status_old_ack and gpr_status_new_ack and spr_status_new_ack;745 retire_rob_spr_status_new_val [i][j] = val and re_new_use and gpr_status_old_ack and gpr_status_new_ack and spr_status_old_ack ;746 }747 }748 }746 // retire_rob_ack [i][j] = (gpr_status_new_ack and 747 // gpr_status_old_ack and 748 // spr_status_new_ack and 749 // spr_status_old_ack); 750 751 752 // retire_rob_gpr_status_old_val [i][j] = val and rd_old_use and gpr_status_new_ack and spr_status_old_ack and spr_status_new_ack; 753 // retire_rob_gpr_status_new_val [i][j] = val and rd_new_use and gpr_status_old_ack and spr_status_old_ack and spr_status_new_ack; 754 // retire_rob_spr_status_old_val [i][j] = val and re_old_use and gpr_status_old_ack and gpr_status_new_ack and spr_status_new_ack; 755 // retire_rob_spr_status_new_val [i][j] = val and re_new_use and gpr_status_old_ack and gpr_status_new_ack and spr_status_old_ack ; 756 // } 757 // } 758 // } 749 759 750 760 if (test_insert == true) … … 837 847 838 848 839 if (test_retire == true)840 {841 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)842 {843 uint32_t x = _param->_nb_inst_retire_rob [i];844 845 for (uint32_t j=0; j<x; j++)846 {847 TEST(Tcontrol_t, out_RETIRE_ROB_ACK [i][j]->read(), retire_rob_ack [i][j]);848 TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_gpr_status_old_val [i][j]);849 TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_gpr_status_new_val [i][j]);850 TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_spr_status_old_val [i][j]);851 TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_spr_status_new_val [i][j]);852 }853 }854 }849 // if (test_retire == true) 850 // { 851 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 852 // { 853 // uint32_t x = _param->_nb_inst_retire_rob [i]; 854 855 // for (uint32_t j=0; j<x; j++) 856 // { 857 // TEST(Tcontrol_t, out_RETIRE_ROB_ACK [i][j]->read(), retire_rob_ack [i][j]); 858 // TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_gpr_status_old_val [i][j]); 859 // TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_gpr_status_new_val [i][j]); 860 // TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_spr_status_old_val [i][j]); 861 // TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_spr_status_new_val [i][j]); 862 // } 863 // } 864 // } 855 865 856 866 if (test_insert == true) … … 927 937 delete [] out_INSERT_ROB_SPR_STATUS_VAL ; 928 938 delete [] in_INSERT_ROB_SPR_STATUS_ACK ; 929 delete [] in_RETIRE_ROB_VAL ;930 delete [] out_RETIRE_ROB_ACK ;931 delete [] in_RETIRE_ROB_RD_OLD_USE ;932 delete [] in_RETIRE_ROB_RD_NEW_USE ;933 delete [] in_RETIRE_ROB_RE_OLD_USE ;934 delete [] in_RETIRE_ROB_RE_NEW_USE ;935 delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL ;936 delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL ;937 delete [] in_RETIRE_ROB_GPR_STATUS_OLD_ACK ;938 delete [] in_RETIRE_ROB_GPR_STATUS_NEW_ACK ;939 delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL ;940 delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL ;941 delete [] in_RETIRE_ROB_SPR_STATUS_OLD_ACK ;942 delete [] in_RETIRE_ROB_SPR_STATUS_NEW_ACK ;939 // delete [] in_RETIRE_ROB_VAL ; 940 // delete [] out_RETIRE_ROB_ACK ; 941 // delete [] in_RETIRE_ROB_RD_OLD_USE ; 942 // delete [] in_RETIRE_ROB_RD_NEW_USE ; 943 // delete [] in_RETIRE_ROB_RE_OLD_USE ; 944 // delete [] in_RETIRE_ROB_RE_NEW_USE ; 945 // delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL ; 946 // delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL ; 947 // delete [] in_RETIRE_ROB_GPR_STATUS_OLD_ACK ; 948 // delete [] in_RETIRE_ROB_GPR_STATUS_NEW_ACK ; 949 // delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL ; 950 // delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL ; 951 // delete [] in_RETIRE_ROB_SPR_STATUS_OLD_ACK ; 952 // delete [] in_RETIRE_ROB_SPR_STATUS_NEW_ACK ; 943 953 944 954 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h
r81 r88 22 22 23 23 24 25 24 26 class Parameters : public morpheo::behavioural::Parameters 25 27 { 26 28 //-----[ fields ]------------------------------------------------------------ 27 public : constuint32_t _nb_ooo_engine ;28 public : constuint32_t _size_general_data ;29 public : constuint32_t _size_special_data ;30 public : constuint32_t _nb_gpr_read ;31 public : constuint32_t _nb_spr_read ;32 public : constuint32_t _nb_gpr_write ;33 public : constuint32_t _nb_spr_write ;34 public : constuint32_t * _nb_inst_insert_rob ;35 public : constuint32_t * _nb_inst_retire_rob ;29 public : uint32_t _nb_ooo_engine ; 30 //public : uint32_t _size_general_data ; 31 //public : uint32_t _size_special_data ; 32 public : uint32_t _nb_gpr_read ; 33 public : uint32_t _nb_spr_read ; 34 public : uint32_t _nb_gpr_write ; 35 public : uint32_t _nb_spr_write ; 36 public : uint32_t * _nb_inst_insert_rob ; 37 public : uint32_t * _nb_inst_retire_rob ; 36 38 37 public : constbool _have_port_ooo_engine_id;39 //public : bool _have_port_ooo_engine_id; 38 40 39 41 //-----[ methods ]----------------------------------------------------------- 40 public : Parameters (const uint32_t nb_ooo_engine , 41 const uint32_t size_general_data , 42 const uint32_t size_special_data , 43 const uint32_t nb_gpr_read , 44 const uint32_t nb_spr_read , 45 const uint32_t nb_gpr_write , 46 const uint32_t nb_spr_write , 47 const uint32_t * nb_inst_insert_rob , 48 const uint32_t * nb_inst_retire_rob ); 49 public : Parameters (Parameters & param) ; 42 public : Parameters (uint32_t nb_ooo_engine , 43 uint32_t size_general_data , 44 uint32_t size_special_data , 45 uint32_t nb_gpr_read , 46 uint32_t nb_spr_read , 47 uint32_t nb_gpr_write , 48 uint32_t nb_spr_write , 49 uint32_t * nb_inst_insert_rob , 50 uint32_t * nb_inst_retire_rob , 51 bool is_toplevel=false); 52 //public : Parameters (Parameters & param) ; 50 53 public : ~Parameters () ; 51 54 55 public : void copy (void); 56 52 57 public : Parameters_test msg_error (void); 53 58 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h
r82 r88 128 128 public : SC_IN (Tcontrol_t ) *** in_INSERT_ROB_SPR_STATUS_ACK ; 129 129 130 // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~131 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_VAL ;132 public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_ACK ;133 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RD_OLD_USE ;134 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RD_NEW_USE ;135 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RE_OLD_USE ;136 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RE_NEW_USE ;137 138 public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL ;139 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_GPR_STATUS_NEW_ACK ;140 public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL ;141 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_GPR_STATUS_OLD_ACK ;142 143 public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL ;144 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_SPR_STATUS_NEW_ACK ;145 public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL ;146 public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_SPR_STATUS_OLD_ACK ;130 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 131 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_VAL ; 132 // public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_ACK ; 133 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RD_OLD_USE ; 134 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RD_NEW_USE ; 135 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RE_OLD_USE ; 136 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_RE_NEW_USE ; 137 138 // public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL ; 139 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_GPR_STATUS_NEW_ACK ; 140 // public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL ; 141 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_GPR_STATUS_OLD_ACK ; 142 143 // public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL ; 144 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_SPR_STATUS_NEW_ACK ; 145 // public : SC_OUT(Tcontrol_t ) *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL ; 146 // public : SC_IN (Tcontrol_t ) *** in_RETIRE_ROB_SPR_STATUS_OLD_ACK ; 147 147 148 148 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
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.