Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Parameters.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_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Parameters.cpp
r81 r88 29 29 uint32_t nb_inst_decod , 30 30 uint32_t nb_inst_update , 31 Tvictim_t victim_scheme ) 31 Tvictim_t victim_scheme , 32 bool is_toplevel) 32 33 { 33 34 log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin"); … … 37 38 _size_buffer = size_buffer ; 38 39 _associativity = associativity ; 39 _size_address = size_address ;40 40 _size_counter = size_counter ; 41 41 _nb_inst_predict = nb_inst_predict; … … 45 45 46 46 _size_bank = size_buffer/associativity; 47 _size_context_id = log2(nb_context);48 47 _size_victim = log2(associativity); 49 48 50 _have_port_context_id = (_size_context_id > 0);51 49 _have_component_victim = (_size_victim > 0); 52 50 _is_full_associative = _size_bank == 1; 53 51 uint32_t nb_access = nb_inst_predict + nb_inst_decod + nb_inst_update; 52 53 test(); 54 54 55 55 if (_have_component_victim) … … 78 78 _size_buffer , 79 79 _associativity , 80 _size_address ,80 size_address , 81 81 _nb_inst_predict , 82 82 _nb_inst_decod , 83 83 _nb_inst_update ); 84 84 85 85 _param_branch_target_buffer_register = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Parameters 86 86 (_nb_context , … … 88 88 _size_buffer , 89 89 _associativity , 90 _size_address ,90 size_address , 91 91 _size_counter , 92 92 _nb_inst_predict, … … 94 94 _nb_inst_update ); 95 95 96 test(); 96 if (is_toplevel) 97 { 98 _size_instruction_address = size_address ; 99 _size_context_id = log2(nb_context); 100 _have_port_context_id = (_size_context_id > 0); 101 102 copy (); 103 } 104 97 105 log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End"); 98 106 }; … … 125 133 }; 126 134 135 136 #undef FUNCTION 137 #define FUNCTION "Branch_Target_Buffer::copy" 138 void Parameters::copy (void) 139 { 140 log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin"); 141 142 if (_have_component_victim) 143 { 144 COPY(_param_sort); 145 COPY(_param_victim); 146 } 147 COPY(_param_branch_target_buffer_glue); 148 COPY(_param_branch_target_buffer_register); 149 150 log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End"); 151 }; 152 153 127 154 }; // end namespace branch_target_buffer 128 155 }; // end namespace prediction_unit
Note: See TracChangeset
for help on using the changeset viewer.