Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: vuaderr.v | |
4 | // Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
5 | // 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
6 | // | |
7 | // * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
8 | // | |
9 | // This program is free software; you can redistribute it and/or modify | |
10 | // it under the terms of the GNU General Public License as published by | |
11 | // the Free Software Foundation; version 2 of the License. | |
12 | // | |
13 | // This program is distributed in the hope that it will be useful, | |
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | // GNU General Public License for more details. | |
17 | // | |
18 | // You should have received a copy of the GNU General Public License | |
19 | // along with this program; if not, write to the Free Software | |
20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | // | |
22 | // For the avoidance of doubt, and except that if any non-GPL license | |
23 | // choice is available it will apply instead, Sun elects to use only | |
24 | // the General Public License version 2 (GPLv2) at this time for any | |
25 | // software where a choice of GPL license versions is made | |
26 | // available with the language indicating that GPLv2 or any later version | |
27 | // may be used, or where a choice of which version of the GPL is applied is | |
28 | // otherwise unspecified. | |
29 | // | |
30 | // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
31 | // CA 95054 USA or visit www.sun.com if you need additional information or | |
32 | // have any questions. | |
33 | // | |
34 | // ========== Copyright Header End ============================================ | |
35 | module vuaderr(L2_INT_RST); | |
36 | ||
37 | parameter PSMPL = 3; | |
38 | parameter s0 = 0,s1 = 1; | |
39 | input L2_INT_RST; | |
40 | ||
41 | reg [39:0] address; | |
42 | reg [38:0] vld_dirty, usaloc, buffer; | |
43 | reg [8:0] index; | |
44 | reg [3:0]bit_pos; | |
45 | reg [39:0]cnt; | |
46 | reg [1:0] cs,ns; | |
47 | reg vd_inject_err,ua_inject_err,vd_inject_ue,ua_inject_ue,trph; | |
48 | integer i; | |
49 | wire [39:0] arbdp_addr_c1; | |
50 | wire [6:0] vd_ecc_c1,ua_ecc_c1; | |
51 | wire [15:0] valid_c1,dirty_c1,used_c1,alloc_c1; | |
52 | wire inst_vld_c2_prev,vuad_vlddir_no_bypass_c1,vuad_usaloc_no_bypass_c1,arb_inst_diag_c1; | |
53 | wire take_eer,take_retry; | |
54 | ||
55 | assign arbdp_addr_c1 = tb_top.cpu.l2t0.arbadr.arbdp_addr_c1_1; | |
56 | assign inst_vld_c2_prev = tb_top.cpu.l2t0.arb.inst_vld_c2_prev; | |
57 | assign vuad_vlddir_no_bypass_c1=tb_top.cpu.l2t0.vlddir.mux_valid_dirty_c1_sel0; | |
58 | assign arb_inst_diag_c1 = tb_top.cpu.l2t0.arb.arb_inst_diag_c1; | |
59 | assign vd_ecc_c1 = tb_top.cpu.l2t0.vlddir.vuad_array_rd_data_c1[38:32]; | |
60 | assign valid_c1 = tb_top.cpu.l2t0.vlddir.valid_c1; | |
61 | assign dirty_c1 = tb_top.cpu.l2t0.vlddir.dirty_c1; | |
62 | assign vuad_usaloc_no_bypass_c1 = tb_top.cpu.l2t0.usaloc.vuad_usaloc_mux_used_and_alloc_comb_sel5; | |
63 | assign ua_ecc_c1 = tb_top.cpu.l2t0.usaloc.vuad_array_rd_data_c1[77:71]; | |
64 | assign used_c1 = tb_top.cpu.l2t0.usaloc.used_c1; | |
65 | assign alloc_c1 = tb_top.cpu.l2t0.usaloc.alloc_c1; | |
66 | ||
67 | assign take_retry = tb_top.cpu.spc0.tlu.trl0.take_ret; | |
68 | assign take_eer = tb_top.cpu.spc0.tlu.trl0.take_eer; // For Hw Corr | |
69 | ||
70 | initial begin | |
71 | if($test$plusargs("PREFICE_VD_INJECT")) | |
72 | begin | |
73 | $display("MSA1: forcing_err\n"); | |
74 | @(posedge tb_top.cpu.l2t0.arbdec.pf_ice_qual); | |
75 | $display("MSA2: forcing_err\n"); | |
76 | @(posedge tb_top.cpu.l2t0.arbdec.pf_ice_qual); | |
77 | $display("MSA3: forcing_err\n"); | |
78 | @(posedge tb_top.cpu.l2t0.arbdec.pf_ice_qual); | |
79 | @(posedge tb_top.cpu.l2t0.arbdec.pf_ice_qual); | |
80 | @(posedge tb_top.cpu.l2t0.arbdec.pf_ice_qual); | |
81 | $display("BAS: force the valid bits\n"); | |
82 | @(posedge tb_top.cpu.l2clk); | |
83 | $display("BAS: force the valid bits\n"); | |
84 | force tb_top.cpu.l2t0.vlddir.valid_c2[15:0] = 16'h0000; | |
85 | force tb_top.cpu.l2t0.vlddir.vlddir_vuad_valid_c2[15:0] = 16'h0000; | |
86 | @(posedge tb_top.cpu.l2clk); | |
87 | release tb_top.cpu.l2t0.vlddir.valid_c2[15:0]; | |
88 | @(negedge tb_top.cpu.l2clk); | |
89 | release tb_top.cpu.l2t0.vlddir.vlddir_vuad_valid_c2[15:0]; | |
90 | $display("BAS: release the valid bits\n"); | |
91 | end | |
92 | end | |
93 | ||
94 | initial | |
95 | begin | |
96 | //================================= | |
97 | // Initialize the variables used in here | |
98 | //================================= | |
99 | ||
100 | vd_inject_err = 0; | |
101 | ua_inject_err = 0; | |
102 | vd_inject_ue = 0; | |
103 | ua_inject_ue = 0; | |
104 | trph = 0; | |
105 | i = 0; | |
106 | bit_pos = 2; | |
107 | ||
108 | //========================================= | |
109 | // Check if forcing variables are changed by verargs | |
110 | //========================================= | |
111 | ||
112 | if($test$plusargs("L2VD_CE_ERR_INJECT")) | |
113 | begin | |
114 | vd_inject_err = 1; | |
115 | `PR_ALWAYS("l2err_injector", `ALWAYS, "L2 VD Err injector enabled"); | |
116 | end | |
117 | else if($test$plusargs("L2UA_CE_ERR_INJECT")) | |
118 | begin | |
119 | ua_inject_err = 1; | |
120 | `PR_ALWAYS("l2err_injector", `ALWAYS, "L2 UA Err injector enabled"); | |
121 | end | |
122 | ||
123 | if($test$plusargs("L2VD_UE_INJECT")) | |
124 | begin | |
125 | vd_inject_ue = 1; | |
126 | `PR_ALWAYS("l2err_injector", `ALWAYS, "L2 VD Err injector enabled"); | |
127 | end | |
128 | else if($test$plusargs("L2UA_UE_INJECT")) | |
129 | begin | |
130 | ua_inject_ue = 1; | |
131 | `PR_ALWAYS("l2err_injector", `ALWAYS, "L2 UA Err injector enabled"); | |
132 | end | |
133 | ||
134 | ||
135 | end | |
136 | ||
137 | /* | |
138 | always @(posedge tb_top.cpu.l2clk) | |
139 | begin | |
140 | if(`TOP.gOutOfBoot[63:0] === `TOP.verif_args.finish_mask[63:0] ) | |
141 | begin | |
142 | if(bit_pos == 4'b1111) | |
143 | bit_pos <= 2; | |
144 | else | |
145 | bit_pos <= bit_pos + 1; | |
146 | end | |
147 | end */ | |
148 | ||
149 | //Sequential part of stmc... | |
150 | //To not inject in traphandler | |
151 | always @(posedge tb_top.cpu.l2clk) | |
152 | begin | |
153 | if(ua_inject_ue || vd_inject_ue || vd_inject_err || ua_inject_err) | |
154 | begin | |
155 | if(!L2_INT_RST) cs <= s0; | |
156 | else cs <= ns; | |
157 | end | |
158 | end | |
159 | ||
160 | //combo logic | |
161 | always @(s0 or s1 or take_eer or take_retry or cs or ua_inject_ue or vd_inject_ue or vd_inject_err or ua_inject_err) | |
162 | begin | |
163 | trph <= 0; | |
164 | if(ua_inject_ue || vd_inject_ue || vd_inject_err || ua_inject_err) | |
165 | begin | |
166 | case(cs) | |
167 | s0: | |
168 | begin | |
169 | if ( take_eer == 0) ns <= s0; | |
170 | else if (take_eer == 1) begin ns <= s1; trph<= 1;end | |
171 | end | |
172 | s1: | |
173 | begin | |
174 | if (take_retry == 0)begin ns <= s1; trph <= 1; end | |
175 | else if (take_retry == 1) begin ns <= s0;trph<=0;end | |
176 | end | |
177 | endcase | |
178 | //$display("In Combo Logic take_retry=%d,take_eer=%d,trph=%d,ns=%d",take_retry,take_eer,trph,ns); | |
179 | end | |
180 | end //end combo logic | |
181 | ||
182 | always @(posedge tb_top.cpu.l2clk) | |
183 | begin | |
184 | ||
185 | if(!L2_INT_RST) | |
186 | begin | |
187 | bit_pos <= 2; | |
188 | end | |
189 | else | |
190 | begin | |
191 | i<=0; | |
192 | if((`TOP.gOutOfBoot[63:0] === `TOP.verif_args.finish_mask[63:0]) && ( vd_inject_err == 1 || vd_inject_ue == 1) && !trph) | |
193 | begin | |
194 | ||
195 | #(PSMPL) | |
196 | //$display("Before if inst_vld_c2_prev=%d,vuad_vlddir_no_bypass_c1=%d,arb_inst_diag_c1=%d, bit_pos = %b",inst_vld_c2_prev,vuad_vlddir_no_bypass_c1,arb_inst_diag_c1,bit_pos); | |
197 | ||
198 | ||
199 | if(inst_vld_c2_prev && vuad_vlddir_no_bypass_c1 && !arb_inst_diag_c1 && bit_pos[3] != 1) | |
200 | ||
201 | ||
202 | begin | |
203 | ||
204 | //$display("After if inst_vld_c2_prev=%d,vuad_vlddir_no_bypass_c1=%d,arb_inst_diag_c1=%d",inst_vld_c2_prev,vuad_vlddir_no_bypass_c1,arb_inst_diag_c1); | |
205 | address <= arbdp_addr_c1; // C1 signal | |
206 | if($test$plusargs("L2PM_fourbank")) | |
207 | index = address[16:8]; | |
208 | else if($test$plusargs("L2PM_twobank")) | |
209 | index <= address[15:7]; | |
210 | else index <= address[17:9]; | |
211 | ||
212 | vld_dirty= {vd_ecc_c1,valid_c1,dirty_c1}; | |
213 | cnt <= ({$random(`PARGS.seed)} % 39); | |
214 | //$display("address=%h,index=%h,vld_dirty=%d,i=%d",address,index,vld_dirty,i); | |
215 | vld_dirty[cnt] <= vld_dirty[cnt] ^ 1'b1; | |
216 | if(vd_inject_ue) vld_dirty[cnt+1] <= vld_dirty[cnt+1] ^ 1'b1; | |
217 | @(posedge tb_top.cpu.l2clk); | |
218 | #(PSMPL) | |
219 | SetVldDirtyVuadArrayC2(i, vld_dirty); | |
220 | if(vd_inject_err) `PR_ALWAYS("l2err_injector", `ALWAYS,"VUAD CE injected (VD) in bank%d, Index%d, bit%dflipped (address = %x)\n\n", i, index, cnt, address); | |
221 | else `PR_ALWAYS("l2err_injector", `ALWAYS,"VUAD UE injected (VD) in bank%d, Index%d, bit%dflipped (address = %x)\n\n", i, index, cnt, address); | |
222 | @(posedge tb_top.cpu.l2clk); | |
223 | #(PSMPL) | |
224 | ReleaseVldDirtyVuadArrayC2(i); | |
225 | ||
226 | end // if(inst_vld_c2_prev && vuad_vlddir_no_bypass_c1 && !arb_inst_diag_c1) | |
227 | bit_pos <= bit_pos + 1; | |
228 | @(posedge tb_top.cpu.l2clk); | |
229 | end // OutOf Boot | |
230 | ||
231 | end //else of if(!L2_INT_RST) | |
232 | ||
233 | end //always @(posedge tb_top.cpu.l2clk) | |
234 | ||
235 | ||
236 | ||
237 | /*** end of VD error injection**/ | |
238 | ||
239 | /*** Start of UA error injection**/ | |
240 | ||
241 | always @(posedge tb_top.cpu.l2clk) | |
242 | begin | |
243 | ||
244 | if(!L2_INT_RST) | |
245 | begin | |
246 | end | |
247 | else | |
248 | begin | |
249 | i = 0; | |
250 | if((`TOP.gOutOfBoot[63:0] === `TOP.verif_args.finish_mask[63:0] ) && ( ua_inject_err == 1 || ua_inject_ue == 1) && !trph) | |
251 | begin | |
252 | ||
253 | #(PSMPL) | |
254 | ||
255 | //if(.$array_rd_en){ // This is a PX2 signal | |
256 | //repeat(2)@(posedge tb_top.cpu.l2clk); | |
257 | if(inst_vld_c2_prev && vuad_usaloc_no_bypass_c1 && !arb_inst_diag_c1 && bit_pos[3] != 1) | |
258 | begin | |
259 | ||
260 | address = arbdp_addr_c1; // C1 signal | |
261 | if($test$plusargs("L2PM_fourbank")) | |
262 | index = address[16:8]; | |
263 | else if($test$plusargs("L2PM_twobank")) | |
264 | index <= address[15:7]; | |
265 | else index <= address[17:9]; | |
266 | ||
267 | ||
268 | usaloc = {ua_ecc_c1, used_c1, alloc_c1}; | |
269 | cnt =({$random(`PARGS.seed)} % 39); | |
270 | usaloc[cnt] = usaloc[cnt] ^ 1'b1; | |
271 | if(ua_inject_ue) usaloc[cnt+1] = usaloc[cnt+1] ^ 1'b1; | |
272 | @(posedge tb_top.cpu.l2clk); | |
273 | #(PSMPL) | |
274 | SetUsAlocVuadArrayC2(i, usaloc); | |
275 | if(ua_inject_err) `PR_ALWAYS("l2err_injector", `ALWAYS,"VUAD CE injected (UA) in Bank 0, Index%d, bit%d flipped (address = %x)\n\n", index, cnt, address); | |
276 | else `PR_ALWAYS("l2err_injector", `ALWAYS,"VUAD UE injected (UA) in Bank 0, Index%d, bit%d flipped (address = %x)\n\n", index, cnt, address); | |
277 | @(posedge tb_top.cpu.l2clk); | |
278 | #(PSMPL) | |
279 | ReleaseUsalocVuadArrayC2(i); | |
280 | buffer[cnt] = buffer[cnt] ^ 1'b1; | |
281 | ||
282 | end //if(inst_vld_c2_prev && vuad_usaloc_no_bypass_c1 && !arb_inst_diag_c1) | |
283 | @(posedge tb_top.cpu.l2clk); | |
284 | end //OutOfBOOT | |
285 | end ////else of if(!L2_INT_RST) | |
286 | ||
287 | end //always @(posedge tb_top.cpu.l2clk) | |
288 | ||
289 | ||
290 | //Tasks Used By Error Injector | |
291 | ||
292 | task SetVldDirtyVuadArrayC2; | |
293 | input bank; | |
294 | input [38:0] value; | |
295 | integer bank; | |
296 | reg [38:0] value; | |
297 | begin | |
298 | case (bank) | |
299 | 0: begin | |
300 | force tb_top.cpu.l2t0.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
301 | force tb_top.cpu.l2t0.vlddir.valid_c2[15:0] = value[31:16]; | |
302 | force tb_top.cpu.l2t0.vlddir.dirty_c2[15:0] = value[15:0]; | |
303 | end | |
304 | 1: begin | |
305 | force tb_top.cpu.l2t1.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
306 | force tb_top.cpu.l2t1.vlddir.valid_c2[15:0] = value[31:16]; | |
307 | force tb_top.cpu.l2t1.vlddir.dirty_c2[15:0] = value[15:0]; | |
308 | end | |
309 | 2: begin | |
310 | force tb_top.cpu.l2t2.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
311 | force tb_top.cpu.l2t2.vlddir.valid_c2[15:0] = value[31:16]; | |
312 | force tb_top.cpu.l2t2.vlddir.dirty_c2[15:0] = value[15:0]; | |
313 | end | |
314 | 3: begin | |
315 | force tb_top.cpu.l2t3.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
316 | force tb_top.cpu.l2t3.vlddir.valid_c2[15:0] = value[31:16]; | |
317 | force tb_top.cpu.l2t3.vlddir.dirty_c2[15:0] = value[15:0]; | |
318 | end | |
319 | 4: begin | |
320 | force tb_top.cpu.l2t4.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
321 | force tb_top.cpu.l2t4.vlddir.valid_c2[15:0] = value[31:16]; | |
322 | force tb_top.cpu.l2t4.vlddir.dirty_c2[15:0] = value[15:0]; | |
323 | end | |
324 | 5: begin | |
325 | force tb_top.cpu.l2t5.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
326 | force tb_top.cpu.l2t5.vlddir.valid_c2[15:0] = value[31:16]; | |
327 | force tb_top.cpu.l2t5.vlddir.dirty_c2[15:0] = value[15:0]; | |
328 | end | |
329 | 6: begin | |
330 | force tb_top.cpu.l2t6.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
331 | force tb_top.cpu.l2t6.vlddir.valid_c2[15:0] = value[31:16]; | |
332 | force tb_top.cpu.l2t6.vlddir.dirty_c2[15:0] = value[15:0]; | |
333 | end | |
334 | 7: begin | |
335 | force tb_top.cpu.l2t7.vlddir.vd_ecc_c2[6:0] = value[38:32]; | |
336 | force tb_top.cpu.l2t7.vlddir.valid_c2[15:0] = value[31:16]; | |
337 | force tb_top.cpu.l2t7.vlddir.dirty_c2[15:0] = value[15:0]; | |
338 | end | |
339 | endcase | |
340 | // force tb_top.force_vd = 1'b1; | |
341 | end | |
342 | endtask | |
343 | ||
344 | task ReleaseVldDirtyVuadArrayC2; | |
345 | input bank; | |
346 | integer bank; | |
347 | begin | |
348 | case (bank) | |
349 | 0: begin | |
350 | release tb_top.cpu.l2t0.vlddir.vd_ecc_c2[6:0]; | |
351 | release tb_top.cpu.l2t0.vlddir.valid_c2[15:0]; | |
352 | release tb_top.cpu.l2t0.vlddir.dirty_c2[15:0]; | |
353 | end | |
354 | 1: begin | |
355 | release tb_top.cpu.l2t1.vlddir.vd_ecc_c2[6:0]; | |
356 | release tb_top.cpu.l2t1.vlddir.valid_c2[15:0]; | |
357 | release tb_top.cpu.l2t1.vlddir.dirty_c2[15:0]; | |
358 | end | |
359 | 2: begin | |
360 | release tb_top.cpu.l2t2.vlddir.vd_ecc_c2[6:0]; | |
361 | release tb_top.cpu.l2t2.vlddir.valid_c2[15:0]; | |
362 | release tb_top.cpu.l2t2.vlddir.dirty_c2[15:0]; | |
363 | end | |
364 | 3: begin | |
365 | release tb_top.cpu.l2t3.vlddir.vd_ecc_c2[6:0]; | |
366 | release tb_top.cpu.l2t3.vlddir.valid_c2[15:0]; | |
367 | release tb_top.cpu.l2t3.vlddir.dirty_c2[15:0]; | |
368 | end | |
369 | 4: begin | |
370 | release tb_top.cpu.l2t4.vlddir.vd_ecc_c2[6:0]; | |
371 | release tb_top.cpu.l2t4.vlddir.valid_c2[15:0]; | |
372 | release tb_top.cpu.l2t4.vlddir.dirty_c2[15:0]; | |
373 | end | |
374 | 5: begin | |
375 | release tb_top.cpu.l2t5.vlddir.vd_ecc_c2[6:0]; | |
376 | release tb_top.cpu.l2t5.vlddir.valid_c2[15:0]; | |
377 | release tb_top.cpu.l2t5.vlddir.dirty_c2[15:0]; | |
378 | end | |
379 | 6: begin | |
380 | release tb_top.cpu.l2t6.vlddir.vd_ecc_c2[6:0]; | |
381 | release tb_top.cpu.l2t6.vlddir.valid_c2[15:0]; | |
382 | release tb_top.cpu.l2t6.vlddir.dirty_c2[15:0]; | |
383 | end | |
384 | 7: begin | |
385 | release tb_top.cpu.l2t7.vlddir.vd_ecc_c2[6:0]; | |
386 | release tb_top.cpu.l2t7.vlddir.valid_c2[15:0]; | |
387 | release tb_top.cpu.l2t7.vlddir.dirty_c2[15:0]; | |
388 | end | |
389 | endcase | |
390 | // force tb_top.force_vd = 1'b0; | |
391 | end | |
392 | endtask | |
393 | ||
394 | ||
395 | task SetUsAlocVuadArrayC2; | |
396 | input bank; | |
397 | input value; | |
398 | integer bank; | |
399 | reg [38:0] value; | |
400 | begin | |
401 | case (bank) | |
402 | 0: begin | |
403 | force tb_top.cpu.l2t0.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
404 | force tb_top.cpu.l2t0.usaloc.used_c2[15:0] = value[31:16]; | |
405 | force tb_top.cpu.l2t0.usaloc.alloc_c2[15:0] = value[15:0]; | |
406 | end | |
407 | 1: begin | |
408 | force tb_top.cpu.l2t1.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
409 | force tb_top.cpu.l2t1.usaloc.used_c2[15:0] = value[31:16]; | |
410 | force tb_top.cpu.l2t1.usaloc.alloc_c2[15:0] = value[15:0]; | |
411 | end | |
412 | 2: begin | |
413 | force tb_top.cpu.l2t2.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
414 | force tb_top.cpu.l2t2.usaloc.used_c2[15:0] = value[31:16]; | |
415 | force tb_top.cpu.l2t2.usaloc.alloc_c2[15:0] = value[15:0]; | |
416 | end | |
417 | 3: begin | |
418 | force tb_top.cpu.l2t3.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
419 | force tb_top.cpu.l2t3.usaloc.used_c2[15:0] = value[31:16]; | |
420 | force tb_top.cpu.l2t3.usaloc.alloc_c2[15:0] = value[15:0]; | |
421 | end | |
422 | 4: begin | |
423 | force tb_top.cpu.l2t4.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
424 | force tb_top.cpu.l2t4.usaloc.used_c2[15:0] = value[31:16]; | |
425 | force tb_top.cpu.l2t4.usaloc.alloc_c2[15:0] = value[15:0]; | |
426 | end | |
427 | 5: begin | |
428 | force tb_top.cpu.l2t5.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
429 | force tb_top.cpu.l2t5.usaloc.used_c2[15:0] = value[31:16]; | |
430 | force tb_top.cpu.l2t5.usaloc.alloc_c2[15:0] = value[15:0]; | |
431 | end | |
432 | 6: begin | |
433 | force tb_top.cpu.l2t6.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
434 | force tb_top.cpu.l2t6.usaloc.used_c2[15:0] = value[31:16]; | |
435 | force tb_top.cpu.l2t6.usaloc.alloc_c2[15:0] = value[15:0]; | |
436 | end | |
437 | 7: begin | |
438 | force tb_top.cpu.l2t7.usaloc.ua_ecc_c2[6:0] = value[38:32]; | |
439 | force tb_top.cpu.l2t7.usaloc.used_c2[15:0] = value[31:16]; | |
440 | force tb_top.cpu.l2t7.usaloc.alloc_c2[15:0] = value[15:0]; | |
441 | end | |
442 | endcase | |
443 | // force tb_top.force_ua = 1'b1; | |
444 | end | |
445 | endtask | |
446 | ||
447 | ||
448 | task ReleaseUsalocVuadArrayC2; | |
449 | input bank; | |
450 | integer bank; | |
451 | begin | |
452 | case (bank) | |
453 | 0: begin | |
454 | release tb_top.cpu.l2t0.usaloc.ua_ecc_c2[6:0]; | |
455 | release tb_top.cpu.l2t0.usaloc.used_c2[15:0]; | |
456 | release tb_top.cpu.l2t0.usaloc.alloc_c2[15:0]; | |
457 | end | |
458 | 1: begin | |
459 | release tb_top.cpu.l2t1.usaloc.ua_ecc_c2[6:0]; | |
460 | release tb_top.cpu.l2t1.usaloc.used_c2[15:0]; | |
461 | release tb_top.cpu.l2t1.usaloc.alloc_c2[15:0]; | |
462 | end | |
463 | 2: begin | |
464 | release tb_top.cpu.l2t2.usaloc.ua_ecc_c2[6:0]; | |
465 | release tb_top.cpu.l2t2.usaloc.used_c2[15:0]; | |
466 | release tb_top.cpu.l2t2.usaloc.alloc_c2[15:0]; | |
467 | end | |
468 | 3: begin | |
469 | release tb_top.cpu.l2t3.usaloc.ua_ecc_c2[6:0]; | |
470 | release tb_top.cpu.l2t3.usaloc.used_c2[15:0]; | |
471 | release tb_top.cpu.l2t3.usaloc.alloc_c2[15:0]; | |
472 | end | |
473 | 4: begin | |
474 | release tb_top.cpu.l2t4.usaloc.ua_ecc_c2[6:0]; | |
475 | release tb_top.cpu.l2t4.usaloc.used_c2[15:0]; | |
476 | release tb_top.cpu.l2t4.usaloc.alloc_c2[15:0]; | |
477 | end | |
478 | 5: begin | |
479 | release tb_top.cpu.l2t5.usaloc.ua_ecc_c2[6:0]; | |
480 | release tb_top.cpu.l2t5.usaloc.used_c2[15:0]; | |
481 | release tb_top.cpu.l2t5.usaloc.alloc_c2[15:0]; | |
482 | end | |
483 | 6: begin | |
484 | release tb_top.cpu.l2t6.usaloc.ua_ecc_c2[6:0]; | |
485 | release tb_top.cpu.l2t6.usaloc.used_c2[15:0]; | |
486 | release tb_top.cpu.l2t6.usaloc.alloc_c2[15:0]; | |
487 | end | |
488 | 7: begin | |
489 | release tb_top.cpu.l2t7.usaloc.ua_ecc_c2[6:0]; | |
490 | release tb_top.cpu.l2t7.usaloc.used_c2[15:0]; | |
491 | release tb_top.cpu.l2t7.usaloc.alloc_c2[15:0]; | |
492 | end | |
493 | endcase | |
494 | end | |
495 | endtask | |
496 | ||
497 | ||
498 | ||
499 | endmodule |