Changeset 44 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor
- Timestamp:
- Jul 17, 2007, 4:47:56 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor
- Files:
-
- 3 added
- 37 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/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h" 12 #include " Include/BitManipulation.h"13 #include " Include/Test.h"12 #include "Common/include/BitManipulation.h" 13 #include "Common/include/Test.h" 14 14 15 15 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h
r43 r44 13 13 #endif 14 14 15 #include " Include/ToString.h"16 #include " Include/Debug.h"15 #include "Common/include/ToString.h" 16 #include "Common/include/Debug.h" 17 17 18 18 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_body.cpp
r42 r44 20 20 void Branch_History_Table::vhdl_body (Vhdl * & vhdl) 21 21 { 22 // vhdl->set_body ("-- Output : always at '1'");23 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)24 // vhdl->set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= '1';");25 // for (uint32_t i=0; i<_param._nb_prediction ; i++)26 // vhdl->set_body ("out_PREDICT_ACK_"+toString(i)+" <= '1';");27 // vhdl->set_body ("");28 29 list<string> list_port_map;30 31 for (uint32_t i=0; i<_param._nb_branch_complete; i++)32 {33 vhdl->set_body_component_port_map (list_port_map," in_SHIFTER_"+toString(i)+"_DATA "," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY" );34 vhdl->set_body_component_port_map (list_port_map," in_SHIFTER_"+toString(i)+"_CARRY_IN "," in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");35 vhdl->set_body_component_port_map (list_port_map,"out_SHIFTER_"+toString(i)+"_DATA ","signal_BRANCH_COMPLETE_"+toString(i)+"_HISTORY" );36 }37 38 vhdl->set_body_component ("component_Shifter",_name+"_Shifter",list_port_map);39 40 list_port_map.clear();41 vhdl->set_body_component_port_map (list_port_map,"in_CLOCK","in_CLOCK");42 vhdl->set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");43 44 for (uint32_t i=0; i<_param._nb_prediction; i++)45 {46 vhdl->set_body_component_port_map (list_port_map," in_READ_"+toString(i)+"_VAL "," In_PREDICT_"+toString(i)+"_VAL");47 vhdl->set_body_component_port_map (list_port_map,"out_READ_"+toString(i)+"_ACK ","out_PREDICT_"+toString(i)+"_ACK");48 vhdl->set_body_component_port_map (list_port_map," in_READ_"+toString(i)+"_ADDRESS "," in_PREDICT_"+toString(i)+"_ADDRESS");49 vhdl->set_body_component_port_map (list_port_map,"out_READ_"+toString(i)+"_DATA ","out_PREDICT_"+toString(i)+"_HISTORY");50 }51 52 for (uint32_t i=0; i<_param._nb_branch_complete; i++)53 {54 vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_VAL "," in_BRANCH_COMPLETE_"+toString(i)+"_VAL");55 vhdl->set_body_component_port_map (list_port_map,"out_WRITE_"+toString(i)+"_ACK "," out_BRANCH_COMPLETE_"+toString(i)+"_ACK");56 vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_ADDRESS"," in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");57 vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_DATA ","signal_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");58 }59 vhdl->set_body_component ("component_RegisterFile",_name+"_RegisterFile",list_port_map);60 22 }; 61 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_testbench_transition.cpp
r42 r44 20 20 void Branch_History_Table::vhdl_testbench_transition (void) 21 21 { 22 sc_start(0);22 // sc_start(0); 23 23 24 24 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config0.cfg
r43 r44 2 2 2 8 *2 # size_counter 3 3 2 64 *4 # nb_counter 4 1 2+1 # nb_prediction5 1 2+1 # nb_branch_complete4 1 1 +1 # nb_prediction 5 1 1 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h" 12 #include " Include/Test.h"12 #include "Common/include/Test.h" 13 13 14 14 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h
r15 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h
r42 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h
r15 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_testbench_transition.cpp
r42 r44 22 22 log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","Begin"); 23 23 24 sc_start(0);24 // sc_start(0); 25 25 26 26 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config0.cfg
r43 r44 1 1 Two_Level_Branch_Predictor 2 11 +1 # have_bht3 8 8+1 # bht_size_shifter2 0 1 +1 # have_bht 3 4 4 +1 # bht_size_shifter 4 4 32 32 *2 # bht_nb_shifter 5 5 1 1 +1 # have_pht … … 8 8 2 2 +1 # pht_size_address_share 9 9 16 16 +1 # size_address 10 22 +1 # nb_prediction11 22 +1 # nb_branch_complete10 1 2 +1 # nb_prediction 11 1 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
r43 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h" 12 #include " Include/Test.h"13 #include " Include/BitManipulation.h"12 #include "Common/include/Test.h" 13 #include "Common/include/BitManipulation.h" 14 14 void test (string name, 15 15 morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Parameters param) … … 132 132 sc_start(0); 133 133 134 NRESET->write(0); 135 sc_start(5); 136 NRESET->write(1); 137 134 138 for (uint32_t i=0; i<param._nb_prediction; i++) 135 139 PREDICT_VAL [i]->write(0); … … 156 160 uint32_t nb_reg_by_group = (1<<(param._pht_size_address-size_address_shift)); 157 161 162 // cout << "pht_size_address : " << param._pht_size_address << endl; 163 // cout << "size_address_shift : " << size_address_shift << endl; 164 // cout << "nb_group : " << nb_group << endl; 165 // cout << "nb_reg_by_group : " << nb_reg_by_group << endl; 166 158 167 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init pht" << endl; 159 168 … … 168 177 for (uint32_t j=0; j<nb_reg_by_group; j++) 169 178 { 179 cout << "j : " << j << " on " << nb_reg_by_group << endl; 170 180 BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(j); 171 181 172 182 sc_start(1); 173 183 174 184 // wait ackwolegde 175 185 while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0) 176 sc_start(1); 186 { 187 sc_start(1); 188 } 177 189 } 178 190 } … … 195 207 // wait ackwolegde 196 208 while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0) 197 sc_start(1); 209 { 210 sc_start(1); 211 } 198 212 } 199 213 … … 225 239 // wait ackwolegde 226 240 while (PREDICT_ACK [num_port_predict] -> read() == 0) 227 sc_start(1); 241 { 242 sc_start(1); 243 } 228 244 PREDICT_ACK [num_port_predict ]->write(0); 229 245 … … 231 247 232 248 // Test 249 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict (Test) : " << endl; 233 250 if (param._have_bht) 234 TEST(Tbht_history_t,bht_history ,PREDICT_BHT_HISTORY[num_port_predict]->read()); 251 { 252 cout << "\tbht_history " << PREDICT_BHT_HISTORY[num_port_predict]->read() << endl; 253 TEST(Tbht_history_t,bht_history ,PREDICT_BHT_HISTORY[num_port_predict]->read()); 254 } 235 255 if (param._have_pht) 236 TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read()); 256 { 257 cout << "\tpht_history " << PREDICT_PHT_HISTORY[num_port_predict]->read() << endl; 258 TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read()); 259 } 237 260 238 261 // update … … 267 290 // wait ackwolegde 268 291 while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0) 269 sc_start(1); 270 292 { 293 sc_start(1); 294 } 271 295 BRANCH_COMPLETE_VAL [num_port_branch_complete]->write(0); 272 296 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config0.cfg
r43 r44 1 1 Two_Level_Branch_Predictor_Glue 2 11 +1 # have_bht2 0 1 +1 # have_bht 3 3 11 11 +1 # bht_size_history 4 4 4 4 +1 # bht_size_address 5 01 +1 # have_pht5 1 1 +1 # have_pht 6 6 13 13 +1 # pht_size_address 7 02 +1 # pht_size_address_share7 2 2 +1 # pht_size_address_share 8 8 16 16 +1 # size_address 9 12 +1 # nb_prediction10 12 +1 # nb_branch_complete9 2 2 +1 # nb_prediction 10 2 2 +1 # nb_branch_complete -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp
r42 r44 10 10 11 11 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h" 12 #include " Include/BitManipulation.h"13 #include " Include/Test.h"12 #include "Common/include/BitManipulation.h" 13 #include "Common/include/Test.h" 14 14 15 15 void test (string name, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h
r2 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 #include <math.h> -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h
r2 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 #include "Behavioural/include/Statistics.h" 14 14 #include "Behavioural/include/Parameters_Statistics.h" -
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
r43 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_msg_error.cpp
r2 r44 26 26 string msg = ""; 27 27 28 if ( _have_phtand (_pht_size_address_share >= _pht_size_address))28 if ((_have_bht and _have_pht) and (_pht_size_address_share >= _pht_size_address)) 29 29 { 30 30 msg += " - You can't have higher pht_size_address_share >= pht_size_address\n"; 31 31 msg += " * pht_size_address : " + toString(_pht_size_address ) + "\n"; 32 32 msg += " * pht_size_address_share : " + toString(_pht_size_address_share) + "\n"; 33 } 34 if ((_have_bht and _have_pht) and (_bht_size_history > _pht_size_address)) 35 { 36 msg += " - You can't have higher bht_size_history > pht_size_address\n"; 37 msg += " * bht_size_history : " + toString(_bht_size_history ) + "\n"; 38 msg += " * pht_size_address : " + toString(_pht_size_address ) + "\n"; 33 39 } 34 40 -
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.cpp
r42 r44 34 34 log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Two_Level_Branch_Predictor_Glue","Begin"); 35 35 36 #ifdef SYSTEMC37 36 allocation (); 38 #endif39 37 40 38 #ifdef STATISTICS -
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_genMealy_branch_complete_ack.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
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_genMealy_branch_complete_bht_address.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
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_genMealy_branch_complete_pht_address.cpp
r3 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
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_genMealy_predict_ack.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
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_genMealy_predict_bht_address.cpp
r3 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
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_genMealy_predict_pht_address.cpp
r2 r44 8 8 9 9 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h" 10 #include " Include/BitManipulation.h"10 #include "Common/include/BitManipulation.h" 11 11 12 12 namespace morpheo { -
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_testbench_transition.cpp
r42 r44 22 22 log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_transition","Begin"); 23 23 24 sc_start(0);24 // sc_start(0); 25 25 26 26 _interfaces->testbench(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h
r2 r44 9 9 */ 10 10 11 #include " Include/Debug.h"11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 13 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h
r2 r44 10 10 */ 11 11 12 #include " Include/Debug.h"12 #include "Common/include/Debug.h" 13 13 // Internal structure 14 14 #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h
r43 r44 14 14 15 15 #include <iostream> 16 #include " Include/ToString.h"17 #include " Include/Debug.h"16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 18 18 19 19 // Internal structure -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h
r2 r44 10 10 */ 11 11 12 #include " Include/Types.h"12 #include "Common/include/Types.h" 13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
r43 r44 18 18 void Two_Level_Branch_Predictor::allocation (void) 19 19 { 20 string rename;21 22 20 log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin"); 23 21 … … 176 174 if (_param._have_bht) 177 175 { 178 cout << "GEU 1" << endl;179 176 #ifdef POSITION 180 177 _component->interface_map (_name+"_Branch_History_Table","", … … 214 211 if (_param._have_pht) 215 212 { 216 cout << "GEU 2" << endl;217 213 #ifdef POSITION 218 214 _component->interface_map (_name+"_Pattern_History_Table","", … … 250 246 251 247 // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]= 252 cout << "GEU 3" << endl;253 248 #ifdef POSITION 254 249 _component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","", … … 258 253 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET"); 259 254 260 cout << "GEU 3.1" << endl;261 255 for (uint32_t i=0; i<_param._nb_prediction; i++) 262 256 { 263 cout << "GEU 3.1.1" << endl;264 257 if (_param._have_bht) 265 258 { … … 267 260 _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 261 } 269 cout << "GEU 3.1.2" << endl;270 262 if (_param._have_pht) 271 263 { … … 273 265 _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 266 } 275 cout << "GEU 3.1.3" << endl;276 267 if (_param._have_bht and _param._have_pht) 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; 268 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Branch_History_Table" ,"out_PREDICT_"+toString(i)+"_HISTORY"); 279 269 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK" , _name ,"out_PREDICT_"+toString(i)+"_ACK"); 280 270 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS" , _name , "in_PREDICT_"+toString(i)+"_ADDRESS"); 281 271 } 282 272 283 cout << "GEU 3.2" << endl;284 273 for (uint32_t i=0; i<_param._nb_branch_complete; i++) 285 274 { … … 299 288 _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"); 300 289 } 301 cout << "GEU 4" << endl;302 290 #ifdef POSITION 303 291 _component->generate_file(); … … 306 294 log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End"); 307 295 }; 308 309 310 311 312 313 314 315 // void Two_Level_Branch_Predictor::allocation (void)316 // {317 // string rename;318 319 // log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");320 321 // _component = new Component ();322 323 // Entity * entity = _component->set_entity (_name324 // #ifdef POSITION325 // ,"Two_Level_Branch_Predictor"326 // ,MIXTE327 // #endif328 // );329 330 // _interfaces = entity->set_interfaces();331 332 // // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~333 // {334 // Interface * interface = _interfaces->set_interface(""335 // #ifdef POSITION336 // , IN337 // , SOUTH338 // , "Generalist interface"339 // #endif340 // );341 342 // in_CLOCK = interface->set_signal_clk ("clock" ,1);343 // in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);344 // }345 346 // // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~347 348 // in_PREDICT_VAL = new SC_IN (Tcontrol_t) * [_param._nb_prediction ];349 // out_PREDICT_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_prediction ];350 // in_PREDICT_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_prediction ];351 // if (_param._have_bht)352 // out_PREDICT_BHT_HISTORY = new SC_OUT(Tbht_history_t) * [_param._nb_prediction ];353 // if (_param._have_pht)354 // out_PREDICT_PHT_HISTORY = new SC_OUT(Tpht_history_t) * [_param._nb_prediction ];355 // // if (_param._have_bht)356 // // {357 // // signal_PREDICT_BHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];358 // // signal_PREDICT_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_prediction];359 // // }360 // // if (_param._have_pht)361 // // {362 // // signal_PREDICT_PHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];363 // // signal_PREDICT_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_prediction];364 // // }365 366 // for (uint32_t i=0; i<_param._nb_prediction; i++)367 // {368 // rename = "in_PREDICT_VAL_" +toString(i);369 // in_PREDICT_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str());370 371 // rename = "out_PREDICT_ACK_" +toString(i);372 // out_PREDICT_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str());373 374 // rename = "in_PREDICT_ADDRESS_" +toString(i);375 // in_PREDICT_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str());376 377 // if (_param._have_bht)378 // {379 // rename = "out_PREDICT_BHT_HISTORY_"+toString(i);380 // out_PREDICT_BHT_HISTORY [i] = new SC_OUT(Tbht_history_t) (rename.c_str());381 // }382 383 // if (_param._have_pht)384 // {385 // rename = "out_PREDICT_PHT_HISTORY_"+toString(i);386 // out_PREDICT_PHT_HISTORY [i] = new SC_OUT(Tpht_history_t) (rename.c_str());387 // }388 389 // // if (_param._have_bht)390 // // {391 // // rename = "signal_PREDICT_BHT_ACK_" +toString(i);392 // // signal_PREDICT_BHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());393 394 // // rename = "signal_PREDICT_BHT_ADDRESS_"+toString(i);395 // // signal_PREDICT_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());396 // // }397 398 // // if (_param._have_pht)399 // // {400 // // rename = "signal_PREDICT_PHT_ACK_" +toString(i);401 // // signal_PREDICT_PHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());402 403 // // rename = "signal_PREDICT_PHT_ADDRESS_"+toString(i);404 // // signal_PREDICT_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());405 // // }406 // }407 408 // in_BRANCH_COMPLETE_VAL = new SC_IN (Tcontrol_t) * [_param._nb_branch_complete];409 // out_BRANCH_COMPLETE_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_branch_complete];410 // in_BRANCH_COMPLETE_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_branch_complete];411 // if (_param._have_bht)412 // in_BRANCH_COMPLETE_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_branch_complete];413 // if (_param._have_pht)414 // in_BRANCH_COMPLETE_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_branch_complete];415 // in_BRANCH_COMPLETE_DIRECTION = new SC_IN (Tcontrol_t) * [_param._nb_branch_complete];416 // // if (_param._have_bht)417 // // {418 // // signal_BRANCH_COMPLETE_BHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];419 // // signal_BRANCH_COMPLETE_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete];420 // // }421 // // if (_param._have_pht)422 // // {423 // // signal_BRANCH_COMPLETE_PHT_ACK = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];424 // // signal_BRANCH_COMPLETE_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete];425 // // }426 427 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)428 // {429 // rename = "in_BRANCH_COMPLETE_VAL_" +toString(i);430 // in_BRANCH_COMPLETE_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str());431 432 // rename = "out_BRANCH_COMPLETE_ACK_" +toString(i);433 // out_BRANCH_COMPLETE_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str());434 435 // rename = "in_BRANCH_COMPLETE_ADDRESS_" +toString(i);436 // in_BRANCH_COMPLETE_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str());437 438 // if (_param._have_bht)439 // {440 // rename = "in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);441 // in_BRANCH_COMPLETE_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str());442 // }443 // if (_param._have_pht)444 // {445 // rename = "in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i);446 // in_BRANCH_COMPLETE_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str());447 // }448 // rename = "in_BRANCH_COMPLETE_DIRECTION_" +toString(i);449 // in_BRANCH_COMPLETE_DIRECTION [i] = new SC_IN (Tcontrol_t) (rename.c_str());450 // // if (_param._have_bht)451 // // {452 // // rename = "signal_BRANCH_COMPLETE_BHT_ACK_" +toString(i);453 // // signal_BRANCH_COMPLETE_BHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());454 455 // // rename = "signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i);456 // // signal_BRANCH_COMPLETE_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());457 // // }458 // // if (_param._have_pht)459 // // {460 // // rename = "signal_BRANCH_COMPLETE_PHT_ACK_" +toString(i);461 // // signal_BRANCH_COMPLETE_PHT_ACK [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());462 463 // // rename = "signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i);464 // // signal_BRANCH_COMPLETE_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());465 // // }466 // }467 468 // // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~469 // string name_component;470 471 // // =====[ component_Branch_History_Table ]============================472 // if (_param._have_bht)473 // {474 // name_component = _name+"_Branch_History_Table";475 476 // log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());477 478 // component_Branch_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str() ,479 // #ifdef STATISTICS480 // _param_statistics ,481 // #endif482 // *(_param._param_branch_history_table));483 484 // // Instantiation485 // (*(component_Branch_History_Table->in_CLOCK )) (*(in_CLOCK ));486 // (*(component_Branch_History_Table->in_NRESET)) (*(in_NRESET));487 488 // for (uint32_t i=0; i<_param._nb_prediction; i++)489 // {490 // (*(component_Branch_History_Table-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i]));491 // (*(component_Branch_History_Table->out_PREDICT_ACK [i])) (*(signal_PREDICT_BHT_ACK [i]));492 // (*(component_Branch_History_Table-> in_PREDICT_ADDRESS [i])) (*(signal_PREDICT_BHT_ADDRESS [i]));493 // (*(component_Branch_History_Table->out_PREDICT_HISTORY [i])) (*( out_PREDICT_BHT_HISTORY [i]));494 // }495 496 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)497 // {498 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i]));499 // (*(component_Branch_History_Table->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK [i]));500 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));501 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_HISTORY [i])) (*( in_BRANCH_COMPLETE_BHT_HISTORY [i]));502 // (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));503 // }504 // }505 506 // // =====[ component_Pattern_History_Table ]===========================507 // if (_param._have_pht)508 // {509 // name_component = _name+"_Pattern_History_Table";510 511 // log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());512 513 // component_Pattern_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table (name_component.c_str() ,514 // #ifdef STATISTICS515 // _param_statistics ,516 // #endif517 // *(_param._param_pattern_history_table));518 519 // // Instantiation520 // (*(component_Pattern_History_Table->in_CLOCK)) (*(in_CLOCK));521 // (*(component_Pattern_History_Table->in_NRESET)) (*(in_NRESET));522 523 // for (uint32_t i=0; i<_param._nb_prediction; i++)524 // {525 // (*(component_Pattern_History_Table-> in_PREDICT_VAL [i])) (*( in_PREDICT_VAL [i]));526 // (*(component_Pattern_History_Table->out_PREDICT_ACK [i])) (*(signal_PREDICT_PHT_ACK [i]));527 // (*(component_Pattern_History_Table-> in_PREDICT_ADDRESS [i])) (*(signal_PREDICT_PHT_ADDRESS [i]));528 // (*(component_Pattern_History_Table->out_PREDICT_HISTORY [i])) (*( out_PREDICT_PHT_HISTORY [i]));529 // }530 531 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)532 // {533 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL [i])) (*( in_BRANCH_COMPLETE_VAL [i]));534 // (*(component_Pattern_History_Table->out_BRANCH_COMPLETE_ACK [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK [i]));535 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));536 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY [i])) (*( in_BRANCH_COMPLETE_PHT_HISTORY [i]));537 // (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i])) (*( in_BRANCH_COMPLETE_DIRECTION [i]));538 // }539 // }540 541 // // =====[ component_Two_Level_Branch_Predictor_Glue ]===========================542 // name_component = _name+"_Two_Level_Branch_Predictor_Glue";543 544 // log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());545 546 // component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str() ,547 // #ifdef STATISTICS548 // _param_statistics ,549 // #endif550 // *(_param._param_two_level_branch_predictor_glue));551 552 // // Instantiation553 // #if defined(STATISTICS) or defined(VHDL_TESTBENCH)554 // (*(component_Two_Level_Branch_Predictor_Glue->in_CLOCK)) (*(in_CLOCK));555 // #endif556 // for (uint32_t i=0; i<_param._nb_prediction; i++)557 // {558 // if (_param._have_bht)559 // {560 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_ACK [i])) (*(signal_PREDICT_BHT_ACK [i]));561 // (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_BHT_ADDRESS [i])) (*(signal_PREDICT_BHT_ADDRESS [i]));562 // }563 // if (_param._have_pht)564 // {565 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_PHT_ACK [i])) (*(signal_PREDICT_PHT_ACK [i]));566 // (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_PHT_ADDRESS [i])) (*(signal_PREDICT_PHT_ADDRESS [i]));567 // }568 // if (_param._have_bht and _param._have_pht)569 // {570 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_HISTORY [i])) (*( out_PREDICT_BHT_HISTORY [i]));571 // }572 // (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_ACK [i])) (*( out_PREDICT_ACK [i]));573 // (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_ADDRESS [i])) (*( in_PREDICT_ADDRESS [i]));574 // }575 576 // for (uint32_t i=0; i<_param._nb_branch_complete; i++)577 // {578 // if (_param._have_bht)579 // {580 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_ACK [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK [i]));581 // (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));582 // }583 // if (_param._have_pht)584 // {585 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_PHT_ACK [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK [i]));586 // (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));587 // }588 // if (_param._have_bht and _param._have_pht)589 // {590 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_BHT_HISTORY [i]));591 // }592 // (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_ACK [i])) (*( out_BRANCH_COMPLETE_ACK [i]));593 // (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_ADDRESS [i])) (*( in_BRANCH_COMPLETE_ADDRESS [i]));594 // }595 596 // log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");597 // };598 296 599 297 }; // end namespace two_level_branch_predictor -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp
r43 r44 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin"); 22 22 23 // list<string> list_port_map;24 25 // if (_param._have_bht)26 // {27 // list_port_map.clear();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");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 // }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 // }48 49 // vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map);50 // }51 52 // if (_param._have_pht)53 // {54 // list_port_map.clear();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");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 // }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 // }75 76 // vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map);77 // }78 79 // list_port_map.clear();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 // }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 // }120 121 // vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map);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)+";");126 23 127 24 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp
r42 r44 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","Begin"); 22 22 23 for (uint32_t i=0; i<_param._nb_prediction; i++)24 {25 if (_param._have_bht)26 {27 vhdl->set_signal ("signal_PREDICT_BHT_ACK_"+toString(i), 1);28 vhdl->set_signal ("signal_PREDICT_BHT_ADDRESS_"+toString(i), _param._bht_size_address);29 vhdl->set_signal ("signal_PREDICT_BHT_HISTORY_"+toString(i), _param._bht_size_shifter);30 }31 if (_param._have_pht)32 {33 vhdl->set_signal ("signal_PREDICT_PHT_ACK_"+toString(i), 1);34 vhdl->set_signal ("signal_PREDICT_PHT_ADDRESS_"+toString(i), _param._pht_size_address);35 }36 }37 38 for (uint32_t i=0; i<_param._nb_branch_complete; i++)39 {40 if (_param._have_bht)41 {42 vhdl->set_signal ("signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i), 1);43 vhdl->set_signal ("signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i), _param._bht_size_address);44 }45 if (_param._have_pht)46 {47 vhdl->set_signal ("signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i), 1);48 vhdl->set_signal ("signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i), _param._pht_size_address);49 }50 }51 23 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","End"); 52 24 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp
r42 r44 21 21 log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","Begin"); 22 22 23 sc_start(0);23 // sc_start(0); 24 24 25 25 _interfaces->testbench();
Note: See TracChangeset
for help on using the changeset viewer.