Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
r82 r88 41 41 uint32_t dir_pht_size_address_share [3], 42 42 uint32_t * ras_size_queue ,//[nb_context] 43 uint32_t * upt_size_queue //[nb_context] 43 uint32_t * upt_size_queue ,//[nb_context] 44 bool is_toplevel 44 45 ) 45 46 { … … 72 73 _ras_size_queue = ras_size_queue ; 73 74 _upt_size_queue = upt_size_queue ; 74 75 _size_context_id = log2(_nb_context); 76 // public : uint32_t * _size_inst_ifetch_ptr ;//[nb_context] 77 78 _size_depth = new uint32_t [_nb_context]; 75 76 _array_size_depth = new uint32_t [_nb_context]; 79 77 _size_ras_index = new uint32_t [_nb_context]; 78 80 79 for (uint32_t i=0; i<_nb_context; i++) 81 80 { 82 _ size_depth[i] = log2(_upt_size_queue [i]);83 _size_ras_index [i] = log2(_ras_size_queue [i]);81 _array_size_depth [i] = log2(_upt_size_queue [i]); 82 _size_ras_index [i] = log2(_ras_size_queue [i]); 84 83 } 85 86 _max_size_depth = max<uint32_t>(_size_depth,_nb_context);87 _have_port_context_id = (_size_context_id > 0);88 _have_port_max_depth = (_max_size_depth > 0);89 // public : bool * _have_port_inst_ifetch_ptr ;//[nb_context]90 84 91 85 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue ::Parameters … … 94 88 _size_address , 95 89 _nb_instruction , 96 _ size_depth,90 _array_size_depth , 97 91 _nb_inst_decod , 98 92 _nb_inst_branch_predict, … … 100 94 _nb_inst_branch_update ); 101 95 102 _size_inst_ifetch_ptr = _param_glue->_size_inst_ifetch_ptr ;103 _have_port_depth = _param_glue->_have_port_depth;104 _have_port_inst_ifetch_ptr = _param_glue->_have_port_inst_ifetch_ptr;105 _have_port_history = (_size_history > 0);106 107 96 _param_btb = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer ::Parameters 108 97 (_nb_context , … … 116 105 _nb_inst_branch_update , 117 106 _btb_victim_scheme ); 118 107 119 108 _param_dir = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction ::Parameters 120 109 (_dir_predictor_scheme , … … 130 119 _dir_pht_size_address_share); 131 120 132 _size_history = _param_dir->_size_history; 121 _size_history = _param_dir->_size_history; 122 _have_port_history = (_size_history > 0); 133 123 134 124 _param_ras = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack ::Parameters … … 150 140 _size_history , 151 141 _size_ras_index ); 142 143 144 if (is_toplevel) 145 { 146 _size_context_id = log2(_nb_context); 147 _size_depth = max<uint32_t>(_array_size_depth,_nb_context); 148 _size_inst_ifetch_ptr = log2(max<uint32_t>(_nb_instruction,_nb_context)); 149 _size_instruction_address = size_address; 150 // _size_nb_inst_decod = ; 151 // _size_nb_inst_commit = ; 152 // _size_ifetch_queue_ptr = ; 153 154 _have_port_context_id = (_size_context_id > 0); 155 _have_port_depth = (_size_depth > 0); 156 _have_port_inst_ifetch_ptr = _size_inst_ifetch_ptr > 0; 157 // _have_port_ifetch_queue_ptr= _size_ifetch_queue_ptr > 0; 158 159 copy (); 160 } 152 161 153 162 test(); … … 176 185 delete _param_glue; 177 186 178 delete [] _ size_depth;187 delete [] _array_size_depth; 179 188 delete [] _size_ras_index; 189 190 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); 191 }; 192 193 #undef FUNCTION 194 #define FUNCTION "Prediction_unit::copy" 195 void Parameters::copy (void) 196 { 197 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 198 199 COPY(_param_btb ); 200 COPY(_param_dir ); 201 COPY(_param_ras ); 202 COPY(_param_upt ); 203 COPY(_param_glue); 180 204 181 205 log_printf(FUNC,Prediction_unit,FUNCTION,"End");
Note: See TracChangeset
for help on using the changeset viewer.