Changeset 43 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor
- Timestamp:
- Jul 9, 2007, 11:04:26 AM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor
- Files:
-
- 3 added
- 7 deleted
- 11 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h
r42 r43 119 119 #if VHDL 120 120 public : void vhdl (void); 121 private : void vhdl_port (Vhdl * & vhdl); 122 private : void vhdl_type (Vhdl * & vhdl); 123 private : void vhdl_signal (Vhdl * & vhdl); 121 private : void vhdl_declaration (Vhdl * & vhdl); 124 122 private : void vhdl_body (Vhdl * & vhdl); 125 123 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl.cpp
r42 r43 23 23 Vhdl * vhdl = new Vhdl (_name); 24 24 25 vhdl->set_library_work (_name + "_Pack"); 26 vhdl->set_library_work (_name + "_RegisterFile_Pack"); 27 vhdl->set_library_work (_name + "_Shifter_Pack"); 25 _interfaces->set_port (vhdl); 26 _component ->vhdl_instance(vhdl); 28 27 29 vhdl_port (vhdl); 30 vhdl_type (vhdl); 31 vhdl_signal (vhdl); 32 vhdl_body (vhdl); 28 vhdl_declaration (vhdl); 29 vhdl_body (vhdl); 33 30 34 31 vhdl->generate_file(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/configuration.cfg
r42 r43 1 1 Pattern_History_Table 2 88 *2 # size_counter3 6464 *4 # nb_counter4 22 +1 # nb_prediction5 22 +1 # nb_branch_complete2 2 8 *2 # size_counter 3 2 64 *4 # nb_counter 4 1 2 +1 # nb_prediction 5 1 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl.cpp
r42 r43 22 22 { 23 23 log_printf(FUNC,Pattern_History_Table,"vhdl","Begin"); 24 24 25 Vhdl * vhdl = new Vhdl (_name); 25 26 26 _interfaces->set_port (vhdl);27 _component ->vhdl_instance(vhdl);27 _interfaces->set_port (vhdl); 28 _component ->vhdl_instance(vhdl); 28 29 29 30 vhdl_declaration (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config0.cfg
r5 r43 2 2 1 1 +1 # have_bht 3 3 8 8 +1 # bht_size_shifter 4 512 512 *2 # bht_nb_shifter4 32 32 *2 # bht_nb_shifter 5 5 1 1 +1 # have_pht 6 6 8 8 +1 # pht_size_counter 7 512 512 *2 # pht_nb_counter7 32 32 *2 # pht_nb_counter 8 8 2 2 +1 # pht_size_address_share 9 9 16 16 +1 # size_address -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
r15 r43 137 137 BRANCH_COMPLETE_VAL [i]->write(0); 138 138 139 _Two_Level_Branch_Predictor->vhdl_testbench_label("Initialisation");140 139 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl; 141 140 … … 157 156 uint32_t nb_reg_by_group = (1<<(param._pht_size_address-size_address_shift)); 158 157 159 _Two_Level_Branch_Predictor->vhdl_testbench_label("Init pht");160 158 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init pht" << endl; 161 159 … … 186 184 BRANCH_COMPLETE_BHT_HISTORY [num_port_branch_complete]->write(0); 187 185 188 _Two_Level_Branch_Predictor->vhdl_testbench_label("Init bht");189 186 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init bht" << endl; 190 187 … … 206 203 BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(address); 207 204 208 _Two_Level_Branch_Predictor->vhdl_testbench_label("Loop of Test");209 205 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl 210 206 << " * predict_address : " << hex << address << dec << endl; … … 219 215 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 220 216 { 221 _Two_Level_Branch_Predictor->vhdl_testbench_label("Iteration "+toString(iteration));222 223 217 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict : bht_history " << bht_history << " - pht_history " << pht_history[bht_history] << endl; 224 218 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h
r42 r43 129 129 #if VHDL 130 130 public : void vhdl (void); 131 private : void vhdl_port (Vhdl * & vhdl);132 131 private : void vhdl_declaration (Vhdl * & vhdl); 133 132 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp
r42 r43 25 25 Vhdl * vhdl = new Vhdl (_name); 26 26 27 vhdl->set_library_work (_name + "_Pack"); 27 _interfaces->set_port (vhdl); 28 _component ->vhdl_instance(vhdl); 28 29 29 vhdl_port (vhdl);30 30 vhdl_declaration (vhdl); 31 31 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h
r42 r43 135 135 #if VHDL 136 136 public : void vhdl (void); 137 private : void vhdl_port (Vhdl * & vhdl);138 137 private : void vhdl_declaration (Vhdl * & vhdl); 139 138 private : void vhdl_body (Vhdl * & vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
r42 r43 89 89 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 90 90 { 91 in_BRANCH_COMPLETE_VAL [i] = new interface->set_signal_valack_in ("val" , VAL); 92 out_BRANCH_COMPLETE_ACK [i] = new interface->set_signal_valack_out ("ack" , ACK); 93 in_BRANCH_COMPLETE_ADDRESS [i] = new interface->set_signal_in <Taddress_t > ("address" , _param._size_address); 91 Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i) 92 #ifdef POSITION 93 , IN 94 , EAST 95 , "Interface branch complete" 96 #endif 97 ); 98 99 in_BRANCH_COMPLETE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 100 out_BRANCH_COMPLETE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 101 in_BRANCH_COMPLETE_ADDRESS [i] = interface->set_signal_in <Taddress_t > ("address" , _param._size_address); 94 102 if (_param._have_bht) 95 in_BRANCH_COMPLETE_BHT_HISTORY [i] = newinterface->set_signal_in <Tbht_history_t> ("bht_history", _param._bht_size_shifter);103 in_BRANCH_COMPLETE_BHT_HISTORY [i] = interface->set_signal_in <Tbht_history_t> ("bht_history", _param._bht_size_shifter); 96 104 if (_param._have_pht) 97 in_BRANCH_COMPLETE_PHT_HISTORY [i] = newinterface->set_signal_in <Tpht_history_t> ("pht_history", _param._pht_size_counter);98 in_BRANCH_COMPLETE_DIRECTION [i] = newinterface->set_signal_in <Tcontrol_t > ("direction" , 1);105 in_BRANCH_COMPLETE_PHT_HISTORY [i] = interface->set_signal_in <Tpht_history_t> ("pht_history", _param._pht_size_counter); 106 in_BRANCH_COMPLETE_DIRECTION [i] = interface->set_signal_in <Tcontrol_t > ("direction" , 1); 99 107 } 100 108 … … 111 119 ,_param_statistics 112 120 #endif 113 ,*(_param._param_ counter));121 ,*(_param._param_branch_history_table)); 114 122 115 123 _component->set_component (component_Branch_History_Table->_component … … 132 140 ,_param_statistics 133 141 #endif 134 ,*(_param._param_ counter));142 ,*(_param._param_pattern_history_table)); 135 143 136 144 _component->set_component (component_Pattern_History_Table->_component … … 152 160 ,_param_statistics 153 161 #endif 154 ,*(_param._param_ counter));155 156 _component->set_component (component_ Pattern_History_Table->_component162 ,*(_param._param_two_level_branch_predictor_glue)); 163 164 _component->set_component (component_Two_Level_Branch_Predictor_Glue->_component 157 165 #ifdef POSITION 158 166 , 50 … … 164 172 165 173 // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 166 174 167 175 // =====[ component_Branch_History_Table - Instanciation ]============ 168 176 if (_param._have_bht) 169 177 { 178 cout << "GEU 1" << endl; 170 179 #ifdef POSITION 171 180 _component->interface_map (_name+"_Branch_History_Table","", … … 205 214 if (_param._have_pht) 206 215 { 216 cout << "GEU 2" << endl; 207 217 #ifdef POSITION 208 218 _component->interface_map (_name+"_Pattern_History_Table","", … … 224 234 _component->port_map(_name+"_Pattern_History_Table","out_PREDICT_"+toString(i)+"_HISTORY", _name ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY"); 225 235 } 226 236 227 237 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 228 238 { … … 240 250 241 251 // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]= 252 cout << "GEU 3" << endl; 242 253 #ifdef POSITION 243 254 _component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","", … … 247 258 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET"); 248 259 260 cout << "GEU 3.1" << endl; 249 261 for (uint32_t i=0; i<_param._nb_prediction; i++) 250 262 { 263 cout << "GEU 3.1.1" << endl; 251 264 if (_param._have_bht) 252 265 { 253 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_PREDICT_"+toString(i)+"_BHT_ACK" ); 254 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_PREDICT_"+toString(i)+"_BHT_ADDRESS"); 255 } 266 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_PREDICT_"+toString(i)+"_ACK" ); 267 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_PREDICT_"+toString(i)+"_ADDRESS"); 268 } 269 cout << "GEU 3.1.2" << endl; 256 270 if (_param._have_pht) 257 271 { 258 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_PREDICT_"+toString(i)+"_PHT_ACK" ); 259 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_PHT_ADDRESS"); 260 } 272 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_PREDICT_"+toString(i)+"_ACK" ); 273 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS"); 274 } 275 cout << "GEU 3.1.3" << endl; 261 276 if (_param._have_bht and _param._have_pht) 262 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name , "in_PREDICT_"+toString(i)+"_BHT_HISTORY"); 277 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY"); 278 cout << "GEU 3.1.4.1" << endl; 263 279 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK" , _name ,"out_PREDICT_"+toString(i)+"_ACK"); 264 280 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS" , _name , "in_PREDICT_"+toString(i)+"_ADDRESS"); 265 281 } 266 282 283 cout << "GEU 3.2" << endl; 267 284 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 268 285 { 269 286 if (_param._have_bht) 270 287 { 271 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_BRANCH_COMPLETE_"+toString(i)+"_ BHT_ACK" );272 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_BRANCH_COMPLETE_"+toString(i)+"_ BHT_ADDRESS");288 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK" , _name+"_Branch_History_Table" , "out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); 289 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 273 290 } 274 291 if (_param._have_pht) 275 292 { 276 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_BRANCH_COMPLETE_"+toString(i)+"_ PHT_ACK" );277 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ PHT_ADDRESS");293 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK" , _name+"_Pattern_History_Table", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); 294 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 278 295 } 279 296 if (_param._have_bht and _param._have_pht) … … 282 299 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 283 300 } 284 301 cout << "GEU 4" << endl; 285 302 #ifdef POSITION 286 303 _component->generate_file(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp
r42 r43 21 21 { 22 22 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl","Begin"); 23 23 24 Vhdl * vhdl = new Vhdl (_name); 24 25 25 vhdl->set_library_work (_name + "_Pack"); 26 if (_param._have_bht) 27 vhdl->set_library_work (_name + "_Branch_History_Table_Pack"); 28 if (_param._have_pht) 29 vhdl->set_library_work (_name + "_Pattern_History_Table_Pack"); 30 vhdl->set_library_work (_name + "_Two_Level_Branch_Predictor_Glue_Pack"); 31 32 vhdl_port (vhdl); 26 _interfaces->set_port (vhdl); 27 _component ->vhdl_instance(vhdl); 28 33 29 vhdl_declaration (vhdl); 34 30 vhdl_body (vhdl); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp
r42 r43 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin"); 22 22 23 list<string> list_port_map;23 // list<string> list_port_map; 24 24 25 if (_param._have_bht)26 {27 list_port_map.clear();25 // if (_param._have_bht) 26 // { 27 // list_port_map.clear(); 28 28 29 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");30 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");29 // vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK "); 30 // vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET"); 31 31 32 for (uint32_t i=0; i<_param._nb_prediction; i++)33 {34 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i));35 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i));36 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i));37 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i));38 }32 // for (uint32_t i=0; i<_param._nb_prediction; i++) 33 // { 34 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i)); 35 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i)); 36 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i)); 37 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i)); 38 // } 39 39 40 for (uint32_t i=0; i<_param._nb_branch_complete; i++)41 {42 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i));43 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));44 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));45 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));46 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i));47 }40 // for (uint32_t i=0; i<_param._nb_branch_complete; i++) 41 // { 42 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i)); 43 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i)); 44 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)); 45 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)); 46 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)); 47 // } 48 48 49 vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map);50 }49 // vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map); 50 // } 51 51 52 if (_param._have_pht)53 {54 list_port_map.clear();52 // if (_param._have_pht) 53 // { 54 // list_port_map.clear(); 55 55 56 vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");57 vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");56 // vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK "); 57 // vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET"); 58 58 59 for (uint32_t i=0; i<_param._nb_prediction; i++)60 {61 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i));62 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i));63 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i));64 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" "," out_PREDICT_PHT_HISTORY_"+toString(i));65 }59 // for (uint32_t i=0; i<_param._nb_prediction; i++) 60 // { 61 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+" "," in_PREDICT_VAL_"+toString(i)); 62 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i)); 63 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i)); 64 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+" "," out_PREDICT_PHT_HISTORY_"+toString(i)); 65 // } 66 66 67 for (uint32_t i=0; i<_param._nb_branch_complete; i++)68 {69 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i));70 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));71 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));72 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i));73 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i));74 }67 // for (uint32_t i=0; i<_param._nb_branch_complete; i++) 68 // { 69 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+" "," in_BRANCH_COMPLETE_VAL_"+toString(i)); 70 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i)); 71 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)); 72 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" "," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)); 73 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+""," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)); 74 // } 75 75 76 vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map);77 }76 // vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map); 77 // } 78 78 79 list_port_map.clear();79 // list_port_map.clear(); 80 80 81 for (uint32_t i=0; i<_param._nb_prediction; i++)82 {83 if (_param._have_bht)84 {85 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i));86 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i));87 }88 if (_param._have_pht)89 {90 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PHT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i));91 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i));92 }93 if (_param._have_bht and _param._have_pht)94 {95 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i));96 }97 vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" "," out_PREDICT_ACK_"+toString(i));98 vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" "," in_PREDICT_ADDRESS_"+toString(i));99 }81 // for (uint32_t i=0; i<_param._nb_prediction; i++) 82 // { 83 // if (_param._have_bht) 84 // { 85 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_ACK_"+toString(i)+" ","signal_PREDICT_BHT_ACK_"+toString(i)); 86 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_BHT_ADDRESS_"+toString(i)); 87 // } 88 // if (_param._have_pht) 89 // { 90 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PHT_ACK_"+toString(i)+" ","signal_PREDICT_PHT_ACK_"+toString(i)); 91 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_ADDRESS_"+toString(i)+" ","signal_PREDICT_PHT_ADDRESS_"+toString(i)); 92 // } 93 // if (_param._have_bht and _param._have_pht) 94 // { 95 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_HISTORY_"+toString(i)+" ","signal_PREDICT_BHT_HISTORY_"+toString(i)); 96 // } 97 // vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+" "," out_PREDICT_ACK_"+toString(i)); 98 // vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+" "," in_PREDICT_ADDRESS_"+toString(i)); 99 // } 100 100 101 for (uint32_t i=0; i<_param._nb_branch_complete; i++)102 {103 if (_param._have_bht)104 {105 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));106 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));107 }108 if (_param._have_pht)109 {110 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));111 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));112 }113 if (_param._have_bht and _param._have_pht)114 {115 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+""," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));116 }117 vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" "," out_BRANCH_COMPLETE_ACK_"+toString(i));118 vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" "," in_BRANCH_COMPLETE_ADDRESS_"+toString(i));119 }101 // for (uint32_t i=0; i<_param._nb_branch_complete; i++) 102 // { 103 // if (_param._have_bht) 104 // { 105 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i)); 106 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)); 107 // } 108 // if (_param._have_pht) 109 // { 110 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_ACK_"+toString(i)+" ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i)); 111 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)); 112 // } 113 // if (_param._have_bht and _param._have_pht) 114 // { 115 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+""," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)); 116 // } 117 // vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+" "," out_BRANCH_COMPLETE_ACK_"+toString(i)); 118 // vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" "," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)); 119 // } 120 120 121 vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map);121 // vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map); 122 122 123 if (_param._have_bht)124 for (uint32_t i=0; i<_param._nb_prediction; i++)125 vhdl.set_body("out_PREDICT_BHT_HISTORY_"+toString(i)+" <= signal_PREDICT_BHT_HISTORY_"+toString(i)+";");123 // if (_param._have_bht) 124 // for (uint32_t i=0; i<_param._nb_prediction; i++) 125 // vhdl.set_body("out_PREDICT_BHT_HISTORY_"+toString(i)+" <= signal_PREDICT_BHT_HISTORY_"+toString(i)+";"); 126 126 127 127 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","End");
Note: See TracChangeset
for help on using the changeset viewer.