Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp
r82 r88 24 24 #endif 25 25 26 Tusage_t _usage = USE_ALL; 27 28 // _usage = usage_unset(_usage,USE_SYSTEMC ); 29 // _usage = usage_unset(_usage,USE_VHDL ); 30 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 31 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 32 // _usage = usage_unset(_usage,USE_POSITION ); 33 // _usage = usage_unset(_usage,USE_STATISTICS ); 34 // _usage = usage_unset(_usage,USE_INFORMATION ); 35 26 36 Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit 27 37 (name.c_str(), … … 30 40 #endif 31 41 _param, 32 USE_ALL);42 _usage); 33 43 34 44 #ifdef SYSTEMC … … 78 88 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire); 79 89 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire); 90 ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t ,_param->_nb_inst_retire); 91 ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t ,_param->_nb_inst_retire); 80 92 81 93 /******************************************************** … … 131 143 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire); 132 144 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire); 145 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire); 146 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire); 133 147 134 148 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 226 240 } 227 241 242 uint32_t retire_max = _param->_nb_inst_retire; 228 243 for (uint32_t i=0; i<_param->_nb_inst_retire; i++) 229 244 { 230 Tcontrol_t val = (rand()%100)<percent_transaction_retire; 245 // in order ........... 246 247 Tcontrol_t val = (i<retire_max) and ((rand()%100)<percent_transaction_retire); 231 248 249 if (not val) 250 retire_max = i; 251 232 252 Tcontext_t front_end_id = rand() % _param->_nb_front_end; 233 253 … … 259 279 } 260 280 } 281 282 for (uint32_t i=0; i<_param->_nb_inst_retire; i++) 283 { 284 TEST(Tcontrol_t,out_RETIRE_RESTORE_RD_PHY_OLD[i]->read(), 0); 285 TEST(Tcontrol_t,out_RETIRE_RESTORE_RE_PHY_OLD[i]->read(), 0); 286 } 287 261 288 for (uint32_t i=0; i<_param->_nb_inst_insert; i++) 262 289 { … … 320 347 SC_START(1); 321 348 349 // EVENT !!!!!!!! 350 322 351 nb_request = 32; 323 352 while (nb_request > 1) … … 347 376 } 348 377 378 uint32_t retire_max = _param->_nb_inst_retire; 349 379 for (uint32_t i=0; i<_param->_nb_inst_retire; i++) 350 380 { 351 Tcontrol_t val = (rand()%100)<percent_transaction_retire; 381 // in order ........... 382 383 Tcontrol_t val = (i<retire_max) and ((rand()%100)<percent_transaction_retire); 384 385 if (not val) 386 retire_max = i; 387 352 388 in_RETIRE_VAL [i]->write(val); 353 389 in_RETIRE_FRONT_END_ID [i]->write(retire_front_end_id [i]); … … 362 398 } 363 399 364 SC_START( 1);400 SC_START(0); 365 401 366 402 … … 380 416 for (uint32_t i=0; i<_param->_nb_inst_retire; i++) 381 417 { 418 LABEL("RETIRE[%d]",i); 419 382 420 Tcontext_t front_end_id = in_RETIRE_FRONT_END_ID [i]->read(); 383 421 Tcontext_t context_id = in_RETIRE_CONTEXT_ID [i]->read(); 422 423 LABEL(" * front_end_id : %d",front_end_id); 424 LABEL(" * context_id : %d",context_id ); 425 384 426 if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read()) 385 427 { 386 428 if (in_RETIRE_WRITE_RD [i]->read() == 1) 387 429 { 430 // LABEL(" * transaction and write rd"); 431 // LABEL(" * rd_log : %d",in_RETIRE_NUM_REG_RD_LOG[i]->read()); 432 // LABEL(" * rat_gpr_updt : %d",rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()]); 433 TEST(Tcontrol_t,out_RETIRE_RESTORE_RD_PHY_OLD[i]->read(), (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false)); 434 388 435 if (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false) 389 436 rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_OLD[i]->read(); … … 392 439 if (in_RETIRE_WRITE_RE [i]->read() == 1) 393 440 { 441 TEST(Tcontrol_t,out_RETIRE_RESTORE_RE_PHY_OLD[i]->read(), (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false)); 442 394 443 if (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false) 395 444 rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_OLD[i]->read(); … … 398 447 } 399 448 } 449 450 SC_START(1); 451 400 452 for (uint32_t i=0; i<_param->_nb_inst_insert; i++) 401 453 { … … 412 464 TEST(Tspecial_address_t,out_RENAME_NUM_REG_RE_PHY_OLD[i]->read(), rat_spr[front_end_id][context_id][in_RENAME_NUM_REG_RE_LOG[i]->read()]); 413 465 } 414 415 } 466 } 467 416 468 } 417 469 } … … 472 524 delete [] in_RETIRE_NUM_REG_RD_PHY_OLD; 473 525 delete [] in_RETIRE_NUM_REG_RE_PHY_OLD; 526 delete [] out_RETIRE_RESTORE_RD_PHY_OLD; 527 delete [] out_RETIRE_RESTORE_RE_PHY_OLD; 474 528 475 529 #endif
Note: See TracChangeset
for help on using the changeset viewer.