Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / rst / rtl / rst_ucbbusin4_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: rst_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 ASSERT 1'b0 // For active low signal.
36`define DEASSERT 1'b1 // For active low signal.
37
38`define INFO 20
39 // (Origin:)
40`define IOB_CREG_RESET_GEN 40'h89_0000_0808 //Adr of RESET_GEN reg (Fire.)
41`define IOB_CREG_RESET_SOURCE 40'h89_0000_0818 //Adr of RESET_SOURCE reg (Fire.)
42`define IOB_CREG_SSYSRESET 40'h89_0000_0838 //Adr of SSYS_RESET reg (N1.)
43`define IOB_CREG_RESETSTAT 40'h89_0000_0810 //Adr of RSET_STAT reg (N1.)
44`define IOB_CREG_CCU_TIME 40'h89_0000_0860 //Adr of CCU_TIME reg (N2.)
45`define IOB_CREG_LOCK_TIME 40'h89_0000_0870 //Adr of LOCK_TIME reg (N2.)
46`define IOB_CREG_PROP_TIME 40'h89_0000_0880 //Adr of PROP_TIME reg (N2.)
47`define IOB_CREG_NIU_TIME 40'h89_0000_0890 //Adr of NIU_TIME reg (N2.)
48`define IOB_CREG_RESET_FEE 40'h89_0000_0820 //Adr of RESET_FEE reg (N2.)
49//________________________________________________________________
50
51`define RST_FSM_WIDTH 33
52`define RST_INIT_STATE 33'h0_0000_0001
53`define POR1_LOCK_TIME 33'h0_0000_0002
54`define POR1_ARST_TIME 33'h0_0000_0004
55`define POR1_SYNC_STABLE 33'h0_0000_0008
56`define POR1_ASICFLUSH_STOP_ACK 33'h0_0000_0010
57`define POR1_NIU_TIME 33'h0_0000_0020
58`define POR1_FLUSH_STOP_ACK 33'h0_0000_0040
59`define POR1_BISX_DONE 33'h0_0000_0080
60`define POR2_FLUSH_INIT_ACK 33'h0_0000_0100
61`define POR2_LOCK_TIME 33'h0_0000_0200
62`define POR2_FLUSH_STOP_ACK 33'h0_0000_0400
63`define POR2_EFU_DONE 33'h0_0000_0800
64`define POR2_ASSERT_RUN 33'h0_0000_1000
65`define POR2_UNPARK_THREAD 33'h0_0000_2000
66`define WMR1_WMR_GEN 33'h0_0000_4000
67`define WMR1_DEASSERT_RUN 33'h0_0000_8000
68`define WMR1_FLUSH_INIT_ACK 33'h0_0001_0000
69`define WMR1_PRE_PLL1 33'h0_0002_0000
70`define WMR1_PRE_PLL2 33'h0_0004_0000
71`define WMR1_CCU_PLL 33'h0_0008_0000
72`define WMR1_LOCK_TIME 33'h0_0010_0000
73`define WMR1_ARST_TIME 33'h0_0020_0000
74`define WMR1_PROP_TIME 33'h0_0040_0000
75`define WMR1_SYNC_STABLE 33'h0_0080_0000
76`define WMR1_FLUSH_STOP_ACK 33'h0_0100_0000
77`define WMR1_BISX_DONE 33'h0_0200_0000
78`define WMR2_FLUSH_INIT_ACK 33'h0_0400_0000
79`define WMR2_PROP_TIME 33'h0_0800_0000
80`define WMR2_FLUSH_STOP_ACK 33'h0_1000_0000
81`define WMR2_NIU_TIME 33'h1_0000_0000
82`define WMR2_ASSERT_RUN 33'h0_2000_0000
83`define WMR2_UNPARK_THREAD 33'h0_4000_0000
84`define RST_ARBITER 33'h0_8000_0000
85
86`define XIR_IDLE 2'h1
87`define XIR_DONE 2'h2
88
89`define DMU_IDLE 3'h1
90`define DMU_TIME1 3'h2
91`define DMU_TIME2 3'h4
92
93`define NIU_IDLE 2'h1
94`define NIU_TIME 2'h2
95//________________________________________________________________
96
97// Already taken addresses, in address order:
98// sort -t "'" -k 2 /home/jl148824/project/NCU/include/iop.h:
99
100//`define IOB_CREG_INTMAN 32'h00000000
101//`define IOB_CREG_INTSTAT 32'h00000000
102//`define IOB_CREG_INTCTL 32'h00000400
103//`define IOB_CREG_MDATA0 32'h00000400
104//`define IOB_CREG_MDATA1 32'h00000500
105//`define IOB_CREG_MDATA0_ALIAS 32'h00000600
106//`define IOB_CREG_MDATA1_ALIAS 32'h00000700
107//`define IOB_CREG_INTVECDISP 32'h00000800
108// 32'h00000808 // Adr of RESET_GEN reg.
109// Bill Bryg removed the CHIP_RESET reg from the Niagara 1 spec Feb 4 '03.
110//`define IOB_CREG_RESETSTAT 32'h00000810 // Adr of RSET_STAT reg.
111//`define IOB_CREG_SERNUM 32'h00000820
112//`define IOB_CREG_TMSTATCTRL 32'h00000828
113//`define IOB_CREG_COREAVAIL 32'h00000830
114//`define IOB_CREG_SSYSRESET 32'h00000838 // Adr of SSYS_RESET reg.
115//`define IOB_CREG_FUSESTAT 32'h00000840
116//`define IOB_CREG_MARGIN 32'h00000850
117//`define IOB_CREG_MBUSY 32'h00000900
118//`define IOB_CREG_JINTV 32'h00000a00
119//`define IOB_CREG_MBUSY_ALIAS 32'h00000b00
120//`define IOB_CREG_DBG_IOBVIS_CTRL 32'h00001000
121//`define IOB_CREG_DBG_L2VIS_CTRL 32'h00001800
122//`define IOB_CREG_DBG_L2VIS_MASKA 32'h00001820
123//`define IOB_CREG_DBG_L2VIS_MASKB 32'h00001828
124//`define IOB_CREG_DBG_L2VIS_CMPA 32'h00001830
125//`define IOB_CREG_DBG_L2VIS_CMPB 32'h00001838
126//`define IOB_CREG_DBG_L2VIS_TRIG 32'h00001840
127//`define IOB_CREG_DBG_ENET_CTRL 32'h00002000
128//`define IOB_CREG_DBG_ENET_IDLEVAL 32'h00002008
129//`define IOB_CREG_DBG_JBUS_CTRL 32'h00002100
130//`define IOB_CREG_DBG_JBUS_LO_MASK0 32'h00002140
131//`define IOB_CREG_DBG_JBUS_LO_CMP0 32'h00002148
132//`define IOB_CREG_DBG_JBUS_LO_CNT0 32'h00002150
133//`define IOB_CREG_DBG_JBUS_LO_MASK1 32'h00002160
134//`define IOB_CREG_DBG_JBUS_LO_CMP1 32'h00002168
135//`define IOB_CREG_DBG_JBUS_LO_CNT1 32'h00002170
136//`define IOB_CREG_DBG_JBUS_HI_MASK0 32'h00002180
137//`define IOB_CREG_DBG_JBUS_HI_CMP0 32'h00002188
138//`define IOB_CREG_DBG_JBUS_HI_CNT0 32'h00002190
139//`define IOB_CREG_DBG_JBUS_HI_MASK1 32'h000021a0
140//`define IOB_CREG_DBG_JBUS_HI_CMP1 32'h000021a8
141//`define IOB_CREG_DBG_JBUS_HI_CNT1 32'h000021b0
142//________________________________________________________________
143
144// Verilog define statements for:
145// rst_ucbbusin4_ctl.sv and:
146// rst_ucbbusout4_ctl.sv:
147
148`define UCB_BUS_WIDTH 4
149`define UCB_BUS_WIDTH_M1 3
150`define CYC_NUM 32
151`define CYC_NUM_M1 31
152
153`define RST_UCB_DATA_WIDTH 16
154// Width of:
155// data_in_io ;// Convert from io to cmp to sys.
156// data_in_sys ;// Convert from io to cmp to sys.
157// data_out_sys2 ;// Convert from sys to cmp.
158// data_out_cmp2 ;// Convert from sys to cmp to io.
159// The following stay 64 bits wide:
160// data_in ;// Convert from io to cmp to sys.
161// data_out ;// Converted from cmp to io.
162// If you modify RST_UCB_DATA_WIDTH, adjust the width of x'b0 in
163// the following two concatenations:
164// assign data_out [ 63:0] =
165// assign data_out_sys[`RST_UCB_DATA_WIDTH-1:0] =
166
167`define RST_TIME_WIDTH 16
168// Width of:
169// lock_time_addr ? {32'b0, lock_time_q [31:0] }:// LOCK_TIME
170// prop_time_addr ? {32'b0, prop_time_q [31:0] }:// PROP_TIME
171// niu_time_addr ? {32'b0, niu_time_q [31:0] }:// NIU_TIME
172// msff_ctl_macro lock_time_ff (width=32,en=1,clr_=1)
173// msff_ctl_macro lock_count_ff (width=32,en=0,clr_=1)
174// msff_ctl_macro prop_time_ff (width=32,en=1,clr_=1)
175// msff_ctl_macro prop_count_ff (width=32,en=0,clr_=1)
176// msff_ctl_macro niu_time_ff (width=32,en=1,clr_=1)
177// msff_ctl_macro niu_count_ff (width=32,en=0,clr_=1)
178// msff_ctl_macro dmu_time_ff (width=32,en=1,clr_=1)
179// msff_ctl_macro dmu_count_ff (width=32,en=0,clr_=1)
180
181
182// `define UCB_BUS_WIDTH 4
183// `define UCB_BUS_WIDTH_M1 3
184// `define CYC_NUM 32
185// `define CYC_NUM_M1 31
186
187module rst_ucbbusin4_ctl (
188 iol2clk,
189 ucb_clr_io_,
190 scan_in,
191 scan_out,
192 tcu_pce_ov,
193 tcu_clk_stop,
194 tcu_aclk,
195 tcu_bclk,
196 tcu_scan_en,
197 vld,
198 data,
199 stall,
200 indata_buf_vld,
201 indata_buf,
202 stall_a1) ;
203wire stall_d1_;
204wire stall_d1;
205wire vld_d1_ff_scanin;
206wire vld_d1_ff_scanout;
207wire vld_d1;
208wire l1clk;
209wire data_d1_ff_scanin;
210wire data_d1_ff_scanout;
211wire [3:0] data_d1;
212wire stall_ff_scanin;
213wire stall_ff_scanout;
214wire stall_d1_ff_scanin;
215wire stall_d1_ff_scanout;
216wire skid_buf0_en;
217wire vld_buf0_ff_scanin;
218wire vld_buf0_ff_scanout;
219wire vld_buf0;
220wire data_buf0_ff_scanin;
221wire data_buf0_ff_scanout;
222wire [3:0] data_buf0;
223wire skid_buf1_en_ff_scanin;
224wire skid_buf1_en_ff_scanout;
225wire skid_buf1_en;
226wire vld_buf1_ff_scanin;
227wire vld_buf1_ff_scanout;
228wire vld_buf1;
229wire data_buf1_ff_scanin;
230wire data_buf1_ff_scanout;
231wire [3:0] data_buf1;
232wire skid_buf0_sel;
233wire skid_buf1_sel_ff_scanin;
234wire skid_buf1_sel_ff_scanout;
235wire skid_buf1_sel;
236wire vld_mux;
237wire [3:0] data_mux;
238wire [31:0] indata_vec_next;
239wire [31:0] indata_vec;
240wire stall_a1_;
241wire indata_vec_ff_scanin;
242wire indata_vec_ff_scanout;
243wire [127:0] indata_buf_next;
244wire indata_buf_ff_scanin;
245wire indata_buf_ff_scanout;
246wire indata_vec0_d1_ff_scanin;
247wire indata_vec0_d1_ff_scanout;
248wire indata_vec0_d1;
249wire siclk;
250wire soclk;
251wire pce_ov;
252wire stop;
253wire se;
254
255
256////////////////////////////////////////////////////////////////////////
257// Signal declarations
258////////////////////////////////////////////////////////////////////////
259// Global interface
260input iol2clk;
261input ucb_clr_io_; //BP 8-19-05
262input scan_in;
263output scan_out;
264input tcu_pce_ov;
265input tcu_clk_stop;
266input tcu_aclk ;
267input tcu_bclk ;
268input tcu_scan_en ;
269
270// UCB bus interface
271input vld;
272input [`UCB_BUS_WIDTH_M1 :0] data;
273output stall;
274
275
276// Local interface
277output indata_buf_vld;
278output [127:0] indata_buf;
279input stall_a1;
280
281
282// Internal signals
283
284////////////////////////////////////////////////////////////////////////
285// Code starts here
286////////////////////////////////////////////////////////////////////////
287/************************************************************
288 * UCB bus interface flops
289 * This is to make signals going between IOB and UCB flop-to-flop
290 * to improve timing.
291 ************************************************************/
292assign stall_d1_ = ~stall_d1;
293rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_1 vld_d1_ff
294 (
295 .scan_in(vld_d1_ff_scanin),
296 .scan_out(vld_d1_ff_scanout),
297 .dout (vld_d1),
298 .clr_ (ucb_clr_io_), //BP 8-19-05
299 .l1clk (l1clk),
300 .en (stall_d1_),
301 .din (vld),
302 .siclk(siclk),
303 .soclk(soclk)
304 );
305
306rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_4 data_d1_ff
307 (
308 .scan_in(data_d1_ff_scanin),
309 .scan_out(data_d1_ff_scanout),
310 .dout (data_d1[`UCB_BUS_WIDTH_M1:0]),
311 .clr_ (ucb_clr_io_), //BP 8-19-05
312 .l1clk (l1clk),
313 .en (stall_d1_),
314 .din (data[`UCB_BUS_WIDTH_M1:0]),
315 .siclk(siclk),
316 .soclk(soclk)
317 );
318
319rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__width_1 stall_ff
320 (
321 .scan_in(stall_ff_scanin),
322 .scan_out(stall_ff_scanout),
323 .dout (stall),
324 .clr_ (ucb_clr_io_), //BP 8-19-05
325 .l1clk (l1clk),
326 .din (stall_a1),
327 .siclk(siclk),
328 .soclk(soclk)
329 );
330
331rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__width_1 stall_d1_ff
332 (
333 .scan_in(stall_d1_ff_scanin),
334 .scan_out(stall_d1_ff_scanout),
335 .dout (stall_d1),
336 .clr_ (ucb_clr_io_), //BP 8-19-05
337 .l1clk (l1clk),
338 .din (stall),
339 .siclk(siclk),
340 .soclk(soclk)
341 );
342
343
344/************************************************************
345 * Skid buffer
346 * We need a two deep skid buffer to handle stalling.
347 ************************************************************/
348// Assertion: stall has to be deasserted for more than 1 cycle
349// ie time between two separate stalls has to be
350// at least two cycles. Otherwise, contents from
351// skid buffer will be lost.
352
353// Buffer 0
354assign skid_buf0_en = stall_a1 & ~stall;
355
356rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_1 vld_buf0_ff
357 (
358 .scan_in(vld_buf0_ff_scanin),
359 .scan_out(vld_buf0_ff_scanout),
360 .dout (vld_buf0),
361 .clr_ (ucb_clr_io_), //BP 8-19-05
362 .l1clk (l1clk),
363 .en (skid_buf0_en),
364 .din (vld_d1),
365 .siclk(siclk),
366 .soclk(soclk)
367 );
368
369rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_4 data_buf0_ff
370 (
371 .scan_in(data_buf0_ff_scanin),
372 .scan_out(data_buf0_ff_scanout),
373 .dout (data_buf0[`UCB_BUS_WIDTH_M1 :0]),
374 .clr_ (ucb_clr_io_), //BP 8-19-05
375 .l1clk (l1clk),
376 .en (skid_buf0_en),
377 .din (data_d1[`UCB_BUS_WIDTH_M1 :0]),
378 .siclk(siclk),
379 .soclk(soclk)
380 );
381
382// Buffer 1
383rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__width_1 skid_buf1_en_ff
384 (
385 .scan_in(skid_buf1_en_ff_scanin),
386 .scan_out(skid_buf1_en_ff_scanout),
387 .dout (skid_buf1_en),
388 .clr_ (ucb_clr_io_), //BP 8-19-05
389 .l1clk (l1clk),
390 .din (skid_buf0_en),
391 .siclk(siclk),
392 .soclk(soclk)
393 );
394
395rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_1 vld_buf1_ff
396 (
397 .scan_in(vld_buf1_ff_scanin),
398 .scan_out(vld_buf1_ff_scanout),
399 .dout (vld_buf1),
400 .clr_ (ucb_clr_io_), //BP 8-19-05
401 .l1clk (l1clk),
402 .en (skid_buf1_en),
403 .din (vld_d1),
404 .siclk(siclk),
405 .soclk(soclk)
406 );
407
408rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_4 data_buf1_ff
409 (
410 .scan_in(data_buf1_ff_scanin),
411 .scan_out(data_buf1_ff_scanout),
412 .dout (data_buf1[`UCB_BUS_WIDTH_M1 :0]),
413 .clr_ (ucb_clr_io_), //BP 8-19-05
414 .l1clk (l1clk),
415 .en (skid_buf1_en),
416 .din (data_d1[`UCB_BUS_WIDTH_M1 :0]),
417 .siclk(siclk),
418 .soclk(soclk)
419 );
420
421
422/************************************************************
423 * Mux between skid buffer and interface flop
424 ************************************************************/
425// Assertion: stall has to be deasserted for more than 1 cycle
426// ie time between two separate stalls has to be
427// at least two cycles. Otherwise, contents from
428// skid buffer will be lost.
429
430assign skid_buf0_sel = ~stall_a1 & stall;
431
432rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__width_1 skid_buf1_sel_ff
433 (
434 .scan_in(skid_buf1_sel_ff_scanin),
435 .scan_out(skid_buf1_sel_ff_scanout),
436 .dout (skid_buf1_sel),
437 .clr_ (ucb_clr_io_), //BP 8-19-05
438 .l1clk (l1clk),
439 .din (skid_buf0_sel),
440 .siclk(siclk),
441 .soclk(soclk)
442 );
443
444assign vld_mux = skid_buf0_sel ? vld_buf0 :
445 skid_buf1_sel ? vld_buf1 :
446 vld_d1;
447
448assign data_mux[`UCB_BUS_WIDTH_M1 :0] = skid_buf0_sel ? data_buf0[`UCB_BUS_WIDTH_M1 :0] :
449 skid_buf1_sel ? data_buf1[`UCB_BUS_WIDTH_M1 :0] :
450 data_d1[`UCB_BUS_WIDTH_M1 :0];
451
452
453/************************************************************
454 * Assemble inbound data
455 ************************************************************/
456// valid vector
457assign indata_vec_next[`CYC_NUM_M1:0] = {vld_mux, indata_vec[`CYC_NUM_M1 :1]};
458
459assign stall_a1_ = ~stall_a1;
460rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_32 indata_vec_ff
461 (
462 .scan_in(indata_vec_ff_scanin),
463 .scan_out(indata_vec_ff_scanout),
464 .dout (indata_vec[`CYC_NUM_M1 :0]),
465 .clr_ (ucb_clr_io_), //BP 8-19-05
466 .l1clk (l1clk),
467 .en (stall_a1_),
468 .din (indata_vec_next[`CYC_NUM_M1 :0]),
469 .siclk(siclk),
470 .soclk(soclk)
471 );
472
473// data buffer
474assign indata_buf_next[127:0] = {data_mux[`UCB_BUS_WIDTH_M1 :0], indata_buf[127:`UCB_BUS_WIDTH ]};
475rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_128 indata_buf_ff
476 (
477 .scan_in(indata_buf_ff_scanin),
478 .scan_out(indata_buf_ff_scanout),
479 .dout (indata_buf[127:0]),
480 .clr_ (ucb_clr_io_), //BP 8-19-05
481 .l1clk (l1clk),
482 .en (stall_a1_),
483 .din (indata_buf_next[127:0]),
484 .siclk(siclk),
485 .soclk(soclk)
486 );
487
488// detect a new packet
489rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_1 indata_vec0_d1_ff
490 (
491 .scan_in(indata_vec0_d1_ff_scanin),
492 .scan_out(indata_vec0_d1_ff_scanout),
493 .dout (indata_vec0_d1),
494 .clr_ (ucb_clr_io_), //BP 8-19-05
495 .l1clk (l1clk),
496 .en (stall_a1_),
497 .din (indata_vec[0]),
498 .siclk(siclk),
499 .soclk(soclk)
500 );
501
502assign indata_buf_vld = indata_vec[0] & ~indata_vec0_d1;
503
504
505
506/**** adding clock header ****/
507rst_ucbbusin4_ctl_l1clkhdr_ctl_macro clkgen (
508 .l2clk (iol2clk),
509 .l1en (1'b1),
510 // .pce_ov (1'b0 ),
511 .stop (1'b0 ),
512 // .se (1'b0 ),
513 .l1clk (l1clk),
514 .pce_ov(pce_ov),
515 .se(se)
516 );
517
518/*** building tcu port ***/
519assign siclk = tcu_aclk ;
520assign soclk = tcu_bclk ;
521assign pce_ov = tcu_pce_ov ;
522assign stop = tcu_clk_stop;
523// scan renames
524assign se = tcu_scan_en ;
525// end scan
526
527// fixscan start:
528assign vld_d1_ff_scanin = scan_in ;
529assign data_d1_ff_scanin = vld_d1_ff_scanout ;
530assign stall_ff_scanin = data_d1_ff_scanout ;
531assign stall_d1_ff_scanin = stall_ff_scanout ;
532assign vld_buf0_ff_scanin = stall_d1_ff_scanout ;
533assign data_buf0_ff_scanin = vld_buf0_ff_scanout ;
534assign skid_buf1_en_ff_scanin = data_buf0_ff_scanout ;
535assign vld_buf1_ff_scanin = skid_buf1_en_ff_scanout ;
536assign data_buf1_ff_scanin = vld_buf1_ff_scanout ;
537assign skid_buf1_sel_ff_scanin = data_buf1_ff_scanout ;
538assign indata_vec_ff_scanin = skid_buf1_sel_ff_scanout ;
539assign indata_buf_ff_scanin = indata_vec_ff_scanout ;
540assign indata_vec0_d1_ff_scanin = indata_buf_ff_scanout ;
541assign scan_out = indata_vec0_d1_ff_scanout;
542// fixscan end:
543endmodule // ucb_bus_in
544
545
546
547
548
549
550// any PARAMS parms go into naming of macro
551
552module rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_1 (
553 din,
554 en,
555 clr_,
556 l1clk,
557 scan_in,
558 siclk,
559 soclk,
560 dout,
561 scan_out);
562wire [0:0] fdin;
563
564 input [0:0] din;
565 input en;
566 input clr_;
567 input l1clk;
568 input scan_in;
569
570
571 input siclk;
572 input soclk;
573
574 output [0:0] dout;
575 output scan_out;
576assign fdin[0:0] = (din[0:0] & {1{en}} & ~{1{(~clr_)}}) | (dout[0:0] & ~{1{en}} & ~{1{(~clr_)}});
577
578
579
580
581
582
583dff #(1) d0_0 (
584.l1clk(l1clk),
585.siclk(siclk),
586.soclk(soclk),
587.d(fdin[0:0]),
588.si(scan_in),
589.so(scan_out),
590.q(dout[0:0])
591);
592
593
594
595
596
597
598
599
600
601
602
603
604endmodule
605
606
607
608
609
610
611
612
613
614
615
616
617
618// any PARAMS parms go into naming of macro
619
620module rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_4 (
621 din,
622 en,
623 clr_,
624 l1clk,
625 scan_in,
626 siclk,
627 soclk,
628 dout,
629 scan_out);
630wire [3:0] fdin;
631wire [2:0] so;
632
633 input [3:0] din;
634 input en;
635 input clr_;
636 input l1clk;
637 input scan_in;
638
639
640 input siclk;
641 input soclk;
642
643 output [3:0] dout;
644 output scan_out;
645assign fdin[3:0] = (din[3:0] & {4{en}} & ~{4{(~clr_)}}) | (dout[3:0] & ~{4{en}} & ~{4{(~clr_)}});
646
647
648
649
650
651
652dff #(4) d0_0 (
653.l1clk(l1clk),
654.siclk(siclk),
655.soclk(soclk),
656.d(fdin[3:0]),
657.si({scan_in,so[2:0]}),
658.so({so[2:0],scan_out}),
659.q(dout[3:0])
660);
661
662
663
664
665
666
667
668
669
670
671
672
673endmodule
674
675
676
677
678
679
680
681
682
683
684
685
686
687// any PARAMS parms go into naming of macro
688
689module rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__width_1 (
690 din,
691 clr_,
692 l1clk,
693 scan_in,
694 siclk,
695 soclk,
696 dout,
697 scan_out);
698wire [0:0] fdin;
699
700 input [0:0] din;
701 input clr_;
702 input l1clk;
703 input scan_in;
704
705
706 input siclk;
707 input soclk;
708
709 output [0:0] dout;
710 output scan_out;
711assign fdin[0:0] = din[0:0] & ~{1{(~clr_)}};
712
713
714
715
716
717
718dff #(1) d0_0 (
719.l1clk(l1clk),
720.siclk(siclk),
721.soclk(soclk),
722.d(fdin[0:0]),
723.si(scan_in),
724.so(scan_out),
725.q(dout[0:0])
726);
727
728
729
730
731
732
733
734
735
736
737
738
739endmodule
740
741
742
743
744
745
746
747
748
749
750
751
752
753// any PARAMS parms go into naming of macro
754
755module rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_32 (
756 din,
757 en,
758 clr_,
759 l1clk,
760 scan_in,
761 siclk,
762 soclk,
763 dout,
764 scan_out);
765wire [31:0] fdin;
766wire [30:0] so;
767
768 input [31:0] din;
769 input en;
770 input clr_;
771 input l1clk;
772 input scan_in;
773
774
775 input siclk;
776 input soclk;
777
778 output [31:0] dout;
779 output scan_out;
780assign fdin[31:0] = (din[31:0] & {32{en}} & ~{32{(~clr_)}}) | (dout[31:0] & ~{32{en}} & ~{32{(~clr_)}});
781
782
783
784
785
786
787dff #(32) d0_0 (
788.l1clk(l1clk),
789.siclk(siclk),
790.soclk(soclk),
791.d(fdin[31:0]),
792.si({scan_in,so[30:0]}),
793.so({so[30:0],scan_out}),
794.q(dout[31:0])
795);
796
797
798
799
800
801
802
803
804
805
806
807
808endmodule
809
810
811
812
813
814
815
816
817
818
819
820
821
822// any PARAMS parms go into naming of macro
823
824module rst_ucbbusin4_ctl_msff_ctl_macro__clr__1__en_1__width_128 (
825 din,
826 en,
827 clr_,
828 l1clk,
829 scan_in,
830 siclk,
831 soclk,
832 dout,
833 scan_out);
834wire [127:0] fdin;
835wire [126:0] so;
836
837 input [127:0] din;
838 input en;
839 input clr_;
840 input l1clk;
841 input scan_in;
842
843
844 input siclk;
845 input soclk;
846
847 output [127:0] dout;
848 output scan_out;
849assign fdin[127:0] = (din[127:0] & {128{en}} & ~{128{(~clr_)}}) | (dout[127:0] & ~{128{en}} & ~{128{(~clr_)}});
850
851
852
853
854
855
856dff #(128) d0_0 (
857.l1clk(l1clk),
858.siclk(siclk),
859.soclk(soclk),
860.d(fdin[127:0]),
861.si({scan_in,so[126:0]}),
862.so({so[126:0],scan_out}),
863.q(dout[127:0])
864);
865
866
867
868
869
870
871
872
873
874
875
876
877endmodule
878
879
880
881
882
883
884
885
886
887
888
889
890
891// any PARAMS parms go into naming of macro
892
893module rst_ucbbusin4_ctl_l1clkhdr_ctl_macro (
894 l2clk,
895 l1en,
896 pce_ov,
897 stop,
898 se,
899 l1clk);
900
901
902 input l2clk;
903 input l1en;
904 input pce_ov;
905 input stop;
906 input se;
907 output l1clk;
908
909
910
911
912
913cl_sc1_l1hdr_8x c_0 (
914
915
916 .l2clk(l2clk),
917 .pce(l1en),
918 .l1clk(l1clk),
919 .se(se),
920 .pce_ov(pce_ov),
921 .stop(stop)
922);
923
924
925
926endmodule
927
928
929
930
931
932
933
934