Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/Makefile
r81 r88 24 24 library_clean : Direction_Glue_library_clean 25 25 26 local_clean : 27 26 28 include $(DIR_COMPONENT)/Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/main.cpp
r81 r88 49 49 _nb_inst_update , 50 50 _size_address , 51 _size_history ); 51 _size_history , 52 true // is_toplevel 53 ); 52 54 53 55 msg(_("%s"),param->print(1).c_str()); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp
r82 r88 24 24 #endif 25 25 26 Tusage_t _usage = USE_ALL; 27 28 // _usage = usage_unset(_usage,USE_SYSTEMC ); 29 // _usage = usage_unset(_usage,USE_VHDL ); 30 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 31 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 32 // _usage = usage_unset(_usage,USE_POSITION ); 33 // _usage = usage_unset(_usage,USE_STATISTICS ); 34 // _usage = usage_unset(_usage,USE_INFORMATION ); 35 26 36 Direction_Glue * _Direction_Glue = new Direction_Glue 27 37 (name.c_str(), … … 30 40 #endif 31 41 _param, 32 USE_ALL);42 _usage); 33 43 34 44 #ifdef SYSTEMC … … 139 149 { 140 150 in_PREDICT_VAL [i]->write(rand()%2); 141 in_PREDICT_ADDRESS_SRC [i]->write(range<Taddress_t>(rand(),_param->_size_ address));151 in_PREDICT_ADDRESS_SRC [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address)); 142 152 in_PREDICT_STATIC [i]->write(rand()%2); 143 153 in_PREDICT_LAST_TAKE [i]->write(rand()%2); … … 150 160 { 151 161 in_UPDATE_VAL [i]->write(rand()%2); 152 in_UPDATE_ADDRESS [i]->write(range<Taddress_t>(rand(),_param->_size_ address));162 in_UPDATE_ADDRESS [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address)); 153 163 in_UPDATE_HISTORY [i]->write(range<Thistory_t>(rand(),_param->_size_history)); 154 164 in_UPDATE_DIRECTION [i]->write(rand()%2); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Parameters.h
r81 r88 29 29 public : uint32_t _nb_inst_predict ; 30 30 public : uint32_t _nb_inst_update ; 31 31 //public : uint32_t _size_address ; 32 32 public : uint32_t _size_history ; 33 33 … … 40 40 uint32_t nb_inst_update , 41 41 uint32_t size_address , 42 uint32_t size_history ); 42 uint32_t size_history , 43 bool is_toplevel=false 44 ); 43 45 // public : Parameters (Parameters & param) ; 44 46 public : ~Parameters () ; 47 48 public : void copy (void); 45 49 46 50 public : Parameters_test msg_error (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp
r81 r88 39 39 log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); 40 40 41 42 #if DEBUG_Direction_Glue == true 43 log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 std::cout << *param << std::endl; 46 #endif 47 41 48 log_printf(INFO,Direction_Glue,FUNCTION,"Allocation"); 42 49 … … 48 55 49 56 #ifdef STATISTICS 50 if ( _usage & USE_STATISTICS)57 if (usage_is_set(_usage,USE_STATISTICS)) 51 58 { 52 59 log_printf(INFO,Direction_Glue,FUNCTION,"Allocation of statistics"); … … 57 64 58 65 #ifdef VHDL 59 if ( _usage & USE_VHDL)66 if (usage_is_set(_usage,USE_VHDL)) 60 67 { 61 68 // generate the vhdl … … 67 74 68 75 #ifdef SYSTEMC 69 if ( _usage & USE_SYSTEMC)76 if (usage_is_set(_usage,USE_SYSTEMC)) 70 77 { 71 78 bool need_genmealy_predict = true; … … 238 245 239 246 #ifdef STATISTICS 240 if ( _usage & USE_STATISTICS)247 if (usage_is_set(_usage,USE_STATISTICS)) 241 248 { 242 249 statistics_deallocation(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_allocation.cpp
r81 r88 63 63 ALLOC1_SIGNAL_IN ( in_PREDICT_VAL ,"val" ,Tcontrol_t,1); 64 64 ALLOC1_SIGNAL_OUT(out_PREDICT_ACK ,"ack" ,Tcontrol_t,1); 65 ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_ address);65 ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_instruction_address); 66 66 ALLOC1_SIGNAL_IN ( in_PREDICT_STATIC ,"static" ,Tcontrol_t,1); 67 67 ALLOC1_SIGNAL_IN ( in_PREDICT_LAST_TAKE ,"last_take" ,Tcontrol_t,1); … … 72 72 ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_VAL ,"predictor_val" ,Tcontrol_t,1); 73 73 ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_ACK ,"predictor_ack" ,Tcontrol_t,1); 74 ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_ADDRESS_SRC,"predictor_address_src",Taddress_t,_param->_size_ address);74 ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_ADDRESS_SRC,"predictor_address_src",Taddress_t,_param->_size_instruction_address); 75 75 ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_HISTORY ,"predictor_history" ,Thistory_t,_param->_size_history); 76 76 ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_DIRECTION ,"predictor_direction" ,Tcontrol_t,1); … … 84 84 ALLOC1_SIGNAL_IN ( in_UPDATE_VAL ,"val" ,Tcontrol_t,1); 85 85 ALLOC1_SIGNAL_OUT(out_UPDATE_ACK ,"ack" ,Tcontrol_t,1); 86 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS ,"address" ,Taddress_t,_param->_size_ address);86 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS ,"address" ,Taddress_t,_param->_size_instruction_address); 87 87 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"history" ,Thistory_t,_param->_size_history); 88 88 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"direction" ,Tcontrol_t,1); … … 91 91 ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_VAL ,"predictor_val" ,Tcontrol_t,1); 92 92 ALLOC1_SIGNAL_IN ( in_UPDATE_PREDICTOR_ACK ,"predictor_ack" ,Tcontrol_t,1); 93 ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_ADDRESS ,"predictor_address" ,Taddress_t,_param->_size_ address);93 ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_ADDRESS ,"predictor_address" ,Taddress_t,_param->_size_instruction_address); 94 94 ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_HISTORY ,"predictor_history" ,Thistory_t,_param->_size_history); 95 95 ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_DIRECTION,"predictor_direction",Tcontrol_t,1); 96 96 } 97 97 } 98 98 99 99 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 100 101 101 #ifdef POSITION 102 _component->generate_file(); 102 if (usage_is_set(_usage,USE_POSITION)) 103 _component->generate_file(); 103 104 #endif 104 105 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_deallocation.cpp
r81 r88 24 24 log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); 25 25 26 if ( _usage & USE_SYSTEMC)26 if (usage_is_set(_usage,USE_SYSTEMC)) 27 27 { 28 28 delete in_CLOCK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_end_cycle.cpp
r81 r88 26 26 27 27 #ifdef STATISTICS 28 _stat->end_cycle(); 28 if (usage_is_set(_usage,USE_STATISTICS)) 29 _stat->end_cycle(); 29 30 #endif 30 31 … … 32 33 // Evaluation before read the ouput signal 33 34 // sc_start(0); 34 _interfaces->testbench(); 35 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 36 _interfaces->testbench(); 35 37 #endif 36 38 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Parameters.cpp
r81 r88 23 23 uint32_t nb_inst_update , 24 24 uint32_t size_address , 25 uint32_t size_history ) 25 uint32_t size_history , 26 bool is_toplevel ) 26 27 { 27 28 log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); … … 30 31 _nb_inst_predict = nb_inst_predict ; 31 32 _nb_inst_update = nb_inst_update ; 32 _size_address = size_address ;33 33 34 34 switch (predictor_scheme) … … 58 58 59 59 test(); 60 61 if (is_toplevel) 62 { 63 _size_instruction_address = size_address; 64 65 copy(); 66 } 67 60 68 log_printf(FUNC,Direction_Glue,FUNCTION,"End"); 61 69 }; … … 78 86 }; 79 87 88 #undef FUNCTION 89 #define FUNCTION "Direction_Glue::copy" 90 void Parameters::copy (void) 91 { 92 log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); 93 log_printf(FUNC,Direction_Glue,FUNCTION,"End"); 94 }; 95 96 97 80 98 }; // end namespace direction_glue 81 99 }; // end namespace direction -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Parameters_print.cpp
r81 r88 31 31 xml.singleton_begin("nb_inst_predict "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end(); 32 32 xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end(); 33 33 // xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); 34 34 xml.singleton_begin("size_history "); xml.attribut("value",toString(_size_history )); xml.singleton_end(); 35 35 xml.balise_close();
Note: See TracChangeset
for help on using the changeset viewer.