Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest
- Timestamp:
- May 1, 2008, 6:48:45 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest
- Files:
-
- 3 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg
r81 r82 1 1 Prediction_unit 2 1 1 +1 # nb_context 3 1 1 +1 # nb_decod_unit 4 30 30 +1 # size_address 5 1 4 *4 # nb_instruction [0] [nb_context] 6 1 1 +1 # nb_inst_decod [0] [nb_decod_unit] 7 1 1 +1 # nb_inst_branch_predict 8 1 1 +1 # nb_inst_branch_decod 9 1 1 +1 # nb_inst_branch_update 10 1 1 +1 # nb_inst_branch_complete 11 2 8 *4 # btb_size_queue 12 2 2 +1 # btb_associativity 13 2 2 +1 # btb_size_counter 14 3 3 +1 # btb_victim_scheme 15 1 1 +1 # dir_predictor_scheme 16 1 1 +1 # dir_have_bht [0] [3] 17 1 1 +1 # dir_have_bht [1] [3] 18 1 1 +1 # dir_have_bht [2] [3] 19 1 1 +1 # dir_bht_size_shifter [0] [3] 20 1 1 +1 # dir_bht_size_shifter [1] [3] 21 1 1 +1 # dir_bht_size_shifter [2] [3] 22 1 1 +1 # dir_bht_nb_shifter [0] [3] 23 1 1 +1 # dir_bht_nb_shifter [1] [3] 24 1 1 +1 # dir_bht_nb_shifter [2] [3] 25 1 1 +1 # dir_have_pht [0] [3] 26 1 1 +1 # dir_have_pht [1] [3] 27 1 1 +1 # dir_have_pht [2] [3] 28 1 1 +1 # dir_pht_size_counter [0] [3] 29 1 1 +1 # dir_pht_size_counter [1] [3] 30 1 1 +1 # dir_pht_size_counter [2] [3] 31 1 1 +1 # dir_pht_nb_counter [0] [3] 32 1 1 +1 # dir_pht_nb_counter [1] [3] 33 1 1 +1 # dir_pht_nb_counter [2] [3] 34 1 1 +1 # dir_pht_size_address_share [0] [3] 35 1 1 +1 # dir_pht_size_address_share [1] [3] 36 1 1 +1 # dir_pht_size_address_share [2] [3] 37 2 4 *2 # ras_size_queue [0] [nb_context] 38 1 4 *4 # upt_size_queue [0] [nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp
r81 r82 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 010 #define NB_PARAMS (12+3*7) 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_decod_unit (uint32_t )\n")); 18 err (_(" * size_address (uint32_t )\n")); 19 err (_(" * nb_instruction [nb_context] (uint32_t )\n")); 20 err (_(" * nb_inst_decod [nb_decod_unit](uint32_t )\n")); 21 err (_(" * nb_inst_branch_predict (uint32_t )\n")); 22 err (_(" * nb_inst_branch_decod (uint32_t )\n")); 23 err (_(" * nb_inst_branch_update (uint32_t )\n")); 24 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 25 err (_(" * btb_size_queue (uint32_t )\n")); 26 err (_(" * btb_associativity (uint32_t )\n")); 27 err (_(" * btb_size_counter (uint32_t )\n")); 28 err (_(" * btb_victim_scheme (Tvictim_t )\n")); 29 err (_(" * dir_predictor_scheme (Tpredictor_t)\n")); 30 err (_(" * dir_have_bht [3] (bool )\n")); 31 err (_(" * dir_bht_size_shifter [3] (uint32_t )\n")); 32 err (_(" * dir_bht_nb_shifter [3] (uint32_t )\n")); 33 err (_(" * dir_have_pht [3] (bool )\n")); 34 err (_(" * dir_pht_size_counter [3] (uint32_t )\n")); 35 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 36 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 37 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 38 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); 17 39 18 40 exit (1); … … 25 47 #endif 26 48 { 27 if (argc !=static_cast<int>(2+NB_PARAMS))49 if (argc < static_cast<int>(2+NB_PARAMS)) 28 50 usage (argc, argv); 29 51 … … 31 53 32 54 string name = argv[x++]; 33 //const uint32_t size_data = atoi(argv[x++]); 34 //const uint32_t nb_port = atoi(argv[x++]); 55 uint32_t _nb_context = fromString<uint32_t>(argv[x++]); 56 uint32_t _nb_decod_unit = fromString<uint32_t>(argv[x++]); 57 uint32_t _size_address = fromString<uint32_t>(argv[x++]); 58 59 if (argc != static_cast<int>(2+NB_PARAMS+3*_nb_context+_nb_decod_unit)) 60 usage (argc, argv); 61 62 uint32_t * _nb_instruction = new uint32_t [_nb_context]; 63 for (uint32_t i=0; i<_nb_context; i++) 64 _nb_instruction [i] = fromString<uint32_t >(argv[x++]); 65 uint32_t * _nb_inst_decod = new uint32_t [_nb_decod_unit]; 66 for (uint32_t i=0; i<_nb_decod_unit; i++) 67 _nb_inst_decod [i] = fromString<uint32_t >(argv[x++]); 68 uint32_t _nb_inst_branch_predict = fromString<uint32_t >(argv[x++]); 69 uint32_t _nb_inst_branch_decod = fromString<uint32_t >(argv[x++]); 70 uint32_t _nb_inst_branch_update = fromString<uint32_t >(argv[x++]); 71 uint32_t _nb_inst_branch_complete = fromString<uint32_t >(argv[x++]); 72 uint32_t _btb_size_queue = fromString<uint32_t >(argv[x++]); 73 uint32_t _btb_associativity = fromString<uint32_t >(argv[x++]); 74 uint32_t _btb_size_counter = fromString<uint32_t >(argv[x++]); 75 Tvictim_t _btb_victim_scheme = fromString<Tvictim_t >(argv[x++]); 76 Tpredictor_t _dir_predictor_scheme = fromString<Tpredictor_t>(argv[x++]); 77 bool _dir_have_bht [3]; 78 for (uint32_t i=0; i<3; i++) 79 _dir_have_bht [i] = fromString<bool >(argv[x++]); 80 uint32_t _dir_bht_size_shifter [3]; 81 for (uint32_t i=0; i<3; i++) 82 _dir_bht_size_shifter [i] = fromString<uint32_t >(argv[x++]); 83 uint32_t _dir_bht_nb_shifter [3]; 84 for (uint32_t i=0; i<3; i++) 85 _dir_bht_nb_shifter [i] = fromString<uint32_t >(argv[x++]); 86 bool _dir_have_pht [3]; 87 for (uint32_t i=0; i<3; i++) 88 _dir_have_pht [i] = fromString<bool >(argv[x++]); 89 uint32_t _dir_pht_size_counter [3]; 90 for (uint32_t i=0; i<3; i++) 91 _dir_pht_size_counter [i] = fromString<uint32_t >(argv[x++]); 92 uint32_t _dir_pht_nb_counter [3]; 93 for (uint32_t i=0; i<3; i++) 94 _dir_pht_nb_counter [i] = fromString<uint32_t >(argv[x++]); 95 uint32_t _dir_pht_size_address_share [3]; 96 for (uint32_t i=0; i<3; i++) 97 _dir_pht_size_address_share [i] = fromString<uint32_t >(argv[x++]); 98 uint32_t * _ras_size_queue = new uint32_t [_nb_context]; 99 for (uint32_t i=0; i<_nb_context; i++) 100 _ras_size_queue [i] = fromString<uint32_t >(argv[x++]); 101 uint32_t * _upt_size_queue = new uint32_t [_nb_context]; 102 for (uint32_t i=0; i<_nb_context; i++) 103 _upt_size_queue [i] = fromString<uint32_t >(argv[x++]); 35 104 36 105 int _return = EXIT_SUCCESS; … … 38 107 { 39 108 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters 40 (//size_data, 41 //nb_port 42 ); 109 (_nb_context , 110 _nb_decod_unit , 111 _size_address , 112 _nb_instruction , 113 _nb_inst_decod , 114 _nb_inst_branch_predict , 115 _nb_inst_branch_decod , 116 _nb_inst_branch_update , 117 _nb_inst_branch_complete , 118 _btb_size_queue , 119 _btb_associativity , 120 _btb_size_counter , 121 _btb_victim_scheme , 122 _dir_predictor_scheme , 123 _dir_have_bht , 124 _dir_bht_size_shifter , 125 _dir_bht_nb_shifter , 126 _dir_have_pht , 127 _dir_pht_size_counter , 128 _dir_pht_nb_counter , 129 _dir_pht_size_address_share, 130 _ras_size_queue , 131 _upt_size_queue 132 ); 43 133 44 134 msg(_("%s"),param->print(1).c_str()); … … 57 147 } 58 148 149 delete [] _nb_instruction ; 150 delete [] _nb_inst_decod ; 151 delete [] _ras_size_queue ; 152 delete [] _upt_size_queue ; 153 59 154 return (_return); 60 155 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
r81 r82 23 23 #endif 24 24 25 Prediction_unit * _Prediction_unit = new Prediction_unit (name.c_str(), 25 Prediction_unit * _Prediction_unit = new Prediction_unit 26 (name.c_str(), 26 27 #ifdef STATISTICS 27 _parameters_statistics, 28 #endif 29 _param); 28 _parameters_statistics, 29 #endif 30 _param, 31 USE_ALL); 30 32 31 33 #ifdef SYSTEMC … … 37 39 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 38 40 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 41 42 43 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t ,_param->_nb_context); 44 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t ,_param->_nb_context); 45 ALLOC1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS ," in_PREDICT_PC_PREVIOUS ",Taddress_t ,_param->_nb_context); 46 ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT ," in_PREDICT_PC_CURRENT ",Taddress_t ,_param->_nb_context); 47 ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ," in_PREDICT_PC_CURRENT_IS_DS_TAKE ",Tcontrol_t ,_param->_nb_context); 48 ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT ,"out_PREDICT_PC_NEXT ",Taddress_t ,_param->_nb_context); 49 ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,"out_PREDICT_PC_NEXT_IS_DS_TAKE ",Tcontrol_t ,_param->_nb_context); 50 ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,"out_PREDICT_INSTRUCTION_ENABLE ",Tcontrol_t ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 51 ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,"out_PREDICT_INST_IFETCH_PTR ",Tinst_ifetch_ptr_t ,_param->_nb_context); 52 ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE ,"out_PREDICT_BRANCH_STATE ",Tbranch_state_t ,_param->_nb_context); 53 ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t ,_param->_nb_context); 54 55 ALLOC2_SC_SIGNAL( in_DECOD_VAL ," in_DECOD_VAL ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 56 ALLOC2_SC_SIGNAL(out_DECOD_ACK ,"out_DECOD_ACK ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 57 ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID ," in_DECOD_CONTEXT_ID ",Tcontext_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 58 ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ," in_DECOD_MATCH_INST_IFETCH_PTR ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 59 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE ," in_DECOD_BRANCH_STATE ",Tbranch_state_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 60 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID ," in_DECOD_BRANCH_UPDATE_PREDICTION_ID ",Tprediction_ptr_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 61 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION ," in_DECOD_BRANCH_CONDITION ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 62 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION ," in_DECOD_BRANCH_DIRECTION ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 63 ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC ," in_DECOD_ADDRESS_SRC ",Taddress_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 64 ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST ," in_DECOD_ADDRESS_DEST ",Taddress_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 65 66 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL ," in_BRANCH_COMPLETE_VAL ",Tcontrol_t ,_param->_nb_inst_branch_complete); 67 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK ,"out_BRANCH_COMPLETE_ACK ",Tcontrol_t ,_param->_nb_inst_branch_complete); 68 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID ," in_BRANCH_COMPLETE_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_complete); 69 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ," in_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 70 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ," in_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 71 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG ," in_BRANCH_COMPLETE_FLAG ",Tcontrol_t ,_param->_nb_inst_branch_complete); 72 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION ,"out_BRANCH_COMPLETE_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_complete); 73 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 74 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 75 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 76 77 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); 78 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK ," in_BRANCH_EVENT_ACK ",Tcontrol_t ,_param->_nb_context); 79 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,"out_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context); 80 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,"out_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 81 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,"out_BRANCH_EVENT_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_context); 82 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,"out_BRANCH_EVENT_ADDRESS_SRC ",Taddress_t ,_param->_nb_context); 83 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,"out_BRANCH_EVENT_ADDRESS_DEST ",Taddress_t ,_param->_nb_context); 84 85 ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH ,"out_DEPTH_NB_BRANCH ",Tdepth_t ,_param->_nb_context); 86 ALLOC1_SC_SIGNAL(out_DEPTH_TAIL ,"out_DEPTH_TAIL ",Tdepth_t ,_param->_nb_context); 39 87 40 88 /******************************************************** … … 47 95 (*(_Prediction_unit->in_NRESET)) (*(in_NRESET)); 48 96 97 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_VAL ,_param->_nb_context); 98 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_ACK ,_param->_nb_context); 99 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_PREVIOUS ,_param->_nb_context); 100 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT ,_param->_nb_context); 101 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context); 102 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT ,_param->_nb_context); 103 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context); 104 INSTANCE2_SC_SIGNAL(_Prediction_unit,out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 105 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_STATE ,_param->_nb_context); 106 107 for (uint32_t i=0; i<_param->_nb_context; i++) 108 { 109 if (_param->_have_port_inst_ifetch_ptr [i]) 110 INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_INST_IFETCH_PTR [i]); 111 if (_param->_have_port_depth [i]) 112 INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]); 113 } 114 115 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 116 INSTANCE2_SC_SIGNAL(_Prediction_unit,out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 117 if (_param->_have_port_context_id) 118 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 119 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 120 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 121 if (_param->_have_port_max_depth) 122 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_UPDATE_PREDICTION_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 123 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 124 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 125 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 126 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 127 128 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete); 129 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete); 130 if (_param->_have_port_context_id) 131 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 132 if (_param->_have_port_max_depth) 133 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 134 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 135 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete); 136 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 137 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 138 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 139 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 140 141 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL ,_param->_nb_context); 142 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_EVENT_ACK ,_param->_nb_context); 143 //if (_param->_have_port_context_id) 144 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 145 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 146 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context); 147 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); 148 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context); 149 150 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_NB_BRANCH ,_param->_nb_context); 151 for (uint32_t i=0; i<_param->_nb_context; i++) 152 if (_param->_have_port_depth[i]) 153 INSTANCE_SC_SIGNAL(_Prediction_unit,out_DEPTH_TAIL [i]); 49 154 50 155 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 91 196 delete in_CLOCK; 92 197 delete in_NRESET; 198 199 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_context); 200 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_context); 201 DELETE1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context); 202 DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context); 203 DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context); 204 DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context); 205 DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context); 206 DELETE1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context); 207 DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context); 208 DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context); 209 210 DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 211 DELETE2_SC_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 212 DELETE2_SC_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 213 DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 214 DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 215 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 216 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 217 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 218 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 219 DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 220 DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 221 222 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete); 223 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete); 224 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 225 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 226 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 227 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete); 228 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 229 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 230 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 231 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 232 233 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context); 234 DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context); 235 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 236 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 237 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context); 238 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); 239 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context); 240 241 DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context); 242 DELETE1_SC_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context); 93 243 #endif 94 244
Note: See TracChangeset
for help on using the changeset viewer.