Changeset 111 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src
- Timestamp:
- Feb 27, 2009, 7:37:40 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp
r88 r111 84 84 std::string name; 85 85 86 if (_param->_have_component_meta_predictor) 87 { 88 name = _name+"_meta_predictor"; 89 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 90 91 _component_meta_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Meta_Predictor 92 (name.c_str() 93 #ifdef STATISTICS 94 ,param_statistics 95 #endif 96 ,_param->_param_meta_predictor 97 ,_usage); 98 99 _component->set_component (_component_meta_predictor->_component 100 #ifdef POSITION 101 , 50, 50, 10, 10 102 #endif 103 ); 104 } 105 86 106 { 87 107 name = _name+"_glue"; … … 105 125 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 126 std::string src,dest; 127 128 // =================================================================== 129 // =====[ Meta_Predictor ]============================================ 130 // =================================================================== 131 if (_param->_have_component_meta_predictor) 132 { 133 src = _name+"_meta_predictor"; 134 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 135 136 { 137 dest = _name; 138 #ifdef POSITION 139 _component->interface_map (src ,"", 140 dest,""); 141 #endif 142 143 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 144 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 145 } 146 147 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 148 { 149 dest = _name+"_glue"; 150 #ifdef POSITION 151 _component->interface_map (src ,"predict_" +toString(i), 152 dest,"predict_predictor_"+toString(i)); 153 #endif 154 155 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+ "_VAL" , 156 dest,"out_PREDICT_"+toString(i)+"_PREDICTOR_VAL" ); 157 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_ACK" , 158 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_ACK" ); 159 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+ "_ADDRESS" , 160 dest,"out_PREDICT_"+toString(i)+"_PREDICTOR_ADDRESS_SRC"); 161 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_DIRECTION" , 162 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_DIRECTION" ); 163 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_HISTORY" , 164 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_HISTORY" ); 165 } 166 167 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 168 { 169 dest = _name+"_glue"; 170 #ifdef POSITION 171 _component->interface_map (src ,"update_" +toString(i), 172 dest,"update_predictor_"+toString(i)); 173 #endif 174 175 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_VAL" , 176 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_VAL" ); 177 COMPONENT_MAP(_component,src ,"out_UPDATE_"+toString(i)+ "_ACK" , 178 dest, "in_UPDATE_"+toString(i)+"_PREDICTOR_ACK" ); 179 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS" , 180 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_ADDRESS" ); 181 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_DIRECTION" , 182 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_DIRECTION" ); 183 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_HISTORY" , 184 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_HISTORY" ); 185 } 186 } 107 187 188 // =================================================================== 189 // =====[ Glue ]====================================================== 190 // =================================================================== 108 191 { 109 192 src = _name+"_glue"; … … 179 262 } 180 263 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 181 // _component->test_map(); 264 if (DEBUG_Direction == true) 265 _component->test_map(); 182 266 183 267 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_deallocation.cpp
r88 r111 45 45 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 46 delete _component_glue; 47 if (_param->_have_component_meta_predictor) 48 delete _component_meta_predictor; 47 49 delete _component; 48 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters.cpp
r88 r111 134 134 } 135 135 136 _size_history = 0; 136 test(); 137 138 if (_have_component_meta_predictor) 139 _param_meta_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters 140 ( 141 _nb_inst_predict , 142 _nb_inst_update , 143 size_address , 144 _have_bht , 145 _bht_size_shifter , 146 _bht_nb_shifter , 147 _have_pht , 148 _pht_size_counter , 149 _pht_nb_counter , 150 _pht_size_address_share 151 ); 137 152 138 for (uint32_t i=0; i<3; i++) 139 _size_history += (((_have_bht [i])?_bht_size_shifter [i]:0) + 140 ((_have_pht [i])?_pht_size_counter [i]:0)); 141 142 _have_port_history = (_size_history > 0); 143 144 test(); 153 _size_history = (_have_component_meta_predictor)?_param_meta_predictor->_size_history:0; 154 155 log_printf(TRACE,Direction,FUNCTION," * size_history : %d",_size_history); 156 157 // _size_history = 0; 158 // for (uint32_t i=0; i<3; i++) 159 // _size_history += (((_have_bht [i])?_bht_size_shifter [i]:0) + 160 // ((_have_pht [i])?_pht_size_counter [i]:0)); 161 162 _have_port_history = (_size_history > 0); 145 163 146 164 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters … … 177 195 178 196 delete _param_glue; 197 if (_have_component_meta_predictor) 198 delete _param_meta_predictor; 199 179 200 log_printf(FUNC,Direction,FUNCTION,"End"); 180 201 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters_msg_error.cpp
r81 r111 39 39 case PREDICTOR_STATIC : 40 40 case PREDICTOR_LAST_TAKE : 41 {42 break;43 }44 41 case PREDICTOR_COUNTER : 45 42 case PREDICTOR_LOCAL : … … 47 44 case PREDICTOR_META : 48 45 case PREDICTOR_CUSTOM : 46 { 47 break; 48 } 49 default : 49 50 { 50 51 test.error("Unimplemented predictor_scheme : \""+toString(_predictor_scheme)+"\". (Coming Soon)");
Note: See TracChangeset
for help on using the changeset viewer.