Changeset 111 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Timestamp:
- Feb 27, 2009, 7:37:40 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit
- Files:
-
- 9 added
- 54 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_meta_predictor.cfg
r110 r111 1 1 Meta_Predictor_Glue 2 4 4 +1 # nb_inst_predict 3 4 4 +1 # nb_inst_update 4 3 3 +1 # nb_predictor 5 8 8 +1 # predictor_size_history [0] [nb_predictor] 6 17 17 +1 # predictor_size_history [1] [nb_predictor] 7 4 4 +1 # predictor_size_history [2] [nb_predictor] 8 1 1 +1 # predictor_update_on_prediction [0] [nb_predictor] 9 1 1 +1 # predictor_update_on_prediction [1] [nb_predictor] 10 0 0 +1 # predictor_update_on_prediction [2] [nb_predictor] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/main.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/include/test.h" 9 #include "Behavioural/include/Selftest.h" 9 10 10 #define NB_PARAMS 011 #define NB_PARAMS 3 11 12 12 13 void usage (int argc, char * argv[]) … … 14 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 16 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 17 err (_(" * nb_inst_predict (uint32_t)\n")); 18 err (_(" * nb_inst_update (uint32_t)\n")); 19 err (_(" * nb_predictor (uint32_t)\n")); 20 err (_(" * predictor_size_history [nb_predictor] (uint32_t)\n")); 21 err (_(" * predictor_update_on_prediction [nb_predictor] (bool )\n")); 17 22 18 23 exit (1); … … 25 30 #endif 26 31 { 27 if (argc != static_cast<int>(2+NB_PARAMS))32 if (argc <= static_cast<int>(2+NB_PARAMS)) 28 33 usage (argc, argv); 29 34 … … 32 37 string name = argv[x++]; 33 38 39 uint32_t _nb_inst_predict ; 40 uint32_t _nb_inst_update ; 41 uint32_t _nb_predictor ; 42 uint32_t * _predictor_size_history ;//[nb_predictor] 43 bool * _predictor_update_on_prediction;//[nb_predictor] 44 45 SELFTEST0(_nb_inst_predict ,uint32_t,argv,x); 46 SELFTEST0(_nb_inst_update ,uint32_t,argv,x); 47 SELFTEST0(_nb_predictor ,uint32_t,argv,x); 48 49 if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_predictor)) 50 usage (argc, argv); 51 52 SELFTEST1(_predictor_size_history ,uint32_t,argv,x,_nb_predictor); 53 SELFTEST1(_predictor_update_on_prediction,bool ,argv,x,_nb_predictor); 54 34 55 int _return = EXIT_SUCCESS; 35 56 try … … 37 58 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters 38 59 ( 60 _nb_inst_predict , 61 _nb_inst_update , 62 _nb_predictor , 63 _predictor_size_history , 64 _predictor_update_on_prediction, 39 65 true //is_toplevel 40 66 ); … … 63 89 } 64 90 91 DELETE1(_predictor_update_on_prediction,_param->_nb_predictor); 92 DELETE1(_predictor_size_history ,_param->_nb_predictor); 93 65 94 return (_return); 66 95 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/test.cpp
r110 r111 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 52 53 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t,_param->_nb_inst_predict); 54 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t,_param->_nb_inst_predict); 55 ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY ,"out_PREDICT_HISTORY ",Thistory_t,_param->_nb_inst_predict); 56 ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION ,"out_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 57 ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL ,"out_PREDICT_PREDICTOR_VAL ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); 58 ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK ," in_PREDICT_PREDICTOR_ACK ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); 59 ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY ," in_PREDICT_PREDICTOR_HISTORY ",Thistory_t,_param->_nb_predictor,_param->_nb_inst_predict); 60 ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION ," in_PREDICT_PREDICTOR_DIRECTION ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); 61 ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,"out_PREDICT_PREDICTOR_DIRECTION_VAL",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); // if update_on_prediction 62 ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION ,"out_PREDICT_PREDICTOR_DIRECTION ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); // if update_on_prediction 63 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t,_param->_nb_inst_update); 64 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t,_param->_nb_inst_update); 65 ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY ," in_UPDATE_HISTORY ",Thistory_t,_param->_nb_inst_update); 66 ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION ," in_UPDATE_DIRECTION ",Tcontrol_t,_param->_nb_inst_update); 67 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL ,"out_UPDATE_PREDICTOR_VAL ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 68 ALLOC2_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK ," in_UPDATE_PREDICTOR_ACK ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 69 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY ,"out_UPDATE_PREDICTOR_HISTORY ",Thistory_t,_param->_nb_predictor,_param->_nb_inst_update); 70 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION ,"out_UPDATE_PREDICTOR_DIRECTION ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 71 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_MISS ,"out_UPDATE_PREDICTOR_MISS ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 72 53 73 /******************************************************** 54 74 * Instanciation … … 60 80 (*(_Meta_Predictor_Glue->in_NRESET)) (*(in_NRESET)); 61 81 82 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_VAL ,_param->_nb_inst_predict); 83 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_ACK ,_param->_nb_inst_predict); 84 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_HISTORY ,_param->_nb_inst_predict); 85 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 86 87 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_predict); 88 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_predict); 89 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_predict); 90 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict); 91 92 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 93 if (_param->_predictor_update_on_prediction [i]) 94 { 95 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_DIRECTION_VAL[i],_param->_nb_inst_predict); 96 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_DIRECTION [i],_param->_nb_inst_predict); 97 } 98 99 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_VAL ,_param->_nb_inst_update); 100 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_ACK ,_param->_nb_inst_update); 101 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_HISTORY ,_param->_nb_inst_update); 102 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_DIRECTION ,_param->_nb_inst_update); 103 104 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_update); 105 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_update); 106 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_update); 107 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_update); 108 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 109 if (_param->_predictor_update_on_prediction [i]) 110 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_MISS [i] ,_param->_nb_inst_update); 62 111 63 112 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 104 153 delete in_CLOCK; 105 154 delete in_NRESET; 155 156 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict); 157 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict); 158 DELETE1_SC_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict); 159 DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 160 161 DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_predict); 162 DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_predict); 163 DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_predict); 164 DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict); 165 DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,_param->_nb_predictor,_param->_nb_inst_predict); 166 DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict); 167 168 DELETE1_SC_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update); 169 DELETE1_SC_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update); 170 DELETE1_SC_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update); 171 DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update); 172 173 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_update); 174 DELETE2_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_update); 175 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_update); 176 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_update); 177 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_MISS ,_param->_nb_predictor,_param->_nb_inst_update); 106 178 } 107 179 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h
r110 r111 66 66 public : SC_IN (Tcontrol_t) * in_NRESET ; 67 67 68 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 public : SC_IN (Tcontrol_t) ** in_PREDICT_VAL ;// [nb_inst_predict] 70 public : SC_OUT(Tcontrol_t) ** out_PREDICT_ACK ;// [nb_inst_predict] 71 public : SC_OUT(Thistory_t) ** out_PREDICT_HISTORY ;// [nb_inst_predict] 72 public : SC_OUT(Tcontrol_t) ** out_PREDICT_DIRECTION ;// [nb_inst_predict] 73 74 public : SC_OUT(Tcontrol_t) *** out_PREDICT_PREDICTOR_VAL ;//[nb_predictor][nb_inst_predict] 75 public : SC_IN (Tcontrol_t) *** in_PREDICT_PREDICTOR_ACK ;//[nb_predictor][nb_inst_predict] 76 public : SC_IN (Thistory_t) *** in_PREDICT_PREDICTOR_HISTORY ;//[nb_predictor][nb_inst_predict] 77 public : SC_IN (Tcontrol_t) *** in_PREDICT_PREDICTOR_DIRECTION ;//[nb_predictor][nb_inst_predict] 78 public : SC_OUT(Tcontrol_t) *** out_PREDICT_PREDICTOR_DIRECTION_VAL;//[nb_predictor][nb_inst_predict] // if update_on_prediction 79 public : SC_OUT(Tcontrol_t) *** out_PREDICT_PREDICTOR_DIRECTION ;//[nb_predictor][nb_inst_predict] // if update_on_prediction 80 81 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;// [nb_inst_update] 83 public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;// [nb_inst_update] 84 public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;// [nb_inst_update] 85 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;// [nb_inst_update] 86 87 public : SC_OUT(Tcontrol_t) *** out_UPDATE_PREDICTOR_VAL ;//[nb_predictor][nb_inst_update] 88 public : SC_IN (Tcontrol_t) *** in_UPDATE_PREDICTOR_ACK ;//[nb_predictor][nb_inst_update] 89 public : SC_OUT(Thistory_t) *** out_UPDATE_PREDICTOR_HISTORY ;//[nb_predictor][nb_inst_update] 90 public : SC_OUT(Tcontrol_t) *** out_UPDATE_PREDICTOR_DIRECTION ;//[nb_predictor][nb_inst_update] 91 public : SC_OUT(Tcontrol_t) *** out_UPDATE_PREDICTOR_MISS ;//[nb_predictor][nb_inst_update] // if update_on_prediction 92 68 93 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 94 … … 105 130 public : void transition (void); 106 131 //public : void genMoore (void); 132 133 public : void genMealy_predict_valack (void); 134 public : void genMealy_predict (void); 135 136 public : void genMealy_update_valack (void); 137 public : void genMealy_update (void); 107 138 #endif 108 139 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h
r110 r111 11 11 #include "Behavioural/include/Parameters.h" 12 12 #include "Common/include/Debug.h" 13 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Types.h" 13 14 14 15 namespace morpheo { … … 26 27 { 27 28 //-----[ fields ]------------------------------------------------------------ 29 public : uint32_t _nb_inst_predict ; 30 public : uint32_t _nb_inst_update ; 31 public : uint32_t _nb_predictor ; 32 public : uint32_t * _predictor_size_history ;//[nb_predictor] 33 public : bool * _predictor_update_on_prediction;//[nb_predictor] 34 35 public : uint32_t _size_history ; 36 public : uint32_t * _predictor_history_shift ;//[nb_predictor] 37 public : uint32_t * _predictor_history_shift_msb ;//[nb_predictor] 38 public : Thistory_t * _predictor_history_mask ;//[nb_predictor] 39 28 40 29 41 //-----[ methods ]----------------------------------------------------------- 30 public : Parameters (bool is_toplevel=false); 42 public : Parameters (uint32_t nb_inst_predict , 43 uint32_t nb_inst_update , 44 uint32_t nb_predictor , 45 uint32_t * predictor_size_history ,//[nb_predictor] 46 bool * predictor_update_on_prediction,//[nb_predictor] 47 bool is_toplevel=false); 31 48 //public : Parameters (Parameters & param) ; 32 49 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue.cpp
r110 r111 82 82 # endif 83 83 84 // log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());84 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_update_valack"),_name.c_str()); 85 85 86 // SC_METHOD (genMoore); 87 // dont_initialize (); 88 // sensitive << (*(in_CLOCK)).neg(); // need internal register 89 90 // # ifdef SYSTEMCASS_SPECIFIC 91 // // List dependency information 92 // # endif 86 SC_METHOD (genMealy_update_valack); 87 dont_initialize (); 88 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 89 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 90 { 91 sensitive << (*(in_UPDATE_VAL [i])); 92 93 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 94 sensitive << (*(in_UPDATE_PREDICTOR_ACK [j][i])); 95 } 96 97 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_update"),_name.c_str()); 98 99 SC_METHOD (genMealy_update); 100 dont_initialize (); 101 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 102 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 103 sensitive << (*(in_UPDATE_HISTORY [i])) 104 << (*(in_UPDATE_DIRECTION [i])); 105 106 # ifdef SYSTEMCASS_SPECIFIC 107 // List dependency information 108 # endif 109 110 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_predict_valack"),_name.c_str()); 111 112 SC_METHOD (genMealy_predict_valack); 113 dont_initialize (); 114 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 115 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 116 { 117 sensitive << (*(in_PREDICT_VAL [i])); 118 119 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 120 sensitive << (*(in_PREDICT_PREDICTOR_ACK [j][i])); 121 } 122 123 # ifdef SYSTEMCASS_SPECIFIC 124 // List dependency information 125 # endif 126 127 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_predict"),_name.c_str()); 128 129 SC_METHOD (genMealy_predict); 130 dont_initialize (); 131 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 132 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 133 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 134 sensitive << (*(in_PREDICT_PREDICTOR_HISTORY [j][i])) 135 << (*(in_PREDICT_PREDICTOR_DIRECTION [j][i])); 136 137 # ifdef SYSTEMCASS_SPECIFIC 138 // List dependency information 139 # endif 93 140 94 141 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_allocation.cpp
r110 r111 58 58 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 59 59 } 60 61 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 { 63 ALLOC1_INTERFACE("predict",IN,NORTH,_("Predict next address"),_param->_nb_inst_predict); 64 65 ALLOC1_SIGNAL_IN ( in_PREDICT_VAL ,"VAL" ,Tcontrol_t,1); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_ACK ,"ACK" ,Tcontrol_t,1); 67 ALLOC1_SIGNAL_OUT(out_PREDICT_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 68 ALLOC1_SIGNAL_OUT(out_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 69 } 70 71 { 72 ALLOC2_INTERFACE("predict_predictor",IN,NORTH,_("Predict next address"),_param->_nb_predictor,_param->_nb_inst_predict); 73 74 ALLOC2_SIGNAL_OUT(out_PREDICT_PREDICTOR_VAL ,"VAL" ,Tcontrol_t,1); 75 ALLOC2_SIGNAL_IN ( in_PREDICT_PREDICTOR_ACK ,"ACK" ,Tcontrol_t,1); 76 ALLOC2_SIGNAL_IN ( in_PREDICT_PREDICTOR_HISTORY ,"HISTORY" ,Thistory_t,_param->_predictor_size_history[it1]); 77 ALLOC2_SIGNAL_IN ( in_PREDICT_PREDICTOR_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 78 ALLOC2_SIGNAL_OUT(out_PREDICT_PREDICTOR_DIRECTION_VAL,"DIRECTION_VAL",Tcontrol_t,(_param->_predictor_update_on_prediction [it1])?1:0); 79 ALLOC2_SIGNAL_OUT(out_PREDICT_PREDICTOR_DIRECTION ,"DIRECTION" ,Tcontrol_t,(_param->_predictor_update_on_prediction [it1])?1:0); 80 } 81 82 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 { 84 ALLOC1_INTERFACE("update",IN,NORTH,_("Update predictor"),_param->_nb_inst_update); 85 86 ALLOC1_SIGNAL_IN ( in_UPDATE_VAL ,"VAL" ,Tcontrol_t,1); 87 ALLOC1_SIGNAL_OUT(out_UPDATE_ACK ,"ACK" ,Tcontrol_t,1); 88 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 89 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 90 } 91 { 92 ALLOC2_INTERFACE("update_predictor",IN,NORTH,_("Update predictor"),_param->_nb_predictor,_param->_nb_inst_update); 93 94 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_VAL ,"VAL" ,Tcontrol_t,1); 95 ALLOC2_SIGNAL_IN ( in_UPDATE_PREDICTOR_ACK ,"ACK" ,Tcontrol_t,1); 96 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_HISTORY ,"HISTORY" ,Thistory_t,_param->_predictor_size_history[it1]); 97 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 98 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_MISS ,"MISS" ,Tcontrol_t,(_param->_predictor_update_on_prediction [it1])?1:0); 99 } 100 60 101 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 102 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_deallocation.cpp
r110 r111 30 30 delete in_CLOCK ; 31 31 delete in_NRESET; 32 33 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1); 34 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1); 35 DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 36 DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1); 37 38 DELETE2_SIGNAL(out_PREDICT_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_predict,1); 39 DELETE2_SIGNAL( in_PREDICT_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_predict,1); 40 DELETE2_SIGNAL( in_PREDICT_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_predict,_param->_predictor_size_history[it1]); 41 DELETE2_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict,1); 42 DELETE2_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,_param->_nb_predictor,_param->_nb_inst_predict,(_param->_predictor_update_on_prediction [it1])?1:0); 43 DELETE2_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict,(_param->_predictor_update_on_prediction [it1])?1:0); 44 45 DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1); 46 DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1); 47 DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); 48 DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1); 49 50 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_update,1); 51 DELETE2_SIGNAL( in_UPDATE_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_update,1); 52 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_update,_param->_predictor_size_history[it1]); 53 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_update,1); 54 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_MISS ,_param->_nb_predictor,_param->_nb_inst_update,(_param->_predictor_update_on_prediction [it1])?1:0); 32 55 } 56 33 57 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 58 35 59 delete _component; 36 60 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_transition.cpp
r110 r111 25 25 { 26 26 log_begin(Meta_Predictor_Glue,FUNCTION); 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 27 28 28 29 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Parameters.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 10 #include "Common/include/BitManipulation.h" 9 11 10 12 namespace morpheo { … … 21 23 #undef FUNCTION 22 24 #define FUNCTION "Meta_Predictor_Glue::Parameters" 23 Parameters::Parameters (bool is_toplevel) 25 Parameters::Parameters (uint32_t nb_inst_predict , 26 uint32_t nb_inst_update , 27 uint32_t nb_predictor , 28 uint32_t * predictor_size_history ,//[nb_predictor] 29 bool * predictor_update_on_prediction,//[nb_predictor] 30 bool is_toplevel ) 24 31 { 25 32 log_begin(Meta_Predictor_Glue,FUNCTION); 26 33 34 _nb_inst_predict = nb_inst_predict ; 35 _nb_inst_update = nb_inst_update ; 36 _nb_predictor = nb_predictor ; 37 _predictor_size_history = predictor_size_history ; 38 _predictor_update_on_prediction = predictor_update_on_prediction; 39 40 _size_history = 0; 41 for (uint32_t i=0; i<_nb_predictor; ++i) 42 _size_history += _predictor_size_history [i]; 43 27 44 test(); 45 46 ALLOC1(_predictor_history_shift ,uint32_t ,_nb_predictor); 47 ALLOC1(_predictor_history_shift_msb,uint32_t ,_nb_predictor); 48 ALLOC1(_predictor_history_mask ,Thistory_t,_nb_predictor); 49 50 uint32_t shift = 0; 51 for (uint32_t i=0; i<_nb_predictor; ++i) 52 { 53 _predictor_history_shift [i] = shift; 54 _predictor_history_shift_msb [i] = _predictor_size_history [i]-1; 55 _predictor_history_mask [i] = gen_mask<Thistory_t>(_predictor_size_history [i]); 56 57 shift += _predictor_size_history [i]; 58 } 28 59 29 60 if (is_toplevel) … … 57 88 { 58 89 log_begin(Meta_Predictor_Glue,FUNCTION); 90 91 DELETE1(_predictor_history_mask ,_nb_predictor); 92 DELETE1(_predictor_history_shift,_nb_predictor); 93 59 94 log_end(Meta_Predictor_Glue,FUNCTION); 60 95 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/config-alpha_21264.cfg
r110 r111 1 1 Meta_Predictor 2 1 1 +1 # nb_inst_predict 3 1 1 +1 # nb_inst_update 4 30 30 *2 # size_address 5 1 1 +1 # predictor_0_have_bht 6 10 10 +1 # predictor_0_bht_size_shifter 7 1024 1024 *2 # predictor_0_bht_nb_shifter 8 1 1 +1 # predictor_0_have_pht 9 3 3 +1 # predictor_0_pht_size_counter 10 1024 1024 *2 # predictor_0_pht_nb_counter 11 0 0 +1 # predictor_0_pht_size_address_share 12 1 1 +1 # predictor_1_have_bht 13 12 12 +1 # predictor_1_bht_size_shifter 14 2 2 *2 # predictor_1_bht_nb_shifter 15 1 1 +1 # predictor_1_have_pht 16 2 2 +1 # predictor_1_pht_size_counter 17 4096 4096 *2 # predictor_1_pht_nb_counter 18 0 0 +1 # predictor_1_pht_size_address_share 19 0 0 +1 # predictor_2_have_bht 20 4 4 +1 # predictor_2_bht_size_shifter 21 256 256 *2 # predictor_2_bht_nb_shifter 22 1 1 +1 # predictor_2_have_pht 23 2 2 +1 # predictor_2_pht_size_counter 24 4096 4096 *2 # predictor_2_pht_nb_counter 25 0 0 +1 # predictor_2_pht_size_address_share -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/src/main.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/include/test.h" 9 #include "Behavioural/include/Selftest.h" 9 10 10 #define NB_PARAMS 011 #define NB_PARAMS 3+7*3 11 12 12 13 void usage (int argc, char * argv[]) … … 14 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 16 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 17 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")); 18 27 exit (1); 19 28 } … … 31 40 32 41 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]; 52 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); 56 57 for (uint32_t i=0; i<3; ++i) 58 { 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); 66 } 33 67 34 68 int _return = EXIT_SUCCESS; … … 37 71 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters 38 72 ( 73 _nb_inst_predict , 74 _nb_inst_update , 75 _size_address , 76 _have_bht , 77 _bht_size_shifter , 78 _bht_nb_shifter , 79 _have_pht , 80 _pht_size_counter , 81 _pht_nb_counter , 82 _pht_size_address_share, 39 83 true // is_toplevel 40 84 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/src/test.cpp
r110 r111 50 50 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t,_param->_nb_inst_predict); 53 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t,_param->_nb_inst_predict); 54 ALLOC1_SC_SIGNAL( in_PREDICT_ADDRESS ," in_PREDICT_ADDRESS ",Taddress_t,_param->_nb_inst_predict); 55 ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION ,"out_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 56 ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY ,"out_PREDICT_HISTORY ",Thistory_t,_param->_nb_inst_predict); 57 58 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t,_param->_nb_inst_update); 59 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t,_param->_nb_inst_update); 60 ALLOC1_SC_SIGNAL( in_UPDATE_ADDRESS ," in_UPDATE_ADDRESS ",Taddress_t,_param->_nb_inst_update); 61 ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY ," in_UPDATE_HISTORY ",Thistory_t,_param->_nb_inst_update); 62 ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION ," in_UPDATE_DIRECTION ",Tcontrol_t,_param->_nb_inst_update); 52 63 53 64 /******************************************************** … … 60 71 (*(_Meta_Predictor->in_NRESET)) (*(in_NRESET)); 61 72 73 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_PREDICT_VAL ,_param->_nb_inst_predict); 74 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_PREDICT_ACK ,_param->_nb_inst_predict); 75 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 76 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 77 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_PREDICT_HISTORY ,_param->_nb_inst_predict); 78 79 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_VAL ,_param->_nb_inst_update); 80 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_UPDATE_ACK ,_param->_nb_inst_update); 81 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_ADDRESS ,_param->_nb_inst_update); 82 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_HISTORY ,_param->_nb_inst_update); 83 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_DIRECTION ,_param->_nb_inst_update); 62 84 63 85 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 104 126 delete in_CLOCK; 105 127 delete in_NRESET; 128 129 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict); 130 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict); 131 DELETE1_SC_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 132 DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 133 DELETE1_SC_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict); 134 135 DELETE1_SC_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update); 136 DELETE1_SC_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update); 137 DELETE1_SC_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update); 138 DELETE1_SC_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update); 139 DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update); 106 140 } 107 141 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config_bht_only.cfg
r110 r111 1 1 Two_Level_Branch_Predictor 2 4 4 *2 # nb_inst_predict 3 4 4 *2 # nb_inst_update 4 30 30 *2 # size_address 5 1 1 +1 # have_bht 6 1 16 *4 # bht_size_shifter 7 1 16 *4 # bht_nb_shifter 8 0 0 +1 # have_pht 9 0 0 +1 # pht_size_counter 10 0 0 *2 # pht_nb_counter 11 0 0 +1 # pht_size_address_share 12 1 1 +1 # update_on_prediction -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h
r110 r111 11 11 #endif 12 12 13 #define NB_ITERATION 1 13 #define NB_ITERATION 16 14 14 #define CYCLE_MAX (1024*NB_ITERATION) 15 15 -
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
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h" 9 #include "Behavioural/include/Selftest.h" 9 10 10 #define NB_PARAMS 011 #define NB_PARAMS 11 11 12 12 13 void usage (int argc, char * argv[]) … … 14 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 16 err (_("list_params is :\n")); 16 err (_(" * ()\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 28 18 29 exit (1); … … 32 43 string name = argv[x++]; 33 44 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 ; 56 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); 68 34 69 int _return = EXIT_SUCCESS; 35 70 try … … 37 72 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters 38 73 ( 74 nb_inst_predict , 75 nb_inst_update , 76 size_address , 77 have_bht , 78 bht_size_shifter , 79 bht_nb_shifter , 80 have_pht , 81 pht_size_counter , 82 pht_nb_counter , 83 pht_size_address_share, 84 update_on_prediction , 39 85 true //is_toplevel 40 86 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
r110 r111 50 50 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 53 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t,_param->_nb_inst_predict); 54 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t,_param->_nb_inst_predict); 55 ALLOC1_SC_SIGNAL( in_PREDICT_ADDRESS ," in_PREDICT_ADDRESS ",Taddress_t,_param->_nb_inst_predict); 56 ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION ,"out_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 57 ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY ,"out_PREDICT_HISTORY ",Thistory_t,_param->_nb_inst_predict); 58 ALLOC1_SC_SIGNAL( in_PREDICT_DIRECTION_VAL," in_PREDICT_DIRECTION_VAL",Tcontrol_t,_param->_nb_inst_predict); 59 ALLOC1_SC_SIGNAL( in_PREDICT_DIRECTION ," in_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 60 61 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t,_param->_nb_inst_update); 62 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t,_param->_nb_inst_update); 63 ALLOC1_SC_SIGNAL( in_UPDATE_ADDRESS ," in_UPDATE_ADDRESS ",Taddress_t,_param->_nb_inst_update); 64 ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY ," in_UPDATE_HISTORY ",Thistory_t,_param->_nb_inst_update); 65 ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION ," in_UPDATE_DIRECTION ",Tcontrol_t,_param->_nb_inst_update); 66 ALLOC1_SC_SIGNAL( in_UPDATE_MISS ," in_UPDATE_MISS ",Tcontrol_t,_param->_nb_inst_update); 52 67 53 68 /******************************************************** … … 60 75 (*(_Two_Level_Branch_Predictor->in_NRESET)) (*(in_NRESET)); 61 76 77 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_VAL ,_param->_nb_inst_predict); 78 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_PREDICT_ACK ,_param->_nb_inst_predict); 79 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 80 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 81 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_PREDICT_HISTORY ,_param->_nb_inst_predict); 82 if (_param->_update_on_prediction) 83 { 84 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict); 85 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_DIRECTION ,_param->_nb_inst_predict); 86 } 87 88 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_VAL ,_param->_nb_inst_update); 89 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_UPDATE_ACK ,_param->_nb_inst_update); 90 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_ADDRESS ,_param->_nb_inst_update); 91 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_HISTORY ,_param->_nb_inst_update); 92 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_DIRECTION ,_param->_nb_inst_update); 93 if (_param->_update_on_prediction) 94 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_MISS ,_param->_nb_inst_update); 62 95 63 96 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 76 109 srand(seed); 77 110 111 const int32_t percent_transaction_predict = 75; 112 const int32_t percent_transaction_update = 75; 113 78 114 SC_START(0); 79 115 LABEL("Initialisation"); 116 117 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 118 in_PREDICT_VAL [i]->write(0); 119 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 120 in_UPDATE_VAL [i]->write(0); 80 121 81 122 LABEL("Reset"); … … 85 126 86 127 LABEL("Loop of Test"); 87 128 129 Thistory_t bht; 130 Thistory_t pht [_param->_pht_size_bank]; 131 88 132 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 89 133 { 90 134 LABEL("Iteration %d",iteration); 91 135 136 uint32_t bht_num_reg = (_param->_have_bht)?(rand()%_param->_bht_nb_shifter):0; 137 uint32_t pht_num_bank = (_param->_have_pht)?(rand()%_param->_pht_nb_bank ):0; 138 139 LABEL(" * bht_num_reg : %d",bht_num_reg ); 140 LABEL(" * pht_num_bank : %d",pht_num_bank); 141 142 { 143 LABEL("Init BHT and PHT"); 144 145 bht = 0; 146 for (uint32_t i=0; i<_param->_pht_size_bank; ++i) 147 pht [i] = 0; 148 149 uint32_t port = rand()%_param->_nb_inst_update; 150 151 if (_param->_have_bht) 152 { 153 bool find = false; 154 while (not find) 155 { 156 bool val = ((rand()%2)<percent_transaction_update); 157 in_UPDATE_VAL [port]->write(val); 158 in_UPDATE_DIRECTION [port]->write(0); 159 160 if (_param->_update_on_prediction) 161 in_UPDATE_MISS [port]->write(1); // miss 162 in_UPDATE_HISTORY [port]->write(0); 163 in_UPDATE_ADDRESS [port]->write(bht_num_reg); 164 165 SC_START(0); 166 167 if (val and out_UPDATE_ACK [port]->read()) 168 { 169 LABEL("UPDATE[%d] - Transaction accepted",port); 170 find = true; 171 } 172 173 SC_START(1); 174 } 175 in_UPDATE_VAL [port]->write(0); 176 } 177 178 if (_param->_have_pht) 179 { 180 for (uint32_t i=0; i<_param->_pht_size_bank; ++i) 181 { 182 bool find = false; 183 184 while (not find) 185 { 186 bool val = ((rand()%2)<percent_transaction_update); 187 in_UPDATE_VAL [port]->write(val); 188 in_UPDATE_DIRECTION [port]->write(0); 189 190 if (_param->_update_on_prediction) 191 in_UPDATE_MISS [port]->write(1); // miss 192 in_UPDATE_HISTORY [port]->write(i<<_param->_bht_history_rshift); 193 in_UPDATE_ADDRESS [port]->write(pht_num_bank<<_param->_pht_address_bank_rshift); 194 195 SC_START(0); 196 197 if (val and out_UPDATE_ACK [port]->read()) 198 { 199 LABEL("UPDATE[%d] - Transaction accepted",port); 200 find = true; 201 } 202 203 SC_START(1); 204 } 205 in_UPDATE_VAL [port]->write(0); 206 } 207 } 208 } 209 210 // if (1) 211 // { 212 // LABEL("Saturation all PHT"); 213 214 // } 215 92 216 SC_START(1); 93 217 } … … 104 228 delete in_CLOCK; 105 229 delete in_NRESET; 230 231 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict); 232 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict); 233 DELETE1_SC_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 234 DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 235 DELETE1_SC_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict); 236 DELETE1_SC_SIGNAL( in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict); 237 DELETE1_SC_SIGNAL( in_PREDICT_DIRECTION ,_param->_nb_inst_predict); 238 239 DELETE1_SC_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update); 240 DELETE1_SC_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update); 241 DELETE1_SC_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update); 242 DELETE1_SC_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update); 243 DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update); 244 DELETE1_SC_SIGNAL( in_UPDATE_MISS ,_param->_nb_inst_update); 106 245 } 107 246 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h
r110 r111 9 9 */ 10 10 11 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h" 11 12 #include "Behavioural/include/Parameters.h" 12 13 #include "Common/include/Debug.h" … … 26 27 { 27 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_rshift ; 47 public : Thistory_t _pht_history_mask ; 48 public : Thistory_t _pht_history_rshift ; 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_lshift; 58 public : Taddress_t _pht_address_bank_mask ; 59 public : Taddress_t _pht_address_bank_rshift ; 28 60 29 61 //-----[ methods ]----------------------------------------------------------- 30 public : Parameters (bool is_toplevel=false); 62 public : Parameters (uint32_t nb_inst_predict , 63 uint32_t nb_inst_update , 64 uint32_t size_address , 65 bool have_bht , 66 uint32_t bht_size_shifter , 67 uint32_t bht_nb_shifter , 68 bool have_pht , 69 uint32_t pht_size_counter , 70 uint32_t pht_nb_counter , 71 uint32_t pht_size_address_share, 72 bool update_on_prediction , 73 bool is_toplevel=false); 31 74 //public : Parameters (Parameters & param) ; 32 75 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/Two_Level_Branch_Predictor.h
r110 r111 66 66 public : SC_IN (Tcontrol_t) * in_NRESET ; 67 67 68 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 public : SC_IN (Tcontrol_t) ** in_PREDICT_VAL ;//[nb_inst_predict] 70 public : SC_OUT(Tcontrol_t) ** out_PREDICT_ACK ;//[nb_inst_predict] 71 public : SC_IN (Taddress_t) ** in_PREDICT_ADDRESS ;//[nb_inst_predict] 72 public : SC_OUT(Tcontrol_t) ** out_PREDICT_DIRECTION ;//[nb_inst_predict] // = MSB[history] 73 public : SC_OUT(Thistory_t) ** out_PREDICT_HISTORY ;//[nb_inst_predict] 74 public : SC_IN (Tcontrol_t) ** in_PREDICT_DIRECTION_VAL;//[nb_inst_predict] // if update_on_prediction 75 public : SC_IN (Tcontrol_t) ** in_PREDICT_DIRECTION ;//[nb_inst_predict] // if update_on_prediction 76 77 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;//[nb_inst_update] 79 public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;//[nb_inst_update] 80 public : SC_IN (Taddress_t) ** in_UPDATE_ADDRESS ;//[nb_inst_update] 81 public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;//[nb_inst_update] 82 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;//[nb_inst_update] 83 public : SC_IN (Tcontrol_t) ** in_UPDATE_MISS ;//[nb_inst_update] // if update_on_prediction 84 68 85 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 86 70 87 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 88 private : Thistory_t * reg_BHT ;//[bht_nb_shifter] 89 private : Thistory_t ** reg_PHT ;//[pht_nb_counter][pht_nb_bank] 71 90 72 91 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 private : Tcontrol_t * internal_PREDICT_ACK ;//[nb_inst_predict] 93 private : Thistory_t * internal_PREDICT_BHT_NUM_REG ;//[nb_inst_predict] // if update_on_prediction 94 private : Thistory_t * internal_PREDICT_PHT_NUM_BANK ;//[nb_inst_predict] // if update_on_prediction 95 private : Thistory_t * internal_PREDICT_PHT_NUM_REG ;//[nb_inst_predict] // if update_on_prediction 96 97 private : Tcontrol_t * internal_UPDATE_ACK ;//[nb_inst_update] 73 98 #endif 74 99 … … 104 129 #ifdef SYSTEMC 105 130 public : void transition (void); 106 //public : void genMoore(void);131 public : void genMealy_predict (void); 107 132 #endif 108 133 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" 9 #include "Common/include/BitManipulation.h" 9 10 10 11 namespace morpheo { … … 21 22 #undef FUNCTION 22 23 #define FUNCTION "Two_Level_Branch_Predictor::Parameters" 23 Parameters::Parameters (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 bool update_on_prediction , 35 bool is_toplevel) 24 36 { 25 37 log_begin(Two_Level_Branch_Predictor,FUNCTION); 26 38 27 test(); 39 _nb_inst_predict = nb_inst_predict ; 40 _nb_inst_update = nb_inst_update ; 41 _size_address = size_address ; 42 _have_bht = have_bht ; 43 _bht_size_shifter = (have_bht)?(bht_size_shifter):0; 44 _bht_nb_shifter = (have_bht)?(bht_nb_shifter ):0; 45 _have_pht = have_pht ; 46 _pht_size_counter = (have_pht)?(pht_size_counter ):0; 47 _pht_nb_counter = (have_pht)?(pht_nb_counter ):0; 48 _pht_size_address_share = (have_bht and have_pht)?(pht_size_address_share):0; 49 _update_on_prediction = update_on_prediction ; 50 51 _bht_size_address = (_have_bht)?log2(_bht_nb_shifter):0; 52 _pht_size_address = (_have_pht)?log2(_pht_nb_counter):0; 53 54 test(); 55 56 _size_history = _bht_size_shifter + _pht_size_counter; 57 58 _bht_history_mask = gen_mask<Thistory_t>(_bht_size_shifter); 59 _bht_history_rshift = 0; 60 _pht_history_mask = gen_mask<Thistory_t>(_pht_size_counter); 61 _pht_history_rshift = _bht_size_shifter; 62 63 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _size_history : %d",_size_history ); 64 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_mask : 0x%x",_bht_history_mask ); 65 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_rshift : %d",_bht_history_rshift); 66 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_mask : 0x%x",_pht_history_mask ); 67 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_rshift : %d",_pht_history_rshift); 68 69 if (_have_bht) 70 { 71 _bht_address_mask = gen_mask<Taddress_t>(_bht_size_address); 72 73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_address_mask : 0x%x",_bht_address_mask ); 74 } 75 76 if (_have_pht) 77 { 78 _pht_counter_max = (1<<_pht_size_counter)-1; 79 80 _pht_nb_bank = (_pht_nb_counter - (1<<_bht_size_shifter))+1; 81 _pht_size_bank = _pht_nb_counter / _pht_nb_bank; 82 83 _pht_address_share_mask = gen_mask<Taddress_t>(_pht_size_address_share); 84 _pht_address_share_lshift= _bht_size_shifter-_pht_size_address_share; 85 _pht_address_bank_mask = gen_mask<Taddress_t>(log2(_pht_nb_bank)); 86 _pht_address_bank_rshift = _pht_size_address_share; 87 88 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_nb_bank : %d" ,_pht_nb_bank ); 89 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_size_bank : %d" ,_pht_size_bank ); 90 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_share_mask : 0x%x",_pht_address_share_mask ); 91 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_share_lshift : %d" ,_pht_address_share_lshift); 92 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_bank_mask : 0x%x",_pht_address_bank_mask ); 93 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_bank_rshift : %d" ,_pht_address_bank_rshift ); 94 } 28 95 29 96 if (is_toplevel) 30 { 31 copy(); 32 } 97 copy(); 33 98 34 99 log_end(Two_Level_Branch_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters_msg_error.cpp
r110 r111 29 29 Parameters_test test ("Two_Level_Branch_Predictor"); 30 30 31 if ((_have_bht or _have_pht) == false) 32 test.error(_("They have no Branch History Table and no Pattern History Table. You need a less of a BHT or a PHT\n")); 33 34 if ( _have_bht and (_size_address < _bht_size_address)) 35 test.error(_("The address's size must to large to the number of shifter in the Branch History Table.\n")); 36 37 if (_have_pht and (_size_address < _pht_size_address)) 38 test.error(_("The address's size must to large to the number of counter in the Pattern History Table.\n")); 39 40 if (_have_pht and _have_bht and (_bht_size_address > _pht_nb_counter)) 41 test.error (_("The size of shifter don't must too large that the number of counter in the Pattern History Table.\n")); 42 43 if (_have_pht and _have_bht and (_pht_size_address_share > _bht_size_shifter)) 44 test.error (_("The size of address share don't must too large that the size of shifter in the Branch History Table.\n")); 45 31 46 log_end(Two_Level_Branch_Predictor,FUNCTION); 32 47 -
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.cpp
r110 r111 72 72 if (usage_is_set(_usage,USE_SYSTEMC)) 73 73 { 74 // Constants : 75 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 76 { 77 internal_PREDICT_ACK [i] = 1; 78 PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]); 79 } 80 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 81 { 82 internal_UPDATE_ACK [i] = 1; 83 PORT_WRITE(out_UPDATE_ACK [i], internal_UPDATE_ACK [i]); 84 } 85 86 74 87 log_printf(INFO,Two_Level_Branch_Predictor,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); 75 88 … … 82 95 # endif 83 96 84 // log_printf(INFO,Two_Level_Branch_Predictor,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());97 log_printf(INFO,Two_Level_Branch_Predictor,FUNCTION,_("<%s> : Method - genMealy_predict"),_name.c_str()); 85 98 86 // SC_METHOD (genMoore); 87 // dont_initialize (); 88 // sensitive << (*(in_CLOCK)).neg(); // need internal register 89 90 // # ifdef SYSTEMCASS_SPECIFIC 91 // // List dependency information 92 // # endif 99 SC_METHOD (genMealy_predict); 100 dont_initialize (); 101 sensitive << (*(in_CLOCK)).neg(); // need internal register 102 103 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 104 sensitive 105 // << (*(in_PREDICT_VAL [i])) 106 << (*(in_PREDICT_ADDRESS [i])); 107 108 # ifdef SYSTEMCASS_SPECIFIC 109 // List dependency information 110 # endif 93 111 94 112 #endif -
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_allocation.cpp
r110 r111 19 19 namespace meta_predictor { 20 20 namespace two_level_branch_predictor { 21 22 23 21 24 22 #undef FUNCTION … … 58 56 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 59 57 } 58 59 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 { 61 ALLOC1_INTERFACE("predict",IN,WEST,_("Predict direction interface"),_param->_nb_inst_predict); 62 63 ALLOC1_VALACK_IN ( in_PREDICT_VAL ,VAL); 64 ALLOC1_VALACK_OUT(out_PREDICT_ACK ,ACK); 65 ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 67 ALLOC1_SIGNAL_OUT(out_PREDICT_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 68 if (_param->_update_on_prediction) 69 { 70 ALLOC1_SIGNAL_IN ( in_PREDICT_DIRECTION_VAL,"DIRECTION_VAL",Tcontrol_t,1 ); 71 ALLOC1_SIGNAL_IN ( in_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 72 } 73 } 74 75 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 { 77 ALLOC1_INTERFACE("update",IN,WEST,_("Update direction interface"),_param->_nb_inst_update); 78 79 ALLOC1_VALACK_IN ( in_UPDATE_VAL ,VAL); 80 ALLOC1_VALACK_OUT(out_UPDATE_ACK ,ACK); 81 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 82 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 83 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 84 if (_param->_update_on_prediction) 85 ALLOC1_SIGNAL_IN ( in_UPDATE_MISS ,"MISS" ,Tcontrol_t,1 ); 86 } 87 88 if (usage_is_set(_usage,USE_SYSTEMC)) 89 { 90 if (_param->_have_bht) 91 { 92 ALLOC1(reg_BHT ,Thistory_t,_param->_bht_nb_shifter); 93 94 for (uint32_t i=0; i<_param->_bht_nb_shifter; ++i) 95 reg_BHT [i] = 0; 96 } 97 98 if (_param->_have_pht) 99 { 100 ALLOC2(reg_PHT ,Thistory_t,_param->_pht_nb_bank,_param->_pht_size_bank); 101 102 for (uint32_t i=0; i<_param->_pht_nb_bank; ++i) 103 for (uint32_t j=0; j<_param->_pht_size_bank; ++j) 104 reg_PHT [i][j] = 0; 105 } 106 107 108 ALLOC1(internal_PREDICT_ACK ,Tcontrol_t,_param->_nb_inst_predict); 109 if (_param->_update_on_prediction) 110 { 111 if (_param->_have_bht) 112 ALLOC1(internal_PREDICT_BHT_NUM_REG ,Thistory_t,_param->_nb_inst_predict); 113 if (_param->_have_pht) 114 { 115 ALLOC1(internal_PREDICT_PHT_NUM_BANK ,Thistory_t,_param->_nb_inst_predict); 116 ALLOC1(internal_PREDICT_PHT_NUM_REG ,Thistory_t,_param->_nb_inst_predict); 117 } 118 } 119 ALLOC1(internal_UPDATE_ACK ,Tcontrol_t,_param->_nb_inst_update ); 120 } 121 60 122 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 62 123 #ifdef POSITION 63 124 if (usage_is_set(_usage,USE_POSITION)) -
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_deallocation.cpp
r110 r111 30 30 delete in_CLOCK ; 31 31 delete in_NRESET; 32 33 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1 ); 34 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1 ); 35 DELETE1_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); 36 DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); 37 DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 38 if (_param->_update_on_prediction) 39 { 40 DELETE1_SIGNAL( in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict,1 ); 41 DELETE1_SIGNAL( in_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); 42 } 43 44 DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1 ); 45 DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1 ); 46 DELETE1_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update,_param->_size_address); 47 DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); 48 DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1 ); 49 if (_param->_update_on_prediction) 50 DELETE1_SIGNAL( in_UPDATE_MISS ,_param->_nb_inst_update,1 ); 51 52 if (_param->_have_bht) 53 DELETE1(reg_BHT ,_param->_bht_nb_shifter); 54 if (_param->_have_pht) 55 DELETE2(reg_PHT ,_param->_pht_nb_bank,_param->_pht_size_bank); 56 57 DELETE1(internal_PREDICT_ACK ,_param->_nb_inst_predict); 58 if (_param->_update_on_prediction) 59 { 60 if (_param->_have_bht) 61 DELETE1(internal_PREDICT_BHT_NUM_REG ,_param->_nb_inst_predict); 62 if (_param->_have_pht) 63 { 64 DELETE1(internal_PREDICT_PHT_NUM_BANK ,_param->_nb_inst_predict); 65 DELETE1(internal_PREDICT_PHT_NUM_REG ,_param->_nb_inst_predict); 66 } 67 } 68 DELETE1(internal_UPDATE_ACK ,_param->_nb_inst_update ); 32 69 } 33 70 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
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
r110 r111 25 25 { 26 26 log_begin(Two_Level_Branch_Predictor,FUNCTION); 27 log_function(Two_Level_Branch_Predictor,FUNCTION,_name.c_str()); 28 29 if (PORT_READ(in_NRESET) == 0) 30 { 31 } 32 else 33 { 34 // =================================================================== 35 // =====[ PREDICT ]=================================================== 36 // =================================================================== 37 38 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 39 if (PORT_READ(in_PREDICT_VAL[i]) and internal_PREDICT_ACK[i]) 40 { 41 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * PREDICT [%d]",i); 42 43 // Predict if 44 // * update_on_prediction and direction is valid 45 if (_param->_update_on_prediction) 46 if (PORT_READ(in_PREDICT_DIRECTION_VAL [i])) 47 { 48 Tcontrol_t direction = PORT_READ(in_PREDICT_DIRECTION [i]); 49 50 if (_param->_have_bht) 51 { 52 Thistory_t bht_num_reg = internal_PREDICT_BHT_NUM_REG [i]; 53 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %d",bht_num_reg); 54 55 Thistory_t bht_history = reg_BHT[bht_num_reg]; 56 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",bht_history); 57 58 59 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 60 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %x",bht_history); 61 reg_BHT [bht_num_reg] = bht_history; 62 } 63 64 if (_param->_have_pht) 65 { 66 Thistory_t pht_num_reg = internal_PREDICT_PHT_NUM_REG [i]; 67 Thistory_t pht_num_bank= internal_PREDICT_PHT_NUM_BANK [i]; 68 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %d",pht_num_reg); 69 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %d",pht_num_bank); 70 71 Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg]; 72 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %x",pht_history); 73 74 // PHT : saturation counter 75 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 76 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %x",pht_history); 78 79 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; 80 } 81 } 82 } 83 84 // =================================================================== 85 // =====[ UPDATE ]==================================================== 86 // =================================================================== 87 88 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 89 if (PORT_READ(in_UPDATE_VAL[i]) and internal_UPDATE_ACK[i]) 90 { 91 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * UPDATE [%d]",i); 92 93 // Update if 94 // * update_on_prediction and miss 95 // * not update_on_prediction 96 if (not _param->_update_on_prediction or (_param->_update_on_prediction and PORT_READ(in_UPDATE_MISS [i]))) 97 { 98 Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]); 99 Thistory_t history = PORT_READ(in_UPDATE_HISTORY [i]); 100 Tcontrol_t direction = PORT_READ(in_UPDATE_DIRECTION [i])&1; 101 102 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * address : %.8x",address); 103 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * direction : %d",direction); 104 105 Thistory_t pht_bht_history = 0; 106 107 if (_param->_have_bht) 108 { 109 Thistory_t bht_history = (history>>_param->_bht_history_rshift)&_param->_bht_history_mask; 110 Thistory_t bht_num_reg = address & _param->_bht_address_mask; 111 112 pht_bht_history = bht_history; 113 114 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",bht_history); 115 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %x",bht_num_reg); 116 117 // BHT : shift register 118 119 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 120 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %x",bht_history); 121 reg_BHT [bht_num_reg] = bht_history; 122 } 123 124 if (_param->_have_pht) 125 { 126 Thistory_t pht_history = (history>>_param->_pht_history_rshift)&_param->_pht_history_mask; 127 Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_lshift); 128 Thistory_t pht_num_bank= (address>>_param->_pht_address_bank_rshift)&_param->_pht_address_bank_mask; 129 130 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",pht_bht_history); 131 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %x",pht_history); 132 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %x",pht_num_reg); 133 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %x",pht_num_bank); 134 135 // PHT : saturation counter 136 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 137 138 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %x",pht_history); 139 140 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; 141 } 142 } 143 } 144 } 145 146 #if defined(DEBUG) and DEBUG_Two_Level_Branch_Predictor and (DEBUG >= DEBUG_TRACE) 147 if (0) 148 { 149 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * Dump Two_Level_Branch_Predictor"); 150 151 if (_param->_have_bht) 152 { 153 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * Dump BHT"); 154 155 uint32_t limit = 4; 156 157 for (uint32_t i=0; i<_param->_bht_nb_shifter; i+=limit) 158 { 159 std::string str = ""; 160 161 for (uint32_t j=0; j<limit; j++) 162 { 163 uint32_t index = i+j; 164 if (index >= _param->_bht_nb_shifter) 165 break; 166 else 167 str+=toString("[%.4d] %.4x ",index,reg_BHT[index]); 168 } 169 170 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," %s",str.c_str()); 171 } 172 } 173 174 if (_param->_have_pht) 175 { 176 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * Dump PHT"); 177 178 uint32_t limit = 4; 179 180 for (uint32_t num_bank=0; num_bank <_param->_pht_nb_bank; ++num_bank) 181 { 182 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," [%.4d]",num_bank); 183 184 for (uint32_t i=0; i<_param->_pht_size_bank; i+=limit) 185 { 186 std::string str = ""; 187 188 for (uint32_t j=0; j<limit; j++) 189 { 190 uint32_t index = i+j; 191 if (index >= _param->_pht_nb_counter) 192 break; 193 else 194 str+=toString("[%.4d] %.4x ",index,reg_PHT[num_bank][index]); 195 } 196 197 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," %s",str.c_str()); 198 } 199 } 200 } 201 } 202 #endif 27 203 28 204 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h
r110 r111 12 12 #include "systemc.h" 13 13 #endif 14 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h" 14 17 15 18 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h" … … 65 68 public : SC_IN (Tcontrol_t) * in_NRESET ; 66 69 70 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 public : SC_IN (Tcontrol_t) ** in_PREDICT_VAL ;//[nb_inst_predict] 72 public : SC_OUT(Tcontrol_t) ** out_PREDICT_ACK ;//[nb_inst_predict] 73 public : SC_IN (Taddress_t) ** in_PREDICT_ADDRESS ;//[nb_inst_predict] 74 public : SC_OUT(Tcontrol_t) ** out_PREDICT_DIRECTION ;//[nb_inst_predict] // = MSB[history] 75 public : SC_OUT(Thistory_t) ** out_PREDICT_HISTORY ;//[nb_inst_predict] 76 77 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;//[nb_inst_update] 79 public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;//[nb_inst_update] 80 public : SC_IN (Taddress_t) ** in_UPDATE_ADDRESS ;//[nb_inst_update] 81 public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;//[nb_inst_update] 82 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;//[nb_inst_update] 83 67 84 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 private : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor ** _component_two_level_branch_predictor;//[nb_predictor] 86 private : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue ::Meta_Predictor_Glue * _component_glue; 68 87 69 88 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h
r110 r111 9 9 */ 10 10 11 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h" 13 11 14 #include "Behavioural/include/Parameters.h" 12 15 #include "Common/include/Debug.h" 16 13 17 14 18 namespace morpheo { … … 25 29 { 26 30 //-----[ 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 ; 48 49 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] 50 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue ::Parameters * _param_glue; 27 51 28 52 //-----[ methods ]----------------------------------------------------------- 29 public : Parameters (bool is_toplevel=false); 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); 30 64 //public : Parameters (Parameters & param) ; 31 65 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_allocation.cpp
r110 r111 18 18 namespace meta_predictor { 19 19 20 21 22 20 #undef FUNCTION 23 21 #define FUNCTION "Meta_Predictor::allocation" … … 57 55 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 58 56 } 57 58 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 { 60 ALLOC1_INTERFACE("predict",IN,WEST,_("Predict direction interface"),_param->_nb_inst_predict); 61 62 ALLOC1_VALACK_IN ( in_PREDICT_VAL ,VAL); 63 ALLOC1_VALACK_OUT(out_PREDICT_ACK ,ACK); 64 ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 65 ALLOC1_SIGNAL_OUT(out_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 67 } 68 69 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 70 { 71 ALLOC1_INTERFACE("update",IN,WEST,_("Update direction interface"),_param->_nb_inst_update); 72 73 ALLOC1_VALACK_IN ( in_UPDATE_VAL ,VAL); 74 ALLOC1_VALACK_OUT(out_UPDATE_ACK ,ACK); 75 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 76 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 77 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 78 } 59 79 60 80 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 82 std::string name; 83 84 85 { 86 _component_two_level_branch_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor * [_param->_nb_predictor]; 87 88 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 89 { 90 name = _name+"_two_level_branch_predictor_"+toString(i); 91 log_printf(INFO,Meta_Predictor,FUNCTION,_("Create : %s"),name.c_str()); 92 93 _component_two_level_branch_predictor [i] = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor 94 (name.c_str() 95 #ifdef STATISTICS 96 ,param_statistics 97 #endif 98 ,_param->_param_two_level_branch_predictor[i] 99 ,_usage); 100 101 _component->set_component (_component_two_level_branch_predictor[i]->_component 102 #ifdef POSITION 103 , 50, 50, 10, 10 104 #endif 105 ); 106 } 107 } 108 109 { 110 name = _name+"_glue"; 111 log_printf(INFO,Meta_Predictor,FUNCTION,_("Create : %s"),name.c_str()); 112 113 _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Meta_Predictor_Glue 114 (name.c_str() 115 #ifdef STATISTICS 116 ,param_statistics 117 #endif 118 ,_param->_param_glue 119 ,_usage); 120 121 _component->set_component (_component_glue->_component 122 #ifdef POSITION 123 , 50, 50, 10, 10 124 #endif 125 ); 126 } 61 127 62 128 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 63 129 std::string src,dest; 130 131 // =================================================================== 132 // =====[ Two_Level_Branch_Predictor ]================================ 133 // =================================================================== 134 135 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 136 { 137 src = _name+"_two_level_branch_predictor_"+toString(i); 138 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 139 140 { 141 dest = _name; 142 #ifdef POSITION 143 _component->interface_map (src ,"", 144 dest,""); 145 #endif 146 147 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 148 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 149 } 150 151 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 152 for (uint32_t j=0; j<_param->_nb_inst_predict; ++j) 153 { 154 dest = _name; 155 156 #ifdef POSITION 157 _component->interface_map (src ,"predict_"+toString(j), 158 dest,"predict_"+toString(j)); 159 #endif 160 161 PORT_MAP(_component,src , "in_PREDICT_"+toString(j)+"_ADDRESS" , 162 dest, "in_PREDICT_"+toString(j)+"_ADDRESS" ); 163 164 dest = _name+"_glue"; 165 166 #ifdef POSITION 167 _component->interface_map (src ,"predict_"+toString(j), 168 dest,"predict_predictor_"+toString(i)+"_"+toString(j)); 169 #endif 170 171 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_VAL" , 172 dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_VAL" ); 173 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(j)+"_ACK" , 174 dest, "in_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ACK" ); 175 // COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_ADDRESS" , 176 // dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 177 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(j)+"_DIRECTION" , 178 dest, "in_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION" ); 179 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(j)+"_HISTORY" , 180 dest, "in_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_HISTORY" ); 181 if (_param->_predictor_update_on_prediction [i]) 182 { 183 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_DIRECTION_VAL", 184 dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION_VAL"); 185 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_DIRECTION" , 186 dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION" ); 187 } 188 } 189 190 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 191 for (uint32_t j=0; j<_param->_nb_inst_update; ++j) 192 { 193 dest = _name; 194 195 #ifdef POSITION 196 _component->interface_map (src ,"update_"+toString(j), 197 dest,"update_"+toString(j)); 198 #endif 199 200 PORT_MAP(_component,src , "in_UPDATE_"+toString(j)+"_ADDRESS" , 201 dest, "in_UPDATE_"+toString(j)+"_ADDRESS" ); 202 203 dest = _name+"_glue"; 204 205 #ifdef POSITION 206 _component->interface_map (src ,"update_"+toString(j), 207 dest,"update_predictor_"+toString(i)+"_"+toString(j)); 208 #endif 209 210 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_VAL" , 211 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_VAL" ); 212 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(j)+"_ACK" , 213 dest, "in_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ACK" ); 214 // COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_ADDRESS" , 215 // dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 216 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_DIRECTION" , 217 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION" ); 218 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_HISTORY" , 219 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_HISTORY" ); 220 if (_param->_predictor_update_on_prediction [i]) 221 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_MISS" , 222 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_MISS" ); 223 } 224 // // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 225 // public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;//[nb_inst_update] 226 // public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;//[nb_inst_update] 227 // public : SC_IN (Taddress_t) ** in_UPDATE_ADDRESS ;//[nb_inst_update] 228 // public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;//[nb_inst_update] 229 // public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;//[nb_inst_update] 230 // public : SC_IN (Tcontrol_t) ** in_UPDATE_MISS ;//[nb_inst_update] // if update_on_prediction 231 232 } 233 234 // =================================================================== 235 // =====[ Glue ]====================================================== 236 // =================================================================== 237 238 { 239 src = _name+"_glue"; 240 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 241 242 { 243 dest = _name; 244 #ifdef POSITION 245 _component->interface_map (src ,"", 246 dest,""); 247 #endif 248 249 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 250 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 251 } 252 253 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 254 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 255 { 256 dest = _name; 257 #ifdef POSITION 258 _component->interface_map (src ,"predict_"+toString(i), 259 dest,"predict_"+toString(i)); 260 #endif 261 262 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_VAL" , 263 dest, "in_PREDICT_"+toString(i)+"_VAL" ); 264 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_ACK" , 265 dest,"out_PREDICT_"+toString(i)+"_ACK" ); 266 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_HISTORY" , 267 dest,"out_PREDICT_"+toString(i)+"_HISTORY" ); 268 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_DIRECTION", 269 dest,"out_PREDICT_"+toString(i)+"_DIRECTION"); 270 } 271 272 // out_PREDICT_PREDICTOR_VAL -> two_level_branch_predictor. in_PREDICT_PREDICTOR_VAL 273 // in_PREDICT_PREDICTOR_ACK -> two_level_branch_predictor.out_PREDICT_PREDICTOR_ACK 274 // in_PREDICT_PREDICTOR_HISTORY -> two_level_branch_predictor.out_PREDICT_PREDICTOR_HISTORY 275 // in_PREDICT_PREDICTOR_DIRECTION -> two_level_branch_predictor.out_PREDICT_PREDICTOR_DIRECTION 276 // out_PREDICT_PREDICTOR_DIRECTION_VAL -> two_level_branch_predictor. in_PREDICT_PREDICTOR_DIRECTION_VAL 277 // out_PREDICT_PREDICTOR_DIRECTION -> two_level_branch_predictor. in_PREDICT_PREDICTOR_DIRECTION 278 279 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 280 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 281 { 282 dest = _name; 283 #ifdef POSITION 284 _component->interface_map (src ,"update_"+toString(i), 285 dest,"update_"+toString(i)); 286 #endif 287 288 PORT_MAP(_component,src , "in_UPDATE_"+toString(i)+"_VAL" , 289 dest, "in_UPDATE_"+toString(i)+"_VAL" ); 290 PORT_MAP(_component,src ,"out_UPDATE_"+toString(i)+"_ACK" , 291 dest,"out_UPDATE_"+toString(i)+"_ACK" ); 292 PORT_MAP(_component,src , "in_UPDATE_"+toString(i)+"_HISTORY" , 293 dest, "in_UPDATE_"+toString(i)+"_HISTORY" ); 294 PORT_MAP(_component,src , "in_UPDATE_"+toString(i)+"_DIRECTION", 295 dest, "in_UPDATE_"+toString(i)+"_DIRECTION"); 296 } 297 298 // out_UPDATE_PREDICTOR_VAL -> two_level_branch_predictor. in_UPDATE_PREDICTOR_VAL 299 // in_UPDATE_PREDICTOR_ACK -> two_level_branch_predictor.out_UPDATE_PREDICTOR_ACK 300 // out_UPDATE_PREDICTOR_HISTORY -> two_level_branch_predictor. in_UPDATE_PREDICTOR_HISTORY 301 // out_UPDATE_PREDICTOR_DIRECTION -> two_level_branch_predictor. in_UPDATE_PREDICTOR_DIRECTION 302 // out_UPDATE_PREDICTOR_MISS -> two_level_branch_predictor. in_UPDATE_PREDICTOR_MISS 303 304 } 64 305 65 306 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_deallocation.cpp
r110 r111 29 29 delete in_CLOCK ; 30 30 delete in_NRESET; 31 32 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1 ); 33 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1 ); 34 DELETE1_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); 35 DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); 36 DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 37 38 DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1 ); 39 DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1 ); 40 DELETE1_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update,_param->_size_address); 41 DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); 42 DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1 ); 31 43 } 32 44 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 45 46 DELETE0(_component_glue); 47 DELETE1(_component_two_level_branch_predictor,_param->_nb_predictor); 48 34 49 delete _component; 50 35 51 36 52 log_end(Meta_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 20 21 #undef FUNCTION 21 22 #define FUNCTION "Meta_Predictor::Parameters" 22 Parameters::Parameters (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 bool is_toplevel) 23 34 { 24 35 log_begin(Meta_Predictor,FUNCTION); 25 36 37 _nb_inst_predict = nb_inst_predict ; 38 _nb_inst_update = nb_inst_update ; 39 _size_address = size_address ; 40 for (uint32_t i=0; i<3; ++i) 41 { 42 _have_bht [i] = have_bht [i]; 43 _bht_size_shifter [i] = (_have_bht [i])?bht_size_shifter [i]:0; 44 _bht_nb_shifter [i] = (_have_bht [i])?bht_nb_shifter [i]:0; 45 _have_pht [i] = have_pht [i]; 46 _pht_size_counter [i] = (_have_pht [i])?pht_size_counter [i]:0; 47 _pht_nb_counter [i] = (_have_pht [i])?pht_nb_counter [i]:0; 48 _pht_size_address_share [i] = (_have_bht[i] and _have_pht [i])?pht_size_address_share [i]:0; 49 } 50 26 51 test(); 27 52 53 _have_meta_predictor = (_have_bht [2] or _have_pht [2]); 54 _nb_predictor = (_have_meta_predictor)?3:1; 55 56 ALLOC1(_predictor_update_on_prediction,bool , _nb_predictor); 57 ALLOC1(_predictor_size_history ,uint32_t, _nb_predictor); 58 59 // All predictor can update on prediction .... 60 for (uint32_t i=0; i<_nb_predictor; ++i) 61 _predictor_update_on_prediction [i] = true; 62 63 // ... But the selector prediction can't 64 if (_have_meta_predictor) 65 _predictor_update_on_prediction [_nb_predictor-1] = false; 66 67 _param_two_level_branch_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * [_nb_predictor]; 68 for (uint32_t i=0; i<_nb_predictor; ++i) 69 { 70 _param_two_level_branch_predictor [i] = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters 71 (_nb_inst_predict , 72 _nb_inst_update , 73 _size_address , 74 _have_bht [i], 75 _bht_size_shifter [i], 76 _bht_nb_shifter [i], 77 _have_pht [i], 78 _pht_size_counter [i], 79 _pht_nb_counter [i], 80 _pht_size_address_share [i], 81 _predictor_update_on_prediction [i] 82 ); 83 84 _predictor_size_history [i] = _param_two_level_branch_predictor [i]->_size_history; 85 } 86 87 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters 88 ( 89 _nb_inst_predict , 90 _nb_inst_update , 91 _nb_predictor , 92 _predictor_size_history , 93 _predictor_update_on_prediction 94 ); 95 _size_history = _param_glue->_size_history; 96 28 97 if (is_toplevel) 29 98 { … … 48 117 { 49 118 log_begin(Meta_Predictor,FUNCTION); 119 120 DELETE1(_param_two_level_branch_predictor, _nb_predictor); 121 122 DELETE1(_predictor_size_history , _nb_predictor); 123 DELETE1(_predictor_update_on_prediction , _nb_predictor); 124 50 125 log_end(Meta_Predictor,FUNCTION); 51 126 }; … … 56 131 { 57 132 log_begin(Meta_Predictor,FUNCTION); 133 134 COPY(_param_glue); 135 for (uint32_t i=0; i<_nb_predictor; ++i) 136 COPY(_param_two_level_branch_predictor [i]); 137 58 138 log_end(Meta_Predictor,FUNCTION); 59 139 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h
r82 r111 13 13 #endif 14 14 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h" 15 17 #include <iostream> 16 18 #include "Common/include/ToString.h" … … 27 29 #endif 28 30 #include "Behavioural/include/Usage.h" 29 30 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h"31 31 32 32 namespace morpheo { … … 79 79 80 80 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Meta_Predictor * _component_meta_predictor; 81 82 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Direction_Glue * _component_glue; 82 83 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h
r88 r111 14 14 15 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Parameters.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h" 16 17 17 18 namespace morpheo { … … 45 46 46 47 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters * _param_glue; 48 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters * _param_meta_predictor; 47 49 48 50 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp
r88 r111 84 84 std::string name; 85 85 86 if (_param->_have_component_meta_predictor) 87 { 88 name = _name+"_meta_predictor"; 89 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 90 91 _component_meta_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Meta_Predictor 92 (name.c_str() 93 #ifdef STATISTICS 94 ,param_statistics 95 #endif 96 ,_param->_param_meta_predictor 97 ,_usage); 98 99 _component->set_component (_component_meta_predictor->_component 100 #ifdef POSITION 101 , 50, 50, 10, 10 102 #endif 103 ); 104 } 105 86 106 { 87 107 name = _name+"_glue"; … … 105 125 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 126 std::string src,dest; 127 128 // =================================================================== 129 // =====[ Meta_Predictor ]============================================ 130 // =================================================================== 131 if (_param->_have_component_meta_predictor) 132 { 133 src = _name+"_meta_predictor"; 134 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 135 136 { 137 dest = _name; 138 #ifdef POSITION 139 _component->interface_map (src ,"", 140 dest,""); 141 #endif 142 143 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 144 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 145 } 146 147 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 148 { 149 dest = _name+"_glue"; 150 #ifdef POSITION 151 _component->interface_map (src ,"predict_" +toString(i), 152 dest,"predict_predictor_"+toString(i)); 153 #endif 154 155 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+ "_VAL" , 156 dest,"out_PREDICT_"+toString(i)+"_PREDICTOR_VAL" ); 157 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_ACK" , 158 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_ACK" ); 159 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+ "_ADDRESS" , 160 dest,"out_PREDICT_"+toString(i)+"_PREDICTOR_ADDRESS_SRC"); 161 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_DIRECTION" , 162 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_DIRECTION" ); 163 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_HISTORY" , 164 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_HISTORY" ); 165 } 166 167 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 168 { 169 dest = _name+"_glue"; 170 #ifdef POSITION 171 _component->interface_map (src ,"update_" +toString(i), 172 dest,"update_predictor_"+toString(i)); 173 #endif 174 175 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_VAL" , 176 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_VAL" ); 177 COMPONENT_MAP(_component,src ,"out_UPDATE_"+toString(i)+ "_ACK" , 178 dest, "in_UPDATE_"+toString(i)+"_PREDICTOR_ACK" ); 179 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS" , 180 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_ADDRESS" ); 181 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_DIRECTION" , 182 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_DIRECTION" ); 183 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_HISTORY" , 184 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_HISTORY" ); 185 } 186 } 107 187 188 // =================================================================== 189 // =====[ Glue ]====================================================== 190 // =================================================================== 108 191 { 109 192 src = _name+"_glue"; … … 179 262 } 180 263 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 181 // _component->test_map(); 264 if (DEBUG_Direction == true) 265 _component->test_map(); 182 266 183 267 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_deallocation.cpp
r88 r111 45 45 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 46 delete _component_glue; 47 if (_param->_have_component_meta_predictor) 48 delete _component_meta_predictor; 47 49 delete _component; 48 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters.cpp
r88 r111 134 134 } 135 135 136 _size_history = 0; 136 test(); 137 138 if (_have_component_meta_predictor) 139 _param_meta_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters 140 ( 141 _nb_inst_predict , 142 _nb_inst_update , 143 size_address , 144 _have_bht , 145 _bht_size_shifter , 146 _bht_nb_shifter , 147 _have_pht , 148 _pht_size_counter , 149 _pht_nb_counter , 150 _pht_size_address_share 151 ); 137 152 138 for (uint32_t i=0; i<3; i++) 139 _size_history += (((_have_bht [i])?_bht_size_shifter [i]:0) + 140 ((_have_pht [i])?_pht_size_counter [i]:0)); 141 142 _have_port_history = (_size_history > 0); 143 144 test(); 153 _size_history = (_have_component_meta_predictor)?_param_meta_predictor->_size_history:0; 154 155 log_printf(TRACE,Direction,FUNCTION," * size_history : %d",_size_history); 156 157 // _size_history = 0; 158 // for (uint32_t i=0; i<3; i++) 159 // _size_history += (((_have_bht [i])?_bht_size_shifter [i]:0) + 160 // ((_have_pht [i])?_pht_size_counter [i]:0)); 161 162 _have_port_history = (_size_history > 0); 145 163 146 164 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters … … 177 195 178 196 delete _param_glue; 197 if (_have_component_meta_predictor) 198 delete _param_meta_predictor; 199 179 200 log_printf(FUNC,Direction,FUNCTION,"End"); 180 201 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters_msg_error.cpp
r81 r111 39 39 case PREDICTOR_STATIC : 40 40 case PREDICTOR_LAST_TAKE : 41 {42 break;43 }44 41 case PREDICTOR_COUNTER : 45 42 case PREDICTOR_LOCAL : … … 47 44 case PREDICTOR_META : 48 45 case PREDICTOR_CUSTOM : 46 { 47 break; 48 } 49 default : 49 50 { 50 51 test.error("Unimplemented predictor_scheme : \""+toString(_predictor_scheme)+"\". (Coming Soon)"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r107 r111 254 254 { 255 255 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_READ_STACK"); 256 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * ras_hit : %d",PORT_READ(in_PREDICT_RAS_HIT [i])); 256 257 use_upt = true; 257 258 use_ras = true; 258 259 push = false; 259 260 direction = true; 260 pc_next = PORT_READ(in_PREDICT_RAS_HIT [i])?PORT_READ(in_PREDICT_RAS_ADDRESS_POP [i]):address_dest; 261 address_dest = PORT_READ(in_PREDICT_RAS_HIT [i])?PORT_READ(in_PREDICT_RAS_ADDRESS_POP [i]):address_dest; 262 pc_next = address_dest; 261 263 branch_state = BRANCH_STATE_SPEC_TAKE; 262 264 is_accurate &= (PORT_READ(in_PREDICT_RAS_HIT [i]) or btb_is_accurate); // if miss - prediction is not accurate … … 273 275 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * direction : %d",direction); 274 276 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * branch_state : %d",branch_state); 275 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_next : %.8x",pc_next);277 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_next : 0x%.8x (0x%.8x)",pc_next,pc_next<<2); 276 278 277 279 if (use_dir) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp
r107 r111 76 76 if (push) 77 77 { 78 Taddress_t address = PORT_READ(in_PREDICT_ADDRESS_PUSH [i]); 79 78 80 log_printf(TRACE,Return_Address_Stack,FUNCTION," * push (call procedure)"); 81 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address_push : 0x%.8x",address); 79 82 80 83 // push : increase the top (circular) … … 82 85 83 86 // Write new value in Queue 84 reg_stack [context][top_new]._address = PORT_READ(in_PREDICT_ADDRESS_PUSH [i]);87 reg_stack [context][top_new]._address = address; 85 88 86 89 // Test if full … … 150 153 if (push) 151 154 { 155 Taddress_t address = PORT_READ(in_DECOD_ADDRESS_PUSH [i]); 156 152 157 log_printf(TRACE,Return_Address_Stack,FUNCTION," * push (call procedure)"); 158 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address_push : 0x%.8x",address); 153 159 154 160 // push : increase the top (circular) … … 156 162 157 163 // Write new value in Queue 158 reg_stack [context][top_new]._address = PORT_READ(in_DECOD_ADDRESS_PUSH [i]);164 reg_stack [context][top_new]._address = address; 159 165 160 166 // Test if full … … 201 207 // if decod miss : ifetch can have predict call and return branchement. Also, the head of decod can be false 202 208 203 // Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]); 204 205 // if (miss) 206 // { 209 Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]); 210 211 log_printf(TRACE,Return_Address_Stack,FUNCTION," * miss : %d",miss); 212 213 if (miss) 214 { 215 207 216 // reg_PREDICT_BOTTOM [context] = reg_BOTTOM [context]; 208 // reg_PREDICT_TOP [context] = reg_TOP [context]; 209 // reg_PREDICT_NB_ELT [context] = reg_NB_ELT [context]; 210 211 // // Scan full assoc !!! 212 // for (uint32_t j=0; j<_param->_size_queue [context]; j++) 213 // // Test if this slot is tagged with "predict" : if true, tagged as miss 214 // if (reg_stack [context][j]._predict) 215 // { 216 // reg_stack [context][j]._predict = false; 217 // reg_stack [context][j]._miss = true; 218 // } 219 // } 217 reg_PREDICT_TOP [context] = reg_TOP [context]; 218 reg_PREDICT_NB_ELT [context] = reg_NB_ELT [context]; 219 } 220 220 } 221 221 … … 252 252 { 253 253 // reinsert push value 254 reg_stack [context_id][0]._address = PORT_READ(in_UPDATE_ADDRESS [i]); 254 Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]); 255 256 log_printf(TRACE,Return_Address_Stack,FUNCTION," * flush and push"); 257 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address_push : 0x%.8x",address); 258 259 reg_stack [context_id][value]._address = address; 255 260 } 256 261 } … … 292 297 #endif 293 298 294 295 299 Tptr_t top_old = (prediction_ifetch)?reg_PREDICT_TOP [context_id]:reg_TOP [context_id]; 296 300 Tptr_t top_new = top_old; … … 320 324 if (push) 321 325 { 326 log_printf(TRACE,Return_Address_Stack,FUNCTION," * previous is push, now pop"); 327 322 328 // previous is push, now must be pop 323 329 … … 331 337 else 332 338 { 339 log_printf(TRACE,Return_Address_Stack,FUNCTION," * previous is pop, now push"); 340 333 341 // previous is pop, now must be push 334 342 Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]); 343 344 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address : 0x%.8x",address); 335 345 336 346 // push : increase the top (circular) … … 345 355 top_new = index; 346 356 347 reg_stack [context_id][ index]._address = address;357 reg_stack [context_id][top_new]._address = address; 348 358 } 349 359 … … 352 362 if (prediction_ifetch) 353 363 { 354 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_top : %d",top_new); 355 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_bottom : %d",bottom_new); 356 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_nb_elt : %d",nb_elt_new); 357 364 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_top : %d",reg_TOP [context_id]); 365 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_bottom : %d",reg_BOTTOM [context_id]); 366 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_nb_elt : %d",reg_NB_ELT [context_id]); 367 368 reg_PREDICT_TOP [context_id] = reg_TOP [context_id]; 369 // reg_PREDICT_BOTTOM [context_id] = reg_BOTTOM [context_id]; 370 reg_PREDICT_NB_ELT [context_id] = reg_NB_ELT [context_id]; 371 372 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_top : %d",top_new ); 373 // // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_bottom : %d",bottom_new); 374 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_nb_elt : %d",nb_elt_new); 375 376 // reg_PREDICT_TOP [context_id] = top_new ; 377 // // reg_PREDICT_BOTTOM [context_id] = bottom_new; 378 // reg_PREDICT_NB_ELT [context_id] = nb_elt_new; 379 380 } 381 else 382 { 383 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_top : %d",top_new); 384 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_bottom : %d",bottom_new); 385 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_nb_elt : %d",nb_elt_new); 386 387 reg_TOP [context_id] = top_new ; 388 // reg_BOTTOM [context_id] = bottom_new; 389 reg_NB_ELT [context_id] = nb_elt_new; 358 390 reg_PREDICT_TOP [context_id] = top_new ; 359 391 // reg_PREDICT_BOTTOM [context_id] = bottom_new; 360 392 reg_PREDICT_NB_ELT [context_id] = nb_elt_new; 361 }362 else363 {364 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_top : %d",top_new);365 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_bottom : %d",bottom_new);366 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_nb_elt : %d",nb_elt_new);367 368 reg_TOP [context_id] = top_new ;369 // reg_BOTTOM [context_id] = bottom_new;370 reg_NB_ELT [context_id] = nb_elt_new;371 393 } 372 394 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp
r95 r111 107 107 _ufpt_size_queue [i] = fromString<uint32_t >(argv[x++]); 108 108 109 uint32_t _nb_thread = _nb_context; 110 uint32_t * _translate_num_context_to_num_thread = new uint32_t [_nb_context]; 111 for (uint32_t i=0; i<_nb_context; i++) 112 _translate_num_context_to_num_thread [i] = i; 113 109 114 int _return = EXIT_SUCCESS; 110 115 try … … 135 140 _upt_size_queue , 136 141 _ufpt_size_queue , 142 _nb_thread , 143 _translate_num_context_to_num_thread, 137 144 true // is_toplevel 138 145 ); … … 158 165 delete [] _upt_size_queue ; 159 166 delete [] _ufpt_size_queue ; 167 delete [] _translate_num_context_to_num_thread; 160 168 161 169 return (_return); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
r110 r111 82 82 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 83 83 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION ,"out_BRANCH_COMPLETE_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_complete); 84 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete);85 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete);86 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete);84 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 85 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 86 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 87 87 88 88 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); … … 151 151 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 152 152 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 153 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete);154 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete);155 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete);153 // INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 154 // INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 155 // INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 156 156 157 157 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL ,_param->_nb_context); … … 361 361 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 362 362 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 363 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete);364 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete);365 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete);363 // DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 364 // DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 365 // DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 366 366 367 367 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/main.cpp
r88 r111 62 62 _size_ras_index [i] = fromString<uint32_t>(argv[x++]); 63 63 64 uint32_t _nb_thread = _nb_context; 65 uint32_t * _translate_num_context_to_num_thread = new uint32_t [_nb_context]; 66 for (uint32_t i=0; i<_nb_context; i++) 67 _translate_num_context_to_num_thread [i] = i; 68 64 69 int _return = EXIT_SUCCESS; 65 70 try … … 76 81 _size_history , 77 82 _size_ras_index , 83 _nb_thread , 84 _translate_num_context_to_num_thread, 78 85 true //is_toplevel 79 86 ); … … 98 105 delete [] _size_ufpt_queue; 99 106 delete [] _size_upt_queue; 107 delete [] _translate_num_context_to_num_thread; 100 108 101 109 return (_return); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
r110 r111 108 108 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 109 109 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,"out_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_inst_branch_complete); 110 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete);111 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete);112 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete);110 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 111 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 112 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 113 113 114 114 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); … … 202 202 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 203 203 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 204 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete);205 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete);206 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete);204 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 205 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 206 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 207 207 208 208 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL ,_param->_nb_context); … … 519 519 520 520 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 521 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good );522 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );523 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good);521 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good ); 522 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 523 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good); 524 524 525 525 it_upt ++; … … 832 832 833 833 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 834 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good );835 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );836 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good);834 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good ); 835 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 836 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good); 837 837 838 838 it_upt ++; … … 1200 1200 1201 1201 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 1202 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good );1203 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );1204 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good);1202 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good ); 1203 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 1204 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good); 1205 1205 1206 1206 it_upt ++; … … 1745 1745 1746 1746 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_event->miss_commit ); 1747 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_event->take_good );1748 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_event->address_src );1749 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_event->address_good);1747 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_event->take_good ); 1748 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_event->address_src ); 1749 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_event->address_good); 1750 1750 1751 1751 upt_top_event [it_event->context] = upt_top [it_event->context]; … … 1809 1809 1810 1810 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 1811 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take );1811 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take ); 1812 1812 it_upt->take_good = it_upt->take; 1813 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );1814 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest);1813 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 1814 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest); 1815 1815 1816 1816 it_upt++; … … 2464 2464 2465 2465 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 2466 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take );2466 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take ); 2467 2467 it_upt->take_good = it_upt->take; 2468 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );2469 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest);2468 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 2469 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest); 2470 2470 2471 2471 it_upt++; … … 2850 2850 delete [] in_BRANCH_COMPLETE_NO_SEQUENCE ; 2851 2851 delete [] out_BRANCH_COMPLETE_MISS_PREDICTION; 2852 delete [] out_BRANCH_COMPLETE_TAKE ;2853 delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ;2854 delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ;2852 // delete [] out_BRANCH_COMPLETE_TAKE ; 2853 // delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ; 2854 // delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ; 2855 2855 2856 2856 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h
r88 r111 35 35 public : uint32_t * _size_ras_index ; // [nb_context] 36 36 public : const bool _not_accurate_block_predict; 37 public : uint32_t _nb_thread ; 38 public : uint32_t * _translate_num_context_to_num_thread;//[nb_context] 37 39 38 40 //public : uint32_t _size_context_id ; … … 46 48 public : bool _have_port_history ; 47 49 50 public : bool * _have_thread ;//[nb_thread] 51 48 52 //-----[ methods ]----------------------------------------------------------- 49 53 public : Parameters (uint32_t nb_context , … … 57 61 uint32_t size_history , 58 62 uint32_t * size_ras_index , 63 uint32_t nb_thread , 64 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 59 65 bool is_toplevel=false); 60 66 //public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
r109 r111 87 87 public : Tptr_t _index_ras ; 88 88 public : Tcontrol_t _ifetch_prediction; // not in ufpt 89 90 public : bool _retire_ok ; 89 91 }; 90 92 … … 146 148 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT: return "event_flush_ufpt_and_upt"; break; 147 149 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT : return "update_context" ; break; 148 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT : return "wait_ and_event" ; break;150 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT : return "wait_end_event" ; break; 149 151 default : return ""; break; 150 152 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
r110 r111 27 27 #endif 28 28 #include "Behavioural/include/Usage.h" 29 #include <fstream> 29 30 30 31 namespace morpheo { … … 109 110 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ; //[nb_inst_branch_complete] 110 111 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION; //[nb_inst_branch_complete] 111 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete]112 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete]113 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete]112 // public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] 113 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete] 114 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 114 115 115 116 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 209 210 private : Tcontrol_t * internal_EVENT_ACK ; //[nb_context] 210 211 212 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 213 private : std::ofstream * branchement_log_file; 214 #endif 215 211 216 #endif 212 217 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp
r88 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 #include "Common/include/Max.h" 10 11 … … 30 31 uint32_t size_history , 31 32 uint32_t * size_ras_index , 33 uint32_t nb_thread , 34 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 32 35 bool is_toplevel): 33 36 _not_accurate_block_predict (false) … … 45 48 _size_history = size_history ; 46 49 _size_ras_index = size_ras_index ; 50 _nb_thread = nb_thread ; 51 _translate_num_context_to_num_thread = translate_num_context_to_num_thread; 47 52 48 53 _max_size_ras_index = max<uint32_t>(_size_ras_index,nb_context); … … 51 56 52 57 test(); 58 59 ALLOC1(_have_thread,bool,_nb_thread); 60 for (uint32_t i=0; i<_nb_thread; i++) 61 _have_thread[i] = false; 62 for (uint32_t i=0; i<_nb_context; i++) 63 _have_thread[_translate_num_context_to_num_thread [i]] = true; 53 64 54 65 if (is_toplevel) … … 81 92 { 82 93 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); 94 DELETE1(_have_thread ,_nb_thread); 83 95 // delete [] _size_depth ; 84 96 // delete [] _have_port_depth; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r98 r111 166 166 167 167 # ifdef SYSTEMCASS_SPECIFIC 168 // List dependency information169 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)170 {171 if (_param->_have_port_context_id)172 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));173 if (_param->_have_port_depth)174 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));175 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i]));176 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i]));177 178 if (_param->_have_port_context_id)179 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));180 if (_param->_have_port_depth)181 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));182 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i]));183 184 if (_param->_have_port_context_id)185 (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));186 if (_param->_have_port_depth)187 (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));188 189 if (_param->_have_port_context_id)190 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));191 if (_param->_have_port_depth)192 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));193 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i]));194 }168 // // List dependency information 169 // for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 170 // { 171 // if (_param->_have_port_context_id) 172 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 173 // if (_param->_have_port_depth) 174 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 175 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i])); 176 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i])); 177 178 // // if (_param->_have_port_context_id) 179 // // (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 180 // // if (_param->_have_port_depth) 181 // // (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 182 // // (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i])); 183 184 // // if (_param->_have_port_context_id) 185 // // (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 186 // // if (_param->_have_port_depth) 187 // // (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 188 189 // // if (_param->_have_port_context_id) 190 // // (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 191 // // if (_param->_have_port_depth) 192 // // (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 193 // // (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i])); 194 // } 195 195 # endif 196 196 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r110 r111 106 106 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t,1); 107 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 108 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1);109 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_instruction_address);110 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_instruction_address);108 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); 109 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_instruction_address); 110 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_instruction_address); 111 111 } 112 112 … … 225 225 #endif 226 226 227 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 228 branchement_log_file = new std::ofstream [_param->_nb_thread]; 229 for (uint32_t i=0; i<_param->_nb_thread; ++i) 230 if (_param->_have_thread [i]) 231 { 232 std::string filename = "Branchement_prediction-thread_" + toString(i) + ".log"; 233 234 branchement_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc); 235 } 236 #endif 237 227 238 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 228 239 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r110 r111 76 76 delete [] in_BRANCH_COMPLETE_NO_SEQUENCE ; 77 77 delete [] out_BRANCH_COMPLETE_MISS_PREDICTION; 78 delete [] out_BRANCH_COMPLETE_TAKE ;79 delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ;80 delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ;78 // delete [] out_BRANCH_COMPLETE_TAKE ; 79 // delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ; 80 // delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ; 81 81 82 82 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 175 175 delete _component; 176 176 177 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 178 for (uint32_t i=0; i<_param->_nb_thread; ++i) 179 if (_param->_have_thread [i]) 180 { 181 branchement_log_file [i].close(); 182 } 183 #endif 184 177 185 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 178 186 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
r98 r111 125 125 126 126 PORT_WRITE(out_BRANCH_COMPLETE_MISS_PREDICTION [i], internal_BRANCH_COMPLETE_MISS_PREDICTION [i]); 127 PORT_WRITE(out_BRANCH_COMPLETE_TAKE [i], internal_BRANCH_COMPLETE_TAKE [i]);128 PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_SRC [i], reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src);129 PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST [i], internal_BRANCH_COMPLETE_ADDRESS_DEST [i]);127 // PORT_WRITE(out_BRANCH_COMPLETE_TAKE [i], internal_BRANCH_COMPLETE_TAKE [i]); 128 // PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_SRC [i], reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src); 129 // PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST [i], internal_BRANCH_COMPLETE_ADDRESS_DEST [i]); 130 130 } 131 131 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r107 r111 139 139 dir_val = 0; // don't update btb (is update by the event branch (if conditionnal branch)) 140 140 // dir_history = ; 141 ras_val = update_ras(condition); // repop/ repush data -> don't corrupt ras 141 // repop/ repush data -> don't corrupt ras 142 ras_val = update_ras(condition); 142 143 ras_flush = 0; 143 144 ras_push = push_ras(condition); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r109 r111 102 102 if (end) 103 103 { 104 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 105 if (reg_UPDATE_PREDICTION_TABLE [i][bottom]._retire_ok) 106 { 107 uint32_t num_thread = _param->_translate_num_context_to_num_thread [i]; 108 branchement_log_file [num_thread] 109 << std::hex 110 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src << " " 111 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " " 112 << std::dec 113 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take << " " 114 << std::endl; 115 } 116 #endif 104 117 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d]",i,bottom); 105 118 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d]._state = UPDATE_PREDICTION_STATE_EMPTY",i,bottom); … … 180 193 // reg_UFPT_UPDATE [context] = reg_UFPT_TOP [context]; 181 194 if (need_update(condition)) 182 reg_UFPT_NB_NEED_UPDATE [context] ++; 195 { 196 reg_UFPT_NB_NEED_UPDATE [context] ++; 197 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]); 198 199 } 183 200 } 184 201 … … 293 310 { 294 311 reg_UFPT_NB_NEED_UPDATE [context] --; 312 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]); 313 295 314 } 296 315 } … … 305 324 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_WAIT_END (decod - hit)",context,upt_ptr_write); 306 325 reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state = UPDATE_PREDICTION_STATE_WAIT_END; 307 326 reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._retire_ok = false; 327 308 328 // Write new accurate 309 329 #ifdef DEBUG_TEST … … 377 397 // Free a register that need update ? 378 398 if (need_update(reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._condition)) 379 reg_UFPT_NB_NEED_UPDATE [context] --; 399 { 400 reg_UFPT_NB_NEED_UPDATE [context] --; 401 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]); 402 } 380 403 } 381 404 else … … 402 425 #ifdef STATISTICS 403 426 Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition; 427 #endif 404 428 bool ok = (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_OK); 405 #endif406 429 bool ko = (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_KO); 430 431 if (ok or ko) 432 reg_UPDATE_PREDICTION_TABLE [context][depth]._retire_ok = true; 407 433 408 434 // Have an update, test the state to transiste to the good state … … 513 539 if (miss) 514 540 { 541 // Flush UPT 542 uint32_t top = reg_UPT_TOP [context]; 543 uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1; 544 545 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src; 546 event_state_t event_state = reg_EVENT_STATE [context]; 547 upt_state_t event_top = reg_UPDATE_PREDICTION_TABLE [context][top]._state; 548 bool previous_ufpt_event = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or 549 (event_state == EVENT_STATE_MISS_FLUSH_UFPT ) or 550 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or 551 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT )); 552 553 bool previous_upt_event = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or 554 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or 555 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or 556 (event_state == EVENT_STATE_EVENT_FLUSH_UPT ) or 557 (event_top == UPDATE_PREDICTION_STATE_END_KO ) or 558 (event_top == UPDATE_PREDICTION_STATE_KO ) 559 // (event_state == EVENT_STATE_WAIT_END_EVENT ) or 560 // ((event_state == EVENT_STATE_UPDATE_CONTEXT ) and 561 // (reg_EVENT_SOURCE [context] == EVENT_SOURCE_UPT)) 562 ); 563 // bool update_ras = (new_update != depth); 564 565 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top); 566 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update); 567 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras); 568 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_upt_event : %d",previous_upt_event); 569 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_ufpt_event : %d",previous_ufpt_event); 570 515 571 // Have a miss !!! 516 572 // Flush UPFT 517 flush_UFPT [context] = true;573 flush_UFPT [context] = not previous_ufpt_event; 518 574 519 // Flush UPT520 uint32_t top = reg_UPT_TOP [context];521 uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1;522 523 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;524 event_state_t event_state = reg_EVENT_STATE [context];525 bool previous_event = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or526 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or527 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or528 (event_state == EVENT_STATE_EVENT_FLUSH_UPT ) or529 ((event_state == EVENT_STATE_UPDATE_CONTEXT ) and530 (reg_EVENT_SOURCE [context] == EVENT_SOURCE_UPT)));531 // bool update_ras = (new_update != depth);532 533 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top);534 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update);535 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras);536 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_event : %d",previous_event);537 538 575 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_WAIT_END) 539 576 { … … 541 578 j!=top; 542 579 j=(j+1)%_param->_size_upt_queue[context]) 543 reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT; 580 { 581 reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT; 582 reg_UPDATE_PREDICTION_TABLE [context][j]._retire_ok = false; 583 } 544 584 545 585 … … 548 588 // reg_UPT_TOP_EVENT [context] = top; 549 589 550 if (not previous_ event)590 if (not previous_upt_event) 551 591 { 552 592 reg_UPT_TOP_EVENT [context] = top; … … 556 596 { 557 597 // Have event. Top index this slot 558 559 switch (reg_UPDATE_PREDICTION_TABLE [context][top]._state) 598 reg_UPDATE_PREDICTION_TABLE [context][top]._retire_ok = false; 599 600 switch (event_top) 560 601 { 561 602 case UPDATE_PREDICTION_STATE_END_KO : … … 573 614 default : 574 615 { 616 // reg_UPDATE_PREDICTION_TABLE [context][top]._state = UPDATE_PREDICTION_STATE_EVENT; 617 // break; 618 575 619 #ifdef DEBUG_TEST 576 620 throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state.")); … … 585 629 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth); 586 630 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO; 587 588 if (reg_UFPT_NB_NEED_UPDATE [context] > 0) 631 632 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE [%d] : %d",context,reg_UFPT_NB_NEED_UPDATE [context]); 633 634 if ( (reg_UFPT_NB_NEED_UPDATE [context] > 0) or 635 (reg_UFPT_NB_UPDATE [context] > 0)) 589 636 { 590 637 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context); … … 736 783 uint32_t bottom = reg_UPT_BOTTOM [i]; 737 784 uint32_t new_update = ((top==0)?_param->_size_upt_queue[i]:top)-1; 738 bool full = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]);739 785 // bool empty = reg_UPT_EMPTY [i]; 740 786 … … 749 795 (event_state == EVENT_STATE_EVENT_FLUSH_UPT)); 750 796 751 bool find = false; // have slot to update ??? 797 bool find = false; // have slot to update ??? 798 Tdepth_t depth_new = depth; 752 799 753 800 // flush all slot after the event … … 760 807 find = true; 761 808 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT; 762 } 809 reg_UPDATE_PREDICTION_TABLE [i][j]._retire_ok = false; 810 } 811 else 812 if (not find) // while state == end or empty 813 depth_new ++; 763 814 764 815 if ((reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END) and … … 767 818 find = true; 768 819 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 820 reg_UPDATE_PREDICTION_TABLE [i][depth]._retire_ok = false; 821 769 822 } 823 else 824 // while state == end or empty 825 depth = (depth_new+1)%_param->_size_upt_queue[i]; 770 826 771 827 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * find : %d",find); 828 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth_new : %d",depth_new); 772 829 773 830 // Test if have update slot 774 831 if (find) 775 832 { 776 // flush all slot after the event777 for (uint32_t j=(depth+1)%_param->_size_upt_queue[i];778 j!=top;779 j=(j+1)%_param->_size_upt_queue[i])780 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT;781 782 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT;833 // // flush all slot after the event 834 // for (uint32_t j=(depth+1)%_param->_size_upt_queue[i]; 835 // j!=top; 836 // j=(j+1)%_param->_size_upt_queue[i]) 837 // reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT; 838 839 // reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 783 840 784 841 // reg_UPT_BOTTOM [i]; … … 791 848 } 792 849 793 bool update_ras = find and ((top != depth) or full); 850 bool full = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]); 851 bool update_ras = find and ((top != depth) or full); 794 852 795 853 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras); … … 807 865 reg_EVENT_UPT_PTR [i] = depth; 808 866 809 if (reg_UFPT_NB_NEED_UPDATE [i] > 0) 867 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE : %d",reg_UFPT_NB_NEED_UPDATE [i]); 868 // if (reg_UFPT_NB_NEED_UPDATE [i] > 0) 869 if ( (reg_UFPT_NB_NEED_UPDATE [i] > 0) or 870 (reg_UFPT_NB_UPDATE [i] > 0)) 810 871 { 811 872 if (update_ras) … … 871 932 if (reg_UFPT_NB_NEED_UPDATE [i] == 0) 872 933 { 873 874 934 // No entry need prediction, flush all entry -> Reset 875 935 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) … … 881 941 else 882 942 { 943 uint32_t bottom = reg_UFPT_BOTTOM [i]; 883 944 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) 884 // EMPTY : no event 885 // END : already update 886 // EVENT : previous event 887 if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state == UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD) 888 { 889 reg_UFPT_NB_UPDATE [i] ++; 890 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT; 891 } 892 893 // TOP is next write slot : last slot is TOP-1 894 uint32_t top = reg_UFPT_TOP [i]; 895 reg_UFPT_UPDATE [i] = ((top==0)?_param->_size_ufpt_queue[i]:top)-1; 945 { 946 uint32_t index = (bottom+j)%_param->_size_ufpt_queue[i]; 947 // EMPTY : no event 948 // END : already update 949 // EVENT : previous event 950 if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][index]._state == UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD) 951 { 952 reg_UFPT_UPDATE [i] = index; 953 reg_UFPT_NB_UPDATE [i] ++; 954 reg_UPDATE_FETCH_PREDICTION_TABLE [i][index]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT; 955 } 956 } 957 958 // // TOP is next write slot : last slot is TOP-1 959 // uint32_t top = reg_UFPT_TOP [i]; 960 // reg_UFPT_UPDATE [i] = ((top==0)?_param->_size_ufpt_queue[i]:top)-1; 896 961 897 962 // reg_UFPT_BOTTOM [i]; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h
r95 r111 52 52 public : uint32_t * _upt_size_queue ;//[nb_context] 53 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] 56 57 54 58 55 59 //public : uint32_t _size_context_id ; … … 98 102 uint32_t * upt_size_queue ,//[nb_context] 99 103 uint32_t * ufpt_size_queue ,//[nb_context] 104 uint32_t nb_thread , 105 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 100 106 bool is_toplevel=false 101 107 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h
r110 r111 101 101 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ; //[nb_inst_branch_complete] 102 102 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION ; //[nb_inst_branch_complete] 103 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete]104 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete]105 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete]103 // public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] 104 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete] 105 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 106 106 107 107 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
r95 r111 43 43 uint32_t * upt_size_queue ,//[nb_context] 44 44 uint32_t * ufpt_size_queue ,//[nb_context] 45 uint32_t nb_thread , 46 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 45 47 bool is_toplevel 46 48 ) … … 75 77 _upt_size_queue = upt_size_queue ; 76 78 _ufpt_size_queue = ufpt_size_queue ; 79 _nb_thread = nb_thread ; 80 _translate_num_context_to_num_thread = translate_num_context_to_num_thread; 77 81 78 82 _array_size_depth = new uint32_t [_nb_context]; … … 142 146 _nb_inst_branch_update , 143 147 _size_history , 144 _size_ras_index ); 148 _size_ras_index , 149 _nb_thread , 150 _translate_num_context_to_num_thread 151 ); 145 152 146 153 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
r110 r111 105 105 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t,1); 106 106 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1);108 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address);109 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address);107 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); 108 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); 109 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address); 110 110 } 111 111 … … 395 395 if (_param->_have_port_history) 396 396 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_HISTORY" , 397 dest, "in_PREDICT_" +toString(i)+"_ HISTORY" );397 dest, "in_PREDICT_" +toString(i)+"_DIR_HISTORY" ); 398 398 //out_PREDICT_DIR_LAST_TAKE - component_map branch_target_buffer 399 399 } … … 684 684 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", 685 685 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); 686 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ,687 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" );688 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ,689 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" );690 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" ,691 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" );686 // PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" , 687 // dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ); 688 // PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" , 689 // dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ); 690 // PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" , 691 // dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" ); 692 692 } 693 693 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r110 r111 59 59 DELETE1_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete,1); 60 60 DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1); 61 DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1);62 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);63 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);61 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1); 62 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 63 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 64 64 65 65 DELETE1_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context,1);
Note: See TracChangeset
for help on using the changeset viewer.