Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.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_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp
r82 r88 9 9 #include <queue> 10 10 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h" 11 #include "Behavioural/include/Allocation.h" 11 12 12 13 //===================================================================={test} … … 26 27 SPECULATIVE_LOAD_COMMIT, //_speculative_load 27 28 0, //_nb_bypass_memory 29 1, //_nb_cache_port 30 1, //_nb_inst_memory 28 31 1, //_nb_context 29 32 1, //_nb_front_end … … 33 36 2 , //_size_special_data 34 37 64, //_nb_general_register 35 16 //_nb_special_register 38 16, //_nb_special_register 39 true //is_toplevel 36 40 ); 37 41 … … 39 43 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,0); 40 44 #endif 45 46 Tusage_t _usage = USE_ALL; 47 48 // _usage = usage_unset(_usage,USE_SYSTEMC ); 49 // _usage = usage_unset(_usage,USE_VHDL ); 50 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 51 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 52 // _usage = usage_unset(_usage,USE_POSITION ); 53 // _usage = usage_unset(_usage,USE_STATISTICS ); 54 // _usage = usage_unset(_usage,USE_INFORMATION ); 41 55 42 56 Load_store_unit * _Load_store_unit = new Load_store_unit (name.c_str(), … … 45 59 #endif 46 60 _param, 47 USE_ALL);61 _usage); 48 62 49 63 #ifdef SYSTEMC … … 56 70 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 57 71 58 sc_signal<Tcontrol_t > * in_MEMORY_IN_VAL = new sc_signal<Tcontrol_t > (rename.c_str()); 59 sc_signal<Tcontrol_t > * out_MEMORY_IN_ACK = new sc_signal<Tcontrol_t > (rename.c_str()); 60 sc_signal<Tcontext_t > * in_MEMORY_IN_CONTEXT_ID = new sc_signal<Tcontext_t > (rename.c_str()); 61 sc_signal<Tcontext_t > * in_MEMORY_IN_FRONT_END_ID = new sc_signal<Tcontext_t > (rename.c_str()); 62 sc_signal<Tcontext_t > * in_MEMORY_IN_OOO_ENGINE_ID = new sc_signal<Tcontext_t > (rename.c_str()); 63 sc_signal<Tpacket_t > * in_MEMORY_IN_PACKET_ID = new sc_signal<Tpacket_t > (rename.c_str()); 64 sc_signal<Toperation_t > * in_MEMORY_IN_OPERATION = new sc_signal<Toperation_t > (rename.c_str()); 65 sc_signal<Ttype_t > * in_MEMORY_IN_TYPE = new sc_signal<Ttype_t > (rename.c_str()); 66 sc_signal<Tlsq_ptr_t > * in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = new sc_signal<Tlsq_ptr_t > (rename.c_str()); 67 sc_signal<Tlsq_ptr_t > * in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE = new sc_signal<Tlsq_ptr_t > (rename.c_str()); 68 sc_signal<Tcontrol_t > * in_MEMORY_IN_HAS_IMMEDIAT = new sc_signal<Tcontrol_t > (rename.c_str()); 69 sc_signal<Tgeneral_data_t > * in_MEMORY_IN_IMMEDIAT = new sc_signal<Tgeneral_data_t > (rename.c_str()); 70 sc_signal<Tgeneral_data_t > * in_MEMORY_IN_DATA_RA = new sc_signal<Tgeneral_data_t > (rename.c_str()); 71 sc_signal<Tgeneral_data_t > * in_MEMORY_IN_DATA_RB = new sc_signal<Tgeneral_data_t > (rename.c_str()); 72 sc_signal<Tspecial_data_t > * in_MEMORY_IN_DATA_RC = new sc_signal<Tspecial_data_t > (rename.c_str()); 73 sc_signal<Tcontrol_t > * in_MEMORY_IN_WRITE_RD = new sc_signal<Tcontrol_t > (rename.c_str()); 74 sc_signal<Tgeneral_address_t> * in_MEMORY_IN_NUM_REG_RD = new sc_signal<Tgeneral_address_t> (rename.c_str()); 75 sc_signal<Tcontrol_t > * in_MEMORY_IN_WRITE_RE = new sc_signal<Tcontrol_t > (rename.c_str()); 76 sc_signal<Tspecial_address_t> * in_MEMORY_IN_NUM_REG_RE = new sc_signal<Tspecial_address_t> (rename.c_str()); 77 78 sc_signal<Tcontrol_t > * out_MEMORY_OUT_VAL = new sc_signal<Tcontrol_t >(rename.c_str()); 79 sc_signal<Tcontrol_t > * in_MEMORY_OUT_ACK = new sc_signal<Tcontrol_t >(rename.c_str()); 80 sc_signal<Tcontext_t > * out_MEMORY_OUT_CONTEXT_ID = new sc_signal<Tcontext_t >(rename.c_str()); 81 sc_signal<Tcontext_t > * out_MEMORY_OUT_FRONT_END_ID = new sc_signal<Tcontext_t >(rename.c_str()); 82 sc_signal<Tcontext_t > * out_MEMORY_OUT_OOO_ENGINE_ID = new sc_signal<Tcontext_t >(rename.c_str()); 83 sc_signal<Tpacket_t > * out_MEMORY_OUT_PACKET_ID = new sc_signal<Tpacket_t >(rename.c_str()); 84 // sc_signal<Toperation_t > * out_MEMORY_OUT_OPERATION = new sc_signal<Toperation_t >(rename.c_str()); 85 sc_signal<Ttype_t > * out_MEMORY_OUT_TYPE = new sc_signal<Ttype_t >(rename.c_str()); 86 sc_signal<Tcontrol_t > * out_MEMORY_OUT_WRITE_RD = new sc_signal<Tcontrol_t >(rename.c_str()); 87 sc_signal<Tgeneral_address_t> * out_MEMORY_OUT_NUM_REG_RD = new sc_signal<Tgeneral_address_t>(rename.c_str()); 88 sc_signal<Tgeneral_data_t > * out_MEMORY_OUT_DATA_RD = new sc_signal<Tgeneral_data_t >(rename.c_str()); 89 sc_signal<Tcontrol_t > * out_MEMORY_OUT_WRITE_RE = new sc_signal<Tcontrol_t >(rename.c_str()); 90 sc_signal<Tspecial_address_t> * out_MEMORY_OUT_NUM_REG_RE = new sc_signal<Tspecial_address_t>(rename.c_str()); 91 sc_signal<Tspecial_data_t > * out_MEMORY_OUT_DATA_RE = new sc_signal<Tspecial_data_t >(rename.c_str()); 92 sc_signal<Texception_t > * out_MEMORY_OUT_EXCEPTION = new sc_signal<Texception_t >(rename.c_str()); 93 sc_signal<Tcontrol_t > * out_MEMORY_OUT_NO_SEQUENCE = new sc_signal<Tcontrol_t >(rename.c_str()); 94 sc_signal<Tgeneral_data_t > * out_MEMORY_OUT_ADDRESS = new sc_signal<Tgeneral_data_t >(rename.c_str()); 95 96 sc_signal<Tcontrol_t > * out_DCACHE_REQ_VAL = new sc_signal<Tcontrol_t >(rename.c_str()); 97 sc_signal<Tcontrol_t > * in_DCACHE_REQ_ACK = new sc_signal<Tcontrol_t >(rename.c_str()); 98 sc_signal<Tcontext_t > * out_DCACHE_REQ_CONTEXT_ID = new sc_signal<Tcontext_t >(rename.c_str()); 99 sc_signal<Tpacket_t > * out_DCACHE_REQ_PACKET_ID = new sc_signal<Tpacket_t >(rename.c_str()); 100 sc_signal<Tdcache_address_t > * out_DCACHE_REQ_ADDRESS = new sc_signal<Tdcache_address_t >(rename.c_str()); 101 sc_signal<Tdcache_type_t > * out_DCACHE_REQ_TYPE = new sc_signal<Tdcache_type_t >(rename.c_str()); 102 sc_signal<Tdcache_data_t > * out_DCACHE_REQ_WDATA = new sc_signal<Tdcache_data_t >(rename.c_str()); 103 104 sc_signal<Tcontrol_t > * in_DCACHE_RSP_VAL = new sc_signal<Tcontrol_t >(rename.c_str()); 105 sc_signal<Tcontrol_t > * out_DCACHE_RSP_ACK = new sc_signal<Tcontrol_t >(rename.c_str()); 106 sc_signal<Tcontext_t > * in_DCACHE_RSP_CONTEXT_ID = new sc_signal<Tcontext_t >(rename.c_str()); 107 sc_signal<Tpacket_t > * in_DCACHE_RSP_PACKET_ID = new sc_signal<Tpacket_t >(rename.c_str()); 108 sc_signal<Tdcache_data_t > * in_DCACHE_RSP_RDATA = new sc_signal<Tdcache_data_t >(rename.c_str()); 109 sc_signal<Tdcache_error_t > * in_DCACHE_RSP_ERROR = new sc_signal<Tdcache_error_t >(rename.c_str()); 110 111 sc_signal<Tcontrol_t > ** out_BYPASS_MEMORY_VAL = new sc_signal<Tcontrol_t > * [_param->_nb_bypass_memory]; 112 sc_signal<Tcontext_t > ** out_BYPASS_MEMORY_OOO_ENGINE_ID = new sc_signal<Tcontext_t > * [_param->_nb_bypass_memory]; 113 sc_signal<Tgeneral_address_t> ** out_BYPASS_MEMORY_NUM_REG = new sc_signal<Tgeneral_address_t> * [_param->_nb_bypass_memory]; 114 sc_signal<Tgeneral_data_t > ** out_BYPASS_MEMORY_DATA = new sc_signal<Tgeneral_data_t > * [_param->_nb_bypass_memory]; 115 116 for (uint32_t i=0; i<_param->_nb_bypass_memory; i++) 117 { 118 out_BYPASS_MEMORY_VAL [i] = new sc_signal<Tcontrol_t >(rename.c_str()); 119 out_BYPASS_MEMORY_OOO_ENGINE_ID [i] = new sc_signal<Tcontext_t >(rename.c_str()); 120 out_BYPASS_MEMORY_NUM_REG [i] = new sc_signal<Tgeneral_address_t>(rename.c_str()); 121 out_BYPASS_MEMORY_DATA [i] = new sc_signal<Tgeneral_data_t >(rename.c_str()); 122 } 72 // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 ALLOC1_SC_SIGNAL( in_MEMORY_IN_VAL ," in_MEMORY_IN_VAL ",Tcontrol_t ,_param->_nb_inst_memory); 74 ALLOC1_SC_SIGNAL(out_MEMORY_IN_ACK ,"out_MEMORY_IN_ACK ",Tcontrol_t ,_param->_nb_inst_memory); 75 ALLOC1_SC_SIGNAL( in_MEMORY_IN_CONTEXT_ID ," in_MEMORY_IN_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_memory); 76 ALLOC1_SC_SIGNAL( in_MEMORY_IN_FRONT_END_ID ," in_MEMORY_IN_FRONT_END_ID ",Tcontext_t ,_param->_nb_inst_memory); 77 ALLOC1_SC_SIGNAL( in_MEMORY_IN_OOO_ENGINE_ID ," in_MEMORY_IN_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_inst_memory); 78 ALLOC1_SC_SIGNAL( in_MEMORY_IN_PACKET_ID ," in_MEMORY_IN_PACKET_ID ",Tpacket_t ,_param->_nb_inst_memory); 79 ALLOC1_SC_SIGNAL( in_MEMORY_IN_OPERATION ," in_MEMORY_IN_OPERATION ",Toperation_t ,_param->_nb_inst_memory); 80 ALLOC1_SC_SIGNAL( in_MEMORY_IN_TYPE ," in_MEMORY_IN_TYPE ",Ttype_t ,_param->_nb_inst_memory); 81 ALLOC1_SC_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE," in_MEMORY_IN_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_inst_memory); 82 ALLOC1_SC_SIGNAL( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ," in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_memory); 83 ALLOC1_SC_SIGNAL( in_MEMORY_IN_HAS_IMMEDIAT ," in_MEMORY_IN_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_memory); 84 ALLOC1_SC_SIGNAL( in_MEMORY_IN_IMMEDIAT ," in_MEMORY_IN_IMMEDIAT ",Tgeneral_data_t ,_param->_nb_inst_memory); // memory address 85 ALLOC1_SC_SIGNAL( in_MEMORY_IN_DATA_RA ," in_MEMORY_IN_DATA_RA ",Tgeneral_data_t ,_param->_nb_inst_memory); // memory address 86 ALLOC1_SC_SIGNAL( in_MEMORY_IN_DATA_RB ," in_MEMORY_IN_DATA_RB ",Tgeneral_data_t ,_param->_nb_inst_memory); // data (store) 87 ALLOC1_SC_SIGNAL( in_MEMORY_IN_DATA_RC ," in_MEMORY_IN_DATA_RC ",Tspecial_data_t ,_param->_nb_inst_memory); 88 ALLOC1_SC_SIGNAL( in_MEMORY_IN_WRITE_RD ," in_MEMORY_IN_WRITE_RD ",Tcontrol_t ,_param->_nb_inst_memory); // = (operation==load) 89 ALLOC1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RD ," in_MEMORY_IN_NUM_REG_RD ",Tgeneral_address_t,_param->_nb_inst_memory); // destination (load) 90 ALLOC1_SC_SIGNAL( in_MEMORY_IN_WRITE_RE ," in_MEMORY_IN_WRITE_RE ",Tcontrol_t ,_param->_nb_inst_memory); 91 ALLOC1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RE ," in_MEMORY_IN_NUM_REG_RE ",Tspecial_address_t,_param->_nb_inst_memory); 92 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_VAL ,"out_MEMORY_OUT_VAL ",Tcontrol_t ,_param->_nb_inst_memory); 93 ALLOC1_SC_SIGNAL( in_MEMORY_OUT_ACK ," in_MEMORY_OUT_ACK ",Tcontrol_t ,_param->_nb_inst_memory); 94 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_CONTEXT_ID ,"out_MEMORY_OUT_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_memory); 95 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_FRONT_END_ID ,"out_MEMORY_OUT_FRONT_END_ID ",Tcontext_t ,_param->_nb_inst_memory); 96 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_OOO_ENGINE_ID ,"out_MEMORY_OUT_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_inst_memory); 97 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_PACKET_ID ,"out_MEMORY_OUT_PACKET_ID ",Tpacket_t ,_param->_nb_inst_memory); 98 //ALLOC1_SC_SIGNAL(out_MEMORY_OUT_OPERATION ,"out_MEMORY_OUT_OPERATION ",Toperation_t ,_param->_nb_inst_memory); 99 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_TYPE ,"out_MEMORY_OUT_TYPE ",Ttype_t ,_param->_nb_inst_memory); 100 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RD ,"out_MEMORY_OUT_WRITE_RD ",Tcontrol_t ,_param->_nb_inst_memory); // = (operation==load) 101 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RD ,"out_MEMORY_OUT_NUM_REG_RD ",Tgeneral_address_t,_param->_nb_inst_memory); // destination (load) 102 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_DATA_RD ,"out_MEMORY_OUT_DATA_RD ",Tgeneral_data_t ,_param->_nb_inst_memory); // data (load) 103 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RE ,"out_MEMORY_OUT_WRITE_RE ",Tcontrol_t ,_param->_nb_inst_memory); 104 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RE ,"out_MEMORY_OUT_NUM_REG_RE ",Tspecial_address_t,_param->_nb_inst_memory); 105 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_DATA_RE ,"out_MEMORY_OUT_DATA_RE ",Tspecial_data_t ,_param->_nb_inst_memory); 106 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_EXCEPTION ,"out_MEMORY_OUT_EXCEPTION ",Texception_t ,_param->_nb_inst_memory); 107 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_NO_SEQUENCE ,"out_MEMORY_OUT_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_memory); 108 ALLOC1_SC_SIGNAL(out_MEMORY_OUT_ADDRESS ,"out_MEMORY_OUT_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_memory); 109 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_VAL ,"out_DCACHE_REQ_VAL ",Tcontrol_t ,_param->_nb_cache_port); 110 ALLOC1_SC_SIGNAL( in_DCACHE_REQ_ACK ," in_DCACHE_REQ_ACK ",Tcontrol_t ,_param->_nb_cache_port); 111 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID ,"out_DCACHE_REQ_CONTEXT_ID ",Tcontext_t ,_param->_nb_cache_port); 112 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID ,"out_DCACHE_REQ_PACKET_ID ",Tpacket_t ,_param->_nb_cache_port); 113 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS ,"out_DCACHE_REQ_ADDRESS ",Tdcache_address_t ,_param->_nb_cache_port); 114 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_TYPE ,"out_DCACHE_REQ_TYPE ",Tdcache_type_t ,_param->_nb_cache_port); 115 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_WDATA ,"out_DCACHE_REQ_WDATA ",Tdcache_data_t ,_param->_nb_cache_port); 116 ALLOC1_SC_SIGNAL( in_DCACHE_RSP_VAL ," in_DCACHE_RSP_VAL ",Tcontrol_t ,_param->_nb_cache_port); 117 ALLOC1_SC_SIGNAL(out_DCACHE_RSP_ACK ,"out_DCACHE_RSP_ACK ",Tcontrol_t ,_param->_nb_cache_port); 118 ALLOC1_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID ," in_DCACHE_RSP_CONTEXT_ID ",Tcontext_t ,_param->_nb_cache_port); 119 ALLOC1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID ," in_DCACHE_RSP_PACKET_ID ",Tpacket_t ,_param->_nb_cache_port); 120 ALLOC1_SC_SIGNAL( in_DCACHE_RSP_RDATA ," in_DCACHE_RSP_RDATA ",Tdcache_data_t ,_param->_nb_cache_port); 121 ALLOC1_SC_SIGNAL( in_DCACHE_RSP_ERROR ," in_DCACHE_RSP_ERROR ",Tdcache_error_t ,_param->_nb_cache_port); 122 ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_VAL ,"out_BYPASS_MEMORY_VAL ",Tcontrol_t ,_param->_nb_bypass_memory); 123 ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_OOO_ENGINE_ID ,"out_BYPASS_MEMORY_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_bypass_memory); 124 ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_NUM_REG ,"out_BYPASS_MEMORY_NUM_REG ",Tgeneral_address_t,_param->_nb_bypass_memory); 125 ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_DATA ,"out_BYPASS_MEMORY_DATA ",Tgeneral_data_t ,_param->_nb_bypass_memory); 123 126 124 127 /******************************************************** … … 131 134 (*(_Load_store_unit->in_NRESET)) (*(in_NRESET)); 132 135 133 (*(_Load_store_unit-> in_MEMORY_IN_VAL ))(*( in_MEMORY_IN_VAL ));134 (*(_Load_store_unit->out_MEMORY_IN_ACK ))(*(out_MEMORY_IN_ACK ));136 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_VAL ,_param->_nb_inst_memory); 137 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_IN_ACK ,_param->_nb_inst_memory); 135 138 if (_param->_have_port_context_id) 136 (*(_Load_store_unit-> in_MEMORY_IN_CONTEXT_ID ))(*( in_MEMORY_IN_CONTEXT_ID ));139 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_CONTEXT_ID ,_param->_nb_inst_memory); 137 140 if (_param->_have_port_front_end_id) 138 (*(_Load_store_unit-> in_MEMORY_IN_FRONT_END_ID ))(*( in_MEMORY_IN_FRONT_END_ID )); 139 if (_param->_have_port_ooo_engine_id) 140 (*(_Load_store_unit-> in_MEMORY_IN_OOO_ENGINE_ID ))(*( in_MEMORY_IN_OOO_ENGINE_ID )); 141 if (_param->_have_port_packet_id) 142 (*(_Load_store_unit-> in_MEMORY_IN_PACKET_ID ))(*( in_MEMORY_IN_PACKET_ID )); 143 (*(_Load_store_unit-> in_MEMORY_IN_OPERATION ))(*( in_MEMORY_IN_OPERATION )); 144 (*(_Load_store_unit-> in_MEMORY_IN_TYPE ))(*( in_MEMORY_IN_TYPE )); 145 (*(_Load_store_unit-> in_MEMORY_IN_STORE_QUEUE_PTR_WRITE))(*( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE)); 146 if (_param->_have_port_load_queue_ptr) 147 (*(_Load_store_unit-> in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ))(*( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE )); 148 (*(_Load_store_unit-> in_MEMORY_IN_HAS_IMMEDIAT ))(*( in_MEMORY_IN_HAS_IMMEDIAT )); 149 (*(_Load_store_unit-> in_MEMORY_IN_IMMEDIAT ))(*( in_MEMORY_IN_IMMEDIAT )); 150 (*(_Load_store_unit-> in_MEMORY_IN_DATA_RA ))(*( in_MEMORY_IN_DATA_RA )); 151 (*(_Load_store_unit-> in_MEMORY_IN_DATA_RB ))(*( in_MEMORY_IN_DATA_RB )); 152 (*(_Load_store_unit-> in_MEMORY_IN_DATA_RC ))(*( in_MEMORY_IN_DATA_RC )); 153 (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RD ))(*( in_MEMORY_IN_WRITE_RD )); 154 (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RD ))(*( in_MEMORY_IN_NUM_REG_RD )); 155 (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RE ))(*( in_MEMORY_IN_WRITE_RE )); 156 (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RE ))(*( in_MEMORY_IN_NUM_REG_RE )); 157 158 (*(_Load_store_unit->out_MEMORY_OUT_VAL ))(*(out_MEMORY_OUT_VAL )); 159 (*(_Load_store_unit-> in_MEMORY_OUT_ACK ))(*( in_MEMORY_OUT_ACK )); 141 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_FRONT_END_ID ,_param->_nb_inst_memory); 142 if (_param->_have_port_ooo_engine_id) 143 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_OOO_ENGINE_ID ,_param->_nb_inst_memory); 144 if (_param->_have_port_rob_ptr) 145 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_PACKET_ID ,_param->_nb_inst_memory); 146 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_OPERATION ,_param->_nb_inst_memory); 147 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_TYPE ,_param->_nb_inst_memory); 148 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_memory); 149 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_memory); 150 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_HAS_IMMEDIAT ,_param->_nb_inst_memory); 151 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_IMMEDIAT ,_param->_nb_inst_memory); 152 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_DATA_RA ,_param->_nb_inst_memory); 153 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_DATA_RB ,_param->_nb_inst_memory); 154 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_DATA_RC ,_param->_nb_inst_memory); 155 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_WRITE_RD ,_param->_nb_inst_memory); 156 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_NUM_REG_RD ,_param->_nb_inst_memory); 157 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_WRITE_RE ,_param->_nb_inst_memory); 158 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_NUM_REG_RE ,_param->_nb_inst_memory); 159 160 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_VAL ,_param->_nb_inst_memory); 161 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_OUT_ACK ,_param->_nb_inst_memory); 160 162 if (_param->_have_port_context_id) 161 (*(_Load_store_unit->out_MEMORY_OUT_CONTEXT_ID ))(*(out_MEMORY_OUT_CONTEXT_ID ));163 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_CONTEXT_ID ,_param->_nb_inst_memory); 162 164 if (_param->_have_port_front_end_id) 163 (*(_Load_store_unit->out_MEMORY_OUT_FRONT_END_ID ))(*(out_MEMORY_OUT_FRONT_END_ID ));164 if (_param->_have_port_ooo_engine_id) 165 (*(_Load_store_unit->out_MEMORY_OUT_OOO_ENGINE_ID ))(*(out_MEMORY_OUT_OOO_ENGINE_ID ));166 if (_param->_have_port_ packet_id)167 (*(_Load_store_unit->out_MEMORY_OUT_PACKET_ID ))(*(out_MEMORY_OUT_PACKET_ID ));168 // (*(_Load_store_unit->out_MEMORY_OUT_OPERATION ))(*(out_MEMORY_OUT_OPERATION ));169 (*(_Load_store_unit->out_MEMORY_OUT_TYPE ))(*(out_MEMORY_OUT_TYPE ));170 (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RD ))(*(out_MEMORY_OUT_WRITE_RD ));171 (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RD ))(*(out_MEMORY_OUT_NUM_REG_RD ));172 (*(_Load_store_unit->out_MEMORY_OUT_DATA_RD ))(*(out_MEMORY_OUT_DATA_RD ));173 (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RE ))(*(out_MEMORY_OUT_WRITE_RE ));174 (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RE ))(*(out_MEMORY_OUT_NUM_REG_RE ));175 (*(_Load_store_unit->out_MEMORY_OUT_DATA_RE ))(*(out_MEMORY_OUT_DATA_RE ));176 (*(_Load_store_unit->out_MEMORY_OUT_EXCEPTION ))(*(out_MEMORY_OUT_EXCEPTION ));177 (*(_Load_store_unit->out_MEMORY_OUT_NO_SEQUENCE ))(*(out_MEMORY_OUT_NO_SEQUENCE ));178 (*(_Load_store_unit->out_MEMORY_OUT_ADDRESS ))(*(out_MEMORY_OUT_ADDRESS ));179 180 (*(_Load_store_unit->out_DCACHE_REQ_VAL ))(*(out_DCACHE_REQ_VAL ));181 (*(_Load_store_unit-> in_DCACHE_REQ_ACK ))(*( in_DCACHE_REQ_ACK ));165 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_FRONT_END_ID ,_param->_nb_inst_memory); 166 if (_param->_have_port_ooo_engine_id) 167 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_OOO_ENGINE_ID,_param->_nb_inst_memory); 168 if (_param->_have_port_rob_ptr) 169 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_PACKET_ID ,_param->_nb_inst_memory); 170 //INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_OPERATION ,_param->_nb_inst_memory); 171 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_TYPE ,_param->_nb_inst_memory); 172 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_WRITE_RD ,_param->_nb_inst_memory); 173 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_NUM_REG_RD ,_param->_nb_inst_memory); 174 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_DATA_RD ,_param->_nb_inst_memory); 175 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_WRITE_RE ,_param->_nb_inst_memory); 176 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_NUM_REG_RE ,_param->_nb_inst_memory); 177 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_DATA_RE ,_param->_nb_inst_memory); 178 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_EXCEPTION ,_param->_nb_inst_memory); 179 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_NO_SEQUENCE ,_param->_nb_inst_memory); 180 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_ADDRESS ,_param->_nb_inst_memory); 181 182 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_VAL ,_param->_nb_cache_port); 183 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_REQ_ACK ,_param->_nb_cache_port); 182 184 if (_param->_have_port_dcache_context_id) 183 (*(_Load_store_unit->out_DCACHE_REQ_CONTEXT_ID))(*(out_DCACHE_REQ_CONTEXT_ID));184 (*(_Load_store_unit->out_DCACHE_REQ_PACKET_ID ))(*(out_DCACHE_REQ_PACKET_ID ));185 (*(_Load_store_unit->out_DCACHE_REQ_ADDRESS ))(*(out_DCACHE_REQ_ADDRESS ));186 (*(_Load_store_unit->out_DCACHE_REQ_TYPE ))(*(out_DCACHE_REQ_TYPE ));187 (*(_Load_store_unit->out_DCACHE_REQ_WDATA ))(*(out_DCACHE_REQ_WDATA ));188 189 (*(_Load_store_unit-> in_DCACHE_RSP_VAL ))(*( in_DCACHE_RSP_VAL ));190 (*(_Load_store_unit->out_DCACHE_RSP_ACK ))(*(out_DCACHE_RSP_ACK ));185 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_CONTEXT_ID ,_param->_nb_cache_port); 186 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_PACKET_ID ,_param->_nb_cache_port); 187 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_ADDRESS ,_param->_nb_cache_port); 188 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_TYPE ,_param->_nb_cache_port); 189 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_WDATA ,_param->_nb_cache_port); 190 191 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_VAL ,_param->_nb_cache_port); 192 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_RSP_ACK ,_param->_nb_cache_port); 191 193 if (_param->_have_port_dcache_context_id) 192 (*(_Load_store_unit-> in_DCACHE_RSP_CONTEXT_ID))(*( in_DCACHE_RSP_CONTEXT_ID)); 193 (*(_Load_store_unit-> in_DCACHE_RSP_PACKET_ID ))(*( in_DCACHE_RSP_PACKET_ID )); 194 (*(_Load_store_unit-> in_DCACHE_RSP_RDATA ))(*( in_DCACHE_RSP_RDATA )); 195 (*(_Load_store_unit-> in_DCACHE_RSP_ERROR ))(*( in_DCACHE_RSP_ERROR )); 196 197 { 198 for (uint32_t i=0; i<_param->_nb_bypass_memory; i++) 199 { 200 (*(_Load_store_unit->out_BYPASS_MEMORY_VAL [i]))(*(out_BYPASS_MEMORY_VAL [i])); 201 if (_param->_have_port_ooo_engine_id) 202 (*(_Load_store_unit->out_BYPASS_MEMORY_OOO_ENGINE_ID [i]))(*(out_BYPASS_MEMORY_OOO_ENGINE_ID [i])); 203 (*(_Load_store_unit->out_BYPASS_MEMORY_NUM_REG [i]))(*(out_BYPASS_MEMORY_NUM_REG [i])); 204 (*(_Load_store_unit->out_BYPASS_MEMORY_DATA [i]))(*(out_BYPASS_MEMORY_DATA [i])); 205 } 206 } 194 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_CONTEXT_ID ,_param->_nb_cache_port); 195 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_PACKET_ID ,_param->_nb_cache_port); 196 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_RDATA ,_param->_nb_cache_port); 197 INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_ERROR ,_param->_nb_cache_port); 198 199 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_VAL ,_param->_nb_bypass_memory); 200 if (_param->_have_port_ooo_engine_id) 201 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory); 202 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_NUM_REG ,_param->_nb_bypass_memory); 203 INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_DATA ,_param->_nb_bypass_memory); 204 205 207 206 cout << "<" << name << "> Start Simulation ............" << endl; 208 207 Time * _time = new Time(); … … 238 237 LABEL("Initialisation"); 239 238 240 in_MEMORY_IN_VAL ->write(0);241 in_MEMORY_OUT_ACK ->write(0);242 in_DCACHE_REQ_ACK ->write(0);243 in_DCACHE_RSP_VAL ->write(0);239 in_MEMORY_IN_VAL [0]->write(0); 240 in_MEMORY_OUT_ACK[0]->write(0); 241 in_DCACHE_REQ_ACK[0]->write(0); 242 in_DCACHE_RSP_VAL[0]->write(0); 244 243 245 244 in_NRESET ->write(0); … … 419 418 can_execute &= not load_queue_use [fifo_request.top()._load_queue_ptr_write]; 420 419 } 421 in_MEMORY_IN_VAL ->write(can_execute);420 in_MEMORY_IN_VAL [0]->write(can_execute); 422 421 423 422 if (not fifo_request.empty()) 424 423 { 425 424 if (_param->_have_port_context_id) 426 in_MEMORY_IN_CONTEXT_ID ->write (fifo_request.top()._context_id );425 in_MEMORY_IN_CONTEXT_ID [0]->write (fifo_request.top()._context_id ); 427 426 if (_param->_have_port_front_end_id) 428 in_MEMORY_IN_FRONT_END_ID ->write (fifo_request.top()._front_end_id );427 in_MEMORY_IN_FRONT_END_ID [0]->write (fifo_request.top()._front_end_id ); 429 428 if (_param->_have_port_ooo_engine_id) 430 in_MEMORY_IN_OOO_ENGINE_ID ->write (fifo_request.top()._ooo_engine_id );431 if (_param->_have_port_ packet_id)432 in_MEMORY_IN_PACKET_ID ->write (fifo_request.top()._packet_id );433 in_MEMORY_IN_OPERATION ->write (fifo_request.top()._operation );434 in_MEMORY_IN_TYPE ->write (fifo_request.top()._type );435 in_MEMORY_IN_STORE_QUEUE_PTR_WRITE ->write (fifo_request.top()._store_queue_ptr_write);429 in_MEMORY_IN_OOO_ENGINE_ID [0]->write (fifo_request.top()._ooo_engine_id ); 430 if (_param->_have_port_rob_ptr) 431 in_MEMORY_IN_PACKET_ID [0]->write (fifo_request.top()._packet_id ); 432 in_MEMORY_IN_OPERATION [0]->write (fifo_request.top()._operation ); 433 in_MEMORY_IN_TYPE [0]->write (fifo_request.top()._type ); 434 in_MEMORY_IN_STORE_QUEUE_PTR_WRITE[0]->write (fifo_request.top()._store_queue_ptr_write); 436 435 if (_param->_have_port_load_queue_ptr) 437 in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ->write (fifo_request.top()._load_queue_ptr_write );438 in_MEMORY_IN_IMMEDIAT ->write (fifo_request.top()._immediat );439 in_MEMORY_IN_DATA_RA ->write (fifo_request.top()._data_ra );440 in_MEMORY_IN_DATA_RB ->write (fifo_request.top()._data_rb );441 // in_MEMORY_IN_WRITE_RD ->write (fifo_request.top()._write_rd );442 in_MEMORY_IN_NUM_REG_RD ->write (fifo_request.top()._num_reg_rd );436 in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE [0]->write (fifo_request.top()._load_queue_ptr_write ); 437 in_MEMORY_IN_IMMEDIAT [0]->write (fifo_request.top()._immediat ); 438 in_MEMORY_IN_DATA_RA [0]->write (fifo_request.top()._data_ra ); 439 in_MEMORY_IN_DATA_RB [0]->write (fifo_request.top()._data_rb ); 440 // in_MEMORY_IN_WRITE_RD [0]->write (fifo_request.top()._write_rd ); 441 in_MEMORY_IN_NUM_REG_RD [0]->write (fifo_request.top()._num_reg_rd ); 443 442 } 444 in_MEMORY_OUT_ACK ->write((rand()%100)<percent_transaction_memory_out);443 in_MEMORY_OUT_ACK[0]->write((rand()%100)<percent_transaction_memory_out); 445 444 446 445 // ***** DCACHE_REQ ***** 447 in_DCACHE_REQ_ACK ->write((rand()%100)<percent_transaction_dcache);446 in_DCACHE_REQ_ACK[0]->write((rand()%100)<percent_transaction_dcache); 448 447 449 448 // ***** DCACHE_RSP ***** 450 449 bool have_rsp = _cache->have_rsp (); 451 in_DCACHE_RSP_VAL ->write(have_rsp);450 in_DCACHE_RSP_VAL[0]->write(have_rsp); 452 451 453 452 if (have_rsp) 454 453 { 455 in_DCACHE_RSP_CONTEXT_ID ->write(_cache->front()._context_id);456 in_DCACHE_RSP_PACKET_ID ->write(_cache->front()._packet_id );457 in_DCACHE_RSP_RDATA ->write(_cache->front()._rdata );458 in_DCACHE_RSP_ERROR ->write(_cache->front()._error );454 in_DCACHE_RSP_CONTEXT_ID[0]->write(_cache->front()._context_id); 455 in_DCACHE_RSP_PACKET_ID [0]->write(_cache->front()._packet_id ); 456 in_DCACHE_RSP_RDATA [0]->write(_cache->front()._rdata ); 457 in_DCACHE_RSP_ERROR [0]->write(_cache->front()._error ); 459 458 } 460 459 461 460 SC_START(0); 462 461 463 LABEL("MEMORY_IN : %d - %d",in_MEMORY_IN_VAL ->read(),out_MEMORY_IN_ACK->read());464 if ( in_MEMORY_IN_VAL ->read() and out_MEMORY_IN_ACK->read())462 LABEL("MEMORY_IN : %d - %d",in_MEMORY_IN_VAL [0]->read(),out_MEMORY_IN_ACK [0]->read()); 463 if ( in_MEMORY_IN_VAL [0]->read() and out_MEMORY_IN_ACK [0]->read()) 465 464 { 466 Tpacket_t packet_id = in_MEMORY_IN_PACKET_ID ->read();465 Tpacket_t packet_id = in_MEMORY_IN_PACKET_ID[0]->read(); 467 466 468 467 LABEL(" * Accepted MEMORY_IN : %d",packet_id); … … 483 482 } 484 483 485 LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL ->read(),in_MEMORY_OUT_ACK->read());486 if (out_MEMORY_OUT_VAL ->read() and in_MEMORY_OUT_ACK->read())484 LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL[0]->read(),in_MEMORY_OUT_ACK [0]->read()); 485 if (out_MEMORY_OUT_VAL[0]->read() and in_MEMORY_OUT_ACK[0]->read()) 487 486 { 488 Tpacket_t packet_id = out_MEMORY_OUT_PACKET_ID ->read();487 Tpacket_t packet_id = out_MEMORY_OUT_PACKET_ID[0]->read(); 489 488 490 489 LABEL(" * Accepted MEMORY_OUT : %d",packet_id); … … 499 498 else 500 499 { 501 if (not (out_MEMORY_OUT_EXCEPTION ->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE))500 if (not (out_MEMORY_OUT_EXCEPTION[0]->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE)) 502 501 { 503 502 nb_request_memory_out ++; … … 508 507 { 509 508 std::cout << "seth - have a load_speculative." << std::endl; 510 tab_request[packet_id]._write_spec_ko = (out_MEMORY_OUT_DATA_RD ->read() != tab_request[packet_id]._data_wait);509 tab_request[packet_id]._write_spec_ko = (out_MEMORY_OUT_DATA_RD[0]->read() != tab_request[packet_id]._data_wait); 511 510 tab_request[packet_id]._previous_load_speculative = 1; 512 511 } … … 516 515 517 516 // a lot of test 518 TEST(Tpacket_t , out_MEMORY_OUT_PACKET_ID ->read(), tab_request[packet_id]._packet_id );519 TEST(Tcontext_t , out_MEMORY_OUT_CONTEXT_ID ->read(), tab_request[packet_id]._context_id );520 TEST(Tcontext_t , out_MEMORY_OUT_FRONT_END_ID ->read(), tab_request[packet_id]._front_end_id );521 TEST(Tcontext_t , out_MEMORY_OUT_OOO_ENGINE_ID ->read(), tab_request[packet_id]._ooo_engine_id);522 // TEST(Toperation_t , out_MEMORY_OUT_OPERATION ->read(), tab_request[packet_id]._operation );523 TEST(Ttype_t , out_MEMORY_OUT_TYPE ->read(), TYPE_MEMORY );517 TEST(Tpacket_t , out_MEMORY_OUT_PACKET_ID [0]->read(), tab_request[packet_id]._packet_id ); 518 TEST(Tcontext_t , out_MEMORY_OUT_CONTEXT_ID [0]->read(), tab_request[packet_id]._context_id ); 519 TEST(Tcontext_t , out_MEMORY_OUT_FRONT_END_ID [0]->read(), tab_request[packet_id]._front_end_id ); 520 TEST(Tcontext_t , out_MEMORY_OUT_OOO_ENGINE_ID[0]->read(), tab_request[packet_id]._ooo_engine_id); 521 // TEST(Toperation_t , out_MEMORY_OUT_OPERATION [0]->read(), tab_request[packet_id]._operation ); 522 TEST(Ttype_t , out_MEMORY_OUT_TYPE [0]->read(), TYPE_MEMORY ); 524 523 525 524 if (is_operation_memory_load (tab_request[packet_id]._operation)) 526 525 { 527 TEST(Tgeneral_address_t, out_MEMORY_OUT_NUM_REG_RD ->read(), tab_request[packet_id]._num_reg_rd );526 TEST(Tgeneral_address_t, out_MEMORY_OUT_NUM_REG_RD [0]->read(), tab_request[packet_id]._num_reg_rd ); 528 527 } 529 528 … … 532 531 bool error_alignment = (address != (address & (~ mask_memory_access(tab_request[packet_id]._operation)))); 533 532 bool berr = (address >= size_memory); 534 Texception_t exception = out_MEMORY_OUT_EXCEPTION ->read();533 Texception_t exception = out_MEMORY_OUT_EXCEPTION[0]->read(); 535 534 536 535 if (is_operation_memory_store(tab_request[packet_id]._operation)) 537 536 { 538 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD ->read(), 0);537 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD [0]->read(), 0); 539 538 540 539 // store. … … 568 567 if (test_result_ko) 569 568 { 570 TEST(Tgeneral_data_t , out_MEMORY_OUT_DATA_RD ->read(), address);569 TEST(Tgeneral_data_t , out_MEMORY_OUT_DATA_RD[0]->read(), address); 571 570 } 572 571 } … … 578 577 bool is_load = is_operation_memory_load(tab_request[packet_id]._operation); 579 578 580 if (not (out_MEMORY_OUT_EXCEPTION ->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE))579 if (not (out_MEMORY_OUT_EXCEPTION[0]->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE)) 581 580 { 582 581 bool test_result_ko = false; … … 586 585 // IS A LOAD :D 587 586 TEST(Texception_t, exception, EXCEPTION_MEMORY_MISS_SPECULATION); 588 TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD ->read(), 1);587 TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD[0]->read(), 1); 589 588 } 590 589 else … … 592 591 { 593 592 TEST(Texception_t, exception, EXCEPTION_MEMORY_ALIGNMENT); 594 TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD ->read(), is_load);593 TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD[0]->read(), is_load); 595 594 test_result_ko = true; 596 595 } … … 599 598 { 600 599 TEST(Texception_t, exception, EXCEPTION_MEMORY_BUS_ERROR); 601 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD ->read(), is_load);600 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD[0]->read(), is_load); 602 601 test_result_ko = true; 603 602 } … … 605 604 { 606 605 TEST(Texception_t, exception, EXCEPTION_MEMORY_NONE); 607 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD ->read(), is_load and not tab_request[packet_id]._previous_load_speculative);606 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD[0]->read(), is_load and not tab_request[packet_id]._previous_load_speculative); 608 607 } 609 608 // In all case : test data 610 609 if (test_result_ko) 611 610 { 612 TEST(Tgeneral_data_t , out_MEMORY_OUT_DATA_RD ->read(), address);611 TEST(Tgeneral_data_t , out_MEMORY_OUT_DATA_RD[0]->read(), address); 613 612 } 614 613 else 615 614 { 616 TEST(Tgeneral_data_t , out_MEMORY_OUT_DATA_RD ->read(), tab_request[packet_id]._data_wait);615 TEST(Tgeneral_data_t , out_MEMORY_OUT_DATA_RD[0]->read(), tab_request[packet_id]._data_wait); 617 616 } 618 617 } 619 618 else 620 619 { 621 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD ->read(), 1);620 TEST(Tcontrol_t , out_MEMORY_OUT_WRITE_RD [0]->read(), 1); 622 621 } 623 622 } 624 623 } 625 624 626 LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL ->read(),in_DCACHE_REQ_ACK->read());627 if (out_DCACHE_REQ_VAL ->read() and in_DCACHE_REQ_ACK->read())625 LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL[0]->read(),in_DCACHE_REQ_ACK [0]->read()); 626 if (out_DCACHE_REQ_VAL[0]->read() and in_DCACHE_REQ_ACK[0]->read()) 628 627 { 629 628 Tcontext_t context_id; 630 629 Tpacket_t packet_id ; 631 Tdcache_address_t address = out_DCACHE_REQ_ADDRESS ->read();630 Tdcache_address_t address = out_DCACHE_REQ_ADDRESS[0]->read(); 632 631 Tdcache_data_t rdata; 633 632 Tdcache_error_t error = 0; 634 633 if (_param->_have_port_dcache_context_id) 635 context_id = out_DCACHE_REQ_CONTEXT_ID ->read();634 context_id = out_DCACHE_REQ_CONTEXT_ID[0]->read(); 636 635 else 637 636 context_id = 0; 638 637 639 packet_id = (out_DCACHE_REQ_PACKET_ID ->read())>>1;638 packet_id = (out_DCACHE_REQ_PACKET_ID [0]->read())>>1; 640 639 641 640 LABEL(" * Accepted DCACHE_REQ : %d",packet_id); … … 649 648 else 650 649 { 651 rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE ->read(), out_DCACHE_REQ_WDATA->read());650 rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE[0]->read(), out_DCACHE_REQ_WDATA[0]->read()); 652 651 LABEL(" * rdata : 0x%x",rdata); 653 652 } 654 653 655 654 // test type : send or not a respons ! 656 if ((out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_SYNCHRONIZATION) or657 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_LOAD_8 ) or658 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_LOAD_16) or659 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_LOAD_32) or660 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_LOAD_64) or661 ((error != DCACHE_ERROR_NONE) and ((out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_STORE_8 ) or662 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_STORE_16) or663 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_STORE_32) or664 (out_DCACHE_REQ_TYPE ->read() == DCACHE_TYPE_STORE_64) )))655 if ((out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_SYNCHRONIZATION) or 656 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_8 ) or 657 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_16) or 658 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_32) or 659 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_64) or 660 ((error != DCACHE_ERROR_NONE) and ((out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_8 ) or 661 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_16) or 662 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_32) or 663 (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_64) ))) 665 664 { 666 665 LABEL(" * have_dcache_rsp"); 667 666 668 667 _cache->push (context_id, 669 out_DCACHE_REQ_PACKET_ID ->read(),668 out_DCACHE_REQ_PACKET_ID [0]->read(), 670 669 rdata, 671 670 error); … … 673 672 } 674 673 675 LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL ->read(),out_DCACHE_RSP_ACK->read());676 if (in_DCACHE_RSP_VAL ->read() and out_DCACHE_RSP_ACK->read())674 LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL[0]->read(),out_DCACHE_RSP_ACK [0]->read()); 675 if (in_DCACHE_RSP_VAL[0]->read() and out_DCACHE_RSP_ACK[0]->read()) 677 676 { 678 677 _cache->pop(); … … 704 703 delete in_NRESET; 705 704 706 delete in_MEMORY_IN_VAL ; 707 delete out_MEMORY_IN_ACK ; 708 delete in_MEMORY_IN_CONTEXT_ID ; 709 delete in_MEMORY_IN_FRONT_END_ID ; 710 delete in_MEMORY_IN_OOO_ENGINE_ID ; 711 delete in_MEMORY_IN_PACKET_ID ; 712 delete in_MEMORY_IN_OPERATION ; 713 delete in_MEMORY_IN_STORE_QUEUE_PTR_WRITE; 714 delete in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ; 715 delete in_MEMORY_IN_HAS_IMMEDIAT; 716 delete in_MEMORY_IN_IMMEDIAT ; 717 delete in_MEMORY_IN_DATA_RA ; 718 delete in_MEMORY_IN_DATA_RB ; 719 delete in_MEMORY_IN_DATA_RC ; 720 delete in_MEMORY_IN_WRITE_RD ; 721 delete in_MEMORY_IN_NUM_REG_RD ; 722 delete in_MEMORY_IN_WRITE_RE ; 723 delete in_MEMORY_IN_NUM_REG_RE ; 724 725 delete out_MEMORY_OUT_VAL ; 726 delete in_MEMORY_OUT_ACK ; 727 delete out_MEMORY_OUT_CONTEXT_ID; 728 delete out_MEMORY_OUT_FRONT_END_ID; 729 delete out_MEMORY_OUT_OOO_ENGINE_ID; 730 delete out_MEMORY_OUT_PACKET_ID ; 731 // delete out_MEMORY_OUT_OPERATION ; 732 delete out_MEMORY_OUT_TYPE ; 733 delete out_MEMORY_OUT_WRITE_RD ; 734 delete out_MEMORY_OUT_NUM_REG_RD; 735 delete out_MEMORY_OUT_DATA_RD ; 736 delete out_MEMORY_OUT_WRITE_RE ; 737 delete out_MEMORY_OUT_NUM_REG_RE; 738 delete out_MEMORY_OUT_DATA_RE ; 739 delete out_MEMORY_OUT_EXCEPTION ; 740 delete out_MEMORY_OUT_NO_SEQUENCE; 741 delete out_MEMORY_OUT_ADDRESS ; 742 743 delete out_DCACHE_REQ_VAL ; 744 delete in_DCACHE_REQ_ACK ; 745 delete out_DCACHE_REQ_CONTEXT_ID; 746 delete out_DCACHE_REQ_PACKET_ID ; 747 delete out_DCACHE_REQ_ADDRESS ; 748 delete out_DCACHE_REQ_TYPE ; 749 delete out_DCACHE_REQ_WDATA ; 750 751 delete in_DCACHE_RSP_VAL ; 752 delete out_DCACHE_RSP_ACK ; 753 delete in_DCACHE_RSP_CONTEXT_ID; 754 delete in_DCACHE_RSP_PACKET_ID ; 755 delete in_DCACHE_RSP_RDATA ; 756 delete in_DCACHE_RSP_ERROR ; 757 758 { 759 delete [] out_BYPASS_MEMORY_VAL ; 760 delete [] out_BYPASS_MEMORY_OOO_ENGINE_ID; 761 delete [] out_BYPASS_MEMORY_NUM_REG ; 762 delete [] out_BYPASS_MEMORY_DATA ; 763 } 705 DELETE1_SC_SIGNAL( in_MEMORY_IN_VAL ,_param->_nb_inst_memory); 706 DELETE1_SC_SIGNAL(out_MEMORY_IN_ACK ,_param->_nb_inst_memory); 707 DELETE1_SC_SIGNAL( in_MEMORY_IN_CONTEXT_ID ,_param->_nb_inst_memory); 708 DELETE1_SC_SIGNAL( in_MEMORY_IN_FRONT_END_ID ,_param->_nb_inst_memory); 709 DELETE1_SC_SIGNAL( in_MEMORY_IN_OOO_ENGINE_ID ,_param->_nb_inst_memory); 710 DELETE1_SC_SIGNAL( in_MEMORY_IN_PACKET_ID ,_param->_nb_inst_memory); 711 DELETE1_SC_SIGNAL( in_MEMORY_IN_OPERATION ,_param->_nb_inst_memory); 712 DELETE1_SC_SIGNAL( in_MEMORY_IN_TYPE ,_param->_nb_inst_memory); 713 DELETE1_SC_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_memory); 714 DELETE1_SC_SIGNAL( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_memory); 715 DELETE1_SC_SIGNAL( in_MEMORY_IN_HAS_IMMEDIAT ,_param->_nb_inst_memory); 716 DELETE1_SC_SIGNAL( in_MEMORY_IN_IMMEDIAT ,_param->_nb_inst_memory); 717 DELETE1_SC_SIGNAL( in_MEMORY_IN_DATA_RA ,_param->_nb_inst_memory); 718 DELETE1_SC_SIGNAL( in_MEMORY_IN_DATA_RB ,_param->_nb_inst_memory); 719 DELETE1_SC_SIGNAL( in_MEMORY_IN_DATA_RC ,_param->_nb_inst_memory); 720 DELETE1_SC_SIGNAL( in_MEMORY_IN_WRITE_RD ,_param->_nb_inst_memory); 721 DELETE1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RD ,_param->_nb_inst_memory); 722 DELETE1_SC_SIGNAL( in_MEMORY_IN_WRITE_RE ,_param->_nb_inst_memory); 723 DELETE1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RE ,_param->_nb_inst_memory); 724 725 DELETE1_SC_SIGNAL(out_MEMORY_OUT_VAL ,_param->_nb_inst_memory); 726 DELETE1_SC_SIGNAL( in_MEMORY_OUT_ACK ,_param->_nb_inst_memory); 727 DELETE1_SC_SIGNAL(out_MEMORY_OUT_CONTEXT_ID ,_param->_nb_inst_memory); 728 DELETE1_SC_SIGNAL(out_MEMORY_OUT_FRONT_END_ID ,_param->_nb_inst_memory); 729 DELETE1_SC_SIGNAL(out_MEMORY_OUT_OOO_ENGINE_ID,_param->_nb_inst_memory); 730 DELETE1_SC_SIGNAL(out_MEMORY_OUT_PACKET_ID ,_param->_nb_inst_memory); 731 //DELETE1_SC_SIGNAL(out_MEMORY_OUT_OPERATION ,_param->_nb_inst_memory); 732 DELETE1_SC_SIGNAL(out_MEMORY_OUT_TYPE ,_param->_nb_inst_memory); 733 DELETE1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RD ,_param->_nb_inst_memory); 734 DELETE1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RD ,_param->_nb_inst_memory); 735 DELETE1_SC_SIGNAL(out_MEMORY_OUT_DATA_RD ,_param->_nb_inst_memory); 736 DELETE1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RE ,_param->_nb_inst_memory); 737 DELETE1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RE ,_param->_nb_inst_memory); 738 DELETE1_SC_SIGNAL(out_MEMORY_OUT_DATA_RE ,_param->_nb_inst_memory); 739 DELETE1_SC_SIGNAL(out_MEMORY_OUT_EXCEPTION ,_param->_nb_inst_memory); 740 DELETE1_SC_SIGNAL(out_MEMORY_OUT_NO_SEQUENCE ,_param->_nb_inst_memory); 741 DELETE1_SC_SIGNAL(out_MEMORY_OUT_ADDRESS ,_param->_nb_inst_memory); 742 743 DELETE1_SC_SIGNAL(out_DCACHE_REQ_VAL ,_param->_nb_cache_port); 744 DELETE1_SC_SIGNAL( in_DCACHE_REQ_ACK ,_param->_nb_cache_port); 745 DELETE1_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID ,_param->_nb_cache_port); 746 DELETE1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID ,_param->_nb_cache_port); 747 DELETE1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS ,_param->_nb_cache_port); 748 DELETE1_SC_SIGNAL(out_DCACHE_REQ_TYPE ,_param->_nb_cache_port); 749 DELETE1_SC_SIGNAL(out_DCACHE_REQ_WDATA ,_param->_nb_cache_port); 750 751 DELETE1_SC_SIGNAL( in_DCACHE_RSP_VAL ,_param->_nb_cache_port); 752 DELETE1_SC_SIGNAL(out_DCACHE_RSP_ACK ,_param->_nb_cache_port); 753 DELETE1_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID ,_param->_nb_cache_port); 754 DELETE1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID ,_param->_nb_cache_port); 755 DELETE1_SC_SIGNAL( in_DCACHE_RSP_RDATA ,_param->_nb_cache_port); 756 DELETE1_SC_SIGNAL( in_DCACHE_RSP_ERROR ,_param->_nb_cache_port); 757 758 DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_VAL ,_param->_nb_bypass_memory); 759 DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory); 760 DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_NUM_REG ,_param->_nb_bypass_memory); 761 DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_DATA ,_param->_nb_bypass_memory); 764 762 #endif 765 763
Note: See TracChangeset
for help on using the changeset viewer.