Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / l2t / rtl / l2t_rdmat_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: l2t_rdmat_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 IQ_SIZE 8
36`define OQ_SIZE 12
37`define TAG_WIDTH 28
38`define TAG_WIDTH_LESS1 27
39`define TAG_WIDTHr 28r
40`define TAG_WIDTHc 28c
41`define TAG_WIDTH6 22
42`define TAG_WIDTH6r 22r
43`define TAG_WIDTH6c 22c
44
45
46`define MBD_WIDTH 106 // BS and SR 11/12/03 N2 Xbar Packet format change
47
48// BS and SR 11/12/03 N2 Xbar Packet format change
49
50`define MBD_ECC_HI 105
51`define MBD_ECC_HI_PLUS1 106
52`define MBD_ECC_HI_PLUS5 110
53`define MBD_ECC_LO 100
54`define MBD_EVICT 99
55`define MBD_DEP 98
56`define MBD_TECC 97
57`define MBD_ENTRY_HI 96
58`define MBD_ENTRY_LO 93
59
60`define MBD_POISON 92
61`define MBD_RDMA_HI 91
62`define MBD_RDMA_LO 90
63`define MBD_RQ_HI 89
64`define MBD_RQ_LO 85
65`define MBD_NC 84
66`define MBD_RSVD 83
67`define MBD_CP_HI 82
68`define MBD_CP_LO 80
69`define MBD_TH_HI 79
70`define MBD_TH_LO 77
71`define MBD_BF_HI 76
72`define MBD_BF_LO 74
73`define MBD_WY_HI 73
74`define MBD_WY_LO 72
75`define MBD_SZ_HI 71
76`define MBD_SZ_LO 64
77`define MBD_DATA_HI 63
78`define MBD_DATA_LO 0
79
80// BS and SR 11/12/03 N2 Xbar Packet format change
81`define L2_FBF 40
82`define L2_MBF 39
83`define L2_SNP 38
84`define L2_CTRUE 37
85`define L2_EVICT 36
86`define L2_DEP 35
87`define L2_TECC 34
88`define L2_ENTRY_HI 33
89`define L2_ENTRY_LO 29
90
91`define L2_POISON 28
92`define L2_RDMA_HI 27
93`define L2_RDMA_LO 26
94// BS and SR 11/12/03 N2 Xbar Packet format change , maps to bits [128:104] of PCXS packet , ther than RSVD bit
95`define L2_RQTYP_HI 25
96`define L2_RQTYP_LO 21
97`define L2_NC 20
98`define L2_RSVD 19
99`define L2_CPUID_HI 18
100`define L2_CPUID_LO 16
101`define L2_TID_HI 15
102`define L2_TID_LO 13
103`define L2_BUFID_HI 12
104`define L2_BUFID_LO 10
105`define L2_L1WY_HI 9
106`define L2_L1WY_LO 8
107`define L2_SZ_HI 7
108`define L2_SZ_LO 0
109
110
111`define ERR_MEU 63
112`define ERR_MEC 62
113`define ERR_RW 61
114`define ERR_ASYNC 60
115`define ERR_TID_HI 59 // PRM needs to change to reflect this : TID will be bits [59:54] instead of [58:54]
116`define ERR_TID_LO 54
117`define ERR_LDAC 53
118`define ERR_LDAU 52
119`define ERR_LDWC 51
120`define ERR_LDWU 50
121`define ERR_LDRC 49
122`define ERR_LDRU 48
123`define ERR_LDSC 47
124`define ERR_LDSU 46
125`define ERR_LTC 45
126`define ERR_LRU 44
127`define ERR_LVU 43
128`define ERR_DAC 42
129`define ERR_DAU 41
130`define ERR_DRC 40
131`define ERR_DRU 39
132`define ERR_DSC 38
133`define ERR_DSU 37
134`define ERR_VEC 36
135`define ERR_VEU 35
136`define ERR_LVC 34
137`define ERR_SYN_HI 31
138`define ERR_SYN_LO 0
139
140
141
142`define ERR_MEND 51
143`define ERR_NDRW 50
144`define ERR_NDSP 49
145`define ERR_NDDM 48
146`define ERR_NDVCID_HI 45
147`define ERR_NDVCID_LO 40
148`define ERR_NDADR_HI 39
149`define ERR_NDADR_LO 4
150
151
152// Phase 2 : SIU Inteface and format change
153
154`define JBI_HDR_SZ 26 // BS and SR 11/12/03 N2 Xbar Packet format change
155`define JBI_HDR_SZ_LESS1 25 // BS and SR 11/12/03 N2 Xbar Packet format change
156`define JBI_HDR_SZ4 23
157`define JBI_HDR_SZc 27c
158`define JBI_HDR_SZ4c 23c
159
160`define JBI_ADDR_LO 0
161`define JBI_ADDR_HI 7
162`define JBI_SZ_LO 8
163`define JBI_SZ_HI 15
164// `define JBI_RSVD 16 NOt used
165`define JBI_CTAG_LO 16
166`define JBI_CTAG_HI 23
167`define JBI_RQ_RD 24
168`define JBI_RQ_WR8 25
169`define JBI_RQ_WR64 26
170`define JBI_OPES_LO 27 // 0 = 30, P=29, E=28, S=27
171`define JBI_OPES_HI 30
172`define JBI_RQ_POISON 31
173`define JBI_ENTRY_LO 32
174`define JBI_ENTRY_HI 33
175
176// Phase 2 : SIU Inteface and format change
177// BS and SR 11/12/03 N2 Xbar Packet format change :
178`define JBINST_SZ_LO 0
179`define JBINST_SZ_HI 7
180// `define JBINST_RSVD 8 NOT used
181`define JBINST_CTAG_LO 8
182`define JBINST_CTAG_HI 15
183`define JBINST_RQ_RD 16
184`define JBINST_RQ_WR8 17
185`define JBINST_RQ_WR64 18
186`define JBINST_OPES_LO 19 // 0 = 22, P=21, E=20, S=19
187`define JBINST_OPES_HI 22
188`define JBINST_ENTRY_LO 23
189`define JBINST_ENTRY_HI 24
190`define JBINST_POISON 25
191
192
193`define ST_REQ_ST 1
194`define LD_REQ_ST 2
195`define IDLE 0
196
197
198////////////////////////////////////////////////////////////////////////
199// Local header file includes / local defines
200////////////////////////////////////////////////////////////////////////
201
202module l2t_rdmat_ctl (
203 tcu_pce_ov,
204 tcu_aclk,
205 tcu_bclk,
206 tcu_scan_en,
207 rdmat_wr_entry_s1,
208 rdmat_or_rdmat_valid,
209 rdmat_pick_vec,
210 rdmat_rdma_hit_unqual_c2,
211 rdmat_rdma_misbuf_dep_rdy_en,
212 rdmat_rdma_misbuf_dep_mbid,
213 rdmat_wr_wl_s2,
214 l2t_l2b_word_vld_c7,
215 l2t_l2b_ctag_en_c7,
216 l2t_l2b_req_en_c7,
217 l2t_l2b_word_c7,
218 rdmat_rdmard_cerr_c12,
219 rdmat_rdmard_uerr_c12,
220 rdmat_rdmard_notdata_c12,
221 rdmat_ev_uerr_r6,
222 rdmat_ev_cerr_r6,
223 scan_out,
224 snp_rdmatag_wr_en_s2,
225 wbuf_reset_rdmat_vld,
226 wbuf_set_rdmat_acked,
227 rdmat_cam_match_c2,
228 arb_wbuf_inst_vld_c2,
229 arb_wbuf_hit_off_c1,
230 arbdec_arbdp_rdma_entry_c3,
231 misbuf_wbuf_mbid_c4,
232 misbuf_hit_c4,
233 tag_rdma_ev_en_c4,
234 wmr_l,
235 l2clk,
236 scan_in,
237 l2b_l2t_rdma_cerr_c10,
238 l2b_l2t_rdma_uerr_c10,
239 l2b_l2t_rdma_notdata_c10,
240 l2b_l2t_ev_uerr_r5,
241 l2b_l2t_ev_cerr_r5,
242 arbdec_ctag_c6,
243 l2t_l2b_ctag_c7,
244 rdma_mbist_cam_hit,
245 rdma_mbist_cam_sel,
246 l2t_dbg_xbar_vcid_unreg,
247 l2t_dbg_xbar_vcid,
248 l2t_dbg_sii_iq_dequeue_unreg,
249 l2t_dbg_sii_iq_dequeue,
250 tag_inc_rdma_cnt_c4,
251 tag_set_rdma_reg_vld_c4,
252 tag_siu_req_en_c52,
253 arbdp_rdma_addr_c6,
254 l2t_mb2_run,
255 l2t_mb2_addr);
256wire pce_ov;
257wire stop;
258wire siclk;
259wire soclk;
260wire se;
261wire l1clk;
262wire spares_scanin;
263wire spares_scanout;
264wire reset_flop_scanin;
265wire reset_flop_scanout;
266wire ff_l2t_l2b_ctag_c7_scanin;
267wire ff_l2t_l2b_ctag_c7_scanout;
268wire ff_rdma_wr_ptr_s2_scanin;
269wire ff_rdma_wr_ptr_s2_scanout;
270wire ff_l2t_mb2_addr_scanin;
271wire ff_l2t_mb2_addr_scanout;
272wire [1:0] l2t_mb2_addr_r1;
273wire [1:0] l2t_mb2_addr_r2;
274wire [1:0] l2t_mb2_addr_r3;
275wire [3:0] l2t_mb2_wr_addr;
276wire ff_mb_run_scanin;
277wire ff_mb_run_scanout;
278wire rdma_mbist_cam_sel_r1;
279wire ff_valid_bit_scanin;
280wire ff_valid_bit_scanout;
281wire ff_arb_wbuf_hit_off_c2_scanin;
282wire ff_arb_wbuf_hit_off_c2_scanout;
283wire rdma_mbist_cam_hit_raw;
284wire rdma_mbist_cam_hit_r1;
285wire ff_rdma_mbist_cam_hit_scanin;
286wire ff_rdma_mbist_cam_hit_scanout;
287wire ff_rdma_cam_hit_vec_c3_scanin;
288wire ff_rdma_cam_hit_vec_c3_scanout;
289wire ff_rdma_cam_hit_vec_c4_scanin;
290wire ff_rdma_cam_hit_vec_c4_scanout;
291wire ff_rdma_hit_qual_c3_scanin;
292wire ff_rdma_hit_qual_c3_scanout;
293wire ff_rdma_hit_qual_c4_scanin;
294wire ff_rdma_hit_qual_c4_scanout;
295wire ff_mbid0_scanin;
296wire ff_mbid0_scanout;
297wire ff_mbid1_scanin;
298wire ff_mbid1_scanout;
299wire ff_mbid2_scanin;
300wire ff_mbid2_scanout;
301wire ff_mbid3_scanin;
302wire ff_mbid3_scanout;
303wire ff_rdma_mbid_vld_scanin;
304wire ff_rdma_mbid_vld_scanout;
305wire ff_rdma_entry_c4_scanin;
306wire ff_rdma_entry_c4_scanout;
307wire ff_mcu_req_scanin;
308wire ff_mcu_req_scanout;
309wire ff_rdma_acked_scanin;
310wire ff_rdma_acked_scanout;
311wire ff_inc_rdma_cnt_c5_scanin;
312wire ff_inc_rdma_cnt_c5_scanout;
313wire ff_inc_rdma_cnt_c52_scanin;
314wire ff_inc_rdma_cnt_c52_scanout;
315wire ff_inc_rdma_cnt_c6_scanin;
316wire ff_inc_rdma_cnt_c6_scanout;
317wire ff_inc_rdma_cnt_c7_scanin;
318wire ff_inc_rdma_cnt_c7_scanout;
319wire ff_set_rdma_reg_vld_c5_scanin;
320wire ff_set_rdma_reg_vld_c5_scanout;
321wire ff_set_rdma_reg_vld_c52_scanin;
322wire ff_set_rdma_reg_vld_c52_scanout;
323wire ff_set_rdma_reg_vld_c6_scanin;
324wire ff_set_rdma_reg_vld_c6_scanout;
325wire ff_tag_siu_req_en_c6_scanin;
326wire ff_tag_siu_req_en_c6_scanout;
327wire ff_tag_siu_req_en_c7_scanin;
328wire ff_tag_siu_req_en_c7_scanout;
329wire ff_rdmard_st_scanin;
330wire ff_rdmard_st_scanout;
331wire ff_rdmard_cerr_c12_scanin;
332wire ff_rdmard_cerr_c12_scanout;
333wire ff_rdmard_uerr_c12_scanin;
334wire ff_rdmard_uerr_c12_scanout;
335wire ff_rdmard_notdata_c12_scanin;
336wire ff_rdmard_notdata_c12_scanout;
337wire ff_ev_uerr_r6_scanin;
338wire ff_ev_uerr_r6_scanout;
339wire ff_ev_cerr_r6_scanin;
340wire ff_ev_cerr_r6_scanout;
341wire ff_dbg_signals_scanin;
342wire ff_dbg_signals_scanout;
343
344
345 input tcu_pce_ov;
346 input tcu_aclk;
347 input tcu_bclk;
348 input tcu_scan_en;
349
350output [1:0] rdmat_wr_entry_s1; // to snp ctl.
351output rdmat_or_rdmat_valid; // to wbuf
352output [3:0] rdmat_pick_vec; // to wbuf
353output rdmat_rdma_hit_unqual_c2 ; // to misbuf
354output rdmat_rdma_misbuf_dep_rdy_en;// to misbuf
355output [4:0] rdmat_rdma_misbuf_dep_mbid; // to misbuf , BS & SR 11/04/03, MB grows to 32
356output [3:0] rdmat_wr_wl_s2;
357//output [2:0] l2t_l2b_fbwr_wl_r2; // NEW_PIN
358//output l2t_l2b_fbrd_en_c3; // NEW_PIN
359//output [2:0] l2t_l2b_fbrd_wl_c3; // NEW_PIN
360output l2t_l2b_word_vld_c7; // NEW_PIN
361output l2t_l2b_ctag_en_c7; // NEW_PIN
362output l2t_l2b_req_en_c7; // NEW_PIN
363output [3:0] l2t_l2b_word_c7; // NEW_PIN
364
365output rdmat_rdmard_cerr_c12; // NEW_PIN
366output rdmat_rdmard_uerr_c12;
367output rdmat_rdmard_notdata_c12;
368output rdmat_ev_uerr_r6; // NEW_PIN
369output rdmat_ev_cerr_r6;
370
371
372output scan_out;
373input snp_rdmatag_wr_en_s2 ; // from snp.
374input [3:0] wbuf_reset_rdmat_vld; // comes from wbuf
375input [3:0] wbuf_set_rdmat_acked; // from wbuf
376input [3:0] rdmat_cam_match_c2; // from cm2
377input arb_wbuf_inst_vld_c2 ; // from arb.
378input arb_wbuf_hit_off_c1 ; // from arb.
379input [1:0] arbdec_arbdp_rdma_entry_c3; // mbid
380input [4:0] misbuf_wbuf_mbid_c4; // misbuf // BS & SR 11/04/03, MB grows to 32
381input misbuf_hit_c4; // misbuf
382input tag_rdma_ev_en_c4; // generated in tag;
383//input tag_l2b_fbd_stdatasel_c3;
384//input [15:0] tag_l2b_fbwr_wen_r2;
385//output [15:0] l2t_l2b_fbwr_wen_r2 ;
386//output l2t_l2b_fbd_stdatasel_c3 ;
387
388input wmr_l;
389input l2clk;
390input scan_in;
391
392// from l2b
393input l2b_l2t_rdma_cerr_c10; // NEW_PIN
394input l2b_l2t_rdma_uerr_c10; // NEW_PIN
395input l2b_l2t_rdma_notdata_c10;
396
397// from l2b
398input l2b_l2t_ev_uerr_r5; // NEW_PIN
399input l2b_l2t_ev_cerr_r5; // NEW_PIN
400input [31:0] arbdec_ctag_c6; // NEW_PIN POST_3.3 Bottom // Phase 2 : SIU inteface and packet format change 2/7/04
401 // RAS implementation changes 10/14/04
402
403output [31:0] l2t_l2b_ctag_c7; // NEW_PIN POST_3.3 TOp // Phase 2 : SIU inteface and packet format change 2/7/04
404 // RAS implementation changes 10/14/04
405
406
407output rdma_mbist_cam_hit;
408input rdma_mbist_cam_sel;
409
410
411input [5:0] l2t_dbg_xbar_vcid_unreg;
412output [5:0] l2t_dbg_xbar_vcid;
413input l2t_dbg_sii_iq_dequeue_unreg;
414output l2t_dbg_sii_iq_dequeue;
415
416
417
418
419// from tag.
420input tag_inc_rdma_cnt_c4; // NEW_PIN
421input tag_set_rdma_reg_vld_c4 ; // NEW_PIN
422input tag_siu_req_en_c52; // NEW_PIN
423
424// from arbaddr
425input [5:2] arbdp_rdma_addr_c6; // NEW_PIN
426
427// from filbuf
428//input filbuf_fbd_rd_en_c2; // rd en for fbdata NEW_PIN
429//input [2:0] filbuf_fbd_rd_entry_c2; // rd entry for fbdata NEW_PIN
430//input [2:0] filbuf_fbd_wr_entry_r1; // entry for fbdata wr NEW_PIN
431
432// mbist
433input l2t_mb2_run;
434input [3:0] l2t_mb2_addr;
435
436
437//////////////////////////////////////////////////
438// L1 clk header
439//////////////////////////////////////////////////
440assign pce_ov = tcu_pce_ov;
441assign stop = 1'b0;
442assign siclk = tcu_aclk;
443assign soclk = tcu_bclk;
444assign se = tcu_scan_en;
445
446l2t_l1clkhdr_ctl_macro clkgen (
447 .l2clk(l2clk),
448 .l1en(1'b1 ),
449 .l1clk(l1clk),
450 .pce_ov(pce_ov),
451 .stop(stop),
452 .se(se));
453
454//////////////////////////////////////////////////
455//////////////////////////////////////////
456// Spare gate insertion
457//////////////////////////////////////////
458l2t_spare_ctl_macro__num_4 spares (
459 .scan_in(spares_scanin),
460 .scan_out(spares_scanout),
461 .l1clk (l1clk),
462 .siclk(siclk),
463 .soclk(soclk)
464);
465//////////////////////////////////////////
466
467
468
469wire siu_req_en_c7;
470wire siu_req_en_c6;
471
472wire inc_rdma_cnt_c5, inc_rdma_cnt_c52, inc_rdma_cnt_c6, inc_rdma_cnt_c7 ; // BS 03/11/04 extra cycle for mem access
473wire set_rdma_reg_vld_c5 , set_rdma_reg_vld_c52, set_rdma_reg_vld_c6, set_rdma_reg_vld_c7 ;// BS 03/11/04 extra cycle for mem access
474wire [3:0] rdma_state_in, rdma_state_plus1 , rdma_state ;
475wire inc_state_en;
476wire rdma_state_en;
477
478
479wire [3:0] rdma_wr_ptr_s1, rdma_wr_ptr_s2;
480wire [3:0] rdma_valid_prev, rdma_valid ;
481
482wire [3:0] rdma_cam_hit_vec_c2, rdma_cam_hit_vec_c3, rdma_cam_hit_vec_c4;
483wire rdma_hit_qual_c2, rdma_hit_qual_c3, rdma_hit_qual_c4;
484
485wire mbid_wr_en ;
486wire [3:0] sel_insert_mbid_c4;
487
488wire [4:0] mbid0, mbid1, mbid2, mbid3; // BS & SR 11/04/03, MB grows to 32
489wire [3:0] rdma_mbid_vld_in, rdma_mbid_vld ;
490wire [3:0] sel_mbid;
491wire sel_def_mbid;
492wire [4:0] enc_mbid; // BS & SR 11/04/03, MB grows to 32
493
494wire [3:0] rdma_acked_in, rdma_acked;
495
496wire [3:0] rdma_mcu_req_in, rdma_mcu_req ;
497wire [3:0] noalloc_evict_mcu_c4;
498wire or_rdma_mbid_vld;
499wire [1:0] rdma_entry_c4;
500wire arb_wbuf_hit_off_c2;
501wire [3:0] sel_mbid_rst;
502
503wire dbb_rst_l;
504///////////////////////////////////////////////////////////////////
505// Reset flop
506///////////////////////////////////////////////////////////////////
507
508l2t_msff_ctl_macro__width_1 reset_flop
509 (.dout(dbb_rst_l),
510 .scan_in(reset_flop_scanin),
511 .scan_out(reset_flop_scanout),
512 .l1clk(l1clk),
513 .din(wmr_l),
514 .siclk(siclk),
515 .soclk(soclk)
516
517);
518
519
520//assign l2t_l2b_fbd_stdatasel_c3 = tag_l2b_fbd_stdatasel_c3 ;
521//assign l2t_l2b_fbwr_wen_r2 = tag_l2b_fbwr_wen_r2 ;
522
523// int 5.0 changes
524// assign rdmat_siu_req_vld_buf = siu_l2t_req_vld;
525// assign rdmat_siu_req_buf = siu_l2t_req;
526
527/////////////////////////////////////////
528// Repeater for ctag from arbdec.
529/////////////////////////////////////////
530// RAS implementation changes 10/14/04
531l2t_msff_ctl_macro__width_32 ff_l2t_l2b_ctag_c7 // Phase 2 : SIU inteface and packet format change 2/7/04
532 (.din(arbdec_ctag_c6[31:0]), .l1clk(l1clk),
533 .scan_in(ff_l2t_l2b_ctag_c7_scanin),
534 .scan_out(ff_l2t_l2b_ctag_c7_scanout),
535 .dout(l2t_l2b_ctag_c7[31:0]),
536 .siclk(siclk),
537 .soclk(soclk)
538);
539
540/////////////////////////////////////////
541// Generating the wr ptr for rdmat
542/////////////////////////////////////////
543
544assign rdma_wr_ptr_s1[0] = ~rdma_valid[0] ;
545assign rdma_wr_ptr_s1[1] = rdma_valid[0] & ~rdma_valid[1];
546assign rdma_wr_ptr_s1[2] = (rdma_valid[0] & rdma_valid[1]) & ~rdma_valid[2] ;
547assign rdma_wr_ptr_s1[3] = ( rdma_valid[0] & rdma_valid[1] & rdma_valid[2]) & ~rdma_valid[3] ;
548
549assign rdmat_wr_entry_s1[0] = ( rdma_wr_ptr_s1[1] | rdma_wr_ptr_s1[3] ) ;
550assign rdmat_wr_entry_s1[1] = ( rdma_wr_ptr_s1[2] | rdma_wr_ptr_s1[3] ) ;
551
552l2t_msff_ctl_macro__width_4 ff_rdma_wr_ptr_s2
553 (.din(rdma_wr_ptr_s1[3:0]), .l1clk(l1clk),
554 .scan_in(ff_rdma_wr_ptr_s2_scanin),
555 .scan_out(ff_rdma_wr_ptr_s2_scanout),
556 .dout(rdma_wr_ptr_s2[3:0]),
557 .siclk(siclk),
558 .soclk(soclk)
559);
560
561l2t_msff_ctl_macro__width_6 ff_l2t_mb2_addr
562 (
563 .scan_in(ff_l2t_mb2_addr_scanin),
564 .scan_out(ff_l2t_mb2_addr_scanout),
565 .din({l2t_mb2_addr[1:0],l2t_mb2_addr_r1[1:0], l2t_mb2_addr_r2[1:0]}),
566 .l1clk(l1clk),
567 .dout({l2t_mb2_addr_r1[1:0],l2t_mb2_addr_r2[1:0],l2t_mb2_addr_r3[1:0]}),
568 .siclk(siclk),
569 .soclk(soclk)
570 );
571
572
573
574
575assign l2t_mb2_wr_addr[0] = (l2t_mb2_addr_r3[1:0] == 2'b00);
576assign l2t_mb2_wr_addr[1] = (l2t_mb2_addr_r3[1:0] == 2'b01);
577assign l2t_mb2_wr_addr[2] = (l2t_mb2_addr_r3[1:0] == 2'b10);
578assign l2t_mb2_wr_addr[3] = (l2t_mb2_addr_r3[1:0] == 2'b11);
579
580
581
582l2t_msff_ctl_macro__width_1 ff_mb_run
583 (.din(rdma_mbist_cam_sel), .l1clk(l1clk),
584 .scan_in(ff_mb_run_scanin),
585 .scan_out(ff_mb_run_scanout),
586 .dout(rdma_mbist_cam_sel_r1),
587 .siclk(siclk),
588 .soclk(soclk)
589);
590
591
592assign rdmat_wr_wl_s2[3:0] = l2t_mb2_run ? l2t_mb2_wr_addr[3:0] : rdma_wr_ptr_s2[3:0] ;
593
594///////////////////////////////////////////////////////////////////
595// Pipeline for setting and resetting the valid bits
596// for the rdmat
597//
598// Set Pipeline.
599//-----------------------------------------------------------------
600// S1 S2 S3
601//-----------------------------------------------------------------
602// xmit wr entry snp
603// pick to generates
604// snp rdmat/rdmad vld=1
605// wren and wrwl
606//
607//
608// set valid bit
609//-----------------------------------------------------------------
610//
611//
612// Reset Pipeline
613//-----------------------------------------------------------------
614// R0 R5 ..... R11 R12
615//-----------------------------------------------------------------
616// evict evict evict
617// data1 data7 data8
618//
619// reset valid=0
620// valid.
621//-----------------------------------------------------------------
622///////////////////////////////////////////////////////////////////
623
624assign rdma_valid_prev = ( rdma_wr_ptr_s2 & {4{snp_rdmatag_wr_en_s2}}
625 | rdma_valid )
626 & ~wbuf_reset_rdmat_vld ;
627
628l2t_msff_ctl_macro__clr_1__width_4 ff_valid_bit // sync reset active low
629 (.din(rdma_valid_prev[3:0]), .l1clk(l1clk),
630 .scan_in(ff_valid_bit_scanin),
631 .scan_out(ff_valid_bit_scanout),
632 .clr(~dbb_rst_l),
633 .dout(rdma_valid[3:0]),
634 .siclk(siclk),
635 .soclk(soclk)
636);
637
638
639////////////////////////////////////////////////////////////////////
640// Hit calculation.
641// RDMA hit is asserted only under the following conditions.
642// wb_valid = 1
643// wb_mcu_req = 1 => that the Wr64 corresponding to that entry
644// has cleared all dependencies and successfully
645// completed an issue down the pipe.
646// wb_acked = 1 => an ack was received for the Wr req sent to
647// mcu.
648////////////////////////////////////////////////////////////////////
649
650l2t_msff_ctl_macro__width_1 ff_arb_wbuf_hit_off_c2
651 (.dout (arb_wbuf_hit_off_c2),
652 .scan_in(ff_arb_wbuf_hit_off_c2_scanin),
653 .scan_out(ff_arb_wbuf_hit_off_c2_scanout),
654 .din (arb_wbuf_hit_off_c1),
655 .l1clk (l1clk),
656 .siclk(siclk),
657 .soclk(soclk)
658 ) ;
659
660
661
662assign rdma_mbist_cam_hit_raw = rdma_mbist_cam_sel_r1 ? |(rdmat_cam_match_c2[3:0]) :1'b0;
663
664l2t_msff_ctl_macro__width_2 ff_rdma_mbist_cam_hit
665 (.dout ({rdma_mbist_cam_hit_r1,rdma_mbist_cam_hit}),
666 .scan_in(ff_rdma_mbist_cam_hit_scanin),
667 .scan_out(ff_rdma_mbist_cam_hit_scanout),
668 .din ({rdma_mbist_cam_hit_raw,rdma_mbist_cam_hit_r1}),
669 .l1clk (l1clk),
670 .siclk(siclk),
671 .soclk(soclk)
672 ) ;
673
674
675
676
677
678assign rdma_cam_hit_vec_c2 = ( rdmat_cam_match_c2 &
679 rdma_valid & rdma_mcu_req &
680 ~( rdma_acked | {4{arb_wbuf_hit_off_c2}} ) );
681
682assign rdmat_rdma_hit_unqual_c2 = |( rdma_cam_hit_vec_c2 ) ;
683
684l2t_msff_ctl_macro__width_4 ff_rdma_cam_hit_vec_c3
685 (.dout (rdma_cam_hit_vec_c3[3:0]),
686 .scan_in(ff_rdma_cam_hit_vec_c3_scanin),
687 .scan_out(ff_rdma_cam_hit_vec_c3_scanout),
688 .din (rdma_cam_hit_vec_c2[3:0]),
689 .l1clk (l1clk),
690 .siclk(siclk),
691 .soclk(soclk)
692
693
694 ) ;
695l2t_msff_ctl_macro__width_4 ff_rdma_cam_hit_vec_c4
696 (.dout (rdma_cam_hit_vec_c4[3:0]),
697 .scan_in(ff_rdma_cam_hit_vec_c4_scanin),
698 .scan_out(ff_rdma_cam_hit_vec_c4_scanout),
699 .din (rdma_cam_hit_vec_c3[3:0]),
700 .l1clk (l1clk),
701 .siclk(siclk),
702 .soclk(soclk)
703
704
705 ) ;
706
707assign rdma_hit_qual_c2 = rdmat_rdma_hit_unqual_c2 &
708 arb_wbuf_inst_vld_c2 ;
709
710l2t_msff_ctl_macro__width_1 ff_rdma_hit_qual_c3
711 (.dout (rdma_hit_qual_c3),
712 .scan_in(ff_rdma_hit_qual_c3_scanin),
713 .scan_out(ff_rdma_hit_qual_c3_scanout),
714 .din (rdma_hit_qual_c2),
715 .l1clk (l1clk),
716 .siclk(siclk),
717 .soclk(soclk)
718
719
720 ) ;
721l2t_msff_ctl_macro__width_1 ff_rdma_hit_qual_c4
722 (.dout (rdma_hit_qual_c4),
723 .scan_in(ff_rdma_hit_qual_c4_scanin),
724 .scan_out(ff_rdma_hit_qual_c4_scanout),
725 .din (rdma_hit_qual_c3),
726 .l1clk (l1clk),
727 .siclk(siclk),
728 .soclk(soclk)
729
730
731 ) ;
732
733
734////////////////////////////////////////////////////////////////////////////////
735// MBID and MBID_vld.
736// Written in the C4 cycle of a non-dependent instruction that hits
737// the rdma buffer.
738//
739// When an ack is received from DRAM for the entry with mbid_vld,
740// the corresponding mbid is used to wake up the miss buffer entry
741// that depends on the write.The ack may be received when the instruction
742// is in flight i.e in C2, C3 otr C4 and yet to set mbid vld. But that is
743// okay since the "acked" bit can only be set for one entry in the WBB at
744// a time.
745// MBID_vld is reset when an entry has mbid_vld =1 and acked=1
746//
747////////////////////////////////////////////////////////////////////////////////
748
749
750assign mbid_wr_en = rdma_hit_qual_c4 & ~misbuf_hit_c4;
751assign sel_insert_mbid_c4 = {4{mbid_wr_en}} & rdma_cam_hit_vec_c4 ;
752
753l2t_msff_ctl_macro__en_1__width_5 ff_mbid0 // BS & SR 11/04/03, MB grows to 32
754 (.din( misbuf_wbuf_mbid_c4[4:0]),
755 .scan_in(ff_mbid0_scanin),
756 .scan_out(ff_mbid0_scanout),
757 .en(sel_insert_mbid_c4[0]),
758 .l1clk(l1clk), .dout(mbid0[4:0]),
759 .siclk(siclk),
760 .soclk(soclk)
761);
762
763l2t_msff_ctl_macro__en_1__width_5 ff_mbid1 // BS & SR 11/04/03, MB grows to 32
764 (.din(misbuf_wbuf_mbid_c4[4:0]),
765 .scan_in(ff_mbid1_scanin),
766 .scan_out(ff_mbid1_scanout),
767 .en(sel_insert_mbid_c4[1]),
768 .l1clk(l1clk), .dout(mbid1[4:0]),
769 .siclk(siclk),
770 .soclk(soclk)
771);
772
773l2t_msff_ctl_macro__en_1__width_5 ff_mbid2 // BS & SR 11/04/03, MB grows to 32
774 (.din(misbuf_wbuf_mbid_c4[4:0]),
775 .scan_in(ff_mbid2_scanin),
776 .scan_out(ff_mbid2_scanout),
777 .en(sel_insert_mbid_c4[2]),
778 .l1clk(l1clk), .dout(mbid2[4:0]),
779 .siclk(siclk),
780 .soclk(soclk)
781);
782
783l2t_msff_ctl_macro__en_1__width_5 ff_mbid3 // BS & SR 11/04/03, MB grows to 32
784 (.din(misbuf_wbuf_mbid_c4[4:0]),
785 .scan_in(ff_mbid3_scanin),
786 .scan_out(ff_mbid3_scanout),
787 .en(sel_insert_mbid_c4[3]),
788 .l1clk(l1clk), .dout(mbid3[4:0]),
789 .siclk(siclk),
790 .soclk(soclk)
791);
792
793
794assign rdma_mbid_vld_in = ( rdma_mbid_vld | sel_insert_mbid_c4 ) &
795 ~(sel_mbid[3:0]) ;
796
797l2t_msff_ctl_macro__clr_1__width_4 ff_rdma_mbid_vld // sync reset active low
798 (.din(rdma_mbid_vld_in[3:0]),
799 .scan_in(ff_rdma_mbid_vld_scanin),
800 .scan_out(ff_rdma_mbid_vld_scanout),
801 .l1clk(l1clk),.clr(~dbb_rst_l),
802 .dout(rdma_mbid_vld[3:0]),
803 .siclk(siclk),
804 .soclk(soclk)
805);
806
807
808
809///////////////////////////////////////////////////////////////////
810// Mbf dependent Ready logic.
811///////////////////////////////////////////////////////////////////
812
813assign sel_mbid = rdma_acked & rdma_mbid_vld ;
814
815assign sel_def_mbid = ~( sel_mbid[2] | sel_mbid[1] | sel_mbid[0] ) ;
816
817assign sel_mbid_rst[0] = sel_mbid[0] ;
818assign sel_mbid_rst[1] = sel_mbid[1] ;
819assign sel_mbid_rst[2] = sel_mbid[2] ;
820assign sel_mbid_rst[3] = sel_def_mbid ;
821
822
823
824l2t_mux_ctl_macro__mux_aonpe__ports_4__width_5 rdma_mb_mbid // BS & SR 11/04/03, MB grows to 32
825 (.dout (enc_mbid[4:0]),
826 .din0(mbid0[4:0]), .din1(mbid1[4:0]),
827 .din2(mbid2[4:0]), .din3(mbid3[4:0]),
828 .sel0(sel_mbid_rst[0]), .sel1(sel_mbid_rst[1]),
829 .sel2(sel_mbid_rst[2]), .sel3(sel_mbid_rst[3]));
830
831
832assign rdmat_rdma_misbuf_dep_rdy_en = |(sel_mbid[3:0]);
833assign rdmat_rdma_misbuf_dep_mbid = enc_mbid[4:0];
834
835
836
837///////////////////////////////////////////////////////////////////////////////
838// This bit indicates if an entry in the RDMA WR Buffer
839// can be evicted to DRAM.
840//
841// The mcu req bit of an entry is set in the C4 cycle of
842// a WR64 instruction that completes successfully.
843// A Wr64 instruction much like the RD64 instruction is
844// followed by 2 bubbles. This means that an instruction
845// following it 2 cycles later will see the mcu_req
846// bit without any need for bypassing.
847///////////////////////////////////////////////////////////////////////////////
848
849l2t_msff_ctl_macro__width_2 ff_rdma_entry_c4
850 (.din( arbdec_arbdp_rdma_entry_c3[1:0]),
851 .scan_in(ff_rdma_entry_c4_scanin),
852 .scan_out(ff_rdma_entry_c4_scanout),
853 .l1clk(l1clk), .dout(rdma_entry_c4[1:0]),
854 .siclk(siclk),
855 .soclk(soclk)
856);
857
858assign noalloc_evict_mcu_c4[0] = ( rdma_entry_c4[1:0] == 2'b00 ) &
859 tag_rdma_ev_en_c4 ;
860assign noalloc_evict_mcu_c4[1] = ( rdma_entry_c4[1:0] == 2'b01 ) &
861 tag_rdma_ev_en_c4 ;
862assign noalloc_evict_mcu_c4[2] = ( rdma_entry_c4[1:0] == 2'b10 ) &
863 tag_rdma_ev_en_c4 ;
864assign noalloc_evict_mcu_c4[3] = ( rdma_entry_c4[1:0] == 2'b11 ) &
865 tag_rdma_ev_en_c4 ;
866
867assign rdma_mcu_req_in = ( rdma_mcu_req | noalloc_evict_mcu_c4 )
868 & ~wbuf_reset_rdmat_vld;
869
870l2t_msff_ctl_macro__clr_1__width_4 ff_mcu_req // sync reset active low
871 (.din(rdma_mcu_req_in[3:0]), .l1clk(l1clk),
872 .scan_in(ff_mcu_req_scanin),
873 .scan_out(ff_mcu_req_scanout),
874 .clr(~dbb_rst_l),
875 .dout(rdma_mcu_req[3:0]),
876 .siclk(siclk),
877 .soclk(soclk)
878);
879
880assign rdmat_or_rdmat_valid = |( rdma_mcu_req ) ;
881
882assign or_rdma_mbid_vld = |( rdma_mcu_req & rdma_mbid_vld);
883
884l2t_mux_ctl_macro__mux_aonpe__ports_2__width_4 mux_pick_quad0_in
885 (.dout (rdmat_pick_vec[3:0]),
886 .din0 (rdma_mcu_req[3:0]), .sel0 (~or_rdma_mbid_vld),
887 .din1 (rdma_mbid_vld[3:0]), .sel1 (or_rdma_mbid_vld)
888 ) ;
889
890
891///////////////////////////////////////////////////////////////////////////////
892// ACKED bit
893// Set when an entry is acked by the DRAM controller.
894// Reset along with the valid bit.
895///////////////////////////////////////////////////////////////////////////////
896
897
898assign rdma_acked_in = ( rdma_acked | wbuf_set_rdmat_acked ) &
899 ~wbuf_reset_rdmat_vld ;
900
901l2t_msff_ctl_macro__clr_1__width_4 ff_rdma_acked // sync reset active low
902 (.din(rdma_acked_in[3:0]), .l1clk(l1clk),
903 .scan_in(ff_rdma_acked_scanin),
904 .scan_out(ff_rdma_acked_scanout),
905 .clr(~dbb_rst_l),
906 .dout(rdma_acked[3:0]),
907 .siclk(siclk),
908 .soclk(soclk)
909);
910
911//msff_ctl_macro ff_l2t_l2b_fbrd_en_c3 (width=1)
912// (.din(filbuf_fbd_rd_en_c2), .l1clk(l1clk),
913// .scan_in(ff_l2t_l2b_fbrd_en_c3_scanin),
914// .scan_out(ff_l2t_l2b_fbrd_en_c3_scanout),
915// .dout(l2t_l2b_fbrd_en_c3),
916//);
917//
918//msff_ctl_macro ff_l2t_l2b_fbrd_wl_c3 (width=3)
919// (.din(filbuf_fbd_rd_entry_c2[2:0]),
920// .scan_in(ff_l2t_l2b_fbrd_wl_c3_scanin),
921// .scan_out(ff_l2t_l2b_fbrd_wl_c3_scanout),
922// .l1clk(l1clk),
923// .dout(l2t_l2b_fbrd_wl_c3[2:0]),
924//);
925////
926//msff_ctl_macro ff_l2t_l2b_fbwr_wl_r2 (width=3)
927// (.din(filbuf_fbd_wr_entry_r1[2:0]),
928// .scan_in(ff_l2t_l2b_fbwr_wl_r2_scanin),
929// .scan_out(ff_l2t_l2b_fbwr_wl_r2_scanout),
930// .l1clk(l1clk),
931// .dout(l2t_l2b_fbwr_wl_r2[2:0]),
932//);
933
934
935
936l2t_msff_ctl_macro__width_1 ff_inc_rdma_cnt_c5
937 (.din(tag_inc_rdma_cnt_c4), .l1clk(l1clk),
938 .scan_in(ff_inc_rdma_cnt_c5_scanin),
939 .scan_out(ff_inc_rdma_cnt_c5_scanout),
940 .dout(inc_rdma_cnt_c5),
941 .siclk(siclk),
942 .soclk(soclk)
943);
944
945// BS 03/11/04 extra cycle for mem access
946
947l2t_msff_ctl_macro__width_1 ff_inc_rdma_cnt_c52
948 (.din(inc_rdma_cnt_c5), .l1clk(l1clk),
949 .scan_in(ff_inc_rdma_cnt_c52_scanin),
950 .scan_out(ff_inc_rdma_cnt_c52_scanout),
951 .dout(inc_rdma_cnt_c52),
952 .siclk(siclk),
953 .soclk(soclk)
954);
955
956
957l2t_msff_ctl_macro__width_1 ff_inc_rdma_cnt_c6
958 (.din(inc_rdma_cnt_c52), .l1clk(l1clk),
959 .scan_in(ff_inc_rdma_cnt_c6_scanin),
960 .scan_out(ff_inc_rdma_cnt_c6_scanout),
961 .dout(inc_rdma_cnt_c6),
962 .siclk(siclk),
963 .soclk(soclk)
964);
965
966l2t_msff_ctl_macro__width_1 ff_inc_rdma_cnt_c7
967 (.din(inc_rdma_cnt_c6), .l1clk(l1clk),
968 .scan_in(ff_inc_rdma_cnt_c7_scanin),
969 .scan_out(ff_inc_rdma_cnt_c7_scanout),
970 .dout(inc_rdma_cnt_c7),
971 .siclk(siclk),
972 .soclk(soclk)
973);
974
975assign l2t_l2b_word_vld_c7 = inc_rdma_cnt_c7 ;
976
977l2t_msff_ctl_macro__width_1 ff_set_rdma_reg_vld_c5
978 (.din(tag_set_rdma_reg_vld_c4), .l1clk(l1clk),
979 .scan_in(ff_set_rdma_reg_vld_c5_scanin),
980 .scan_out(ff_set_rdma_reg_vld_c5_scanout),
981 .dout(set_rdma_reg_vld_c5),
982 .siclk(siclk),
983 .soclk(soclk)
984);
985
986// BS 03/11/04 extra cycle for mem access
987
988l2t_msff_ctl_macro__width_1 ff_set_rdma_reg_vld_c52
989 (.din(set_rdma_reg_vld_c5), .l1clk(l1clk),
990 .scan_in(ff_set_rdma_reg_vld_c52_scanin),
991 .scan_out(ff_set_rdma_reg_vld_c52_scanout),
992 .dout(set_rdma_reg_vld_c52),
993 .siclk(siclk),
994 .soclk(soclk)
995);
996
997
998l2t_msff_ctl_macro__width_1 ff_set_rdma_reg_vld_c6
999 (.din(set_rdma_reg_vld_c52), .l1clk(l1clk),
1000 .scan_in(ff_set_rdma_reg_vld_c6_scanin),
1001 .scan_out(ff_set_rdma_reg_vld_c6_scanout),
1002 .dout(set_rdma_reg_vld_c6),
1003 .siclk(siclk),
1004 .soclk(soclk)
1005);
1006
1007//msff_ctl_macro ff_set_rdma_reg_vld_c7 (width=1)
1008// (.din(set_rdma_reg_vld_c6), .l1clk(l1clk),
1009// .scan_in(ff_set_rdma_reg_vld_c7_scanin),
1010// .scan_out(ff_set_rdma_reg_vld_c7_scanout),
1011// .dout(set_rdma_reg_vld_c7),
1012//);
1013
1014assign l2t_l2b_ctag_en_c7 = set_rdma_reg_vld_c6 ;
1015
1016// BS 03/11/04 extra cycle for mem access
1017
1018l2t_msff_ctl_macro__width_1 ff_tag_siu_req_en_c6
1019 (.din(tag_siu_req_en_c52), .l1clk(l1clk),
1020 .scan_in(ff_tag_siu_req_en_c6_scanin),
1021 .scan_out(ff_tag_siu_req_en_c6_scanout),
1022 .dout(siu_req_en_c6),
1023 .siclk(siclk),
1024 .soclk(soclk)
1025);
1026
1027l2t_msff_ctl_macro__width_1 ff_tag_siu_req_en_c7
1028 (.din(siu_req_en_c6), .l1clk(l1clk),
1029 .scan_in(ff_tag_siu_req_en_c7_scanin),
1030 .scan_out(ff_tag_siu_req_en_c7_scanout),
1031 .dout(siu_req_en_c7),
1032 .siclk(siclk),
1033 .soclk(soclk)
1034);
1035
1036assign l2t_l2b_req_en_c7 = siu_req_en_c7 ;
1037
1038/////////////////////////////////////////
1039// rdma state counter.
1040// streaming to siu is mbist_done critical word
1041// first.
1042// The counter that determines the mux selects
1043// to do this is maintained here.
1044/////////////////////////////////////////
1045assign inc_state_en = inc_rdma_cnt_c6 & ~set_rdma_reg_vld_c6 ;
1046 // implies ld64 beyond c6.
1047
1048assign rdma_state_en = (inc_rdma_cnt_c6 | set_rdma_reg_vld_c6 );
1049
1050assign rdma_state_plus1 = rdma_state + 4'b1;
1051
1052
1053l2t_mux_ctl_macro__mux_aonpe__ports_2__width_4 mux_rdma_state_in
1054 (.dout (rdma_state_in[3:0]),
1055 .din0(rdma_state_plus1[3:0]),
1056 .din1(arbdp_rdma_addr_c6[5:2]),
1057 .sel0(inc_state_en),
1058 .sel1(~inc_state_en));
1059
1060
1061l2t_msff_ctl_macro__en_1__width_4 ff_rdmard_st
1062 (.din(rdma_state_in[3:0]),
1063 .scan_in(ff_rdmard_st_scanin),
1064 .scan_out(ff_rdmard_st_scanout),
1065 .en(rdma_state_en), .l1clk(l1clk),
1066 .dout(rdma_state[3:0]),
1067 .siclk(siclk),
1068 .soclk(soclk)
1069);
1070
1071assign l2t_l2b_word_c7 = rdma_state ;
1072
1073
1074//////////////////////////////////////////////////////////////////////////
1075// Buffer repeater for the rdma rd err
1076// signals.
1077// These signals are actually C11 signals coming
1078// in from l2b even though the suffix reads
1079// C10( rdmard operation is skewed by 1 cyc).
1080// Here's the pipeline.
1081//
1082//--------------------------------------------------------------------
1083// C5 C6 C7 C8 C9 C10 C11
1084//--------------------------------------------------------------------
1085// $rd $rd xmit xmit mux ecc xmit
1086// err
1087// to
1088// l2t
1089//--------------------------------------------------------------------
1090//
1091/////////////////////////////////////////////////////////////////////////
1092l2t_msff_ctl_macro__width_1 ff_rdmard_cerr_c12
1093 (.din(l2b_l2t_rdma_cerr_c10), .l1clk(l1clk),
1094 .scan_in(ff_rdmard_cerr_c12_scanin),
1095 .scan_out(ff_rdmard_cerr_c12_scanout),
1096 .dout(rdmat_rdmard_cerr_c12),
1097 .siclk(siclk),
1098 .soclk(soclk)
1099);
1100
1101l2t_msff_ctl_macro__width_1 ff_rdmard_uerr_c12
1102 (.din(l2b_l2t_rdma_uerr_c10), .l1clk(l1clk),
1103 .scan_in(ff_rdmard_uerr_c12_scanin),
1104 .scan_out(ff_rdmard_uerr_c12_scanout),
1105 .dout(rdmat_rdmard_uerr_c12),
1106 .siclk(siclk),
1107 .soclk(soclk)
1108);
1109
1110
1111l2t_msff_ctl_macro__width_1 ff_rdmard_notdata_c12
1112 (.din(l2b_l2t_rdma_notdata_c10), .l1clk(l1clk),
1113 .scan_in(ff_rdmard_notdata_c12_scanin),
1114 .scan_out(ff_rdmard_notdata_c12_scanout),
1115 .dout(rdmat_rdmard_notdata_c12),
1116 .siclk(siclk),
1117 .soclk(soclk)
1118);
1119
1120
1121l2t_msff_ctl_macro__width_1 ff_ev_uerr_r6
1122 (.din(l2b_l2t_ev_uerr_r5), .l1clk(l1clk),
1123 .scan_in(ff_ev_uerr_r6_scanin),
1124 .scan_out(ff_ev_uerr_r6_scanout),
1125 .dout(rdmat_ev_uerr_r6),
1126 .siclk(siclk),
1127 .soclk(soclk)
1128);
1129
1130l2t_msff_ctl_macro__width_1 ff_ev_cerr_r6
1131 (.din(l2b_l2t_ev_cerr_r5), .l1clk(l1clk),
1132 .scan_in(ff_ev_cerr_r6_scanin),
1133 .scan_out(ff_ev_cerr_r6_scanout),
1134 .dout(rdmat_ev_cerr_r6),
1135 .siclk(siclk),
1136 .soclk(soclk)
1137);
1138
1139
1140
1141// Flopped here for timing reasons
1142
1143
1144l2t_msff_ctl_macro__width_7 ff_dbg_signals
1145 (
1146 .scan_in(ff_dbg_signals_scanin),
1147 .scan_out(ff_dbg_signals_scanout),
1148 .din({l2t_dbg_xbar_vcid_unreg[5:0],l2t_dbg_sii_iq_dequeue_unreg}),
1149 .l1clk(l1clk),
1150 .dout({l2t_dbg_xbar_vcid[5:0],l2t_dbg_sii_iq_dequeue}),
1151 .siclk(siclk),
1152 .soclk(soclk)
1153 );
1154
1155
1156
1157
1158
1159
1160
1161
1162// fixscan start:
1163assign spares_scanin = scan_in ;
1164assign reset_flop_scanin = spares_scanout ;
1165assign ff_l2t_l2b_ctag_c7_scanin = reset_flop_scanout ;
1166assign ff_rdma_wr_ptr_s2_scanin = ff_l2t_l2b_ctag_c7_scanout;
1167assign ff_l2t_mb2_addr_scanin = ff_rdma_wr_ptr_s2_scanout;
1168assign ff_mb_run_scanin = ff_l2t_mb2_addr_scanout ;
1169assign ff_valid_bit_scanin = ff_mb_run_scanout ;
1170assign ff_arb_wbuf_hit_off_c2_scanin = ff_valid_bit_scanout ;
1171assign ff_rdma_mbist_cam_hit_scanin = ff_arb_wbuf_hit_off_c2_scanout;
1172assign ff_rdma_cam_hit_vec_c3_scanin = ff_rdma_mbist_cam_hit_scanout;
1173assign ff_rdma_cam_hit_vec_c4_scanin = ff_rdma_cam_hit_vec_c3_scanout;
1174assign ff_rdma_hit_qual_c3_scanin = ff_rdma_cam_hit_vec_c4_scanout;
1175assign ff_rdma_hit_qual_c4_scanin = ff_rdma_hit_qual_c3_scanout;
1176assign ff_mbid0_scanin = ff_rdma_hit_qual_c4_scanout;
1177assign ff_mbid1_scanin = ff_mbid0_scanout ;
1178assign ff_mbid2_scanin = ff_mbid1_scanout ;
1179assign ff_mbid3_scanin = ff_mbid2_scanout ;
1180assign ff_rdma_mbid_vld_scanin = ff_mbid3_scanout ;
1181assign ff_rdma_entry_c4_scanin = ff_rdma_mbid_vld_scanout ;
1182assign ff_mcu_req_scanin = ff_rdma_entry_c4_scanout ;
1183assign ff_rdma_acked_scanin = ff_mcu_req_scanout ;
1184assign ff_inc_rdma_cnt_c5_scanin = ff_rdma_acked_scanout ;
1185assign ff_inc_rdma_cnt_c52_scanin = ff_inc_rdma_cnt_c5_scanout;
1186assign ff_inc_rdma_cnt_c6_scanin = ff_inc_rdma_cnt_c52_scanout;
1187assign ff_inc_rdma_cnt_c7_scanin = ff_inc_rdma_cnt_c6_scanout;
1188assign ff_set_rdma_reg_vld_c5_scanin = ff_inc_rdma_cnt_c7_scanout;
1189assign ff_set_rdma_reg_vld_c52_scanin = ff_set_rdma_reg_vld_c5_scanout;
1190assign ff_set_rdma_reg_vld_c6_scanin = ff_set_rdma_reg_vld_c52_scanout;
1191assign ff_tag_siu_req_en_c6_scanin = ff_set_rdma_reg_vld_c6_scanout;
1192assign ff_tag_siu_req_en_c7_scanin = ff_tag_siu_req_en_c6_scanout;
1193assign ff_rdmard_st_scanin = ff_tag_siu_req_en_c7_scanout;
1194assign ff_rdmard_cerr_c12_scanin = ff_rdmard_st_scanout ;
1195assign ff_rdmard_uerr_c12_scanin = ff_rdmard_cerr_c12_scanout;
1196assign ff_rdmard_notdata_c12_scanin = ff_rdmard_uerr_c12_scanout;
1197assign ff_ev_uerr_r6_scanin = ff_rdmard_notdata_c12_scanout;
1198assign ff_ev_cerr_r6_scanin = ff_ev_uerr_r6_scanout ;
1199assign ff_dbg_signals_scanin = ff_ev_cerr_r6_scanout ;
1200assign scan_out = ff_dbg_signals_scanout ;
1201// fixscan end:
1202endmodule
1203
1204
1205
1206
1207// any PARAMS parms go into naming of macro
1208
1209module l2t_msff_ctl_macro__en_1__width_4 (
1210 din,
1211 en,
1212 l1clk,
1213 scan_in,
1214 siclk,
1215 soclk,
1216 dout,
1217 scan_out);
1218wire [3:0] fdin;
1219wire [2:0] so;
1220
1221 input [3:0] din;
1222 input en;
1223 input l1clk;
1224 input scan_in;
1225
1226
1227 input siclk;
1228 input soclk;
1229
1230 output [3:0] dout;
1231 output scan_out;
1232assign fdin[3:0] = (din[3:0] & {4{en}}) | (dout[3:0] & ~{4{en}});
1233
1234
1235dff #(4) d0_0 (
1236.l1clk(l1clk),
1237.siclk(siclk),
1238.soclk(soclk),
1239.d(fdin[3:0]),
1240.si({scan_in,so[2:0]}),
1241.so({so[2:0],scan_out}),
1242.q(dout[3:0])
1243);
1244
1245endmodule
1246
1247
1248
1249
1250
1251
1252// any PARAMS parms go into naming of macro
1253
1254module l2t_msff_ctl_macro__en_1__width_5 (
1255 din,
1256 en,
1257 l1clk,
1258 scan_in,
1259 siclk,
1260 soclk,
1261 dout,
1262 scan_out);
1263wire [4:0] fdin;
1264wire [3:0] so;
1265
1266 input [4:0] din;
1267 input en;
1268 input l1clk;
1269 input scan_in;
1270
1271
1272 input siclk;
1273 input soclk;
1274
1275 output [4:0] dout;
1276 output scan_out;
1277assign fdin[4:0] = (din[4:0] & {5{en}}) | (dout[4:0] & ~{5{en}});
1278
1279
1280
1281
1282
1283
1284dff #(5) d0_0 (
1285.l1clk(l1clk),
1286.siclk(siclk),
1287.soclk(soclk),
1288.d(fdin[4:0]),
1289.si({scan_in,so[3:0]}),
1290.so({so[3:0],scan_out}),
1291.q(dout[4:0])
1292);
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305endmodule
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316// any PARAMS parms go into naming of macro
1317
1318module l2t_msff_ctl_macro__width_32 (
1319 din,
1320 l1clk,
1321 scan_in,
1322 siclk,
1323 soclk,
1324 dout,
1325 scan_out);
1326wire [31:0] fdin;
1327wire [30:0] so;
1328
1329 input [31:0] din;
1330 input l1clk;
1331 input scan_in;
1332
1333
1334 input siclk;
1335 input soclk;
1336
1337 output [31:0] dout;
1338 output scan_out;
1339assign fdin[31:0] = din[31:0];
1340
1341
1342
1343
1344
1345
1346dff #(32) d0_0 (
1347.l1clk(l1clk),
1348.siclk(siclk),
1349.soclk(soclk),
1350.d(fdin[31:0]),
1351.si({scan_in,so[30:0]}),
1352.so({so[30:0],scan_out}),
1353.q(dout[31:0])
1354);
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367endmodule
1368
1369
1370
1371
1372
1373
1374
1375
1376// Description: Spare gate macro for control blocks
1377//
1378// Param num controls the number of times the macro is added
1379// flops=0 can be used to use only combination spare logic
1380
1381
1382module l2t_spare_ctl_macro__num_4 (
1383 l1clk,
1384 scan_in,
1385 siclk,
1386 soclk,
1387 scan_out);
1388wire si_0;
1389wire so_0;
1390wire spare0_flop_unused;
1391wire spare0_buf_32x_unused;
1392wire spare0_nand3_8x_unused;
1393wire spare0_inv_8x_unused;
1394wire spare0_aoi22_4x_unused;
1395wire spare0_buf_8x_unused;
1396wire spare0_oai22_4x_unused;
1397wire spare0_inv_16x_unused;
1398wire spare0_nand2_16x_unused;
1399wire spare0_nor3_4x_unused;
1400wire spare0_nand2_8x_unused;
1401wire spare0_buf_16x_unused;
1402wire spare0_nor2_16x_unused;
1403wire spare0_inv_32x_unused;
1404wire si_1;
1405wire so_1;
1406wire spare1_flop_unused;
1407wire spare1_buf_32x_unused;
1408wire spare1_nand3_8x_unused;
1409wire spare1_inv_8x_unused;
1410wire spare1_aoi22_4x_unused;
1411wire spare1_buf_8x_unused;
1412wire spare1_oai22_4x_unused;
1413wire spare1_inv_16x_unused;
1414wire spare1_nand2_16x_unused;
1415wire spare1_nor3_4x_unused;
1416wire spare1_nand2_8x_unused;
1417wire spare1_buf_16x_unused;
1418wire spare1_nor2_16x_unused;
1419wire spare1_inv_32x_unused;
1420wire si_2;
1421wire so_2;
1422wire spare2_flop_unused;
1423wire spare2_buf_32x_unused;
1424wire spare2_nand3_8x_unused;
1425wire spare2_inv_8x_unused;
1426wire spare2_aoi22_4x_unused;
1427wire spare2_buf_8x_unused;
1428wire spare2_oai22_4x_unused;
1429wire spare2_inv_16x_unused;
1430wire spare2_nand2_16x_unused;
1431wire spare2_nor3_4x_unused;
1432wire spare2_nand2_8x_unused;
1433wire spare2_buf_16x_unused;
1434wire spare2_nor2_16x_unused;
1435wire spare2_inv_32x_unused;
1436wire si_3;
1437wire so_3;
1438wire spare3_flop_unused;
1439wire spare3_buf_32x_unused;
1440wire spare3_nand3_8x_unused;
1441wire spare3_inv_8x_unused;
1442wire spare3_aoi22_4x_unused;
1443wire spare3_buf_8x_unused;
1444wire spare3_oai22_4x_unused;
1445wire spare3_inv_16x_unused;
1446wire spare3_nand2_16x_unused;
1447wire spare3_nor3_4x_unused;
1448wire spare3_nand2_8x_unused;
1449wire spare3_buf_16x_unused;
1450wire spare3_nor2_16x_unused;
1451wire spare3_inv_32x_unused;
1452
1453
1454input l1clk;
1455input scan_in;
1456input siclk;
1457input soclk;
1458output scan_out;
1459
1460cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
1461 .siclk(siclk),
1462 .soclk(soclk),
1463 .si(si_0),
1464 .so(so_0),
1465 .d(1'b0),
1466 .q(spare0_flop_unused));
1467assign si_0 = scan_in;
1468
1469cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
1470 .out(spare0_buf_32x_unused));
1471cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
1472 .in1(1'b1),
1473 .in2(1'b1),
1474 .out(spare0_nand3_8x_unused));
1475cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
1476 .out(spare0_inv_8x_unused));
1477cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
1478 .in01(1'b1),
1479 .in10(1'b1),
1480 .in11(1'b1),
1481 .out(spare0_aoi22_4x_unused));
1482cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
1483 .out(spare0_buf_8x_unused));
1484cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
1485 .in01(1'b1),
1486 .in10(1'b1),
1487 .in11(1'b1),
1488 .out(spare0_oai22_4x_unused));
1489cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
1490 .out(spare0_inv_16x_unused));
1491cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
1492 .in1(1'b1),
1493 .out(spare0_nand2_16x_unused));
1494cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
1495 .in1(1'b0),
1496 .in2(1'b0),
1497 .out(spare0_nor3_4x_unused));
1498cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
1499 .in1(1'b1),
1500 .out(spare0_nand2_8x_unused));
1501cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
1502 .out(spare0_buf_16x_unused));
1503cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
1504 .in1(1'b0),
1505 .out(spare0_nor2_16x_unused));
1506cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
1507 .out(spare0_inv_32x_unused));
1508
1509cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
1510 .siclk(siclk),
1511 .soclk(soclk),
1512 .si(si_1),
1513 .so(so_1),
1514 .d(1'b0),
1515 .q(spare1_flop_unused));
1516assign si_1 = so_0;
1517
1518cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
1519 .out(spare1_buf_32x_unused));
1520cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
1521 .in1(1'b1),
1522 .in2(1'b1),
1523 .out(spare1_nand3_8x_unused));
1524cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
1525 .out(spare1_inv_8x_unused));
1526cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
1527 .in01(1'b1),
1528 .in10(1'b1),
1529 .in11(1'b1),
1530 .out(spare1_aoi22_4x_unused));
1531cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
1532 .out(spare1_buf_8x_unused));
1533cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
1534 .in01(1'b1),
1535 .in10(1'b1),
1536 .in11(1'b1),
1537 .out(spare1_oai22_4x_unused));
1538cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
1539 .out(spare1_inv_16x_unused));
1540cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
1541 .in1(1'b1),
1542 .out(spare1_nand2_16x_unused));
1543cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
1544 .in1(1'b0),
1545 .in2(1'b0),
1546 .out(spare1_nor3_4x_unused));
1547cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
1548 .in1(1'b1),
1549 .out(spare1_nand2_8x_unused));
1550cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
1551 .out(spare1_buf_16x_unused));
1552cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
1553 .in1(1'b0),
1554 .out(spare1_nor2_16x_unused));
1555cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
1556 .out(spare1_inv_32x_unused));
1557
1558cl_sc1_msff_8x spare2_flop (.l1clk(l1clk),
1559 .siclk(siclk),
1560 .soclk(soclk),
1561 .si(si_2),
1562 .so(so_2),
1563 .d(1'b0),
1564 .q(spare2_flop_unused));
1565assign si_2 = so_1;
1566
1567cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
1568 .out(spare2_buf_32x_unused));
1569cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
1570 .in1(1'b1),
1571 .in2(1'b1),
1572 .out(spare2_nand3_8x_unused));
1573cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
1574 .out(spare2_inv_8x_unused));
1575cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
1576 .in01(1'b1),
1577 .in10(1'b1),
1578 .in11(1'b1),
1579 .out(spare2_aoi22_4x_unused));
1580cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
1581 .out(spare2_buf_8x_unused));
1582cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
1583 .in01(1'b1),
1584 .in10(1'b1),
1585 .in11(1'b1),
1586 .out(spare2_oai22_4x_unused));
1587cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
1588 .out(spare2_inv_16x_unused));
1589cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
1590 .in1(1'b1),
1591 .out(spare2_nand2_16x_unused));
1592cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
1593 .in1(1'b0),
1594 .in2(1'b0),
1595 .out(spare2_nor3_4x_unused));
1596cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
1597 .in1(1'b1),
1598 .out(spare2_nand2_8x_unused));
1599cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
1600 .out(spare2_buf_16x_unused));
1601cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
1602 .in1(1'b0),
1603 .out(spare2_nor2_16x_unused));
1604cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
1605 .out(spare2_inv_32x_unused));
1606
1607cl_sc1_msff_8x spare3_flop (.l1clk(l1clk),
1608 .siclk(siclk),
1609 .soclk(soclk),
1610 .si(si_3),
1611 .so(so_3),
1612 .d(1'b0),
1613 .q(spare3_flop_unused));
1614assign si_3 = so_2;
1615
1616cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
1617 .out(spare3_buf_32x_unused));
1618cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
1619 .in1(1'b1),
1620 .in2(1'b1),
1621 .out(spare3_nand3_8x_unused));
1622cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
1623 .out(spare3_inv_8x_unused));
1624cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
1625 .in01(1'b1),
1626 .in10(1'b1),
1627 .in11(1'b1),
1628 .out(spare3_aoi22_4x_unused));
1629cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
1630 .out(spare3_buf_8x_unused));
1631cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
1632 .in01(1'b1),
1633 .in10(1'b1),
1634 .in11(1'b1),
1635 .out(spare3_oai22_4x_unused));
1636cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
1637 .out(spare3_inv_16x_unused));
1638cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
1639 .in1(1'b1),
1640 .out(spare3_nand2_16x_unused));
1641cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
1642 .in1(1'b0),
1643 .in2(1'b0),
1644 .out(spare3_nor3_4x_unused));
1645cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
1646 .in1(1'b1),
1647 .out(spare3_nand2_8x_unused));
1648cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
1649 .out(spare3_buf_16x_unused));
1650cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
1651 .in1(1'b0),
1652 .out(spare3_nor2_16x_unused));
1653cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
1654 .out(spare3_inv_32x_unused));
1655assign scan_out = so_3;
1656
1657
1658
1659endmodule
1660
1661
1662
1663
1664// any PARAMS parms go into naming of macro
1665
1666module l2t_msff_ctl_macro__clr_1__width_4 (
1667 din,
1668 clr,
1669 l1clk,
1670 scan_in,
1671 siclk,
1672 soclk,
1673 dout,
1674 scan_out);
1675wire [3:0] fdin;
1676wire [2:0] so;
1677
1678 input [3:0] din;
1679 input clr;
1680 input l1clk;
1681 input scan_in;
1682
1683
1684 input siclk;
1685 input soclk;
1686
1687 output [3:0] dout;
1688 output scan_out;
1689assign fdin[3:0] = din[3:0] & ~{4{clr}};
1690
1691
1692
1693
1694
1695
1696dff #(4) d0_0 (
1697.l1clk(l1clk),
1698.siclk(siclk),
1699.soclk(soclk),
1700.d(fdin[3:0]),
1701.si({scan_in,so[2:0]}),
1702.so({so[2:0],scan_out}),
1703.q(dout[3:0])
1704);
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717endmodule
1718
1719