1 | /* |
---|
2 | * $Id: test.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | * Test |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Dcache_Access/SelfTest/include/test.h" |
---|
10 | #include "Behavioural/include/Allocation.h" |
---|
11 | |
---|
12 | typedef struct |
---|
13 | { |
---|
14 | uint32_t execute_loop ; |
---|
15 | uint32_t load_store_unit; |
---|
16 | uint32_t cache_access ; |
---|
17 | } thread_id_t; |
---|
18 | |
---|
19 | void test (string name, |
---|
20 | morpheo::behavioural::core::dcache_access::Parameters * _param) |
---|
21 | { |
---|
22 | msg(_("<%s> : Simulation SystemC.\n"),name.c_str()); |
---|
23 | |
---|
24 | #ifdef STATISTICS |
---|
25 | morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX); |
---|
26 | #endif |
---|
27 | |
---|
28 | Tusage_t _usage = USE_ALL; |
---|
29 | |
---|
30 | // _usage = usage_unset(_usage,USE_SYSTEMC ); |
---|
31 | // _usage = usage_unset(_usage,USE_VHDL ); |
---|
32 | // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); |
---|
33 | // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); |
---|
34 | // _usage = usage_unset(_usage,USE_POSITION ); |
---|
35 | // _usage = usage_unset(_usage,USE_STATISTICS ); |
---|
36 | // _usage = usage_unset(_usage,USE_INFORMATION ); |
---|
37 | |
---|
38 | Dcache_Access * _Dcache_Access = new Dcache_Access |
---|
39 | (name.c_str(), |
---|
40 | #ifdef STATISTICS |
---|
41 | _parameters_statistics, |
---|
42 | #endif |
---|
43 | _param, |
---|
44 | _usage); |
---|
45 | |
---|
46 | #ifdef SYSTEMC |
---|
47 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
48 | { |
---|
49 | /********************************************************************* |
---|
50 | * Déclarations des signaux |
---|
51 | *********************************************************************/ |
---|
52 | string rename; |
---|
53 | |
---|
54 | sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); |
---|
55 | sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); |
---|
56 | |
---|
57 | ALLOC1_SC_SIGNAL(out_DCACHE_REQ_VAL ,"out_DCACHE_REQ_VAL ",Tcontrol_t ,_param->_nb_dcache_port); |
---|
58 | ALLOC1_SC_SIGNAL( in_DCACHE_REQ_ACK ," in_DCACHE_REQ_ACK ",Tcontrol_t ,_param->_nb_dcache_port); |
---|
59 | ALLOC1_SC_SIGNAL(out_DCACHE_REQ_THREAD_ID ,"out_DCACHE_REQ_THREAD_ID",Tcontext_t ,_param->_nb_dcache_port); |
---|
60 | ALLOC1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID ,"out_DCACHE_REQ_PACKET_ID",Tpacket_t ,_param->_nb_dcache_port); |
---|
61 | ALLOC1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS ,"out_DCACHE_REQ_ADDRESS ",Tdcache_address_t ,_param->_nb_dcache_port); |
---|
62 | ALLOC1_SC_SIGNAL(out_DCACHE_REQ_WDATA ,"out_DCACHE_REQ_WDATA ",Tdcache_data_t ,_param->_nb_dcache_port); |
---|
63 | ALLOC1_SC_SIGNAL(out_DCACHE_REQ_TYPE ,"out_DCACHE_REQ_TYPE ",Tdcache_type_t ,_param->_nb_dcache_port); |
---|
64 | |
---|
65 | ALLOC1_SC_SIGNAL( in_DCACHE_RSP_VAL ," in_DCACHE_RSP_VAL ",Tcontrol_t ,_param->_nb_dcache_port); |
---|
66 | ALLOC1_SC_SIGNAL(out_DCACHE_RSP_ACK ,"out_DCACHE_RSP_ACK ",Tcontrol_t ,_param->_nb_dcache_port); |
---|
67 | ALLOC1_SC_SIGNAL( in_DCACHE_RSP_THREAD_ID ," in_DCACHE_RSP_THREAD_ID",Tcontext_t ,_param->_nb_dcache_port); |
---|
68 | ALLOC1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID ," in_DCACHE_RSP_PACKET_ID",Tpacket_t ,_param->_nb_dcache_port); |
---|
69 | ALLOC1_SC_SIGNAL( in_DCACHE_RSP_RDATA ," in_DCACHE_RSP_RDATA ",Tdcache_data_t ,_param->_nb_dcache_port); |
---|
70 | ALLOC1_SC_SIGNAL( in_DCACHE_RSP_ERROR ," in_DCACHE_RSP_ERROR ",Tdcache_error_t ,_param->_nb_dcache_port); |
---|
71 | |
---|
72 | ALLOC3_SC_SIGNAL( in_LSQ_REQ_VAL ," in_LSQ_REQ_VAL ",Tcontrol_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
73 | ALLOC3_SC_SIGNAL(out_LSQ_REQ_ACK ,"out_LSQ_REQ_ACK ",Tcontrol_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
74 | ALLOC3_SC_SIGNAL( in_LSQ_REQ_THREAD_ID ," in_LSQ_REQ_THREAD_ID ",Tcontext_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
75 | ALLOC3_SC_SIGNAL( in_LSQ_REQ_PACKET_ID ," in_LSQ_REQ_PACKET_ID ",Tpacket_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
76 | ALLOC3_SC_SIGNAL( in_LSQ_REQ_ADDRESS ," in_LSQ_REQ_ADDRESS ",Tdcache_address_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
77 | ALLOC3_SC_SIGNAL( in_LSQ_REQ_WDATA ," in_LSQ_REQ_WDATA ",Tdcache_data_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
78 | ALLOC3_SC_SIGNAL( in_LSQ_REQ_TYPE ," in_LSQ_REQ_TYPE ",Tdcache_type_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
79 | |
---|
80 | ALLOC3_SC_SIGNAL(out_LSQ_RSP_VAL ,"out_LSQ_RSP_VAL ",Tcontrol_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
81 | ALLOC3_SC_SIGNAL( in_LSQ_RSP_ACK ," in_LSQ_RSP_ACK ",Tcontrol_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
82 | ALLOC3_SC_SIGNAL(out_LSQ_RSP_THREAD_ID ,"out_LSQ_RSP_THREAD_ID ",Tcontext_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
83 | ALLOC3_SC_SIGNAL(out_LSQ_RSP_PACKET_ID ,"out_LSQ_RSP_PACKET_ID ",Tpacket_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
84 | ALLOC3_SC_SIGNAL(out_LSQ_RSP_RDATA ,"out_LSQ_RSP_RDATA ",Tdcache_data_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
85 | ALLOC3_SC_SIGNAL(out_LSQ_RSP_ERROR ,"out_LSQ_RSP_ERROR ",Tdcache_error_t ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
86 | |
---|
87 | /******************************************************** |
---|
88 | * Instanciation |
---|
89 | ********************************************************/ |
---|
90 | |
---|
91 | msg(_("<%s> : Instanciation of _Dcache_Access.\n"),name.c_str()); |
---|
92 | |
---|
93 | (*(_Dcache_Access->in_CLOCK)) (*(in_CLOCK)); |
---|
94 | (*(_Dcache_Access->in_NRESET)) (*(in_NRESET)); |
---|
95 | |
---|
96 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_REQ_VAL ,_param->_nb_dcache_port); |
---|
97 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_DCACHE_REQ_ACK ,_param->_nb_dcache_port); |
---|
98 | if (_param->_have_port_dcache_thread_id) |
---|
99 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_REQ_THREAD_ID ,_param->_nb_dcache_port); |
---|
100 | if (_param->_have_port_dcache_packet_id) |
---|
101 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_REQ_PACKET_ID ,_param->_nb_dcache_port); |
---|
102 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_REQ_ADDRESS ,_param->_nb_dcache_port); |
---|
103 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_REQ_WDATA ,_param->_nb_dcache_port); |
---|
104 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_REQ_TYPE ,_param->_nb_dcache_port); |
---|
105 | |
---|
106 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_DCACHE_RSP_VAL ,_param->_nb_dcache_port); |
---|
107 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_DCACHE_RSP_ACK ,_param->_nb_dcache_port); |
---|
108 | if (_param->_have_port_dcache_thread_id) |
---|
109 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_DCACHE_RSP_THREAD_ID ,_param->_nb_dcache_port); |
---|
110 | if (_param->_have_port_dcache_packet_id) |
---|
111 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_DCACHE_RSP_PACKET_ID ,_param->_nb_dcache_port); |
---|
112 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_DCACHE_RSP_RDATA ,_param->_nb_dcache_port); |
---|
113 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_DCACHE_RSP_ERROR ,_param->_nb_dcache_port); |
---|
114 | |
---|
115 | INSTANCE3_SC_SIGNAL(_Dcache_Access, in_LSQ_REQ_VAL ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
116 | INSTANCE3_SC_SIGNAL(_Dcache_Access,out_LSQ_REQ_ACK ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
117 | INSTANCE3_SC_SIGNAL(_Dcache_Access, in_LSQ_REQ_ADDRESS ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
118 | INSTANCE3_SC_SIGNAL(_Dcache_Access, in_LSQ_REQ_WDATA ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
119 | INSTANCE3_SC_SIGNAL(_Dcache_Access, in_LSQ_REQ_TYPE ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
120 | |
---|
121 | INSTANCE3_SC_SIGNAL(_Dcache_Access,out_LSQ_RSP_VAL ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
122 | INSTANCE3_SC_SIGNAL(_Dcache_Access, in_LSQ_RSP_ACK ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
123 | INSTANCE3_SC_SIGNAL(_Dcache_Access,out_LSQ_RSP_RDATA ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
124 | INSTANCE3_SC_SIGNAL(_Dcache_Access,out_LSQ_RSP_ERROR ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
125 | |
---|
126 | for (uint32_t i=0; i<_param->_nb_execute_loop; i++) |
---|
127 | for (uint32_t j=0; j<_param->_nb_load_store_unit[i]; j++) |
---|
128 | { |
---|
129 | if (_param->_have_port_lsq_thread_id [i][j]) |
---|
130 | { |
---|
131 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_LSQ_REQ_THREAD_ID [i][j], _param->_nb_cache_access[i][j]); |
---|
132 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_LSQ_RSP_THREAD_ID [i][j], _param->_nb_cache_access[i][j]); |
---|
133 | } |
---|
134 | if (_param->_have_port_lsq_packet_id [i][j]) |
---|
135 | { |
---|
136 | INSTANCE1_SC_SIGNAL(_Dcache_Access, in_LSQ_REQ_PACKET_ID [i][j], _param->_nb_cache_access[i][j]); |
---|
137 | INSTANCE1_SC_SIGNAL(_Dcache_Access,out_LSQ_RSP_PACKET_ID [i][j], _param->_nb_cache_access[i][j]); |
---|
138 | } |
---|
139 | } |
---|
140 | |
---|
141 | msg(_("<%s> : Start Simulation ............\n"),name.c_str()); |
---|
142 | |
---|
143 | Time * _time = new Time(); |
---|
144 | |
---|
145 | /******************************************************** |
---|
146 | * Simulation - Begin |
---|
147 | ********************************************************/ |
---|
148 | |
---|
149 | // Initialisation |
---|
150 | |
---|
151 | const uint32_t seed = 0; |
---|
152 | //const uint32_t seed = static_cast<uint32_t>(time(NULL)); |
---|
153 | |
---|
154 | srand(seed); |
---|
155 | |
---|
156 | const int32_t percent_transaction_req = 75; |
---|
157 | const int32_t percent_transaction_rsp = 75; |
---|
158 | |
---|
159 | thread_id_t link_cache_rsp [_param->_nb_dcache_port][_param->_nb_execute_loop*_param->_max_nb_load_store_unit*_param->_max_nb_cache_access]; |
---|
160 | uint32_t nb_link_cache_rsp [_param->_nb_dcache_port]; |
---|
161 | |
---|
162 | for (uint32_t i=0; i<_param->_nb_dcache_port; i++) |
---|
163 | nb_link_cache_rsp [i] = 0; |
---|
164 | |
---|
165 | for (uint32_t i=0; i<_param->_nb_execute_loop; i++) |
---|
166 | for (uint32_t j=0; j<_param->_nb_load_store_unit [i]; j++) |
---|
167 | for (uint32_t k=0; k<_param->_nb_cache_access [i][j]; ++k) |
---|
168 | { |
---|
169 | uint32_t x = _param->_table_routing [i][j][k]; |
---|
170 | |
---|
171 | link_cache_rsp [x][nb_link_cache_rsp[x]].execute_loop = i; |
---|
172 | link_cache_rsp [x][nb_link_cache_rsp[x]].load_store_unit = j; |
---|
173 | link_cache_rsp [x][nb_link_cache_rsp[x]].cache_access = k; |
---|
174 | nb_link_cache_rsp[x] ++; |
---|
175 | } |
---|
176 | |
---|
177 | SC_START(0); |
---|
178 | LABEL("Initialisation"); |
---|
179 | |
---|
180 | LABEL("Reset"); |
---|
181 | in_NRESET->write(0); |
---|
182 | SC_START(5); |
---|
183 | in_NRESET->write(1); |
---|
184 | |
---|
185 | LABEL("Loop of Test"); |
---|
186 | |
---|
187 | for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) |
---|
188 | { |
---|
189 | LABEL("Iteration %d",iteration); |
---|
190 | |
---|
191 | for (uint32_t i=0; i<_param->_nb_dcache_port; i++) |
---|
192 | { |
---|
193 | in_DCACHE_REQ_ACK [i]->write((rand()%100)<percent_transaction_req); |
---|
194 | |
---|
195 | uint32_t z = rand()%nb_link_cache_rsp[i]; |
---|
196 | uint32_t a = link_cache_rsp[i][z].execute_loop; |
---|
197 | uint32_t b = link_cache_rsp[i][z].load_store_unit ; |
---|
198 | uint32_t c = link_cache_rsp[i][z].cache_access ; |
---|
199 | |
---|
200 | in_DCACHE_RSP_VAL [i]->write((rand()%100)<percent_transaction_rsp); |
---|
201 | in_DCACHE_RSP_THREAD_ID [i]->write(_param->_translate_load_store_unit_to_thread[a][b][0]); |
---|
202 | in_DCACHE_RSP_PACKET_ID [i]->write((c << _param->_shift_num_cache_access)); |
---|
203 | in_DCACHE_RSP_RDATA [i]->write(0); |
---|
204 | in_DCACHE_RSP_ERROR [i]->write(0); |
---|
205 | } |
---|
206 | |
---|
207 | for (uint32_t i=0; i<_param->_nb_execute_loop; i++) |
---|
208 | for (uint32_t j=0; j<_param->_nb_load_store_unit [i]; j++) |
---|
209 | for (uint32_t k=0; k<_param->_nb_cache_access [i][j]; ++k) |
---|
210 | { |
---|
211 | in_LSQ_REQ_VAL [i][j][k]->write((rand()%100)<percent_transaction_req); |
---|
212 | in_LSQ_REQ_ADDRESS [i][j][k]->write(0); |
---|
213 | in_LSQ_REQ_THREAD_ID [i][j][k]->write(0); |
---|
214 | in_LSQ_REQ_PACKET_ID [i][j][k]->write(0); |
---|
215 | in_LSQ_REQ_ADDRESS [i][j][k]->write(0); |
---|
216 | in_LSQ_REQ_WDATA [i][j][k]->write(0); |
---|
217 | in_LSQ_REQ_TYPE [i][j][k]->write(0); |
---|
218 | |
---|
219 | in_LSQ_RSP_ACK [i][j][k]->write((rand()%100)<percent_transaction_rsp); |
---|
220 | } |
---|
221 | |
---|
222 | SC_START(0); |
---|
223 | |
---|
224 | int32_t nb_request = 0; |
---|
225 | int32_t nb_respons = 0; |
---|
226 | |
---|
227 | for (uint32_t i=0; i<_param->_nb_dcache_port; i++) |
---|
228 | { |
---|
229 | if (out_DCACHE_REQ_VAL [i]->read() and in_DCACHE_REQ_ACK [i]->read()) |
---|
230 | { |
---|
231 | LABEL("DCACHE_REQ [%d] - Transaction Accepted.",i); |
---|
232 | |
---|
233 | nb_request ++; |
---|
234 | } |
---|
235 | if ( in_DCACHE_RSP_VAL [i]->read() and out_DCACHE_RSP_ACK [i]->read()) |
---|
236 | { |
---|
237 | LABEL("DCACHE_RSP [%d] - Transaction Accepted.",i); |
---|
238 | |
---|
239 | nb_respons ++; |
---|
240 | } |
---|
241 | } |
---|
242 | |
---|
243 | for (uint32_t i=0; i<_param->_nb_execute_loop; i++) |
---|
244 | for (uint32_t j=0; j<_param->_nb_load_store_unit [i]; j++) |
---|
245 | for (uint32_t k=0; k<_param->_nb_cache_access [i][j]; ++k) |
---|
246 | { |
---|
247 | if (in_LSQ_REQ_VAL [i][j][k]->read() and out_LSQ_REQ_ACK [i][j][k]->read()) |
---|
248 | { |
---|
249 | LABEL("LSQ_REQ [%d][%d][%d] - Transaction Accepted.",i,j,k); |
---|
250 | |
---|
251 | uint32_t x=_param->_table_routing[i][j][k]; |
---|
252 | |
---|
253 | TEST(Tcontrol_t,out_DCACHE_REQ_VAL[x]->read(), 1); |
---|
254 | TEST(Tcontrol_t, in_DCACHE_REQ_ACK[x]->read(), 1); |
---|
255 | |
---|
256 | TEST(Tcontext_t ,out_DCACHE_REQ_THREAD_ID [x]->read(), _param->_translate_load_store_unit_to_thread [i][j][0]); |
---|
257 | TEST(Tpacket_t ,out_DCACHE_REQ_PACKET_ID [x]->read(), (k << _param->_shift_num_cache_access)); |
---|
258 | TEST(Tdcache_address_t,out_DCACHE_REQ_ADDRESS [x]->read(), 0); |
---|
259 | TEST(Tdcache_address_t,out_DCACHE_REQ_WDATA [x]->read(), 0); |
---|
260 | TEST(Tdcache_type_t ,out_DCACHE_REQ_TYPE [x]->read(), 0); |
---|
261 | |
---|
262 | nb_request --; |
---|
263 | } |
---|
264 | |
---|
265 | if (out_LSQ_RSP_VAL [i][j][k]->read() and in_LSQ_RSP_ACK [i][j][k]->read()) |
---|
266 | { |
---|
267 | LABEL("LSQ_RSP [%d][%d][%d] - Transaction Accepted.",i,j,k); |
---|
268 | |
---|
269 | // public : SC_OUT(Tcontext_t ) **** out_LSQ_RSP_THREAD_ID ;//[nb_execute_loop][nb_load_store_unit][nb_cache_access] |
---|
270 | // public : SC_OUT(Tpacket_t ) **** out_LSQ_RSP_PACKET_ID ;//[nb_execute_loop][nb_load_store_unit][nb_cache_access] |
---|
271 | // public : SC_OUT(Tdcache_data_t ) **** out_LSQ_RSP_RDATA ;//[nb_execute_loop][nb_load_store_unit][nb_cache_access] |
---|
272 | // public : SC_OUT(Tdcache_error_t ) **** out_LSQ_RSP_ERROR ;//[nb_execute_loop][nb_load_store_unit][nb_cache_access] |
---|
273 | nb_respons --; |
---|
274 | } |
---|
275 | } |
---|
276 | |
---|
277 | TEST(int32_t, nb_request, 0); |
---|
278 | TEST(int32_t, nb_respons, 0); |
---|
279 | |
---|
280 | SC_START(1); |
---|
281 | } |
---|
282 | |
---|
283 | /******************************************************** |
---|
284 | * Simulation - End |
---|
285 | ********************************************************/ |
---|
286 | |
---|
287 | TEST_OK ("End of Simulation"); |
---|
288 | delete _time; |
---|
289 | |
---|
290 | msg(_("<%s> : ............ Stop Simulation\n"),name.c_str()); |
---|
291 | |
---|
292 | delete in_CLOCK; |
---|
293 | delete in_NRESET; |
---|
294 | |
---|
295 | DELETE1_SC_SIGNAL(out_DCACHE_REQ_VAL ,_param->_nb_dcache_port); |
---|
296 | DELETE1_SC_SIGNAL( in_DCACHE_REQ_ACK ,_param->_nb_dcache_port); |
---|
297 | DELETE1_SC_SIGNAL(out_DCACHE_REQ_THREAD_ID ,_param->_nb_dcache_port); |
---|
298 | DELETE1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID ,_param->_nb_dcache_port); |
---|
299 | DELETE1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS ,_param->_nb_dcache_port); |
---|
300 | DELETE1_SC_SIGNAL(out_DCACHE_REQ_WDATA ,_param->_nb_dcache_port); |
---|
301 | DELETE1_SC_SIGNAL(out_DCACHE_REQ_TYPE ,_param->_nb_dcache_port); |
---|
302 | |
---|
303 | DELETE1_SC_SIGNAL( in_DCACHE_RSP_VAL ,_param->_nb_dcache_port); |
---|
304 | DELETE1_SC_SIGNAL(out_DCACHE_RSP_ACK ,_param->_nb_dcache_port); |
---|
305 | DELETE1_SC_SIGNAL( in_DCACHE_RSP_THREAD_ID ,_param->_nb_dcache_port); |
---|
306 | DELETE1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID ,_param->_nb_dcache_port); |
---|
307 | DELETE1_SC_SIGNAL( in_DCACHE_RSP_RDATA ,_param->_nb_dcache_port); |
---|
308 | DELETE1_SC_SIGNAL( in_DCACHE_RSP_ERROR ,_param->_nb_dcache_port); |
---|
309 | |
---|
310 | DELETE3_SC_SIGNAL( in_LSQ_REQ_VAL ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
311 | DELETE3_SC_SIGNAL(out_LSQ_REQ_ACK ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
312 | DELETE3_SC_SIGNAL( in_LSQ_REQ_THREAD_ID ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
313 | DELETE3_SC_SIGNAL( in_LSQ_REQ_PACKET_ID ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
314 | DELETE3_SC_SIGNAL( in_LSQ_REQ_ADDRESS ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
315 | DELETE3_SC_SIGNAL( in_LSQ_REQ_WDATA ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
316 | DELETE3_SC_SIGNAL( in_LSQ_REQ_TYPE ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
317 | |
---|
318 | DELETE3_SC_SIGNAL(out_LSQ_RSP_VAL ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
319 | DELETE3_SC_SIGNAL( in_LSQ_RSP_ACK ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
320 | DELETE3_SC_SIGNAL(out_LSQ_RSP_THREAD_ID ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
321 | DELETE3_SC_SIGNAL(out_LSQ_RSP_PACKET_ID ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
322 | DELETE3_SC_SIGNAL(out_LSQ_RSP_RDATA ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
323 | DELETE3_SC_SIGNAL(out_LSQ_RSP_ERROR ,_param->_nb_execute_loop, _param->_nb_load_store_unit[it1], _param->_nb_cache_access[it1][it2]); |
---|
324 | } |
---|
325 | #endif |
---|
326 | |
---|
327 | delete _Dcache_Access; |
---|
328 | #ifdef STATISTICS |
---|
329 | delete _parameters_statistics; |
---|
330 | #endif |
---|
331 | } |
---|