Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp
r82 r88 41 41 #endif 42 42 43 Tusage_t _usage = USE_ALL; 44 45 // _usage = usage_unset(_usage,USE_SYSTEMC ); 46 // _usage = usage_unset(_usage,USE_VHDL ); 47 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 48 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 49 // _usage = usage_unset(_usage,USE_POSITION ); 50 // _usage = usage_unset(_usage,USE_STATISTICS ); 51 // _usage = usage_unset(_usage,USE_INFORMATION ); 52 43 53 Ifetch_queue * _Ifetch_queue = new Ifetch_queue 44 54 (name.c_str(), … … 47 57 #endif 48 58 _param, 49 USE_ALL);59 _usage); 50 60 51 61 #ifdef SYSTEMC … … 93 103 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_VAL ); 94 104 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_ADDRESS_ACK ); 95 if (_param->_have_port_ queue_ptr)105 if (_param->_have_port_ifetch_queue_ptr) 96 106 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_ADDRESS_IFETCH_QUEUE_ID ); 97 107 INSTANCE1_SC_SIGNAL(_Ifetch_queue, in_ADDRESS_INSTRUCTION_ENABLE ,_param->_nb_instruction); 98 108 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_INSTRUCTION_ADDRESS ); 99 if (_param->_have_port_inst ruction_ptr)109 if (_param->_have_port_inst_ifetch_ptr) 100 110 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_INST_IFETCH_PTR ); 101 111 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_BRANCH_STATE ); 102 if (_param->_have_port_ branch_update_prediction_id)112 if (_param->_have_port_depth) 103 113 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID); 104 114 INSTANCE1_SC_SIGNAL(_Ifetch_queue,out_DECOD_VAL ,_param->_nb_instruction); … … 106 116 INSTANCE1_SC_SIGNAL(_Ifetch_queue,out_DECOD_INSTRUCTION ,_param->_nb_instruction); 107 117 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_ADDRESS ); 108 if (_param->_have_port_inst ruction_ptr)118 if (_param->_have_port_inst_ifetch_ptr) 109 119 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_INST_IFETCH_PTR ); 110 120 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_BRANCH_STATE ); 111 if (_param->_have_port_ branch_update_prediction_id)121 if (_param->_have_port_depth) 112 122 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_BRANCH_UPDATE_PREDICTION_ID ); 113 123 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_EXCEPTION ); 114 124 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ICACHE_RSP_VAL ); 115 125 INSTANCE_SC_SIGNAL (_Ifetch_queue,out_ICACHE_RSP_ACK ); 116 if (_param->_have_port_ queue_ptr)126 if (_param->_have_port_ifetch_queue_ptr) 117 127 INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ICACHE_RSP_PACKET_ID ); 118 128 INSTANCE1_SC_SIGNAL(_Ifetch_queue, in_ICACHE_RSP_INSTRUCTION ,_param->_nb_instruction); … … 180 190 for (uint32_t i=0; i<_param->_nb_instruction; i++) 181 191 in_ADDRESS_INSTRUCTION_ENABLE [i] ->write(i<=nb_inst_enable); 182 if (_param->_have_port_inst ruction_ptr)192 if (_param->_have_port_inst_ifetch_ptr) 183 193 in_ADDRESS_INST_IFETCH_PTR ->write(address%_param->_nb_instruction); 184 194 in_ADDRESS_BRANCH_STATE ->write(address%SIZE_BRANCH_STATE); 185 if (_param->_have_port_ branch_update_prediction_id)186 in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ->write(address%_param->_size_ branch_update_prediction);195 if (_param->_have_port_depth) 196 in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ->write(address%_param->_size_depth); 187 197 188 198 // ===== … … 241 251 242 252 list_wait_decod.push_back(address); 243 // list_req_icache.insert(, entry_t((_param->_have_port_ queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address));253 // list_req_icache.insert(, entry_t((_param->_have_port_ifetch_queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address)); 244 254 245 255 uint32_t cycle = ((rand()%100)<percent_icache_hit)?1:icache_miss_penality; … … 252 262 253 263 LABEL(" * list_req_icache : %d",list_req_icache.size()); 254 list_req_icache.insert(it,entry_t(cycle,(_param->_have_port_ queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address));264 list_req_icache.insert(it,entry_t(cycle,(_param->_have_port_ifetch_queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address)); 255 265 LABEL(" * list_req_icache : %d",list_req_icache.size()); 256 266 address += 4*_param->_nb_instruction; … … 292 302 TEST(Tgeneral_data_t ,out_DECOD_ADDRESS ->read(), addr); 293 303 TEST(Tbranch_state_t ,out_DECOD_BRANCH_STATE ->read(),addr%SIZE_BRANCH_STATE); 294 if (_param->_have_port_inst ruction_ptr)304 if (_param->_have_port_inst_ifetch_ptr) 295 305 TEST(Tinst_ifetch_ptr_t,out_DECOD_INST_IFETCH_PTR ->read(),addr%_param->_nb_instruction); 296 if (_param->_have_port_ branch_update_prediction_id)297 TEST(Tprediction_ptr_t ,out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(),addr%_param->_size_ branch_update_prediction);306 if (_param->_have_port_depth) 307 TEST(Tprediction_ptr_t ,out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(),addr%_param->_size_depth); 298 308 if ((addr % modulo_iberr) == 0) 299 309 TEST(Texception_t ,out_DECOD_EXCEPTION ->read(),EXCEPTION_IFETCH_BUS_ERROR);
Note: See TracChangeset
for help on using the changeset viewer.