- Timestamp:
- Feb 1, 2011, 9:57:54 PM (13 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h
r139 r146 151 151 { 152 152 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_ONE_FIFO ))) == 0) or 153 (x.compare( "one_fifo")== 0))153 (x.compare(toString( morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_ONE_FIFO )) == 0)) 154 154 return morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_ONE_FIFO; 155 155 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_MULTI_FIFO))) == 0) or 156 (x.compare( "multi_fifo") == 0))156 (x.compare(toString( morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_MULTI_FIFO )) == 0)) 157 157 return morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_MULTI_FIFO; 158 158 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h
r82 r146 35 35 namespace morpheo { 36 36 namespace behavioural { 37 38 37 namespace core { 39 38 namespace multi_front_end { … … 41 40 namespace prediction_unit { 42 41 namespace branch_target_buffer { 43 44 42 45 43 class Branch_Target_Buffer -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/src/main.cpp
r111 r146 9 9 #include "Behavioural/include/Selftest.h" 10 10 11 #define NB_PARAMS 3+ 7*311 #define NB_PARAMS 3+8*3 12 12 13 13 void usage (int argc, char * argv[]) … … 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 err (_(" * nb_inst_predict (uint32_t)\n")); 18 err (_(" * nb_inst_update (uint32_t)\n")); 19 err (_(" * size_address (uint32_t)\n")); 20 err (_(" * have_bht [3] (bool )\n")); 21 err (_(" * bht_size_shifter [3] (uint32_t)\n")); 22 err (_(" * bht_nb_shifter [3] (uint32_t)\n")); 23 err (_(" * have_pht [3] (bool )\n")); 24 err (_(" * pht_size_counter [3] (uint32_t)\n")); 25 err (_(" * pht_nb_counter [3] (uint32_t)\n")); 26 err (_(" * pht_size_address_share [3] (uint32_t)\n")); 17 err (_(" * nb_inst_predict (uint32_t )\n")); 18 err (_(" * nb_inst_update (uint32_t )\n")); 19 err (_(" * size_address (uint32_t )\n")); 20 err (_(" * have_bht [3] (bool )\n")); 21 err (_(" * bht_size_shifter [3] (uint32_t )\n")); 22 err (_(" * bht_nb_shifter [3] (uint32_t )\n")); 23 err (_(" * have_pht [3] (bool )\n")); 24 err (_(" * pht_size_counter [3] (uint32_t )\n")); 25 err (_(" * pht_nb_counter [3] (uint32_t )\n")); 26 err (_(" * pht_size_address_share [3] (uint32_t )\n")); 27 err (_(" * pht_scheme [3] (Tpht_scheme_t)\n")); 27 28 exit (1); 28 29 } … … 40 41 41 42 string name = argv[x++]; 42 uint32_t _nb_inst_predict ; 43 uint32_t _nb_inst_update ; 44 uint32_t _size_address ; 45 bool _have_bht [3]; 46 uint32_t _bht_size_shifter [3]; 47 uint32_t _bht_nb_shifter [3]; 48 bool _have_pht [3]; 49 uint32_t _pht_size_counter [3]; 50 uint32_t _pht_nb_counter [3]; 51 uint32_t _pht_size_address_share [3]; 43 uint32_t _nb_inst_predict ; 44 uint32_t _nb_inst_update ; 45 uint32_t _size_address ; 46 bool _have_bht [3]; 47 uint32_t _bht_size_shifter [3]; 48 uint32_t _bht_nb_shifter [3]; 49 bool _have_pht [3]; 50 uint32_t _pht_size_counter [3]; 51 uint32_t _pht_nb_counter [3]; 52 uint32_t _pht_size_address_share [3]; 53 Tpht_scheme_t _pht_scheme [3]; 52 54 53 SELFTEST0(_nb_inst_predict ,uint32_t ,argv,x);54 SELFTEST0(_nb_inst_update ,uint32_t ,argv,x);55 SELFTEST0(_size_address ,uint32_t ,argv,x);55 SELFTEST0(_nb_inst_predict ,uint32_t ,argv,x); 56 SELFTEST0(_nb_inst_update ,uint32_t ,argv,x); 57 SELFTEST0(_size_address ,uint32_t ,argv,x); 56 58 57 59 for (uint32_t i=0; i<3; ++i) 58 60 { 59 SELFTEST0(_have_bht [i],bool ,argv,x); 60 SELFTEST0(_bht_size_shifter [i],uint32_t,argv,x); 61 SELFTEST0(_bht_nb_shifter [i],uint32_t,argv,x); 62 SELFTEST0(_have_pht [i],bool ,argv,x); 63 SELFTEST0(_pht_size_counter [i],uint32_t,argv,x); 64 SELFTEST0(_pht_nb_counter [i],uint32_t,argv,x); 65 SELFTEST0(_pht_size_address_share [i],uint32_t,argv,x); 61 SELFTEST0(_have_bht [i],bool ,argv,x); 62 SELFTEST0(_bht_size_shifter [i],uint32_t ,argv,x); 63 SELFTEST0(_bht_nb_shifter [i],uint32_t ,argv,x); 64 SELFTEST0(_have_pht [i],bool ,argv,x); 65 SELFTEST0(_pht_size_counter [i],uint32_t ,argv,x); 66 SELFTEST0(_pht_nb_counter [i],uint32_t ,argv,x); 67 SELFTEST0(_pht_size_address_share [i],uint32_t ,argv,x); 68 SELFTEST0(_pht_scheme [i],Tpht_scheme_t,argv,x); 66 69 } 67 70 … … 81 84 _pht_nb_counter , 82 85 _pht_size_address_share, 86 _pht_scheme , 83 87 true // is_toplevel 84 88 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/main.cpp
r111 r146 9 9 #include "Behavioural/include/Selftest.h" 10 10 11 #define NB_PARAMS 1 111 #define NB_PARAMS 12 12 12 13 13 void usage (int argc, char * argv[]) … … 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 err (_(" * nb_inst_predict (uint32_t)\n")); 18 err (_(" * nb_inst_update (uint32_t)\n")); 19 err (_(" * size_address (uint32_t)\n")); 20 err (_(" * have_bht (bool )\n")); 21 err (_(" * bht_size_shifter (uint32_t)\n")); 22 err (_(" * bht_nb_shifter (uint32_t)\n")); 23 err (_(" * have_pht (bool )\n")); 24 err (_(" * pht_size_counter (uint32_t)\n")); 25 err (_(" * pht_nb_counter (uint32_t)\n")); 26 err (_(" * pht_size_address_share (uint32_t)\n")); 27 err (_(" * update_on_prediction (bool )\n")); 17 err (_(" * nb_inst_predict (uint32_t )\n")); 18 err (_(" * nb_inst_update (uint32_t )\n")); 19 err (_(" * size_address (uint32_t )\n")); 20 err (_(" * have_bht (bool )\n")); 21 err (_(" * bht_size_shifter (uint32_t )\n")); 22 err (_(" * bht_nb_shifter (uint32_t )\n")); 23 err (_(" * have_pht (bool )\n")); 24 err (_(" * pht_size_counter (uint32_t )\n")); 25 err (_(" * pht_nb_counter (uint32_t )\n")); 26 err (_(" * pht_size_address_share (uint32_t )\n")); 27 err (_(" * pht_scheme (Tpht_scheme_t)\n")); 28 err (_(" * update_on_prediction (bool )\n")); 28 29 29 30 exit (1); … … 43 44 string name = argv[x++]; 44 45 45 uint32_t nb_inst_predict ; 46 uint32_t nb_inst_update ; 47 uint32_t size_address ; 48 bool have_bht ; 49 uint32_t bht_size_shifter ; 50 uint32_t bht_nb_shifter ; 51 bool have_pht ; 52 uint32_t pht_size_counter ; 53 uint32_t pht_nb_counter ; 54 uint32_t pht_size_address_share; 55 bool update_on_prediction ; 46 uint32_t nb_inst_predict ; 47 uint32_t nb_inst_update ; 48 uint32_t size_address ; 49 bool have_bht ; 50 uint32_t bht_size_shifter ; 51 uint32_t bht_nb_shifter ; 52 bool have_pht ; 53 uint32_t pht_size_counter ; 54 uint32_t pht_nb_counter ; 55 uint32_t pht_size_address_share; 56 Tpht_scheme_t pht_scheme ; 57 bool update_on_prediction ; 56 58 57 SELFTEST0(nb_inst_predict ,uint32_t,argv,x); 58 SELFTEST0(nb_inst_update ,uint32_t,argv,x); 59 SELFTEST0(size_address ,uint32_t,argv,x); 60 SELFTEST0(have_bht ,bool ,argv,x); 61 SELFTEST0(bht_size_shifter ,uint32_t,argv,x); 62 SELFTEST0(bht_nb_shifter ,uint32_t,argv,x); 63 SELFTEST0(have_pht ,bool ,argv,x); 64 SELFTEST0(pht_size_counter ,uint32_t,argv,x); 65 SELFTEST0(pht_nb_counter ,uint32_t,argv,x); 66 SELFTEST0(pht_size_address_share,uint32_t,argv,x); 67 SELFTEST0(update_on_prediction ,bool ,argv,x); 59 SELFTEST0(nb_inst_predict ,uint32_t ,argv,x); 60 SELFTEST0(nb_inst_update ,uint32_t ,argv,x); 61 SELFTEST0(size_address ,uint32_t ,argv,x); 62 SELFTEST0(have_bht ,bool ,argv,x); 63 SELFTEST0(bht_size_shifter ,uint32_t ,argv,x); 64 SELFTEST0(bht_nb_shifter ,uint32_t ,argv,x); 65 SELFTEST0(have_pht ,bool ,argv,x); 66 SELFTEST0(pht_size_counter ,uint32_t ,argv,x); 67 SELFTEST0(pht_nb_counter ,uint32_t ,argv,x); 68 SELFTEST0(pht_size_address_share,uint32_t ,argv,x); 69 SELFTEST0(pht_scheme ,Tpht_scheme_t,argv,x); 70 SELFTEST0(update_on_prediction ,bool ,argv,x); 68 71 69 72 int _return = EXIT_SUCCESS; … … 82 85 pht_nb_counter , 83 86 pht_size_address_share, 87 pht_scheme , 84 88 update_on_prediction , 85 89 true //is_toplevel -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h
r115 r146 27 27 { 28 28 //-----[ fields ]------------------------------------------------------------ 29 public : uint32_t _nb_inst_predict ; 30 public : uint32_t _nb_inst_update ; 31 public : uint32_t _size_address ; 32 public : bool _have_bht ; 33 public : uint32_t _bht_size_shifter ; 34 public : uint32_t _bht_nb_shifter ; 35 public : bool _have_pht ; 36 public : uint32_t _pht_size_counter ; 37 public : uint32_t _pht_nb_counter ; 38 public : uint32_t _pht_size_address_share ; 39 public : bool _update_on_prediction ; 40 41 public : Thistory_t _pht_counter_max ; 42 43 public : uint32_t _size_history ; 44 45 public : Thistory_t _bht_history_mask ; 46 public : Thistory_t _bht_history_shift ; 47 public : Thistory_t _pht_history_mask ; 48 public : Thistory_t _pht_history_shift ; 49 50 public : uint32_t _bht_size_address ; 51 public : uint32_t _pht_size_address ; 52 53 public : Taddress_t _bht_address_mask ; 54 public : uint32_t _pht_nb_bank ; 55 public : uint32_t _pht_size_bank ; 56 public : Taddress_t _pht_address_share_mask ; 57 public : Taddress_t _pht_address_share_shift ; 58 public : Taddress_t _pht_address_bank_mask ; 59 public : Taddress_t _pht_address_bank_shift ; 29 public : uint32_t _nb_inst_predict ; 30 public : uint32_t _nb_inst_update ; 31 public : uint32_t _size_address ; 32 public : bool _have_bht ; 33 public : uint32_t _bht_size_shifter ; 34 public : uint32_t _bht_nb_shifter ; 35 public : bool _have_pht ; 36 public : uint32_t _pht_size_counter ; 37 public : uint32_t _pht_nb_counter ; 38 public : uint32_t _pht_size_address_share ; 39 public : Tpht_scheme_t _pht_scheme ; 40 public : bool _update_on_prediction ; 60 41 61 public : Thistory_t _bht_init_take ; 62 public : Thistory_t _bht_init_ntake ; 63 64 public : Thistory_t _pht_init_take ; 65 public : Thistory_t _pht_init_ntake ; 42 public : Thistory_t _pht_counter_max ; 43 public : Thistory_t _pht_threshold_up ; 44 public : Thistory_t _pht_threshold_down ; 45 46 public : uint32_t _size_history ; 47 48 public : Thistory_t _bht_history_mask ; 49 public : Thistory_t _bht_history_shift ; 50 public : Thistory_t _pht_history_mask ; 51 public : Thistory_t _pht_history_shift ; 52 53 public : uint32_t _bht_size_address ; 54 public : uint32_t _pht_size_address ; 55 public : Taddress_t _bht_address_mask ; 56 public : uint32_t _pht_nb_bank ; 57 public : uint32_t _pht_size_bank ; 58 public : Taddress_t _pht_address_share_mask ; 59 public : Taddress_t _pht_address_share_shift ; 60 public : Taddress_t _pht_address_bank_mask ; 61 public : Taddress_t _pht_address_bank_shift ; 62 63 public : Thistory_t _bht_init_take ; 64 public : Thistory_t _bht_init_ntake ; 65 66 public : Thistory_t _pht_init_take ; 67 public : Thistory_t _pht_init_ntake ; 66 68 67 69 //-----[ methods ]----------------------------------------------------------- 68 public : Parameters (uint32_t nb_inst_predict , 69 uint32_t nb_inst_update , 70 uint32_t size_address , 71 bool have_bht , 72 uint32_t bht_size_shifter , 73 uint32_t bht_nb_shifter , 74 bool have_pht , 75 uint32_t pht_size_counter , 76 uint32_t pht_nb_counter , 77 uint32_t pht_size_address_share, 78 bool update_on_prediction , 79 bool is_toplevel=false); 70 public : Parameters (uint32_t nb_inst_predict , 71 uint32_t nb_inst_update , 72 uint32_t size_address , 73 bool have_bht , 74 uint32_t bht_size_shifter , 75 uint32_t bht_nb_shifter , 76 bool have_pht , 77 uint32_t pht_size_counter , 78 uint32_t pht_nb_counter , 79 uint32_t pht_size_address_share, 80 Tpht_scheme_t pht_scheme , 81 bool update_on_prediction , 82 bool is_toplevel=false); 80 83 //public : Parameters (Parameters & param) ; 81 84 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h
r110 r146 21 21 namespace two_level_branch_predictor { 22 22 23 24 23 }; // end namespace two_level_branch_predictor 25 24 }; // end namespace meta_predictor … … 29 28 }; // end namespace multi_front_end 30 29 }; // end namespace core 31 32 30 }; // end namespace behavioural 33 31 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp
r124 r146 22 22 #undef FUNCTION 23 23 #define FUNCTION "Two_Level_Branch_Predictor::Parameters" 24 Parameters::Parameters (uint32_t nb_inst_predict , 25 uint32_t nb_inst_update , 26 uint32_t size_address , 27 bool have_bht , 28 uint32_t bht_size_shifter , 29 uint32_t bht_nb_shifter , 30 bool have_pht , 31 uint32_t pht_size_counter , 32 uint32_t pht_nb_counter , 33 uint32_t pht_size_address_share, 34 bool update_on_prediction , 35 bool is_toplevel) 24 Parameters::Parameters (uint32_t nb_inst_predict , 25 uint32_t nb_inst_update , 26 uint32_t size_address , 27 bool have_bht , 28 uint32_t bht_size_shifter , 29 uint32_t bht_nb_shifter , 30 bool have_pht , 31 uint32_t pht_size_counter , 32 uint32_t pht_nb_counter , 33 uint32_t pht_size_address_share, 34 Tpht_scheme_t pht_scheme , 35 bool update_on_prediction , 36 bool is_toplevel) 36 37 { 37 38 log_begin(Two_Level_Branch_Predictor,FUNCTION); … … 47 48 _pht_nb_counter = (have_pht)?(pht_nb_counter ):0; 48 49 _pht_size_address_share = (have_bht and have_pht)?(pht_size_address_share):0; 50 _pht_scheme = pht_scheme ; 49 51 _update_on_prediction = update_on_prediction ; 50 52 … … 97 99 { 98 100 _pht_counter_max = (1<<_pht_size_counter)-1; 99 101 _pht_threshold_up = (1<<(_pht_size_counter-1))+1; 102 _pht_threshold_down = (1<<(_pht_size_counter-1))-1; 103 100 104 _pht_size_bank = (_have_bht)?(1<<_bht_size_shifter):1; 101 105 _pht_nb_bank = _pht_nb_counter / _pht_size_bank; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters_print.cpp
r110 r146 9 9 #include "Behavioural/include/XML.h" 10 10 11 namespace morpheo 11 namespace morpheo { 12 12 namespace behavioural { 13 13 namespace core { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp
r124 r146 10 10 // #include <assert.h> 11 11 12 namespace morpheo 12 namespace morpheo { 13 13 namespace behavioural { 14 14 namespace core { … … 77 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %llx",pht_history); 78 78 79 // TODO -> don't change PHT here ! 80 Thistory_t min = 0; 81 Thistory_t max = _param->_pht_counter_max; 82 79 83 // PHT : saturation counter 80 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 81 84 switch (_param->_pht_scheme) 85 { 86 case PHT_SCHEME_COUNTER : 87 { 88 pht_history = (direction==1)?((pht_history<max)?(pht_history+1):(max)):((pht_history>min)?(pht_history-1):(min)); 89 break; 90 } 91 case PHT_SCHEME_FSM : 92 { 93 Thistory_t down = _param->_pht_threshold_down; 94 Thistory_t up = _param->_pht_threshold_up; 95 96 pht_history = (direction==1)?(((pht_history==max) or (pht_history==up))?(max):(pht_history+1)):(((pht_history==min) or (pht_history==down))?(min):(pht_history-1)); 97 break; 98 } 99 default : 100 { 101 break; 102 } 103 } 104 82 105 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %llx",pht_history); 83 106 … … 169 192 else 170 193 { 171 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 194 Thistory_t min = 0; 195 Thistory_t max = _param->_pht_counter_max; 196 197 // PHT : saturation counter 198 switch (_param->_pht_scheme) 199 { 200 case PHT_SCHEME_COUNTER : 201 { 202 // [ 11 ] -- NT -> [ 10 ] 203 // [ ] <- T -- [ ] 204 // ^ | 205 // | | 206 // T NT 207 // | | 208 // | V 209 // [ 00 ] -- T -> [ 01 ] 210 // [ ] <- NT -- [ ] 211 212 pht_history = (direction==1)?((pht_history<max)?(pht_history+1):(max)):((pht_history>min)?(pht_history-1):(min)); 213 break; 214 } 215 case PHT_SCHEME_FSM : 216 { 217 // [11] -- NT -> [10] 218 // [ ] <- T -- [ ] 219 // ^ | 220 // | | 221 // T NT 222 // | | 223 // | V 224 // [00] -- NT -> [00] 225 // [ ] <- T -- [ ] 226 227 Thistory_t down = _param->_pht_threshold_down; 228 Thistory_t up = _param->_pht_threshold_up; 229 230 pht_history = (direction==1)?(((pht_history==max) or (pht_history==up))?(max):(pht_history+1)):(((pht_history==min) or (pht_history==down))?(min):(pht_history-1)); 231 break; 232 } 233 default : 234 { 235 break; 236 } 237 } 172 238 } 173 239 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h
r111 r146 15 15 #include "Common/include/Debug.h" 16 16 17 18 17 namespace morpheo { 19 18 namespace behavioural { … … 25 24 namespace meta_predictor { 26 25 27 28 26 class Parameters : public morpheo::behavioural::Parameters 29 27 { 30 28 //-----[ fields ]------------------------------------------------------------ 31 public : uint32_t _nb_inst_predict ;32 public : uint32_t _nb_inst_update ;33 public : uint32_t _size_address ;34 public : bool _have_bht [3];35 public : uint32_t _bht_size_shifter [3];36 public : uint32_t _bht_nb_shifter [3];37 public : bool _have_pht [3];38 public : uint32_t _pht_size_counter [3];39 public : uint32_t _pht_nb_counter [3];40 public : uint32_t _pht_size_address_share [3];41 42 public : bool _have_meta_predictor ;43 public : uint32_t _nb_predictor ;44 45 public : bool * _predictor_update_on_prediction;//[nb_predictor]46 public : uint32_t * _predictor_size_history ;//[nb_predictor]47 public : uint32_t _size_history ;29 public : uint32_t _nb_inst_predict ; 30 public : uint32_t _nb_inst_update ; 31 public : uint32_t _size_address ; 32 public : bool _have_bht [3]; 33 public : uint32_t _bht_size_shifter [3]; 34 public : uint32_t _bht_nb_shifter [3]; 35 public : bool _have_pht [3]; 36 public : uint32_t _pht_size_counter [3]; 37 public : uint32_t _pht_nb_counter [3]; 38 public : uint32_t _pht_size_address_share [3]; 39 public : Tpht_scheme_t _pht_scheme [3]; 40 public : bool _have_meta_predictor ; 41 public : uint32_t _nb_predictor ; 42 43 public : bool * _predictor_update_on_prediction;//[nb_predictor] 44 public : uint32_t * _predictor_size_history ;//[nb_predictor] 45 public : uint32_t _size_history ; 48 46 49 47 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters ** _param_two_level_branch_predictor;//[nb_predictor] … … 51 49 52 50 //-----[ methods ]----------------------------------------------------------- 53 public : Parameters (uint32_t nb_inst_predict , 54 uint32_t nb_inst_update , 55 uint32_t size_address , 56 bool have_bht [3], 57 uint32_t bht_size_shifter [3], 58 uint32_t bht_nb_shifter [3], 59 bool have_pht [3], 60 uint32_t pht_size_counter [3], 61 uint32_t pht_nb_counter [3], 62 uint32_t pht_size_address_share [3], 63 bool is_toplevel=false); 51 public : Parameters (uint32_t nb_inst_predict , 52 uint32_t nb_inst_update , 53 uint32_t size_address , 54 bool have_bht [3], 55 uint32_t bht_size_shifter [3], 56 uint32_t bht_nb_shifter [3], 57 bool have_pht [3], 58 uint32_t pht_size_counter [3], 59 uint32_t pht_nb_counter [3], 60 uint32_t pht_size_address_share [3], 61 Tpht_scheme_t pht_scheme [3], 62 bool is_toplevel=false); 64 63 //public : Parameters (Parameters & param) ; 65 64 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp
r128 r146 21 21 #undef FUNCTION 22 22 #define FUNCTION "Meta_Predictor::Parameters" 23 Parameters::Parameters (uint32_t nb_inst_predict , 24 uint32_t nb_inst_update , 25 uint32_t size_address , 26 bool have_bht [3], 27 uint32_t bht_size_shifter [3], 28 uint32_t bht_nb_shifter [3], 29 bool have_pht [3], 30 uint32_t pht_size_counter [3], 31 uint32_t pht_nb_counter [3], 32 uint32_t pht_size_address_share [3], 33 bool is_toplevel) 23 Parameters::Parameters (uint32_t nb_inst_predict , 24 uint32_t nb_inst_update , 25 uint32_t size_address , 26 bool have_bht [3], 27 uint32_t bht_size_shifter [3], 28 uint32_t bht_nb_shifter [3], 29 bool have_pht [3], 30 uint32_t pht_size_counter [3], 31 uint32_t pht_nb_counter [3], 32 uint32_t pht_size_address_share [3], 33 Tpht_scheme_t pht_scheme [3], 34 bool is_toplevel) 34 35 { 35 36 log_begin(Meta_Predictor,FUNCTION); … … 47 48 _pht_nb_counter [i] = (_have_pht [i])?pht_nb_counter [i]:0; 48 49 _pht_size_address_share [i] = (_have_bht[i] and _have_pht [i])?pht_size_address_share [i]:0; 50 _pht_scheme [i] = (_have_pht [i])?pht_scheme [i]:PHT_SCHEME_COUNTER; 49 51 } 50 52 … … 83 85 _pht_nb_counter [i], 84 86 _pht_size_address_share [i], 85 _predictor_update_on_prediction [i] 87 _pht_scheme [i], 88 _predictor_update_on_prediction [i] 86 89 ); 87 90 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters_print.cpp
r110 r146 17 17 namespace direction { 18 18 namespace meta_predictor { 19 20 19 21 20 #undef FUNCTION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/main.cpp
r88 r146 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 2 510 #define NB_PARAMS 28 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * predictor_scheme (Tpredictor_t)\n")); 17 err (_(" * nb_inst_predict (uint32_t )\n")); 18 err (_(" * nb_inst_update (uint32_t )\n")); 19 err (_(" * size_address (uint32_t )\n")); 20 err (_(" * have_bht [3] (bool )\n")); 21 err (_(" * bht_size_shifter [3] (uint32_t )\n")); 22 err (_(" * bht_nb_shifter [3] (uint32_t )\n")); 23 err (_(" * have_pht [3] (bool )\n")); 24 err (_(" * pht_size_counter [3] (uint32_t )\n")); 25 err (_(" * pht_nb_counter [3] (uint32_t )\n")); 26 err (_(" * pht_size_address_share [3] (uint32_t )\n")); 16 err (_(" * predictor_scheme (Tpredictor_t )\n")); 17 err (_(" * nb_inst_predict (uint32_t )\n")); 18 err (_(" * nb_inst_update (uint32_t )\n")); 19 err (_(" * size_address (uint32_t )\n")); 20 err (_(" * have_bht [3] (bool )\n")); 21 err (_(" * bht_size_shifter [3] (uint32_t )\n")); 22 err (_(" * bht_nb_shifter [3] (uint32_t )\n")); 23 err (_(" * have_pht [3] (bool )\n")); 24 err (_(" * pht_size_counter [3] (uint32_t )\n")); 25 err (_(" * pht_nb_counter [3] (uint32_t )\n")); 26 err (_(" * pht_size_address_share [3] (uint32_t )\n")); 27 err (_(" * pht_scheme [3] (Tpht_scheme_t)\n")); 27 28 28 29 exit (1); … … 42 43 string name = argv[x++]; 43 44 44 Tpredictor_t _predictor_scheme = fromString<Tpredictor_t>(argv[x++]); 45 uint32_t _nb_inst_predict = fromString<uint32_t >(argv[x++]); 46 uint32_t _nb_inst_update = fromString<uint32_t >(argv[x++]); 47 uint32_t _size_address = fromString<uint32_t >(argv[x++]); 48 bool _have_bht [3]; 49 uint32_t _bht_size_shifter [3]; 50 uint32_t _bht_nb_shifter [3]; 51 bool _have_pht [3]; 52 uint32_t _pht_size_counter [3]; 53 uint32_t _pht_nb_counter [3]; 54 uint32_t _pht_size_address_share [3]; 45 Tpredictor_t _predictor_scheme = fromString<Tpredictor_t>(argv[x++]); 46 uint32_t _nb_inst_predict = fromString<uint32_t >(argv[x++]); 47 uint32_t _nb_inst_update = fromString<uint32_t >(argv[x++]); 48 uint32_t _size_address = fromString<uint32_t >(argv[x++]); 49 bool _have_bht [3]; 50 uint32_t _bht_size_shifter [3]; 51 uint32_t _bht_nb_shifter [3]; 52 bool _have_pht [3]; 53 uint32_t _pht_size_counter [3]; 54 uint32_t _pht_nb_counter [3]; 55 uint32_t _pht_size_address_share [3]; 56 Tpht_scheme_t _pht_scheme [3]; 55 57 56 58 for (uint32_t i=0; i<3; i++) 57 59 { 58 _have_bht [i] = fromString<bool >(argv[x++]); 59 _bht_size_shifter [i] = fromString<uint32_t>(argv[x++]); 60 _bht_nb_shifter [i] = fromString<uint32_t>(argv[x++]); 61 _have_pht [i] = fromString<bool >(argv[x++]); 62 _pht_size_counter [i] = fromString<uint32_t>(argv[x++]); 63 _pht_nb_counter [i] = fromString<uint32_t>(argv[x++]); 64 _pht_size_address_share [i] = fromString<uint32_t>(argv[x++]); 60 _have_bht [i] = fromString<bool >(argv[x++]); 61 _bht_size_shifter [i] = fromString<uint32_t >(argv[x++]); 62 _bht_nb_shifter [i] = fromString<uint32_t >(argv[x++]); 63 _have_pht [i] = fromString<bool >(argv[x++]); 64 _pht_size_counter [i] = fromString<uint32_t >(argv[x++]); 65 _pht_nb_counter [i] = fromString<uint32_t >(argv[x++]); 66 _pht_size_address_share [i] = fromString<uint32_t >(argv[x++]); 67 _pht_scheme [i] = fromString<Tpht_scheme_t >(argv[x++]); 65 68 } 66 69 … … 80 83 _pht_nb_counter , 81 84 _pht_size_address_share, 85 _pht_scheme , 82 86 true // is_toplevel 83 87 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h
r111 r146 24 24 namespace direction { 25 25 26 27 26 class Parameters : public morpheo::behavioural::Parameters 28 27 { 29 28 //-----[ fields ]------------------------------------------------------------ 30 public : Tpredictor_t _predictor_scheme ; 31 public : uint32_t _nb_inst_predict ; 32 public : uint32_t _nb_inst_update ; 33 //public : uint32_t _size_address ; 34 public : bool _have_bht [3]; 35 public : uint32_t _bht_size_shifter [3]; 36 public : uint32_t _bht_nb_shifter [3]; 37 public : bool _have_pht [3]; 38 public : uint32_t _pht_size_counter [3]; 39 public : uint32_t _pht_nb_counter [3]; 40 public : uint32_t _pht_size_address_share [3]; 29 public : Tpredictor_t _predictor_scheme ; 30 public : uint32_t _nb_inst_predict ; 31 public : uint32_t _nb_inst_update ; 32 //public : uint32_t _size_address ; 33 public : bool _have_bht [3]; 34 public : uint32_t _bht_size_shifter [3]; 35 public : uint32_t _bht_nb_shifter [3]; 36 public : bool _have_pht [3]; 37 public : uint32_t _pht_size_counter [3]; 38 public : uint32_t _pht_nb_counter [3]; 39 public : uint32_t _pht_size_address_share [3]; 40 public : Tpht_scheme_t _pht_scheme [3]; 41 41 42 public : uint32_t _size_history;43 44 public : bool _have_component_meta_predictor;45 public : bool _have_port_history;42 public : uint32_t _size_history; 43 44 public : bool _have_component_meta_predictor; 45 public : bool _have_port_history; 46 46 47 47 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters * _param_glue; … … 49 49 50 50 //-----[ methods ]----------------------------------------------------------- 51 public : Parameters (Tpredictor_t predictor_scheme , 52 uint32_t nb_inst_predict , 53 uint32_t nb_inst_update , 54 uint32_t size_address , 55 bool have_bht [3], 56 uint32_t bht_size_shifter [3], 57 uint32_t bht_nb_shifter [3], 58 bool have_pht [3], 59 uint32_t pht_size_counter [3], 60 uint32_t pht_nb_counter [3], 61 uint32_t pht_size_address_share [3], 62 bool is_toplevel=false 51 public : Parameters (Tpredictor_t predictor_scheme , 52 uint32_t nb_inst_predict , 53 uint32_t nb_inst_update , 54 uint32_t size_address , 55 bool have_bht [3], 56 uint32_t bht_size_shifter [3], 57 uint32_t bht_nb_shifter [3], 58 bool have_pht [3], 59 uint32_t pht_size_counter [3], 60 uint32_t pht_nb_counter [3], 61 uint32_t pht_size_address_share [3], 62 Tpht_scheme_t pht_scheme [3], 63 bool is_toplevel=false 63 64 ); 64 65 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters.cpp
r111 r146 19 19 #undef FUNCTION 20 20 #define FUNCTION "Direction::Parameters" 21 Parameters::Parameters (Tpredictor_t predictor_scheme , 22 uint32_t nb_inst_predict , 23 uint32_t nb_inst_update , 24 uint32_t size_address , 25 bool have_bht [3], 26 uint32_t bht_size_shifter [3], 27 uint32_t bht_nb_shifter [3], 28 bool have_pht [3], 29 uint32_t pht_size_counter [3], 30 uint32_t pht_nb_counter [3], 31 uint32_t pht_size_address_share [3], 32 bool is_toplevel) 21 Parameters::Parameters (Tpredictor_t predictor_scheme , 22 uint32_t nb_inst_predict , 23 uint32_t nb_inst_update , 24 uint32_t size_address , 25 bool have_bht [3], 26 uint32_t bht_size_shifter [3], 27 uint32_t bht_nb_shifter [3], 28 bool have_pht [3], 29 uint32_t pht_size_counter [3], 30 uint32_t pht_nb_counter [3], 31 uint32_t pht_size_address_share [3], 32 Tpht_scheme_t pht_scheme [3], 33 bool is_toplevel) 33 34 { 34 35 log_printf(FUNC,Direction,FUNCTION,"Begin"); … … 48 49 _pht_nb_counter [i] = pht_nb_counter [i]; 49 50 _pht_size_address_share [i] = pht_size_address_share [i]; 51 _pht_scheme [i] = pht_scheme [i]; 50 52 } 51 53 … … 148 150 _pht_size_counter , 149 151 _pht_nb_counter , 150 _pht_size_address_share 152 _pht_size_address_share, 153 _pht_scheme 151 154 ); 152 155 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters_print.cpp
r88 r146 51 51 xml.singleton_begin("predictor_"+toString(i)+"_pht_nb_counter "); xml.attribut("value",toString(_pht_nb_counter [i])); xml.singleton_end(); 52 52 xml.singleton_begin("predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_pht_size_address_share [i])); xml.singleton_end(); 53 xml.singleton_begin("predictor_"+toString(i)+"_pht_scheme "); xml.attribut("value",toString(_pht_scheme [i])); xml.singleton_end(); 53 54 } 54 55 xml.balise_close(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp
r111 r146 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS (12+3* 7)10 #define NB_PARAMS (12+3*8) 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_decod_unit (uint32_t )\n")); 18 err (_(" * size_address (uint32_t )\n")); 19 err (_(" * nb_instruction [nb_context] (uint32_t )\n")); 20 err (_(" * nb_inst_decod [nb_decod_unit](uint32_t )\n")); 21 err (_(" * nb_inst_branch_predict (uint32_t )\n")); 22 err (_(" * nb_inst_branch_decod (uint32_t )\n")); 23 err (_(" * nb_inst_branch_update (uint32_t )\n")); 24 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 25 err (_(" * btb_size_queue (uint32_t )\n")); 26 err (_(" * btb_associativity (uint32_t )\n")); 27 err (_(" * btb_size_counter (uint32_t )\n")); 28 err (_(" * btb_victim_scheme (Tvictim_t )\n")); 29 err (_(" * dir_predictor_scheme (Tpredictor_t)\n")); 30 err (_(" * dir_have_bht [3] (bool )\n")); 31 err (_(" * dir_bht_size_shifter [3] (uint32_t )\n")); 32 err (_(" * dir_bht_nb_shifter [3] (uint32_t )\n")); 33 err (_(" * dir_have_pht [3] (bool )\n")); 34 err (_(" * dir_pht_size_counter [3] (uint32_t )\n")); 35 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 36 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 37 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 38 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); 39 err (_(" * ufpt_size_queue [nb_context] (uint32_t )\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_decod_unit (uint32_t )\n")); 18 err (_(" * size_address (uint32_t )\n")); 19 err (_(" * nb_instruction [nb_context] (uint32_t )\n")); 20 err (_(" * nb_inst_decod [nb_decod_unit](uint32_t )\n")); 21 err (_(" * nb_inst_branch_predict (uint32_t )\n")); 22 err (_(" * nb_inst_branch_decod (uint32_t )\n")); 23 err (_(" * nb_inst_branch_update (uint32_t )\n")); 24 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 25 err (_(" * btb_size_queue (uint32_t )\n")); 26 err (_(" * btb_associativity (uint32_t )\n")); 27 err (_(" * btb_size_counter (uint32_t )\n")); 28 err (_(" * btb_victim_scheme (Tvictim_t )\n")); 29 err (_(" * dir_predictor_scheme (Tpredictor_t )\n")); 30 err (_(" * dir_have_bht [3] (bool )\n")); 31 err (_(" * dir_bht_size_shifter [3] (uint32_t )\n")); 32 err (_(" * dir_bht_nb_shifter [3] (uint32_t )\n")); 33 err (_(" * dir_have_pht [3] (bool )\n")); 34 err (_(" * dir_pht_size_counter [3] (uint32_t )\n")); 35 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 36 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 37 err (_(" * dir_pht_scheme [3] (Tpht_scheme_t)\n")); 38 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 39 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); 40 err (_(" * ufpt_size_queue [nb_context] (uint32_t )\n")); 40 41 41 42 exit (1); … … 97 98 for (uint32_t i=0; i<3; i++) 98 99 _dir_pht_size_address_share [i] = fromString<uint32_t >(argv[x++]); 100 Tpht_scheme_t _dir_pht_scheme [3]; 101 for (uint32_t i=0; i<3; i++) 102 _dir_pht_scheme [i] = fromString<Tpht_scheme_t>(argv[x++]); 99 103 uint32_t * _ras_size_queue = new uint32_t [_nb_context]; 100 104 for (uint32_t i=0; i<_nb_context; i++) … … 137 141 _dir_pht_nb_counter , 138 142 _dir_pht_size_address_share, 143 _dir_pht_scheme , 139 144 _ras_size_queue , 140 145 _upt_size_queue , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r145 r146 364 364 // reg_UPT_EVENT_STATE [context] = UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT; 365 365 366 // // @@@367 366 // // // Have an actual event ? 368 367 // // if (not reg_EVENT_VAL [context]) … … 629 628 reg_UPT_UPDATE [context] = (depth+1)%_param->_size_upt_queue[context]; 630 629 } 631 630 // @@@ 632 631 // special case : 633 632 if ((upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) and … … 636 635 reg_UPT_TOP [context] = reg_UPT_TOP_EVENT [context]; 637 636 reg_UPT_UPDATE [context] = reg_UPT_TOP_EVENT [context]; 637 reg_IS_ACCURATE [context] = true; 638 639 upt_event_state = UPT_EVENT_STATE_OK; 640 } 641 642 if ((ok and (upt_event_state == UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT)) and 643 (depth == reg_EVENT_DEPTH [context])) 644 { 645 // reg_UPT_TOP [context] = reg_UPT_TOP_EVENT [context]; 646 // reg_UPT_UPDATE [context] = reg_UPT_TOP_EVENT [context]; 638 647 reg_IS_ACCURATE [context] = true; 639 648 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h
r111 r146 28 28 { 29 29 //-----[ fields ]------------------------------------------------------------ 30 public : uint32_t _nb_context ; 31 public : uint32_t _nb_decod_unit ; 32 public : uint32_t _size_address ; 33 public : uint32_t * _nb_instruction ;//[nb_context] 34 public : uint32_t * _nb_inst_decod ;//[nb_decod_unit] 35 public : uint32_t _nb_inst_branch_predict ; 36 public : uint32_t _nb_inst_branch_decod ; 37 public : uint32_t _nb_inst_branch_update ; 38 public : uint32_t _nb_inst_branch_complete ; 39 public : uint32_t _btb_size_queue ; 40 public : uint32_t _btb_associativity ; 41 public : uint32_t _btb_size_counter ; 42 public : Tvictim_t _btb_victim_scheme ; 43 public : Tpredictor_t _dir_predictor_scheme ; 44 public : bool _dir_have_bht [3]; 45 public : uint32_t _dir_bht_size_shifter [3]; 46 public : uint32_t _dir_bht_nb_shifter [3]; 47 public : bool _dir_have_pht [3]; 48 public : uint32_t _dir_pht_size_counter [3]; 49 public : uint32_t _dir_pht_nb_counter [3]; 50 public : uint32_t _dir_pht_size_address_share [3]; 51 public : uint32_t * _ras_size_queue ;//[nb_context] 52 public : uint32_t * _upt_size_queue ;//[nb_context] 53 public : uint32_t * _ufpt_size_queue ;//[nb_context] 54 public : uint32_t _nb_thread ; 55 public : uint32_t * _translate_num_context_to_num_thread;//[nb_context] 30 public : uint32_t _nb_context ; 31 public : uint32_t _nb_decod_unit ; 32 public : uint32_t _size_address ; 33 public : uint32_t * _nb_instruction ;//[nb_context] 34 public : uint32_t * _nb_inst_decod ;//[nb_decod_unit] 35 public : uint32_t _nb_inst_branch_predict ; 36 public : uint32_t _nb_inst_branch_decod ; 37 public : uint32_t _nb_inst_branch_update ; 38 public : uint32_t _nb_inst_branch_complete ; 39 public : uint32_t _btb_size_queue ; 40 public : uint32_t _btb_associativity ; 41 public : uint32_t _btb_size_counter ; 42 public : Tvictim_t _btb_victim_scheme ; 43 public : Tpredictor_t _dir_predictor_scheme ; 44 public : bool _dir_have_bht [3]; 45 public : uint32_t _dir_bht_size_shifter [3]; 46 public : uint32_t _dir_bht_nb_shifter [3]; 47 public : bool _dir_have_pht [3]; 48 public : uint32_t _dir_pht_size_counter [3]; 49 public : uint32_t _dir_pht_nb_counter [3]; 50 public : uint32_t _dir_pht_size_address_share [3]; 51 public : Tpht_scheme_t _dir_pht_scheme [3]; 52 public : uint32_t * _ras_size_queue ;//[nb_context] 53 public : uint32_t * _upt_size_queue ;//[nb_context] 54 public : uint32_t * _ufpt_size_queue ;//[nb_context] 55 public : uint32_t _nb_thread ; 56 public : uint32_t * _translate_num_context_to_num_thread;//[nb_context] 56 57 57 58 … … 78 79 79 80 //-----[ methods ]----------------------------------------------------------- 80 public : Parameters (uint32_t nb_context , 81 uint32_t nb_decod_unit , 82 uint32_t size_address , 83 uint32_t * nb_instruction ,//[nb_context] 84 uint32_t * nb_inst_decod ,//[nb_decod_unit] 85 uint32_t nb_inst_branch_predict , 86 uint32_t nb_inst_branch_decod , 87 uint32_t nb_inst_branch_update , 88 uint32_t nb_inst_branch_complete , 89 uint32_t btb_size_queue , 90 uint32_t btb_associativity , 91 uint32_t btb_size_counter , 92 Tvictim_t btb_victim_scheme , 93 Tpredictor_t dir_predictor_scheme , 94 bool dir_have_bht [3], 95 uint32_t dir_bht_size_shifter [3], 96 uint32_t dir_bht_nb_shifter [3], 97 bool dir_have_pht [3], 98 uint32_t dir_pht_size_counter [3], 99 uint32_t dir_pht_nb_counter [3], 100 uint32_t dir_pht_size_address_share [3], 101 uint32_t * ras_size_queue ,//[nb_context] 102 uint32_t * upt_size_queue ,//[nb_context] 103 uint32_t * ufpt_size_queue ,//[nb_context] 104 uint32_t nb_thread , 105 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 106 bool is_toplevel=false 81 public : Parameters (uint32_t nb_context , 82 uint32_t nb_decod_unit , 83 uint32_t size_address , 84 uint32_t * nb_instruction ,//[nb_context] 85 uint32_t * nb_inst_decod ,//[nb_decod_unit] 86 uint32_t nb_inst_branch_predict , 87 uint32_t nb_inst_branch_decod , 88 uint32_t nb_inst_branch_update , 89 uint32_t nb_inst_branch_complete , 90 uint32_t btb_size_queue , 91 uint32_t btb_associativity , 92 uint32_t btb_size_counter , 93 Tvictim_t btb_victim_scheme , 94 Tpredictor_t dir_predictor_scheme , 95 bool dir_have_bht [3], 96 uint32_t dir_bht_size_shifter [3], 97 uint32_t dir_bht_nb_shifter [3], 98 bool dir_have_pht [3], 99 uint32_t dir_pht_size_counter [3], 100 uint32_t dir_pht_nb_counter [3], 101 uint32_t dir_pht_size_address_share [3], 102 Tpht_scheme_t dir_pht_scheme [3], 103 uint32_t * ras_size_queue ,//[nb_context] 104 uint32_t * upt_size_queue ,//[nb_context] 105 uint32_t * ufpt_size_queue ,//[nb_context] 106 uint32_t nb_thread , 107 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 108 bool is_toplevel=false 107 109 ); 108 110 // public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
r111 r146 19 19 #undef FUNCTION 20 20 #define FUNCTION "Prediction_unit::Parameters" 21 Parameters::Parameters (uint32_t nb_context , 22 uint32_t nb_decod_unit , 23 uint32_t size_address , 24 uint32_t * nb_instruction ,//[nb_context] 25 uint32_t * nb_inst_decod ,//[nb_decod_unit] 26 uint32_t nb_inst_branch_predict , 27 uint32_t nb_inst_branch_decod , 28 uint32_t nb_inst_branch_update , 29 uint32_t nb_inst_branch_complete , 30 uint32_t btb_size_queue , 31 uint32_t btb_associativity , 32 uint32_t btb_size_counter , 33 Tvictim_t btb_victim_scheme , 34 Tpredictor_t dir_predictor_scheme , 35 bool dir_have_bht [3], 36 uint32_t dir_bht_size_shifter [3], 37 uint32_t dir_bht_nb_shifter [3], 38 bool dir_have_pht [3], 39 uint32_t dir_pht_size_counter [3], 40 uint32_t dir_pht_nb_counter [3], 41 uint32_t dir_pht_size_address_share [3], 42 uint32_t * ras_size_queue ,//[nb_context] 43 uint32_t * upt_size_queue ,//[nb_context] 44 uint32_t * ufpt_size_queue ,//[nb_context] 45 uint32_t nb_thread , 46 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 47 bool is_toplevel 21 Parameters::Parameters (uint32_t nb_context , 22 uint32_t nb_decod_unit , 23 uint32_t size_address , 24 uint32_t * nb_instruction ,//[nb_context] 25 uint32_t * nb_inst_decod ,//[nb_decod_unit] 26 uint32_t nb_inst_branch_predict , 27 uint32_t nb_inst_branch_decod , 28 uint32_t nb_inst_branch_update , 29 uint32_t nb_inst_branch_complete , 30 uint32_t btb_size_queue , 31 uint32_t btb_associativity , 32 uint32_t btb_size_counter , 33 Tvictim_t btb_victim_scheme , 34 Tpredictor_t dir_predictor_scheme , 35 bool dir_have_bht [3], 36 uint32_t dir_bht_size_shifter [3], 37 uint32_t dir_bht_nb_shifter [3], 38 bool dir_have_pht [3], 39 uint32_t dir_pht_size_counter [3], 40 uint32_t dir_pht_nb_counter [3], 41 uint32_t dir_pht_size_address_share [3], 42 Tpht_scheme_t dir_pht_scheme [3], 43 uint32_t * ras_size_queue ,//[nb_context] 44 uint32_t * upt_size_queue ,//[nb_context] 45 uint32_t * ufpt_size_queue ,//[nb_context] 46 uint32_t nb_thread , 47 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 48 bool is_toplevel 48 49 ) 49 50 { … … 73 74 _dir_pht_nb_counter [i] = dir_pht_nb_counter [i]; 74 75 _dir_pht_size_address_share [i] = dir_pht_size_address_share [i]; 76 _dir_pht_scheme [i] = dir_pht_scheme [i]; 75 77 } 76 78 _ras_size_queue = ras_size_queue ; … … 123 125 _dir_pht_size_counter , 124 126 _dir_pht_nb_counter , 125 _dir_pht_size_address_share); 127 _dir_pht_size_address_share, 128 _dir_pht_scheme 129 ); 126 130 127 131 _size_history = _param_dir->_size_history; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp
r95 r146 57 57 xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_nb_counter "); xml.attribut("value",toString(_dir_pht_nb_counter [i])); xml.singleton_end(); 58 58 xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_dir_pht_size_address_share [i])); xml.singleton_end(); 59 xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_scheme "); xml.attribut("value",toString(_dir_pht_scheme [i])); xml.singleton_end(); 59 60 } 60 61 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/main.cpp
r128 r146 9 9 #include "Behavioural/Custom/include/Custom_example.h" 10 10 11 #define NB_PARAMS 13+ 7*311 #define NB_PARAMS 13+8*3 12 12 13 13 void usage (int argc, char * argv[]) … … 43 43 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 44 44 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 45 err (_(" * dir_pht_scheme [3] (Tpht_scheme_t )\n")); 45 46 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 46 47 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); … … 134 135 Tvictim_t _btb_victim_scheme = fromString<Tvictim_t >(argv[x++]); 135 136 Tpredictor_t _dir_predictor_scheme = fromString<Tpredictor_t >(argv[x++]); 136 bool * _dir_have_bht = new bool [3]; 137 uint32_t * _dir_bht_size_shifter = new uint32_t[3]; 138 uint32_t * _dir_bht_nb_shifter = new uint32_t[3]; 139 bool * _dir_have_pht = new bool [3]; 140 uint32_t * _dir_pht_size_counter = new uint32_t[3]; 141 uint32_t * _dir_pht_nb_counter = new uint32_t[3]; 142 uint32_t * _dir_pht_size_address_share = new uint32_t[3]; 143 144 for (uint32_t i=0; i<3; i++) 145 _dir_have_bht [i] = fromString<bool >(argv[x++]); 146 for (uint32_t i=0; i<3; i++) 147 _dir_bht_size_shifter [i] = fromString<uint32_t>(argv[x++]); 148 for (uint32_t i=0; i<3; i++) 149 _dir_bht_nb_shifter [i] = fromString<uint32_t>(argv[x++]); 150 for (uint32_t i=0; i<3; i++) 151 _dir_have_pht [i] = fromString<bool >(argv[x++]); 152 for (uint32_t i=0; i<3; i++) 153 _dir_pht_size_counter [i] = fromString<uint32_t>(argv[x++]); 154 for (uint32_t i=0; i<3; i++) 155 _dir_pht_nb_counter [i] = fromString<uint32_t>(argv[x++]); 156 for (uint32_t i=0; i<3; i++) 157 _dir_pht_size_address_share [i] = fromString<uint32_t>(argv[x++]); 137 bool * _dir_have_bht = new bool [3]; 138 uint32_t * _dir_bht_size_shifter = new uint32_t [3]; 139 uint32_t * _dir_bht_nb_shifter = new uint32_t [3]; 140 bool * _dir_have_pht = new bool [3]; 141 uint32_t * _dir_pht_size_counter = new uint32_t [3]; 142 uint32_t * _dir_pht_nb_counter = new uint32_t [3]; 143 uint32_t * _dir_pht_size_address_share = new uint32_t [3]; 144 Tpht_scheme_t * _dir_pht_scheme = new Tpht_scheme_t [3]; 145 146 for (uint32_t i=0; i<3; i++) 147 _dir_have_bht [i] = fromString<bool >(argv[x++]); 148 for (uint32_t i=0; i<3; i++) 149 _dir_bht_size_shifter [i] = fromString<uint32_t >(argv[x++]); 150 for (uint32_t i=0; i<3; i++) 151 _dir_bht_nb_shifter [i] = fromString<uint32_t >(argv[x++]); 152 for (uint32_t i=0; i<3; i++) 153 _dir_have_pht [i] = fromString<bool >(argv[x++]); 154 for (uint32_t i=0; i<3; i++) 155 _dir_pht_size_counter [i] = fromString<uint32_t >(argv[x++]); 156 for (uint32_t i=0; i<3; i++) 157 _dir_pht_nb_counter [i] = fromString<uint32_t >(argv[x++]); 158 for (uint32_t i=0; i<3; i++) 159 _dir_pht_size_address_share [i] = fromString<uint32_t >(argv[x++]); 160 for (uint32_t i=0; i<3; i++) 161 _dir_pht_scheme [i] = fromString<Tpht_scheme_t>(argv[x++]); 158 162 159 163 uint32_t * _ras_size_queue = new uint32_t [_nb_context]; … … 211 215 _dir_pht_nb_counter , 212 216 _dir_pht_size_address_share , 217 _dir_pht_scheme , 213 218 _ras_size_queue , 214 219 _upt_size_queue , … … 253 258 delete [] _dir_pht_nb_counter ; 254 259 delete [] _dir_pht_size_address_share ; 260 delete [] _dir_pht_scheme ; 255 261 delete [] _ufpt_size_queue ; 256 262 delete [] _upt_size_queue ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Parameters.h
r136 r146 71 71 public : uint32_t _dir_pht_nb_counter [3] ; 72 72 public : uint32_t _dir_pht_size_address_share [3] ; 73 public : Tpht_scheme_t _dir_pht_scheme [3] ; 73 74 public : uint32_t * _ras_size_queue ;//[nb_context] 74 75 public : uint32_t * _upt_size_queue ;//[nb_context] … … 144 145 uint32_t * dir_pht_nb_counter ,//[3] 145 146 uint32_t * dir_pht_size_address_share ,//[3] 147 Tpht_scheme_t * dir_pht_scheme ,//[3] 146 148 uint32_t * ras_size_queue , 147 149 uint32_t * upt_size_queue , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp
r136 r146 55 55 uint32_t * dir_pht_nb_counter ,//[3] 56 56 uint32_t * dir_pht_size_address_share ,//[3] 57 Tpht_scheme_t * dir_pht_scheme ,//[3] 57 58 uint32_t * ras_size_queue , 58 59 uint32_t * upt_size_queue , … … 104 105 _dir_pht_nb_counter [i] = dir_pht_nb_counter [i]; 105 106 _dir_pht_size_address_share [i] = dir_pht_size_address_share [i]; 107 _dir_pht_scheme [i] = dir_pht_scheme [i]; 106 108 } 107 109 _ras_size_queue = ras_size_queue ; … … 157 159 _dir_pht_nb_counter , 158 160 _dir_pht_size_address_share , 161 _dir_pht_scheme , 159 162 _ras_size_queue , 160 163 _upt_size_queue ,
Note: See TracChangeset
for help on using the changeset viewer.