Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: db1_ucbbusin4_ctl.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 | `define UCB_BUS_WIDTH 4 | |
36 | `define UCB_BUS_WIDTH_M1 3 | |
37 | `define CYC_NUM 32 | |
38 | `define CYC_NUM_M1 31 | |
39 | ||
40 | module db1_ucbbusin4_ctl ( | |
41 | iol2clk, | |
42 | scan_in, | |
43 | scan_out, | |
44 | tcu_pce_ov, | |
45 | tcu_clk_stop, | |
46 | tcu_aclk, | |
47 | tcu_bclk, | |
48 | tcu_scan_en, | |
49 | vld, | |
50 | data, | |
51 | stall, | |
52 | indata_buf_vld, | |
53 | indata_buf, | |
54 | stall_a1) ; | |
55 | wire stall_d1_; | |
56 | wire stall_d1; | |
57 | wire vld_d1_ff_scanin; | |
58 | wire vld_d1_ff_scanout; | |
59 | wire vld_d1; | |
60 | wire l1clk; | |
61 | wire data_d1_ff_scanin; | |
62 | wire data_d1_ff_scanout; | |
63 | wire [3:0] data_d1; | |
64 | wire stall_ff_scanin; | |
65 | wire stall_ff_scanout; | |
66 | wire stall_d1_ff_scanin; | |
67 | wire stall_d1_ff_scanout; | |
68 | wire skid_buf0_en; | |
69 | wire vld_buf0_ff_scanin; | |
70 | wire vld_buf0_ff_scanout; | |
71 | wire vld_buf0; | |
72 | wire data_buf0_ff_scanin; | |
73 | wire data_buf0_ff_scanout; | |
74 | wire [3:0] data_buf0; | |
75 | wire skid_buf1_en_ff_scanin; | |
76 | wire skid_buf1_en_ff_scanout; | |
77 | wire skid_buf1_en; | |
78 | wire vld_buf1_ff_scanin; | |
79 | wire vld_buf1_ff_scanout; | |
80 | wire vld_buf1; | |
81 | wire data_buf1_ff_scanin; | |
82 | wire data_buf1_ff_scanout; | |
83 | wire [3:0] data_buf1; | |
84 | wire skid_buf0_sel; | |
85 | wire skid_buf1_sel_ff_scanin; | |
86 | wire skid_buf1_sel_ff_scanout; | |
87 | wire skid_buf1_sel; | |
88 | wire vld_mux; | |
89 | wire [3:0] data_mux; | |
90 | wire [31:0] indata_vec_next; | |
91 | wire [31:0] indata_vec; | |
92 | wire stall_a1_; | |
93 | wire indata_vec_ff_scanin; | |
94 | wire indata_vec_ff_scanout; | |
95 | wire [127:0] indata_buf_next; | |
96 | wire indata_buf_ff_scanin; | |
97 | wire indata_buf_ff_scanout; | |
98 | wire indata_vec0_d1_ff_scanin; | |
99 | wire indata_vec0_d1_ff_scanout; | |
100 | wire indata_vec0_d1; | |
101 | wire siclk; | |
102 | wire soclk; | |
103 | wire pce_ov; | |
104 | wire stop; | |
105 | wire se; | |
106 | ||
107 | ||
108 | //////////////////////////////////////////////////////////////////////// | |
109 | // Signal declarations | |
110 | //////////////////////////////////////////////////////////////////////// | |
111 | // Global interface | |
112 | input iol2clk; | |
113 | input scan_in; | |
114 | output scan_out; | |
115 | input tcu_pce_ov; | |
116 | input tcu_clk_stop; | |
117 | input tcu_aclk ; | |
118 | input tcu_bclk ; | |
119 | input tcu_scan_en ; | |
120 | ||
121 | // UCB bus interface | |
122 | input vld; | |
123 | input [`UCB_BUS_WIDTH_M1 :0] data; | |
124 | output stall; | |
125 | ||
126 | ||
127 | // Local interface | |
128 | output indata_buf_vld; | |
129 | output [127:0] indata_buf; | |
130 | input stall_a1; | |
131 | ||
132 | ||
133 | // Internal signals | |
134 | ||
135 | //////////////////////////////////////////////////////////////////////// | |
136 | // Code starts here | |
137 | //////////////////////////////////////////////////////////////////////// | |
138 | /************************************************************ | |
139 | * UCB bus interface flops | |
140 | * This is to make signals going between IOB and UCB flop-to-flop | |
141 | * to improve timing. | |
142 | ************************************************************/ | |
143 | assign stall_d1_ = ~stall_d1; | |
144 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_1 vld_d1_ff | |
145 | ( | |
146 | .scan_in(vld_d1_ff_scanin), | |
147 | .scan_out(vld_d1_ff_scanout), | |
148 | .dout (vld_d1), | |
149 | .l1clk (l1clk), | |
150 | .en (stall_d1_), | |
151 | .din (vld), | |
152 | .siclk(siclk), | |
153 | .soclk(soclk) | |
154 | ); | |
155 | ||
156 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_4 data_d1_ff | |
157 | ( | |
158 | .scan_in(data_d1_ff_scanin), | |
159 | .scan_out(data_d1_ff_scanout), | |
160 | .dout (data_d1[`UCB_BUS_WIDTH_M1:0]), | |
161 | .l1clk (l1clk), | |
162 | .en (stall_d1_), | |
163 | .din (data[`UCB_BUS_WIDTH_M1:0]), | |
164 | .siclk(siclk), | |
165 | .soclk(soclk) | |
166 | ); | |
167 | ||
168 | db1_ucbbusin4_ctl_msff_ctl_macro__width_1 stall_ff | |
169 | ( | |
170 | .scan_in(stall_ff_scanin), | |
171 | .scan_out(stall_ff_scanout), | |
172 | .dout (stall), | |
173 | .l1clk (l1clk), | |
174 | .din (stall_a1), | |
175 | .siclk(siclk), | |
176 | .soclk(soclk) | |
177 | ); | |
178 | ||
179 | db1_ucbbusin4_ctl_msff_ctl_macro__width_1 stall_d1_ff | |
180 | ( | |
181 | .scan_in(stall_d1_ff_scanin), | |
182 | .scan_out(stall_d1_ff_scanout), | |
183 | .dout (stall_d1), | |
184 | .l1clk (l1clk), | |
185 | .din (stall), | |
186 | .siclk(siclk), | |
187 | .soclk(soclk) | |
188 | ); | |
189 | ||
190 | ||
191 | /************************************************************ | |
192 | * Skid buffer | |
193 | * We need a two deep skid buffer to handle stalling. | |
194 | ************************************************************/ | |
195 | // Assertion: stall has to be deasserted for more than 1 cycle | |
196 | // ie time between two separate stalls has to be | |
197 | // at least two cycles. Otherwise, contents from | |
198 | // skid buffer will be lost. | |
199 | ||
200 | // Buffer 0 | |
201 | assign skid_buf0_en = stall_a1 & ~stall; | |
202 | ||
203 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_1 vld_buf0_ff | |
204 | ( | |
205 | .scan_in(vld_buf0_ff_scanin), | |
206 | .scan_out(vld_buf0_ff_scanout), | |
207 | .dout (vld_buf0), | |
208 | .l1clk (l1clk), | |
209 | .en (skid_buf0_en), | |
210 | .din (vld_d1), | |
211 | .siclk(siclk), | |
212 | .soclk(soclk) | |
213 | ); | |
214 | ||
215 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_4 data_buf0_ff | |
216 | ( | |
217 | .scan_in(data_buf0_ff_scanin), | |
218 | .scan_out(data_buf0_ff_scanout), | |
219 | .dout (data_buf0[`UCB_BUS_WIDTH_M1 :0]), | |
220 | .l1clk (l1clk), | |
221 | .en (skid_buf0_en), | |
222 | .din (data_d1[`UCB_BUS_WIDTH_M1 :0]), | |
223 | .siclk(siclk), | |
224 | .soclk(soclk) | |
225 | ); | |
226 | ||
227 | // Buffer 1 | |
228 | db1_ucbbusin4_ctl_msff_ctl_macro__width_1 skid_buf1_en_ff | |
229 | ( | |
230 | .scan_in(skid_buf1_en_ff_scanin), | |
231 | .scan_out(skid_buf1_en_ff_scanout), | |
232 | .dout (skid_buf1_en), | |
233 | .l1clk (l1clk), | |
234 | .din (skid_buf0_en), | |
235 | .siclk(siclk), | |
236 | .soclk(soclk) | |
237 | ); | |
238 | ||
239 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_1 vld_buf1_ff | |
240 | ( | |
241 | .scan_in(vld_buf1_ff_scanin), | |
242 | .scan_out(vld_buf1_ff_scanout), | |
243 | .dout (vld_buf1), | |
244 | .l1clk (l1clk), | |
245 | .en (skid_buf1_en), | |
246 | .din (vld_d1), | |
247 | .siclk(siclk), | |
248 | .soclk(soclk) | |
249 | ); | |
250 | ||
251 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_4 data_buf1_ff | |
252 | ( | |
253 | .scan_in(data_buf1_ff_scanin), | |
254 | .scan_out(data_buf1_ff_scanout), | |
255 | .dout (data_buf1[`UCB_BUS_WIDTH_M1 :0]), | |
256 | .l1clk (l1clk), | |
257 | .en (skid_buf1_en), | |
258 | .din (data_d1[`UCB_BUS_WIDTH_M1 :0]), | |
259 | .siclk(siclk), | |
260 | .soclk(soclk) | |
261 | ); | |
262 | ||
263 | ||
264 | /************************************************************ | |
265 | * Mux between skid buffer and interface flop | |
266 | ************************************************************/ | |
267 | // Assertion: stall has to be deasserted for more than 1 cycle | |
268 | // ie time between two separate stalls has to be | |
269 | // at least two cycles. Otherwise, contents from | |
270 | // skid buffer will be lost. | |
271 | ||
272 | assign skid_buf0_sel = ~stall_a1 & stall; | |
273 | ||
274 | db1_ucbbusin4_ctl_msff_ctl_macro__width_1 skid_buf1_sel_ff | |
275 | ( | |
276 | .scan_in(skid_buf1_sel_ff_scanin), | |
277 | .scan_out(skid_buf1_sel_ff_scanout), | |
278 | .dout (skid_buf1_sel), | |
279 | .l1clk (l1clk), | |
280 | .din (skid_buf0_sel), | |
281 | .siclk(siclk), | |
282 | .soclk(soclk) | |
283 | ); | |
284 | ||
285 | assign vld_mux = skid_buf0_sel ? vld_buf0 : | |
286 | skid_buf1_sel ? vld_buf1 : | |
287 | vld_d1; | |
288 | ||
289 | assign data_mux[`UCB_BUS_WIDTH_M1 :0] = skid_buf0_sel ? data_buf0[`UCB_BUS_WIDTH_M1 :0] : | |
290 | skid_buf1_sel ? data_buf1[`UCB_BUS_WIDTH_M1 :0] : | |
291 | data_d1[`UCB_BUS_WIDTH_M1 :0]; | |
292 | ||
293 | ||
294 | /************************************************************ | |
295 | * Assemble inbound data | |
296 | ************************************************************/ | |
297 | // valid vector | |
298 | assign indata_vec_next[`CYC_NUM_M1:0] = {vld_mux, indata_vec[`CYC_NUM_M1 :1]}; | |
299 | ||
300 | assign stall_a1_ = ~stall_a1; | |
301 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_32 indata_vec_ff | |
302 | ( | |
303 | .scan_in(indata_vec_ff_scanin), | |
304 | .scan_out(indata_vec_ff_scanout), | |
305 | .dout (indata_vec[`CYC_NUM_M1 :0]), | |
306 | .l1clk (l1clk), | |
307 | .en (stall_a1_), | |
308 | .din (indata_vec_next[`CYC_NUM_M1 :0]), | |
309 | .siclk(siclk), | |
310 | .soclk(soclk) | |
311 | ); | |
312 | ||
313 | // data buffer | |
314 | assign indata_buf_next[127:0] = {data_mux[`UCB_BUS_WIDTH_M1 :0], indata_buf[127:`UCB_BUS_WIDTH ]}; | |
315 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_128 indata_buf_ff | |
316 | ( | |
317 | .scan_in(indata_buf_ff_scanin), | |
318 | .scan_out(indata_buf_ff_scanout), | |
319 | .dout (indata_buf[127:0]), | |
320 | .l1clk (l1clk), | |
321 | .en (stall_a1_), | |
322 | .din (indata_buf_next[127:0]), | |
323 | .siclk(siclk), | |
324 | .soclk(soclk) | |
325 | ); | |
326 | ||
327 | // detect a new packet | |
328 | db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_1 indata_vec0_d1_ff | |
329 | ( | |
330 | .scan_in(indata_vec0_d1_ff_scanin), | |
331 | .scan_out(indata_vec0_d1_ff_scanout), | |
332 | .dout (indata_vec0_d1), | |
333 | .l1clk (l1clk), | |
334 | .en (stall_a1_), | |
335 | .din (indata_vec[0]), | |
336 | .siclk(siclk), | |
337 | .soclk(soclk) | |
338 | ); | |
339 | ||
340 | assign indata_buf_vld = indata_vec[0] & ~indata_vec0_d1; | |
341 | ||
342 | ||
343 | ||
344 | /**** adding clock header ****/ | |
345 | db1_ucbbusin4_ctl_l1clkhdr_ctl_macro clkgen ( | |
346 | .l2clk (iol2clk), | |
347 | .l1en (1'b1), | |
348 | .l1clk (l1clk), | |
349 | .pce_ov(pce_ov), | |
350 | .stop(stop), | |
351 | .se(se) | |
352 | ); | |
353 | ||
354 | /*** building tcu port ***/ | |
355 | assign siclk = tcu_aclk ; | |
356 | assign soclk = tcu_bclk ; | |
357 | assign pce_ov = tcu_pce_ov ; | |
358 | assign stop = tcu_clk_stop; | |
359 | // scan renames | |
360 | assign se = tcu_scan_en ; | |
361 | // end scan | |
362 | ||
363 | // fixscan start: | |
364 | assign vld_d1_ff_scanin = scan_in ; | |
365 | assign data_d1_ff_scanin = vld_d1_ff_scanout ; | |
366 | assign stall_ff_scanin = data_d1_ff_scanout ; | |
367 | assign stall_d1_ff_scanin = stall_ff_scanout ; | |
368 | assign vld_buf0_ff_scanin = stall_d1_ff_scanout ; | |
369 | assign data_buf0_ff_scanin = vld_buf0_ff_scanout ; | |
370 | assign skid_buf1_en_ff_scanin = data_buf0_ff_scanout ; | |
371 | assign vld_buf1_ff_scanin = skid_buf1_en_ff_scanout ; | |
372 | assign data_buf1_ff_scanin = vld_buf1_ff_scanout ; | |
373 | assign skid_buf1_sel_ff_scanin = data_buf1_ff_scanout ; | |
374 | assign indata_vec_ff_scanin = skid_buf1_sel_ff_scanout ; | |
375 | assign indata_buf_ff_scanin = indata_vec_ff_scanout ; | |
376 | assign indata_vec0_d1_ff_scanin = indata_buf_ff_scanout ; | |
377 | assign scan_out = indata_vec0_d1_ff_scanout; | |
378 | // fixscan end: | |
379 | endmodule // ucb_bus_in | |
380 | ||
381 | ||
382 | ||
383 | ||
384 | ||
385 | ||
386 | // any PARAMS parms go into naming of macro | |
387 | ||
388 | module db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_1 ( | |
389 | din, | |
390 | en, | |
391 | l1clk, | |
392 | scan_in, | |
393 | siclk, | |
394 | soclk, | |
395 | dout, | |
396 | scan_out); | |
397 | wire [0:0] fdin; | |
398 | ||
399 | input [0:0] din; | |
400 | input en; | |
401 | input l1clk; | |
402 | input scan_in; | |
403 | ||
404 | ||
405 | input siclk; | |
406 | input soclk; | |
407 | ||
408 | output [0:0] dout; | |
409 | output scan_out; | |
410 | assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}}); | |
411 | ||
412 | ||
413 | ||
414 | ||
415 | ||
416 | ||
417 | dff #(1) d0_0 ( | |
418 | .l1clk(l1clk), | |
419 | .siclk(siclk), | |
420 | .soclk(soclk), | |
421 | .d(fdin[0:0]), | |
422 | .si(scan_in), | |
423 | .so(scan_out), | |
424 | .q(dout[0:0]) | |
425 | ); | |
426 | ||
427 | ||
428 | ||
429 | ||
430 | ||
431 | ||
432 | ||
433 | ||
434 | ||
435 | ||
436 | ||
437 | ||
438 | endmodule | |
439 | ||
440 | ||
441 | ||
442 | ||
443 | ||
444 | ||
445 | ||
446 | ||
447 | ||
448 | ||
449 | ||
450 | ||
451 | ||
452 | // any PARAMS parms go into naming of macro | |
453 | ||
454 | module db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_4 ( | |
455 | din, | |
456 | en, | |
457 | l1clk, | |
458 | scan_in, | |
459 | siclk, | |
460 | soclk, | |
461 | dout, | |
462 | scan_out); | |
463 | wire [3:0] fdin; | |
464 | wire [2:0] so; | |
465 | ||
466 | input [3:0] din; | |
467 | input en; | |
468 | input l1clk; | |
469 | input scan_in; | |
470 | ||
471 | ||
472 | input siclk; | |
473 | input soclk; | |
474 | ||
475 | output [3:0] dout; | |
476 | output scan_out; | |
477 | assign fdin[3:0] = (din[3:0] & {4{en}}) | (dout[3:0] & ~{4{en}}); | |
478 | ||
479 | ||
480 | ||
481 | ||
482 | ||
483 | ||
484 | dff #(4) d0_0 ( | |
485 | .l1clk(l1clk), | |
486 | .siclk(siclk), | |
487 | .soclk(soclk), | |
488 | .d(fdin[3:0]), | |
489 | .si({scan_in,so[2:0]}), | |
490 | .so({so[2:0],scan_out}), | |
491 | .q(dout[3:0]) | |
492 | ); | |
493 | ||
494 | ||
495 | ||
496 | ||
497 | ||
498 | ||
499 | ||
500 | ||
501 | ||
502 | ||
503 | ||
504 | ||
505 | endmodule | |
506 | ||
507 | ||
508 | ||
509 | ||
510 | ||
511 | ||
512 | ||
513 | ||
514 | ||
515 | ||
516 | ||
517 | ||
518 | ||
519 | // any PARAMS parms go into naming of macro | |
520 | ||
521 | module db1_ucbbusin4_ctl_msff_ctl_macro__width_1 ( | |
522 | din, | |
523 | l1clk, | |
524 | scan_in, | |
525 | siclk, | |
526 | soclk, | |
527 | dout, | |
528 | scan_out); | |
529 | wire [0:0] fdin; | |
530 | ||
531 | input [0:0] din; | |
532 | input l1clk; | |
533 | input scan_in; | |
534 | ||
535 | ||
536 | input siclk; | |
537 | input soclk; | |
538 | ||
539 | output [0:0] dout; | |
540 | output scan_out; | |
541 | assign fdin[0:0] = din[0:0]; | |
542 | ||
543 | ||
544 | ||
545 | ||
546 | ||
547 | ||
548 | dff #(1) d0_0 ( | |
549 | .l1clk(l1clk), | |
550 | .siclk(siclk), | |
551 | .soclk(soclk), | |
552 | .d(fdin[0:0]), | |
553 | .si(scan_in), | |
554 | .so(scan_out), | |
555 | .q(dout[0:0]) | |
556 | ); | |
557 | ||
558 | ||
559 | ||
560 | ||
561 | ||
562 | ||
563 | ||
564 | ||
565 | ||
566 | ||
567 | ||
568 | ||
569 | endmodule | |
570 | ||
571 | ||
572 | ||
573 | ||
574 | ||
575 | ||
576 | ||
577 | ||
578 | ||
579 | ||
580 | ||
581 | ||
582 | ||
583 | // any PARAMS parms go into naming of macro | |
584 | ||
585 | module db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_32 ( | |
586 | din, | |
587 | en, | |
588 | l1clk, | |
589 | scan_in, | |
590 | siclk, | |
591 | soclk, | |
592 | dout, | |
593 | scan_out); | |
594 | wire [31:0] fdin; | |
595 | wire [30:0] so; | |
596 | ||
597 | input [31:0] din; | |
598 | input en; | |
599 | input l1clk; | |
600 | input scan_in; | |
601 | ||
602 | ||
603 | input siclk; | |
604 | input soclk; | |
605 | ||
606 | output [31:0] dout; | |
607 | output scan_out; | |
608 | assign fdin[31:0] = (din[31:0] & {32{en}}) | (dout[31:0] & ~{32{en}}); | |
609 | ||
610 | ||
611 | ||
612 | ||
613 | ||
614 | ||
615 | dff #(32) d0_0 ( | |
616 | .l1clk(l1clk), | |
617 | .siclk(siclk), | |
618 | .soclk(soclk), | |
619 | .d(fdin[31:0]), | |
620 | .si({scan_in,so[30:0]}), | |
621 | .so({so[30:0],scan_out}), | |
622 | .q(dout[31:0]) | |
623 | ); | |
624 | ||
625 | ||
626 | ||
627 | ||
628 | ||
629 | ||
630 | ||
631 | ||
632 | ||
633 | ||
634 | ||
635 | ||
636 | endmodule | |
637 | ||
638 | ||
639 | ||
640 | ||
641 | ||
642 | ||
643 | ||
644 | ||
645 | ||
646 | ||
647 | ||
648 | ||
649 | ||
650 | // any PARAMS parms go into naming of macro | |
651 | ||
652 | module db1_ucbbusin4_ctl_msff_ctl_macro__en_1__width_128 ( | |
653 | din, | |
654 | en, | |
655 | l1clk, | |
656 | scan_in, | |
657 | siclk, | |
658 | soclk, | |
659 | dout, | |
660 | scan_out); | |
661 | wire [127:0] fdin; | |
662 | wire [126:0] so; | |
663 | ||
664 | input [127:0] din; | |
665 | input en; | |
666 | input l1clk; | |
667 | input scan_in; | |
668 | ||
669 | ||
670 | input siclk; | |
671 | input soclk; | |
672 | ||
673 | output [127:0] dout; | |
674 | output scan_out; | |
675 | assign fdin[127:0] = (din[127:0] & {128{en}}) | (dout[127:0] & ~{128{en}}); | |
676 | ||
677 | ||
678 | ||
679 | ||
680 | ||
681 | ||
682 | dff #(128) d0_0 ( | |
683 | .l1clk(l1clk), | |
684 | .siclk(siclk), | |
685 | .soclk(soclk), | |
686 | .d(fdin[127:0]), | |
687 | .si({scan_in,so[126:0]}), | |
688 | .so({so[126:0],scan_out}), | |
689 | .q(dout[127:0]) | |
690 | ); | |
691 | ||
692 | ||
693 | ||
694 | ||
695 | ||
696 | ||
697 | ||
698 | ||
699 | ||
700 | ||
701 | ||
702 | ||
703 | endmodule | |
704 | ||
705 | ||
706 | ||
707 | ||
708 | ||
709 | ||
710 | ||
711 | ||
712 | ||
713 | ||
714 | ||
715 | ||
716 | ||
717 | // any PARAMS parms go into naming of macro | |
718 | ||
719 | module db1_ucbbusin4_ctl_l1clkhdr_ctl_macro ( | |
720 | l2clk, | |
721 | l1en, | |
722 | pce_ov, | |
723 | stop, | |
724 | se, | |
725 | l1clk); | |
726 | ||
727 | ||
728 | input l2clk; | |
729 | input l1en; | |
730 | input pce_ov; | |
731 | input stop; | |
732 | input se; | |
733 | output l1clk; | |
734 | ||
735 | ||
736 | ||
737 | ||
738 | ||
739 | cl_sc1_l1hdr_8x c_0 ( | |
740 | ||
741 | ||
742 | .l2clk(l2clk), | |
743 | .pce(l1en), | |
744 | .l1clk(l1clk), | |
745 | .se(se), | |
746 | .pce_ov(pce_ov), | |
747 | .stop(stop) | |
748 | ); | |
749 | ||
750 | ||
751 | ||
752 | endmodule | |
753 | ||
754 | ||
755 | ||
756 | ||
757 | ||
758 | ||
759 | ||
760 |