Changeset 117 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Types.h
- Timestamp:
- May 16, 2009, 4:42: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/Stat_List_unit/include/Types.h
r112 r117 23 23 class stat_list_entry_t 24 24 { 25 public : bool _is_free ; // set = is present in free list 26 public : bool _is_link ; // set = is present in rat 27 //public : bool _is_valid; // set = an instruction have write in this register 28 //public : uint32_t _counter ; // number of register that must read this register 25 public : bool _is_free ; // set = is present in free list 26 public : bool _is_link ; // set = is present in rat 27 public : bool _is_use ; // set = is present in ROB (used by an instruction as destination) 28 // not necesseray in single thread mode : because an thread can't rename when they have an event 29 // in multi thread, the renaming continue and an old register can be reused 29 30 30 31 public : stat_list_entry_t (void) {}; … … 35 36 _is_free = 0; 36 37 _is_link = is_link; 37 // _is_valid = 1; 38 // _counter = 0; 38 _is_use = is_link; 39 39 } 40 40 41 // public : void insert_read (void) 42 // { 43 // _counter ++; 44 // } 41 public : void insert_write_old (void) 42 { 43 // old is not in the rat, but is already used (if miss prediction or event) 44 _is_link = 0; 45 } 45 46 46 public : void insert_write (void)47 public : void insert_write_new (void) 47 48 { 48 49 _is_free = 0; 49 50 _is_link = 1; 50 // _is_valid = 0;51 _is_use = 1; 51 52 } 52 53 // public : void retire_read (void)54 // {55 // _counter --;56 // }57 53 58 54 public : void retire_write_old (bool restore, bool restore_old) … … 62 58 // 1 0 0 - event and previous update 63 59 // 1 1 1 - event and first update 64 65 _is_link = restore and restore_old; 60 61 if (restore and restore_old) 62 { 63 _is_link = 1; 64 // _is_use = 1; // already set 65 } 66 else 67 { 68 // _is_link = 0; // already unset 69 _is_use = 0; 70 } 71 66 72 } 67 73 … … 73 79 74 80 if (restore) 75 _is_link = 0; 81 { 82 // test if is the actual mapping (in RAT) 83 if (_is_link) 84 _is_use = 0; 76 85 77 // in all case78 // _is_valid = 1; 86 _is_link = 0; 87 } 79 88 } 80 89 … … 84 93 } 85 94 86 // public : bool can_insert_read (uint32_t max_reader)87 // {88 // return ((_counter+1) < max_reader);89 // }90 91 95 public : bool can_free (void) 92 96 { 93 97 return ((_is_free == 0) and 94 (_is_link == 0) // and 95 // (_is_valid == 1) and // if is_link <- 0, then retire_write_old or reset 96 // (_counter == 0) 97 ); 98 (_is_link == 0) and 99 (_is_use == 0)); 98 100 } 99 101 … … 102 104 { 103 105 output << x._is_free << " " 104 << x._is_link // << " " 105 // << x._is_valid << " " 106 // << x._counter 107 ; 106 << x._is_link << " " 107 << x._is_use ; 108 108 109 109 return output;
Note: See TracChangeset
for help on using the changeset viewer.