Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: l2t_wbuf_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 | module l2t_wbuf_ctl ( | |
36 | tcu_pce_ov, | |
37 | tcu_aclk, | |
38 | tcu_bclk, | |
39 | tcu_scan_en, | |
40 | scan_in, | |
41 | scan_out, | |
42 | l2clk, | |
43 | wmr_l, | |
44 | vlddir_dirty_evict_c3, | |
45 | arbdec_arbdp_inst_fb_c2, | |
46 | misbuf_wbuf_mbid_c4, | |
47 | misbuf_hit_c4, | |
48 | misbuf_filbuf_mcu_pick, | |
49 | csr_l2_bypass_mode_on, | |
50 | wb_cam_match_c2, | |
51 | wbuf_wbtag_write_wl_c4, | |
52 | wbuf_wbtag_write_en_c4, | |
53 | wbuf_wb_read_wl, | |
54 | wbuf_wb_read_en, | |
55 | wbuf_wbufrpt_leave_state0, | |
56 | arbadr_c1_addr_eq_wb_c4, | |
57 | arb_wbuf_hit_off_c1, | |
58 | arb_wbuf_inst_vld_c2, | |
59 | mcu_l2t_wr_ack, | |
60 | l2t_l2b_wbwr_wl_c6, | |
61 | l2t_l2b_wbwr_wen_c6, | |
62 | l2t_l2b_wbrd_wl_r0, | |
63 | l2t_l2b_ev_dword_r0, | |
64 | l2t_l2b_evict_en_r0, | |
65 | l2t_mcu_wr_req, | |
66 | wbuf_hit_unqual_c2, | |
67 | wbuf_misbuf_dep_rdy_en, | |
68 | wbuf_misbuf_dep_mbid, | |
69 | wbuf_arb_full_px1, | |
70 | wbuf_rdmat_read_wl, | |
71 | wbuf_rdmat_read_en, | |
72 | rdmat_pick_vec, | |
73 | rdmat_or_rdmat_valid, | |
74 | wbuf_wr_addr_sel, | |
75 | wbuf_wb_or_rdma_wr_req_en, | |
76 | l2t_l2b_rdma_rdwl_r0, | |
77 | wbuf_reset_rdmat_vld, | |
78 | wbuf_set_rdmat_acked, | |
79 | l2t_sii_wib_dequeue, | |
80 | l2t_siu_delay, | |
81 | l2t_dbg_sii_wib_dequeue, | |
82 | l2t_mb2_run, | |
83 | l2t_mb2_rdmatag_rd_en, | |
84 | l2t_mb2_wbtag_wr_en, | |
85 | l2t_mb2_wbtag_rd_en, | |
86 | l2t_mb2_addr, | |
87 | wbuf_wbufrpt_next_state_1, | |
88 | cycle_count_less_than_7_din, | |
89 | mcu_l2t_wr_ack_d1, | |
90 | wb_mbist_cam_hit, | |
91 | wb_mbist_cam_sel); | |
92 | wire dbginit_l; | |
93 | wire reset_flop_scanin; | |
94 | wire reset_flop_scanout; | |
95 | wire l1clk; | |
96 | wire pce_ov; | |
97 | wire stop; | |
98 | wire siclk; | |
99 | wire soclk; | |
100 | wire se; | |
101 | wire spares_scanin; | |
102 | wire spares_scanout; | |
103 | wire arb_wbuf_inst_vld_c3; | |
104 | wire ff_arb_wbuf_inst_vld_c3_scanin; | |
105 | wire ff_arb_wbuf_inst_vld_c3_scanout; | |
106 | wire arbdec_arbdp_inst_fb_c3; | |
107 | wire ff_arbdp_inst_fb_c3_scanin; | |
108 | wire ff_arbdp_inst_fb_c3_scanout; | |
109 | wire arb_wbuf_hit_off_c2; | |
110 | wire ff_arb_wbuf_hit_off_c2_scanin; | |
111 | wire ff_arb_wbuf_hit_off_c2_scanout; | |
112 | wire ff_mcu_l2t_wr_ack_d1_scanin; | |
113 | wire ff_mcu_l2t_wr_ack_d1_scanout; | |
114 | wire [7:0] wbuf_wbtag_write_wl_c4_fnl; | |
115 | wire [7:0] mbist_wbuf_wr_ptr; | |
116 | wire [2:0] l2t_mb2_addr_r3; | |
117 | wire l2t_mb2_rdmatag_rd_en_r1; | |
118 | wire l2t_mb2_rdmatag_rd_en_r2; | |
119 | wire l2t_mb2_wbtag_rd_en_r1; | |
120 | wire l2t_mb2_wbtag_rd_en_r2; | |
121 | wire [2:0] l2t_mb2_addr_r1; | |
122 | wire [2:0] l2t_mb2_addr_r2; | |
123 | wire ff_l2t_mb2_run_r1_scanin; | |
124 | wire ff_l2t_mb2_run_r1_scanout; | |
125 | wire l2t_mb2_rdmatag_rd_en_r3; | |
126 | wire l2t_mb2_wbtag_rd_en_r3; | |
127 | wire l2t_mb2_run_r1; | |
128 | wire ff_wbtag_write_wl_c5_scanin; | |
129 | wire ff_wbtag_write_wl_c5_scanout; | |
130 | wire ff_enc_write_wl_c52_scanin; | |
131 | wire ff_enc_write_wl_c52_scanout; | |
132 | wire ff_enc_write_wl_c6_scanin; | |
133 | wire ff_enc_write_wl_c6_scanout; | |
134 | wire l2_bypass_mode_on_d1; | |
135 | wire ff_l2_bypass_mode_on_d1_scanin; | |
136 | wire ff_l2_bypass_mode_on_d1_scanout; | |
137 | wire wbtag_write_en_c3_fnl; | |
138 | wire l2t_mb2_wbtag_wr_en_r2; | |
139 | wire l2t_mb2_wbtag_wr_en_r1; | |
140 | wire ff_wbtag_write_en_c4_scanin; | |
141 | wire ff_wbtag_write_en_c4_scanout; | |
142 | wire wbtag_write_we_c5; | |
143 | wire ff_wbtag_write_we_c5_scanin; | |
144 | wire ff_wbtag_write_we_c5_scanout; | |
145 | wire wbtag_write_we_c52; | |
146 | wire ff_wbtag_write_we_c52_scanin; | |
147 | wire ff_wbtag_write_we_c52_scanout; | |
148 | wire wbtag_write_we_c6; | |
149 | wire ff_wbtag_write_we_c6_scanin; | |
150 | wire ff_wbtag_write_we_c6_scanout; | |
151 | wire ff_wb_valid_scanin; | |
152 | wire ff_wb_valid_scanout; | |
153 | wire ff_wb_acked_scanin; | |
154 | wire ff_wb_acked_scanout; | |
155 | wire ff_bypass_en_c2_scanin; | |
156 | wire ff_bypass_en_c2_scanout; | |
157 | wire [7:0] wb_cam_match_c2_d1; | |
158 | wire wb_mbist_cam_sel_r1; | |
159 | wire ff_wb_cam_match_c2_scanin; | |
160 | wire ff_wb_cam_match_c2_scanout; | |
161 | wire wb_mbist_cam_hit_unreg; | |
162 | wire ff_wb_cam_hit_vec_c3_scanin; | |
163 | wire ff_wb_cam_hit_vec_c3_scanout; | |
164 | wire ff_wb_cam_hit_vec_c4_scanin; | |
165 | wire ff_wb_cam_hit_vec_c4_scanout; | |
166 | wire ff_wbuf_hit_qual_c3_scanin; | |
167 | wire ff_wbuf_hit_qual_c3_scanout; | |
168 | wire ff_wbuf_hit_qual_c4_scanin; | |
169 | wire ff_wbuf_hit_qual_c4_scanout; | |
170 | wire ff_mbid0_scanin; | |
171 | wire ff_mbid0_scanout; | |
172 | wire ff_mbid1_scanin; | |
173 | wire ff_mbid1_scanout; | |
174 | wire ff_mbid2_scanin; | |
175 | wire ff_mbid2_scanout; | |
176 | wire ff_mbid3_scanin; | |
177 | wire ff_mbid3_scanout; | |
178 | wire ff_mbid4_scanin; | |
179 | wire ff_mbid4_scanout; | |
180 | wire ff_mbid5_scanin; | |
181 | wire ff_mbid5_scanout; | |
182 | wire ff_mbid6_scanin; | |
183 | wire ff_mbid6_scanout; | |
184 | wire ff_mbid7_scanin; | |
185 | wire ff_mbid7_scanout; | |
186 | wire ff_wb_mbid_vld_scanin; | |
187 | wire ff_wb_mbid_vld_scanout; | |
188 | wire ff_or_wb_mbid_vld_scanin; | |
189 | wire ff_or_wb_mbid_vld_scanout; | |
190 | wire ff_state_scanin; | |
191 | wire ff_state_scanout; | |
192 | wire ff_mcu_req_pending_scanin; | |
193 | wire ff_mcu_req_pending_scanout; | |
194 | wire ff_cycle_count_scanin; | |
195 | wire ff_cycle_count_scanout; | |
196 | wire [3:0] l2t_rdma_rd_ptr; | |
197 | wire ff_latched_wb_read_wl_scanin; | |
198 | wire ff_latched_wb_read_wl_scanout; | |
199 | wire ff_latched_wb_read_en_scanin; | |
200 | wire ff_latched_wb_read_en_scanout; | |
201 | wire [1:0] l2t_l2b_rdma_rdwl_r0_prev; | |
202 | wire ff_l2t_l2b_rdma_rdwl_r0_scanin; | |
203 | wire ff_l2t_l2b_rdma_rdwl_r0_scanout; | |
204 | wire ff_latched_rdmad_read_wl_scanin; | |
205 | wire ff_latched_rdmad_read_wl_scanout; | |
206 | wire ff_latched_rdma_read_en_scanin; | |
207 | wire ff_latched_rdma_read_en_scanout; | |
208 | wire ff_wbuf_wr_addr_sel_scanin; | |
209 | wire ff_wbuf_wr_addr_sel_scanout; | |
210 | wire ff_wb_or_rdma_wr_req_en_scanin; | |
211 | wire ff_wb_or_rdma_wr_req_en_scanout; | |
212 | wire ff_l2t_mcu_wr_req_scanin; | |
213 | wire ff_l2t_mcu_wr_req_scanout; | |
214 | wire [2:0] l2t_l2b_wbrd_wl_r0_prev; | |
215 | wire ff_l2t_l2b_wbrd_wl_r0_scanin; | |
216 | wire ff_l2t_l2b_wbrd_wl_r0_scanout; | |
217 | wire cycle_count_less_than_7; | |
218 | wire l2t_l2b_evict_en_r0_d1_unused; | |
219 | wire ff_l2t_l2b_evict_en_r0_d1_scanin; | |
220 | wire ff_l2t_l2b_evict_en_r0_d1_scanout; | |
221 | wire ff_cycle_count_in_scanin; | |
222 | wire ff_cycle_count_in_scanout; | |
223 | wire l2t_sii_wib_dequeue_raw; | |
224 | wire ff_l2t_sii_wib_dequeue_scanin; | |
225 | wire ff_l2t_sii_wib_dequeue_scanout; | |
226 | wire l2t_sii_wib_dequeue_delay; | |
227 | wire ff_l2t_sii_wib_dequeue_delay_scanin; | |
228 | wire ff_l2t_sii_wib_dequeue_delay_scanout; | |
229 | wire ff_l2t_dbg_sii_wib_dequeue_scanin; | |
230 | wire ff_l2t_dbg_sii_wib_dequeue_scanout; | |
231 | wire ff_quad_state_scanin; | |
232 | wire ff_quad_state_scanout; | |
233 | wire ff_quad0_state_scanin; | |
234 | wire ff_quad0_state_scanout; | |
235 | wire ff_quad1_state_scanin; | |
236 | wire ff_quad1_state_scanout; | |
237 | wire ff_quad2_state_scanin; | |
238 | wire ff_quad2_state_scanout; | |
239 | wire ff_wb_count_scanin; | |
240 | wire ff_wb_count_scanout; | |
241 | wire ff_wbuf_arb_full_px1_scanin; | |
242 | wire ff_wbuf_arb_full_px1_scanout; | |
243 | ||
244 | ||
245 | input tcu_pce_ov; | |
246 | input tcu_aclk; | |
247 | input tcu_bclk; | |
248 | input tcu_scan_en; | |
249 | ||
250 | input scan_in; | |
251 | output scan_out; | |
252 | input l2clk; | |
253 | input wmr_l; | |
254 | ||
255 | input vlddir_dirty_evict_c3; | |
256 | // This indicates that the Tag of the instruction evicted | |
257 | // (i.e. lru_tag_c3) needs to written into the WB tag array. | |
258 | ||
259 | input arbdec_arbdp_inst_fb_c2; | |
260 | ||
261 | ||
262 | input [4:0] misbuf_wbuf_mbid_c4; // BS & SR 11/04/03, MB grows to 32 | |
263 | input misbuf_hit_c4; | |
264 | input misbuf_filbuf_mcu_pick; | |
265 | ||
266 | ||
267 | // from csr | |
268 | input csr_l2_bypass_mode_on; | |
269 | ||
270 | ||
271 | // from wbtag | |
272 | input [7:0] wb_cam_match_c2; | |
273 | output [7:0] wbuf_wbtag_write_wl_c4; // tag wr wl. Tag is written in C4 PH1 | |
274 | output wbuf_wbtag_write_en_c4; // tag wren Tag is written in C4 PH1 | |
275 | output [7:0] wbuf_wb_read_wl; | |
276 | output wbuf_wb_read_en; // look at read pipeline | |
277 | output wbuf_wbufrpt_leave_state0; | |
278 | ||
279 | ||
280 | // from arbaddr | |
281 | input arbadr_c1_addr_eq_wb_c4; | |
282 | ||
283 | // from arb. | |
284 | input arb_wbuf_hit_off_c1; // hit qualifier. | |
285 | input arb_wbuf_inst_vld_c2; | |
286 | ||
287 | ||
288 | input mcu_l2t_wr_ack; | |
289 | ||
290 | ||
291 | output [2:0] l2t_l2b_wbwr_wl_c6; // must come out of a flop | |
292 | output [3:0] l2t_l2b_wbwr_wen_c6; // must come out of a flop. 3:0 are the same | |
293 | output [2:0] l2t_l2b_wbrd_wl_r0; | |
294 | //output l2t_l2b_wbrd_en_r0; | |
295 | output [2:0] l2t_l2b_ev_dword_r0; | |
296 | output l2t_l2b_evict_en_r0; | |
297 | ||
298 | ||
299 | output l2t_mcu_wr_req; | |
300 | ||
301 | ||
302 | // to arbaddr | |
303 | ||
304 | // to misbuf. | |
305 | output wbuf_hit_unqual_c2; // hit not qualified with instruction valid. | |
306 | output wbuf_misbuf_dep_rdy_en; | |
307 | output [4:0] wbuf_misbuf_dep_mbid; // // BS & SR 11/04/03, MB grows to 32 | |
308 | ||
309 | ||
310 | // to arb. | |
311 | output wbuf_arb_full_px1; | |
312 | // Can accomodate two more instructions | |
313 | // This signal should come out of a flop | |
314 | ||
315 | ||
316 | output [3:0] wbuf_rdmat_read_wl; | |
317 | output wbuf_rdmat_read_en; | |
318 | ||
319 | input [3:0] rdmat_pick_vec ; // from rdmat. | |
320 | input rdmat_or_rdmat_valid ; | |
321 | ||
322 | output wbuf_wr_addr_sel; | |
323 | output wbuf_wb_or_rdma_wr_req_en; // to evctag | |
324 | ||
325 | output [1:0] l2t_l2b_rdma_rdwl_r0; | |
326 | //output l2t_l2b_rdma_rden_r0; | |
327 | ||
328 | // rdmat | |
329 | output [3:0] wbuf_reset_rdmat_vld; | |
330 | output [3:0] wbuf_set_rdmat_acked; | |
331 | ||
332 | // to siu | |
333 | output l2t_sii_wib_dequeue; | |
334 | input l2t_siu_delay; | |
335 | // to debug | |
336 | output l2t_dbg_sii_wib_dequeue; | |
337 | ||
338 | // mbist | |
339 | input l2t_mb2_run; | |
340 | input l2t_mb2_rdmatag_rd_en; | |
341 | input l2t_mb2_wbtag_wr_en; | |
342 | input l2t_mb2_wbtag_rd_en; | |
343 | input [2:0] l2t_mb2_addr; | |
344 | ||
345 | output wbuf_wbufrpt_next_state_1; | |
346 | output cycle_count_less_than_7_din; | |
347 | output mcu_l2t_wr_ack_d1; | |
348 | output wb_mbist_cam_hit; | |
349 | input wb_mbist_cam_sel; | |
350 | //////////////////////////////////////////////////////////////////////////////// | |
351 | wire mcu_l2t_wr_ack_d1; | |
352 | ||
353 | wire [7:0] wb_valid_in; | |
354 | wire [7:0] wb_valid; | |
355 | wire or_wb_valid; | |
356 | ||
357 | wire [2:0] enc_write_wl_c5, enc_write_wl_c52; // BS 03/11/04 extra cycle for mem access | |
358 | wire [2:0] enc_write_wl_c6; | |
359 | ||
360 | wire [7:0] wb_cam_hit_vec_c2; | |
361 | wire [7:0] wb_cam_hit_vec_c3; | |
362 | wire [7:0] wb_cam_hit_vec_c4; | |
363 | wire wbuf_hit_unqual_c2; | |
364 | wire wbuf_hit_qual_c2; | |
365 | wire wbuf_hit_qual_c3; | |
366 | wire wbuf_hit_qual_c4; | |
367 | ||
368 | wire [7:0] set_wb_valid; | |
369 | wire [7:0] reset_wb_valid; | |
370 | ||
371 | wire [7:0] set_wb_acked; | |
372 | wire [7:0] wb_acked_in; | |
373 | wire [7:0] wb_acked; | |
374 | ||
375 | wire mbid_wr_en; | |
376 | wire [7:0] sel_insert_mbid_c4; | |
377 | wire [4:0] mbid0; // BS & SR 11/04/03, MB grows to 32 | |
378 | wire [4:0] mbid1; // BS & SR 11/04/03, MB grows to 32 | |
379 | wire [4:0] mbid2; // BS & SR 11/04/03, MB grows to 32 | |
380 | wire [4:0] mbid3; // BS & SR 11/04/03, MB grows to 32 | |
381 | wire [4:0] mbid4; // BS & SR 11/04/03, MB grows to 32 | |
382 | wire [4:0] mbid5; // BS & SR 11/04/03, MB grows to 32 | |
383 | wire [4:0] mbid6; // BS & SR 11/04/03, MB grows to 32 | |
384 | wire [4:0] mbid7; // BS & SR 11/04/03, MB grows to 32 | |
385 | ||
386 | wire [7:0] wb_mbid_vld_in; | |
387 | wire [7:0] wb_mbid_vld; | |
388 | wire or_wb_mbid_vld_in; | |
389 | wire or_wb_mbid_vld; | |
390 | ||
391 | wire [7:0] sel_mbid; | |
392 | wire sel_default_mux1; | |
393 | wire sel_default_mux2; | |
394 | wire sel_default_mbentry; | |
395 | wire [4:0] sel_mbid3t0; // BS & SR 11/04/03, MB grows to 32 | |
396 | wire [4:0] sel_mbid7t4; // BS & SR 11/04/03, MB grows to 32 | |
397 | wire [4:0] sel_mbid7t0; // BS & SR 11/04/03, MB grows to 32 | |
398 | ||
399 | wire can_req_mcu; | |
400 | wire enter_state0; | |
401 | wire leave_state0; | |
402 | wire enter_state1; | |
403 | wire leave_state1; | |
404 | wire enter_state2; | |
405 | wire leave_state2; | |
406 | wire [2:0] next_state; | |
407 | wire [2:0] state; | |
408 | wire mcu_req_pending_in; | |
409 | wire mcu_req_pending; | |
410 | wire inc_cycle_count; | |
411 | wire [3:0] cycle_count_plus1; | |
412 | wire [3:0] next_cycle_count; | |
413 | wire [3:0] cycle_count_in; | |
414 | wire [3:0] cycle_count; | |
415 | wire l2t_l2b_evict_en_r0_d1; | |
416 | ||
417 | ||
418 | wire init_pick_state; | |
419 | wire sel_lshift_quad; | |
420 | wire sel_same_quad; | |
421 | wire [2:0] lshift_quad_state; | |
422 | wire [2:0] quad_state_in; | |
423 | wire [2:0] quad_state; | |
424 | ||
425 | wire sel_lshift_quad0; | |
426 | wire sel_same_quad0; | |
427 | wire [3:0] lshift_quad0_state; | |
428 | wire [3:0] quad0_state_in; | |
429 | wire [3:0] quad0_state; | |
430 | ||
431 | wire sel_lshift_quad1; | |
432 | wire sel_same_quad1; | |
433 | wire [3:0] lshift_quad1_state; | |
434 | wire [3:0] quad1_state_in; | |
435 | wire [3:0] quad1_state; | |
436 | ||
437 | wire sel_lshift_quad2; | |
438 | wire sel_same_quad2; | |
439 | wire [3:0] lshift_quad2_state; | |
440 | wire [3:0] quad2_state_in; | |
441 | wire [3:0] quad2_state; | |
442 | ||
443 | wire [3:0] pick_quad0_sel; | |
444 | wire [3:0] pick_quad1_sel; | |
445 | wire [3:0] pick_quad2_sel; | |
446 | ||
447 | wire [2:0] pick_quad_sel; | |
448 | ||
449 | wire [3:0] pick_quad0_in; | |
450 | wire [3:0] pick_quad1_in; | |
451 | wire [3:0] pick_quad2_in; | |
452 | ||
453 | wire [2:0] pick_quad_in; | |
454 | ||
455 | wire [7:0] pick_wb_read_wl; | |
456 | wire [3:0] pick_rdmat_read_wl ; | |
457 | wire [7:0] latched_wb_read_wl; | |
458 | wire [3:0] latched_rdmad_read_wl; | |
459 | wire latched_rdma_read_en, latched_wb_read_en ; | |
460 | ||
461 | wire [3:0] wb_count; | |
462 | wire [3:0] next_wb_count; | |
463 | wire [3:0] wb_count_plus1; | |
464 | wire [3:0] wb_count_minus1; | |
465 | wire inc_wb_count; | |
466 | wire dec_wb_count; | |
467 | wire same_wb_count; | |
468 | wire wb_count_5; | |
469 | wire wb_count_5_plus; | |
470 | wire wbuf_arb_full_px1_in; | |
471 | wire l2t_sii_wib_dequeue_prev; | |
472 | ||
473 | wire [7:0] wbtag_write_wl_c5; | |
474 | wire bypass_en_c1, bypass_en_c2; | |
475 | wire bypass_hit_en_c2; | |
476 | wire [7:0] wb_cam_hit_vec_tmp_c2; | |
477 | wire wbtag_write_en_c3; | |
478 | ||
479 | wire dbb_rst_l; | |
480 | wire [7:0] sel_mbid_rst; | |
481 | ||
482 | assign dbginit_l = 1'b1; | |
483 | ||
484 | /////////////////////////////////////////////////////////////////// | |
485 | // Reset flop | |
486 | /////////////////////////////////////////////////////////////////// | |
487 | ||
488 | l2t_wbuf_ctl_msff_ctl_macro__width_1 reset_flop | |
489 | (.dout(dbb_rst_l), | |
490 | .scan_in(reset_flop_scanin), | |
491 | .scan_out(reset_flop_scanout), | |
492 | .l1clk(l1clk), | |
493 | .din(wmr_l), | |
494 | .siclk(siclk), | |
495 | .soclk(soclk) | |
496 | ||
497 | ); | |
498 | ||
499 | ||
500 | ||
501 | ////////////////////////////////////////////////// | |
502 | // L1 clk header | |
503 | ////////////////////////////////////////////////// | |
504 | assign pce_ov = tcu_pce_ov; | |
505 | assign stop = 1'b0; | |
506 | assign siclk = tcu_aclk; | |
507 | assign soclk = tcu_bclk; | |
508 | assign se = tcu_scan_en; | |
509 | ||
510 | l2t_wbuf_ctl_l1clkhdr_ctl_macro clkgen ( | |
511 | .l2clk(l2clk), | |
512 | .l1en(1'b1 ), | |
513 | .l1clk(l1clk), | |
514 | .pce_ov(pce_ov), | |
515 | .stop(stop), | |
516 | .se(se)); | |
517 | ||
518 | ////////////////////////////////////////////////// | |
519 | ||
520 | ////////////////////////////////////////// | |
521 | // Spare gate insertion | |
522 | ////////////////////////////////////////// | |
523 | l2t_wbuf_ctl_spare_ctl_macro__num_4 spares ( | |
524 | .scan_in(spares_scanin), | |
525 | .scan_out(spares_scanout), | |
526 | .l1clk (l1clk), | |
527 | .siclk(siclk), | |
528 | .soclk(soclk) | |
529 | ); | |
530 | ////////////////////////////////////////// | |
531 | ||
532 | ||
533 | ||
534 | //////////////////////////////////////////////////////////////////////////////// | |
535 | ||
536 | ||
537 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_arb_wbuf_inst_vld_c3 | |
538 | (.dout (arb_wbuf_inst_vld_c3), | |
539 | .scan_in(ff_arb_wbuf_inst_vld_c3_scanin), | |
540 | .scan_out(ff_arb_wbuf_inst_vld_c3_scanout), | |
541 | .din (arb_wbuf_inst_vld_c2), | |
542 | .l1clk (l1clk), | |
543 | .siclk(siclk), | |
544 | .soclk(soclk) | |
545 | ||
546 | ||
547 | ) ; | |
548 | ||
549 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_arbdp_inst_fb_c3 | |
550 | (.dout (arbdec_arbdp_inst_fb_c3), | |
551 | .scan_in(ff_arbdp_inst_fb_c3_scanin), | |
552 | .scan_out(ff_arbdp_inst_fb_c3_scanout), | |
553 | .din (arbdec_arbdp_inst_fb_c2), | |
554 | .l1clk (l1clk), | |
555 | .siclk(siclk), | |
556 | .soclk(soclk) | |
557 | ||
558 | ||
559 | ) ; | |
560 | ||
561 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_arb_wbuf_hit_off_c2 | |
562 | (.dout (arb_wbuf_hit_off_c2), | |
563 | .scan_in(ff_arb_wbuf_hit_off_c2_scanin), | |
564 | .scan_out(ff_arb_wbuf_hit_off_c2_scanout), | |
565 | .din (arb_wbuf_hit_off_c1), | |
566 | .l1clk (l1clk), | |
567 | .siclk(siclk), | |
568 | .soclk(soclk) | |
569 | ||
570 | ||
571 | ) ; | |
572 | ||
573 | l2t_wbuf_ctl_msff_ctl_macro__dmsff_32x__width_1 ff_mcu_l2t_wr_ack_d1 | |
574 | (.dout (mcu_l2t_wr_ack_d1), | |
575 | .scan_in(ff_mcu_l2t_wr_ack_d1_scanin), | |
576 | .scan_out(ff_mcu_l2t_wr_ack_d1_scanout), | |
577 | .din (mcu_l2t_wr_ack), | |
578 | .l1clk (l1clk), | |
579 | .siclk(siclk), | |
580 | .soclk(soclk) | |
581 | ) ; | |
582 | ||
583 | ||
584 | ||
585 | //////////////////////////////////////////////////////////////////////////////// | |
586 | // eviction pipeline. | |
587 | //------------------------------------------------------------------------------ | |
588 | // C2 C3 C4 C5 C6 C7 | |
589 | //------------------------------------------------------------------------------ | |
590 | // lru dirty xmit rd data rd_data write | |
591 | // calc. evict lru way array array. WB array | |
592 | // in PH2 | |
593 | // xmit | |
594 | // lru way | |
595 | // | |
596 | // wen and wl write wtag xmit | |
597 | // generation array in wl for write | |
598 | // for wbtag. PH1 and wen. | |
599 | //------------------------------------------------------------------------------ | |
600 | //////////////////////////////////////////////////////////////////////////////// | |
601 | ||
602 | assign wbuf_wbtag_write_wl_c4_fnl[0] = ~wb_valid[0] ; | |
603 | assign wbuf_wbtag_write_wl_c4_fnl[1] = ~wb_valid[1] & wb_valid[0] ; | |
604 | assign wbuf_wbtag_write_wl_c4_fnl[2] = ~wb_valid[2] & (&(wb_valid[1:0])) ; | |
605 | assign wbuf_wbtag_write_wl_c4_fnl[3] = ~wb_valid[3] & (&(wb_valid[2:0])) ; | |
606 | assign wbuf_wbtag_write_wl_c4_fnl[4] = ~wb_valid[4] & (&(wb_valid[3:0])) ; | |
607 | assign wbuf_wbtag_write_wl_c4_fnl[5] = ~wb_valid[5] & (&(wb_valid[4:0])) ; | |
608 | assign wbuf_wbtag_write_wl_c4_fnl[6] = ~wb_valid[6] & (&(wb_valid[5:0])) ; | |
609 | assign wbuf_wbtag_write_wl_c4_fnl[7] = ~wb_valid[7] & (&(wb_valid[6:0])) ; | |
610 | ||
611 | ||
612 | assign mbist_wbuf_wr_ptr[0] = (l2t_mb2_addr_r3[2:0] == 3'b000); | |
613 | assign mbist_wbuf_wr_ptr[1] = (l2t_mb2_addr_r3[2:0] == 3'b001); | |
614 | assign mbist_wbuf_wr_ptr[2] = (l2t_mb2_addr_r3[2:0] == 3'b010); | |
615 | assign mbist_wbuf_wr_ptr[3] = (l2t_mb2_addr_r3[2:0] == 3'b011); | |
616 | assign mbist_wbuf_wr_ptr[4] = (l2t_mb2_addr_r3[2:0] == 3'b100); | |
617 | assign mbist_wbuf_wr_ptr[5] = (l2t_mb2_addr_r3[2:0] == 3'b101); | |
618 | assign mbist_wbuf_wr_ptr[6] = (l2t_mb2_addr_r3[2:0] == 3'b110); | |
619 | assign mbist_wbuf_wr_ptr[7] = (l2t_mb2_addr_r3[2:0] == 3'b111); | |
620 | ||
621 | ||
622 | ||
623 | l2t_wbuf_ctl_msff_ctl_macro__width_16 ff_l2t_mb2_run_r1 | |
624 | (.din({l2t_mb2_rdmatag_rd_en,l2t_mb2_rdmatag_rd_en_r1,l2t_mb2_rdmatag_rd_en_r2, | |
625 | l2t_mb2_wbtag_rd_en,l2t_mb2_wbtag_rd_en_r1,l2t_mb2_wbtag_rd_en_r2, | |
626 | l2t_mb2_addr[2:0],l2t_mb2_addr_r1[2:0],l2t_mb2_addr_r2[2:0],l2t_mb2_run}), | |
627 | .l1clk(l1clk), | |
628 | .scan_in(ff_l2t_mb2_run_r1_scanin), | |
629 | .scan_out(ff_l2t_mb2_run_r1_scanout), | |
630 | .dout({l2t_mb2_rdmatag_rd_en_r1,l2t_mb2_rdmatag_rd_en_r2,l2t_mb2_rdmatag_rd_en_r3, | |
631 | l2t_mb2_wbtag_rd_en_r1,l2t_mb2_wbtag_rd_en_r2,l2t_mb2_wbtag_rd_en_r3, | |
632 | l2t_mb2_addr_r1[2:0],l2t_mb2_addr_r2[2:0],l2t_mb2_addr_r3[2:0],l2t_mb2_run_r1}), | |
633 | .siclk(siclk), | |
634 | .soclk(soclk) | |
635 | ); | |
636 | ||
637 | ||
638 | ||
639 | assign wbuf_wbtag_write_wl_c4[7:0] = l2t_mb2_run_r1 ? mbist_wbuf_wr_ptr[7:0] : wbuf_wbtag_write_wl_c4_fnl[7:0] ; | |
640 | ||
641 | ||
642 | ||
643 | ||
644 | ||
645 | l2t_wbuf_ctl_msff_ctl_macro__width_8 ff_wbtag_write_wl_c5 | |
646 | (.dout (wbtag_write_wl_c5[7:0]), | |
647 | .scan_in(ff_wbtag_write_wl_c5_scanin), | |
648 | .scan_out(ff_wbtag_write_wl_c5_scanout), | |
649 | .din (wbuf_wbtag_write_wl_c4[7:0]), | |
650 | .l1clk (l1clk), | |
651 | .siclk(siclk), | |
652 | .soclk(soclk) | |
653 | ||
654 | ||
655 | ) ; | |
656 | ||
657 | assign enc_write_wl_c5[0] = (wbtag_write_wl_c5[1] | wbtag_write_wl_c5[3] | | |
658 | wbtag_write_wl_c5[5] | wbtag_write_wl_c5[7]) ; | |
659 | assign enc_write_wl_c5[1] = (wbtag_write_wl_c5[2] | wbtag_write_wl_c5[3] | | |
660 | wbtag_write_wl_c5[6] | wbtag_write_wl_c5[7]) ; | |
661 | assign enc_write_wl_c5[2] = (wbtag_write_wl_c5[4] | wbtag_write_wl_c5[5] | | |
662 | wbtag_write_wl_c5[6] | wbtag_write_wl_c5[7]) ; | |
663 | ||
664 | // BS 03/11/04 extra cycle for mem access | |
665 | ||
666 | l2t_wbuf_ctl_msff_ctl_macro__width_3 ff_enc_write_wl_c52 | |
667 | (.dout (enc_write_wl_c52[2:0]), | |
668 | .scan_in(ff_enc_write_wl_c52_scanin), | |
669 | .scan_out(ff_enc_write_wl_c52_scanout), | |
670 | .din (enc_write_wl_c5[2:0]), | |
671 | .l1clk (l1clk), | |
672 | .siclk(siclk), | |
673 | .soclk(soclk) | |
674 | ||
675 | ||
676 | ) ; | |
677 | ||
678 | l2t_wbuf_ctl_msff_ctl_macro__width_3 ff_enc_write_wl_c6 | |
679 | (.dout (enc_write_wl_c6[2:0]), | |
680 | .scan_in(ff_enc_write_wl_c6_scanin), | |
681 | .scan_out(ff_enc_write_wl_c6_scanout), | |
682 | .din (enc_write_wl_c52[2:0]), | |
683 | .l1clk (l1clk), | |
684 | .siclk(siclk), | |
685 | .soclk(soclk) | |
686 | ||
687 | ||
688 | ) ; | |
689 | ||
690 | ||
691 | ///////////////////////////////////////////////////////////////////////////////// | |
692 | // A fill causes the WBB to be written in L2 $ off mode. | |
693 | // Here is the pipeline for a Fill in OFF mode. | |
694 | // | |
695 | // C5 C6 C7 C8 C8 | |
696 | // | |
697 | // read FB mux xmit data write | |
698 | // with in l2d in l2b WB | |
699 | // $ data. | |
700 | // | |
701 | // write xmit setup | |
702 | // wbtag wl and wen wb write | |
703 | // in PH1 from l2t en and wl | |
704 | // | |
705 | ///////////////////////////////////////////////////////////////////////////////// | |
706 | ||
707 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_l2_bypass_mode_on_d1 | |
708 | (.dout (l2_bypass_mode_on_d1), | |
709 | .scan_in(ff_l2_bypass_mode_on_d1_scanin), | |
710 | .scan_out(ff_l2_bypass_mode_on_d1_scanout), | |
711 | .din (csr_l2_bypass_mode_on), | |
712 | .l1clk (l1clk), | |
713 | .siclk(siclk), | |
714 | .soclk(soclk) | |
715 | ) ; | |
716 | ||
717 | assign wbtag_write_en_c3_fnl = vlddir_dirty_evict_c3 | | |
718 | (l2_bypass_mode_on_d1 & arbdec_arbdp_inst_fb_c3 & | |
719 | arb_wbuf_inst_vld_c3) ; | |
720 | ||
721 | assign wbtag_write_en_c3 = l2t_mb2_run_r1 ? l2t_mb2_wbtag_wr_en_r2 : wbtag_write_en_c3_fnl; | |
722 | ||
723 | l2t_wbuf_ctl_msff_ctl_macro__width_3 ff_wbtag_write_en_c4 | |
724 | (.dout ({l2t_mb2_wbtag_wr_en_r1,l2t_mb2_wbtag_wr_en_r2,wbuf_wbtag_write_en_c4}), | |
725 | .scan_in(ff_wbtag_write_en_c4_scanin), | |
726 | .scan_out(ff_wbtag_write_en_c4_scanout), | |
727 | .din ({l2t_mb2_wbtag_wr_en,l2t_mb2_wbtag_wr_en_r1,wbtag_write_en_c3}), | |
728 | .l1clk (l1clk), | |
729 | .siclk(siclk), | |
730 | .soclk(soclk) | |
731 | ||
732 | ||
733 | ) ; | |
734 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wbtag_write_we_c5 | |
735 | (.dout (wbtag_write_we_c5), | |
736 | .scan_in(ff_wbtag_write_we_c5_scanin), | |
737 | .scan_out(ff_wbtag_write_we_c5_scanout), | |
738 | .din (wbuf_wbtag_write_en_c4), | |
739 | .l1clk (l1clk), | |
740 | .siclk(siclk), | |
741 | .soclk(soclk) | |
742 | ||
743 | ||
744 | ) ; | |
745 | ||
746 | // BS 03/11/04 extra cycle for mem access | |
747 | ||
748 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wbtag_write_we_c52 | |
749 | (.dout (wbtag_write_we_c52), | |
750 | .scan_in(ff_wbtag_write_we_c52_scanin), | |
751 | .scan_out(ff_wbtag_write_we_c52_scanout), | |
752 | .din (wbtag_write_we_c5), | |
753 | .l1clk (l1clk), | |
754 | .siclk(siclk), | |
755 | .soclk(soclk) | |
756 | ||
757 | ||
758 | ) ; | |
759 | ||
760 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wbtag_write_we_c6 | |
761 | (.dout (wbtag_write_we_c6), | |
762 | .scan_in(ff_wbtag_write_we_c6_scanin), | |
763 | .scan_out(ff_wbtag_write_we_c6_scanout), | |
764 | .din (wbtag_write_we_c52), | |
765 | .l1clk (l1clk), | |
766 | .siclk(siclk), | |
767 | .soclk(soclk) | |
768 | ||
769 | ||
770 | ) ; | |
771 | ||
772 | ///////////////////////////////////////////////////////////////////////////////// | |
773 | // An eviction causes the WBB to be written in L2 $ ON mode. | |
774 | // | |
775 | // C5 C6 C7 C8 C9 | |
776 | // | |
777 | // read $ read $ cyc2 xmit data xmit write | |
778 | // inside l2d to l2b data into wbb | |
779 | // | |
780 | // | |
781 | // | |
782 | // write xmit wl setup | |
783 | // wbtag to wbdata wb write | |
784 | // in PH1 en and wl | |
785 | // | |
786 | // | |
787 | // IN OFF mode, the wl and wen are transmitted to l2b in the C6 cycle of | |
788 | // a Fill operation. | |
789 | // A fill is indicated by arbdec_arbdp_inst_fb_c3 & arb_wbuf_inst_vld_c3 | |
790 | ///////////////////////////////////////////////////////////////////////////////// | |
791 | ||
792 | assign l2t_l2b_wbwr_wl_c6[2:0] = enc_write_wl_c6[2:0] ; | |
793 | assign l2t_l2b_wbwr_wen_c6[3:0] = {4{wbtag_write_we_c6}} ; | |
794 | ||
795 | ||
796 | ||
797 | //////////////////////////////////////////////////////////////////////////////// | |
798 | // VALID bit | |
799 | // Set on insertion. | |
800 | // Reset on an eviction to DRAM. | |
801 | //////////////////////////////////////////////////////////////////////////////// | |
802 | ||
803 | ||
804 | ||
805 | assign wbuf_reset_rdmat_vld = {4{leave_state2}} & latched_rdmad_read_wl ; | |
806 | assign wbuf_set_rdmat_acked = {4{leave_state1}} & latched_rdmad_read_wl ; | |
807 | ||
808 | assign set_wb_valid = {8{wbtag_write_we_c5}} & wbtag_write_wl_c5 ; | |
809 | assign reset_wb_valid = {8{leave_state2}} & latched_wb_read_wl ; | |
810 | assign wb_valid_in = (wb_valid | set_wb_valid) & ~(reset_wb_valid) ; | |
811 | ||
812 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_8 ff_wb_valid // sync reset active low | |
813 | (.dout (wb_valid[7:0]), | |
814 | .scan_in(ff_wb_valid_scanin), | |
815 | .scan_out(ff_wb_valid_scanout), | |
816 | .din (wb_valid_in[7:0]), | |
817 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
818 | .siclk(siclk), | |
819 | .soclk(soclk) | |
820 | ||
821 | ||
822 | ) ; | |
823 | ||
824 | assign or_wb_valid = |(wb_valid[7:0]) ; | |
825 | ||
826 | ||
827 | //////////////////////////////////////////////////////////////////////////////// | |
828 | // ACKED bit | |
829 | // Set when an entry is acked by the DRAM controller. | |
830 | // Reset when the valid bit is reset i.e. on an eviction to DRAM. | |
831 | //////////////////////////////////////////////////////////////////////////////// | |
832 | ||
833 | assign set_wb_acked = ({8{leave_state1}} & latched_wb_read_wl) ; | |
834 | assign wb_acked_in = (wb_acked | set_wb_acked) & ~reset_wb_valid ; | |
835 | ||
836 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_8 ff_wb_acked // sync reset active low | |
837 | (.dout (wb_acked[7:0]), | |
838 | .scan_in(ff_wb_acked_scanin), | |
839 | .scan_out(ff_wb_acked_scanout), | |
840 | .din (wb_acked_in[7:0]), | |
841 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
842 | .siclk(siclk), | |
843 | .soclk(soclk) | |
844 | ||
845 | ||
846 | ) ; | |
847 | ||
848 | ||
849 | ||
850 | ||
851 | /////////////////////////////////////////////// | |
852 | // Updated on 11/10/2002 | |
853 | // bypassing of wb_write_data | |
854 | // required for generation | |
855 | // of wb hit. | |
856 | // evicted tag is written into the WBB in C5. | |
857 | // The operation in C2 in that cycle will have | |
858 | // to see the effect of the wb write. Hence the | |
859 | // C4 address being written into the tag is compared | |
860 | // with the address of the instruction in C1. | |
861 | ////////////////////////////////////////////// | |
862 | ||
863 | assign bypass_en_c1 = arbadr_c1_addr_eq_wb_c4 & wbuf_wbtag_write_en_c4; | |
864 | ||
865 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_bypass_en_c2 | |
866 | (.dout (bypass_en_c2), | |
867 | .scan_in(ff_bypass_en_c2_scanin), | |
868 | .scan_out(ff_bypass_en_c2_scanout), | |
869 | .din (bypass_en_c1), | |
870 | .l1clk (l1clk), | |
871 | .siclk(siclk), | |
872 | .soclk(soclk) | |
873 | ) ; | |
874 | ||
875 | l2t_wbuf_ctl_msff_ctl_macro__width_10 ff_wb_cam_match_c2 | |
876 | (.dout ({wb_mbist_cam_hit,wb_cam_match_c2_d1[7:0],wb_mbist_cam_sel_r1}), | |
877 | .scan_in(ff_wb_cam_match_c2_scanin), | |
878 | .scan_out(ff_wb_cam_match_c2_scanout), | |
879 | .din ({wb_mbist_cam_hit_unreg,wb_cam_match_c2[7:0],wb_mbist_cam_sel}), | |
880 | .l1clk (l1clk), | |
881 | .siclk(siclk), | |
882 | .soclk(soclk) | |
883 | ) ; | |
884 | ||
885 | ||
886 | assign wb_mbist_cam_hit_unreg = wb_mbist_cam_sel_r1 ? |(wb_cam_match_c2_d1[7:0]) : 1'b0; | |
887 | ||
888 | assign bypass_hit_en_c2 = ( bypass_en_c2 & ~arb_wbuf_hit_off_c2 ) ; | |
889 | ||
890 | assign wb_cam_hit_vec_tmp_c2 = ( (wb_cam_match_c2[7:0] & wb_valid[7:0]) & | |
891 | ~(wb_acked[7:0] | {8{arb_wbuf_hit_off_c2}}) ) ; | |
892 | ||
893 | assign wbuf_hit_unqual_c2 = (|(wb_cam_hit_vec_tmp_c2[7:0])) | | |
894 | bypass_hit_en_c2 ; | |
895 | ||
896 | assign wb_cam_hit_vec_c2 = ( wb_cam_hit_vec_tmp_c2 ) | | |
897 | ( {8{bypass_hit_en_c2}} & wbtag_write_wl_c5 ) ; | |
898 | ||
899 | ||
900 | l2t_wbuf_ctl_msff_ctl_macro__width_8 ff_wb_cam_hit_vec_c3 | |
901 | (.dout (wb_cam_hit_vec_c3[7:0]), | |
902 | .scan_in(ff_wb_cam_hit_vec_c3_scanin), | |
903 | .scan_out(ff_wb_cam_hit_vec_c3_scanout), | |
904 | .din (wb_cam_hit_vec_c2[7:0]), | |
905 | .l1clk (l1clk), | |
906 | .siclk(siclk), | |
907 | .soclk(soclk) | |
908 | ||
909 | ||
910 | ) ; | |
911 | l2t_wbuf_ctl_msff_ctl_macro__width_8 ff_wb_cam_hit_vec_c4 | |
912 | (.dout (wb_cam_hit_vec_c4[7:0]), | |
913 | .scan_in(ff_wb_cam_hit_vec_c4_scanin), | |
914 | .scan_out(ff_wb_cam_hit_vec_c4_scanout), | |
915 | .din (wb_cam_hit_vec_c3[7:0]), | |
916 | .l1clk (l1clk), | |
917 | .siclk(siclk), | |
918 | .soclk(soclk) | |
919 | ||
920 | ||
921 | ) ; | |
922 | ||
923 | ||
924 | assign wbuf_hit_qual_c2 = wbuf_hit_unqual_c2 & arb_wbuf_inst_vld_c2 ; | |
925 | ||
926 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wbuf_hit_qual_c3 | |
927 | (.dout (wbuf_hit_qual_c3), | |
928 | .scan_in(ff_wbuf_hit_qual_c3_scanin), | |
929 | .scan_out(ff_wbuf_hit_qual_c3_scanout), | |
930 | .din (wbuf_hit_qual_c2), | |
931 | .l1clk (l1clk), | |
932 | .siclk(siclk), | |
933 | .soclk(soclk) | |
934 | ||
935 | ||
936 | ) ; | |
937 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wbuf_hit_qual_c4 | |
938 | (.dout (wbuf_hit_qual_c4), | |
939 | .scan_in(ff_wbuf_hit_qual_c4_scanin), | |
940 | .scan_out(ff_wbuf_hit_qual_c4_scanout), | |
941 | .din (wbuf_hit_qual_c3), | |
942 | .l1clk (l1clk), | |
943 | .siclk(siclk), | |
944 | .soclk(soclk) | |
945 | ||
946 | ||
947 | ) ; | |
948 | ||
949 | ||
950 | //////////////////////////////////////////////////////////////////////////////// | |
951 | // MBID and MBID_vld. | |
952 | // Written in the C4 cycle of a non-dependent instruction that hits | |
953 | // the Writeback buffer. | |
954 | // | |
955 | // When an ack is received from DRAM for the entry with mbid_vld, | |
956 | // the corresponding mbid is used to wake up the miss buffer entry | |
957 | // that depends on the write.The ack may be received when the instruction | |
958 | // is in flight i.e in C2, C3 otr C4 and yet to set mbid vld. But that is | |
959 | // okay since the "acked" bit can only be set for one entry in the WBB at | |
960 | // a time. | |
961 | // MBID_vld is reset when an entry has mbid_vld =1 and acked=1 | |
962 | // | |
963 | //////////////////////////////////////////////////////////////////////////////// | |
964 | assign mbid_wr_en = wbuf_hit_qual_c4 & ~misbuf_hit_c4; | |
965 | assign sel_insert_mbid_c4 = {8{mbid_wr_en}} & wb_cam_hit_vec_c4[7:0] ; | |
966 | ||
967 | ||
968 | // BS & SR 11/04/03, MB grows to 32 | |
969 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid0 | |
970 | (.dout (mbid0[4:0]), | |
971 | .scan_in(ff_mbid0_scanin), | |
972 | .scan_out(ff_mbid0_scanout), | |
973 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
974 | .en (sel_insert_mbid_c4[0]), | |
975 | .l1clk (l1clk), | |
976 | .siclk(siclk), | |
977 | .soclk(soclk) | |
978 | ||
979 | ||
980 | ) ; | |
981 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid1 | |
982 | (.dout (mbid1[4:0]), | |
983 | .scan_in(ff_mbid1_scanin), | |
984 | .scan_out(ff_mbid1_scanout), | |
985 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
986 | .en (sel_insert_mbid_c4[1]), | |
987 | .l1clk (l1clk), | |
988 | .siclk(siclk), | |
989 | .soclk(soclk) | |
990 | ||
991 | ||
992 | ) ; | |
993 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid2 | |
994 | (.dout (mbid2[4:0]), | |
995 | .scan_in(ff_mbid2_scanin), | |
996 | .scan_out(ff_mbid2_scanout), | |
997 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
998 | .en (sel_insert_mbid_c4[2]), | |
999 | .l1clk (l1clk), | |
1000 | .siclk(siclk), | |
1001 | .soclk(soclk) | |
1002 | ||
1003 | ||
1004 | ) ; | |
1005 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid3 | |
1006 | (.dout (mbid3[4:0]), | |
1007 | .scan_in(ff_mbid3_scanin), | |
1008 | .scan_out(ff_mbid3_scanout), | |
1009 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
1010 | .en (sel_insert_mbid_c4[3]), | |
1011 | .l1clk (l1clk), | |
1012 | .siclk(siclk), | |
1013 | .soclk(soclk) | |
1014 | ||
1015 | ||
1016 | ) ; | |
1017 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid4 | |
1018 | (.dout (mbid4[4:0]), | |
1019 | .scan_in(ff_mbid4_scanin), | |
1020 | .scan_out(ff_mbid4_scanout), | |
1021 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
1022 | .en (sel_insert_mbid_c4[4]), | |
1023 | .l1clk (l1clk), | |
1024 | .siclk(siclk), | |
1025 | .soclk(soclk) | |
1026 | ||
1027 | ||
1028 | ) ; | |
1029 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid5 | |
1030 | (.dout (mbid5[4:0]), | |
1031 | .scan_in(ff_mbid5_scanin), | |
1032 | .scan_out(ff_mbid5_scanout), | |
1033 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
1034 | .en (sel_insert_mbid_c4[5]), | |
1035 | .l1clk (l1clk), | |
1036 | .siclk(siclk), | |
1037 | .soclk(soclk) | |
1038 | ||
1039 | ||
1040 | ) ; | |
1041 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid6 | |
1042 | (.dout (mbid6[4:0]), | |
1043 | .scan_in(ff_mbid6_scanin), | |
1044 | .scan_out(ff_mbid6_scanout), | |
1045 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
1046 | .en (sel_insert_mbid_c4[6]), | |
1047 | .l1clk (l1clk), | |
1048 | .siclk(siclk), | |
1049 | .soclk(soclk) | |
1050 | ||
1051 | ||
1052 | ) ; | |
1053 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ff_mbid7 | |
1054 | (.dout (mbid7[4:0]), | |
1055 | .scan_in(ff_mbid7_scanin), | |
1056 | .scan_out(ff_mbid7_scanout), | |
1057 | .din (misbuf_wbuf_mbid_c4[4:0]), | |
1058 | .en (sel_insert_mbid_c4[7]), | |
1059 | .l1clk (l1clk), | |
1060 | .siclk(siclk), | |
1061 | .soclk(soclk) | |
1062 | ||
1063 | ||
1064 | ) ; | |
1065 | ||
1066 | ||
1067 | assign wb_mbid_vld_in[7:0] = (wb_mbid_vld[7:0] | sel_insert_mbid_c4[7:0]) & | |
1068 | ~(sel_mbid[7:0]) ; | |
1069 | ||
1070 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_8 ff_wb_mbid_vld // sync reset active low | |
1071 | (.dout (wb_mbid_vld[7:0]), | |
1072 | .scan_in(ff_wb_mbid_vld_scanin), | |
1073 | .scan_out(ff_wb_mbid_vld_scanout), | |
1074 | .din (wb_mbid_vld_in[7:0]), | |
1075 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
1076 | .siclk(siclk), | |
1077 | .soclk(soclk) | |
1078 | ||
1079 | ||
1080 | ) ; | |
1081 | ||
1082 | assign or_wb_mbid_vld_in = |(wb_mbid_vld_in[7:0]) ; | |
1083 | ||
1084 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_1 ff_or_wb_mbid_vld // sync reset active low | |
1085 | (.dout (or_wb_mbid_vld), | |
1086 | .scan_in(ff_or_wb_mbid_vld_scanin), | |
1087 | .scan_out(ff_or_wb_mbid_vld_scanout), | |
1088 | .din (or_wb_mbid_vld_in), | |
1089 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
1090 | .siclk(siclk), | |
1091 | .soclk(soclk) | |
1092 | ||
1093 | ||
1094 | ) ; | |
1095 | ||
1096 | ||
1097 | //////////////////////////////////////////////////////////////////////////////// | |
1098 | assign sel_mbid[7:0] = wb_acked[7:0] & wb_mbid_vld[7:0] ; | |
1099 | assign sel_default_mux1 = ~(sel_mbid[0] | sel_mbid[1] | sel_mbid[2]) ; | |
1100 | assign sel_default_mux2 = ~(sel_mbid[4] | sel_mbid[5] | sel_mbid[6]) ; | |
1101 | assign sel_default_mbentry = |(sel_mbid[3:0]) ; | |
1102 | ||
1103 | assign sel_mbid_rst[0] = sel_mbid[0] ; | |
1104 | assign sel_mbid_rst[1] = sel_mbid[1] ; | |
1105 | assign sel_mbid_rst[2] = sel_mbid[2] ; | |
1106 | assign sel_mbid_rst[3] = sel_default_mux1 ; | |
1107 | assign sel_mbid_rst[4] = sel_mbid[4] ; | |
1108 | assign sel_mbid_rst[5] = sel_mbid[5] ; | |
1109 | assign sel_mbid_rst[6] = sel_mbid[6] ; | |
1110 | assign sel_mbid_rst[7] = sel_default_mux2 ; | |
1111 | ||
1112 | // BS & SR 11/04/03, MB grows to 32 | |
1113 | ||
1114 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_4__width_5 mux_sel_mbid3t0 | |
1115 | (.dout (sel_mbid3t0[4:0]), | |
1116 | .din0 (mbid0[4:0]), .sel0 (sel_mbid_rst[0]), | |
1117 | .din1 (mbid1[4:0]), .sel1 (sel_mbid_rst[1]), | |
1118 | .din2 (mbid2[4:0]), .sel2 (sel_mbid_rst[2]), | |
1119 | .din3 (mbid3[4:0]), .sel3 (sel_mbid_rst[3]) | |
1120 | ) ; | |
1121 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_4__width_5 mux_sel_mbid7t4 | |
1122 | (.dout (sel_mbid7t4[4:0]), | |
1123 | .din0 (mbid4[4:0]), .sel0 (sel_mbid_rst[4]), | |
1124 | .din1 (mbid5[4:0]), .sel1 (sel_mbid_rst[5]), | |
1125 | .din2 (mbid6[4:0]), .sel2 (sel_mbid_rst[6]), | |
1126 | .din3 (mbid7[4:0]), .sel3 (sel_mbid_rst[7]) | |
1127 | ) ; | |
1128 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_2__width_5 mux_sel_mbid7t0 | |
1129 | (.dout (sel_mbid7t0[4:0]), | |
1130 | .din0 (sel_mbid3t0[4:0]), .sel0 (sel_default_mbentry), | |
1131 | .din1 (sel_mbid7t4[4:0]), .sel1 (~sel_default_mbentry) | |
1132 | ) ; | |
1133 | ||
1134 | assign wbuf_misbuf_dep_rdy_en = |(sel_mbid[7:0]) ; | |
1135 | assign wbuf_misbuf_dep_mbid = sel_mbid7t0[4:0] ; // BS & SR 11/04/03, MB grows to 32 | |
1136 | ||
1137 | ||
1138 | //////////////////////////////////////////////////////////////////////////////// | |
1139 | // A Write request is generated only if a READ request is not being | |
1140 | // sent to DRAM in the same cycle. Here is the pipeline for making | |
1141 | // a write request to DRAM. | |
1142 | //------------------------------------------------------------------------------ | |
1143 | // #1 #2 #3 | |
1144 | //------------------------------------------------------------------------------ | |
1145 | // if (atleast 1 rd wbtag xmit req,addr | |
1146 | // mcu_req to | |
1147 | // AND DRAM | |
1148 | // not mcu_pick | |
1149 | // in misbuf. | |
1150 | // AND | |
1151 | // not wrreq wbuf_wr_addr_sel | |
1152 | // pending to DRAM) xmitted to | |
1153 | // arbaddr. | |
1154 | // generate RD | |
1155 | // pointer | |
1156 | // | |
1157 | // set wrreq | |
1158 | // pending | |
1159 | // | |
1160 | // xmit read en | |
1161 | // and rd wl to wbtag. | |
1162 | //------------------------------------------------------------------------------ | |
1163 | //#n-1 #n(r0) #n+1(r1) #n+2(r2) #n+2(r3) | |
1164 | //------------------------------------------------------------------------------ | |
1165 | // ack from mcu rd_en rd wbdata mux data | |
1166 | // rd_wl in PH1 in evict | |
1167 | // to l2b.wbdata | |
1168 | //------------------------------------------------------------------------------ | |
1169 | // r4 r5 r6 ...... r12 | |
1170 | //------------------------------------------------------------------------------ | |
1171 | // perform ecc xmit data1 dat2 data8 | |
1172 | // to mcu to mcu to mcu | |
1173 | // | |
1174 | // reset | |
1175 | // wrreq | |
1176 | // pending | |
1177 | // | |
1178 | // reset vld | |
1179 | // | |
1180 | // dec wb counter | |
1181 | //////////////////////////////////////////////////////////////////////////////// | |
1182 | ||
1183 | assign can_req_mcu = ( or_wb_valid | rdmat_or_rdmat_valid ) | |
1184 | & ~mcu_req_pending & ~misbuf_filbuf_mcu_pick ; | |
1185 | ||
1186 | assign enter_state0 = ~dbb_rst_l | leave_state2 ; | |
1187 | assign leave_state0 = state[0] & can_req_mcu ; | |
1188 | assign next_state[0] = (state[0] | enter_state0) & ~leave_state0 ; | |
1189 | ||
1190 | assign enter_state1 = leave_state0 ; | |
1191 | assign leave_state1 = state[1] & mcu_l2t_wr_ack_d1 ; | |
1192 | assign next_state[1] = (state[1] | enter_state1) & ~leave_state1 & dbb_rst_l ; | |
1193 | ||
1194 | assign enter_state2 = leave_state1 ; | |
1195 | assign leave_state2 = state[2] & (cycle_count[3:0] == 4'd12) ; | |
1196 | assign next_state[2] = (state[2] | enter_state2) & ~leave_state2 & dbb_rst_l ; | |
1197 | ||
1198 | l2t_wbuf_ctl_msff_ctl_macro__width_3 ff_state | |
1199 | (.dout (state[2:0]), | |
1200 | .scan_in(ff_state_scanin), | |
1201 | .scan_out(ff_state_scanout), | |
1202 | .din (next_state[2:0]), | |
1203 | .l1clk (l1clk), | |
1204 | .siclk(siclk), | |
1205 | .soclk(soclk) | |
1206 | ||
1207 | ||
1208 | ) ; | |
1209 | ||
1210 | ||
1211 | ||
1212 | ||
1213 | assign mcu_req_pending_in = (mcu_req_pending | leave_state0) & ~leave_state2 ; | |
1214 | ||
1215 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_1 ff_mcu_req_pending // sync reset active low | |
1216 | (.dout (mcu_req_pending), | |
1217 | .scan_in(ff_mcu_req_pending_scanin), | |
1218 | .scan_out(ff_mcu_req_pending_scanout), | |
1219 | .din (mcu_req_pending_in), | |
1220 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
1221 | .siclk(siclk), | |
1222 | .soclk(soclk) | |
1223 | ||
1224 | ||
1225 | ) ; | |
1226 | ||
1227 | ||
1228 | ||
1229 | ||
1230 | assign inc_cycle_count = (enter_state2 | state[2]) ; | |
1231 | assign cycle_count_plus1 = cycle_count + 4'b1 ; | |
1232 | assign next_cycle_count = cycle_count_plus1 & ~{4{leave_state2}} ; | |
1233 | ||
1234 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_2__width_4 mux_cycle_count_in | |
1235 | (.dout (cycle_count_in[3:0]), | |
1236 | .din0 (cycle_count[3:0]), .sel0 (~inc_cycle_count), | |
1237 | .din1 (next_cycle_count[3:0]), .sel1 (inc_cycle_count) | |
1238 | ) ; | |
1239 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_4 ff_cycle_count // sync reset active low | |
1240 | (.dout (cycle_count[3:0]), | |
1241 | .scan_in(ff_cycle_count_scanin), | |
1242 | .scan_out(ff_cycle_count_scanout), | |
1243 | .din (cycle_count_in[3:0]), | |
1244 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
1245 | .siclk(siclk), | |
1246 | .soclk(soclk) | |
1247 | ) ; | |
1248 | ||
1249 | assign l2t_rdma_rd_ptr[0] = (l2t_mb2_addr_r3[1:0] == 2'b00); | |
1250 | assign l2t_rdma_rd_ptr[1] = (l2t_mb2_addr_r3[1:0] == 2'b01); | |
1251 | assign l2t_rdma_rd_ptr[2] = (l2t_mb2_addr_r3[1:0] == 2'b10); | |
1252 | assign l2t_rdma_rd_ptr[3] = (l2t_mb2_addr_r3[1:0] == 2'b11); | |
1253 | ||
1254 | ||
1255 | ||
1256 | assign wbuf_wb_read_en = l2t_mb2_run_r1 ? l2t_mb2_wbtag_rd_en_r3 : (leave_state0 & ~pick_quad_sel[2]); | |
1257 | assign wbuf_wb_read_wl[7:0] = l2t_mb2_run_r1 ? mbist_wbuf_wr_ptr[7:0] : pick_wb_read_wl[7:0] ; | |
1258 | ||
1259 | assign wbuf_rdmat_read_en = l2t_mb2_run_r1 ? l2t_mb2_rdmatag_rd_en_r3 : (leave_state0 & pick_quad_sel[2]); | |
1260 | assign wbuf_rdmat_read_wl[3:0] = l2t_mb2_run_r1 ? l2t_rdma_rd_ptr[3:0] : pick_rdmat_read_wl[3:0]; | |
1261 | ||
1262 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_8 ff_latched_wb_read_wl | |
1263 | (.dout (latched_wb_read_wl[7:0]), | |
1264 | .scan_in(ff_latched_wb_read_wl_scanin), | |
1265 | .scan_out(ff_latched_wb_read_wl_scanout), | |
1266 | .din (pick_wb_read_wl[7:0]), | |
1267 | .en (leave_state0), | |
1268 | .l1clk (l1clk), | |
1269 | .siclk(siclk), | |
1270 | .soclk(soclk) | |
1271 | ||
1272 | ||
1273 | ) ; | |
1274 | ||
1275 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_1 ff_latched_wb_read_en | |
1276 | (.dout (latched_wb_read_en), | |
1277 | .scan_in(ff_latched_wb_read_en_scanin), | |
1278 | .scan_out(ff_latched_wb_read_en_scanout), | |
1279 | .din (wbuf_wb_read_en), | |
1280 | .en (leave_state0), | |
1281 | .l1clk (l1clk), | |
1282 | .siclk(siclk), | |
1283 | .soclk(soclk) | |
1284 | ||
1285 | ||
1286 | ) ; | |
1287 | ||
1288 | ||
1289 | ||
1290 | ||
1291 | assign l2t_l2b_rdma_rdwl_r0_prev[0] = (pick_rdmat_read_wl[1] | pick_rdmat_read_wl[3] ); | |
1292 | assign l2t_l2b_rdma_rdwl_r0_prev[1] = (pick_rdmat_read_wl[2] | pick_rdmat_read_wl[3] ); | |
1293 | ||
1294 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_2 ff_l2t_l2b_rdma_rdwl_r0 | |
1295 | (.dout (l2t_l2b_rdma_rdwl_r0[1:0]), | |
1296 | .scan_in(ff_l2t_l2b_rdma_rdwl_r0_scanin), | |
1297 | .scan_out(ff_l2t_l2b_rdma_rdwl_r0_scanout), | |
1298 | .din (l2t_l2b_rdma_rdwl_r0_prev[1:0]), | |
1299 | .en (leave_state0), | |
1300 | .l1clk (l1clk), | |
1301 | .siclk(siclk), | |
1302 | .soclk(soclk) | |
1303 | ) ; | |
1304 | ||
1305 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_4 ff_latched_rdmad_read_wl | |
1306 | (.dout (latched_rdmad_read_wl[3:0]), | |
1307 | .scan_in(ff_latched_rdmad_read_wl_scanin), | |
1308 | .scan_out(ff_latched_rdmad_read_wl_scanout), | |
1309 | .din (pick_rdmat_read_wl[3:0]), | |
1310 | .en (leave_state0), | |
1311 | .l1clk (l1clk), | |
1312 | .siclk(siclk), | |
1313 | .soclk(soclk) | |
1314 | ) ; | |
1315 | ||
1316 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_1 ff_latched_rdma_read_en | |
1317 | (.dout (latched_rdma_read_en), | |
1318 | .scan_in(ff_latched_rdma_read_en_scanin), | |
1319 | .scan_out(ff_latched_rdma_read_en_scanout), | |
1320 | .din (wbuf_rdmat_read_en), | |
1321 | .en (leave_state0), | |
1322 | .l1clk (l1clk), | |
1323 | .siclk(siclk), | |
1324 | .soclk(soclk) | |
1325 | ||
1326 | ||
1327 | ) ; | |
1328 | ||
1329 | // the following signal indicates that the WBB buffer address | |
1330 | // needs to be selected over the rdmat address. | |
1331 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wbuf_wr_addr_sel | |
1332 | (.dout (wbuf_wr_addr_sel), | |
1333 | .scan_in(ff_wbuf_wr_addr_sel_scanin), | |
1334 | .scan_out(ff_wbuf_wr_addr_sel_scanout), | |
1335 | .din (wbuf_wb_read_en), | |
1336 | .l1clk (l1clk), | |
1337 | .siclk(siclk), | |
1338 | .soclk(soclk) | |
1339 | ||
1340 | ||
1341 | ) ; | |
1342 | ||
1343 | // the following signal goes to evctag to enable the | |
1344 | // address flop that transmits the address to | |
1345 | // DRAM | |
1346 | ||
1347 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_wb_or_rdma_wr_req_en | |
1348 | (.dout (wbuf_wb_or_rdma_wr_req_en), | |
1349 | .scan_in(ff_wb_or_rdma_wr_req_en_scanin), | |
1350 | .scan_out(ff_wb_or_rdma_wr_req_en_scanout), | |
1351 | .din (leave_state0), | |
1352 | .l1clk (l1clk), | |
1353 | .siclk(siclk), | |
1354 | .soclk(soclk) | |
1355 | ||
1356 | ||
1357 | ) ; | |
1358 | ||
1359 | ||
1360 | // the following signal indicates that a write | |
1361 | // request needs to be issued either from the | |
1362 | // wbb or the rdmat | |
1363 | ||
1364 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_l2t_mcu_wr_req | |
1365 | (.dout (l2t_mcu_wr_req), | |
1366 | .scan_in(ff_l2t_mcu_wr_req_scanin), | |
1367 | .scan_out(ff_l2t_mcu_wr_req_scanout), | |
1368 | .din (wbuf_wb_or_rdma_wr_req_en), | |
1369 | .l1clk (l1clk), | |
1370 | .siclk(siclk), | |
1371 | .soclk(soclk) | |
1372 | ||
1373 | ||
1374 | ) ; | |
1375 | ||
1376 | ||
1377 | // | |
1378 | //msff_ctl_macro ff_latched_wb_read_wl (width=8,en=1) | |
1379 | // (.dout (latched_wb_read_wl[7:0]), | |
1380 | // .scan_in(ff_latched_wb_read_wl_scanin), | |
1381 | // .scan_out(ff_latched_wb_read_wl_scanout), | |
1382 | // .din (pick_wb_read_wl[7:0]), | |
1383 | // .en (leave_state0), | |
1384 | // .l1clk (l1clk), | |
1385 | // | |
1386 | // | |
1387 | //assign l2t_l2b_wbrd_wl_r0[0] = (latched_wb_read_wl[1] | latched_wb_read_wl[3] | | |
1388 | // latched_wb_read_wl[5] | latched_wb_read_wl[7]) ; | |
1389 | //assign l2t_l2b_wbrd_wl_r0[1] = (latched_wb_read_wl[2] | latched_wb_read_wl[3] | | |
1390 | // latched_wb_read_wl[6] | latched_wb_read_wl[7]) ; | |
1391 | //assign l2t_l2b_wbrd_wl_r0[2] = (latched_wb_read_wl[4] | latched_wb_read_wl[5] | | |
1392 | // latched_wb_read_wl[6] | latched_wb_read_wl[7]) ; | |
1393 | // | |
1394 | ||
1395 | ||
1396 | ||
1397 | assign l2t_l2b_wbrd_wl_r0_prev[0] = (pick_wb_read_wl[1] | pick_wb_read_wl[3] | | |
1398 | pick_wb_read_wl[5] | pick_wb_read_wl[7]) ; | |
1399 | ||
1400 | assign l2t_l2b_wbrd_wl_r0_prev[1] = (pick_wb_read_wl[2] | pick_wb_read_wl[3] | | |
1401 | pick_wb_read_wl[6] | pick_wb_read_wl[7]) ; | |
1402 | assign l2t_l2b_wbrd_wl_r0_prev[2] = (pick_wb_read_wl[4] | pick_wb_read_wl[5] | | |
1403 | pick_wb_read_wl[6] | pick_wb_read_wl[7]) ; | |
1404 | ||
1405 | ||
1406 | l2t_wbuf_ctl_msff_ctl_macro__en_1__width_3 ff_l2t_l2b_wbrd_wl_r0 | |
1407 | (.dout (l2t_l2b_wbrd_wl_r0[2:0]), | |
1408 | .scan_in(ff_l2t_l2b_wbrd_wl_r0_scanin), | |
1409 | .scan_out(ff_l2t_l2b_wbrd_wl_r0_scanout), | |
1410 | .din (l2t_l2b_wbrd_wl_r0_prev[2:0]), | |
1411 | .en (leave_state0), | |
1412 | .l1clk (l1clk), | |
1413 | .siclk(siclk), | |
1414 | .soclk(soclk) | |
1415 | ); | |
1416 | ||
1417 | ||
1418 | //assign l2t_l2b_wbrd_en_r0 = (l2t_l2b_evict_en_r0 & ~l2t_l2b_evict_en_r0_d1) & latched_wb_read_en ; | |
1419 | //assign l2t_l2b_rdma_rdwl_r0[0] = (latched_rdmad_read_wl[1] | latched_rdmad_read_wl[3] ); | |
1420 | //assign l2t_l2b_rdma_rdwl_r0[1] = (latched_rdmad_read_wl[2] | latched_rdmad_read_wl[3] ); | |
1421 | //assign l2t_l2b_rdma_rden_r0 = (l2t_l2b_evict_en_r0 & ~l2t_l2b_evict_en_r0_d1) & latched_rdma_read_en ; | |
1422 | ||
1423 | assign wbuf_wbufrpt_leave_state0 = state[0] & can_req_mcu ; | |
1424 | ||
1425 | ||
1426 | assign l2t_l2b_ev_dword_r0 = cycle_count[2:0] ; | |
1427 | //assign l2t_l2b_evict_en_r0 = leave_state1 | (state[2] & (cycle_count < 4'd8)) ; | |
1428 | ||
1429 | ||
1430 | assign l2t_l2b_evict_en_r0 = leave_state1 | cycle_count_less_than_7 ; | |
1431 | ||
1432 | assign wbuf_wbufrpt_next_state_1 = next_state[1]; | |
1433 | ||
1434 | ||
1435 | ||
1436 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_l2t_l2b_evict_en_r0_d1 | |
1437 | (.dout (l2t_l2b_evict_en_r0_d1_unused), | |
1438 | .scan_in(ff_l2t_l2b_evict_en_r0_d1_scanin), | |
1439 | .scan_out(ff_l2t_l2b_evict_en_r0_d1_scanout), | |
1440 | .din (l2t_l2b_evict_en_r0), | |
1441 | .l1clk (l1clk), | |
1442 | .siclk(siclk), | |
1443 | .soclk(soclk) | |
1444 | ) ; | |
1445 | ||
1446 | ||
1447 | assign cycle_count_less_than_7_din = (cycle_count < 4'd7) & next_state[2]; | |
1448 | ||
1449 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_cycle_count_in | |
1450 | (.dout (cycle_count_less_than_7), | |
1451 | .scan_in(ff_cycle_count_in_scanin), | |
1452 | .scan_out(ff_cycle_count_in_scanout), | |
1453 | .din (cycle_count_less_than_7_din), | |
1454 | .l1clk (l1clk), | |
1455 | .siclk(siclk), | |
1456 | .soclk(soclk) | |
1457 | ) ; | |
1458 | ||
1459 | ||
1460 | ||
1461 | ||
1462 | ||
1463 | ||
1464 | ||
1465 | //////////////////////////////////////////////////////////////////////////////// | |
1466 | // Dequeue of rdmad buffer needs to be sent to jbus. | |
1467 | //////////////////////////////////////////////////////////////////////////////// | |
1468 | ||
1469 | assign l2t_sii_wib_dequeue_prev = leave_state2 & | |
1470 | latched_rdma_read_en ; | |
1471 | ||
1472 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_l2t_sii_wib_dequeue | |
1473 | (.dout (l2t_sii_wib_dequeue_raw), | |
1474 | .scan_in(ff_l2t_sii_wib_dequeue_scanin), | |
1475 | .scan_out(ff_l2t_sii_wib_dequeue_scanout), | |
1476 | .din (l2t_sii_wib_dequeue_prev), | |
1477 | .l1clk (l1clk), | |
1478 | .siclk(siclk), | |
1479 | .soclk(soclk) | |
1480 | ) ; | |
1481 | ||
1482 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_l2t_sii_wib_dequeue_delay | |
1483 | (.dout (l2t_sii_wib_dequeue_delay), | |
1484 | .scan_in(ff_l2t_sii_wib_dequeue_delay_scanin), | |
1485 | .scan_out(ff_l2t_sii_wib_dequeue_delay_scanout), | |
1486 | .din (l2t_sii_wib_dequeue_raw), | |
1487 | .l1clk (l1clk), | |
1488 | .siclk(siclk), | |
1489 | .soclk(soclk) | |
1490 | ) ; | |
1491 | ||
1492 | assign l2t_sii_wib_dequeue = l2t_siu_delay ? l2t_sii_wib_dequeue_delay : l2t_sii_wib_dequeue_raw; | |
1493 | ||
1494 | ||
1495 | // for debug | |
1496 | // to siu | |
1497 | // assign l2t_dbg_sii_wib_dequeue = l2t_sii_wib_dequeue; | |
1498 | // | |
1499 | ||
1500 | l2t_wbuf_ctl_msff_ctl_macro__width_1 ff_l2t_dbg_sii_wib_dequeue | |
1501 | ( | |
1502 | .scan_in(ff_l2t_dbg_sii_wib_dequeue_scanin), | |
1503 | .scan_out(ff_l2t_dbg_sii_wib_dequeue_scanout), | |
1504 | .din(l2t_sii_wib_dequeue), | |
1505 | .l1clk(l1clk), | |
1506 | .dout(l2t_dbg_sii_wib_dequeue), | |
1507 | .siclk(siclk), | |
1508 | .soclk(soclk) | |
1509 | ); | |
1510 | ||
1511 | ||
1512 | ||
1513 | ||
1514 | ||
1515 | //////////////////////////////////////////////////////////////////////////////// | |
1516 | ||
1517 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_2__width_4 mux_pick_quad0_in | |
1518 | (.dout (pick_quad0_in[3:0]), | |
1519 | .din0 (wb_valid[3:0]), .sel0 (~or_wb_mbid_vld), | |
1520 | .din1 (wb_mbid_vld[3:0]), .sel1 (or_wb_mbid_vld) | |
1521 | ) ; | |
1522 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_2__width_4 mux_pick_quad1_in | |
1523 | (.dout (pick_quad1_in[3:0]), | |
1524 | .din0 (wb_valid[7:4]), .sel0 (~or_wb_mbid_vld), | |
1525 | .din1 (wb_mbid_vld[7:4]), .sel1 (or_wb_mbid_vld) | |
1526 | ) ; | |
1527 | ||
1528 | ||
1529 | ||
1530 | assign pick_quad2_in[3:0] = rdmat_pick_vec[3:0] ; | |
1531 | ||
1532 | ||
1533 | assign pick_quad_in[0] = |(pick_quad0_in[3:0]) ; | |
1534 | assign pick_quad_in[1] = |(pick_quad1_in[3:0]) ; | |
1535 | assign pick_quad_in[2] = |(pick_quad2_in[3:0]) ; | |
1536 | ||
1537 | ||
1538 | ||
1539 | ||
1540 | assign init_pick_state = ~dbb_rst_l | ~dbginit_l ; | |
1541 | ||
1542 | ||
1543 | assign sel_lshift_quad = leave_state1 & ~init_pick_state ; | |
1544 | assign sel_same_quad = ~sel_lshift_quad & ~init_pick_state ; | |
1545 | assign lshift_quad_state = {quad_state[1:0], quad_state[2]} ; | |
1546 | ||
1547 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_3 mux_quad_state_in | |
1548 | (.dout (quad_state_in[2:0]), | |
1549 | .din0 (3'b01), .sel0 (init_pick_state), | |
1550 | .din1 (quad_state[2:0]), .sel1 (sel_same_quad), | |
1551 | .din2 (lshift_quad_state[2:0]), .sel2 (sel_lshift_quad) | |
1552 | ) ; | |
1553 | l2t_wbuf_ctl_msff_ctl_macro__width_3 ff_quad_state | |
1554 | (.dout (quad_state[2:0]), | |
1555 | .scan_in(ff_quad_state_scanin), | |
1556 | .scan_out(ff_quad_state_scanout), | |
1557 | .din (quad_state_in[2:0]), | |
1558 | .l1clk (l1clk), | |
1559 | .siclk(siclk), | |
1560 | .soclk(soclk) | |
1561 | ||
1562 | ||
1563 | ) ; | |
1564 | ||
1565 | ||
1566 | ||
1567 | assign sel_lshift_quad0 = leave_state1 & |(latched_wb_read_wl[3:0]) & ~init_pick_state ; | |
1568 | assign sel_same_quad0 = ~sel_lshift_quad0 & ~init_pick_state ; | |
1569 | assign lshift_quad0_state = {quad0_state[2:0], quad0_state[3]} ; | |
1570 | ||
1571 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_4 mux_quad0_state_in | |
1572 | (.dout (quad0_state_in[3:0]), | |
1573 | .din0 (4'b0001), .sel0 (init_pick_state), | |
1574 | .din1 (quad0_state[3:0]), .sel1 (sel_same_quad0), | |
1575 | .din2 (lshift_quad0_state[3:0]), .sel2 (sel_lshift_quad0) | |
1576 | ) ; | |
1577 | ||
1578 | l2t_wbuf_ctl_msff_ctl_macro__width_4 ff_quad0_state | |
1579 | (.dout (quad0_state[3:0]), | |
1580 | .scan_in(ff_quad0_state_scanin), | |
1581 | .scan_out(ff_quad0_state_scanout), | |
1582 | .din (quad0_state_in[3:0]), | |
1583 | .l1clk (l1clk), | |
1584 | .siclk(siclk), | |
1585 | .soclk(soclk) | |
1586 | ||
1587 | ||
1588 | ) ; | |
1589 | ||
1590 | ||
1591 | ||
1592 | assign sel_lshift_quad1 = leave_state1 & |(latched_wb_read_wl[7:4]) & ~init_pick_state ; | |
1593 | assign sel_same_quad1 = ~sel_lshift_quad1 & ~init_pick_state ; | |
1594 | assign lshift_quad1_state = {quad1_state[2:0], quad1_state[3]} ; | |
1595 | ||
1596 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_4 mux_quad1_state_in | |
1597 | (.dout (quad1_state_in[3:0]), | |
1598 | .din0 (4'b0001), .sel0 (init_pick_state), | |
1599 | .din1 (quad1_state[3:0]), .sel1 (sel_same_quad1), | |
1600 | .din2 (lshift_quad1_state[3:0]), .sel2 (sel_lshift_quad1) | |
1601 | ) ; | |
1602 | ||
1603 | l2t_wbuf_ctl_msff_ctl_macro__width_4 ff_quad1_state | |
1604 | (.dout (quad1_state[3:0]), | |
1605 | .scan_in(ff_quad1_state_scanin), | |
1606 | .scan_out(ff_quad1_state_scanout), | |
1607 | .din (quad1_state_in[3:0]), | |
1608 | .l1clk (l1clk), | |
1609 | .siclk(siclk), | |
1610 | .soclk(soclk) | |
1611 | ||
1612 | ||
1613 | ) ; | |
1614 | ||
1615 | ||
1616 | //assign sel_lshift_quad2 = leave_state1 & |(latched_wb_read_wl[7:4]) & ~init_pick_state ; | |
1617 | assign sel_lshift_quad2 = leave_state1 & |(latched_rdmad_read_wl[3:0]) & ~init_pick_state ; | |
1618 | assign sel_same_quad2 = ~sel_lshift_quad2 & ~init_pick_state ; | |
1619 | assign lshift_quad2_state = {quad2_state[2:0], quad2_state[3]} ; | |
1620 | ||
1621 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_4 mux_quad2_state_in | |
1622 | (.dout (quad2_state_in[3:0]), | |
1623 | .din0 (4'b0001), .sel0 (init_pick_state), | |
1624 | .din1 (quad2_state[3:0]), .sel1 (sel_same_quad2), | |
1625 | .din2 (lshift_quad2_state[3:0]), .sel2 (sel_lshift_quad2) | |
1626 | ) ; | |
1627 | ||
1628 | l2t_wbuf_ctl_msff_ctl_macro__width_4 ff_quad2_state | |
1629 | (.dout (quad2_state[3:0]), | |
1630 | .scan_in(ff_quad2_state_scanin), | |
1631 | .scan_out(ff_quad2_state_scanout), | |
1632 | .din (quad2_state_in[3:0]), | |
1633 | .l1clk (l1clk), | |
1634 | .siclk(siclk), | |
1635 | .soclk(soclk) | |
1636 | ||
1637 | ||
1638 | ) ; | |
1639 | ||
1640 | ||
1641 | ||
1642 | ||
1643 | // QUAD0 bits. | |
1644 | assign pick_quad0_sel[0] = pick_quad0_in[0] & | |
1645 | (quad0_state[0] | | |
1646 | (quad0_state[1] & ~(pick_quad0_in[1] | | |
1647 | pick_quad0_in[2] | | |
1648 | pick_quad0_in[3])) | | |
1649 | (quad0_state[2] & ~(pick_quad0_in[2] | | |
1650 | pick_quad0_in[3])) | | |
1651 | (quad0_state[3] & ~(pick_quad0_in[3])) ) ; | |
1652 | assign pick_quad0_sel[1] = pick_quad0_in[1] & | |
1653 | (quad0_state[1] | | |
1654 | (quad0_state[2] & ~(pick_quad0_in[2] | | |
1655 | pick_quad0_in[3] | | |
1656 | pick_quad0_in[0])) | | |
1657 | (quad0_state[3] & ~(pick_quad0_in[3] | | |
1658 | pick_quad0_in[0])) | | |
1659 | (quad0_state[0] & ~(pick_quad0_in[0])) ) ; | |
1660 | assign pick_quad0_sel[2] = pick_quad0_in[2] & | |
1661 | (quad0_state[2] | | |
1662 | (quad0_state[3] & ~(pick_quad0_in[3] | | |
1663 | pick_quad0_in[0] | | |
1664 | pick_quad0_in[1])) | | |
1665 | (quad0_state[0] & ~(pick_quad0_in[0] | | |
1666 | pick_quad0_in[1])) | | |
1667 | (quad0_state[1] & ~(pick_quad0_in[1])) ) ; | |
1668 | assign pick_quad0_sel[3] = pick_quad0_in[3] & | |
1669 | (quad0_state[3] | | |
1670 | (quad0_state[0] & ~(pick_quad0_in[0] | | |
1671 | pick_quad0_in[1] | | |
1672 | pick_quad0_in[2])) | | |
1673 | (quad0_state[1] & ~(pick_quad0_in[1] | | |
1674 | pick_quad0_in[2])) | | |
1675 | (quad0_state[2] & ~(pick_quad0_in[2])) ) ; | |
1676 | ||
1677 | ||
1678 | // QUAD1 bits. | |
1679 | assign pick_quad1_sel[0] = pick_quad1_in[0] & | |
1680 | (quad1_state[0] | | |
1681 | (quad1_state[1] & ~(pick_quad1_in[1] | | |
1682 | pick_quad1_in[2] | | |
1683 | pick_quad1_in[3])) | | |
1684 | (quad1_state[2] & ~(pick_quad1_in[2] | | |
1685 | pick_quad1_in[3])) | | |
1686 | (quad1_state[3] & ~(pick_quad1_in[3])) ) ; | |
1687 | assign pick_quad1_sel[1] = pick_quad1_in[1] & | |
1688 | (quad1_state[1] | | |
1689 | (quad1_state[2] & ~(pick_quad1_in[2] | | |
1690 | pick_quad1_in[3] | | |
1691 | pick_quad1_in[0])) | | |
1692 | (quad1_state[3] & ~(pick_quad1_in[3] | | |
1693 | pick_quad1_in[0])) | | |
1694 | (quad1_state[0] & ~(pick_quad1_in[0])) ) ; | |
1695 | assign pick_quad1_sel[2] = pick_quad1_in[2] & | |
1696 | (quad1_state[2] | | |
1697 | (quad1_state[3] & ~(pick_quad1_in[3] | | |
1698 | pick_quad1_in[0] | | |
1699 | pick_quad1_in[1])) | | |
1700 | (quad1_state[0] & ~(pick_quad1_in[0] | | |
1701 | pick_quad1_in[1])) | | |
1702 | (quad1_state[1] & ~(pick_quad1_in[1])) ) ; | |
1703 | assign pick_quad1_sel[3] = pick_quad1_in[3] & | |
1704 | (quad1_state[3] | | |
1705 | (quad1_state[0] & ~(pick_quad1_in[0] | | |
1706 | pick_quad1_in[1] | | |
1707 | pick_quad1_in[2])) | | |
1708 | (quad1_state[1] & ~(pick_quad1_in[1] | | |
1709 | pick_quad1_in[2])) | | |
1710 | (quad1_state[2] & ~(pick_quad1_in[2])) ) ; | |
1711 | ||
1712 | ||
1713 | // QUAD1 bits. | |
1714 | assign pick_quad2_sel[0] = pick_quad2_in[0] & | |
1715 | (quad2_state[0] | | |
1716 | (quad2_state[1] & ~(pick_quad2_in[1] | | |
1717 | pick_quad2_in[2] | | |
1718 | pick_quad2_in[3])) | | |
1719 | (quad2_state[2] & ~(pick_quad2_in[2] | | |
1720 | pick_quad2_in[3])) | | |
1721 | (quad2_state[3] & ~(pick_quad2_in[3])) ) ; | |
1722 | assign pick_quad2_sel[1] = pick_quad2_in[1] & | |
1723 | (quad2_state[1] | | |
1724 | (quad2_state[2] & ~(pick_quad2_in[2] | | |
1725 | pick_quad2_in[3] | | |
1726 | pick_quad2_in[0])) | | |
1727 | (quad2_state[3] & ~(pick_quad2_in[3] | | |
1728 | pick_quad2_in[0])) | | |
1729 | (quad2_state[0] & ~(pick_quad2_in[0])) ) ; | |
1730 | assign pick_quad2_sel[2] = pick_quad2_in[2] & | |
1731 | (quad2_state[2] | | |
1732 | (quad2_state[3] & ~(pick_quad2_in[3] | | |
1733 | pick_quad2_in[0] | | |
1734 | pick_quad2_in[1])) | | |
1735 | (quad2_state[0] & ~(pick_quad2_in[0] | | |
1736 | pick_quad2_in[1])) | | |
1737 | (quad2_state[1] & ~(pick_quad2_in[1])) ) ; | |
1738 | assign pick_quad2_sel[3] = pick_quad2_in[3] & | |
1739 | (quad2_state[3] | | |
1740 | (quad2_state[0] & ~(pick_quad2_in[0] | | |
1741 | pick_quad2_in[1] | | |
1742 | pick_quad2_in[2])) | | |
1743 | (quad2_state[1] & ~(pick_quad2_in[1] | | |
1744 | pick_quad2_in[2])) | | |
1745 | (quad2_state[2] & ~(pick_quad2_in[2])) ) ; | |
1746 | ||
1747 | ||
1748 | ||
1749 | // QUAD bits. | |
1750 | ||
1751 | assign pick_quad_sel[0] = pick_quad_in[0] & ( quad_state[0] | | |
1752 | ( quad_state[1] & ~( pick_quad_in[1] | pick_quad_in[2] ) ) | | |
1753 | ( quad_state[2] & ~pick_quad_in[2] ) ) ; | |
1754 | ||
1755 | assign pick_quad_sel[1] = pick_quad_in[1] & ( quad_state[1] | | |
1756 | ( quad_state[2] & ~( pick_quad_in[2] | pick_quad_in[0] ) ) | | |
1757 | ( quad_state[0] & ~pick_quad_in[0] ) ) ; | |
1758 | ||
1759 | assign pick_quad_sel[2] = pick_quad_in[2] & ( quad_state[2] | | |
1760 | ( quad_state[0] & ~( pick_quad_in[0] | pick_quad_in[1] ) ) | | |
1761 | ( quad_state[1] & ~pick_quad_in[1] ) ) ; | |
1762 | ||
1763 | ||
1764 | ||
1765 | assign pick_wb_read_wl[3:0] = (pick_quad0_sel[3:0] & {4{pick_quad_sel[0]}}) ; | |
1766 | assign pick_wb_read_wl[7:4] = (pick_quad1_sel[3:0] & {4{pick_quad_sel[1]}}) ; | |
1767 | ||
1768 | assign pick_rdmat_read_wl[3:0]= (pick_quad2_sel[3:0] & {4{pick_quad_sel[2]}}) ; | |
1769 | ||
1770 | ||
1771 | ||
1772 | ||
1773 | ||
1774 | ||
1775 | ||
1776 | //////////////////////////////////////////////////////////////////////////////// | |
1777 | ||
1778 | assign inc_wb_count = wbuf_wbtag_write_en_c4 & ~(leave_state2 & | |
1779 | latched_wb_read_en ) ; | |
1780 | assign dec_wb_count = ~wbuf_wbtag_write_en_c4 & | |
1781 | ( leave_state2 & latched_wb_read_en ) ; | |
1782 | assign same_wb_count = ~(inc_wb_count | dec_wb_count) ; | |
1783 | ||
1784 | assign wb_count_plus1 = wb_count + 4'b1 ; | |
1785 | assign wb_count_minus1 = wb_count - 4'b1 ; | |
1786 | ||
1787 | l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_4 mux_next_wb_count | |
1788 | (.dout (next_wb_count[3:0]), | |
1789 | .din0 (wb_count[3:0]), .sel0 (same_wb_count), | |
1790 | .din1 (wb_count_plus1[3:0]), .sel1 (inc_wb_count), | |
1791 | .din2 (wb_count_minus1[3:0]), .sel2 (dec_wb_count) | |
1792 | ) ; | |
1793 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_4 ff_wb_count // sync reset active low | |
1794 | (.dout (wb_count[3:0]), | |
1795 | .scan_in(ff_wb_count_scanin), | |
1796 | .scan_out(ff_wb_count_scanout), | |
1797 | .din (next_wb_count[3:0]), | |
1798 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
1799 | .siclk(siclk), | |
1800 | .soclk(soclk) | |
1801 | ||
1802 | ||
1803 | ) ; | |
1804 | ||
1805 | //s//ynopsys translate_off FIXME fix sunv | |
1806 | // | |
1807 | // removing until sunv gets fixed | |
1808 | // | |
1809 | // always @(wb_count ) begin | |
1810 | // if( wb_count > 4'd8 ) begin // BS and SR int 5.0 changes | |
1811 | // // 0in <fire -message "FATAL ERROR: wb_counter overflow." | |
1812 | // `ifdef DEFINE_0IN | |
1813 | // `else | |
1814 | // $error("WB_COUNT", "wb_counter overflow."); | |
1815 | // `endif | |
1816 | // end | |
1817 | // end | |
1818 | //s//ynopsys translate_on FIXME fix sunv | |
1819 | ||
1820 | ||
1821 | //////////////////////////////////////////////////////////////////////////// | |
1822 | // wb_count is a c5 flop. | |
1823 | // The following condition is actually evaluated in C4 and flopped to C5 | |
1824 | // | |
1825 | // When an eviction is in C4, the earliest following eviction can be | |
1826 | // in C1 and the one following that could be in PX2 ( happens if the | |
1827 | // C1 instruction has stalled ). | |
1828 | // Hence the px1 instruction will not be picked if the counter is 6 or greater. | |
1829 | ||
1830 | //////////////////////////////////////////////////////////////////////////// | |
1831 | assign wb_count_5 = (wb_count[3:0] == 4'd5) ; | |
1832 | assign wb_count_5_plus = (wb_count[3:0] > 4'd5) ; | |
1833 | ||
1834 | ||
1835 | assign wbuf_arb_full_px1_in = wb_count_5_plus | (wb_count_5 & inc_wb_count) ; | |
1836 | l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_1 ff_wbuf_arb_full_px1 // sync reset active low | |
1837 | (.dout (wbuf_arb_full_px1), | |
1838 | .scan_in(ff_wbuf_arb_full_px1_scanin), | |
1839 | .scan_out(ff_wbuf_arb_full_px1_scanout), | |
1840 | .din (wbuf_arb_full_px1_in), | |
1841 | .l1clk (l1clk), .clr(~dbb_rst_l), | |
1842 | .siclk(siclk), | |
1843 | .soclk(soclk) | |
1844 | ||
1845 | ||
1846 | ) ; | |
1847 | ||
1848 | ||
1849 | //////////////////////////////////////////////////////////////////////////////// | |
1850 | ||
1851 | // fixscan start: | |
1852 | assign reset_flop_scanin = scan_in ; | |
1853 | assign spares_scanin = reset_flop_scanout ; | |
1854 | assign ff_arb_wbuf_inst_vld_c3_scanin = spares_scanout ; | |
1855 | assign ff_arbdp_inst_fb_c3_scanin = ff_arb_wbuf_inst_vld_c3_scanout; | |
1856 | assign ff_arb_wbuf_hit_off_c2_scanin = ff_arbdp_inst_fb_c3_scanout; | |
1857 | assign ff_mcu_l2t_wr_ack_d1_scanin = ff_arb_wbuf_hit_off_c2_scanout; | |
1858 | assign ff_l2t_mb2_run_r1_scanin = ff_mcu_l2t_wr_ack_d1_scanout; | |
1859 | assign ff_wbtag_write_wl_c5_scanin = ff_l2t_mb2_run_r1_scanout; | |
1860 | assign ff_enc_write_wl_c52_scanin = ff_wbtag_write_wl_c5_scanout; | |
1861 | assign ff_enc_write_wl_c6_scanin = ff_enc_write_wl_c52_scanout; | |
1862 | assign ff_l2_bypass_mode_on_d1_scanin = ff_enc_write_wl_c6_scanout; | |
1863 | assign ff_wbtag_write_en_c4_scanin = ff_l2_bypass_mode_on_d1_scanout; | |
1864 | assign ff_wbtag_write_we_c5_scanin = ff_wbtag_write_en_c4_scanout; | |
1865 | assign ff_wbtag_write_we_c52_scanin = ff_wbtag_write_we_c5_scanout; | |
1866 | assign ff_wbtag_write_we_c6_scanin = ff_wbtag_write_we_c52_scanout; | |
1867 | assign ff_wb_valid_scanin = ff_wbtag_write_we_c6_scanout; | |
1868 | assign ff_wb_acked_scanin = ff_wb_valid_scanout ; | |
1869 | assign ff_bypass_en_c2_scanin = ff_wb_acked_scanout ; | |
1870 | assign ff_wb_cam_match_c2_scanin = ff_bypass_en_c2_scanout ; | |
1871 | assign ff_wb_cam_hit_vec_c3_scanin = ff_wb_cam_match_c2_scanout; | |
1872 | assign ff_wb_cam_hit_vec_c4_scanin = ff_wb_cam_hit_vec_c3_scanout; | |
1873 | assign ff_wbuf_hit_qual_c3_scanin = ff_wb_cam_hit_vec_c4_scanout; | |
1874 | assign ff_wbuf_hit_qual_c4_scanin = ff_wbuf_hit_qual_c3_scanout; | |
1875 | assign ff_mbid0_scanin = ff_wbuf_hit_qual_c4_scanout; | |
1876 | assign ff_mbid1_scanin = ff_mbid0_scanout ; | |
1877 | assign ff_mbid2_scanin = ff_mbid1_scanout ; | |
1878 | assign ff_mbid3_scanin = ff_mbid2_scanout ; | |
1879 | assign ff_mbid4_scanin = ff_mbid3_scanout ; | |
1880 | assign ff_mbid5_scanin = ff_mbid4_scanout ; | |
1881 | assign ff_mbid6_scanin = ff_mbid5_scanout ; | |
1882 | assign ff_mbid7_scanin = ff_mbid6_scanout ; | |
1883 | assign ff_wb_mbid_vld_scanin = ff_mbid7_scanout ; | |
1884 | assign ff_or_wb_mbid_vld_scanin = ff_wb_mbid_vld_scanout ; | |
1885 | assign ff_state_scanin = ff_or_wb_mbid_vld_scanout; | |
1886 | assign ff_mcu_req_pending_scanin = ff_state_scanout ; | |
1887 | assign ff_cycle_count_scanin = ff_mcu_req_pending_scanout; | |
1888 | assign ff_latched_wb_read_wl_scanin = ff_cycle_count_scanout ; | |
1889 | assign ff_latched_wb_read_en_scanin = ff_latched_wb_read_wl_scanout; | |
1890 | assign ff_l2t_l2b_rdma_rdwl_r0_scanin = ff_latched_wb_read_en_scanout; | |
1891 | assign ff_latched_rdmad_read_wl_scanin = ff_l2t_l2b_rdma_rdwl_r0_scanout; | |
1892 | assign ff_latched_rdma_read_en_scanin = ff_latched_rdmad_read_wl_scanout; | |
1893 | assign ff_wbuf_wr_addr_sel_scanin = ff_latched_rdma_read_en_scanout; | |
1894 | assign ff_wb_or_rdma_wr_req_en_scanin = ff_wbuf_wr_addr_sel_scanout; | |
1895 | assign ff_l2t_mcu_wr_req_scanin = ff_wb_or_rdma_wr_req_en_scanout; | |
1896 | assign ff_l2t_l2b_wbrd_wl_r0_scanin = ff_l2t_mcu_wr_req_scanout; | |
1897 | assign ff_l2t_l2b_evict_en_r0_d1_scanin = ff_l2t_l2b_wbrd_wl_r0_scanout; | |
1898 | assign ff_cycle_count_in_scanin = ff_l2t_l2b_evict_en_r0_d1_scanout; | |
1899 | assign ff_l2t_sii_wib_dequeue_scanin = ff_cycle_count_in_scanout; | |
1900 | assign ff_l2t_sii_wib_dequeue_delay_scanin = ff_l2t_sii_wib_dequeue_scanout; | |
1901 | assign ff_l2t_dbg_sii_wib_dequeue_scanin = ff_l2t_sii_wib_dequeue_delay_scanout; | |
1902 | assign ff_quad_state_scanin = ff_l2t_dbg_sii_wib_dequeue_scanout; | |
1903 | assign ff_quad0_state_scanin = ff_quad_state_scanout ; | |
1904 | assign ff_quad1_state_scanin = ff_quad0_state_scanout ; | |
1905 | assign ff_quad2_state_scanin = ff_quad1_state_scanout ; | |
1906 | assign ff_wb_count_scanin = ff_quad2_state_scanout ; | |
1907 | assign ff_wbuf_arb_full_px1_scanin = ff_wb_count_scanout ; | |
1908 | assign scan_out = ff_wbuf_arb_full_px1_scanout; | |
1909 | // fixscan end: | |
1910 | endmodule | |
1911 | ||
1912 | ||
1913 | ||
1914 | ||
1915 | ||
1916 | ||
1917 | ||
1918 | // any PARAMS parms go into naming of macro | |
1919 | ||
1920 | module l2t_wbuf_ctl_msff_ctl_macro__width_1 ( | |
1921 | din, | |
1922 | l1clk, | |
1923 | scan_in, | |
1924 | siclk, | |
1925 | soclk, | |
1926 | dout, | |
1927 | scan_out); | |
1928 | wire [0:0] fdin; | |
1929 | ||
1930 | input [0:0] din; | |
1931 | input l1clk; | |
1932 | input scan_in; | |
1933 | ||
1934 | ||
1935 | input siclk; | |
1936 | input soclk; | |
1937 | ||
1938 | output [0:0] dout; | |
1939 | output scan_out; | |
1940 | assign fdin[0:0] = din[0:0]; | |
1941 | ||
1942 | ||
1943 | ||
1944 | ||
1945 | ||
1946 | ||
1947 | dff #(1) d0_0 ( | |
1948 | .l1clk(l1clk), | |
1949 | .siclk(siclk), | |
1950 | .soclk(soclk), | |
1951 | .d(fdin[0:0]), | |
1952 | .si(scan_in), | |
1953 | .so(scan_out), | |
1954 | .q(dout[0:0]) | |
1955 | ); | |
1956 | ||
1957 | ||
1958 | ||
1959 | ||
1960 | ||
1961 | ||
1962 | ||
1963 | ||
1964 | ||
1965 | ||
1966 | ||
1967 | ||
1968 | endmodule | |
1969 | ||
1970 | ||
1971 | ||
1972 | ||
1973 | ||
1974 | ||
1975 | ||
1976 | ||
1977 | ||
1978 | ||
1979 | ||
1980 | ||
1981 | ||
1982 | // any PARAMS parms go into naming of macro | |
1983 | ||
1984 | module l2t_wbuf_ctl_l1clkhdr_ctl_macro ( | |
1985 | l2clk, | |
1986 | l1en, | |
1987 | pce_ov, | |
1988 | stop, | |
1989 | se, | |
1990 | l1clk); | |
1991 | ||
1992 | ||
1993 | input l2clk; | |
1994 | input l1en; | |
1995 | input pce_ov; | |
1996 | input stop; | |
1997 | input se; | |
1998 | output l1clk; | |
1999 | ||
2000 | ||
2001 | ||
2002 | ||
2003 | ||
2004 | cl_sc1_l1hdr_8x c_0 ( | |
2005 | ||
2006 | ||
2007 | .l2clk(l2clk), | |
2008 | .pce(l1en), | |
2009 | .l1clk(l1clk), | |
2010 | .se(se), | |
2011 | .pce_ov(pce_ov), | |
2012 | .stop(stop) | |
2013 | ); | |
2014 | ||
2015 | ||
2016 | ||
2017 | endmodule | |
2018 | ||
2019 | ||
2020 | ||
2021 | ||
2022 | ||
2023 | ||
2024 | ||
2025 | ||
2026 | ||
2027 | // Description: Spare gate macro for control blocks | |
2028 | // | |
2029 | // Param num controls the number of times the macro is added | |
2030 | // flops=0 can be used to use only combination spare logic | |
2031 | ||
2032 | ||
2033 | module l2t_wbuf_ctl_spare_ctl_macro__num_4 ( | |
2034 | l1clk, | |
2035 | scan_in, | |
2036 | siclk, | |
2037 | soclk, | |
2038 | scan_out); | |
2039 | wire si_0; | |
2040 | wire so_0; | |
2041 | wire spare0_flop_unused; | |
2042 | wire spare0_buf_32x_unused; | |
2043 | wire spare0_nand3_8x_unused; | |
2044 | wire spare0_inv_8x_unused; | |
2045 | wire spare0_aoi22_4x_unused; | |
2046 | wire spare0_buf_8x_unused; | |
2047 | wire spare0_oai22_4x_unused; | |
2048 | wire spare0_inv_16x_unused; | |
2049 | wire spare0_nand2_16x_unused; | |
2050 | wire spare0_nor3_4x_unused; | |
2051 | wire spare0_nand2_8x_unused; | |
2052 | wire spare0_buf_16x_unused; | |
2053 | wire spare0_nor2_16x_unused; | |
2054 | wire spare0_inv_32x_unused; | |
2055 | wire si_1; | |
2056 | wire so_1; | |
2057 | wire spare1_flop_unused; | |
2058 | wire spare1_buf_32x_unused; | |
2059 | wire spare1_nand3_8x_unused; | |
2060 | wire spare1_inv_8x_unused; | |
2061 | wire spare1_aoi22_4x_unused; | |
2062 | wire spare1_buf_8x_unused; | |
2063 | wire spare1_oai22_4x_unused; | |
2064 | wire spare1_inv_16x_unused; | |
2065 | wire spare1_nand2_16x_unused; | |
2066 | wire spare1_nor3_4x_unused; | |
2067 | wire spare1_nand2_8x_unused; | |
2068 | wire spare1_buf_16x_unused; | |
2069 | wire spare1_nor2_16x_unused; | |
2070 | wire spare1_inv_32x_unused; | |
2071 | wire si_2; | |
2072 | wire so_2; | |
2073 | wire spare2_flop_unused; | |
2074 | wire spare2_buf_32x_unused; | |
2075 | wire spare2_nand3_8x_unused; | |
2076 | wire spare2_inv_8x_unused; | |
2077 | wire spare2_aoi22_4x_unused; | |
2078 | wire spare2_buf_8x_unused; | |
2079 | wire spare2_oai22_4x_unused; | |
2080 | wire spare2_inv_16x_unused; | |
2081 | wire spare2_nand2_16x_unused; | |
2082 | wire spare2_nor3_4x_unused; | |
2083 | wire spare2_nand2_8x_unused; | |
2084 | wire spare2_buf_16x_unused; | |
2085 | wire spare2_nor2_16x_unused; | |
2086 | wire spare2_inv_32x_unused; | |
2087 | wire si_3; | |
2088 | wire so_3; | |
2089 | wire spare3_flop_unused; | |
2090 | wire spare3_buf_32x_unused; | |
2091 | wire spare3_nand3_8x_unused; | |
2092 | wire spare3_inv_8x_unused; | |
2093 | wire spare3_aoi22_4x_unused; | |
2094 | wire spare3_buf_8x_unused; | |
2095 | wire spare3_oai22_4x_unused; | |
2096 | wire spare3_inv_16x_unused; | |
2097 | wire spare3_nand2_16x_unused; | |
2098 | wire spare3_nor3_4x_unused; | |
2099 | wire spare3_nand2_8x_unused; | |
2100 | wire spare3_buf_16x_unused; | |
2101 | wire spare3_nor2_16x_unused; | |
2102 | wire spare3_inv_32x_unused; | |
2103 | ||
2104 | ||
2105 | input l1clk; | |
2106 | input scan_in; | |
2107 | input siclk; | |
2108 | input soclk; | |
2109 | output scan_out; | |
2110 | ||
2111 | cl_sc1_msff_8x spare0_flop (.l1clk(l1clk), | |
2112 | .siclk(siclk), | |
2113 | .soclk(soclk), | |
2114 | .si(si_0), | |
2115 | .so(so_0), | |
2116 | .d(1'b0), | |
2117 | .q(spare0_flop_unused)); | |
2118 | assign si_0 = scan_in; | |
2119 | ||
2120 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
2121 | .out(spare0_buf_32x_unused)); | |
2122 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
2123 | .in1(1'b1), | |
2124 | .in2(1'b1), | |
2125 | .out(spare0_nand3_8x_unused)); | |
2126 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
2127 | .out(spare0_inv_8x_unused)); | |
2128 | cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1), | |
2129 | .in01(1'b1), | |
2130 | .in10(1'b1), | |
2131 | .in11(1'b1), | |
2132 | .out(spare0_aoi22_4x_unused)); | |
2133 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
2134 | .out(spare0_buf_8x_unused)); | |
2135 | cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1), | |
2136 | .in01(1'b1), | |
2137 | .in10(1'b1), | |
2138 | .in11(1'b1), | |
2139 | .out(spare0_oai22_4x_unused)); | |
2140 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
2141 | .out(spare0_inv_16x_unused)); | |
2142 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
2143 | .in1(1'b1), | |
2144 | .out(spare0_nand2_16x_unused)); | |
2145 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
2146 | .in1(1'b0), | |
2147 | .in2(1'b0), | |
2148 | .out(spare0_nor3_4x_unused)); | |
2149 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
2150 | .in1(1'b1), | |
2151 | .out(spare0_nand2_8x_unused)); | |
2152 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
2153 | .out(spare0_buf_16x_unused)); | |
2154 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
2155 | .in1(1'b0), | |
2156 | .out(spare0_nor2_16x_unused)); | |
2157 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
2158 | .out(spare0_inv_32x_unused)); | |
2159 | ||
2160 | cl_sc1_msff_8x spare1_flop (.l1clk(l1clk), | |
2161 | .siclk(siclk), | |
2162 | .soclk(soclk), | |
2163 | .si(si_1), | |
2164 | .so(so_1), | |
2165 | .d(1'b0), | |
2166 | .q(spare1_flop_unused)); | |
2167 | assign si_1 = so_0; | |
2168 | ||
2169 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
2170 | .out(spare1_buf_32x_unused)); | |
2171 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
2172 | .in1(1'b1), | |
2173 | .in2(1'b1), | |
2174 | .out(spare1_nand3_8x_unused)); | |
2175 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
2176 | .out(spare1_inv_8x_unused)); | |
2177 | cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1), | |
2178 | .in01(1'b1), | |
2179 | .in10(1'b1), | |
2180 | .in11(1'b1), | |
2181 | .out(spare1_aoi22_4x_unused)); | |
2182 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
2183 | .out(spare1_buf_8x_unused)); | |
2184 | cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1), | |
2185 | .in01(1'b1), | |
2186 | .in10(1'b1), | |
2187 | .in11(1'b1), | |
2188 | .out(spare1_oai22_4x_unused)); | |
2189 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
2190 | .out(spare1_inv_16x_unused)); | |
2191 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
2192 | .in1(1'b1), | |
2193 | .out(spare1_nand2_16x_unused)); | |
2194 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
2195 | .in1(1'b0), | |
2196 | .in2(1'b0), | |
2197 | .out(spare1_nor3_4x_unused)); | |
2198 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
2199 | .in1(1'b1), | |
2200 | .out(spare1_nand2_8x_unused)); | |
2201 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
2202 | .out(spare1_buf_16x_unused)); | |
2203 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
2204 | .in1(1'b0), | |
2205 | .out(spare1_nor2_16x_unused)); | |
2206 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
2207 | .out(spare1_inv_32x_unused)); | |
2208 | ||
2209 | cl_sc1_msff_8x spare2_flop (.l1clk(l1clk), | |
2210 | .siclk(siclk), | |
2211 | .soclk(soclk), | |
2212 | .si(si_2), | |
2213 | .so(so_2), | |
2214 | .d(1'b0), | |
2215 | .q(spare2_flop_unused)); | |
2216 | assign si_2 = so_1; | |
2217 | ||
2218 | cl_u1_buf_32x spare2_buf_32x (.in(1'b1), | |
2219 | .out(spare2_buf_32x_unused)); | |
2220 | cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1), | |
2221 | .in1(1'b1), | |
2222 | .in2(1'b1), | |
2223 | .out(spare2_nand3_8x_unused)); | |
2224 | cl_u1_inv_8x spare2_inv_8x (.in(1'b1), | |
2225 | .out(spare2_inv_8x_unused)); | |
2226 | cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1), | |
2227 | .in01(1'b1), | |
2228 | .in10(1'b1), | |
2229 | .in11(1'b1), | |
2230 | .out(spare2_aoi22_4x_unused)); | |
2231 | cl_u1_buf_8x spare2_buf_8x (.in(1'b1), | |
2232 | .out(spare2_buf_8x_unused)); | |
2233 | cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1), | |
2234 | .in01(1'b1), | |
2235 | .in10(1'b1), | |
2236 | .in11(1'b1), | |
2237 | .out(spare2_oai22_4x_unused)); | |
2238 | cl_u1_inv_16x spare2_inv_16x (.in(1'b1), | |
2239 | .out(spare2_inv_16x_unused)); | |
2240 | cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1), | |
2241 | .in1(1'b1), | |
2242 | .out(spare2_nand2_16x_unused)); | |
2243 | cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0), | |
2244 | .in1(1'b0), | |
2245 | .in2(1'b0), | |
2246 | .out(spare2_nor3_4x_unused)); | |
2247 | cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1), | |
2248 | .in1(1'b1), | |
2249 | .out(spare2_nand2_8x_unused)); | |
2250 | cl_u1_buf_16x spare2_buf_16x (.in(1'b1), | |
2251 | .out(spare2_buf_16x_unused)); | |
2252 | cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0), | |
2253 | .in1(1'b0), | |
2254 | .out(spare2_nor2_16x_unused)); | |
2255 | cl_u1_inv_32x spare2_inv_32x (.in(1'b1), | |
2256 | .out(spare2_inv_32x_unused)); | |
2257 | ||
2258 | cl_sc1_msff_8x spare3_flop (.l1clk(l1clk), | |
2259 | .siclk(siclk), | |
2260 | .soclk(soclk), | |
2261 | .si(si_3), | |
2262 | .so(so_3), | |
2263 | .d(1'b0), | |
2264 | .q(spare3_flop_unused)); | |
2265 | assign si_3 = so_2; | |
2266 | ||
2267 | cl_u1_buf_32x spare3_buf_32x (.in(1'b1), | |
2268 | .out(spare3_buf_32x_unused)); | |
2269 | cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1), | |
2270 | .in1(1'b1), | |
2271 | .in2(1'b1), | |
2272 | .out(spare3_nand3_8x_unused)); | |
2273 | cl_u1_inv_8x spare3_inv_8x (.in(1'b1), | |
2274 | .out(spare3_inv_8x_unused)); | |
2275 | cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1), | |
2276 | .in01(1'b1), | |
2277 | .in10(1'b1), | |
2278 | .in11(1'b1), | |
2279 | .out(spare3_aoi22_4x_unused)); | |
2280 | cl_u1_buf_8x spare3_buf_8x (.in(1'b1), | |
2281 | .out(spare3_buf_8x_unused)); | |
2282 | cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1), | |
2283 | .in01(1'b1), | |
2284 | .in10(1'b1), | |
2285 | .in11(1'b1), | |
2286 | .out(spare3_oai22_4x_unused)); | |
2287 | cl_u1_inv_16x spare3_inv_16x (.in(1'b1), | |
2288 | .out(spare3_inv_16x_unused)); | |
2289 | cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1), | |
2290 | .in1(1'b1), | |
2291 | .out(spare3_nand2_16x_unused)); | |
2292 | cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0), | |
2293 | .in1(1'b0), | |
2294 | .in2(1'b0), | |
2295 | .out(spare3_nor3_4x_unused)); | |
2296 | cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1), | |
2297 | .in1(1'b1), | |
2298 | .out(spare3_nand2_8x_unused)); | |
2299 | cl_u1_buf_16x spare3_buf_16x (.in(1'b1), | |
2300 | .out(spare3_buf_16x_unused)); | |
2301 | cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0), | |
2302 | .in1(1'b0), | |
2303 | .out(spare3_nor2_16x_unused)); | |
2304 | cl_u1_inv_32x spare3_inv_32x (.in(1'b1), | |
2305 | .out(spare3_inv_32x_unused)); | |
2306 | assign scan_out = so_3; | |
2307 | ||
2308 | ||
2309 | ||
2310 | endmodule | |
2311 | ||
2312 | ||
2313 | ||
2314 | ||
2315 | ||
2316 | ||
2317 | // any PARAMS parms go into naming of macro | |
2318 | ||
2319 | module l2t_wbuf_ctl_msff_ctl_macro__dmsff_32x__width_1 ( | |
2320 | din, | |
2321 | l1clk, | |
2322 | scan_in, | |
2323 | siclk, | |
2324 | soclk, | |
2325 | dout, | |
2326 | scan_out); | |
2327 | wire [0:0] fdin; | |
2328 | ||
2329 | input [0:0] din; | |
2330 | input l1clk; | |
2331 | input scan_in; | |
2332 | ||
2333 | ||
2334 | input siclk; | |
2335 | input soclk; | |
2336 | ||
2337 | output [0:0] dout; | |
2338 | output scan_out; | |
2339 | assign fdin[0:0] = din[0:0]; | |
2340 | ||
2341 | ||
2342 | ||
2343 | ||
2344 | ||
2345 | ||
2346 | dff #(1) d0_0 ( | |
2347 | .l1clk(l1clk), | |
2348 | .siclk(siclk), | |
2349 | .soclk(soclk), | |
2350 | .d(fdin[0:0]), | |
2351 | .si(scan_in), | |
2352 | .so(scan_out), | |
2353 | .q(dout[0:0]) | |
2354 | ); | |
2355 | ||
2356 | ||
2357 | ||
2358 | ||
2359 | ||
2360 | ||
2361 | ||
2362 | ||
2363 | ||
2364 | ||
2365 | ||
2366 | ||
2367 | endmodule | |
2368 | ||
2369 | ||
2370 | ||
2371 | ||
2372 | ||
2373 | ||
2374 | ||
2375 | ||
2376 | ||
2377 | ||
2378 | ||
2379 | ||
2380 | ||
2381 | // any PARAMS parms go into naming of macro | |
2382 | ||
2383 | module l2t_wbuf_ctl_msff_ctl_macro__width_16 ( | |
2384 | din, | |
2385 | l1clk, | |
2386 | scan_in, | |
2387 | siclk, | |
2388 | soclk, | |
2389 | dout, | |
2390 | scan_out); | |
2391 | wire [15:0] fdin; | |
2392 | wire [14:0] so; | |
2393 | ||
2394 | input [15:0] din; | |
2395 | input l1clk; | |
2396 | input scan_in; | |
2397 | ||
2398 | ||
2399 | input siclk; | |
2400 | input soclk; | |
2401 | ||
2402 | output [15:0] dout; | |
2403 | output scan_out; | |
2404 | assign fdin[15:0] = din[15:0]; | |
2405 | ||
2406 | ||
2407 | ||
2408 | ||
2409 | ||
2410 | ||
2411 | dff #(16) d0_0 ( | |
2412 | .l1clk(l1clk), | |
2413 | .siclk(siclk), | |
2414 | .soclk(soclk), | |
2415 | .d(fdin[15:0]), | |
2416 | .si({scan_in,so[14:0]}), | |
2417 | .so({so[14:0],scan_out}), | |
2418 | .q(dout[15:0]) | |
2419 | ); | |
2420 | ||
2421 | ||
2422 | ||
2423 | ||
2424 | ||
2425 | ||
2426 | ||
2427 | ||
2428 | ||
2429 | ||
2430 | ||
2431 | ||
2432 | endmodule | |
2433 | ||
2434 | ||
2435 | ||
2436 | ||
2437 | ||
2438 | ||
2439 | ||
2440 | ||
2441 | ||
2442 | ||
2443 | ||
2444 | ||
2445 | ||
2446 | // any PARAMS parms go into naming of macro | |
2447 | ||
2448 | module l2t_wbuf_ctl_msff_ctl_macro__width_8 ( | |
2449 | din, | |
2450 | l1clk, | |
2451 | scan_in, | |
2452 | siclk, | |
2453 | soclk, | |
2454 | dout, | |
2455 | scan_out); | |
2456 | wire [7:0] fdin; | |
2457 | wire [6:0] so; | |
2458 | ||
2459 | input [7:0] din; | |
2460 | input l1clk; | |
2461 | input scan_in; | |
2462 | ||
2463 | ||
2464 | input siclk; | |
2465 | input soclk; | |
2466 | ||
2467 | output [7:0] dout; | |
2468 | output scan_out; | |
2469 | assign fdin[7:0] = din[7:0]; | |
2470 | ||
2471 | ||
2472 | ||
2473 | ||
2474 | ||
2475 | ||
2476 | dff #(8) d0_0 ( | |
2477 | .l1clk(l1clk), | |
2478 | .siclk(siclk), | |
2479 | .soclk(soclk), | |
2480 | .d(fdin[7:0]), | |
2481 | .si({scan_in,so[6:0]}), | |
2482 | .so({so[6:0],scan_out}), | |
2483 | .q(dout[7:0]) | |
2484 | ); | |
2485 | ||
2486 | ||
2487 | ||
2488 | ||
2489 | ||
2490 | ||
2491 | ||
2492 | ||
2493 | ||
2494 | ||
2495 | ||
2496 | ||
2497 | endmodule | |
2498 | ||
2499 | ||
2500 | ||
2501 | ||
2502 | ||
2503 | ||
2504 | ||
2505 | ||
2506 | ||
2507 | ||
2508 | ||
2509 | ||
2510 | ||
2511 | // any PARAMS parms go into naming of macro | |
2512 | ||
2513 | module l2t_wbuf_ctl_msff_ctl_macro__width_3 ( | |
2514 | din, | |
2515 | l1clk, | |
2516 | scan_in, | |
2517 | siclk, | |
2518 | soclk, | |
2519 | dout, | |
2520 | scan_out); | |
2521 | wire [2:0] fdin; | |
2522 | wire [1:0] so; | |
2523 | ||
2524 | input [2:0] din; | |
2525 | input l1clk; | |
2526 | input scan_in; | |
2527 | ||
2528 | ||
2529 | input siclk; | |
2530 | input soclk; | |
2531 | ||
2532 | output [2:0] dout; | |
2533 | output scan_out; | |
2534 | assign fdin[2:0] = din[2:0]; | |
2535 | ||
2536 | ||
2537 | ||
2538 | ||
2539 | ||
2540 | ||
2541 | dff #(3) d0_0 ( | |
2542 | .l1clk(l1clk), | |
2543 | .siclk(siclk), | |
2544 | .soclk(soclk), | |
2545 | .d(fdin[2:0]), | |
2546 | .si({scan_in,so[1:0]}), | |
2547 | .so({so[1:0],scan_out}), | |
2548 | .q(dout[2:0]) | |
2549 | ); | |
2550 | ||
2551 | ||
2552 | ||
2553 | ||
2554 | ||
2555 | ||
2556 | ||
2557 | ||
2558 | ||
2559 | ||
2560 | ||
2561 | ||
2562 | endmodule | |
2563 | ||
2564 | ||
2565 | ||
2566 | ||
2567 | ||
2568 | ||
2569 | ||
2570 | ||
2571 | ||
2572 | ||
2573 | ||
2574 | ||
2575 | ||
2576 | // any PARAMS parms go into naming of macro | |
2577 | ||
2578 | module l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_8 ( | |
2579 | din, | |
2580 | clr, | |
2581 | l1clk, | |
2582 | scan_in, | |
2583 | siclk, | |
2584 | soclk, | |
2585 | dout, | |
2586 | scan_out); | |
2587 | wire [7:0] fdin; | |
2588 | wire [6:0] so; | |
2589 | ||
2590 | input [7:0] din; | |
2591 | input clr; | |
2592 | input l1clk; | |
2593 | input scan_in; | |
2594 | ||
2595 | ||
2596 | input siclk; | |
2597 | input soclk; | |
2598 | ||
2599 | output [7:0] dout; | |
2600 | output scan_out; | |
2601 | assign fdin[7:0] = din[7:0] & ~{8{clr}}; | |
2602 | ||
2603 | ||
2604 | ||
2605 | ||
2606 | ||
2607 | ||
2608 | dff #(8) d0_0 ( | |
2609 | .l1clk(l1clk), | |
2610 | .siclk(siclk), | |
2611 | .soclk(soclk), | |
2612 | .d(fdin[7:0]), | |
2613 | .si({scan_in,so[6:0]}), | |
2614 | .so({so[6:0],scan_out}), | |
2615 | .q(dout[7:0]) | |
2616 | ); | |
2617 | ||
2618 | ||
2619 | ||
2620 | ||
2621 | ||
2622 | ||
2623 | ||
2624 | ||
2625 | ||
2626 | ||
2627 | ||
2628 | ||
2629 | endmodule | |
2630 | ||
2631 | ||
2632 | ||
2633 | ||
2634 | ||
2635 | ||
2636 | ||
2637 | ||
2638 | ||
2639 | ||
2640 | ||
2641 | ||
2642 | ||
2643 | // any PARAMS parms go into naming of macro | |
2644 | ||
2645 | module l2t_wbuf_ctl_msff_ctl_macro__width_10 ( | |
2646 | din, | |
2647 | l1clk, | |
2648 | scan_in, | |
2649 | siclk, | |
2650 | soclk, | |
2651 | dout, | |
2652 | scan_out); | |
2653 | wire [9:0] fdin; | |
2654 | wire [8:0] so; | |
2655 | ||
2656 | input [9:0] din; | |
2657 | input l1clk; | |
2658 | input scan_in; | |
2659 | ||
2660 | ||
2661 | input siclk; | |
2662 | input soclk; | |
2663 | ||
2664 | output [9:0] dout; | |
2665 | output scan_out; | |
2666 | assign fdin[9:0] = din[9:0]; | |
2667 | ||
2668 | ||
2669 | ||
2670 | ||
2671 | ||
2672 | ||
2673 | dff #(10) d0_0 ( | |
2674 | .l1clk(l1clk), | |
2675 | .siclk(siclk), | |
2676 | .soclk(soclk), | |
2677 | .d(fdin[9:0]), | |
2678 | .si({scan_in,so[8:0]}), | |
2679 | .so({so[8:0],scan_out}), | |
2680 | .q(dout[9:0]) | |
2681 | ); | |
2682 | ||
2683 | ||
2684 | ||
2685 | ||
2686 | ||
2687 | ||
2688 | ||
2689 | ||
2690 | ||
2691 | ||
2692 | ||
2693 | ||
2694 | endmodule | |
2695 | ||
2696 | ||
2697 | ||
2698 | ||
2699 | ||
2700 | ||
2701 | ||
2702 | ||
2703 | ||
2704 | ||
2705 | ||
2706 | ||
2707 | ||
2708 | // any PARAMS parms go into naming of macro | |
2709 | ||
2710 | module l2t_wbuf_ctl_msff_ctl_macro__en_1__width_5 ( | |
2711 | din, | |
2712 | en, | |
2713 | l1clk, | |
2714 | scan_in, | |
2715 | siclk, | |
2716 | soclk, | |
2717 | dout, | |
2718 | scan_out); | |
2719 | wire [4:0] fdin; | |
2720 | wire [3:0] so; | |
2721 | ||
2722 | input [4:0] din; | |
2723 | input en; | |
2724 | input l1clk; | |
2725 | input scan_in; | |
2726 | ||
2727 | ||
2728 | input siclk; | |
2729 | input soclk; | |
2730 | ||
2731 | output [4:0] dout; | |
2732 | output scan_out; | |
2733 | assign fdin[4:0] = (din[4:0] & {5{en}}) | (dout[4:0] & ~{5{en}}); | |
2734 | ||
2735 | ||
2736 | ||
2737 | ||
2738 | ||
2739 | ||
2740 | dff #(5) d0_0 ( | |
2741 | .l1clk(l1clk), | |
2742 | .siclk(siclk), | |
2743 | .soclk(soclk), | |
2744 | .d(fdin[4:0]), | |
2745 | .si({scan_in,so[3:0]}), | |
2746 | .so({so[3:0],scan_out}), | |
2747 | .q(dout[4:0]) | |
2748 | ); | |
2749 | ||
2750 | ||
2751 | ||
2752 | ||
2753 | ||
2754 | ||
2755 | ||
2756 | ||
2757 | ||
2758 | ||
2759 | ||
2760 | ||
2761 | endmodule | |
2762 | ||
2763 | ||
2764 | ||
2765 | ||
2766 | ||
2767 | ||
2768 | ||
2769 | ||
2770 | ||
2771 | ||
2772 | ||
2773 | ||
2774 | ||
2775 | // any PARAMS parms go into naming of macro | |
2776 | ||
2777 | module l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_1 ( | |
2778 | din, | |
2779 | clr, | |
2780 | l1clk, | |
2781 | scan_in, | |
2782 | siclk, | |
2783 | soclk, | |
2784 | dout, | |
2785 | scan_out); | |
2786 | wire [0:0] fdin; | |
2787 | ||
2788 | input [0:0] din; | |
2789 | input clr; | |
2790 | input l1clk; | |
2791 | input scan_in; | |
2792 | ||
2793 | ||
2794 | input siclk; | |
2795 | input soclk; | |
2796 | ||
2797 | output [0:0] dout; | |
2798 | output scan_out; | |
2799 | assign fdin[0:0] = din[0:0] & ~{1{clr}}; | |
2800 | ||
2801 | ||
2802 | ||
2803 | ||
2804 | ||
2805 | ||
2806 | dff #(1) d0_0 ( | |
2807 | .l1clk(l1clk), | |
2808 | .siclk(siclk), | |
2809 | .soclk(soclk), | |
2810 | .d(fdin[0:0]), | |
2811 | .si(scan_in), | |
2812 | .so(scan_out), | |
2813 | .q(dout[0:0]) | |
2814 | ); | |
2815 | ||
2816 | ||
2817 | ||
2818 | ||
2819 | ||
2820 | ||
2821 | ||
2822 | ||
2823 | ||
2824 | ||
2825 | ||
2826 | ||
2827 | endmodule | |
2828 | ||
2829 | ||
2830 | ||
2831 | ||
2832 | ||
2833 | ||
2834 | ||
2835 | ||
2836 | ||
2837 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
2838 | // also for pass-gate with decoder | |
2839 | ||
2840 | ||
2841 | ||
2842 | ||
2843 | ||
2844 | // any PARAMS parms go into naming of macro | |
2845 | ||
2846 | module l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_4__width_5 ( | |
2847 | din0, | |
2848 | sel0, | |
2849 | din1, | |
2850 | sel1, | |
2851 | din2, | |
2852 | sel2, | |
2853 | din3, | |
2854 | sel3, | |
2855 | dout); | |
2856 | input [4:0] din0; | |
2857 | input sel0; | |
2858 | input [4:0] din1; | |
2859 | input sel1; | |
2860 | input [4:0] din2; | |
2861 | input sel2; | |
2862 | input [4:0] din3; | |
2863 | input sel3; | |
2864 | output [4:0] dout; | |
2865 | ||
2866 | ||
2867 | ||
2868 | ||
2869 | ||
2870 | assign dout[4:0] = ( {5{sel0}} & din0[4:0] ) | | |
2871 | ( {5{sel1}} & din1[4:0]) | | |
2872 | ( {5{sel2}} & din2[4:0]) | | |
2873 | ( {5{sel3}} & din3[4:0]); | |
2874 | ||
2875 | ||
2876 | ||
2877 | ||
2878 | ||
2879 | endmodule | |
2880 | ||
2881 | ||
2882 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
2883 | // also for pass-gate with decoder | |
2884 | ||
2885 | ||
2886 | ||
2887 | ||
2888 | ||
2889 | // any PARAMS parms go into naming of macro | |
2890 | ||
2891 | module l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_2__width_5 ( | |
2892 | din0, | |
2893 | sel0, | |
2894 | din1, | |
2895 | sel1, | |
2896 | dout); | |
2897 | input [4:0] din0; | |
2898 | input sel0; | |
2899 | input [4:0] din1; | |
2900 | input sel1; | |
2901 | output [4:0] dout; | |
2902 | ||
2903 | ||
2904 | ||
2905 | ||
2906 | ||
2907 | assign dout[4:0] = ( {5{sel0}} & din0[4:0] ) | | |
2908 | ( {5{sel1}} & din1[4:0]); | |
2909 | ||
2910 | ||
2911 | ||
2912 | ||
2913 | ||
2914 | endmodule | |
2915 | ||
2916 | ||
2917 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
2918 | // also for pass-gate with decoder | |
2919 | ||
2920 | ||
2921 | ||
2922 | ||
2923 | ||
2924 | // any PARAMS parms go into naming of macro | |
2925 | ||
2926 | module l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_2__width_4 ( | |
2927 | din0, | |
2928 | sel0, | |
2929 | din1, | |
2930 | sel1, | |
2931 | dout); | |
2932 | input [3:0] din0; | |
2933 | input sel0; | |
2934 | input [3:0] din1; | |
2935 | input sel1; | |
2936 | output [3:0] dout; | |
2937 | ||
2938 | ||
2939 | ||
2940 | ||
2941 | ||
2942 | assign dout[3:0] = ( {4{sel0}} & din0[3:0] ) | | |
2943 | ( {4{sel1}} & din1[3:0]); | |
2944 | ||
2945 | ||
2946 | ||
2947 | ||
2948 | ||
2949 | endmodule | |
2950 | ||
2951 | ||
2952 | ||
2953 | ||
2954 | ||
2955 | ||
2956 | // any PARAMS parms go into naming of macro | |
2957 | ||
2958 | module l2t_wbuf_ctl_msff_ctl_macro__clr_1__width_4 ( | |
2959 | din, | |
2960 | clr, | |
2961 | l1clk, | |
2962 | scan_in, | |
2963 | siclk, | |
2964 | soclk, | |
2965 | dout, | |
2966 | scan_out); | |
2967 | wire [3:0] fdin; | |
2968 | wire [2:0] so; | |
2969 | ||
2970 | input [3:0] din; | |
2971 | input clr; | |
2972 | input l1clk; | |
2973 | input scan_in; | |
2974 | ||
2975 | ||
2976 | input siclk; | |
2977 | input soclk; | |
2978 | ||
2979 | output [3:0] dout; | |
2980 | output scan_out; | |
2981 | assign fdin[3:0] = din[3:0] & ~{4{clr}}; | |
2982 | ||
2983 | ||
2984 | ||
2985 | ||
2986 | ||
2987 | ||
2988 | dff #(4) d0_0 ( | |
2989 | .l1clk(l1clk), | |
2990 | .siclk(siclk), | |
2991 | .soclk(soclk), | |
2992 | .d(fdin[3:0]), | |
2993 | .si({scan_in,so[2:0]}), | |
2994 | .so({so[2:0],scan_out}), | |
2995 | .q(dout[3:0]) | |
2996 | ); | |
2997 | ||
2998 | ||
2999 | ||
3000 | ||
3001 | ||
3002 | ||
3003 | ||
3004 | ||
3005 | ||
3006 | ||
3007 | ||
3008 | ||
3009 | endmodule | |
3010 | ||
3011 | ||
3012 | ||
3013 | ||
3014 | ||
3015 | ||
3016 | ||
3017 | ||
3018 | ||
3019 | ||
3020 | ||
3021 | ||
3022 | ||
3023 | // any PARAMS parms go into naming of macro | |
3024 | ||
3025 | module l2t_wbuf_ctl_msff_ctl_macro__en_1__width_8 ( | |
3026 | din, | |
3027 | en, | |
3028 | l1clk, | |
3029 | scan_in, | |
3030 | siclk, | |
3031 | soclk, | |
3032 | dout, | |
3033 | scan_out); | |
3034 | wire [7:0] fdin; | |
3035 | wire [6:0] so; | |
3036 | ||
3037 | input [7:0] din; | |
3038 | input en; | |
3039 | input l1clk; | |
3040 | input scan_in; | |
3041 | ||
3042 | ||
3043 | input siclk; | |
3044 | input soclk; | |
3045 | ||
3046 | output [7:0] dout; | |
3047 | output scan_out; | |
3048 | assign fdin[7:0] = (din[7:0] & {8{en}}) | (dout[7:0] & ~{8{en}}); | |
3049 | ||
3050 | ||
3051 | ||
3052 | ||
3053 | ||
3054 | ||
3055 | dff #(8) d0_0 ( | |
3056 | .l1clk(l1clk), | |
3057 | .siclk(siclk), | |
3058 | .soclk(soclk), | |
3059 | .d(fdin[7:0]), | |
3060 | .si({scan_in,so[6:0]}), | |
3061 | .so({so[6:0],scan_out}), | |
3062 | .q(dout[7:0]) | |
3063 | ); | |
3064 | ||
3065 | ||
3066 | ||
3067 | ||
3068 | ||
3069 | ||
3070 | ||
3071 | ||
3072 | ||
3073 | ||
3074 | ||
3075 | ||
3076 | endmodule | |
3077 | ||
3078 | ||
3079 | ||
3080 | ||
3081 | ||
3082 | ||
3083 | ||
3084 | ||
3085 | ||
3086 | ||
3087 | ||
3088 | ||
3089 | ||
3090 | // any PARAMS parms go into naming of macro | |
3091 | ||
3092 | module l2t_wbuf_ctl_msff_ctl_macro__en_1__width_1 ( | |
3093 | din, | |
3094 | en, | |
3095 | l1clk, | |
3096 | scan_in, | |
3097 | siclk, | |
3098 | soclk, | |
3099 | dout, | |
3100 | scan_out); | |
3101 | wire [0:0] fdin; | |
3102 | ||
3103 | input [0:0] din; | |
3104 | input en; | |
3105 | input l1clk; | |
3106 | input scan_in; | |
3107 | ||
3108 | ||
3109 | input siclk; | |
3110 | input soclk; | |
3111 | ||
3112 | output [0:0] dout; | |
3113 | output scan_out; | |
3114 | assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}}); | |
3115 | ||
3116 | ||
3117 | ||
3118 | ||
3119 | ||
3120 | ||
3121 | dff #(1) d0_0 ( | |
3122 | .l1clk(l1clk), | |
3123 | .siclk(siclk), | |
3124 | .soclk(soclk), | |
3125 | .d(fdin[0:0]), | |
3126 | .si(scan_in), | |
3127 | .so(scan_out), | |
3128 | .q(dout[0:0]) | |
3129 | ); | |
3130 | ||
3131 | ||
3132 | ||
3133 | ||
3134 | ||
3135 | ||
3136 | ||
3137 | ||
3138 | ||
3139 | ||
3140 | ||
3141 | ||
3142 | endmodule | |
3143 | ||
3144 | ||
3145 | ||
3146 | ||
3147 | ||
3148 | ||
3149 | ||
3150 | ||
3151 | ||
3152 | ||
3153 | ||
3154 | ||
3155 | ||
3156 | // any PARAMS parms go into naming of macro | |
3157 | ||
3158 | module l2t_wbuf_ctl_msff_ctl_macro__en_1__width_2 ( | |
3159 | din, | |
3160 | en, | |
3161 | l1clk, | |
3162 | scan_in, | |
3163 | siclk, | |
3164 | soclk, | |
3165 | dout, | |
3166 | scan_out); | |
3167 | wire [1:0] fdin; | |
3168 | wire [0:0] so; | |
3169 | ||
3170 | input [1:0] din; | |
3171 | input en; | |
3172 | input l1clk; | |
3173 | input scan_in; | |
3174 | ||
3175 | ||
3176 | input siclk; | |
3177 | input soclk; | |
3178 | ||
3179 | output [1:0] dout; | |
3180 | output scan_out; | |
3181 | assign fdin[1:0] = (din[1:0] & {2{en}}) | (dout[1:0] & ~{2{en}}); | |
3182 | ||
3183 | ||
3184 | ||
3185 | ||
3186 | ||
3187 | ||
3188 | dff #(2) d0_0 ( | |
3189 | .l1clk(l1clk), | |
3190 | .siclk(siclk), | |
3191 | .soclk(soclk), | |
3192 | .d(fdin[1:0]), | |
3193 | .si({scan_in,so[0:0]}), | |
3194 | .so({so[0:0],scan_out}), | |
3195 | .q(dout[1:0]) | |
3196 | ); | |
3197 | ||
3198 | ||
3199 | ||
3200 | ||
3201 | ||
3202 | ||
3203 | ||
3204 | ||
3205 | ||
3206 | ||
3207 | ||
3208 | ||
3209 | endmodule | |
3210 | ||
3211 | ||
3212 | ||
3213 | ||
3214 | ||
3215 | ||
3216 | ||
3217 | ||
3218 | ||
3219 | ||
3220 | ||
3221 | ||
3222 | ||
3223 | // any PARAMS parms go into naming of macro | |
3224 | ||
3225 | module l2t_wbuf_ctl_msff_ctl_macro__en_1__width_4 ( | |
3226 | din, | |
3227 | en, | |
3228 | l1clk, | |
3229 | scan_in, | |
3230 | siclk, | |
3231 | soclk, | |
3232 | dout, | |
3233 | scan_out); | |
3234 | wire [3:0] fdin; | |
3235 | wire [2:0] so; | |
3236 | ||
3237 | input [3:0] din; | |
3238 | input en; | |
3239 | input l1clk; | |
3240 | input scan_in; | |
3241 | ||
3242 | ||
3243 | input siclk; | |
3244 | input soclk; | |
3245 | ||
3246 | output [3:0] dout; | |
3247 | output scan_out; | |
3248 | assign fdin[3:0] = (din[3:0] & {4{en}}) | (dout[3:0] & ~{4{en}}); | |
3249 | ||
3250 | ||
3251 | ||
3252 | ||
3253 | ||
3254 | ||
3255 | dff #(4) d0_0 ( | |
3256 | .l1clk(l1clk), | |
3257 | .siclk(siclk), | |
3258 | .soclk(soclk), | |
3259 | .d(fdin[3:0]), | |
3260 | .si({scan_in,so[2:0]}), | |
3261 | .so({so[2:0],scan_out}), | |
3262 | .q(dout[3:0]) | |
3263 | ); | |
3264 | ||
3265 | ||
3266 | ||
3267 | ||
3268 | ||
3269 | ||
3270 | ||
3271 | ||
3272 | ||
3273 | ||
3274 | ||
3275 | ||
3276 | endmodule | |
3277 | ||
3278 | ||
3279 | ||
3280 | ||
3281 | ||
3282 | ||
3283 | ||
3284 | ||
3285 | ||
3286 | ||
3287 | ||
3288 | ||
3289 | ||
3290 | // any PARAMS parms go into naming of macro | |
3291 | ||
3292 | module l2t_wbuf_ctl_msff_ctl_macro__en_1__width_3 ( | |
3293 | din, | |
3294 | en, | |
3295 | l1clk, | |
3296 | scan_in, | |
3297 | siclk, | |
3298 | soclk, | |
3299 | dout, | |
3300 | scan_out); | |
3301 | wire [2:0] fdin; | |
3302 | wire [1:0] so; | |
3303 | ||
3304 | input [2:0] din; | |
3305 | input en; | |
3306 | input l1clk; | |
3307 | input scan_in; | |
3308 | ||
3309 | ||
3310 | input siclk; | |
3311 | input soclk; | |
3312 | ||
3313 | output [2:0] dout; | |
3314 | output scan_out; | |
3315 | assign fdin[2:0] = (din[2:0] & {3{en}}) | (dout[2:0] & ~{3{en}}); | |
3316 | ||
3317 | ||
3318 | ||
3319 | ||
3320 | ||
3321 | ||
3322 | dff #(3) d0_0 ( | |
3323 | .l1clk(l1clk), | |
3324 | .siclk(siclk), | |
3325 | .soclk(soclk), | |
3326 | .d(fdin[2:0]), | |
3327 | .si({scan_in,so[1:0]}), | |
3328 | .so({so[1:0],scan_out}), | |
3329 | .q(dout[2:0]) | |
3330 | ); | |
3331 | ||
3332 | ||
3333 | ||
3334 | ||
3335 | ||
3336 | ||
3337 | ||
3338 | ||
3339 | ||
3340 | ||
3341 | ||
3342 | ||
3343 | endmodule | |
3344 | ||
3345 | ||
3346 | ||
3347 | ||
3348 | ||
3349 | ||
3350 | ||
3351 | ||
3352 | ||
3353 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
3354 | // also for pass-gate with decoder | |
3355 | ||
3356 | ||
3357 | ||
3358 | ||
3359 | ||
3360 | // any PARAMS parms go into naming of macro | |
3361 | ||
3362 | module l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_3 ( | |
3363 | din0, | |
3364 | sel0, | |
3365 | din1, | |
3366 | sel1, | |
3367 | din2, | |
3368 | sel2, | |
3369 | dout); | |
3370 | input [2:0] din0; | |
3371 | input sel0; | |
3372 | input [2:0] din1; | |
3373 | input sel1; | |
3374 | input [2:0] din2; | |
3375 | input sel2; | |
3376 | output [2:0] dout; | |
3377 | ||
3378 | ||
3379 | ||
3380 | ||
3381 | ||
3382 | assign dout[2:0] = ( {3{sel0}} & din0[2:0] ) | | |
3383 | ( {3{sel1}} & din1[2:0]) | | |
3384 | ( {3{sel2}} & din2[2:0]); | |
3385 | ||
3386 | ||
3387 | ||
3388 | ||
3389 | ||
3390 | endmodule | |
3391 | ||
3392 | ||
3393 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
3394 | // also for pass-gate with decoder | |
3395 | ||
3396 | ||
3397 | ||
3398 | ||
3399 | ||
3400 | // any PARAMS parms go into naming of macro | |
3401 | ||
3402 | module l2t_wbuf_ctl_mux_ctl_macro__mux_aonpe__ports_3__width_4 ( | |
3403 | din0, | |
3404 | sel0, | |
3405 | din1, | |
3406 | sel1, | |
3407 | din2, | |
3408 | sel2, | |
3409 | dout); | |
3410 | input [3:0] din0; | |
3411 | input sel0; | |
3412 | input [3:0] din1; | |
3413 | input sel1; | |
3414 | input [3:0] din2; | |
3415 | input sel2; | |
3416 | output [3:0] dout; | |
3417 | ||
3418 | ||
3419 | ||
3420 | ||
3421 | ||
3422 | assign dout[3:0] = ( {4{sel0}} & din0[3:0] ) | | |
3423 | ( {4{sel1}} & din1[3:0]) | | |
3424 | ( {4{sel2}} & din2[3:0]); | |
3425 | ||
3426 | ||
3427 | ||
3428 | ||
3429 | ||
3430 | endmodule | |
3431 | ||
3432 | ||
3433 | ||
3434 | ||
3435 | ||
3436 | ||
3437 | // any PARAMS parms go into naming of macro | |
3438 | ||
3439 | module l2t_wbuf_ctl_msff_ctl_macro__width_4 ( | |
3440 | din, | |
3441 | l1clk, | |
3442 | scan_in, | |
3443 | siclk, | |
3444 | soclk, | |
3445 | dout, | |
3446 | scan_out); | |
3447 | wire [3:0] fdin; | |
3448 | wire [2:0] so; | |
3449 | ||
3450 | input [3:0] din; | |
3451 | input l1clk; | |
3452 | input scan_in; | |
3453 | ||
3454 | ||
3455 | input siclk; | |
3456 | input soclk; | |
3457 | ||
3458 | output [3:0] dout; | |
3459 | output scan_out; | |
3460 | assign fdin[3:0] = din[3:0]; | |
3461 | ||
3462 | ||
3463 | ||
3464 | ||
3465 | ||
3466 | ||
3467 | dff #(4) d0_0 ( | |
3468 | .l1clk(l1clk), | |
3469 | .siclk(siclk), | |
3470 | .soclk(soclk), | |
3471 | .d(fdin[3:0]), | |
3472 | .si({scan_in,so[2:0]}), | |
3473 | .so({so[2:0],scan_out}), | |
3474 | .q(dout[3:0]) | |
3475 | ); | |
3476 | ||
3477 | ||
3478 | ||
3479 | ||
3480 | ||
3481 | ||
3482 | ||
3483 | ||
3484 | ||
3485 | ||
3486 | ||
3487 | ||
3488 | endmodule | |
3489 | ||
3490 | ||
3491 | ||
3492 | ||
3493 | ||
3494 | ||
3495 | ||
3496 |