Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / ncu / rtl / ncu_ssiflow_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: ncu_ssiflow_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 ============================================
35module ncu_ssiflow_ctl (
36 iol2clk,
37 tcu_pce_ov,
38 tcu_clk_stop,
39 tcu_scan_en,
40 tcu_aclk,
41 tcu_bclk,
42 scan_in,
43 scan_out,
44 sck_cntexp,
45 iob_ucb_vld,
46 iob_ucb_data,
47 ucb_iob_stall,
48 rd_req_vld,
49 wr_req_vld,
50 ifill_req_vld,
51 thr_id_in,
52 buf_id_in,
53 size_in,
54 addr_in,
55 data_in,
56 req_acpted,
57 rd_ack_vld,
58 rd_nack_vld,
59 ifill_ack_vld,
60 ifill_nack_vld,
61 thr_id_out,
62 buf_id_out,
63 data_out,
64 ack_busy,
65 int_vld,
66 int_typ,
67 int_thr_id,
68 dev_id,
69 int_stat,
70 int_vec,
71 int_busy,
72 ucb_iob_vld,
73 ucb_iob_data,
74 iob_ucb_stall) ;
75wire indata_buf_vld;
76wire [127:0] indata_buf;
77wire ucb_bus_in_scanin;
78wire ucb_bus_in_scanout;
79wire ucb_iob_stall_a1;
80wire read_pending;
81wire write_pending;
82wire ifill_pending;
83wire buf_full;
84wire rd_buf;
85wire [1:0] buf_head_next;
86wire [1:0] buf_head;
87wire buf_head_next0_n;
88wire buf_head0_n;
89wire buf_head_ff0_scanin;
90wire buf_head_ff0_scanout;
91wire l1clk;
92wire buf_head_ff1_scanin;
93wire buf_head_ff1_scanout;
94wire wr_buf;
95wire [1:0] buf_tail_next;
96wire [1:0] buf_tail;
97wire buf_tail_next0_n;
98wire buf_tail0_n;
99wire buf_tail_ff0_scanin;
100wire buf_tail_ff0_scanout;
101wire buf_tail_ff1_scanin;
102wire buf_tail_ff1_scanout;
103wire buf_full_next;
104wire buf_full_ff_scanin;
105wire buf_full_ff_scanout;
106wire buf_empty_next;
107wire buf_empty_next_n;
108wire buf_empty;
109wire buf_empty_n;
110wire buf_empty_ff_scanin;
111wire buf_empty_ff_scanout;
112wire [117:0] req_in;
113wire [8:0] unconnected_rsvd;
114wire buf0_en;
115wire buf0_ff_scanin;
116wire buf0_ff_scanout;
117wire [117:0] buf0;
118wire buf1_en;
119wire buf1_ff_scanin;
120wire buf1_ff_scanout;
121wire [117:0] buf1;
122wire [117:0] req_out;
123wire ifill_req_vld_nq;
124wire wr_req_vld_nq;
125wire rd_req_vld_nq;
126wire ack_buf_wr;
127wire ack_buf_vld_next;
128wire ack_buf_rd;
129wire ack_buf_vld;
130wire ack_buf_vld_ff_scanin;
131wire ack_buf_vld_ff_scanout;
132wire ack_buf_is_nack_ff_scanin;
133wire ack_buf_is_nack_ff_scanout;
134wire ack_buf_is_nack;
135wire [3:0] ack_typ_out;
136wire [75:0] ack_buf_in;
137wire ack_buf_ff_scanin;
138wire ack_buf_ff_scanout;
139wire [75:0] ack_buf;
140wire [31:0] ack_buf_vec;
141wire int_buf_wr;
142wire int_buf_vld_next;
143wire int_buf_rd;
144wire int_buf_vld;
145wire int_buf_vld_ff_scanin;
146wire int_buf_vld_ff_scanout;
147wire [56:0] int_buf_in;
148wire int_buf_ff_scanin;
149wire int_buf_ff_scanout;
150wire [56:0] int_buf;
151wire [31:0] int_buf_vec;
152wire int_last_rd_ff_scanin;
153wire int_last_rd_ff_scanout;
154wire int_last_rd;
155wire outdata_buf_busy;
156wire outdata_buf_wr;
157wire [127:0] outdata_buf_in;
158wire [31:0] outdata_vec_in;
159wire ucb_bus_out_scanin;
160wire ucb_bus_out_scanout;
161wire siclk;
162wire soclk;
163wire se;
164wire pce_ov;
165wire stop;
166
167
168// Globals
169input iol2clk;
170input tcu_pce_ov;
171input tcu_clk_stop;
172input tcu_scan_en;
173input tcu_aclk;
174input tcu_bclk;
175input scan_in;
176output scan_out;
177input sck_cntexp;
178
179// Request from IO Bridge
180input iob_ucb_vld;
181input [3:0] iob_ucb_data;
182output ucb_iob_stall;
183
184// Request to local unit
185output rd_req_vld;
186output wr_req_vld;
187output ifill_req_vld;
188output [5:0] thr_id_in;
189output [1:0] buf_id_in;
190output [2:0] size_in; // only pertinent to JBI and SPI
191output [39:0] addr_in;
192output [63:0] data_in;
193input req_acpted;
194
195// Ack/Nack from local unit
196input rd_ack_vld;
197input rd_nack_vld;
198input ifill_ack_vld;
199input ifill_nack_vld;
200input [5:0] thr_id_out;
201input [1:0] buf_id_out;
202input [63:0] data_out;
203output ack_busy;
204
205// Interrupt from local unit
206input int_vld;
207input [3:0] int_typ; // interrupt type
208input [5:0] int_thr_id; // interrupt thread ID
209input [8:0] dev_id; // interrupt device ID
210input [31:0] int_stat; // interrupt status
211input [5:0] int_vec; // interrupt vector
212output int_busy;
213
214// Output to IO Bridge
215output ucb_iob_vld;
216output [3:0] ucb_iob_data;
217input iob_ucb_stall;
218
219
220
221
222 // Local signals
223
224
225
226
227
228
229
230
231
232
233////////////////////////////////////////////////////////////////////////
234// Code starts here
235////////////////////////////////////////////////////////////////////////
236ncu_ssiui4_ctl ucb_bus_in (/*autoinst*/
237 // Outputs
238 .stall(ucb_iob_stall), // Templated
239 .indata_buf_vld(indata_buf_vld),
240 .indata_buf(indata_buf[127:0]),
241 // Inputs
242 .scan_in(ucb_bus_in_scanin),
243 .scan_out(ucb_bus_in_scanout),
244 .iol2clk(iol2clk),
245 .tcu_pce_ov(tcu_pce_ov),
246 .tcu_clk_stop(tcu_clk_stop),
247 .tcu_aclk(tcu_aclk),
248 .tcu_bclk(tcu_bclk),
249 .tcu_scan_en(tcu_scan_en),
250 .vld(iob_ucb_vld), // Templated
251 .data(iob_ucb_data[3:0]), // Templated
252 .stall_a1(ucb_iob_stall_a1)); // Templated
253
254
255 /************************************************************
256 * Decode inbound packet type
257 ************************************************************/
258assign read_pending = (indata_buf[3:0] == 4'b0100) & indata_buf_vld;
259
260assign write_pending = (indata_buf[3:0] == 4'b0101) & indata_buf_vld;
261
262assign ifill_pending = (indata_buf[3:0] == 4'b0110) & indata_buf_vld;
263
264assign ucb_iob_stall_a1 = (read_pending | write_pending | ifill_pending) & buf_full;
265
266
267 /************************************************************
268 * Inbound buffer
269 ************************************************************/
270// Head pointer
271assign rd_buf = req_acpted;
272assign buf_head_next[1:0] = rd_buf ? {buf_head[0],buf_head[1]} : buf_head[1:0];
273
274assign buf_head_next0_n = ~buf_head_next[0] ;
275assign buf_head[0] = ~buf_head0_n ;
276ncu_ssiflow_ctl_msff_ctl_macro__width_1 buf_head_ff0
277 (
278 .scan_in(buf_head_ff0_scanin),
279 .scan_out(buf_head_ff0_scanout),
280 .dout (buf_head0_n),
281 .l1clk (l1clk),
282 .din (buf_head_next0_n),
283 .siclk(siclk),
284 .soclk(soclk)
285 );
286
287ncu_ssiflow_ctl_msff_ctl_macro__width_1 buf_head_ff1
288 (
289 .scan_in(buf_head_ff1_scanin),
290 .scan_out(buf_head_ff1_scanout),
291 .dout (buf_head[1]),
292 .l1clk (l1clk),
293 .din (buf_head_next[1]),
294 .siclk(siclk),
295 .soclk(soclk)
296 );
297
298// Tail pointer
299assign wr_buf = (read_pending | write_pending | ifill_pending) & ~buf_full;
300
301assign buf_tail_next[1:0] = wr_buf ? {buf_tail[0], buf_tail[1]} : buf_tail[1:0];
302
303assign buf_tail_next0_n = ~buf_tail_next[0];
304assign buf_tail[0] = ~buf_tail0_n ;
305ncu_ssiflow_ctl_msff_ctl_macro__width_1 buf_tail_ff0
306 (
307 .scan_in(buf_tail_ff0_scanin),
308 .scan_out(buf_tail_ff0_scanout),
309 .dout (buf_tail0_n),
310 .l1clk (l1clk),
311 .din (buf_tail_next0_n),
312 .siclk(siclk),
313 .soclk(soclk)
314 );
315
316ncu_ssiflow_ctl_msff_ctl_macro__width_1 buf_tail_ff1
317 (
318 .scan_in(buf_tail_ff1_scanin),
319 .scan_out(buf_tail_ff1_scanout),
320 .dout (buf_tail[1]),
321 .l1clk (l1clk),
322 .din (buf_tail_next[1]),
323 .siclk(siclk),
324 .soclk(soclk)
325 );
326
327 // Buffer full
328assign buf_full_next = (buf_head_next[1:0] == buf_tail_next[1:0]) & wr_buf;
329ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_1 buf_full_ff
330 (
331 .scan_in(buf_full_ff_scanin),
332 .scan_out(buf_full_ff_scanout),
333 .dout (buf_full),
334 .l1clk (l1clk),
335 .en (rd_buf|wr_buf),
336 .din (buf_full_next),
337 .siclk(siclk),
338 .soclk(soclk)
339 );
340
341// Buffer empty
342assign buf_empty_next = ((buf_head_next[1:0] == buf_tail_next[1:0]) & rd_buf) ;
343assign buf_empty_next_n = ~buf_empty_next ;
344assign buf_empty = ~buf_empty_n;
345ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_1 buf_empty_ff
346 (
347 .scan_in(buf_empty_ff_scanin),
348 .scan_out(buf_empty_ff_scanout),
349 .dout (buf_empty_n),
350 .l1clk (l1clk),
351 .en (rd_buf|wr_buf),
352 .din (buf_empty_next_n),
353 .siclk(siclk),
354 .soclk(soclk)
355 );
356
357assign {req_in[117:54],
358 unconnected_rsvd[8:0],
359 req_in[53:0]} = {indata_buf[127:64],
360 indata_buf[63:55],
361 indata_buf[54:15],
362 indata_buf[14:12],
363 indata_buf[11:10],
364 indata_buf[9:4],
365 ifill_pending,
366 write_pending,
367 read_pending};
368
369 // Buffer 0
370assign buf0_en = buf_tail[0] & wr_buf;
371
372ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_118 buf0_ff
373 (
374 .scan_in(buf0_ff_scanin),
375 .scan_out(buf0_ff_scanout),
376 .dout (buf0[117:0]),
377 .l1clk (l1clk),
378 .en (buf0_en),
379 .din (req_in[117:0]),
380 .siclk(siclk),
381 .soclk(soclk)
382 );
383 // Buffer 1
384assign buf1_en = buf_tail[1] & wr_buf;
385
386ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_118 buf1_ff
387 (
388 .scan_in(buf1_ff_scanin),
389 .scan_out(buf1_ff_scanout),
390 .dout (buf1[117:0]),
391 .l1clk (l1clk),
392 .en (buf1_en),
393 .din (req_in[117:0]),
394 .siclk(siclk),
395 .soclk(soclk)
396 );
397
398assign req_out[117:0] = buf_head[0] ? buf0[117:0] :
399 buf_head[1] ? buf1[117:0] :118'b0 ;
400
401
402 /************************************************************
403 * Inbound interface to local unit
404 ************************************************************/
405assign {data_in[63:0],
406 addr_in[39:0],
407 size_in[2:0],
408 buf_id_in[1:0],
409 thr_id_in[5:0],
410 ifill_req_vld_nq,
411 wr_req_vld_nq,
412 rd_req_vld_nq} = req_out[117:0];
413
414assign rd_req_vld = rd_req_vld_nq & ~buf_empty;
415assign wr_req_vld = wr_req_vld_nq & ~buf_empty;
416assign ifill_req_vld = ifill_req_vld_nq & ~buf_empty & sck_cntexp;
417
418
419 /************************************************************
420 * Outbound Ack/Nack
421 ************************************************************/
422assign ack_buf_wr = rd_ack_vld | rd_nack_vld | ifill_ack_vld | ifill_nack_vld;
423
424assign ack_buf_vld_next = ack_buf_wr ? 1'b1 :
425 ack_buf_rd ? 1'b0 : ack_buf_vld;
426
427ncu_ssiflow_ctl_msff_ctl_macro__width_1 ack_buf_vld_ff
428 (
429 .scan_in(ack_buf_vld_ff_scanin),
430 .scan_out(ack_buf_vld_ff_scanout),
431 .dout (ack_buf_vld),
432 .l1clk (l1clk),
433 .din (ack_buf_vld_next),
434 .siclk(siclk),
435 .soclk(soclk)
436 );
437
438ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_1 ack_buf_is_nack_ff
439 (
440 .scan_in(ack_buf_is_nack_ff_scanin),
441 .scan_out(ack_buf_is_nack_ff_scanout),
442 .dout (ack_buf_is_nack),
443 .l1clk (l1clk),
444 .en (ack_buf_wr),
445 .din (rd_nack_vld|ifill_nack_vld),
446 .siclk(siclk),
447 .soclk(soclk)
448 );
449
450assign ack_typ_out[3:0] = rd_ack_vld ? 4'b0001: //READ_ACK
451 rd_nack_vld ? 4'b0000: //READ_NACK
452 ifill_ack_vld ? 4'b0011: //IFILL_ACK
453 4'b0111; //IFILL_NACK
454
455assign ack_buf_in[75:0] = {data_out[63:0],
456 buf_id_out[1:0],
457 thr_id_out[5:0],
458 ack_typ_out[3:0]};
459
460ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_76 ack_buf_ff
461 (
462 .scan_in(ack_buf_ff_scanin),
463 .scan_out(ack_buf_ff_scanout),
464 .dout (ack_buf[75:0]),
465 .l1clk (l1clk),
466 .en (ack_buf_wr),
467 .din (ack_buf_in[75:0]),
468 .siclk(siclk),
469 .soclk(soclk)
470 );
471
472assign ack_buf_vec[31:0] = ack_buf_is_nack ? {16'h0000,16'hffff} : {32'hffff_ffff} ;
473
474assign ack_busy = ack_buf_vld;
475
476
477 /************************************************************
478 * Outbound Interrupt
479 ************************************************************/
480 // Assertion: int_buf_wr shoudn't be asserted if int_buf_busy
481assign int_buf_wr = int_vld;
482
483assign int_buf_vld_next = int_buf_wr ? 1'b1 :
484 int_buf_rd ? 1'b0 : int_buf_vld;
485
486ncu_ssiflow_ctl_msff_ctl_macro__width_1 int_buf_vld_ff
487 (
488 .scan_in(int_buf_vld_ff_scanin),
489 .scan_out(int_buf_vld_ff_scanout),
490 .dout (int_buf_vld),
491 .l1clk (l1clk),
492 .din (int_buf_vld_next),
493 .siclk(siclk),
494 .soclk(soclk)
495 );
496
497assign int_buf_in[56:0] = { int_vec[5:0],
498 int_stat[31:0],
499 dev_id[8:0],
500 int_thr_id[5:0],
501 int_typ[3:0]};
502
503ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_57 int_buf_ff
504 (
505 .scan_in(int_buf_ff_scanin),
506 .scan_out(int_buf_ff_scanout),
507 .dout (int_buf[56:0]),
508 .l1clk (l1clk),
509 .en (int_buf_wr),
510 .din (int_buf_in[56:0]),
511 .siclk(siclk),
512 .soclk(soclk)
513 );
514
515assign int_buf_vec[31:0] = {16'h0000,16'hffff} ;
516
517
518assign int_busy = int_buf_vld;
519
520
521 /************************************************************
522 * Outbound ack/interrupt Arbitration
523 ************************************************************/
524ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_1 int_last_rd_ff
525 (
526 .scan_in(int_last_rd_ff_scanin),
527 .scan_out(int_last_rd_ff_scanout),
528 .dout (int_last_rd),
529 .l1clk (l1clk),
530 .en (ack_buf_rd|int_buf_rd),
531 .din (int_buf_rd),
532 .siclk(siclk),
533 .soclk(soclk)
534 );
535
536assign ack_buf_rd = ~outdata_buf_busy & ack_buf_vld &
537 (~int_buf_vld | int_last_rd);
538
539assign int_buf_rd = ~outdata_buf_busy & int_buf_vld &
540 (~ack_buf_vld | ~int_last_rd);
541
542assign outdata_buf_wr = ack_buf_rd | int_buf_rd;
543
544assign outdata_buf_in[127:0] = ack_buf_rd ? {ack_buf[75:12],
545 9'b0,
546 40'b0,
547 3'b0,
548 ack_buf[11:10],
549 ack_buf[9:4],
550 ack_buf[3:0]}:
551 {64'b0,
552 7'b0,
553 int_buf[56:51],
554 int_buf[50:19],
555 int_buf[18:10],
556 int_buf[9:4],
557 int_buf[3:0]};
558
559assign outdata_vec_in[31:0] = ack_buf_rd ? ack_buf_vec[31:0] : int_buf_vec[31:0];
560
561
562ncu_ssiuo4_ctl ucb_bus_out (/*autoinst*/
563 // Outputs
564 .vld(ucb_iob_vld), // Templated
565 .data(ucb_iob_data[3:0]), // Templated
566 .outdata_buf_busy(outdata_buf_busy),
567 // Inputs
568 .scan_in(ucb_bus_out_scanin),
569 .scan_out(ucb_bus_out_scanout),
570 .iol2clk(iol2clk),
571 .tcu_pce_ov(tcu_pce_ov),
572 .tcu_clk_stop(tcu_clk_stop),
573 .tcu_aclk(tcu_aclk),
574 .tcu_bclk(tcu_bclk),
575 .tcu_scan_en(tcu_scan_en),
576 .stall(iob_ucb_stall), // Templated
577 .outdata_buf_in(outdata_buf_in[127:0]),
578 .outdata_vec_in(outdata_vec_in[31:0]), // Templated
579 .outdata_buf_wr(outdata_buf_wr));
580
581
582
583
584/**** adding clock header ****/
585ncu_ssiflow_ctl_l1clkhdr_ctl_macro clkgen (
586 .l2clk (iol2clk),
587 .l1en (1'b1),
588 .l1clk (l1clk),
589 .pce_ov(pce_ov),
590 .stop(stop),
591 .se(se)
592 );
593
594/*** building tcu port ***/
595assign siclk = tcu_aclk;
596assign soclk = tcu_bclk;
597assign se = tcu_scan_en;
598assign pce_ov = tcu_pce_ov;
599assign stop = tcu_clk_stop;
600
601// fixscan start:
602assign ucb_bus_in_scanin = scan_in ;
603assign buf_head_ff0_scanin = ucb_bus_in_scanout ;
604assign buf_head_ff1_scanin = buf_head_ff0_scanout ;
605assign buf_tail_ff0_scanin = buf_head_ff1_scanout ;
606assign buf_tail_ff1_scanin = buf_tail_ff0_scanout ;
607assign buf_full_ff_scanin = buf_tail_ff1_scanout ;
608assign buf_empty_ff_scanin = buf_full_ff_scanout ;
609assign buf0_ff_scanin = buf_empty_ff_scanout ;
610assign buf1_ff_scanin = buf0_ff_scanout ;
611assign ack_buf_vld_ff_scanin = buf1_ff_scanout ;
612assign ack_buf_is_nack_ff_scanin = ack_buf_vld_ff_scanout ;
613assign ack_buf_ff_scanin = ack_buf_is_nack_ff_scanout;
614assign int_buf_vld_ff_scanin = ack_buf_ff_scanout ;
615assign int_buf_ff_scanin = int_buf_vld_ff_scanout ;
616assign int_last_rd_ff_scanin = int_buf_ff_scanout ;
617assign ucb_bus_out_scanin = int_last_rd_ff_scanout ;
618assign scan_out = ucb_bus_out_scanout ;
619// fixscan end:
620endmodule
621
622// Local Variables:
623// verilog-library-directories:(".")
624// End:
625
626
627
628// any PARAMS parms go into naming of macro
629
630module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_1 (
631 din,
632 en,
633 l1clk,
634 scan_in,
635 siclk,
636 soclk,
637 dout,
638 scan_out);
639wire [0:0] fdin;
640
641 input [0:0] din;
642 input en;
643 input l1clk;
644 input scan_in;
645
646
647 input siclk;
648 input soclk;
649
650 output [0:0] dout;
651 output scan_out;
652assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}});
653
654
655
656
657
658
659dff #(1) d0_0 (
660.l1clk(l1clk),
661.siclk(siclk),
662.soclk(soclk),
663.d(fdin[0:0]),
664.si(scan_in),
665.so(scan_out),
666.q(dout[0:0])
667);
668
669
670
671
672
673
674
675
676
677
678
679
680endmodule
681
682
683
684
685
686
687
688
689
690
691
692
693
694// any PARAMS parms go into naming of macro
695
696module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_4 (
697 din,
698 en,
699 l1clk,
700 scan_in,
701 siclk,
702 soclk,
703 dout,
704 scan_out);
705wire [3:0] fdin;
706wire [2:0] so;
707
708 input [3:0] din;
709 input en;
710 input l1clk;
711 input scan_in;
712
713
714 input siclk;
715 input soclk;
716
717 output [3:0] dout;
718 output scan_out;
719assign fdin[3:0] = (din[3:0] & {4{en}}) | (dout[3:0] & ~{4{en}});
720
721
722
723
724
725
726dff #(4) d0_0 (
727.l1clk(l1clk),
728.siclk(siclk),
729.soclk(soclk),
730.d(fdin[3:0]),
731.si({scan_in,so[2:0]}),
732.so({so[2:0],scan_out}),
733.q(dout[3:0])
734);
735
736
737
738
739
740
741
742
743
744
745
746
747endmodule
748
749
750
751
752
753
754
755
756
757
758
759
760
761// any PARAMS parms go into naming of macro
762
763module ncu_ssiflow_ctl_msff_ctl_macro__width_1 (
764 din,
765 l1clk,
766 scan_in,
767 siclk,
768 soclk,
769 dout,
770 scan_out);
771wire [0:0] fdin;
772
773 input [0:0] din;
774 input l1clk;
775 input scan_in;
776
777
778 input siclk;
779 input soclk;
780
781 output [0:0] dout;
782 output scan_out;
783assign fdin[0:0] = din[0:0];
784
785
786
787
788
789
790dff #(1) d0_0 (
791.l1clk(l1clk),
792.siclk(siclk),
793.soclk(soclk),
794.d(fdin[0:0]),
795.si(scan_in),
796.so(scan_out),
797.q(dout[0:0])
798);
799
800
801
802
803
804
805
806
807
808
809
810
811endmodule
812
813
814
815
816
817
818
819
820
821
822
823
824
825// any PARAMS parms go into naming of macro
826
827module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_32 (
828 din,
829 en,
830 l1clk,
831 scan_in,
832 siclk,
833 soclk,
834 dout,
835 scan_out);
836wire [31:0] fdin;
837wire [30:0] so;
838
839 input [31:0] din;
840 input en;
841 input l1clk;
842 input scan_in;
843
844
845 input siclk;
846 input soclk;
847
848 output [31:0] dout;
849 output scan_out;
850assign fdin[31:0] = (din[31:0] & {32{en}}) | (dout[31:0] & ~{32{en}});
851
852
853
854
855
856
857dff #(32) d0_0 (
858.l1clk(l1clk),
859.siclk(siclk),
860.soclk(soclk),
861.d(fdin[31:0]),
862.si({scan_in,so[30:0]}),
863.so({so[30:0],scan_out}),
864.q(dout[31:0])
865);
866
867
868
869
870
871
872
873
874
875
876
877
878endmodule
879
880
881
882
883
884
885
886
887
888
889
890
891
892// any PARAMS parms go into naming of macro
893
894module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_128 (
895 din,
896 en,
897 l1clk,
898 scan_in,
899 siclk,
900 soclk,
901 dout,
902 scan_out);
903wire [127:0] fdin;
904wire [126:0] so;
905
906 input [127:0] din;
907 input en;
908 input l1clk;
909 input scan_in;
910
911
912 input siclk;
913 input soclk;
914
915 output [127:0] dout;
916 output scan_out;
917assign fdin[127:0] = (din[127:0] & {128{en}}) | (dout[127:0] & ~{128{en}});
918
919
920
921
922
923
924dff #(128) d0_0 (
925.l1clk(l1clk),
926.siclk(siclk),
927.soclk(soclk),
928.d(fdin[127:0]),
929.si({scan_in,so[126:0]}),
930.so({so[126:0],scan_out}),
931.q(dout[127:0])
932);
933
934
935
936
937
938
939
940
941
942
943
944
945endmodule
946
947
948
949
950
951
952
953
954
955
956
957
958
959// any PARAMS parms go into naming of macro
960
961module ncu_ssiflow_ctl_l1clkhdr_ctl_macro (
962 l2clk,
963 l1en,
964 pce_ov,
965 stop,
966 se,
967 l1clk);
968
969
970 input l2clk;
971 input l1en;
972 input pce_ov;
973 input stop;
974 input se;
975 output l1clk;
976
977
978
979
980
981cl_sc1_l1hdr_8x c_0 (
982
983
984 .l2clk(l2clk),
985 .pce(l1en),
986 .l1clk(l1clk),
987 .se(se),
988 .pce_ov(pce_ov),
989 .stop(stop)
990);
991
992
993
994endmodule
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008// any PARAMS parms go into naming of macro
1009
1010module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_118 (
1011 din,
1012 en,
1013 l1clk,
1014 scan_in,
1015 siclk,
1016 soclk,
1017 dout,
1018 scan_out);
1019wire [117:0] fdin;
1020wire [116:0] so;
1021
1022 input [117:0] din;
1023 input en;
1024 input l1clk;
1025 input scan_in;
1026
1027
1028 input siclk;
1029 input soclk;
1030
1031 output [117:0] dout;
1032 output scan_out;
1033assign fdin[117:0] = (din[117:0] & {118{en}}) | (dout[117:0] & ~{118{en}});
1034
1035
1036
1037
1038
1039
1040dff #(118) d0_0 (
1041.l1clk(l1clk),
1042.siclk(siclk),
1043.soclk(soclk),
1044.d(fdin[117:0]),
1045.si({scan_in,so[116:0]}),
1046.so({so[116:0],scan_out}),
1047.q(dout[117:0])
1048);
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061endmodule
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075// any PARAMS parms go into naming of macro
1076
1077module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_76 (
1078 din,
1079 en,
1080 l1clk,
1081 scan_in,
1082 siclk,
1083 soclk,
1084 dout,
1085 scan_out);
1086wire [75:0] fdin;
1087wire [74:0] so;
1088
1089 input [75:0] din;
1090 input en;
1091 input l1clk;
1092 input scan_in;
1093
1094
1095 input siclk;
1096 input soclk;
1097
1098 output [75:0] dout;
1099 output scan_out;
1100assign fdin[75:0] = (din[75:0] & {76{en}}) | (dout[75:0] & ~{76{en}});
1101
1102
1103
1104
1105
1106
1107dff #(76) d0_0 (
1108.l1clk(l1clk),
1109.siclk(siclk),
1110.soclk(soclk),
1111.d(fdin[75:0]),
1112.si({scan_in,so[74:0]}),
1113.so({so[74:0],scan_out}),
1114.q(dout[75:0])
1115);
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128endmodule
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142// any PARAMS parms go into naming of macro
1143
1144module ncu_ssiflow_ctl_msff_ctl_macro__en_1__width_57 (
1145 din,
1146 en,
1147 l1clk,
1148 scan_in,
1149 siclk,
1150 soclk,
1151 dout,
1152 scan_out);
1153wire [56:0] fdin;
1154wire [55:0] so;
1155
1156 input [56:0] din;
1157 input en;
1158 input l1clk;
1159 input scan_in;
1160
1161
1162 input siclk;
1163 input soclk;
1164
1165 output [56:0] dout;
1166 output scan_out;
1167assign fdin[56:0] = (din[56:0] & {57{en}}) | (dout[56:0] & ~{57{en}});
1168
1169
1170
1171
1172
1173
1174dff #(57) d0_0 (
1175.l1clk(l1clk),
1176.siclk(siclk),
1177.soclk(soclk),
1178.d(fdin[56:0]),
1179.si({scan_in,so[55:0]}),
1180.so({so[55:0],scan_out}),
1181.q(dout[56:0])
1182);
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195endmodule
1196
1197
1198
1199// any PARAMS parms go into naming of macro
1200
1201module ncu_ssiflow_ctl_msff_ctl_macro__width_32 (
1202 din,
1203 l1clk,
1204 scan_in,
1205 siclk,
1206 soclk,
1207 dout,
1208 scan_out);
1209wire [31:0] fdin;
1210wire [30:0] so;
1211
1212 input [31:0] din;
1213 input l1clk;
1214 input scan_in;
1215
1216
1217 input siclk;
1218 input soclk;
1219
1220 output [31:0] dout;
1221 output scan_out;
1222assign fdin[31:0] = din[31:0];
1223
1224
1225
1226
1227
1228
1229dff #(32) d0_0 (
1230.l1clk(l1clk),
1231.siclk(siclk),
1232.soclk(soclk),
1233.d(fdin[31:0]),
1234.si({scan_in,so[30:0]}),
1235.so({so[30:0],scan_out}),
1236.q(dout[31:0])
1237);
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250endmodule
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264// any PARAMS parms go into naming of macro
1265
1266module ncu_ssiflow_ctl_msff_ctl_macro__width_128 (
1267 din,
1268 l1clk,
1269 scan_in,
1270 siclk,
1271 soclk,
1272 dout,
1273 scan_out);
1274wire [127:0] fdin;
1275wire [126:0] so;
1276
1277 input [127:0] din;
1278 input l1clk;
1279 input scan_in;
1280
1281
1282 input siclk;
1283 input soclk;
1284
1285 output [127:0] dout;
1286 output scan_out;
1287assign fdin[127:0] = din[127:0];
1288
1289
1290
1291
1292
1293
1294dff #(128) d0_0 (
1295.l1clk(l1clk),
1296.siclk(siclk),
1297.soclk(soclk),
1298.d(fdin[127:0]),
1299.si({scan_in,so[126:0]}),
1300.so({so[126:0],scan_out}),
1301.q(dout[127:0])
1302);
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315endmodule
1316
1317
1318
1319
1320
1321
1322
1323