Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.