1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | * Test |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/include/test.h" |
---|
10 | #include "Common/include/Test.h" |
---|
11 | #include "Behavioural/include/Allocation.h" |
---|
12 | |
---|
13 | #define NB_ITERATION 1 |
---|
14 | #define CYCLE_MAX (128*NB_ITERATION) |
---|
15 | |
---|
16 | #define LABEL(str...) \ |
---|
17 | { \ |
---|
18 | msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \ |
---|
19 | msg (str); \ |
---|
20 | msg (_("\n")); \ |
---|
21 | } while(0) |
---|
22 | |
---|
23 | #define SC_START(cycle_offset) \ |
---|
24 | do \ |
---|
25 | { \ |
---|
26 | /*cout << "SC_START (begin)" << endl;*/ \ |
---|
27 | \ |
---|
28 | uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \ |
---|
29 | if (cycle_offset != 0) \ |
---|
30 | { \ |
---|
31 | cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \ |
---|
32 | } \ |
---|
33 | \ |
---|
34 | if (cycle_current > CYCLE_MAX) \ |
---|
35 | { \ |
---|
36 | TEST_KO("Maximal cycles Reached"); \ |
---|
37 | } \ |
---|
38 | \ |
---|
39 | sc_start(cycle_offset); \ |
---|
40 | \ |
---|
41 | /*cout << "SC_START (end )" << endl;*/ \ |
---|
42 | } while(0) |
---|
43 | |
---|
44 | void test (string name, |
---|
45 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Parameters * _param) |
---|
46 | { |
---|
47 | msg(_("<%s> : Simulation SystemC.\n"),name.c_str()); |
---|
48 | |
---|
49 | #ifdef STATISTICS |
---|
50 | morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50); |
---|
51 | #endif |
---|
52 | |
---|
53 | Read_unit * _Read_unit = new Read_unit (name.c_str(), |
---|
54 | #ifdef STATISTICS |
---|
55 | _parameters_statistics, |
---|
56 | #endif |
---|
57 | _param); |
---|
58 | |
---|
59 | #ifdef SYSTEMC |
---|
60 | /********************************************************************* |
---|
61 | * Déclarations des signaux |
---|
62 | *********************************************************************/ |
---|
63 | string rename; |
---|
64 | |
---|
65 | sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); |
---|
66 | sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); |
---|
67 | |
---|
68 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_VAL ," in_READ_UNIT_IN_VAL ",Tcontrol_t ); |
---|
69 | ALLOC_SC_SIGNAL (out_READ_UNIT_IN_ACK ,"out_READ_UNIT_IN_ACK ",Tcontrol_t ); |
---|
70 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_CONTEXT_ID ," in_READ_UNIT_IN_CONTEXT_ID ",Tcontext_t ); |
---|
71 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_FRONT_END_ID ," in_READ_UNIT_IN_FRONT_END_ID ",Tcontext_t ); |
---|
72 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_OOO_ENGINE_ID ," in_READ_UNIT_IN_OOO_ENGINE_ID ",Tcontext_t ); |
---|
73 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_PACKET_ID ," in_READ_UNIT_IN_PACKET_ID ",Tpacket_t ); |
---|
74 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_OPERATION ," in_READ_UNIT_IN_OPERATION ",Toperation_t ); |
---|
75 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_TYPE ," in_READ_UNIT_IN_TYPE ",Ttype_t ); |
---|
76 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE ," in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t ); |
---|
77 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ," in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ); |
---|
78 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_HAS_IMMEDIAT ," in_READ_UNIT_IN_HAS_IMMEDIAT ",Tcontrol_t ); |
---|
79 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_IMMEDIAT ," in_READ_UNIT_IN_IMMEDIAT ",Tgeneral_data_t ); |
---|
80 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_READ_RA ," in_READ_UNIT_IN_READ_RA ",Tcontrol_t ); |
---|
81 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RA ," in_READ_UNIT_IN_NUM_REG_RA ",Tgeneral_address_t); |
---|
82 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_READ_RB ," in_READ_UNIT_IN_READ_RB ",Tcontrol_t ); |
---|
83 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RB ," in_READ_UNIT_IN_NUM_REG_RB ",Tgeneral_address_t); |
---|
84 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_READ_RC ," in_READ_UNIT_IN_READ_RC ",Tcontrol_t ); |
---|
85 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RC ," in_READ_UNIT_IN_NUM_REG_RC ",Tspecial_address_t); |
---|
86 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_WRITE_RD ," in_READ_UNIT_IN_WRITE_RD ",Tcontrol_t ); |
---|
87 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RD ," in_READ_UNIT_IN_NUM_REG_RD ",Tgeneral_address_t); |
---|
88 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_WRITE_RE ," in_READ_UNIT_IN_WRITE_RE ",Tcontrol_t ); |
---|
89 | ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RE ," in_READ_UNIT_IN_NUM_REG_RE ",Tspecial_address_t); |
---|
90 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_VAL ,"out_READ_UNIT_OUT_VAL ",Tcontrol_t ,_param->_nb_inst_retire); |
---|
91 | ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_ACK ," in_READ_UNIT_OUT_ACK ",Tcontrol_t ,_param->_nb_inst_retire); |
---|
92 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_CONTEXT_ID ,"out_READ_UNIT_OUT_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_retire); |
---|
93 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_FRONT_END_ID ,"out_READ_UNIT_OUT_FRONT_END_ID ",Tcontext_t ,_param->_nb_inst_retire); |
---|
94 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_OOO_ENGINE_ID ,"out_READ_UNIT_OUT_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_inst_retire); |
---|
95 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_PACKET_ID ,"out_READ_UNIT_OUT_PACKET_ID ",Tpacket_t ,_param->_nb_inst_retire); |
---|
96 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_OPERATION ,"out_READ_UNIT_OUT_OPERATION ",Toperation_t ,_param->_nb_inst_retire); |
---|
97 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_TYPE ,"out_READ_UNIT_OUT_TYPE ",Ttype_t ,_param->_nb_inst_retire); |
---|
98 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_inst_retire); |
---|
99 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_retire); |
---|
100 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_HAS_IMMEDIAT ,"out_READ_UNIT_OUT_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_retire); |
---|
101 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_IMMEDIAT ,"out_READ_UNIT_OUT_IMMEDIAT ",Tgeneral_data_t ,_param->_nb_inst_retire); |
---|
102 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_DATA_RA ,"out_READ_UNIT_OUT_DATA_RA ",Tgeneral_data_t ,_param->_nb_inst_retire); |
---|
103 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_DATA_RB ,"out_READ_UNIT_OUT_DATA_RB ",Tgeneral_data_t ,_param->_nb_inst_retire); |
---|
104 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_DATA_RC ,"out_READ_UNIT_OUT_DATA_RC ",Tspecial_data_t ,_param->_nb_inst_retire); |
---|
105 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_WRITE_RD ,"out_READ_UNIT_OUT_WRITE_RD ",Tcontrol_t ,_param->_nb_inst_retire); |
---|
106 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_NUM_REG_RD ,"out_READ_UNIT_OUT_NUM_REG_RD ",Tgeneral_address_t,_param->_nb_inst_retire); |
---|
107 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_WRITE_RE ,"out_READ_UNIT_OUT_WRITE_RE ",Tcontrol_t ,_param->_nb_inst_retire); |
---|
108 | ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_NUM_REG_RE ,"out_READ_UNIT_OUT_NUM_REG_RE ",Tspecial_address_t,_param->_nb_inst_retire); |
---|
109 | ALLOC1_SC_SIGNAL(out_GPR_READ_VAL ,"out_GPR_READ_VAL ",Tcontrol_t ,_param->_nb_gpr_read); |
---|
110 | ALLOC1_SC_SIGNAL( in_GPR_READ_ACK ," in_GPR_READ_ACK ",Tcontrol_t ,_param->_nb_gpr_read); |
---|
111 | ALLOC1_SC_SIGNAL(out_GPR_READ_OOO_ENGINE_ID ,"out_GPR_READ_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_gpr_read); |
---|
112 | ALLOC1_SC_SIGNAL(out_GPR_READ_NUM_REG ,"out_GPR_READ_NUM_REG ",Tgeneral_address_t,_param->_nb_gpr_read); |
---|
113 | ALLOC1_SC_SIGNAL( in_GPR_READ_DATA ," in_GPR_READ_DATA ",Tgeneral_data_t ,_param->_nb_gpr_read); |
---|
114 | ALLOC1_SC_SIGNAL( in_GPR_READ_DATA_VAL ," in_GPR_READ_DATA_VAL ",Tcontrol_t ,_param->_nb_gpr_read); |
---|
115 | ALLOC1_SC_SIGNAL(out_SPR_READ_VAL ,"out_SPR_READ_VAL ",Tcontrol_t ,_param->_nb_spr_read); |
---|
116 | ALLOC1_SC_SIGNAL( in_SPR_READ_ACK ," in_SPR_READ_ACK ",Tcontrol_t ,_param->_nb_spr_read); |
---|
117 | ALLOC1_SC_SIGNAL(out_SPR_READ_OOO_ENGINE_ID ,"out_SPR_READ_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_spr_read); |
---|
118 | ALLOC1_SC_SIGNAL(out_SPR_READ_NUM_REG ,"out_SPR_READ_NUM_REG ",Tspecial_address_t,_param->_nb_spr_read); |
---|
119 | ALLOC1_SC_SIGNAL( in_SPR_READ_DATA ," in_SPR_READ_DATA ",Tspecial_data_t ,_param->_nb_spr_read); |
---|
120 | ALLOC1_SC_SIGNAL( in_SPR_READ_DATA_VAL ," in_SPR_READ_DATA_VAL ",Tcontrol_t ,_param->_nb_spr_read); |
---|
121 | ALLOC1_SC_SIGNAL( in_GPR_WRITE_VAL ," in_GPR_WRITE_VAL ",Tcontrol_t ,_param->_nb_gpr_write); |
---|
122 | ALLOC1_SC_SIGNAL( in_GPR_WRITE_OOO_ENGINE_ID ," in_GPR_WRITE_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_gpr_write); |
---|
123 | ALLOC1_SC_SIGNAL( in_GPR_WRITE_NUM_REG ," in_GPR_WRITE_NUM_REG ",Tgeneral_address_t,_param->_nb_gpr_write); |
---|
124 | ALLOC1_SC_SIGNAL( in_GPR_WRITE_DATA ," in_GPR_WRITE_DATA ",Tgeneral_data_t ,_param->_nb_gpr_write); |
---|
125 | ALLOC1_SC_SIGNAL( in_SPR_WRITE_VAL ," in_SPR_WRITE_VAL ",Tcontrol_t ,_param->_nb_spr_write); |
---|
126 | ALLOC1_SC_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID ," in_SPR_WRITE_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_spr_write); |
---|
127 | ALLOC1_SC_SIGNAL( in_SPR_WRITE_NUM_REG ," in_SPR_WRITE_NUM_REG ",Tspecial_address_t,_param->_nb_spr_write); |
---|
128 | ALLOC1_SC_SIGNAL( in_SPR_WRITE_DATA ," in_SPR_WRITE_DATA ",Tspecial_data_t ,_param->_nb_spr_write); |
---|
129 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_OOO_ENGINE_ID ," in_BYPASS_WRITE_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_bypass_write); |
---|
130 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_GPR_VAL ," in_BYPASS_WRITE_GPR_VAL ",Tcontrol_t ,_param->_nb_bypass_write); |
---|
131 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_GPR_NUM_REG ," in_BYPASS_WRITE_GPR_NUM_REG ",Tgeneral_address_t,_param->_nb_bypass_write); |
---|
132 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_GPR_DATA ," in_BYPASS_WRITE_GPR_DATA ",Tgeneral_data_t ,_param->_nb_bypass_write); |
---|
133 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_SPR_VAL ," in_BYPASS_WRITE_SPR_VAL ",Tcontrol_t ,_param->_nb_bypass_write); |
---|
134 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_SPR_NUM_REG ," in_BYPASS_WRITE_SPR_NUM_REG ",Tspecial_address_t,_param->_nb_bypass_write); |
---|
135 | ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_SPR_DATA ," in_BYPASS_WRITE_SPR_DATA ",Tspecial_data_t ,_param->_nb_bypass_write); |
---|
136 | ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_VAL ," in_BYPASS_MEMORY_VAL ",Tcontrol_t ,_param->_nb_bypass_memory); |
---|
137 | ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_OOO_ENGINE_ID ," in_BYPASS_MEMORY_OOO_ENGINE_ID ",Tcontext_t ,_param->_nb_bypass_memory); |
---|
138 | ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_NUM_REG ," in_BYPASS_MEMORY_NUM_REG ",Tgeneral_address_t,_param->_nb_bypass_memory); |
---|
139 | ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_DATA ," in_BYPASS_MEMORY_DATA ",Tgeneral_data_t ,_param->_nb_bypass_memory); |
---|
140 | |
---|
141 | /******************************************************** |
---|
142 | * Instanciation |
---|
143 | ********************************************************/ |
---|
144 | |
---|
145 | msg(_("<%s> : Instanciation of _Read_unit.\n"),name.c_str()); |
---|
146 | |
---|
147 | (*(_Read_unit->in_CLOCK)) (*(in_CLOCK)); |
---|
148 | (*(_Read_unit->in_NRESET)) (*(in_NRESET)); |
---|
149 | |
---|
150 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_VAL ); |
---|
151 | INSTANCE_SC_SIGNAL (_Read_unit,out_READ_UNIT_IN_ACK ); |
---|
152 | if (_param->_have_port_context_id) |
---|
153 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_CONTEXT_ID ); |
---|
154 | if (_param->_have_port_front_end_id) |
---|
155 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_FRONT_END_ID ); |
---|
156 | if (_param->_have_port_ooo_engine_id) |
---|
157 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_OOO_ENGINE_ID ); |
---|
158 | if (_param->_have_port_packet_id) |
---|
159 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_PACKET_ID ); |
---|
160 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_OPERATION ); |
---|
161 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_TYPE ); |
---|
162 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE ); |
---|
163 | if (_param->_have_port_load_queue_ptr) |
---|
164 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ); |
---|
165 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_HAS_IMMEDIAT ); |
---|
166 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_IMMEDIAT ); |
---|
167 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_READ_RA ); |
---|
168 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RA ); |
---|
169 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_READ_RB ); |
---|
170 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RB ); |
---|
171 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_READ_RC ); |
---|
172 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RC ); |
---|
173 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_WRITE_RD ); |
---|
174 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RD ); |
---|
175 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_WRITE_RE ); |
---|
176 | INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RE ); |
---|
177 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_VAL ,_param->_nb_inst_retire); |
---|
178 | INSTANCE1_SC_SIGNAL(_Read_unit, in_READ_UNIT_OUT_ACK ,_param->_nb_inst_retire); |
---|
179 | if (_param->_have_port_context_id) |
---|
180 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_CONTEXT_ID ,_param->_nb_inst_retire); |
---|
181 | if (_param->_have_port_front_end_id) |
---|
182 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_FRONT_END_ID ,_param->_nb_inst_retire); |
---|
183 | if (_param->_have_port_ooo_engine_id) |
---|
184 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_OOO_ENGINE_ID ,_param->_nb_inst_retire); |
---|
185 | if (_param->_have_port_packet_id) |
---|
186 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_PACKET_ID ,_param->_nb_inst_retire); |
---|
187 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_OPERATION ,_param->_nb_inst_retire); |
---|
188 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_TYPE ,_param->_nb_inst_retire); |
---|
189 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire); |
---|
190 | if (_param->_have_port_load_queue_ptr) |
---|
191 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire); |
---|
192 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_HAS_IMMEDIAT ,_param->_nb_inst_retire); |
---|
193 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_IMMEDIAT ,_param->_nb_inst_retire); |
---|
194 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_DATA_RA ,_param->_nb_inst_retire); |
---|
195 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_DATA_RB ,_param->_nb_inst_retire); |
---|
196 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_DATA_RC ,_param->_nb_inst_retire); |
---|
197 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_WRITE_RD ,_param->_nb_inst_retire); |
---|
198 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_NUM_REG_RD ,_param->_nb_inst_retire); |
---|
199 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_WRITE_RE ,_param->_nb_inst_retire); |
---|
200 | INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_NUM_REG_RE ,_param->_nb_inst_retire); |
---|
201 | INSTANCE1_SC_SIGNAL(_Read_unit,out_GPR_READ_VAL ,_param->_nb_gpr_read); |
---|
202 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_READ_ACK ,_param->_nb_gpr_read); |
---|
203 | if (_param->_have_port_ooo_engine_id) |
---|
204 | INSTANCE1_SC_SIGNAL(_Read_unit,out_GPR_READ_OOO_ENGINE_ID ,_param->_nb_gpr_read); |
---|
205 | INSTANCE1_SC_SIGNAL(_Read_unit,out_GPR_READ_NUM_REG ,_param->_nb_gpr_read); |
---|
206 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_READ_DATA ,_param->_nb_gpr_read); |
---|
207 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_READ_DATA_VAL ,_param->_nb_gpr_read); |
---|
208 | INSTANCE1_SC_SIGNAL(_Read_unit,out_SPR_READ_VAL ,_param->_nb_spr_read); |
---|
209 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_READ_ACK ,_param->_nb_spr_read); |
---|
210 | if (_param->_have_port_ooo_engine_id) |
---|
211 | INSTANCE1_SC_SIGNAL(_Read_unit,out_SPR_READ_OOO_ENGINE_ID ,_param->_nb_spr_read); |
---|
212 | INSTANCE1_SC_SIGNAL(_Read_unit,out_SPR_READ_NUM_REG ,_param->_nb_spr_read); |
---|
213 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_READ_DATA ,_param->_nb_spr_read); |
---|
214 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_READ_DATA_VAL ,_param->_nb_spr_read); |
---|
215 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_VAL ,_param->_nb_gpr_write); |
---|
216 | if (_param->_have_port_ooo_engine_id) |
---|
217 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_OOO_ENGINE_ID ,_param->_nb_gpr_write); |
---|
218 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_NUM_REG ,_param->_nb_gpr_write); |
---|
219 | INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_DATA ,_param->_nb_gpr_write); |
---|
220 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_VAL ,_param->_nb_spr_write); |
---|
221 | if (_param->_have_port_ooo_engine_id) |
---|
222 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_OOO_ENGINE_ID ,_param->_nb_spr_write); |
---|
223 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_NUM_REG ,_param->_nb_spr_write); |
---|
224 | INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_DATA ,_param->_nb_spr_write); |
---|
225 | if (_param->_have_port_ooo_engine_id) |
---|
226 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_OOO_ENGINE_ID ,_param->_nb_bypass_write); |
---|
227 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_GPR_VAL ,_param->_nb_bypass_write); |
---|
228 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_GPR_NUM_REG ,_param->_nb_bypass_write); |
---|
229 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_GPR_DATA ,_param->_nb_bypass_write); |
---|
230 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_SPR_VAL ,_param->_nb_bypass_write); |
---|
231 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_SPR_NUM_REG ,_param->_nb_bypass_write); |
---|
232 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_SPR_DATA ,_param->_nb_bypass_write); |
---|
233 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_VAL ,_param->_nb_bypass_memory); |
---|
234 | if (_param->_have_port_ooo_engine_id) |
---|
235 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory); |
---|
236 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_NUM_REG ,_param->_nb_bypass_memory); |
---|
237 | INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_DATA ,_param->_nb_bypass_memory); |
---|
238 | |
---|
239 | msg(_("<%s> : Start Simulation ............\n"),name.c_str()); |
---|
240 | |
---|
241 | Time * _time = new Time(); |
---|
242 | |
---|
243 | /******************************************************** |
---|
244 | * Simulation - Begin |
---|
245 | ********************************************************/ |
---|
246 | |
---|
247 | // Initialisation |
---|
248 | |
---|
249 | const uint32_t seed = 0; |
---|
250 | //const uint32_t seed = static_cast<uint32_t>(time(NULL)); |
---|
251 | |
---|
252 | srand(seed); |
---|
253 | |
---|
254 | SC_START(0); |
---|
255 | LABEL("Initialisation"); |
---|
256 | |
---|
257 | LABEL("Reset"); |
---|
258 | in_NRESET->write(0); |
---|
259 | SC_START(5); |
---|
260 | in_NRESET->write(1); |
---|
261 | |
---|
262 | LABEL("Loop of Test"); |
---|
263 | |
---|
264 | for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) |
---|
265 | { |
---|
266 | LABEL("Iteration %d",iteration); |
---|
267 | |
---|
268 | SC_START(1); |
---|
269 | } |
---|
270 | |
---|
271 | /******************************************************** |
---|
272 | * Simulation - End |
---|
273 | ********************************************************/ |
---|
274 | |
---|
275 | TEST_OK ("End of Simulation"); |
---|
276 | delete _time; |
---|
277 | |
---|
278 | msg(_("<%s> : ............ Stop Simulation\n"),name.c_str()); |
---|
279 | |
---|
280 | delete in_CLOCK; |
---|
281 | delete in_NRESET; |
---|
282 | #endif |
---|
283 | |
---|
284 | delete _Read_unit; |
---|
285 | #ifdef STATISTICS |
---|
286 | delete _parameters_statistics; |
---|
287 | #endif |
---|
288 | } |
---|