Changeset 42 for 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_body.cpp
- Timestamp:
- Jul 5, 2007, 5:50:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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_body.cpp
r2 r42 18 18 19 19 20 void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl & vhdl)20 void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl * & vhdl) 21 21 { 22 22 log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_body","Begin"); 23 23 24 vhdl .set_body ("-- ack output");24 vhdl->set_body ("-- ack output"); 25 25 for (uint32_t i=0; i<_param._nb_prediction; i++) 26 26 { … … 28 28 29 29 if (_param._have_bht) 30 bht_ack = "in_PREDICT_ BHT_ACK_"+toString(i);30 bht_ack = "in_PREDICT_"+toString(i)+"_BHT_ACK"; 31 31 else 32 32 bht_ack = "'1'"; 33 33 34 34 if (_param._have_pht) 35 pht_ack = "in_PREDICT_ PHT_ACK_"+toString(i);35 pht_ack = "in_PREDICT_"+toString(i)+"_PHT_ACK"; 36 36 else 37 37 pht_ack = "'1'"; 38 38 39 vhdl .set_body ("out_PREDICT_ACK_"+toString(i)+"<= "+bht_ack+" and "+pht_ack+";");39 vhdl->set_body ("out_PREDICT_"+toString(i)+"_ACK <= "+bht_ack+" and "+pht_ack+";"); 40 40 } 41 41 … … 45 45 46 46 if (_param._have_bht) 47 bht_ack = "in_BRANCH_COMPLETE_ BHT_ACK_"+toString(i);47 bht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK"; 48 48 else 49 49 bht_ack = "'1'"; 50 50 51 51 if (_param._have_pht) 52 pht_ack = "in_BRANCH_COMPLETE_ PHT_ACK_"+toString(i);52 pht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK"; 53 53 else 54 54 pht_ack = "'1'"; 55 55 56 vhdl .set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"<= "+bht_ack+" and "+pht_ack+";");56 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_ACK <= "+bht_ack+" and "+pht_ack+";"); 57 57 } 58 58 59 vhdl .set_body ("");60 vhdl .set_body ("-- address output");59 vhdl->set_body (""); 60 vhdl->set_body ("-- address output"); 61 61 62 62 for (uint32_t i=0; i<_param._nb_prediction; i++) … … 64 64 // The address is higher than the address size of bht 65 65 if (_param._have_bht) 66 vhdl .set_body ("out_PREDICT_BHT_ADDRESS_"+toString(i)+" <= in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._bht_size_address)+";");66 vhdl->set_body ("out_PREDICT_"+toString(i)+"_BHT_ADDRESS <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";"); 67 67 68 68 if (_param._have_pht) … … 93 93 { 94 94 min = _param._pht_size_address_shift; 95 vhdl .set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(min) + " <= in_PREDICT_BHT_HISTORY_"+toString(i)+std_logic_range(min)+";");95 vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <= in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";"); 96 96 } 97 97 … … 99 99 { 100 100 max = _param._bht_size_history; 101 vhdl .set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1,max) + " <= in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");101 vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";"); 102 102 } 103 103 104 104 // intersection 105 105 if (_param._pht_size_address_share > 0) 106 vhdl .set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(max-1,min) + " <= in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_BHT_HISTORY_"+toString(i)+std_logic_range(max-1,min)+";");106 vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";"); 107 107 } 108 108 else 109 vhdl .set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+" <= in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address)+";");109 vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";"); 110 110 } 111 111 } … … 115 115 // The address is higher than the address size of bht 116 116 if (_param._have_bht) 117 vhdl .set_body ("out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+" <= in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._bht_size_address)+";");117 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";"); 118 118 119 119 if (_param._have_pht) … … 129 129 { 130 130 min = _param._pht_size_address_shift; 131 vhdl .set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(min) + " <= in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+std_logic_range(min)+";");131 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <= in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";"); 132 132 } 133 133 … … 135 135 { 136 136 max = _param._bht_size_history; 137 vhdl .set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1,max) + " <= in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");137 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";"); 138 138 } 139 139 140 140 // intersection 141 141 if (_param._pht_size_address_share > 0) 142 vhdl .set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(max-1,min) + " <= in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+std_logic_range(max-1,min)+";");142 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";"); 143 143 } 144 144 else 145 vhdl .set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+" <= in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address)+";");145 vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";"); 146 146 } 147 147 }
Note: See TracChangeset
for help on using the changeset viewer.