Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / sio / rtl / sio_olc_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: sio_olc_ctl.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35`define SIO_L2SIO_J_BIT 31
36`define SIO_L2SIO_CTGECC_MSB_BIT 30
37`define SIO_L2SIO_CTGECC_LSB_BIT 25
38`define SIO_L2SIO_RASUE_BIT 24
39`define SIO_L2SIO_O_BIT 23
40`define SIO_L2SIO_P_BIT 22
41`define SIO_L2SIO_E_BIT 21
42`define SIO_L2SIO_S_BIT 20
43`define SIO_L2SIO_CBA2_BIT 19
44`define SIO_L2SIO_CBA1_BIT 18
45`define SIO_L2SIO_CBA0_BIT 17
46`define SIO_L2SIO_R_BIT 16
47
48`define RF_RDEN_OFFSTATE 1'b1
49
50/* 2 per L2 bank, or 16 instances in SIO */
51/* Write fast, Read fast */
52`define SIO_OLD_RF_DATAWIDTH 32
53`define SIO_OLD_RF_ADDRWIDTH 5
54`define SIO_OLD_RF_DEPTH 32
55
56/* 2 per IO device, or 4 instances in SIO */
57/* Write fast, Read slow */
58/* only using 68 out of 72 bits now */
59`define SIO_OPD_DATA_RF_DATAWIDTH 72
60`define SIO_OPD_DATA_RF_ADDRWIDTH 6
61`define SIO_OPD_DATA_RF_DEPTH 64
62
63/* 1 per IO device, or 2 instances in SIO */
64/* Write fast, Read slow */
65/* Logically use 18 bits wide and 16 entries */
66/* Memory compiled sync fifo - with input flops, without output flops */
67
68`define SIO_OPD_HDR_RF_DATAWIDTH 18
69`define SIO_OPD_HDR_RF_ADDRWIDTH 4
70`define SIO_OPD_HDR_RF_DEPTH 16
71
72
73
74module sio_olc_ctl (
75 l2clk,
76 olc_oldue_check_clrerr,
77 olc_oldue_check_en,
78 olc_oldue_wr_en,
79 olc_oldue_rd_addr,
80 olc_oldue_selfwd,
81 olc_oldue_pass_late_ue,
82 olc_old_selhdr,
83 olc_oldhq_wr_en,
84 olc_oldhq_rd_addr,
85 olc_olddq0_wr_en,
86 olc_olddq0_wr_addr,
87 olc_olddq0_rd_en,
88 olc_olddq0_rd_addr,
89 olc_olddq1_wr_en,
90 olc_olddq1_wr_addr,
91 olc_olddq1_rd_en,
92 olc_olddq1_rd_addr,
93 l2sio_v_bit,
94 l2sio_r_bit,
95 l2sio_p_bit,
96 l2sio_j_bit,
97 l2b_sio_ue_err_r,
98 olc_opcc_req,
99 opcc_olc_gnt,
100 sio_sii_olc_ilc_dequeue,
101 ojc_old_wr_en,
102 ojc_old_jtagsr_en,
103 ojc_opcc_sync,
104 ojc_opcc_ack,
105 tcu_scan_en,
106 scan_in,
107 tcu_aclk,
108 tcu_bclk,
109 tcu_pce_ov,
110 tcu_clk_stop,
111 scan_out);
112wire se;
113wire siclk;
114wire soclk;
115wire pce_ov;
116wire stop;
117wire l1clk;
118wire si_0;
119wire so_0;
120wire ojc_old_jtagsr_en_l;
121wire ojc_old_jtagsr_en_r;
122wire spare0_buf_32x_unused;
123wire spare0_nand3_8x_unused;
124wire spare0_inv_8x_unused;
125wire spare0_aoi22_4x_unused;
126wire spare0_buf_8x_unused;
127wire spare0_oai22_4x_unused;
128wire spare0_inv_16x_unused;
129wire spare0_nand2_16x_unused;
130wire spare0_nor3_4x_unused;
131wire spare0_nand2_8x_unused;
132wire spare0_buf_16x_unused;
133wire spare0_nor2_16x_unused;
134wire spare0_inv_32x_unused;
135wire ojc_cycle_sol1;
136wire ojc_cycle_sol0;
137wire [5:0] shcnt;
138wire ojc_cycle_soh0;
139wire ojc_ack_soh0;
140wire [5:0] shcnt_next;
141wire ff_ojc_cycle_sox_scanin;
142wire ff_ojc_cycle_sox_scanout;
143wire ojc_cycle_soh1;
144wire ff_ojc_ack_sox_scanin;
145wire ff_ojc_ack_sox_scanout;
146wire ojc_ack_sol1;
147wire ojc_ack_sol0;
148wire ojc_ack_soh1;
149wire ff_ojc_shcnt_scanin;
150wire ff_ojc_shcnt_scanout;
151wire [15:0] olc_cycle_sol;
152wire ue_check_en;
153wire ue_wr_en;
154wire [2:0] ue_wr_ptr;
155wire [2:0] ue_rd_ptr;
156wire olc_cycle_slph;
157wire was_notcutthru;
158wire uestore_;
159wire olc_oldue_pass_late_ue_l;
160wire olc_oldue_pass_late_ue_r;
161wire ff_pass_late_ue_scanin;
162wire ff_pass_late_ue_scanout;
163wire ff_l2b_sio_ue_err_scanin;
164wire ff_l2b_sio_ue_err_scanout;
165wire olc_cycle_soh0;
166wire [2:0] hq_wr_ptr;
167wire [2:0] hq_rd_ptr;
168wire pq0_wr_en;
169wire [6:0] pq_wr_ptr;
170wire pq0_rd_en;
171wire [6:0] pq_rd_ptr;
172wire pq1_wr_en;
173wire pq1_rd_en;
174wire [15:0] olc_nextcycleis_sol;
175wire olc_cycle_soh1;
176wire ff_olc_cycle_scanin;
177wire ff_olc_cycle_scanout;
178wire olc_nextcycleis_soh1;
179wire hq_wr_ptr_inc;
180wire [2:0] hq_wr_ptr_next;
181wire [2:0] hq_wr_ptr_plus1;
182wire ff_hq_wr_ptr_scanin;
183wire ff_hq_wr_ptr_scanout;
184wire [6:0] pq_wr_ptr_next;
185wire pq_wr_ptr_inc;
186wire [6:0] pq_wr_ptr_plus1;
187wire ff_pq_wr_ptr_scanin;
188wire ff_pq_wr_ptr_scanout;
189wire ff_pq_wr_en_scanin;
190wire ff_pq_wr_en_scanout;
191wire pq1_nextwren;
192wire pq0_nextwren;
193wire pq0_wr_ptr_inc;
194wire pq1_wr_ptr_inc;
195wire ue_nextchecken;
196wire ue_nextwren;
197wire ue_wr_ptr_inc;
198wire [2:0] ue_wr_ptr_next;
199wire [2:0] ue_wr_ptr_plus1;
200wire ff_ue_en_scanin;
201wire ff_ue_en_scanout;
202wire ff_ue_wr_ptr_scanin;
203wire ff_ue_wr_ptr_scanout;
204wire olc_nextcycleis_slpr;
205wire olc_cycle_slpr;
206wire header_access_same_entry;
207wire oldhq_dout_r_bit;
208wire payload_ready;
209wire header_will_access_same_entry;
210wire future_payload_ready;
211wire header_now_access_same_entry;
212wire future_payload_was_ready;
213wire olc_nextcycleis_slph;
214wire ff_slp_cycle_scanin;
215wire ff_slp_cycle_scanout;
216wire [2:0] hq_rd_ptr_plus1;
217wire ff_header_now_access_same_entry_scanin;
218wire ff_header_now_access_same_entry_scanout;
219wire notcutthru;
220wire payload_access_same_line;
221wire same_line_write_above_threshold;
222wire payload_will_access_same_line;
223wire [6:0] pq_rd_ptr_plus1;
224wire [6:0] pq_rd_ptr_plus6;
225wire ff_payload_readys_scanin;
226wire ff_payload_readys_scanout;
227wire hq_rd_ptr_inc;
228wire ue_rd_ptr_inc_e1;
229wire [2:0] hq_rd_ptr_next;
230wire ff_ue_rd_ptr_inc_scanin;
231wire ff_ue_rd_ptr_inc_scanout;
232wire ue_rd_ptr_inc;
233wire ff_hq_rd_ptr_scanin;
234wire ff_hq_rd_ptr_scanout;
235wire ff_dequeue_scanin;
236wire ff_dequeue_scanout;
237wire pq_rd_ptr_inc;
238wire pq1_nextrden;
239wire pq0_nextrden;
240wire [6:0] pq_rd_ptr_next;
241wire [2:0] ue_rd_ptr_next;
242wire [2:0] ue_rd_ptr_plus1;
243wire ff_pq_rd_ptr_scanin;
244wire ff_pq_rd_ptr_scanout;
245wire ff_pq_rd_en_scanin;
246wire ff_pq_rd_en_scanout;
247wire ff_ue_rd_ptr_scanin;
248wire ff_ue_rd_ptr_scanout;
249wire ff_l2sio_r_bit0_scanin;
250wire ff_l2sio_r_bit0_scanout;
251wire pre_r_bit0;
252wire l2sio_r_bit0_r;
253wire ff_l2sio_r_bit1_scanin;
254wire ff_l2sio_r_bit1_scanout;
255wire pre_r_bit1;
256wire l2sio_r_bit1_r;
257wire ff_l2sio_r_bit2_scanin;
258wire ff_l2sio_r_bit2_scanout;
259wire pre_r_bit2;
260wire l2sio_r_bit2_r;
261wire ff_l2sio_r_bit3_scanin;
262wire ff_l2sio_r_bit3_scanout;
263wire pre_r_bit3;
264wire l2sio_r_bit3_r;
265wire ff_l2sio_r_bit_scanin;
266wire ff_l2sio_r_bit_scanout;
267
268
269 input l2clk;
270 output olc_oldue_check_clrerr; // start of parity checking -- clear out any prior error state
271 output olc_oldue_check_en; // flop-enable for the parity error accumulator
272 output [3:0] olc_oldue_wr_en; // write enable for UE fifo
273 output [1:0] olc_oldue_rd_addr; // read pointer for UE fifo
274 output olc_oldue_selfwd; // cut-thru case --- ue fifo is not correct
275 output olc_oldue_pass_late_ue;
276
277 output olc_old_selhdr; // select header not data as outputs
278
279
280 output [3:0] olc_oldhq_wr_en; // header queue write-enable
281 output [ 1:0] olc_oldhq_rd_addr; // header queue read-addr
282
283 output olc_olddq0_wr_en; // data queue write-enable
284
285// output [`SIO_OLD_RF_ADDRWIDTH-1:0] olc_olddq0_wr_addr; // data queue write-addr
286 output [4:0] olc_olddq0_wr_addr; // data queue write-addr
287 output olc_olddq0_rd_en; // data queue read-enable
288
289// output [`SIO_OLD_RF_ADDRWIDTH-1:00] olc_olddq0_rd_addr; // data queue read-addr
290 output [4:0] olc_olddq0_rd_addr; // data queue read-addr
291
292 output olc_olddq1_wr_en; // data queue write-enable
293
294// output [`SIO_OLD_RF_ADDRWIDTH-1:00] olc_olddq1_wr_addr; // data queue write-addr
295 output [4:0] olc_olddq1_wr_addr; // data queue write-addr
296 output olc_olddq1_rd_en; // data queue read-enable
297
298// output [`SIO_OLD_RF_ADDRWIDTH-1:00] olc_olddq1_rd_addr; // data queue read-addr
299 output [4:0] olc_olddq1_rd_addr; // data queue read-addr
300
301
302 input l2sio_v_bit; // Response valid from L2 to SIO
303 input l2sio_r_bit; // read bit - 1 = read, 0=write
304 input l2sio_p_bit; // Posted bit - 1=no ack needed
305 input l2sio_j_bit; // Jtag bit - 1 = jtag
306 input l2b_sio_ue_err_r;
307
308
309
310 output olc_opcc_req; // request for olp bus
311
312 input opcc_olc_gnt; // transfer is granted
313
314 output sio_sii_olc_ilc_dequeue; // dequeued an request buffer entry
315// output sio_sii_olc_ilc_data_dequeue; // dequeued a read buffer entry
316
317
318 output [1:0] ojc_old_wr_en; // store the jtag read data,
319 // [1]=load 8Bytes to head (63:32), [0]=load 8Bytes to tail
320 output ojc_old_jtagsr_en; // either store the jtag read data or
321 // shift....
322 // shift out another bit from the head (lsb),
323 // shift bits [n:1] into [n-1:0]
324 // shift in a 0 to the tail [n]
325 output ojc_opcc_sync;
326 output ojc_opcc_ack;
327
328
329
330 input tcu_scan_en;
331 input scan_in;
332 input tcu_aclk;
333 input tcu_bclk;
334 input tcu_pce_ov;
335 input tcu_clk_stop;
336 output scan_out;
337
338 reg pre_r_bit;
339
340 ///////////////////////////////////////
341 // Scan chain connections
342 ///////////////////////////////////////
343 // scan renames
344 assign se = tcu_scan_en;
345 assign siclk = tcu_aclk;
346 assign soclk = tcu_bclk;
347 assign pce_ov = tcu_pce_ov;
348 assign stop = tcu_clk_stop;
349 // end scan
350
351 sio_olc_ctl_l1clkhdr_ctl_macro clkgen (
352 .l2clk (l2clk ),
353 .l1en (1'b1 ),
354 .l1clk (l1clk ),
355 .pce_ov(pce_ov),
356 .stop(stop),
357 .se(se)
358 );
359// spare gates expansion
360cl_sc1_msff_8x ff_ojc_old_jtagsr_en (.l1clk(l1clk),
361 .siclk(siclk),
362 .soclk(soclk),
363 .si(si_0),
364 .so(so_0),
365 .d(ojc_old_jtagsr_en_l),
366 .q(ojc_old_jtagsr_en_r));
367
368cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
369 .out(spare0_buf_32x_unused));
370cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
371 .in1(1'b1),
372 .in2(1'b1),
373 .out(spare0_nand3_8x_unused));
374cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
375 .out(spare0_inv_8x_unused));
376cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
377 .in01(1'b1),
378 .in10(1'b1),
379 .in11(1'b1),
380 .out(spare0_aoi22_4x_unused));
381cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
382 .out(spare0_buf_8x_unused));
383cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
384 .in01(1'b1),
385 .in10(1'b1),
386 .in11(1'b1),
387 .out(spare0_oai22_4x_unused));
388cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
389 .out(spare0_inv_16x_unused));
390cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
391 .in1(1'b1),
392 .out(spare0_nand2_16x_unused));
393cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
394 .in1(1'b0),
395 .in2(1'b0),
396 .out(spare0_nor3_4x_unused));
397cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
398 .in1(1'b1),
399 .out(spare0_nand2_8x_unused));
400cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
401 .out(spare0_buf_16x_unused));
402cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
403 .in1(1'b0),
404 .out(spare0_nor2_16x_unused));
405cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
406 .out(spare0_inv_32x_unused));
407
408
409 ///////////////////////////////////////
410 // BEGIN JTAG RESPONSE SECTION
411 ///////////////////////////////////////
412
413 assign ojc_old_wr_en[1:0] = {ojc_cycle_sol1, ojc_cycle_sol0};
414
415 assign ojc_old_jtagsr_en = |{ojc_old_jtagsr_en_l, ojc_old_jtagsr_en_r};
416 assign ojc_old_jtagsr_en_l = |{ojc_cycle_sol1, ojc_cycle_sol0, shcnt[5:0]};
417
418 assign ojc_cycle_soh0 = l2sio_v_bit & l2sio_j_bit;
419 assign ojc_ack_soh0 = l2sio_v_bit & ~l2sio_r_bit;
420
421 assign shcnt_next[5:0] = (ojc_cycle_sol1 | (|shcnt[5:0])) ? (shcnt[5:0] + 6'b000001) : 6'b000000;
422
423
424 sio_olc_ctl_msff_ctl_macro__width_4 ff_ojc_cycle_sox (
425 .scan_in(ff_ojc_cycle_sox_scanin),
426 .scan_out(ff_ojc_cycle_sox_scanout),
427 .din ({ojc_cycle_sol1, ojc_cycle_sol0, ojc_cycle_soh1, ojc_cycle_soh0}),
428 .dout ({ojc_opcc_sync, ojc_cycle_sol1, ojc_cycle_sol0, ojc_cycle_soh1}),
429 .l1clk(l1clk),
430 .siclk(siclk),
431 .soclk(soclk)
432 );
433
434 sio_olc_ctl_msff_ctl_macro__width_4 ff_ojc_ack_sox (
435 .scan_in(ff_ojc_ack_sox_scanin),
436 .scan_out(ff_ojc_ack_sox_scanout),
437 .din ({ojc_ack_sol1, ojc_ack_sol0, ojc_ack_soh1, ojc_ack_soh0}),
438 .dout ({ojc_opcc_ack, ojc_ack_sol1, ojc_ack_sol0, ojc_ack_soh1}),
439 .l1clk(l1clk),
440 .siclk(siclk),
441 .soclk(soclk)
442 );
443
444 sio_olc_ctl_msff_ctl_macro__width_6 ff_ojc_shcnt (
445 .scan_in(ff_ojc_shcnt_scanin),
446 .scan_out(ff_ojc_shcnt_scanout),
447 .din (shcnt_next[5:0]),
448 .dout (shcnt[5:0]),
449 .l1clk(l1clk),
450 .siclk(siclk),
451 .soclk(soclk)
452 );
453
454
455 ///////////////////////////////////////
456 // END JTAG RESPONSE SECTION
457 ///////////////////////////////////////
458
459 ///////////////////////////////////////
460 // BEGIN UE CONTROL SECTION
461 ///////////////////////////////////////
462
463
464
465 assign olc_oldue_check_clrerr = olc_cycle_sol[0];
466 assign olc_oldue_check_en = ue_check_en;
467 assign olc_oldue_wr_en[3:0] = {4{ue_wr_en}} & {ue_wr_ptr[1:0] == 2'b11,
468 ue_wr_ptr[1:0] == 2'b10,
469 ue_wr_ptr[1:0] == 2'b01,
470 ue_wr_ptr[1:0] == 2'b00
471 };
472
473 assign olc_oldue_rd_addr[1:0] = ue_rd_ptr[1:0];
474 assign olc_oldue_selfwd = olc_cycle_slph & was_notcutthru;
475
476 assign uestore_ = ~|olc_oldue_wr_en[3:0];
477 assign olc_oldue_pass_late_ue_l = l2sio_v_bit ? 1'b0 :l2b_sio_ue_err_r ? 1'b1 :
478 olc_oldue_pass_late_ue_r;
479
480 // flop the olc_oldue_selfwd setting....clear when we see the ue_we
481 sio_olc_ctl_msff_ctl_macro__width_1 ff_pass_late_ue (
482 .scan_in(ff_pass_late_ue_scanin),
483 .scan_out(ff_pass_late_ue_scanout),
484 .din (olc_oldue_pass_late_ue_l),
485 .dout (olc_oldue_pass_late_ue_r),
486 .l1clk(l1clk),
487 .siclk(siclk),
488 .soclk(soclk)
489 );
490
491 sio_olc_ctl_msff_ctl_macro__width_1 ff_l2b_sio_ue_err (
492 .scan_in(ff_l2b_sio_ue_err_scanin),
493 .scan_out(ff_l2b_sio_ue_err_scanout),
494 .din (olc_oldue_pass_late_ue_r),
495 .dout (olc_oldue_pass_late_ue),
496 .l1clk(l1clk),
497 .siclk(siclk),
498 .soclk(soclk)
499 );
500
501
502 ///////////////////////////////////////
503 // END UE CONTROL SECTION
504 ///////////////////////////////////////
505
506 /////////////////////////////////////////////
507 // BEGIN OLDHQ/OLDDQ OUTPUT SIGNALS SECTION
508 /////////////////////////////////////////////
509
510
511 assign olc_old_selhdr = olc_cycle_slph;
512 assign olc_oldhq_wr_en[3:0] = {4{olc_cycle_soh0}} & {hq_wr_ptr[1:0] == 2'b11,
513 hq_wr_ptr[1:0] == 2'b10,
514 hq_wr_ptr[1:0] == 2'b01,
515 hq_wr_ptr[1:0] == 2'b00
516 };
517
518 assign olc_oldhq_rd_addr[1:0] = hq_rd_ptr[1:0];
519
520 assign olc_olddq0_wr_en = pq0_wr_en;
521 assign olc_olddq0_wr_addr[4:0] = pq_wr_ptr[5:1];
522 assign olc_olddq0_rd_en = pq0_rd_en;
523 assign olc_olddq0_rd_addr[4:0] = pq_rd_ptr[5:1];
524
525 assign olc_olddq1_wr_en = pq1_wr_en;
526 assign olc_olddq1_wr_addr[4:0] = pq_wr_ptr[5:1];
527 assign olc_olddq1_rd_en = pq1_rd_en;
528 assign olc_olddq1_rd_addr[4:0] = pq_rd_ptr[5:1];
529
530 /////////////////////////////////////////////
531 // END OLDHQ/OLDDQ OUTPUT SIGNALS SECTION
532 /////////////////////////////////////////////
533
534 /////////////////////////////////////////////
535 // BEGIN MAIN WRITE CONTROL SECTION
536 /////////////////////////////////////////////
537
538
539 /////////////////////////////////////////////
540 //
541 // PACKET CYCLE STATEMACHINE
542 //
543 /////////////////////////////////////////////
544 // initiate packet state SOH0 if
545 // tag vld cycle
546 // it's not a jtag source AND
547 // it's a read response or nonposted
548 // (technically dmu is not allowed to send nonposted...)
549 // so really should be tag vld and nonposted AND ENT)
550 assign olc_cycle_soh0 = l2sio_v_bit & ~l2sio_j_bit & (l2sio_r_bit | ~l2sio_p_bit);
551 assign olc_nextcycleis_sol[15:0] = {olc_cycle_sol[14:0], olc_cycle_soh1};
552
553 sio_olc_ctl_msff_ctl_macro__width_17 ff_olc_cycle (
554 .scan_in(ff_olc_cycle_scanin),
555 .scan_out(ff_olc_cycle_scanout),
556 .din ({olc_nextcycleis_sol[15:0], olc_nextcycleis_soh1}),
557 .dout ({olc_cycle_sol[15:0], olc_cycle_soh1}),
558 .l1clk(l1clk),
559 .siclk(siclk),
560 .soclk(soclk)
561 );
562
563 /////////////////////////////////////////////
564 //
565 // HEADER QUEUE WRITE POINTER LOGIC
566 //
567 /////////////////////////////////////////////
568 //
569 // top bit is to tell wrap around case
570 // -- if top bit diff and lower bits identical, then all full
571 // -- if top bit same and lower bits identical, then all empty
572 //
573 /////////////////////////////////////////////
574
575 assign hq_wr_ptr_inc = olc_cycle_soh0;
576 assign olc_nextcycleis_soh1 = l2sio_v_bit & ~l2sio_j_bit & l2sio_r_bit;
577 assign hq_wr_ptr_next[2:0] = hq_wr_ptr_inc ? hq_wr_ptr_plus1[2:0] : hq_wr_ptr[2:0];
578
579 assign hq_wr_ptr_plus1[2:0] = hq_wr_ptr[2:0] + 3'b001;
580
581
582 sio_olc_ctl_msff_ctl_macro__width_3 ff_hq_wr_ptr (
583 .scan_in(ff_hq_wr_ptr_scanin),
584 .scan_out(ff_hq_wr_ptr_scanout),
585 .din (hq_wr_ptr_next[2:0]),
586 .dout (hq_wr_ptr[2:0]),
587 .l1clk(l1clk),
588 .siclk(siclk),
589 .soclk(soclk)
590 );
591
592 /////////////////////////////////////////////
593 //
594 // PAYLOAD WRITE POINTER LOGIC
595 //
596 /////////////////////////////////////////////
597 //
598 // - 16 cycles of 32bit per packet, 4 packet deep
599 // subdivided into an upper and lower half
600 // for writing,
601 // reading is to both simultaneously
602 //
603 //
604 /////////////////////////////////////////////
605
606 assign pq_wr_ptr_next[6:0] = pq_wr_ptr_inc ? pq_wr_ptr_plus1[6:0] : pq_wr_ptr[6:0];
607
608 assign pq_wr_ptr_plus1[6:0] = pq_wr_ptr[6:0] + 7'b0000001;
609
610
611 sio_olc_ctl_msff_ctl_macro__width_7 ff_pq_wr_ptr (
612 .scan_in(ff_pq_wr_ptr_scanin),
613 .scan_out(ff_pq_wr_ptr_scanout),
614 .din (pq_wr_ptr_next[6:0]),
615 .dout (pq_wr_ptr[6:0]),
616 .l1clk(l1clk),
617 .siclk(siclk),
618 .soclk(soclk)
619 );
620
621 sio_olc_ctl_msff_ctl_macro__width_2 ff_pq_wr_en (
622 .scan_in(ff_pq_wr_en_scanin),
623 .scan_out(ff_pq_wr_en_scanout),
624 .din ({pq1_nextwren, pq0_nextwren}),
625 .dout ({pq1_wr_en, pq0_wr_en}),
626 .l1clk(l1clk),
627 .siclk(siclk),
628 .soclk(soclk)
629 );
630
631 /////////////////////////////////////////////
632 //
633 // LOWER HALF PAYLOAD QUEUE
634 // start write-enable assertion next cycle when :
635 // we're writing the header this cycle OR
636 // (we're writing the upper half of the packet queue AND
637 // it's not the the 7th write of the upper half of the packet
638 // )
639 //
640 /////////////////////////////////////////////
641 assign pq0_nextwren = olc_nextcycleis_soh1 | (pq1_wr_en & ~&pq_wr_ptr[3:1]);
642 assign pq0_wr_ptr_inc = pq0_wr_en;
643
644 /////////////////////////////////////////////
645 //
646 // UPPER HALF PAYLOAD QUEUE
647 // start write-enable assertion next cycle when :
648 // we're writing the lower half this cycle (always a pair)
649 //
650 /////////////////////////////////////////////
651 assign pq1_nextwren = pq0_wr_en;
652 assign pq1_wr_ptr_inc = pq1_wr_en;
653
654 /////////////////////////////////////////////
655 //
656 // Master payload queue write pointer increments whenever each half increments
657 //
658 /////////////////////////////////////////////
659 assign pq_wr_ptr_inc = pq0_wr_ptr_inc | pq1_wr_ptr_inc;
660
661 /////////////////////////////////////////////
662 //
663 // UE QUEUE
664 //
665 // start parity check flop enable next cycle when :
666 // we're have flopped the header this cycle (header was on bus last cycle)
667 // OR
668 // (we've been accumulating and the NEXT cycle is dataF - starting from data0)
669 //
670 /////////////////////////////////////////////
671 assign ue_nextchecken = olc_cycle_soh1 | (ue_check_en & ~olc_cycle_sol[15]);
672
673 assign ue_nextwren = ue_check_en & olc_cycle_sol[15];
674 assign ue_wr_ptr_inc = ue_nextwren;
675
676 assign ue_wr_ptr_next[2:0] = ue_wr_ptr_inc ? ue_wr_ptr_plus1[2:0] : ue_wr_ptr[2:0];
677
678 sio_olc_ctl_msff_ctl_macro__width_2 ff_ue_en (
679 .scan_in(ff_ue_en_scanin),
680 .scan_out(ff_ue_en_scanout),
681 .din ({ue_nextchecken, ue_nextwren}),
682 .dout ({ue_check_en, ue_wr_en}),
683 .l1clk(l1clk),
684 .siclk(siclk),
685 .soclk(soclk)
686 );
687
688 assign ue_wr_ptr_plus1[2:0] = ue_wr_ptr[2:0] + 3'b001;
689
690
691 sio_olc_ctl_msff_ctl_macro__width_3 ff_ue_wr_ptr (
692 .scan_in(ff_ue_wr_ptr_scanin),
693 .scan_out(ff_ue_wr_ptr_scanout),
694 .din (ue_wr_ptr_next[2:0]),
695 .dout (ue_wr_ptr[2:0]),
696 .l1clk(l1clk),
697 .siclk(siclk),
698 .soclk(soclk)
699 );
700
701 /////////////////////////////////////////////
702 // END MAIN WRITE CONTROL SECTION
703 /////////////////////////////////////////////
704
705 /////////////////////////////////////////////
706 // BEGIN MAIN READ CONTROL SECTION
707 /////////////////////////////////////////////
708
709 /////////////////////////////////////////////
710 //
711 //
712 // READ SIDE TO OPD/C
713 //
714 /////////////////////////////////////////////
715 //
716 // ok to make a request NEXT CYCLE if any of the following are true
717 // 0. we made a request and we don't see grant
718 // 1. it's not the case we're seeing grant now ==> headptr is correct
719 // header queue is not empty AND (1a or 1b)
720 // 1a. the current header points to a write
721 // 1b. the current header points to a read AND $L has been filled
722 // 2. it's the case we're seeing grant now ==> headptr is not correct until next cycle
723 // so we can only make a new request if ++headptr will not access the write entry
724 // AND if (
725 // it's currently a write then the current payload must be ready
726 // because we can't predict if the next entry is a read or a write
727 // OR it's currently a read then then the future payload must be ready
728 // )
729 //
730 /////////////////////////////////////////////
731
732 assign olc_nextcycleis_slpr =
733 // case0 : we have made a request and don't see grant
734 (olc_cycle_slpr & ~opcc_olc_gnt) |
735 // case1 : initial request (~gnt) :
736 // header queue is not empty (header ptrs are different) AND
737 // ( it's a write-ack (no need to check for data payload ready) OR
738 // it's a read (check payload is ready) )
739 (~opcc_olc_gnt & ~header_access_same_entry &
740 (~oldhq_dout_r_bit | (oldhq_dout_r_bit & payload_ready))) |
741 // case2 : back-to-back request : we see grant now
742 // header queue won't be empty (the post increment hq read pointer != hq write pointer) AND
743 // ( future payload is guaranteed to be ready OR
744 // payload is ready now (even before incrementing pq read pointer)
745 // if it's currently a write because
746 // we can't predict if the next entry is a read or a write)
747 (opcc_olc_gnt & ~header_will_access_same_entry &
748 (future_payload_ready |
749 (~oldhq_dout_r_bit & payload_ready)));
750
751
752 assign olc_opcc_req = olc_cycle_slpr | (olc_cycle_slph & ~header_now_access_same_entry &
753 (~oldhq_dout_r_bit | (oldhq_dout_r_bit & future_payload_was_ready)));
754 assign olc_nextcycleis_slph = opcc_olc_gnt & olc_cycle_slpr;
755
756// assign olc_nextcycleis_slpp[14:0] = {olc_cycle_slpp[13:0], (oldhq_dout_r_bit & olc_cycle_slph)};
757
758 sio_olc_ctl_msff_ctl_macro__width_2 ff_slp_cycle (
759 .scan_in(ff_slp_cycle_scanin),
760 .scan_out(ff_slp_cycle_scanout),
761 .din ({olc_nextcycleis_slph, olc_nextcycleis_slpr}),
762 .dout ({olc_cycle_slph, olc_cycle_slpr}),
763 .l1clk(l1clk),
764 .siclk(siclk),
765 .soclk(soclk)
766 );
767
768 assign header_access_same_entry = (hq_wr_ptr[2:0] == hq_rd_ptr[2:0]);
769
770
771 assign header_will_access_same_entry = (hq_wr_ptr[2:0] == hq_rd_ptr_plus1[2:0]);
772
773
774 sio_olc_ctl_msff_ctl_macro__width_1 ff_header_now_access_same_entry (
775 .scan_in(ff_header_now_access_same_entry_scanin),
776 .scan_out(ff_header_now_access_same_entry_scanout),
777 .din (header_will_access_same_entry),
778 .dout (header_now_access_same_entry),
779 .l1clk(l1clk),
780 .siclk(siclk),
781 .soclk(soclk)
782 );
783
784 // be speculatively early 1 cyle due to request-grant latency
785 // can't be earlier than 2 cycles after last piece of data
786 // because UE would not be available to drive
787 //
788 // pointer is not reliable if we're currently reading anything except the last chunk
789
790
791 // If we're filling a cacheline and will be early accessing the line
792 // this is the minimum write pointer threshold
793 // This value is set to 16 cycles - 2 (for UE) + 1 (req-gnt penalty) (fully accumulated with no ue forwarding)
794 // - 1 (header) - 8 (transfer all the data)
795 // = 6 cycles has been written for cut-through case with UE converted to poisoned parity
796 //
797 // assign same_line_write_above_threshold = &pq_wr_ptr[3:0]; // fully accumulated
798 assign notcutthru = (&pq_wr_ptr[3:0] & payload_access_same_line) | ~payload_access_same_line; // fully accumulated
799 assign same_line_write_above_threshold = (pq_wr_ptr[3]); // | (pq_wr_ptr[3:1] == 3'b011));
800
801 // ready if any of the following are true
802 // 1. we're accesing same cacheline and write has filled above the threshold (cut thru case)
803 // 2. we're not currently accessing the same line and we won't be accessing the same line
804 // (this ensures that if we're doing cut-thru, we won't jump ahead on the next one)
805
806 assign future_payload_ready = (~payload_access_same_line & ~payload_will_access_same_line) | (~payload_access_same_line & payload_will_access_same_line & same_line_write_above_threshold );
807
808 assign payload_ready = ( payload_access_same_line & same_line_write_above_threshold) |
809 (~payload_access_same_line & ~payload_will_access_same_line);
810
811
812 assign payload_access_same_line = (pq_wr_ptr[6:4] == pq_rd_ptr[6:4]);
813
814
815 assign payload_will_access_same_line = (pq_wr_ptr[6:4] == pq_rd_ptr_plus1[6:4]) | (pq_wr_ptr[6:4] == pq_rd_ptr_plus6[6:4]);
816
817
818 sio_olc_ctl_msff_ctl_macro__width_2 ff_payload_readys (
819 .scan_in(ff_payload_readys_scanin),
820 .scan_out(ff_payload_readys_scanout),
821 .din ({future_payload_ready, notcutthru}),
822 .dout ({future_payload_was_ready, was_notcutthru}),
823 .l1clk(l1clk),
824 .siclk(siclk),
825 .soclk(soclk)
826 );
827
828
829 /////////////////////////////////////////////
830 //
831 // HEADER QUEUE READ POINTER LOGIC
832 //
833 // UE QUEUE goes with header queue on the read side
834 //
835 /////////////////////////////////////////////
836 assign hq_rd_ptr_inc = olc_nextcycleis_slph;
837 assign ue_rd_ptr_inc_e1 = olc_nextcycleis_slph & oldhq_dout_r_bit;
838 assign hq_rd_ptr_next[2:0] = hq_rd_ptr_inc ? hq_rd_ptr_plus1[2:0] : hq_rd_ptr[2:0];
839
840 sio_olc_ctl_msff_ctl_macro__width_1 ff_ue_rd_ptr_inc (
841 .scan_in(ff_ue_rd_ptr_inc_scanin),
842 .scan_out(ff_ue_rd_ptr_inc_scanout),
843 .din (ue_rd_ptr_inc_e1),
844 .dout (ue_rd_ptr_inc),
845 .l1clk(l1clk),
846 .siclk(siclk),
847 .soclk(soclk)
848 );
849
850 assign hq_rd_ptr_plus1[2:0] = hq_rd_ptr[2:0] + 3'b001;
851
852// increment_macro inc_hq_rd_ptr_plus1 (width=4) (
853// .cin (1'b1),
854// .din ({1'b0, hq_rd_ptr[2:0]}),
855// .dout ({hq_rd_ptr_dummybit, hq_rd_ptr_plus1[2:0]})
856// );
857
858 sio_olc_ctl_msff_ctl_macro__width_3 ff_hq_rd_ptr (
859 .scan_in(ff_hq_rd_ptr_scanin),
860 .scan_out(ff_hq_rd_ptr_scanout),
861 .din (hq_rd_ptr_next[2:0]),
862 .dout (hq_rd_ptr[2:0]),
863 .l1clk(l1clk),
864 .siclk(siclk),
865 .soclk(soclk)
866 );
867
868
869 /////////////////////////////////////////////
870 //
871 // PAYLOAD READ POINTER LOGIC - 8 cycles of 64bit per packet, 4 packet deep//
872 //
873 /////////////////////////////////////////////
874
875 sio_olc_ctl_msff_ctl_macro__width_1 ff_dequeue (
876 .scan_in(ff_dequeue_scanin),
877 .scan_out(ff_dequeue_scanout),
878 .din (hq_rd_ptr_inc),
879 .dout (sio_sii_olc_ilc_dequeue),
880 .l1clk(l1clk),
881 .siclk(siclk),
882 .soclk(soclk)
883 );
884
885 /////////////////////////////////////////////
886 //
887 // Master payload queue read pointer increments each cycle
888 //
889 /////////////////////////////////////////////
890
891 assign pq_rd_ptr_inc = (olc_nextcycleis_slph & oldhq_dout_r_bit) |
892 (|pq_rd_ptr[3:1]);
893
894
895 assign pq1_nextrden = (olc_cycle_slpr & oldhq_dout_r_bit) | (|pq_rd_ptr[3:1] & ~&pq_rd_ptr[3:1]);
896 assign pq0_nextrden = (olc_cycle_slpr & oldhq_dout_r_bit) | (|pq_rd_ptr[3:1] & ~&pq_rd_ptr[3:1]);
897
898 assign pq_rd_ptr_next[6:0] = pq_rd_ptr_inc ? pq_rd_ptr_plus1[6:0] : pq_rd_ptr[6:0];
899 assign ue_rd_ptr_next[2:0] = ue_rd_ptr_inc ? ue_rd_ptr_plus1[2:0] : ue_rd_ptr[2:0];
900
901
902 assign pq_rd_ptr_plus1[6:0] = {pq_rd_ptr[6:1] + 6'b000001, 1'b0};
903 assign pq_rd_ptr_plus6[6:0] = {pq_rd_ptr[6:1] + 6'b000110, 1'b0};
904
905 sio_olc_ctl_msff_ctl_macro__width_7 ff_pq_rd_ptr (
906 .scan_in(ff_pq_rd_ptr_scanin),
907 .scan_out(ff_pq_rd_ptr_scanout),
908 .din (pq_rd_ptr_next[6:0]),
909 .dout (pq_rd_ptr[6:0]),
910 .l1clk(l1clk),
911 .siclk(siclk),
912 .soclk(soclk)
913 );
914
915 sio_olc_ctl_msff_ctl_macro__width_2 ff_pq_rd_en (
916 .scan_in(ff_pq_rd_en_scanin),
917 .scan_out(ff_pq_rd_en_scanout),
918 .din ({pq1_nextrden, pq0_nextrden}),
919 .dout ({pq1_rd_en, pq0_rd_en}),
920 .l1clk(l1clk),
921 .siclk(siclk),
922 .soclk(soclk)
923 );
924
925 assign ue_rd_ptr_plus1[2:0] = ue_rd_ptr[2:0] + 3'b001;
926
927
928 sio_olc_ctl_msff_ctl_macro__width_3 ff_ue_rd_ptr (
929 .scan_in(ff_ue_rd_ptr_scanin),
930 .scan_out(ff_ue_rd_ptr_scanout),
931 .din (ue_rd_ptr_next[2:0]),
932 .dout (ue_rd_ptr[2:0]),
933 .l1clk(l1clk),
934 .siclk(siclk),
935 .soclk(soclk)
936 );
937
938 /////////////////////////////////////////////
939 // Create flop r_bit for timing purpose
940 /////////////////////////////////////////////
941
942 sio_olc_ctl_msff_ctl_macro__width_1 ff_l2sio_r_bit0 (
943 .scan_in(ff_l2sio_r_bit0_scanin),
944 .scan_out(ff_l2sio_r_bit0_scanout),
945 .din (pre_r_bit0),
946 .dout (l2sio_r_bit0_r),
947 .l1clk(l1clk),
948 .siclk(siclk),
949 .soclk(soclk)
950 );
951
952 sio_olc_ctl_msff_ctl_macro__width_1 ff_l2sio_r_bit1 (
953 .scan_in(ff_l2sio_r_bit1_scanin),
954 .scan_out(ff_l2sio_r_bit1_scanout),
955 .din (pre_r_bit1),
956 .dout (l2sio_r_bit1_r),
957 .l1clk(l1clk),
958 .siclk(siclk),
959 .soclk(soclk)
960 );
961
962 sio_olc_ctl_msff_ctl_macro__width_1 ff_l2sio_r_bit2 (
963 .scan_in(ff_l2sio_r_bit2_scanin),
964 .scan_out(ff_l2sio_r_bit2_scanout),
965 .din (pre_r_bit2),
966 .dout (l2sio_r_bit2_r),
967 .l1clk(l1clk),
968 .siclk(siclk),
969 .soclk(soclk)
970 );
971
972 sio_olc_ctl_msff_ctl_macro__width_1 ff_l2sio_r_bit3 (
973 .scan_in(ff_l2sio_r_bit3_scanin),
974 .scan_out(ff_l2sio_r_bit3_scanout),
975 .din (pre_r_bit3),
976 .dout (l2sio_r_bit3_r),
977 .l1clk(l1clk),
978 .siclk(siclk),
979 .soclk(soclk)
980 );
981
982 assign pre_r_bit0 = olc_oldhq_wr_en[0] ? l2sio_r_bit : l2sio_r_bit0_r;
983 assign pre_r_bit1 = olc_oldhq_wr_en[1] ? l2sio_r_bit : l2sio_r_bit1_r;
984 assign pre_r_bit2 = olc_oldhq_wr_en[2] ? l2sio_r_bit : l2sio_r_bit2_r;
985 assign pre_r_bit3 = olc_oldhq_wr_en[3] ? l2sio_r_bit : l2sio_r_bit3_r;
986
987 always @ (pre_r_bit0 or pre_r_bit1 or pre_r_bit2 or pre_r_bit3 or hq_rd_ptr_next[1:0])
988 case (hq_rd_ptr_next[1:0]) //synopsys parallel_case full_case
989 2'b00 : pre_r_bit = pre_r_bit0;
990 2'b01 : pre_r_bit = pre_r_bit1;
991 2'b10 : pre_r_bit = pre_r_bit2;
992 2'b11 : pre_r_bit = pre_r_bit3;
993 endcase
994
995 sio_olc_ctl_msff_ctl_macro__width_1 ff_l2sio_r_bit (
996 .scan_in(ff_l2sio_r_bit_scanin),
997 .scan_out(ff_l2sio_r_bit_scanout),
998 .din (pre_r_bit),
999 .dout (oldhq_dout_r_bit),
1000 .l1clk(l1clk),
1001 .siclk(siclk),
1002 .soclk(soclk)
1003 );
1004
1005
1006 /////////////////////////////////////////////
1007 // END MAIN READ CONTROL SECTION
1008 /////////////////////////////////////////////
1009
1010supply0 vss; // <- port for ground
1011supply1 vdd; // <- port for power
1012
1013// fixscan start:
1014assign si_0 = scan_in ;
1015assign ff_ojc_cycle_sox_scanin = so_0;
1016assign ff_ojc_ack_sox_scanin = ff_ojc_cycle_sox_scanout ;
1017assign ff_ojc_shcnt_scanin = ff_ojc_ack_sox_scanout ;
1018assign ff_pass_late_ue_scanin = ff_ojc_shcnt_scanout ;
1019assign ff_l2b_sio_ue_err_scanin = ff_pass_late_ue_scanout ;
1020assign ff_olc_cycle_scanin = ff_l2b_sio_ue_err_scanout;
1021assign ff_hq_wr_ptr_scanin = ff_olc_cycle_scanout ;
1022assign ff_pq_wr_ptr_scanin = ff_hq_wr_ptr_scanout ;
1023assign ff_pq_wr_en_scanin = ff_pq_wr_ptr_scanout ;
1024assign ff_ue_en_scanin = ff_pq_wr_en_scanout ;
1025assign ff_ue_wr_ptr_scanin = ff_ue_en_scanout ;
1026assign ff_slp_cycle_scanin = ff_ue_wr_ptr_scanout ;
1027assign ff_header_now_access_same_entry_scanin = ff_slp_cycle_scanout ;
1028assign ff_payload_readys_scanin = ff_header_now_access_same_entry_scanout;
1029assign ff_ue_rd_ptr_inc_scanin = ff_payload_readys_scanout;
1030assign ff_hq_rd_ptr_scanin = ff_ue_rd_ptr_inc_scanout ;
1031assign ff_dequeue_scanin = ff_hq_rd_ptr_scanout ;
1032assign ff_pq_rd_ptr_scanin = ff_dequeue_scanout ;
1033assign ff_pq_rd_en_scanin = ff_pq_rd_ptr_scanout ;
1034assign ff_ue_rd_ptr_scanin = ff_pq_rd_en_scanout ;
1035assign ff_l2sio_r_bit0_scanin = ff_ue_rd_ptr_scanout ;
1036assign ff_l2sio_r_bit1_scanin = ff_l2sio_r_bit0_scanout ;
1037assign ff_l2sio_r_bit2_scanin = ff_l2sio_r_bit1_scanout ;
1038assign ff_l2sio_r_bit3_scanin = ff_l2sio_r_bit2_scanout ;
1039assign ff_l2sio_r_bit_scanin = ff_l2sio_r_bit3_scanout ;
1040assign scan_out = ff_l2sio_r_bit_scanout ;
1041// fixscan end:
1042endmodule
1043
1044
1045
1046
1047
1048
1049// any PARAMS parms go into naming of macro
1050
1051module sio_olc_ctl_l1clkhdr_ctl_macro (
1052 l2clk,
1053 l1en,
1054 pce_ov,
1055 stop,
1056 se,
1057 l1clk);
1058
1059
1060 input l2clk;
1061 input l1en;
1062 input pce_ov;
1063 input stop;
1064 input se;
1065 output l1clk;
1066
1067
1068
1069
1070
1071cl_sc1_l1hdr_8x c_0 (
1072
1073
1074 .l2clk(l2clk),
1075 .pce(l1en),
1076 .l1clk(l1clk),
1077 .se(se),
1078 .pce_ov(pce_ov),
1079 .stop(stop)
1080);
1081
1082
1083
1084endmodule
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098// any PARAMS parms go into naming of macro
1099
1100module sio_olc_ctl_msff_ctl_macro__width_4 (
1101 din,
1102 l1clk,
1103 scan_in,
1104 siclk,
1105 soclk,
1106 dout,
1107 scan_out);
1108wire [3:0] fdin;
1109wire [2:0] so;
1110
1111 input [3:0] din;
1112 input l1clk;
1113 input scan_in;
1114
1115
1116 input siclk;
1117 input soclk;
1118
1119 output [3:0] dout;
1120 output scan_out;
1121assign fdin[3:0] = din[3:0];
1122
1123
1124
1125
1126
1127
1128dff #(4) d0_0 (
1129.l1clk(l1clk),
1130.siclk(siclk),
1131.soclk(soclk),
1132.d(fdin[3:0]),
1133.si({scan_in,so[2:0]}),
1134.so({so[2:0],scan_out}),
1135.q(dout[3:0])
1136);
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149endmodule
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163// any PARAMS parms go into naming of macro
1164
1165module sio_olc_ctl_msff_ctl_macro__width_6 (
1166 din,
1167 l1clk,
1168 scan_in,
1169 siclk,
1170 soclk,
1171 dout,
1172 scan_out);
1173wire [5:0] fdin;
1174wire [4:0] so;
1175
1176 input [5:0] din;
1177 input l1clk;
1178 input scan_in;
1179
1180
1181 input siclk;
1182 input soclk;
1183
1184 output [5:0] dout;
1185 output scan_out;
1186assign fdin[5:0] = din[5:0];
1187
1188
1189
1190
1191
1192
1193dff #(6) d0_0 (
1194.l1clk(l1clk),
1195.siclk(siclk),
1196.soclk(soclk),
1197.d(fdin[5:0]),
1198.si({scan_in,so[4:0]}),
1199.so({so[4:0],scan_out}),
1200.q(dout[5:0])
1201);
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214endmodule
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228// any PARAMS parms go into naming of macro
1229
1230module sio_olc_ctl_msff_ctl_macro__width_1 (
1231 din,
1232 l1clk,
1233 scan_in,
1234 siclk,
1235 soclk,
1236 dout,
1237 scan_out);
1238wire [0:0] fdin;
1239
1240 input [0:0] din;
1241 input l1clk;
1242 input scan_in;
1243
1244
1245 input siclk;
1246 input soclk;
1247
1248 output [0:0] dout;
1249 output scan_out;
1250assign fdin[0:0] = din[0:0];
1251
1252
1253
1254
1255
1256
1257dff #(1) d0_0 (
1258.l1clk(l1clk),
1259.siclk(siclk),
1260.soclk(soclk),
1261.d(fdin[0:0]),
1262.si(scan_in),
1263.so(scan_out),
1264.q(dout[0:0])
1265);
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278endmodule
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292// any PARAMS parms go into naming of macro
1293
1294module sio_olc_ctl_msff_ctl_macro__width_17 (
1295 din,
1296 l1clk,
1297 scan_in,
1298 siclk,
1299 soclk,
1300 dout,
1301 scan_out);
1302wire [16:0] fdin;
1303wire [15:0] so;
1304
1305 input [16:0] din;
1306 input l1clk;
1307 input scan_in;
1308
1309
1310 input siclk;
1311 input soclk;
1312
1313 output [16:0] dout;
1314 output scan_out;
1315assign fdin[16:0] = din[16:0];
1316
1317
1318
1319
1320
1321
1322dff #(17) d0_0 (
1323.l1clk(l1clk),
1324.siclk(siclk),
1325.soclk(soclk),
1326.d(fdin[16:0]),
1327.si({scan_in,so[15:0]}),
1328.so({so[15:0],scan_out}),
1329.q(dout[16:0])
1330);
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343endmodule
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357// any PARAMS parms go into naming of macro
1358
1359module sio_olc_ctl_msff_ctl_macro__width_3 (
1360 din,
1361 l1clk,
1362 scan_in,
1363 siclk,
1364 soclk,
1365 dout,
1366 scan_out);
1367wire [2:0] fdin;
1368wire [1:0] so;
1369
1370 input [2:0] din;
1371 input l1clk;
1372 input scan_in;
1373
1374
1375 input siclk;
1376 input soclk;
1377
1378 output [2:0] dout;
1379 output scan_out;
1380assign fdin[2:0] = din[2:0];
1381
1382
1383
1384
1385
1386
1387dff #(3) d0_0 (
1388.l1clk(l1clk),
1389.siclk(siclk),
1390.soclk(soclk),
1391.d(fdin[2:0]),
1392.si({scan_in,so[1:0]}),
1393.so({so[1:0],scan_out}),
1394.q(dout[2:0])
1395);
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408endmodule
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422// any PARAMS parms go into naming of macro
1423
1424module sio_olc_ctl_msff_ctl_macro__width_7 (
1425 din,
1426 l1clk,
1427 scan_in,
1428 siclk,
1429 soclk,
1430 dout,
1431 scan_out);
1432wire [6:0] fdin;
1433wire [5:0] so;
1434
1435 input [6:0] din;
1436 input l1clk;
1437 input scan_in;
1438
1439
1440 input siclk;
1441 input soclk;
1442
1443 output [6:0] dout;
1444 output scan_out;
1445assign fdin[6:0] = din[6:0];
1446
1447
1448
1449
1450
1451
1452dff #(7) d0_0 (
1453.l1clk(l1clk),
1454.siclk(siclk),
1455.soclk(soclk),
1456.d(fdin[6:0]),
1457.si({scan_in,so[5:0]}),
1458.so({so[5:0],scan_out}),
1459.q(dout[6:0])
1460);
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473endmodule
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487// any PARAMS parms go into naming of macro
1488
1489module sio_olc_ctl_msff_ctl_macro__width_2 (
1490 din,
1491 l1clk,
1492 scan_in,
1493 siclk,
1494 soclk,
1495 dout,
1496 scan_out);
1497wire [1:0] fdin;
1498wire [0:0] so;
1499
1500 input [1:0] din;
1501 input l1clk;
1502 input scan_in;
1503
1504
1505 input siclk;
1506 input soclk;
1507
1508 output [1:0] dout;
1509 output scan_out;
1510assign fdin[1:0] = din[1:0];
1511
1512
1513
1514
1515
1516
1517dff #(2) d0_0 (
1518.l1clk(l1clk),
1519.siclk(siclk),
1520.soclk(soclk),
1521.d(fdin[1:0]),
1522.si({scan_in,so[0:0]}),
1523.so({so[0:0],scan_out}),
1524.q(dout[1:0])
1525);
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538endmodule
1539
1540
1541
1542
1543
1544
1545
1546