Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: n2_dta_sp_1920b_cust.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 n2_dta_sp_1920b_cust ( | |
36 | index0_x, | |
37 | index1_x, | |
38 | index_sel_x, | |
39 | wrway_x, | |
40 | rdreq_x, | |
41 | wrreq_x, | |
42 | wrtag_x, | |
43 | dta_clken, | |
44 | rdtag_w0_y, | |
45 | rdtag_w1_y, | |
46 | rdtag_w2_y, | |
47 | rdtag_w3_y, | |
48 | l2clk, | |
49 | scan_in, | |
50 | tcu_pce_ov, | |
51 | tcu_aclk, | |
52 | tcu_bclk, | |
53 | tcu_se_scancollar_in, | |
54 | tcu_scan_en, | |
55 | tcu_array_wr_inhibit, | |
56 | scan_out); | |
57 | wire l1clk_din; | |
58 | wire l1clk_in; | |
59 | wire l1clk_array; | |
60 | wire [6:0] index_x; | |
61 | wire dff_inputs1_scanin; | |
62 | wire dff_inputs1_scanout; | |
63 | wire [1:0] wrway_y; | |
64 | wire [6:0] index_y; | |
65 | wire [8:0] dff_inputs1_unused; | |
66 | wire dff_inputs2_scanin; | |
67 | wire dff_inputs2_scanout; | |
68 | wire [0:0] index_y_unused; | |
69 | wire dff_inputs3_scanin; | |
70 | wire dff_inputs3_scanout; | |
71 | wire rdreq_b; | |
72 | wire wrreq_b; | |
73 | wire [1:0] dff_inputs3_unused; | |
74 | wire dff_inputs4_scanin; | |
75 | wire dff_inputs4_scanout; | |
76 | wire rdreq_a; | |
77 | wire wrreq_a; | |
78 | wire dff_wrtag_scanin; | |
79 | wire dff_wrtag_scanout; | |
80 | wire [29:0] wrtag_y; | |
81 | wire [1:0] wrway_y_; | |
82 | wire wr_inhibit_; | |
83 | wire wr_inhibit; | |
84 | wire [3:0] wr_way; | |
85 | ||
86 | ||
87 | input [6:0] index0_x; // address0 (used for read) | |
88 | input [6:0] index1_x; // address1 (used for write) | |
89 | input index_sel_x; // selects between index1 and index0 | |
90 | input [1:0] wrway_x; // way to write to | |
91 | input rdreq_x; // read enable | |
92 | input wrreq_x; // write enable | |
93 | // 0in bits_on -var {rdreq_x,wrreq_x} -max 1 -message "Attempt to read AND write dtag on same cycle" | |
94 | // 0in custom -fire ((rdreq_x | wrreq_x) & ~dta_clken) -message "Attempt to read or write with clock disabled" | |
95 | input [29:0] wrtag_x; // write data | |
96 | input dta_clken; // array clock enable | |
97 | ||
98 | output [29:0] rdtag_w0_y; // read data split into 4 ports | |
99 | output [29:0] rdtag_w1_y; // read data | |
100 | output [29:0] rdtag_w2_y; // read data | |
101 | output [29:0] rdtag_w3_y; // read data | |
102 | ||
103 | input l2clk; | |
104 | input scan_in; | |
105 | input tcu_pce_ov; | |
106 | input tcu_aclk; | |
107 | input tcu_bclk; | |
108 | input tcu_se_scancollar_in; | |
109 | input tcu_scan_en; | |
110 | input tcu_array_wr_inhibit; | |
111 | output scan_out; | |
112 | ||
113 | `ifndef FPGA | |
114 | // synopsys translate_off | |
115 | `endif | |
116 | ||
117 | wire pce_ov = tcu_pce_ov; | |
118 | wire stop = 1'b0; | |
119 | wire siclk = tcu_aclk ; | |
120 | wire soclk = tcu_bclk; | |
121 | ||
122 | //================================================ | |
123 | // Clock headers | |
124 | //================================================ | |
125 | ||
126 | // This clock gates the wrtag input flops. | |
127 | n2_dta_sp_1920b_cust_l1clkhdr_ctl_macro l1ch_din ( | |
128 | .l2clk (l2clk), | |
129 | .l1en (dta_clken), | |
130 | .se (tcu_se_scancollar_in), | |
131 | .l1clk (l1clk_din), | |
132 | .pce_ov(pce_ov), | |
133 | .stop(stop) | |
134 | ); | |
135 | ||
136 | // This clock gates the other input flops and latches. | |
137 | // It will be not be power managed. | |
138 | n2_dta_sp_1920b_cust_l1clkhdr_ctl_macro l1ch_in ( | |
139 | .l2clk (l2clk), | |
140 | .l1en (1'b1), | |
141 | .se (tcu_se_scancollar_in), | |
142 | .l1clk (l1clk_in), | |
143 | .pce_ov(pce_ov), | |
144 | .stop(stop) | |
145 | ); | |
146 | ||
147 | // This clock gates the array and internal logic. | |
148 | n2_dta_sp_1920b_cust_l1clkhdr_ctl_macro l1ch_array ( | |
149 | .l2clk (l2clk), | |
150 | .l1en (dta_clken), | |
151 | .se (tcu_scan_en), | |
152 | .l1clk (l1clk_array), | |
153 | .pce_ov(pce_ov), | |
154 | .stop(stop) | |
155 | ); | |
156 | ||
157 | //========================================================================================= | |
158 | // Input flops | |
159 | //========================================================================================= | |
160 | ||
161 | // 2:1 mux on address input | |
162 | // address inputs are critical and this mux needs to be merged with the receiving flop. | |
163 | assign index_x[6:0] = index_sel_x ? index1_x[6:0] : index0_x[6:0]; | |
164 | ||
165 | n2_dta_sp_1920b_cust_tisram_msff_macro__width_9 dff_inputs1 ( | |
166 | .scan_in(dff_inputs1_scanin), | |
167 | .scan_out(dff_inputs1_scanout), | |
168 | .l1clk (l1clk_in), | |
169 | .d ({wrway_x[1:0], | |
170 | index_x[0], | |
171 | index_x[1], | |
172 | index_x[2], | |
173 | index_x[3], | |
174 | index_x[4], | |
175 | index_x[5], | |
176 | index_x[6] | |
177 | }), | |
178 | .latout ({wrway_y[1:0], | |
179 | index_y[0], | |
180 | index_y[1], | |
181 | index_y[2], | |
182 | index_y[3], | |
183 | index_y[4], | |
184 | index_y[5], | |
185 | index_y[6] | |
186 | }), | |
187 | .latout_l(dff_inputs1_unused[8:0]), | |
188 | .siclk(siclk), | |
189 | .soclk(soclk) | |
190 | ); | |
191 | ||
192 | n2_dta_sp_1920b_cust_msff_ctl_macro__width_1 dff_inputs2 ( | |
193 | .scan_in(dff_inputs2_scanin), | |
194 | .scan_out(dff_inputs2_scanout), | |
195 | .l1clk (l1clk_in), | |
196 | .din (index_x[0]), | |
197 | .dout (index_y_unused[0]), | |
198 | .siclk(siclk), | |
199 | .soclk(soclk) | |
200 | ); | |
201 | ||
202 | n2_dta_sp_1920b_cust_tisram_msff_macro__width_2 dff_inputs3 ( | |
203 | .scan_in(dff_inputs3_scanin), | |
204 | .scan_out(dff_inputs3_scanout), | |
205 | .l1clk (l1clk_in), | |
206 | .d ({rdreq_x,wrreq_x}), | |
207 | .latout ({rdreq_b,wrreq_b}), | |
208 | .latout_l(dff_inputs3_unused[1:0]), | |
209 | .siclk(siclk), | |
210 | .soclk(soclk) | |
211 | ); | |
212 | ||
213 | n2_dta_sp_1920b_cust_msff_ctl_macro__width_2 dff_inputs4 ( | |
214 | .scan_in(dff_inputs4_scanin), | |
215 | .scan_out(dff_inputs4_scanout), | |
216 | .l1clk (l1clk_in), | |
217 | .din ({rdreq_x,wrreq_x}), | |
218 | .dout ({rdreq_a,wrreq_a}), | |
219 | .siclk(siclk), | |
220 | .soclk(soclk) | |
221 | ); | |
222 | ||
223 | n2_dta_sp_1920b_cust_msff_ctl_macro__width_30 dff_wrtag ( | |
224 | .scan_in(dff_wrtag_scanin), | |
225 | .scan_out(dff_wrtag_scanout), | |
226 | .l1clk (l1clk_din), | |
227 | .din ({wrtag_x[0], | |
228 | wrtag_x[1], | |
229 | wrtag_x[2], | |
230 | wrtag_x[3], | |
231 | wrtag_x[4], | |
232 | wrtag_x[5], | |
233 | wrtag_x[6], | |
234 | wrtag_x[7], | |
235 | wrtag_x[8], | |
236 | wrtag_x[9], | |
237 | wrtag_x[10], | |
238 | wrtag_x[11], | |
239 | wrtag_x[12], | |
240 | wrtag_x[13], | |
241 | wrtag_x[14], | |
242 | wrtag_x[15], | |
243 | wrtag_x[16], | |
244 | wrtag_x[17], | |
245 | wrtag_x[18], | |
246 | wrtag_x[19], | |
247 | wrtag_x[20], | |
248 | wrtag_x[21], | |
249 | wrtag_x[22], | |
250 | wrtag_x[23], | |
251 | wrtag_x[24], | |
252 | wrtag_x[25], | |
253 | wrtag_x[26], | |
254 | wrtag_x[27], | |
255 | wrtag_x[28], | |
256 | wrtag_x[29]}), | |
257 | .dout ({wrtag_y[0], | |
258 | wrtag_y[1], | |
259 | wrtag_y[2], | |
260 | wrtag_y[3], | |
261 | wrtag_y[4], | |
262 | wrtag_y[5], | |
263 | wrtag_y[6], | |
264 | wrtag_y[7], | |
265 | wrtag_y[8], | |
266 | wrtag_y[9], | |
267 | wrtag_y[10], | |
268 | wrtag_y[11], | |
269 | wrtag_y[12], | |
270 | wrtag_y[13], | |
271 | wrtag_y[14], | |
272 | wrtag_y[15], | |
273 | wrtag_y[16], | |
274 | wrtag_y[17], | |
275 | wrtag_y[18], | |
276 | wrtag_y[19], | |
277 | wrtag_y[20], | |
278 | wrtag_y[21], | |
279 | wrtag_y[22], | |
280 | wrtag_y[23], | |
281 | wrtag_y[24], | |
282 | wrtag_y[25], | |
283 | wrtag_y[26], | |
284 | wrtag_y[27], | |
285 | wrtag_y[28], | |
286 | wrtag_y[29]}), | |
287 | .siclk(siclk), | |
288 | .soclk(soclk) | |
289 | ); | |
290 | ||
291 | // Decode write enables | |
292 | n2_dta_sp_1920b_cust_inv_macro__width_3 way_inv ( | |
293 | .din ({wrway_y[1:0], tcu_array_wr_inhibit}), | |
294 | .dout ({wrway_y_[1:0],wr_inhibit_}) | |
295 | ); | |
296 | ||
297 | assign wr_inhibit = tcu_array_wr_inhibit; | |
298 | ||
299 | n2_dta_sp_1920b_cust_and_macro__ports_4__width_4 way_and ( | |
300 | .din0 ({wrreq_b, wrreq_b, wrreq_b, wrreq_b}), | |
301 | .din1 ({wrway_y [0],wrway_y_[0],wrway_y [0],wrway_y_[0]}), | |
302 | .din2 ({wrway_y [1],wrway_y [1],wrway_y_[1],wrway_y_[1]}), | |
303 | .din3 ({4{wr_inhibit_}}), | |
304 | .dout (wr_way[3:0]) | |
305 | ); | |
306 | ||
307 | n2_dta_sp_1920b_array way0 ( | |
308 | .clk (l1clk_array), | |
309 | .wr_en_b (wr_way[0]), | |
310 | .rd_en_b (rdreq_b), | |
311 | .wr_en_a (wrreq_a), | |
312 | .rd_en_a (rdreq_a), | |
313 | .addr (index_y[6:0]), | |
314 | .din (wrtag_y[29:0]), | |
315 | .dout (rdtag_w0_y[29:0]), | |
316 | .wr_inhibit(wr_inhibit) | |
317 | ); | |
318 | n2_dta_sp_1920b_array way1 ( | |
319 | .clk (l1clk_array), | |
320 | .wr_en_b (wr_way[1]), | |
321 | .rd_en_b (rdreq_b), | |
322 | .wr_en_a (wrreq_a), | |
323 | .rd_en_a (rdreq_a), | |
324 | .addr (index_y[6:0]), | |
325 | .din (wrtag_y[29:0]), | |
326 | .dout (rdtag_w1_y[29:0]), | |
327 | .wr_inhibit(wr_inhibit) | |
328 | ); | |
329 | n2_dta_sp_1920b_array way2 ( | |
330 | .clk (l1clk_array), | |
331 | .wr_en_b (wr_way[2]), | |
332 | .rd_en_b (rdreq_b), | |
333 | .wr_en_a (wrreq_a), | |
334 | .rd_en_a (rdreq_a), | |
335 | .addr (index_y[6:0]), | |
336 | .din (wrtag_y[29:0]), | |
337 | .dout (rdtag_w2_y[29:0]), | |
338 | .wr_inhibit(wr_inhibit) | |
339 | ); | |
340 | n2_dta_sp_1920b_array way3 ( | |
341 | .clk (l1clk_array), | |
342 | .wr_en_b (wr_way[3]), | |
343 | .rd_en_b (rdreq_b), | |
344 | .wr_en_a (wrreq_a), | |
345 | .rd_en_a (rdreq_a), | |
346 | .addr (index_y[6:0]), | |
347 | .din (wrtag_y[29:0]), | |
348 | .dout (rdtag_w3_y[29:0]), | |
349 | .wr_inhibit(wr_inhibit) | |
350 | ); | |
351 | ||
352 | supply0 vss; | |
353 | supply1 vdd; | |
354 | // fixscan start: | |
355 | assign dff_inputs1_scanin = scan_in ; | |
356 | assign dff_inputs2_scanin = dff_inputs1_scanout ; | |
357 | assign dff_inputs3_scanin = dff_inputs2_scanout ; | |
358 | assign dff_inputs4_scanin = dff_inputs3_scanout ; | |
359 | assign dff_wrtag_scanin = dff_inputs4_scanout ; | |
360 | assign scan_out = dff_wrtag_scanout ; | |
361 | // fixscan end: | |
362 | ||
363 | `ifndef FPGA | |
364 | // synopsys translate_on | |
365 | `endif | |
366 | ||
367 | endmodule | |
368 | ||
369 | ||
370 | ||
371 | ||
372 | ||
373 | ||
374 | ||
375 | // any PARAMS parms go into naming of macro | |
376 | ||
377 | module n2_dta_sp_1920b_cust_l1clkhdr_ctl_macro ( | |
378 | l2clk, | |
379 | l1en, | |
380 | pce_ov, | |
381 | stop, | |
382 | se, | |
383 | l1clk); | |
384 | ||
385 | ||
386 | input l2clk; | |
387 | input l1en; | |
388 | input pce_ov; | |
389 | input stop; | |
390 | input se; | |
391 | output l1clk; | |
392 | ||
393 | ||
394 | ||
395 | ||
396 | ||
397 | cl_sc1_l1hdr_8x c_0 ( | |
398 | ||
399 | ||
400 | .l2clk(l2clk), | |
401 | .pce(l1en), | |
402 | .l1clk(l1clk), | |
403 | .se(se), | |
404 | .pce_ov(pce_ov), | |
405 | .stop(stop) | |
406 | ); | |
407 | ||
408 | ||
409 | ||
410 | endmodule | |
411 | ||
412 | ||
413 | ||
414 | ||
415 | ||
416 | ||
417 | ||
418 | ||
419 | ||
420 | // | |
421 | // macro for cl_mc1_tisram_msff_{16,8}x flops | |
422 | // | |
423 | // | |
424 | ||
425 | ||
426 | ||
427 | ||
428 | ||
429 | module n2_dta_sp_1920b_cust_tisram_msff_macro__width_9 ( | |
430 | d, | |
431 | scan_in, | |
432 | l1clk, | |
433 | siclk, | |
434 | soclk, | |
435 | scan_out, | |
436 | latout, | |
437 | latout_l); | |
438 | wire [7:0] so; | |
439 | ||
440 | input [8:0] d; | |
441 | input scan_in; | |
442 | input l1clk; | |
443 | input siclk; | |
444 | input soclk; | |
445 | output scan_out; | |
446 | output [8:0] latout; | |
447 | output [8:0] latout_l; | |
448 | ||
449 | ||
450 | ||
451 | ||
452 | ||
453 | ||
454 | tisram_msff #(9) d0_0 ( | |
455 | .d(d[8:0]), | |
456 | .si({scan_in,so[7:0]}), | |
457 | .so({so[7:0],scan_out}), | |
458 | .l1clk(l1clk), | |
459 | .siclk(siclk), | |
460 | .soclk(soclk), | |
461 | .latout(latout[8:0]), | |
462 | .latout_l(latout_l[8:0]) | |
463 | ); | |
464 | ||
465 | ||
466 | ||
467 | ||
468 | ||
469 | ||
470 | ||
471 | ||
472 | ||
473 | ||
474 | ||
475 | ||
476 | //place::generic_place($width,$stack,$left); | |
477 | ||
478 | endmodule | |
479 | ||
480 | ||
481 | ||
482 | ||
483 | ||
484 | ||
485 | ||
486 | ||
487 | ||
488 | // any PARAMS parms go into naming of macro | |
489 | ||
490 | module n2_dta_sp_1920b_cust_msff_ctl_macro__width_1 ( | |
491 | din, | |
492 | l1clk, | |
493 | scan_in, | |
494 | siclk, | |
495 | soclk, | |
496 | dout, | |
497 | scan_out); | |
498 | wire [0:0] fdin; | |
499 | ||
500 | input [0:0] din; | |
501 | input l1clk; | |
502 | input scan_in; | |
503 | ||
504 | ||
505 | input siclk; | |
506 | input soclk; | |
507 | ||
508 | output [0:0] dout; | |
509 | output scan_out; | |
510 | assign fdin[0:0] = din[0:0]; | |
511 | ||
512 | ||
513 | ||
514 | ||
515 | ||
516 | ||
517 | dff #(1) d0_0 ( | |
518 | .l1clk(l1clk), | |
519 | .siclk(siclk), | |
520 | .soclk(soclk), | |
521 | .d(fdin[0:0]), | |
522 | .si(scan_in), | |
523 | .so(scan_out), | |
524 | .q(dout[0:0]) | |
525 | ); | |
526 | ||
527 | ||
528 | ||
529 | ||
530 | ||
531 | ||
532 | ||
533 | ||
534 | ||
535 | ||
536 | ||
537 | ||
538 | endmodule | |
539 | ||
540 | ||
541 | ||
542 | ||
543 | ||
544 | ||
545 | ||
546 | ||
547 | ||
548 | // | |
549 | // macro for cl_mc1_tisram_msff_{16,8}x flops | |
550 | // | |
551 | // | |
552 | ||
553 | ||
554 | ||
555 | ||
556 | ||
557 | module n2_dta_sp_1920b_cust_tisram_msff_macro__width_2 ( | |
558 | d, | |
559 | scan_in, | |
560 | l1clk, | |
561 | siclk, | |
562 | soclk, | |
563 | scan_out, | |
564 | latout, | |
565 | latout_l); | |
566 | wire [0:0] so; | |
567 | ||
568 | input [1:0] d; | |
569 | input scan_in; | |
570 | input l1clk; | |
571 | input siclk; | |
572 | input soclk; | |
573 | output scan_out; | |
574 | output [1:0] latout; | |
575 | output [1:0] latout_l; | |
576 | ||
577 | ||
578 | ||
579 | ||
580 | ||
581 | ||
582 | tisram_msff #(2) d0_0 ( | |
583 | .d(d[1:0]), | |
584 | .si({scan_in,so[0:0]}), | |
585 | .so({so[0:0],scan_out}), | |
586 | .l1clk(l1clk), | |
587 | .siclk(siclk), | |
588 | .soclk(soclk), | |
589 | .latout(latout[1:0]), | |
590 | .latout_l(latout_l[1:0]) | |
591 | ); | |
592 | ||
593 | ||
594 | ||
595 | ||
596 | ||
597 | ||
598 | ||
599 | ||
600 | ||
601 | ||
602 | ||
603 | ||
604 | //place::generic_place($width,$stack,$left); | |
605 | ||
606 | endmodule | |
607 | ||
608 | ||
609 | ||
610 | ||
611 | ||
612 | ||
613 | ||
614 | ||
615 | ||
616 | // any PARAMS parms go into naming of macro | |
617 | ||
618 | module n2_dta_sp_1920b_cust_msff_ctl_macro__width_2 ( | |
619 | din, | |
620 | l1clk, | |
621 | scan_in, | |
622 | siclk, | |
623 | soclk, | |
624 | dout, | |
625 | scan_out); | |
626 | wire [1:0] fdin; | |
627 | wire [0:0] so; | |
628 | ||
629 | input [1:0] din; | |
630 | input l1clk; | |
631 | input scan_in; | |
632 | ||
633 | ||
634 | input siclk; | |
635 | input soclk; | |
636 | ||
637 | output [1:0] dout; | |
638 | output scan_out; | |
639 | assign fdin[1:0] = din[1:0]; | |
640 | ||
641 | ||
642 | ||
643 | ||
644 | ||
645 | ||
646 | dff #(2) d0_0 ( | |
647 | .l1clk(l1clk), | |
648 | .siclk(siclk), | |
649 | .soclk(soclk), | |
650 | .d(fdin[1:0]), | |
651 | .si({scan_in,so[0:0]}), | |
652 | .so({so[0:0],scan_out}), | |
653 | .q(dout[1:0]) | |
654 | ); | |
655 | ||
656 | ||
657 | ||
658 | ||
659 | ||
660 | ||
661 | ||
662 | ||
663 | ||
664 | ||
665 | ||
666 | ||
667 | endmodule | |
668 | ||
669 | ||
670 | ||
671 | ||
672 | ||
673 | ||
674 | ||
675 | ||
676 | ||
677 | ||
678 | ||
679 | ||
680 | ||
681 | // any PARAMS parms go into naming of macro | |
682 | ||
683 | module n2_dta_sp_1920b_cust_msff_ctl_macro__width_30 ( | |
684 | din, | |
685 | l1clk, | |
686 | scan_in, | |
687 | siclk, | |
688 | soclk, | |
689 | dout, | |
690 | scan_out); | |
691 | wire [29:0] fdin; | |
692 | wire [28:0] so; | |
693 | ||
694 | input [29:0] din; | |
695 | input l1clk; | |
696 | input scan_in; | |
697 | ||
698 | ||
699 | input siclk; | |
700 | input soclk; | |
701 | ||
702 | output [29:0] dout; | |
703 | output scan_out; | |
704 | assign fdin[29:0] = din[29:0]; | |
705 | ||
706 | ||
707 | ||
708 | ||
709 | ||
710 | ||
711 | dff #(30) d0_0 ( | |
712 | .l1clk(l1clk), | |
713 | .siclk(siclk), | |
714 | .soclk(soclk), | |
715 | .d(fdin[29:0]), | |
716 | .si({scan_in,so[28:0]}), | |
717 | .so({so[28:0],scan_out}), | |
718 | .q(dout[29:0]) | |
719 | ); | |
720 | ||
721 | ||
722 | ||
723 | ||
724 | ||
725 | ||
726 | ||
727 | ||
728 | ||
729 | ||
730 | ||
731 | ||
732 | endmodule | |
733 | ||
734 | ||
735 | ||
736 | ||
737 | ||
738 | ||
739 | ||
740 | ||
741 | ||
742 | // | |
743 | // invert macro | |
744 | // | |
745 | // | |
746 | ||
747 | ||
748 | ||
749 | ||
750 | ||
751 | module n2_dta_sp_1920b_cust_inv_macro__width_3 ( | |
752 | din, | |
753 | dout); | |
754 | input [2:0] din; | |
755 | output [2:0] dout; | |
756 | ||
757 | ||
758 | ||
759 | ||
760 | ||
761 | ||
762 | inv #(3) d0_0 ( | |
763 | .in(din[2:0]), | |
764 | .out(dout[2:0]) | |
765 | ); | |
766 | ||
767 | ||
768 | ||
769 | ||
770 | ||
771 | ||
772 | ||
773 | ||
774 | ||
775 | endmodule | |
776 | ||
777 | ||
778 | ||
779 | ||
780 | ||
781 | // | |
782 | // and macro for ports = 2,3,4 | |
783 | // | |
784 | // | |
785 | ||
786 | ||
787 | ||
788 | ||
789 | ||
790 | module n2_dta_sp_1920b_cust_and_macro__ports_4__width_4 ( | |
791 | din0, | |
792 | din1, | |
793 | din2, | |
794 | din3, | |
795 | dout); | |
796 | input [3:0] din0; | |
797 | input [3:0] din1; | |
798 | input [3:0] din2; | |
799 | input [3:0] din3; | |
800 | output [3:0] dout; | |
801 | ||
802 | ||
803 | ||
804 | ||
805 | ||
806 | ||
807 | and4 #(4) d0_0 ( | |
808 | .in0(din0[3:0]), | |
809 | .in1(din1[3:0]), | |
810 | .in2(din2[3:0]), | |
811 | .in3(din3[3:0]), | |
812 | .out(dout[3:0]) | |
813 | ); | |
814 | ||
815 | ||
816 | ||
817 | ||
818 | ||
819 | ||
820 | ||
821 | ||
822 | ||
823 | endmodule | |
824 | ||
825 | ||
826 | ||
827 | ||
828 | ||
829 | ||
830 | module n2_dta_sp_1920b_array ( | |
831 | clk, | |
832 | rd_en_b, | |
833 | wr_en_b, | |
834 | rd_en_a, | |
835 | wr_en_a, | |
836 | addr, | |
837 | wr_inhibit, | |
838 | din, | |
839 | dout); | |
840 | wire rd_en_b_unused; | |
841 | ||
842 | ||
843 | `define WIDTH 30 | |
844 | `define ENTRIES 128 | |
845 | `define ADDRBITS 7 | |
846 | ||
847 | input clk; | |
848 | input rd_en_b; // comes on negedge | |
849 | input wr_en_b; // comes on negedge (way specific) | |
850 | input rd_en_a; // comes on posedge | |
851 | input wr_en_a; // comes on posedge (not way specific) | |
852 | input [`ADDRBITS-1:0] addr; // comes on negedge | |
853 | input wr_inhibit; // async | |
854 | ||
855 | input [`WIDTH-1:0] din; // comes on posedge | |
856 | output [`WIDTH-1:0] dout; | |
857 | ||
858 | ||
859 | ||
860 | ||
861 | ||
862 | ||
863 | ||
864 | ||
865 | reg [`WIDTH-1:0] mem[`ENTRIES-1:0]; | |
866 | reg [`WIDTH-1:0] local_dout; | |
867 | ||
868 | assign rd_en_b_unused = rd_en_b; | |
869 | ||
870 | `ifndef NOINITMEM | |
871 | // Emulate reset | |
872 | integer i; | |
873 | initial begin | |
874 | for (i=0; i<`ENTRIES; i=i+1) begin | |
875 | mem[i] = {`WIDTH{1'b0}}; | |
876 | end | |
877 | local_dout = {`WIDTH{1'b0}}; | |
878 | end | |
879 | `endif | |
880 | ||
881 | ////////////////////// | |
882 | // Read/write array | |
883 | ////////////////////// | |
884 | ||
885 | always @(negedge clk) begin | |
886 | if (wr_en_b) begin | |
887 | mem[addr] <= din; | |
888 | ||
889 | ||
890 | ||
891 | end | |
892 | end | |
893 | ||
894 | always @(posedge clk) begin | |
895 | local_dout[`WIDTH-1:0] <= mem[addr]; | |
896 | end | |
897 | ||
898 | assign dout[`WIDTH-1:0] = local_dout[`WIDTH-1:0] & {`WIDTH{rd_en_a & ~wr_en_a & ~wr_inhibit}}; | |
899 | ||
900 | supply0 vss; | |
901 | supply1 vdd; | |
902 | ||
903 | ||
904 | endmodule | |
905 |