Changeset 112 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:
- Mar 18, 2009, 11:36:26 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
r88 r112 25 25 public : bool _is_free ; // set = is present in free list 26 26 public : bool _is_link ; // set = is present in rat 27 28 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 29 29 30 30 public : stat_list_entry_t (void) {}; … … 35 35 _is_free = 0; 36 36 _is_link = is_link; 37 38 37 // _is_valid = 1; 38 // _counter = 0; 39 39 } 40 40 41 public : void insert_read (void) 42 { 43 _counter ++; 44 } 41 // public : void insert_read (void) 42 // { 43 // _counter ++; 44 // } 45 45 46 public : void insert_write (void) 46 47 { 47 48 _is_free = 0; 48 49 _is_link = 1; 49 50 // _is_valid = 0; 50 51 } 51 52 52 public : void retire_read (void) 53 // public : void retire_read (void) 54 // { 55 // _counter --; 56 // } 57 58 public : void retire_write_old (bool restore, bool restore_old) 53 59 { 54 _counter --; 60 // restore restore_old is_link 61 // 0 x 0 - normal case : unallocate 62 // 1 0 0 - event and previous update 63 // 1 1 1 - event and first update 64 65 _is_link = restore and restore_old; 55 66 } 56 67 57 public : void retire_write_ old (bool restore_old)68 public : void retire_write_new (bool restore, bool restore_old) 58 69 { 59 if (not restore_old) 60 { 61 _is_link = 0; 62 } 63 // else nothing 64 } 70 // restore restore_old is_link 71 // 0 x 1 - normal case : allocate 72 // 1 x 0 - event, need restore oldest register 65 73 66 public : void retire_write_new (bool restore_old) 67 { 68 if (restore_old) 69 { 70 _is_link = 0; 71 } 74 if (restore) 75 _is_link = 0; 72 76 73 77 // in all case 74 78 // _is_valid = 1; 75 79 } 76 80 … … 80 84 } 81 85 82 public : bool can_insert_read (uint32_t max_reader)83 {84 85 }86 // public : bool can_insert_read (uint32_t max_reader) 87 // { 88 // return ((_counter+1) < max_reader); 89 // } 86 90 87 91 public : bool can_free (void) 88 92 { 89 93 return ((_is_free == 0) and 90 (_is_link == 0) and 91 // (_is_valid == 1) and // if is_link <- 0, then retire_write_old or reset 92 (_counter == 0)); 94 (_is_link == 0) // and 95 // (_is_valid == 1) and // if is_link <- 0, then retire_write_old or reset 96 // (_counter == 0) 97 ); 93 98 } 94 99 … … 97 102 { 98 103 output << x._is_free << " " 99 << x._is_link << " " 100 << x._is_valid << " " 101 << x._counter; 104 << x._is_link // << " " 105 // << x._is_valid << " " 106 // << x._counter 107 ; 102 108 103 109 return output;
Note: See TracChangeset
for help on using the changeset viewer.