Changeset 112 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src
- Timestamp:
- Mar 18, 2009, 11:36:26 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/main.cpp
r88 r112 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 810 #define NB_PARAMS 7 11 11 12 12 void usage (int argc, char * argv[]) … … 22 22 err (_(" * nb_reg_free (uint32_t)\n")); 23 23 err (_(" * nb_bank (uint32_t)\n")); 24 err (_(" * size_counter (uint32_t)\n"));25 24 26 25 exit (1); … … 55 54 uint32_t _nb_reg_free = atoi(argv[x++]); 56 55 uint32_t _nb_bank = atoi(argv[x++]); 57 uint32_t _size_counter = atoi(argv[x++]);58 56 59 57 try … … 68 66 _nb_reg_free , 69 67 _nb_bank , 70 _size_counter ,71 68 true //is_toplevel 72 69 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp
r88 r112 75 75 ALLOC1_SC_SIGNAL( in_RETIRE_VAL ," in_RETIRE_VAL ",Tcontrol_t ,_param->_nb_inst_retire); 76 76 ALLOC1_SC_SIGNAL(out_RETIRE_ACK ,"out_RETIRE_ACK ",Tcontrol_t ,_param->_nb_inst_retire); 77 ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE ," in_RETIRE_RESTORE ",Tcontrol_t ,_param->_nb_inst_retire); 77 78 ALLOC1_SC_SIGNAL( in_RETIRE_READ_RA ," in_RETIRE_READ_RA ",Tcontrol_t ,_param->_nb_inst_retire); 78 79 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RA_PHY ," in_RETIRE_NUM_REG_RA_PHY ",Tgeneral_address_t,_param->_nb_inst_retire); … … 121 122 INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_VAL ,_param->_nb_inst_retire); 122 123 INSTANCE1_SC_SIGNAL(_Stat_List_unit,out_RETIRE_ACK ,_param->_nb_inst_retire); 124 INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE ,_param->_nb_inst_retire); 123 125 INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_READ_RA ,_param->_nb_inst_retire); 124 126 INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RA_PHY ,_param->_nb_inst_retire); … … 234 236 TEST(bool, true,((gpr_status[reg]._is_free == 0) and 235 237 (gpr_status[reg]._is_link == 0) and 236 (gpr_status[reg]._is_valid == 1) and 237 (gpr_status[reg]._counter == 0))); 238 (gpr_status[reg]._is_valid == 1)// and 239 // (gpr_status[reg]._counter == 0) 240 )); 238 241 239 242 gpr_status[reg]._is_free = 1; … … 254 257 TEST(bool, true,((spr_status[reg]._is_free == 0) and 255 258 (spr_status[reg]._is_link == 0) and 256 (spr_status[reg]._is_valid == 1) and 257 (spr_status[reg]._counter == 0))); 259 (spr_status[reg]._is_valid == 1)// and 260 // (spr_status[reg]._counter == 0) 261 )); 258 262 259 263 spr_status[reg]._is_free = 1; … … 301 305 Tspecial_address_t re = (it_spr != free_list_spr.end())?*it_spr:0; 302 306 303 Tcontrol_t read_ra = (gpr_status_insert[ra]._is_link) and (gpr_status_insert[ra]._counter < _param->_max_reader);304 Tcontrol_t read_rb = (gpr_status_insert[rb]._is_link) and (gpr_status_insert[rb]._counter < _param->_max_reader);305 Tcontrol_t read_rc = (spr_status_insert[rc]._is_link) and (spr_status_insert[rc]._counter < _param->_max_reader);307 Tcontrol_t read_ra = (gpr_status_insert[ra]._is_link); // and (gpr_status_insert[ra]._counter < _param->_max_reader); 308 Tcontrol_t read_rb = (gpr_status_insert[rb]._is_link); // and (gpr_status_insert[rb]._counter < _param->_max_reader); 309 Tcontrol_t read_rc = (spr_status_insert[rc]._is_link); // and (spr_status_insert[rc]._counter < _param->_max_reader); 306 310 Tcontrol_t write_rd = (it_gpr != free_list_gpr.end()); 307 311 Tcontrol_t write_re = (it_spr != free_list_spr.end()); … … 341 345 Tspecial_address_t re_new = (rand()%(_param->_nb_special_register )) ; 342 346 343 Tcontrol_t read_ra = (gpr_status_retire[ra]._is_link) and (gpr_status_retire[ra]._counter > 0);344 Tcontrol_t read_rb = (gpr_status_retire[rb]._is_link) and (gpr_status_retire[rb]._counter > 0);345 Tcontrol_t read_rc = (spr_status_retire[rc]._is_link) and (spr_status_retire[rc]._counter > 0);347 Tcontrol_t read_ra = (gpr_status_retire[ra]._is_link); // and (gpr_status_retire[ra]._counter > 0); 348 Tcontrol_t read_rb = (gpr_status_retire[rb]._is_link); // and (gpr_status_retire[rb]._counter > 0); 349 Tcontrol_t read_rc = (spr_status_retire[rc]._is_link); // and (spr_status_retire[rc]._counter > 0); 346 350 Tcontrol_t write_rd = ( (gpr_status_retire[rd_old]._is_link ) and 347 351 (gpr_status_retire[rd_old]._is_valid) and … … 355 359 in_RETIRE_VAL [i]->write((rand()%100) < percent_transaction_retire); 356 360 in_RETIRE_READ_RA [i]->write(read_ra ); 357 in_RETIRE_NUM_REG_RA_PHY [i]->write(ra); 361 in_RETIRE_RESTORE [i]->write(0); 362 in_RETIRE_NUM_REG_RA_PHY [i]->write(ra); 358 363 in_RETIRE_READ_RB [i]->write(read_rb ); 359 364 in_RETIRE_NUM_REG_RB_PHY [i]->write(rb); … … 502 507 if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read()) 503 508 { 509 Tcontrol_t restore = in_RETIRE_RESTORE [i]->read(); 504 510 Tcontrol_t read_ra = in_RETIRE_READ_RA [i]->read(); 505 511 Tgeneral_address_t ra = in_RETIRE_NUM_REG_RA_PHY [i]->read(); … … 518 524 519 525 LABEL("RETIRE [%d] - Accepted",i); 526 LABEL(" * restore : %d",restore); 520 527 LABEL(" * read_ra : %d",read_ra ); 521 528 LABEL(" * reg_ra : %d",ra ); … … 575 582 if (write_rd) 576 583 { 577 if (restore _rd_old)584 if (restore) 578 585 { 579 gpr_status[rd_old]._is_link = 1; 580 gpr_status[rd_new]._is_link = 0; 581 gpr_status[rd_new]._is_valid = 1; 586 if (restore_rd_old) 587 { 588 gpr_status[rd_old]._is_link = 1; 589 gpr_status[rd_new]._is_link = 0; 590 gpr_status[rd_new]._is_valid = 1; 591 } 592 else 593 { 594 gpr_status[rd_old]._is_link = 0; 595 gpr_status[rd_new]._is_link = 0; 596 gpr_status[rd_new]._is_valid = 1; 597 } 582 598 } 583 599 else … … 586 602 gpr_status[rd_new]._is_valid = 1; 587 603 } 604 588 605 } 589 606 if (write_re) … … 619 636 TEST(bool, true,((gpr_status[reg]._is_free == 0) and 620 637 (gpr_status[reg]._is_link == 0) and 621 (gpr_status[reg]._is_valid == 1) and 622 (gpr_status[reg]._counter == 0))); 638 (gpr_status[reg]._is_valid == 1)// and 639 // (gpr_status[reg]._counter == 0) 640 )); 623 641 624 642 gpr_status[reg]._is_free = 1; … … 639 657 TEST(bool, true,((spr_status[reg]._is_free == 0) and 640 658 (spr_status[reg]._is_link == 0) and 641 (spr_status[reg]._is_valid == 1) and 642 (spr_status[reg]._counter == 0))); 659 (spr_status[reg]._is_valid == 1)// and 660 // (spr_status[reg]._counter == 0) 661 )); 643 662 644 663 spr_status[reg]._is_free = 1; … … 678 697 delete [] in_RETIRE_VAL ; 679 698 delete [] out_RETIRE_ACK ; 699 delete [] in_RETIRE_RESTORE ; 680 700 delete [] in_RETIRE_READ_RA ; 681 701 delete [] in_RETIRE_NUM_REG_RA_PHY ;
Note: See TracChangeset
for help on using the changeset viewer.