Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / gkt / rtl / gkt_ipc_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: gkt_ipc_ctl.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35module gkt_ipc_ctl (
36 tcu_scan_en,
37 l2clk,
38 lbist_run,
39 scan_in,
40 tcu_pce_ov,
41 spc_aclk,
42 spc_bclk,
43 scan_out,
44 lsu_gkt_pmen,
45 ifu_l15_valid,
46 mmu_l15_valid,
47 lsu_l15_valid,
48 spu_l15_valid,
49 ifu_l15_addr39_37,
50 ifu_l15_addr8_6,
51 mmu_l15_addr39_37,
52 mmu_l15_addr8_6,
53 lsu_l15_addr39_37,
54 lsu_l15_addr8_6,
55 spu_l15_addr39_37,
56 spu_l15_addr8_6,
57 lsu_l15_lock,
58 pcx_grant,
59 ipd_optype,
60 ncu_pm_ff,
61 ncu_ba01_ff,
62 ncu_ba23_ff,
63 ncu_ba45_ff,
64 ncu_ba67_ff,
65 ipc_v0_ifu_new,
66 ipc_v0_ifu_shft,
67 ipc_v0_ifu_hold,
68 ipc_v1_ifu_new,
69 ipc_v1_ifu_hold,
70 ipc_v0_mmu_new,
71 ipc_v0_mmu_shft,
72 ipc_v0_mmu_hold,
73 ipc_v1_mmu_new,
74 ipc_v1_mmu_hold,
75 ipc_v0_lsu_new,
76 ipc_v0_lsu_shft,
77 ipc_v0_lsu_hold,
78 ipc_v1_lsu_new,
79 ipc_v1_lsu_hold,
80 ipc_v0_spu_new,
81 ipc_v0_spu_shft,
82 ipc_v0_spu_hold,
83 ipc_v1_spu_new,
84 ipc_v1_spu_hold,
85 l15_ifu_grant,
86 l15_mmu_grant,
87 l15_lsu_grant,
88 l15_spu_grant,
89 ipc_sel_ndrop_ifu_l1,
90 ipc_sel_ndrop_mmu_l1,
91 ipc_sel_ndrop_lsu_l1,
92 ipc_sel_ndrop_spu_l1,
93 ipc_sel_drop_ifu_l1,
94 ipc_sel_drop_mmu_l1,
95 ipc_sel_drop_lsu_l1,
96 ipc_sel_drop_spu_l1,
97 ipc_dropreg_wen,
98 ipc_pq_clken,
99 ipc_op_req_li,
100 ipc_atm_req_li,
101 l15_pmu_xbar_optype);
102wire pce_ov;
103wire stop;
104wire siclk;
105wire soclk;
106wire se;
107wire l1clk;
108wire pmen_reg_scanin;
109wire pmen_reg_scanout;
110wire gkt_pmen;
111wire dff_ncu_pb_scanin;
112wire dff_ncu_pb_scanout;
113wire pm;
114wire ba01;
115wire ba23;
116wire ba45;
117wire ba67;
118wire sel8_pa8_in;
119wire sel8_pa7_in;
120wire sel8_1_in;
121wire sel7_pa7_in;
122wire sel7_pa7b_in;
123wire sel7_1_in;
124wire dff_pb_sel_scanin;
125wire dff_pb_sel_scanout;
126wire sel8_pa8;
127wire sel8_pa7;
128wire sel8_1;
129wire sel7_pa7;
130wire sel7_pa7b;
131wire sel7_1;
132wire v0_ifu_in;
133wire v0_ifu;
134wire ifu_shift;
135wire v1_ifu;
136wire v1_ifu_in;
137wire ifu_eff_addr_8;
138wire ifu_eff_addr_7;
139wire ifu_l15_io;
140wire [8:0] ifu_l15_bank;
141wire [8:0] v0_ifu_req_in;
142wire [8:0] v1_ifu_req;
143wire [8:0] v0_ifu_req;
144wire [8:0] v1_ifu_req_in;
145wire dff_ifu_req_v0_scanin;
146wire dff_ifu_req_v0_scanout;
147wire dff_ifu_req_v1_scanin;
148wire dff_ifu_req_v1_scanout;
149wire dff_ifu_v0_scanin;
150wire dff_ifu_v0_scanout;
151wire dff_ifu_v1_scanin;
152wire dff_ifu_v1_scanout;
153wire v0_mmu_in;
154wire v0_mmu;
155wire mmu_shift;
156wire v1_mmu;
157wire v1_mmu_in;
158wire mmu_eff_addr_8;
159wire mmu_eff_addr_7;
160wire mmu_l15_io;
161wire [8:0] mmu_l15_bank;
162wire [8:0] v0_mmu_req_in;
163wire [8:0] v1_mmu_req;
164wire [8:0] v0_mmu_req;
165wire [8:0] v1_mmu_req_in;
166wire dff_mmu_req_v0_scanin;
167wire dff_mmu_req_v0_scanout;
168wire dff_mmu_req_v1_scanin;
169wire dff_mmu_req_v1_scanout;
170wire dff_mmu_v0_scanin;
171wire dff_mmu_v0_scanout;
172wire dff_mmu_v1_scanin;
173wire dff_mmu_v1_scanout;
174wire v0_lsu_in;
175wire v0_lsu;
176wire lsu_shift;
177wire v1_lsu;
178wire v1_lsu_in;
179wire v0_lsu_lock_in;
180wire v1_lsu_lock;
181wire v0_lsu_lock;
182wire v1_lsu_lock_in;
183wire lsu_eff_addr_8;
184wire lsu_eff_addr_7;
185wire lsu_l15_io;
186wire [8:0] lsu_l15_bank;
187wire [8:0] v0_lsu_req_in;
188wire [8:0] v1_lsu_req;
189wire [8:0] v0_lsu_req;
190wire [8:0] v1_lsu_req_in;
191wire dff_lsu_req_v0_scanin;
192wire dff_lsu_req_v0_scanout;
193wire dff_lsu_req_v1_scanin;
194wire dff_lsu_req_v1_scanout;
195wire dff_lsu_v0_scanin;
196wire dff_lsu_v0_scanout;
197wire dff_lsu_v1_scanin;
198wire dff_lsu_v1_scanout;
199wire dff_lsu_lock_v0_scanin;
200wire dff_lsu_lock_v0_scanout;
201wire dff_lsu_lock_v1_scanin;
202wire dff_lsu_lock_v1_scanout;
203wire v0_spu_in;
204wire v0_spu;
205wire spu_shift;
206wire v1_spu;
207wire v1_spu_in;
208wire spu_eff_addr_8;
209wire spu_eff_addr_7;
210wire spu_l15_io;
211wire [8:0] spu_l15_bank;
212wire [8:0] v0_spu_req_in;
213wire [8:0] v1_spu_req;
214wire [8:0] v0_spu_req;
215wire [8:0] v1_spu_req_in;
216wire dff_spu_req_v0_scanin;
217wire dff_spu_req_v0_scanout;
218wire dff_spu_req_v1_scanin;
219wire dff_spu_req_v1_scanout;
220wire dff_spu_v0_scanin;
221wire dff_spu_v0_scanout;
222wire dff_spu_v1_scanin;
223wire dff_spu_v1_scanout;
224wire f_im_in;
225wire f_im;
226wire sel_ifu_l1;
227wire sel_mmu_l1;
228wire force_ifu;
229wire force_mmu;
230wire f_ls_in;
231wire f_ls;
232wire sel_lsu_l1;
233wire sel_spu_l1;
234wire force_lsu;
235wire force_spu;
236wire f_i_in;
237wire f_i;
238wire sel_ifu_mmu_l1;
239wire sel_lsu_spu_l1;
240wire force_ifu_mmu;
241wire force_lsu_spu;
242wire ifu_v;
243wire [3:0] ipc_dropreg_valid;
244wire mmu_v;
245wire lsu_v;
246wire spu_v;
247wire ipc_sel_ifu;
248wire lock_acc;
249wire ipc_sel_mmu;
250wire ipc_sel_lsu;
251wire ipc_sel_spu;
252wire ipc_sel_ifu_mmu;
253wire ipc_sel_lsu_spu;
254wire lock_acc_in;
255wire [3:0] unit_sel_li;
256wire [8:0] pcxbuf_empty;
257wire [8:0] pqm_empty;
258wire [8:0] op_req_l1;
259wire [8:0] kill_lsu_atm_req;
260wire kill_lsu_req;
261wire [8:0] atm_req_li;
262wire [3:0] ipc_unit_sel_l1;
263wire sel_repeat_li;
264wire sel_nrepeat_drop_li;
265wire sel_nrepeat_ndrop_li;
266wire sel_nrepeat_drop_unused;
267wire sel_nrepeat_ndrop_unused;
268wire [8:0] req_nrepeat_drop_li;
269wire [8:0] dropreg0;
270wire [8:0] dropreg1;
271wire [8:0] dropreg2;
272wire [8:0] dropreg3;
273wire [8:0] req_nrepeat_ndrop_li;
274wire [8:0] atm_pq;
275wire [8:0] req_repeat_drop_li;
276wire [8:0] req_repeat_ndrop_li;
277wire ifu_grant_li;
278wire mmu_grant_li;
279wire lsu_grant_li;
280wire spu_grant_li;
281wire lock_reg_scanin;
282wire lock_reg_scanout;
283wire favori_reg_scanin;
284wire favori_reg_scanout;
285wire favorim_reg_scanin;
286wire favorim_reg_scanout;
287wire favorls_reg_scanin;
288wire favorls_reg_scanout;
289wire sel_reg_scanin;
290wire sel_reg_scanout;
291wire grant_reg_scanin;
292wire grant_reg_scanout;
293wire ifu_grant_l1;
294wire mmu_grant_l1;
295wire lsu_grant_l1;
296wire spu_grant_l1;
297wire l1_atm_req_reg_scanin;
298wire l1_atm_req_reg_scanout;
299wire [8:0] ipc_atm_l1;
300wire req_nrepeat_drop_reg_scanin;
301wire req_nrepeat_drop_reg_scanout;
302wire [8:0] req_nrepeat_drop_l1;
303wire req_nrepeat_ndrop_reg_scanin;
304wire req_nrepeat_ndrop_reg_scanout;
305wire [8:0] req_nrepeat_ndrop_l1;
306wire req_repeat_drop_reg_scanin;
307wire req_repeat_drop_reg_scanout;
308wire [8:0] ipc_req_repeat_drop_l1;
309wire req_repeat_ndrop_reg_scanin;
310wire req_repeat_ndrop_reg_scanout;
311wire [8:0] ipc_req_repeat_ndrop_l1;
312wire ifu_ndropped_pa;
313wire mmu_ndropped_pa;
314wire lsu_ndropped_pa;
315wire spu_ndropped_pa;
316wire req_dropped;
317wire [8:0] pqm_req_drop;
318wire req_dropped_;
319wire req_dropped_lat;
320wire [3:0] ipc_unit_sel_pa;
321wire [3:0] ipc_dropreg_valid_pa;
322wire req_dropped_lat_;
323wire [8:0] dropreg0_in;
324wire [8:0] dropreg1_in;
325wire [8:0] dropreg2_in;
326wire [8:0] dropreg3_in;
327wire [8:0] req_pq;
328wire [8:0] atm_pa;
329wire ipc_pq_valid;
330wire ifu_ndropped_l1;
331wire mmu_ndropped_l1;
332wire lsu_ndropped_l1;
333wire spu_ndropped_l1;
334wire ifu_dropped_pa;
335wire mmu_dropped_pa;
336wire lsu_dropped_pa;
337wire spu_dropped_pa;
338wire ifu_success_pa;
339wire mmu_success_pa;
340wire lsu_success_pa;
341wire spu_success_pa;
342wire inc_ifu;
343wire max_count_reached;
344wire clear_ifu;
345wire hold_ifu;
346wire [2:0] ifu_drop_cnt;
347wire [2:0] ifu_drop_cnt_lat;
348wire inc_mmu;
349wire clear_mmu;
350wire hold_mmu;
351wire [2:0] mmu_drop_cnt;
352wire [2:0] mmu_drop_cnt_lat;
353wire inc_lsu;
354wire clear_lsu;
355wire hold_lsu;
356wire [2:0] lsu_drop_cnt;
357wire [2:0] lsu_drop_cnt_lat;
358wire inc_spu;
359wire clear_spu;
360wire hold_spu;
361wire [2:0] spu_drop_cnt;
362wire [2:0] spu_drop_cnt_lat;
363wire max_count_reached_in;
364wire force_ifu_in;
365wire force_mmu_in;
366wire force_lsu_in;
367wire force_spu_in;
368wire force_ifu_mmu_in;
369wire force_lsu_spu_in;
370wire drop_cnt_scanin;
371wire drop_cnt_scanout;
372wire force_req_scanin;
373wire force_req_scanout;
374wire ifetch_pkt;
375wire dload_pkt;
376wire dstore_pkt;
377wire sload_pkt;
378wire sstore_pkt;
379wire mmu_pkt;
380wire ma_pkt;
381wire [2:0] pcx_pkt;
382wire [2:0] tid_pkt;
383wire valid_pkt;
384wire [8:0] req_pa;
385wire [6:0] xbar_optype;
386wire dff_xbar_type_scanin;
387wire dff_xbar_type_scanout;
388wire dff_unit_sel_pa_type_scanin;
389wire dff_unit_sel_pa_type_scanout;
390wire dff_unit_ndrop_pa_scanin;
391wire dff_unit_ndrop_pa_scanout;
392wire dff_req_drop_lat_scanin;
393wire dff_req_drop_lat_scanout;
394wire dff_req_drop_latx_scanin;
395wire dff_req_drop_latx_scanout;
396wire dff_dropreg_valid_scanin;
397wire dff_dropreg_valid_scanout;
398wire dff_dropreg0_scanin;
399wire dff_dropreg0_scanout;
400wire dff_dropreg1_scanin;
401wire dff_dropreg1_scanout;
402wire dff_dropreg2_scanin;
403wire dff_dropreg2_scanout;
404wire dff_dropreg3_scanin;
405wire dff_dropreg3_scanout;
406wire dff_req_pa_scanin;
407wire dff_req_pa_scanout;
408wire dff_atm_pa_scanin;
409wire dff_atm_pa_scanout;
410wire [8:0] pcx_grant_lb;
411wire pqm0_scanin;
412wire pqm0_scanout;
413wire pqm1_scanin;
414wire pqm1_scanout;
415wire pqm2_scanin;
416wire pqm2_scanout;
417wire pqm3_scanin;
418wire pqm3_scanout;
419wire pqm4_scanin;
420wire pqm4_scanout;
421wire pqm5_scanin;
422wire pqm5_scanout;
423wire pqm6_scanin;
424wire pqm6_scanout;
425wire pqm7_scanin;
426wire pqm7_scanout;
427wire pqm8_scanin;
428wire pqm8_scanout;
429wire spares_scanin;
430wire spares_scanout;
431
432
433// globals
434input tcu_scan_en;
435input l2clk;
436input lbist_run;
437input scan_in;
438input tcu_pce_ov; // scan signals
439input spc_aclk;
440input spc_bclk;
441output scan_out;
442
443
444input lsu_gkt_pmen;
445
446input ifu_l15_valid; // 0in known_driven
447input mmu_l15_valid; // 0in known_driven
448input lsu_l15_valid; // 0in known_driven
449input spu_l15_valid; // 0in known_driven
450
451input [39:37] ifu_l15_addr39_37;
452input [8:6] ifu_l15_addr8_6;
453input [39:37] mmu_l15_addr39_37;
454input [8:6] mmu_l15_addr8_6;
455input [39:37] lsu_l15_addr39_37;
456input [8:6] lsu_l15_addr8_6;
457input [39:37] spu_l15_addr39_37;
458input [8:6] spu_l15_addr8_6;
459
460input lsu_l15_lock; // 0in known_driven
461
462input [8:0] pcx_grant;
463
464input [8:0] ipd_optype;
465
466input ncu_pm_ff;
467input ncu_ba01_ff;
468input ncu_ba23_ff;
469input ncu_ba45_ff;
470input ncu_ba67_ff;
471
472
473
474output ipc_v0_ifu_new;
475output ipc_v0_ifu_shft;
476output ipc_v0_ifu_hold;
477
478output ipc_v1_ifu_new;
479output ipc_v1_ifu_hold;
480
481output ipc_v0_mmu_new;
482output ipc_v0_mmu_shft;
483output ipc_v0_mmu_hold;
484
485output ipc_v1_mmu_new;
486output ipc_v1_mmu_hold;
487
488output ipc_v0_lsu_new;
489output ipc_v0_lsu_shft;
490output ipc_v0_lsu_hold;
491
492output ipc_v1_lsu_new;
493output ipc_v1_lsu_hold;
494
495output ipc_v0_spu_new;
496output ipc_v0_spu_shft;
497output ipc_v0_spu_hold;
498
499output ipc_v1_spu_new;
500output ipc_v1_spu_hold;
501
502output l15_ifu_grant;
503output l15_mmu_grant;
504output l15_lsu_grant;
505output l15_spu_grant;
506
507output ipc_sel_ndrop_ifu_l1;
508output ipc_sel_ndrop_mmu_l1;
509output ipc_sel_ndrop_lsu_l1;
510output ipc_sel_ndrop_spu_l1;
511
512output ipc_sel_drop_ifu_l1;
513output ipc_sel_drop_mmu_l1;
514output ipc_sel_drop_lsu_l1;
515output ipc_sel_drop_spu_l1;
516
517output [3:0] ipc_dropreg_wen;
518output ipc_pq_clken;
519
520output [8:0] ipc_op_req_li;
521output [8:0] ipc_atm_req_li;
522
523
524
525
526
527output [6:0] l15_pmu_xbar_optype;
528
529
530
531// scan renames
532assign pce_ov = tcu_pce_ov;
533assign stop = 1'b0;
534assign siclk = spc_aclk;
535assign soclk = spc_bclk;
536assign se = tcu_scan_en ;
537// end scan
538
539
540////////////////////////////////////////////////////////
541gkt_ipc_ctl_l1clkhdr_ctl_macro clkgen
542 (
543 .l2clk(l2clk),
544 .l1en (1'b1 ),
545 .l1clk(l1clk),
546 .pce_ov(pce_ov),
547 .stop(stop),
548 .se(se));
549////////////////////////////////////////////////////////
550gkt_ipc_ctl_msff_ctl_macro__width_1 pmen_reg
551(
552 .scan_in(pmen_reg_scanin),
553 .scan_out(pmen_reg_scanout),
554 .l1clk (l1clk),
555 .din (lsu_gkt_pmen),
556 .dout (gkt_pmen),
557 .siclk(siclk),
558 .soclk(soclk)
559 );
560
561////////////////////////////////////////////////////////
562// Partial bank support
563// N2 supports partial L2 banks.
564// Following truth table is used by all spc cores and sii to
565// route the request to the correct bank
566//
567//PM avaialble banks req[2] req[1] req[0]
568// ba67 ba45 ba23 ba01
569//-----------------------------------------------------------
570//0 x x x x pa[8] pa[7] pa[6]
571//1 0 0 0 0 illegal 0 0 pa[6]
572//1 0 0 0 1 0 0 pa[6]
573//1 0 0 1 0 0 1 pa[6]
574//1 0 0 1 1 0 pa[7] pa[6]
575//1 0 1 0 0 1 0 pa[6]
576//1 0 1 0 1 pa[7] 0 pa[6]
577//1 0 1 1 0 pa[7] ~pa[7] pa[6]
578//1 0 1 1 1 illegal 0 pa[7] pa[6]
579//1 1 0 0 0 1 1 pa[6]
580//1 1 0 0 1 pa[7] pa[7] pa[6]
581//1 1 0 1 0 pa[7] 1 pa[6]
582//1 1 0 1 1 illegal 0 pa[7] pa[6]
583//1 1 1 0 0 1 pa[7] pa[6]
584//1 1 1 0 1 illegal 1 pa[7] pa[6]
585//1 1 1 1 0 illegal 1 pa[7] pa[6]
586//1 1 1 1 1 pa[8] pa[7] pa[6]
587
588//.i 5
589//.o 8
590//.ilb pm ba67 ba45 ba23 ba01
591//.olb sel8_pa8 sel8_pa7 sel8_1 sel8_0 sel7_pa7 sel_pa7b sel7_1 sel7_0
592//.type fr
593//0 - - - - 1 0 0 0 1 0 0 0
594//1 0 0 0 0 0 0 0 1 0 0 0 1
595//1 0 0 0 1 0 0 0 1 0 0 0 1
596//1 0 0 1 0 0 0 0 1 0 0 1 0
597//1 0 0 1 1 0 0 0 1 1 0 0 0
598//1 0 1 0 0 0 0 1 0 0 0 0 1
599//1 0 1 0 1 0 1 0 0 0 0 0 1
600//1 0 1 1 0 0 1 0 0 0 1 0 0
601//1 0 1 1 1 0 0 0 1 1 0 0 0
602//1 1 0 0 0 0 0 1 0 0 0 1 0
603//1 1 0 0 1 0 1 0 0 1 0 0 0
604//1 1 0 1 0 0 1 0 0 0 0 1 0
605//1 1 0 1 1 0 0 0 1 1 0 0 0
606//1 1 1 0 0 0 0 1 0 1 0 0 0
607//1 1 1 0 1 0 0 1 0 1 0 0 0
608//1 1 1 1 0 0 0 1 0 1 0 0 0
609//1 1 1 1 1 1 0 0 0 1 0 0 0
610//v5.0 = (ba67&ba45&ba23&ba01) | (!pm);
611
612//v5.1 = (pm&ba67&!ba45&ba23&!ba01) | (pm&!ba67&ba45&ba23&!ba01) | (pm&ba67
613// &!ba45&!ba23&ba01) | (pm&!ba67&ba45&!ba23&ba01);
614
615//v5.2 = (pm&ba67&!ba23&!ba01) | (pm&ba45&!ba23&!ba01) | (pm&ba67&ba45&!ba01) | (
616// pm&ba67&ba45&!ba23);
617
618//v5.3 = (pm&!ba67&!ba45) | (pm&!ba45&ba23&ba01) | (pm&!ba67&ba23&ba01);
619
620//v5.4 = (ba67&ba45) | (ba23&ba01) | (ba67&ba01) | (!pm);
621
622//v5.5 = (pm&!ba67&ba45&ba23&!ba01);
623
624//v5.6 = (pm&ba67&!ba45&!ba01) | (pm&!ba45&ba23&!ba01);
625
626//v5.7 = (pm&!ba67&!ba23);
627gkt_ipc_ctl_msff_ctl_macro__width_5 dff_ncu_pb
628(
629 .scan_in(dff_ncu_pb_scanin),
630 .scan_out(dff_ncu_pb_scanout),
631 .l1clk(l1clk),
632 .din ({ncu_pm_ff,ncu_ba01_ff,ncu_ba23_ff,ncu_ba45_ff,ncu_ba67_ff}),
633 .dout ({pm,ba01,ba23,ba45,ba67}),
634 .siclk(siclk),
635 .soclk(soclk)
636 );
637
638assign sel8_pa8_in = (ba67 & ba45 & ba23 & ba01) | (!pm);
639
640assign sel8_pa7_in = (pm & ba67 & !ba45 & ba23 & !ba01) |
641 (pm & !ba67 & ba45 & ba23 & !ba01) |
642 (pm & ba67 & !ba45 & !ba23 & ba01) |
643 (pm & !ba67 & ba45 & !ba23 & ba01);
644
645assign sel8_1_in = (pm & ba67 & !ba23 & !ba01) |
646 (pm & ba45 & !ba23 & !ba01) |
647 (pm & ba67 & ba45 & !ba01) |
648 (pm & ba67 & ba45 & !ba23);
649
650assign sel7_pa7_in = (ba67 & ba45) |
651 (ba23 & ba01) |
652 (ba67 & ba01) |
653 (!pm);
654
655assign sel7_pa7b_in = (pm & !ba67 & ba45 & ba23 & !ba01);
656
657assign sel7_1_in = (pm & ba67 & !ba45 & !ba01) |
658 (pm & !ba45 & ba23 & !ba01);
659
660
661gkt_ipc_ctl_msff_ctl_macro__width_6 dff_pb_sel
662(
663 .scan_in(dff_pb_sel_scanin),
664 .scan_out(dff_pb_sel_scanout),
665 .l1clk(l1clk),
666 .din ({sel8_pa8_in, sel8_pa7_in, sel8_1_in, sel7_pa7_in, sel7_pa7b_in, sel7_1_in}),
667 .dout ({sel8_pa8, sel8_pa7, sel8_1, sel7_pa7, sel7_pa7b, sel7_1}),
668 .siclk(siclk),
669 .soclk(soclk)
670 );
671
672////////////////////////////////////////////////////////
673
674
675
676// Latch ifu data in 2-entry FIFO
677
678assign v0_ifu_in = (v0_ifu & !ifu_shift) | ifu_l15_valid | v1_ifu;
679assign v1_ifu_in = (v1_ifu & !ifu_shift) | (v1_ifu & ifu_l15_valid) | (v0_ifu & ifu_l15_valid & !ifu_shift);
680
681assign ipc_v0_ifu_new = (!v0_ifu) | (v0_ifu & !v1_ifu & ifu_shift);
682assign ipc_v0_ifu_shft = v1_ifu & ifu_shift;
683assign ipc_v0_ifu_hold = (v0_ifu & !ifu_shift);
684// 0in one_hot -var {ipc_v0_ifu_new,ipc_v0_ifu_shft,ipc_v0_ifu_hold}
685
686//assign ipc_v1_ifu_new = (~v1_ifu | ifu_shift);
687//assign ipc_v1_ifu_hold = (v1_ifu & !ifu_shift);
688// changed for power
689assign ipc_v1_ifu_new = (~v1_ifu | ifu_shift) & v1_ifu_in;
690assign ipc_v1_ifu_hold = (v1_ifu & !ifu_shift) | ~v1_ifu_in;
691
692assign ifu_eff_addr_8 = (sel8_pa8 & ifu_l15_addr8_6[8]) |
693 (sel8_pa7 & ifu_l15_addr8_6[7]) |
694 (sel8_1);
695
696assign ifu_eff_addr_7 = (sel7_pa7 & ifu_l15_addr8_6[7]) |
697 (sel7_pa7b & ~ifu_l15_addr8_6[7]) |
698 (sel7_1);
699
700// determine bank being requested by ifu and latch it in two-entry fifo.
701assign ifu_l15_io = ifu_l15_addr39_37[39] & ~(~ifu_l15_addr39_37[38] & ifu_l15_addr39_37[37]);
702assign ifu_l15_bank[0] = ~ifu_l15_io & ~ifu_eff_addr_8 & ~ifu_eff_addr_7 & ~ifu_l15_addr8_6[6];
703assign ifu_l15_bank[1] = ~ifu_l15_io & ~ifu_eff_addr_8 & ~ifu_eff_addr_7 & ifu_l15_addr8_6[6];
704assign ifu_l15_bank[2] = ~ifu_l15_io & ~ifu_eff_addr_8 & ifu_eff_addr_7 & ~ifu_l15_addr8_6[6];
705assign ifu_l15_bank[3] = ~ifu_l15_io & ~ifu_eff_addr_8 & ifu_eff_addr_7 & ifu_l15_addr8_6[6];
706assign ifu_l15_bank[4] = ~ifu_l15_io & ifu_eff_addr_8 & ~ifu_eff_addr_7 & ~ifu_l15_addr8_6[6];
707assign ifu_l15_bank[5] = ~ifu_l15_io & ifu_eff_addr_8 & ~ifu_eff_addr_7 & ifu_l15_addr8_6[6];
708assign ifu_l15_bank[6] = ~ifu_l15_io & ifu_eff_addr_8 & ifu_eff_addr_7 & ~ifu_l15_addr8_6[6];
709assign ifu_l15_bank[7] = ~ifu_l15_io & ifu_eff_addr_8 & ifu_eff_addr_7 & ifu_l15_addr8_6[6];
710assign ifu_l15_bank[8] = ifu_l15_io;
711
712assign v0_ifu_req_in[8:0] = ({9{ipc_v0_ifu_new & ifu_l15_valid}} & ifu_l15_bank[8:0]) |
713 ({9{ipc_v0_ifu_shft}} & v1_ifu_req[8:0]) |
714 ({9{ipc_v0_ifu_hold}} & v0_ifu_req[8:0]);
715
716assign v1_ifu_req_in[8:0] = ({9{ipc_v1_ifu_new & ifu_l15_valid}} & ifu_l15_bank[8:0]) |
717 ({9{ipc_v1_ifu_hold}} & v1_ifu_req[8:0]);
718
719gkt_ipc_ctl_msff_ctl_macro__width_9 dff_ifu_req_v0
720(
721 .scan_in(dff_ifu_req_v0_scanin),
722 .scan_out(dff_ifu_req_v0_scanout),
723 .l1clk(l1clk),
724 .din (v0_ifu_req_in[8:0]),
725 .dout (v0_ifu_req[8:0]),
726 .siclk(siclk),
727 .soclk(soclk)
728 );
729gkt_ipc_ctl_msff_ctl_macro__width_9 dff_ifu_req_v1
730(
731 .scan_in(dff_ifu_req_v1_scanin),
732 .scan_out(dff_ifu_req_v1_scanout),
733 .l1clk(l1clk),
734 .din (v1_ifu_req_in[8:0]),
735 .dout (v1_ifu_req[8:0]),
736 .siclk(siclk),
737 .soclk(soclk)
738 );
739
740gkt_ipc_ctl_msff_ctl_macro__width_1 dff_ifu_v0
741(
742 .scan_in(dff_ifu_v0_scanin),
743 .scan_out(dff_ifu_v0_scanout),
744 .l1clk(l1clk),
745 .din (v0_ifu_in),
746 .dout (v0_ifu),
747 .siclk(siclk),
748 .soclk(soclk)
749 );
750gkt_ipc_ctl_msff_ctl_macro__width_1 dff_ifu_v1
751(
752 .scan_in(dff_ifu_v1_scanin),
753 .scan_out(dff_ifu_v1_scanout),
754 .l1clk(l1clk),
755 .din (v1_ifu_in),
756 .dout (v1_ifu),
757 .siclk(siclk),
758 .soclk(soclk)
759 );
760
761////////////////////////////////////////////////////////
762// Latch mmu data in 2-entry FIFO
763
764assign v0_mmu_in = (v0_mmu & !mmu_shift) | mmu_l15_valid | v1_mmu;
765assign v1_mmu_in = (v1_mmu & !mmu_shift) | (v1_mmu & mmu_l15_valid) | (v0_mmu & mmu_l15_valid & !mmu_shift);
766
767assign ipc_v0_mmu_new = (!v0_mmu) | (v0_mmu & !v1_mmu & mmu_shift);
768assign ipc_v0_mmu_shft = v1_mmu & mmu_shift;
769assign ipc_v0_mmu_hold = (v0_mmu & !mmu_shift);
770// 0in one_hot -var {ipc_v0_mmu_new,ipc_v0_mmu_shft,ipc_v0_mmu_hold}
771
772//assign ipc_v1_mmu_new = (~v1_mmu | mmu_shift);
773//assign ipc_v1_mmu_hold = (v1_mmu & !mmu_shift);
774// changed for power
775assign ipc_v1_mmu_new = (~v1_mmu | mmu_shift) & v1_mmu_in;
776assign ipc_v1_mmu_hold = (v1_mmu & !mmu_shift) | ~v1_mmu_in;
777
778assign mmu_eff_addr_8 = (sel8_pa8 & mmu_l15_addr8_6[8]) |
779 (sel8_pa7 & mmu_l15_addr8_6[7]) |
780 (sel8_1);
781
782assign mmu_eff_addr_7 = (sel7_pa7 & mmu_l15_addr8_6[7]) |
783 (sel7_pa7b & ~mmu_l15_addr8_6[7]) |
784 (sel7_1);
785
786// determine bank being requested by mmu and latch it in two-entry fifo.
787assign mmu_l15_io = mmu_l15_addr39_37[39] & ~(~mmu_l15_addr39_37[38] & mmu_l15_addr39_37[37]);
788assign mmu_l15_bank[0] = ~mmu_l15_io & ~mmu_eff_addr_8 & ~mmu_eff_addr_7 & ~mmu_l15_addr8_6[6];
789assign mmu_l15_bank[1] = ~mmu_l15_io & ~mmu_eff_addr_8 & ~mmu_eff_addr_7 & mmu_l15_addr8_6[6];
790assign mmu_l15_bank[2] = ~mmu_l15_io & ~mmu_eff_addr_8 & mmu_eff_addr_7 & ~mmu_l15_addr8_6[6];
791assign mmu_l15_bank[3] = ~mmu_l15_io & ~mmu_eff_addr_8 & mmu_eff_addr_7 & mmu_l15_addr8_6[6];
792assign mmu_l15_bank[4] = ~mmu_l15_io & mmu_eff_addr_8 & ~mmu_eff_addr_7 & ~mmu_l15_addr8_6[6];
793assign mmu_l15_bank[5] = ~mmu_l15_io & mmu_eff_addr_8 & ~mmu_eff_addr_7 & mmu_l15_addr8_6[6];
794assign mmu_l15_bank[6] = ~mmu_l15_io & mmu_eff_addr_8 & mmu_eff_addr_7 & ~mmu_l15_addr8_6[6];
795assign mmu_l15_bank[7] = ~mmu_l15_io & mmu_eff_addr_8 & mmu_eff_addr_7 & mmu_l15_addr8_6[6];
796assign mmu_l15_bank[8] = mmu_l15_io;
797
798assign v0_mmu_req_in[8:0] = ({9{ipc_v0_mmu_new & mmu_l15_valid}} & mmu_l15_bank[8:0]) |
799 ({9{ipc_v0_mmu_shft}} & v1_mmu_req[8:0]) |
800 ({9{ipc_v0_mmu_hold}} & v0_mmu_req[8:0]);
801
802assign v1_mmu_req_in[8:0] = ({9{ipc_v1_mmu_new & mmu_l15_valid}} & mmu_l15_bank[8:0]) |
803 ({9{ipc_v1_mmu_hold}} & v1_mmu_req[8:0]);
804
805gkt_ipc_ctl_msff_ctl_macro__width_9 dff_mmu_req_v0
806(
807 .scan_in(dff_mmu_req_v0_scanin),
808 .scan_out(dff_mmu_req_v0_scanout),
809 .l1clk(l1clk),
810 .din (v0_mmu_req_in[8:0]),
811 .dout (v0_mmu_req[8:0]),
812 .siclk(siclk),
813 .soclk(soclk)
814 );
815gkt_ipc_ctl_msff_ctl_macro__width_9 dff_mmu_req_v1
816(
817 .scan_in(dff_mmu_req_v1_scanin),
818 .scan_out(dff_mmu_req_v1_scanout),
819 .l1clk(l1clk),
820 .din (v1_mmu_req_in[8:0]),
821 .dout (v1_mmu_req[8:0]),
822 .siclk(siclk),
823 .soclk(soclk)
824 );
825
826gkt_ipc_ctl_msff_ctl_macro__width_1 dff_mmu_v0
827(
828 .scan_in(dff_mmu_v0_scanin),
829 .scan_out(dff_mmu_v0_scanout),
830 .l1clk(l1clk),
831 .din (v0_mmu_in),
832 .dout (v0_mmu),
833 .siclk(siclk),
834 .soclk(soclk)
835 );
836gkt_ipc_ctl_msff_ctl_macro__width_1 dff_mmu_v1
837(
838 .scan_in(dff_mmu_v1_scanin),
839 .scan_out(dff_mmu_v1_scanout),
840 .l1clk(l1clk),
841 .din (v1_mmu_in),
842 .dout (v1_mmu),
843 .siclk(siclk),
844 .soclk(soclk)
845 );
846
847////////////////////////////////////////////////////////
848// Latch lsu data in 2-entry FIFO
849assign v0_lsu_in = (v0_lsu & ~lsu_shift) | lsu_l15_valid | v1_lsu ;
850assign v1_lsu_in = (v1_lsu & ~lsu_shift) | (v1_lsu & lsu_l15_valid) | (v0_lsu & lsu_l15_valid & ~lsu_shift);
851
852assign ipc_v0_lsu_new = (~v0_lsu) | (v0_lsu & ~v1_lsu & lsu_shift);
853assign ipc_v0_lsu_shft = v1_lsu & lsu_shift;
854assign ipc_v0_lsu_hold = (v0_lsu & ~lsu_shift);
855// 0in one_hot -var {ipc_v0_lsu_new,ipc_v0_lsu_shft,ipc_v0_lsu_hold}
856
857
858//assign ipc_v1_lsu_new = (~v1_lsu | lsu_shift);
859//assign ipc_v1_lsu_hold = (v1_lsu & !lsu_shift);
860//changed for power saving
861assign ipc_v1_lsu_new = (~v1_lsu | lsu_shift) & v1_lsu_in;
862assign ipc_v1_lsu_hold = (v1_lsu & !lsu_shift) | ~v1_lsu_in;
863
864
865assign v0_lsu_lock_in = (ipc_v0_lsu_new & lsu_l15_lock & lsu_l15_valid) |
866 (ipc_v0_lsu_shft & v1_lsu_lock) |
867 (ipc_v0_lsu_hold & v0_lsu_lock);
868
869assign v1_lsu_lock_in = (ipc_v1_lsu_new & lsu_l15_lock & lsu_l15_valid) |
870 (ipc_v1_lsu_hold & v1_lsu_lock);
871
872assign lsu_eff_addr_8 = (sel8_pa8 & lsu_l15_addr8_6[8]) |
873 (sel8_pa7 & lsu_l15_addr8_6[7]) |
874 (sel8_1);
875
876assign lsu_eff_addr_7 = (sel7_pa7 & lsu_l15_addr8_6[7]) |
877 (sel7_pa7b & ~lsu_l15_addr8_6[7]) |
878 (sel7_1);
879
880// determine bank being requested by lsu and latch it in two-entry fifo.
881assign lsu_l15_io = lsu_l15_addr39_37[39] & ~(~lsu_l15_addr39_37[38] & lsu_l15_addr39_37[37]);
882assign lsu_l15_bank[0] = ~lsu_l15_io & ~lsu_eff_addr_8 & ~lsu_eff_addr_7 & ~lsu_l15_addr8_6[6];
883assign lsu_l15_bank[1] = ~lsu_l15_io & ~lsu_eff_addr_8 & ~lsu_eff_addr_7 & lsu_l15_addr8_6[6];
884assign lsu_l15_bank[2] = ~lsu_l15_io & ~lsu_eff_addr_8 & lsu_eff_addr_7 & ~lsu_l15_addr8_6[6];
885assign lsu_l15_bank[3] = ~lsu_l15_io & ~lsu_eff_addr_8 & lsu_eff_addr_7 & lsu_l15_addr8_6[6];
886assign lsu_l15_bank[4] = ~lsu_l15_io & lsu_eff_addr_8 & ~lsu_eff_addr_7 & ~lsu_l15_addr8_6[6];
887assign lsu_l15_bank[5] = ~lsu_l15_io & lsu_eff_addr_8 & ~lsu_eff_addr_7 & lsu_l15_addr8_6[6];
888assign lsu_l15_bank[6] = ~lsu_l15_io & lsu_eff_addr_8 & lsu_eff_addr_7 & ~lsu_l15_addr8_6[6];
889assign lsu_l15_bank[7] = ~lsu_l15_io & lsu_eff_addr_8 & lsu_eff_addr_7 & lsu_l15_addr8_6[6];
890assign lsu_l15_bank[8] = lsu_l15_io;
891
892assign v0_lsu_req_in[8:0] = ({9{ipc_v0_lsu_new & lsu_l15_valid}} & lsu_l15_bank[8:0]) |
893 ({9{ipc_v0_lsu_shft}} & v1_lsu_req[8:0]) |
894 ({9{ipc_v0_lsu_hold}} & v0_lsu_req[8:0]);
895
896assign v1_lsu_req_in[8:0] = ({9{ipc_v1_lsu_new & lsu_l15_valid}} & lsu_l15_bank[8:0]) |
897 ({9{ipc_v1_lsu_hold}} & v1_lsu_req[8:0]);
898
899gkt_ipc_ctl_msff_ctl_macro__width_9 dff_lsu_req_v0
900(
901 .scan_in(dff_lsu_req_v0_scanin),
902 .scan_out(dff_lsu_req_v0_scanout),
903 .l1clk(l1clk),
904 .din (v0_lsu_req_in[8:0]),
905 .dout (v0_lsu_req[8:0]),
906 .siclk(siclk),
907 .soclk(soclk)
908 );
909gkt_ipc_ctl_msff_ctl_macro__width_9 dff_lsu_req_v1
910(
911 .scan_in(dff_lsu_req_v1_scanin),
912 .scan_out(dff_lsu_req_v1_scanout),
913 .l1clk(l1clk),
914 .din (v1_lsu_req_in[8:0]),
915 .dout (v1_lsu_req[8:0]),
916 .siclk(siclk),
917 .soclk(soclk)
918 );
919
920gkt_ipc_ctl_msff_ctl_macro__width_1 dff_lsu_v0
921(
922 .scan_in(dff_lsu_v0_scanin),
923 .scan_out(dff_lsu_v0_scanout),
924 .l1clk(l1clk),
925 .din (v0_lsu_in),
926 .dout (v0_lsu),
927 .siclk(siclk),
928 .soclk(soclk)
929 );
930gkt_ipc_ctl_msff_ctl_macro__width_1 dff_lsu_v1
931(
932 .scan_in(dff_lsu_v1_scanin),
933 .scan_out(dff_lsu_v1_scanout),
934 .l1clk(l1clk),
935 .din (v1_lsu_in),
936 .dout (v1_lsu),
937 .siclk(siclk),
938 .soclk(soclk)
939 );
940
941gkt_ipc_ctl_msff_ctl_macro__width_1 dff_lsu_lock_v0
942(
943 .scan_in(dff_lsu_lock_v0_scanin),
944 .scan_out(dff_lsu_lock_v0_scanout),
945 .l1clk(l1clk),
946 .din (v0_lsu_lock_in),
947 .dout (v0_lsu_lock),
948 .siclk(siclk),
949 .soclk(soclk)
950 );
951gkt_ipc_ctl_msff_ctl_macro__width_1 dff_lsu_lock_v1
952(
953 .scan_in(dff_lsu_lock_v1_scanin),
954 .scan_out(dff_lsu_lock_v1_scanout),
955 .l1clk(l1clk),
956 .din (v1_lsu_lock_in),
957 .dout (v1_lsu_lock),
958 .siclk(siclk),
959 .soclk(soclk)
960 );
961
962////////////////////////////////////////////////////////
963// Latch spu data in 2-entry FIFO
964
965assign v0_spu_in = (v0_spu & !spu_shift) | spu_l15_valid | v1_spu;
966assign v1_spu_in = (v1_spu & !spu_shift) | (v1_spu & spu_l15_valid) | (v0_spu & spu_l15_valid & !spu_shift);
967
968assign ipc_v0_spu_new = (!v0_spu) | (v0_spu & !v1_spu & spu_shift);
969assign ipc_v0_spu_shft = v1_spu & spu_shift;
970assign ipc_v0_spu_hold = (v0_spu & !spu_shift);
971// 0in one_hot -var {ipc_v0_spu_new,ipc_v0_spu_shft,ipc_v0_spu_hold}
972
973//assign ipc_v1_spu_new = (~v1_spu | spu_shift);
974//assign ipc_v1_spu_hold = (v1_spu & !spu_shift);
975// changed for power
976assign ipc_v1_spu_new = (~v1_spu | spu_shift) & v1_spu_in;
977assign ipc_v1_spu_hold = (v1_spu & !spu_shift) | ~v1_spu_in;
978
979assign spu_eff_addr_8 = (sel8_pa8 & spu_l15_addr8_6[8]) |
980 (sel8_pa7 & spu_l15_addr8_6[7]) |
981 (sel8_1);
982
983assign spu_eff_addr_7 = (sel7_pa7 & spu_l15_addr8_6[7]) |
984 (sel7_pa7b & ~spu_l15_addr8_6[7]) |
985 (sel7_1);
986
987// determine bank being requested by spu and latch it in two-entry fifo.
988assign spu_l15_io = spu_l15_addr39_37[39] & ~(~spu_l15_addr39_37[38] & spu_l15_addr39_37[37]);
989assign spu_l15_bank[0] = ~spu_l15_io & ~spu_eff_addr_8 & ~spu_eff_addr_7 & ~spu_l15_addr8_6[6];
990assign spu_l15_bank[1] = ~spu_l15_io & ~spu_eff_addr_8 & ~spu_eff_addr_7 & spu_l15_addr8_6[6];
991assign spu_l15_bank[2] = ~spu_l15_io & ~spu_eff_addr_8 & spu_eff_addr_7 & ~spu_l15_addr8_6[6];
992assign spu_l15_bank[3] = ~spu_l15_io & ~spu_eff_addr_8 & spu_eff_addr_7 & spu_l15_addr8_6[6];
993assign spu_l15_bank[4] = ~spu_l15_io & spu_eff_addr_8 & ~spu_eff_addr_7 & ~spu_l15_addr8_6[6];
994assign spu_l15_bank[5] = ~spu_l15_io & spu_eff_addr_8 & ~spu_eff_addr_7 & spu_l15_addr8_6[6];
995assign spu_l15_bank[6] = ~spu_l15_io & spu_eff_addr_8 & spu_eff_addr_7 & ~spu_l15_addr8_6[6];
996assign spu_l15_bank[7] = ~spu_l15_io & spu_eff_addr_8 & spu_eff_addr_7 & spu_l15_addr8_6[6];
997assign spu_l15_bank[8] = spu_l15_io;
998
999assign v0_spu_req_in[8:0] = ({9{ipc_v0_spu_new & spu_l15_valid}} & spu_l15_bank[8:0]) |
1000 ({9{ipc_v0_spu_shft}} & v1_spu_req[8:0]) |
1001 ({9{ipc_v0_spu_hold}} & v0_spu_req[8:0]);
1002
1003assign v1_spu_req_in[8:0] = ({9{ipc_v1_spu_new & spu_l15_valid}} & spu_l15_bank[8:0]) |
1004 ({9{ipc_v1_spu_hold}} & v1_spu_req[8:0]);
1005
1006gkt_ipc_ctl_msff_ctl_macro__width_9 dff_spu_req_v0
1007(
1008 .scan_in(dff_spu_req_v0_scanin),
1009 .scan_out(dff_spu_req_v0_scanout),
1010 .l1clk(l1clk),
1011 .din (v0_spu_req_in[8:0]),
1012 .dout (v0_spu_req[8:0]),
1013 .siclk(siclk),
1014 .soclk(soclk)
1015 );
1016gkt_ipc_ctl_msff_ctl_macro__width_9 dff_spu_req_v1
1017(
1018 .scan_in(dff_spu_req_v1_scanin),
1019 .scan_out(dff_spu_req_v1_scanout),
1020 .l1clk(l1clk),
1021 .din (v1_spu_req_in[8:0]),
1022 .dout (v1_spu_req[8:0]),
1023 .siclk(siclk),
1024 .soclk(soclk)
1025 );
1026
1027
1028gkt_ipc_ctl_msff_ctl_macro__width_1 dff_spu_v0
1029(
1030 .scan_in(dff_spu_v0_scanin),
1031 .scan_out(dff_spu_v0_scanout),
1032 .l1clk(l1clk),
1033 .din (v0_spu_in),
1034 .dout (v0_spu),
1035 .siclk(siclk),
1036 .soclk(soclk)
1037 );
1038gkt_ipc_ctl_msff_ctl_macro__width_1 dff_spu_v1
1039(
1040 .scan_in(dff_spu_v1_scanin),
1041 .scan_out(dff_spu_v1_scanout),
1042 .l1clk(l1clk),
1043 .din (v1_spu_in),
1044 .dout (v1_spu),
1045 .siclk(siclk),
1046 .soclk(soclk)
1047 );
1048
1049
1050////////////////////////////////////////////////////////
1051////////////////////////////////////////////////////////
1052// generate selects for mux feeding input flop
1053// 3 favor bits
1054// f_im selects between ifu and mmu
1055// f_ls selects between lsu and spu
1056// f_i selects between ifu/mmu and lsu/spu
1057
1058assign f_im_in = (((f_im & ~sel_ifu_l1) | sel_mmu_l1) | force_ifu) & ~force_mmu;
1059assign f_ls_in = (((f_ls & ~sel_lsu_l1) | sel_spu_l1) | force_lsu) & ~force_spu;
1060assign f_i_in = (((f_i & ~sel_ifu_mmu_l1) | sel_lsu_spu_l1) | force_ifu_mmu) & ~force_lsu_spu;
1061
1062//If a request from a unit A gets dropped, and no other unit has a valid request,
1063//(including unit A), then the dropped req will not be tried for 1 clk. i.e there
1064// will be a one cycle hole because the unit_v will not be set.
1065
1066assign ifu_v = v0_ifu_in | ipc_dropreg_valid[0];
1067assign mmu_v = v0_mmu_in | ipc_dropreg_valid[1];
1068assign lsu_v = v0_lsu_in | ipc_dropreg_valid[2];
1069assign spu_v = v0_spu_in | ipc_dropreg_valid[3];
1070
1071assign ipc_sel_ifu = (ifu_v&!mmu_v&!lsu_v&!spu_v&!lock_acc) |
1072 (f_im_in&ifu_v&!lsu_v&!spu_v&!lock_acc) |
1073 (f_i_in&ifu_v&!mmu_v&!lock_acc) |
1074 (f_i_in&f_im_in&ifu_v&!lock_acc);
1075
1076assign ipc_sel_mmu = (!ifu_v&mmu_v&!lsu_v&!spu_v&!lock_acc) |
1077 (!f_im_in&mmu_v&!lsu_v&!spu_v&!lock_acc) |
1078 (f_i_in&!ifu_v&mmu_v&!lock_acc) |
1079 (f_i_in&!f_im_in&mmu_v&!lock_acc);
1080
1081assign ipc_sel_lsu = (!ifu_v&!mmu_v&lsu_v&!spu_v) |
1082 (f_ls_in&!ifu_v&!mmu_v&lsu_v) |
1083 (!f_i_in&lsu_v&!spu_v) |
1084 (!f_i_in&f_ls_in&lsu_v) | (lsu_v&lock_acc);
1085
1086assign ipc_sel_spu = (!ifu_v&!mmu_v&!lsu_v&spu_v&!lock_acc) |
1087 (!f_ls_in&!ifu_v&!mmu_v&spu_v&!lock_acc) |
1088 (!f_i_in&!lsu_v&spu_v&!lock_acc) |
1089 (!f_i_in&!f_ls_in&spu_v&!lock_acc);
1090
1091// 0in bits_on -var {ipc_sel_ifu,ipc_sel_mmu,ipc_sel_lsu,ipc_sel_spu} -max 1
1092
1093assign ipc_sel_ifu_mmu = ipc_sel_ifu | ipc_sel_mmu;
1094assign ipc_sel_lsu_spu = ipc_sel_lsu | ipc_sel_spu;
1095
1096// set lock access when lsu selected and lock bit is set.
1097// it remains set until the next time lsu is selected with lock bit not set.
1098assign lock_acc_in = ((ipc_sel_lsu & v0_lsu_lock_in) | (lock_acc)) & ~(ipc_sel_lsu & ~v0_lsu_lock_in);
1099assign unit_sel_li[3:0] = {ipc_sel_spu,ipc_sel_lsu,ipc_sel_mmu,ipc_sel_ifu};
1100
1101
1102// pcxbuf is empty if pqm_empty and no request in flight
1103assign pcxbuf_empty[8:0] = pqm_empty[8:0] & ~op_req_l1[8:0];
1104
1105// kill the lsu request if it is atomic and the buffers are not empty in pcx
1106assign kill_lsu_atm_req[8:0] = ({9{v0_lsu_lock_in}} & v0_lsu_req_in[8:0] & ~pcxbuf_empty[8:0]);
1107assign kill_lsu_req = |(kill_lsu_atm_req[8:0]);
1108
1109
1110assign atm_req_li[8:0] = ({9{ipc_sel_lsu & v0_lsu_lock_in & ~(ipc_dropreg_valid[2] & ~ipc_unit_sel_l1[2])}} & v0_lsu_req_in[8:0] & pcxbuf_empty[8:0]);
1111
1112// 0in bits_on -var {sel_nrepeat_drop_li, sel_nrepeat_ndrop_li, (sel_repeat_li & req_dropped), (sel_repeat_li & ~req_dropped)} -max 1
1113
1114assign sel_repeat_li = unit_sel_li[0] & ipc_unit_sel_l1[0] |
1115 unit_sel_li[1] & ipc_unit_sel_l1[1] |
1116 unit_sel_li[2] & ipc_unit_sel_l1[2] |
1117 unit_sel_li[3] & ipc_unit_sel_l1[3];
1118
1119//assign sel_repeat_drop_li = sel_repeat_li & req_dropped;
1120//assign sel_repeat_ndrop_li = sel_repeat_li & ~req_dropped;
1121
1122
1123assign sel_nrepeat_drop_li = unit_sel_li[0] & ~ipc_unit_sel_l1[0] & ipc_dropreg_valid[0] |
1124 unit_sel_li[1] & ~ipc_unit_sel_l1[1] & ipc_dropreg_valid[1] |
1125 unit_sel_li[2] & ~ipc_unit_sel_l1[2] & ipc_dropreg_valid[2] |
1126 unit_sel_li[3] & ~ipc_unit_sel_l1[3] & ipc_dropreg_valid[3];
1127
1128assign sel_nrepeat_ndrop_li = unit_sel_li[0] & ~ipc_unit_sel_l1[0] & ~ipc_dropreg_valid[0] |
1129 unit_sel_li[1] & ~ipc_unit_sel_l1[1] & ~ipc_dropreg_valid[1] |
1130 unit_sel_li[2] & ~ipc_unit_sel_l1[2] & ~ipc_dropreg_valid[2] |
1131 unit_sel_li[3] & ~ipc_unit_sel_l1[3] & ~ipc_dropreg_valid[3];
1132
1133assign sel_nrepeat_drop_unused = sel_nrepeat_drop_li;
1134assign sel_nrepeat_ndrop_unused = sel_nrepeat_ndrop_li;
1135
1136
1137// fold the select into the request so that the mux is simplified
1138
1139assign req_nrepeat_drop_li[8:0] = ({9{unit_sel_li[0] & ~ipc_unit_sel_l1[0] & ipc_dropreg_valid[0]}} & dropreg0[8:0]) |
1140 ({9{unit_sel_li[1] & ~ipc_unit_sel_l1[1] & ipc_dropreg_valid[1]}} & dropreg1[8:0]) |
1141 ({9{unit_sel_li[2] & ~ipc_unit_sel_l1[2] & ipc_dropreg_valid[2]}} & dropreg2[8:0]) |
1142 ({9{unit_sel_li[3] & ~ipc_unit_sel_l1[3] & ipc_dropreg_valid[3]}} & dropreg3[8:0]);
1143
1144assign req_nrepeat_ndrop_li[8:0] = ({9{unit_sel_li[0] & ~ipc_unit_sel_l1[0] & ~ipc_dropreg_valid[0]}} & v0_ifu_req_in[8:0]) |
1145 ({9{unit_sel_li[1] & ~ipc_unit_sel_l1[1] & ~ipc_dropreg_valid[1]}} & v0_mmu_req_in[8:0]) |
1146 ({9{unit_sel_li[2] & ~ipc_unit_sel_l1[2] & ~ipc_dropreg_valid[2]}} & v0_lsu_req_in[8:0] & ~kill_lsu_atm_req[8:0] & ~atm_pq[8:0]) |
1147 ({9{unit_sel_li[3] & ~ipc_unit_sel_l1[3] & ~ipc_dropreg_valid[3]}} & v0_spu_req_in[8:0]);
1148
1149
1150// this still needs to be qualified by req_dropped in next cycle
1151assign req_repeat_drop_li[8:0] = ({9{sel_repeat_li}} & op_req_l1[8:0]);
1152
1153// this still needs to be qualified by req_dropped in next cycle
1154assign req_repeat_ndrop_li[8:0] = ({9{unit_sel_li[0] & ipc_unit_sel_l1[0]}} & v0_ifu_req_in[8:0]) |
1155 ({9{unit_sel_li[1] & ipc_unit_sel_l1[1]}} & v0_mmu_req_in[8:0]) |
1156 ({9{unit_sel_li[2] & ipc_unit_sel_l1[2]}} & v0_lsu_req_in[8:0] & ~kill_lsu_atm_req[8:0] & ~atm_pq[8:0]) |
1157 ({9{unit_sel_li[3] & ipc_unit_sel_l1[3]}} & v0_spu_req_in[8:0]);
1158
1159
1160// optimize generation of grant
1161// l15_ifu_grant = sel_ifu_l1 & v0_ifu & ~ipc_dropreg_valid[0]
1162// l15_lsu_grant = sel_lsu_l1 & v0_lsu & ~ipc_dropreg_valid[2] & ~kill_lsu_req_l1;
1163
1164assign ifu_grant_li = ipc_sel_ifu & v0_ifu_in & ~(ipc_dropreg_valid[0] & ~ipc_unit_sel_l1[0]);
1165assign mmu_grant_li = ipc_sel_mmu & v0_mmu_in & ~(ipc_dropreg_valid[1] & ~ipc_unit_sel_l1[1]);
1166assign lsu_grant_li = ipc_sel_lsu & v0_lsu_in & ~kill_lsu_req & ~(ipc_dropreg_valid[2] & ~ipc_unit_sel_l1[2]);
1167assign spu_grant_li = ipc_sel_spu & v0_spu_in & ~(ipc_dropreg_valid[3] & ~ipc_unit_sel_l1[3]);
1168
1169
1170gkt_ipc_ctl_msff_ctl_macro__width_1 lock_reg
1171(
1172 .scan_in(lock_reg_scanin),
1173 .scan_out(lock_reg_scanout),
1174 .l1clk (l1clk),
1175 .din (lock_acc_in),
1176 .dout (lock_acc),
1177 .siclk(siclk),
1178 .soclk(soclk)
1179 );
1180
1181gkt_ipc_ctl_msff_ctl_macro__width_1 favori_reg
1182(
1183 .scan_in(favori_reg_scanin),
1184 .scan_out(favori_reg_scanout),
1185 .l1clk (l1clk),
1186 .din (f_i_in),
1187 .dout (f_i),
1188 .siclk(siclk),
1189 .soclk(soclk)
1190);
1191
1192gkt_ipc_ctl_msff_ctl_macro__width_1 favorim_reg
1193(
1194 .scan_in(favorim_reg_scanin),
1195 .scan_out(favorim_reg_scanout),
1196 .l1clk (l1clk),
1197 .din (f_im_in),
1198 .dout (f_im),
1199 .siclk(siclk),
1200 .soclk(soclk)
1201 );
1202
1203gkt_ipc_ctl_msff_ctl_macro__width_1 favorls_reg
1204(
1205 .scan_in(favorls_reg_scanin),
1206 .scan_out(favorls_reg_scanout),
1207 .l1clk (l1clk),
1208 .din (f_ls_in),
1209 .dout (f_ls),
1210 .siclk(siclk),
1211 .soclk(soclk)
1212 );
1213
1214gkt_ipc_ctl_msff_ctl_macro__width_6 sel_reg
1215(
1216 .scan_in(sel_reg_scanin),
1217 .scan_out(sel_reg_scanout),
1218 .l1clk (l1clk),
1219 .din ({ipc_sel_ifu,ipc_sel_mmu,ipc_sel_lsu,ipc_sel_spu,ipc_sel_ifu_mmu, ipc_sel_lsu_spu}),
1220 .dout ({sel_ifu_l1,sel_mmu_l1,sel_lsu_l1,sel_spu_l1,sel_ifu_mmu_l1,sel_lsu_spu_l1}),
1221 .siclk(siclk),
1222 .soclk(soclk)
1223 );
1224
1225gkt_ipc_ctl_msff_ctl_macro__width_4 grant_reg
1226(
1227 .scan_in(grant_reg_scanin),
1228 .scan_out(grant_reg_scanout),
1229 .l1clk (l1clk),
1230 .din ({ifu_grant_li,mmu_grant_li,lsu_grant_li,spu_grant_li}),
1231 .dout ({ifu_grant_l1,mmu_grant_l1,lsu_grant_l1,spu_grant_l1}),
1232 .siclk(siclk),
1233 .soclk(soclk)
1234 );
1235
1236gkt_ipc_ctl_msff_ctl_macro__width_9 l1_atm_req_reg
1237(
1238 .scan_in(l1_atm_req_reg_scanin),
1239 .scan_out(l1_atm_req_reg_scanout),
1240 .l1clk (l1clk),
1241 .din (atm_req_li[8:0]),
1242 .dout (ipc_atm_l1[8:0]),
1243 .siclk(siclk),
1244 .soclk(soclk)
1245 );
1246
1247
1248gkt_ipc_ctl_msff_ctl_macro__width_9 req_nrepeat_drop_reg
1249(
1250 .scan_in(req_nrepeat_drop_reg_scanin),
1251 .scan_out(req_nrepeat_drop_reg_scanout),
1252 .l1clk (l1clk),
1253 .din (req_nrepeat_drop_li[8:0]),
1254 .dout (req_nrepeat_drop_l1[8:0]),
1255 .siclk(siclk),
1256 .soclk(soclk)
1257 );
1258
1259gkt_ipc_ctl_msff_ctl_macro__width_9 req_nrepeat_ndrop_reg
1260(
1261 .scan_in(req_nrepeat_ndrop_reg_scanin),
1262 .scan_out(req_nrepeat_ndrop_reg_scanout),
1263 .l1clk (l1clk),
1264 .din (req_nrepeat_ndrop_li[8:0]),
1265 .dout (req_nrepeat_ndrop_l1[8:0]),
1266 .siclk(siclk),
1267 .soclk(soclk)
1268 );
1269
1270gkt_ipc_ctl_msff_ctl_macro__width_9 req_repeat_drop_reg
1271(
1272 .scan_in(req_repeat_drop_reg_scanin),
1273 .scan_out(req_repeat_drop_reg_scanout),
1274 .l1clk (l1clk),
1275 .din (req_repeat_drop_li[8:0]),
1276 .dout (ipc_req_repeat_drop_l1[8:0]),
1277 .siclk(siclk),
1278 .soclk(soclk)
1279 );
1280
1281gkt_ipc_ctl_msff_ctl_macro__width_9 req_repeat_ndrop_reg
1282(
1283 .scan_in(req_repeat_ndrop_reg_scanin),
1284 .scan_out(req_repeat_ndrop_reg_scanout),
1285 .l1clk (l1clk),
1286 .din (req_repeat_ndrop_li[8:0]),
1287 .dout (ipc_req_repeat_ndrop_l1[8:0]),
1288 .siclk(siclk),
1289 .soclk(soclk)
1290 );
1291
1292
1293assign l15_ifu_grant = ifu_grant_l1 & ifu_ndropped_pa;
1294assign l15_mmu_grant = mmu_grant_l1 & mmu_ndropped_pa;
1295assign l15_lsu_grant = lsu_grant_l1 & lsu_ndropped_pa;
1296assign l15_spu_grant = spu_grant_l1 & spu_ndropped_pa;
1297
1298
1299assign ifu_shift = l15_ifu_grant;
1300assign mmu_shift = l15_mmu_grant;
1301assign lsu_shift = l15_lsu_grant;
1302assign spu_shift = l15_spu_grant;
1303
1304// do not use sel_lsu_l1 &~kill_lsu_req_l1 over here. If there are any lsu requests
1305// in the drop registers we want them to empty out.
1306
1307assign ipc_unit_sel_l1[3:0] = {sel_spu_l1,sel_lsu_l1,sel_mmu_l1,sel_ifu_l1};
1308
1309
1310
1311/////////////////////////////////////////////////////////////////////////
1312// PQ cycle
1313////////////////////////////////////////////////////////////////////////
1314
1315////////////////////////////////////////////////////////////////////////////////
1316// requests are sent speculatively to PCX. They can get dropped by PCX if it does
1317// not have room.
1318assign req_dropped = (|(pqm_req_drop[8:0]));
1319assign req_dropped_ = ~(|(pqm_req_drop[8:0]));
1320
1321
1322
1323// atomic request should never be dropped. They are sent only when there is room for
1324// two entries.
1325// 0in bits_on -var {req_dropped, (|atm_pq[8:0])} -max 1
1326
1327// dropped requests are saved off in drop registers.
1328// They are cleared when the corresponding unit gets sent out and not dropped.
1329
1330assign ipc_dropreg_valid[0] = (req_dropped_lat & ipc_unit_sel_pa[0]) |
1331 (ipc_dropreg_valid_pa[0] & ~(ipc_unit_sel_pa[0] & req_dropped_lat_));
1332
1333assign ipc_dropreg_valid[1] = (req_dropped_lat & ipc_unit_sel_pa[1]) |
1334 (ipc_dropreg_valid_pa[1] & ~(ipc_unit_sel_pa[1] & req_dropped_lat_));
1335
1336assign ipc_dropreg_valid[2] = (req_dropped_lat & ipc_unit_sel_pa[2]) |
1337 (ipc_dropreg_valid_pa[2] & ~(ipc_unit_sel_pa[2] & req_dropped_lat_));
1338
1339assign ipc_dropreg_valid[3] = (req_dropped_lat & ipc_unit_sel_pa[3]) |
1340 (ipc_dropreg_valid_pa[3] & ~(ipc_unit_sel_pa[3] & req_dropped_lat_));
1341
1342
1343// enables for writing into drop regs
1344// write into drop regs when they are not valid. If valid then we need to hold their values, until
1345// the req is sent out and not dropped
1346
1347assign ipc_dropreg_wen[3:0] = ~ipc_dropreg_valid[3:0];
1348
1349assign dropreg0_in[8:0] = ({9{ipc_unit_sel_l1[0]}} & op_req_l1[8:0]) |
1350 ({9{~ipc_unit_sel_l1[0]}} & dropreg0[8:0]);
1351
1352assign dropreg1_in[8:0] = ({9{ipc_unit_sel_l1[1]}} & op_req_l1[8:0]) |
1353 ({9{~ipc_unit_sel_l1[1]}} & dropreg1[8:0]);
1354
1355assign dropreg2_in[8:0] = ({9{ipc_unit_sel_l1[2]}} & op_req_l1[8:0]) |
1356 ({9{~ipc_unit_sel_l1[2]}} & dropreg2[8:0]);
1357
1358assign dropreg3_in[8:0] = ({9{ipc_unit_sel_l1[3]}} & op_req_l1[8:0]) |
1359 ({9{~ipc_unit_sel_l1[3]}} & dropreg3[8:0]);
1360
1361// generate the request to PCX. This get latched in PCX before being used.
1362
1363
1364//assign op_req_l1[8:0] = ({9{sel_repeat_drop_l1}} & req_pa[8:0]) |
1365// ({9{sel_repeat_ndrop_l1}} & req_l1[8:0]) |
1366// ({9{sel_nrepeat_drop_l1}} & req_nrepeat_drop_l1[8:0]) |
1367// ({9{sel_nrepeat_ndrop_l1}} & req_nrepeat_ndrop_l1[8:0]);
1368
1369assign op_req_l1[8:0] = ({9{req_dropped_lat}} & ipc_req_repeat_drop_l1[8:0]) |
1370 ({9{req_dropped_lat_}} & ipc_req_repeat_ndrop_l1[8:0]) |
1371 (req_nrepeat_drop_l1[8:0]) |
1372 (req_nrepeat_ndrop_l1[8:0]);
1373
1374// for timing reasons, generate an early version of op_req_l1 in li stage, send to dp where it is latched and
1375// sent to ccx.
1376assign ipc_op_req_li[8:0] = ({9{req_dropped}} & req_repeat_drop_li[8:0]) |
1377 ({9{req_dropped_}} & req_repeat_ndrop_li[8:0]) |
1378 (req_nrepeat_drop_li[8:0]) |
1379 (req_nrepeat_ndrop_li[8:0]);
1380
1381assign atm_pq[8:0] = ipc_atm_l1[8:0] & {9{~(ipc_unit_sel_pa[2] & req_dropped_lat)}};
1382
1383// for timing reasons, generate an early version of atm_pq in li stage, send to dp where it is latched and
1384// sent to ccx.
1385
1386assign ipc_atm_req_li[8:0] = atm_req_li[8:0] & {9{~(ipc_unit_sel_l1[2] & req_dropped)}};
1387
1388
1389// on an atomic request, the second packet is sent out without req_pq.
1390// l15_pqm_ctl still needs to know about this request.
1391assign req_pq[8:0] = op_req_l1[8:0] | atm_pa[8:0];
1392
1393
1394// enable for sending data out in PA, for power saving
1395assign ipc_pq_valid = |(req_pq[8:0]);
1396assign ipc_pq_clken = ipc_pq_valid | ~gkt_pmen;
1397
1398
1399// determine requests being dropped in l1.
1400
1401assign ifu_ndropped_l1 = ~(ipc_unit_sel_l1[0] & req_dropped);
1402assign mmu_ndropped_l1 = ~(ipc_unit_sel_l1[1] & req_dropped);
1403assign lsu_ndropped_l1 = ~(ipc_unit_sel_l1[2] & req_dropped);
1404assign spu_ndropped_l1 = ~(ipc_unit_sel_l1[3] & req_dropped);
1405
1406
1407// drive selects to ipd datapath
1408
1409assign ipc_sel_ndrop_ifu_l1 = ipc_unit_sel_l1[0] & ~ipc_dropreg_valid[0];
1410assign ipc_sel_ndrop_mmu_l1 = ipc_unit_sel_l1[1] & ~ipc_dropreg_valid[1];
1411assign ipc_sel_ndrop_lsu_l1 = ipc_unit_sel_l1[2] & ~ipc_dropreg_valid[2];
1412assign ipc_sel_ndrop_spu_l1 = ipc_unit_sel_l1[3] & ~ipc_dropreg_valid[3];
1413assign ipc_sel_drop_ifu_l1 = ipc_unit_sel_l1[0] & ipc_dropreg_valid[0];
1414assign ipc_sel_drop_mmu_l1 = ipc_unit_sel_l1[1] & ipc_dropreg_valid[1];
1415assign ipc_sel_drop_lsu_l1 = ipc_unit_sel_l1[2] & ipc_dropreg_valid[2];
1416assign ipc_sel_drop_spu_l1 = ipc_unit_sel_l1[3] & ipc_dropreg_valid[3];
1417
1418///////////////////////////////////////////////////////////////////////
1419// PA CYCLE
1420///////////////////////////////////////////////////////////////////////
1421// count number of dropped requests for each unit
1422
1423// increment the counter on every dropped request,
1424// clear the counter when the requests succeeds (not dropped),
1425// hold the counter when not incrementing or not clearing
1426assign ifu_dropped_pa = (ipc_unit_sel_pa[0] & req_dropped_lat);
1427assign mmu_dropped_pa = (ipc_unit_sel_pa[1] & req_dropped_lat);
1428assign lsu_dropped_pa = (ipc_unit_sel_pa[2] & req_dropped_lat);
1429assign spu_dropped_pa = (ipc_unit_sel_pa[3] & req_dropped_lat);
1430
1431assign ifu_success_pa = (ipc_unit_sel_pa[0] & ~req_dropped_lat);
1432assign mmu_success_pa = (ipc_unit_sel_pa[1] & ~req_dropped_lat);
1433assign lsu_success_pa = (ipc_unit_sel_pa[2] & ~req_dropped_lat);
1434assign spu_success_pa = (ipc_unit_sel_pa[3] & ~req_dropped_lat);
1435
1436
1437assign inc_ifu = ifu_dropped_pa & ~max_count_reached;
1438assign clear_ifu = ifu_success_pa;
1439assign hold_ifu = ~inc_ifu & ~clear_ifu;
1440
1441
1442assign ifu_drop_cnt[2:0] = ({3{inc_ifu}} & (ifu_drop_cnt_lat[2:0] + 3'b001)) |
1443 ({3{clear_ifu}} & 3'b000) |
1444 ({3{hold_ifu}} & ifu_drop_cnt_lat[2:0]);
1445
1446assign inc_mmu = mmu_dropped_pa & ~max_count_reached;
1447assign clear_mmu = mmu_success_pa;
1448assign hold_mmu = ~inc_mmu & ~clear_mmu;
1449
1450
1451assign mmu_drop_cnt[2:0] = ({3{inc_mmu}} & (mmu_drop_cnt_lat[2:0] + 3'b001)) |
1452 ({3{clear_mmu}} & 3'b000) |
1453 ({3{hold_mmu}} & mmu_drop_cnt_lat[2:0]);
1454
1455assign inc_lsu = lsu_dropped_pa & ~max_count_reached;
1456assign clear_lsu = lsu_success_pa;
1457assign hold_lsu = ~inc_lsu & ~clear_lsu;
1458
1459
1460assign lsu_drop_cnt[2:0] = ({3{inc_lsu}} & (lsu_drop_cnt_lat[2:0] + 3'b001)) |
1461 ({3{clear_lsu}} & 3'b000) |
1462 ({3{hold_lsu}} & lsu_drop_cnt_lat[2:0]);
1463
1464assign inc_spu = spu_dropped_pa & ~max_count_reached;
1465assign clear_spu = spu_success_pa;
1466assign hold_spu = ~inc_spu & ~clear_spu;
1467
1468
1469assign spu_drop_cnt[2:0] = ({3{inc_spu}} & (spu_drop_cnt_lat[2:0] + 3'b001)) |
1470 ({3{clear_spu}} & 3'b000) |
1471 ({3{hold_spu}} & spu_drop_cnt_lat[2:0]);
1472
1473
1474assign max_count_reached_in = (ifu_drop_cnt[2:0] == 3'b111) |
1475 (mmu_drop_cnt[2:0] == 3'b111) |
1476 (lsu_drop_cnt[2:0] == 3'b111) |
1477 (spu_drop_cnt[2:0] == 3'b111);
1478
1479
1480assign force_ifu_in = ifu_drop_cnt[2:0] == 3'b111;
1481assign force_mmu_in = mmu_drop_cnt[2:0] == 3'b111;
1482assign force_lsu_in = lsu_drop_cnt[2:0] == 3'b111;
1483assign force_spu_in = spu_drop_cnt[2:0] == 3'b111;
1484
1485assign force_ifu_mmu_in = force_ifu_in | force_mmu_in;
1486assign force_lsu_spu_in = force_lsu_in | force_spu_in;
1487
1488
1489
1490gkt_ipc_ctl_msff_ctl_macro__width_13 drop_cnt
1491 (
1492 .scan_in(drop_cnt_scanin),
1493 .scan_out(drop_cnt_scanout),
1494 .din ({max_count_reached_in, ifu_drop_cnt[2:0],mmu_drop_cnt[2:0],lsu_drop_cnt[2:0],spu_drop_cnt[2:0]}),
1495 .dout ({max_count_reached, ifu_drop_cnt_lat[2:0], mmu_drop_cnt_lat[2:0], lsu_drop_cnt_lat[2:0], spu_drop_cnt_lat[2:0]}),
1496 .l1clk (l1clk),
1497 .siclk(siclk),
1498 .soclk(soclk)
1499);
1500
1501gkt_ipc_ctl_msff_ctl_macro__width_6 force_req
1502 (
1503 .scan_in(force_req_scanin),
1504 .scan_out(force_req_scanout),
1505 .din ({force_ifu_in, force_mmu_in, force_lsu_in, force_spu_in, force_ifu_mmu_in, force_lsu_spu_in}),
1506 .dout ({force_ifu, force_mmu, force_lsu, force_spu, force_ifu_mmu, force_lsu_spu}),
1507 .l1clk (l1clk),
1508 .siclk(siclk),
1509 .soclk(soclk)
1510);
1511
1512// At any time, only one unit can reach max drop count, and so only one unit can be forced.
1513// 0in bits_on -var {force_ifu, force_mmu, force_lsu, force_spu} -max 1
1514
1515
1516
1517
1518
1519///////////////////////////////////////////////////////////////////////
1520///////////////////////////////////////////////////////////////////////
1521// PERFORMANCE MONITOR COUNTER SIGNALS
1522// {8 - valid; 7:5 - tid; 4:0 - { mmu_pkt, dstore_pkt, ifetch_pkt, dload_pkt, sstore_pkt, sload_pkt}
1523/////////////////////////////////////////////////////////////////////
1524// decode the pcx packet
1525assign ifetch_pkt = ipd_optype[7];
1526assign dload_pkt = ~ipd_optype[7] & ~ipd_optype[6] & ~ipd_optype[5] & ~ipd_optype[4] & ~ipd_optype[3];
1527assign dstore_pkt = ~ipd_optype[7] & ~ipd_optype[6] & ~ipd_optype[5] & ~ipd_optype[4] & ipd_optype[3];
1528assign sload_pkt = ~ipd_optype[7] & ~ipd_optype[6] & ipd_optype[5] & ~ipd_optype[4] & ~ipd_optype[3];
1529assign sstore_pkt = ~ipd_optype[7] & ~ipd_optype[6] & ipd_optype[5] & ~ipd_optype[4] & ipd_optype[3];
1530assign mmu_pkt = ipd_optype[6] & ~ipd_optype[3];
1531assign ma_pkt = ipd_optype[8];
1532
1533
1534
1535// encode the packet type into 3 bits
1536
1537assign pcx_pkt[2:0] = ({3{dload_pkt}} & 3'b000) |
1538 ({3{dstore_pkt}} & 3'b001) |
1539 ({3{sload_pkt & ~ma_pkt}} & 3'b010) |
1540 ({3{sstore_pkt & ~ma_pkt}} & 3'b011) |
1541 ({3{mmu_pkt}} & 3'b100) |
1542 ({3{ifetch_pkt}} & 3'b101) |
1543 ({3{sload_pkt & ma_pkt}} & 3'b110) |
1544 ({3{sstore_pkt & ma_pkt}} & 3'b111);
1545
1546
1547
1548
1549assign tid_pkt[2:0] = ipd_optype[2:0];
1550assign valid_pkt = (|req_pa[8:0]) & ~req_dropped_lat;
1551assign xbar_optype[6:0] = {valid_pkt, tid_pkt[2:0], pcx_pkt[2:0]};
1552
1553
1554
1555
1556gkt_ipc_ctl_msff_ctl_macro__width_7 dff_xbar_type
1557 (
1558 .scan_in(dff_xbar_type_scanin),
1559 .scan_out(dff_xbar_type_scanout),
1560 .din (xbar_optype[6:0]),
1561 .dout (l15_pmu_xbar_optype[6:0]),
1562 .l1clk (l1clk),
1563 .siclk(siclk),
1564 .soclk(soclk)
1565);
1566
1567gkt_ipc_ctl_msff_ctl_macro__width_4 dff_unit_sel_pa_type
1568 (
1569 .scan_in(dff_unit_sel_pa_type_scanin),
1570 .scan_out(dff_unit_sel_pa_type_scanout),
1571 .din (ipc_unit_sel_l1[3:0]),
1572 .dout (ipc_unit_sel_pa[3:0]),
1573 .l1clk (l1clk),
1574 .siclk(siclk),
1575 .soclk(soclk)
1576);
1577
1578gkt_ipc_ctl_msff_ctl_macro__width_4 dff_unit_ndrop_pa
1579 (
1580 .scan_in(dff_unit_ndrop_pa_scanin),
1581 .scan_out(dff_unit_ndrop_pa_scanout),
1582 .din ({ifu_ndropped_l1, mmu_ndropped_l1, lsu_ndropped_l1, spu_ndropped_l1}),
1583 .dout ({ifu_ndropped_pa, mmu_ndropped_pa, lsu_ndropped_pa, spu_ndropped_pa}),
1584 .l1clk (l1clk),
1585 .siclk(siclk),
1586 .soclk(soclk)
1587);
1588
1589
1590gkt_ipc_ctl_msff_ctl_macro__width_1 dff_req_drop_lat
1591 (
1592 .scan_in(dff_req_drop_lat_scanin),
1593 .scan_out(dff_req_drop_lat_scanout),
1594 .din (req_dropped),
1595 .dout (req_dropped_lat),
1596 .l1clk (l1clk),
1597 .siclk(siclk),
1598 .soclk(soclk)
1599);
1600
1601
1602gkt_ipc_ctl_msff_ctl_macro__width_1 dff_req_drop_latx
1603 (
1604 .scan_in(dff_req_drop_latx_scanin),
1605 .scan_out(dff_req_drop_latx_scanout),
1606 .din (req_dropped_),
1607 .dout (req_dropped_lat_),
1608 .l1clk (l1clk),
1609 .siclk(siclk),
1610 .soclk(soclk)
1611);
1612
1613gkt_ipc_ctl_msff_ctl_macro__width_4 dff_dropreg_valid
1614 (
1615 .scan_in(dff_dropreg_valid_scanin),
1616 .scan_out(dff_dropreg_valid_scanout),
1617 .din (ipc_dropreg_valid[3:0]),
1618 .dout (ipc_dropreg_valid_pa[3:0]),
1619 .l1clk (l1clk),
1620 .siclk(siclk),
1621 .soclk(soclk)
1622);
1623
1624gkt_ipc_ctl_msff_ctl_macro__width_9 dff_dropreg0
1625 (
1626 .scan_in(dff_dropreg0_scanin),
1627 .scan_out(dff_dropreg0_scanout),
1628 .din (dropreg0_in[8:0]),
1629 .dout (dropreg0[8:0]),
1630 .l1clk (l1clk),
1631 .siclk(siclk),
1632 .soclk(soclk)
1633);
1634
1635gkt_ipc_ctl_msff_ctl_macro__width_9 dff_dropreg1
1636 (
1637 .scan_in(dff_dropreg1_scanin),
1638 .scan_out(dff_dropreg1_scanout),
1639 .din (dropreg1_in[8:0]),
1640 .dout (dropreg1[8:0]),
1641 .l1clk (l1clk),
1642 .siclk(siclk),
1643 .soclk(soclk)
1644);
1645gkt_ipc_ctl_msff_ctl_macro__width_9 dff_dropreg2
1646 (
1647 .scan_in(dff_dropreg2_scanin),
1648 .scan_out(dff_dropreg2_scanout),
1649 .din (dropreg2_in[8:0]),
1650 .dout (dropreg2[8:0]),
1651 .l1clk (l1clk),
1652 .siclk(siclk),
1653 .soclk(soclk)
1654);
1655gkt_ipc_ctl_msff_ctl_macro__width_9 dff_dropreg3
1656 (
1657 .scan_in(dff_dropreg3_scanin),
1658 .scan_out(dff_dropreg3_scanout),
1659 .din (dropreg3_in[8:0]),
1660 .dout (dropreg3[8:0]),
1661 .l1clk (l1clk),
1662 .siclk(siclk),
1663 .soclk(soclk)
1664);
1665
1666gkt_ipc_ctl_msff_ctl_macro__width_9 dff_req_pa
1667 (
1668 .scan_in(dff_req_pa_scanin),
1669 .scan_out(dff_req_pa_scanout),
1670 .din (op_req_l1[8:0]),
1671 .dout (req_pa[8:0]),
1672 .l1clk (l1clk),
1673 .siclk(siclk),
1674 .soclk(soclk)
1675);
1676
1677gkt_ipc_ctl_msff_ctl_macro__width_9 dff_atm_pa
1678 (
1679 .scan_in(dff_atm_pa_scanin),
1680 .scan_out(dff_atm_pa_scanout),
1681 .din (atm_pq[8:0]),
1682 .dout (atm_pa[8:0]),
1683 .l1clk (l1clk),
1684 .siclk(siclk),
1685 .soclk(soclk)
1686);
1687
1688
1689assign pcx_grant_lb[8:0] = {9{~lbist_run}} & pcx_grant[8:0];
1690
1691
1692///*
1693//gkt_pqm_ctl AUTO_TEMPLATE
1694// (
1695// // Outputs
1696// .scan_in(AUTO_TEMPLATE_scanin),
1697// .scan_out(AUTO_TEMPLATE_scanout),
1698// .pqm_req_drop (pqm_req_drop[@]),
1699// .pqm_empty (pqm_empty[@]),
1700// // Inputs
1701// .spc_pcx_req_pq (req_pq[@]),
1702// .pcx_grant (pcx_grant_lb[@]));
1703//*/
1704
1705gkt_pqm_ctl pqm0 (/*AUTOINST*/
1706 // Outputs
1707 .pqm_req_drop (pqm_req_drop[0]), // Templated
1708 .pqm_empty (pqm_empty[0]), // Templated
1709 // Inputs
1710 .scan_in(pqm0_scanin),
1711 .scan_out(pqm0_scanout),
1712 .l1clk (l1clk),
1713 .spc_pcx_req_pq (req_pq[0]), // Templated
1714 .pcx_grant (pcx_grant_lb[0]),
1715 .spc_aclk(spc_aclk),
1716 .spc_bclk(spc_bclk)); // Templated
1717
1718gkt_pqm_ctl pqm1 (/*AUTOINST*/
1719 // Outputs
1720 .pqm_req_drop (pqm_req_drop[1]), // Templated
1721 .pqm_empty (pqm_empty[1]), // Templated
1722 // Inputs
1723 .scan_in(pqm1_scanin),
1724 .scan_out(pqm1_scanout),
1725 .l1clk (l1clk),
1726 .spc_pcx_req_pq (req_pq[1]), // Templated
1727 .pcx_grant (pcx_grant_lb[1]),
1728 .spc_aclk(spc_aclk),
1729 .spc_bclk(spc_bclk)); // Templated
1730
1731gkt_pqm_ctl pqm2 (/*AUTOINST*/
1732 // Outputs
1733 .pqm_req_drop (pqm_req_drop[2]), // Templated
1734 .pqm_empty (pqm_empty[2]), // Templated
1735 // Inputs
1736 .scan_in(pqm2_scanin),
1737 .scan_out(pqm2_scanout),
1738 .l1clk (l1clk),
1739 .spc_pcx_req_pq (req_pq[2]), // Templated
1740 .pcx_grant (pcx_grant_lb[2]),
1741 .spc_aclk(spc_aclk),
1742 .spc_bclk(spc_bclk)); // Templated
1743
1744gkt_pqm_ctl pqm3 (/*AUTOINST*/
1745 // Outputs
1746 .pqm_req_drop (pqm_req_drop[3]), // Templated
1747 .pqm_empty (pqm_empty[3]), // Templated
1748 // Inputs
1749 .scan_in(pqm3_scanin),
1750 .scan_out(pqm3_scanout),
1751 .l1clk (l1clk),
1752 .spc_pcx_req_pq (req_pq[3]), // Templated
1753 .pcx_grant (pcx_grant_lb[3]),
1754 .spc_aclk(spc_aclk),
1755 .spc_bclk(spc_bclk)); // Templated
1756
1757gkt_pqm_ctl pqm4 (/*AUTOINST*/
1758 // Outputs
1759 .pqm_req_drop (pqm_req_drop[4]), // Templated
1760 .pqm_empty (pqm_empty[4]), // Templated
1761 // Inputs
1762 .scan_in(pqm4_scanin),
1763 .scan_out(pqm4_scanout),
1764 .l1clk (l1clk),
1765 .spc_pcx_req_pq (req_pq[4]), // Templated
1766 .pcx_grant (pcx_grant_lb[4]),
1767 .spc_aclk(spc_aclk),
1768 .spc_bclk(spc_bclk)); // Templated
1769
1770gkt_pqm_ctl pqm5 (/*AUTOINST*/
1771 // Outputs
1772 .pqm_req_drop (pqm_req_drop[5]), // Templated
1773 .pqm_empty (pqm_empty[5]), // Templated
1774 // Inputs
1775 .scan_in(pqm5_scanin),
1776 .scan_out(pqm5_scanout),
1777 .l1clk (l1clk),
1778 .spc_pcx_req_pq (req_pq[5]), // Templated
1779 .pcx_grant (pcx_grant_lb[5]),
1780 .spc_aclk(spc_aclk),
1781 .spc_bclk(spc_bclk)); // Templated
1782
1783gkt_pqm_ctl pqm6 (/*AUTOINST*/
1784 // Outputs
1785 .pqm_req_drop (pqm_req_drop[6]), // Templated
1786 .pqm_empty (pqm_empty[6]), // Templated
1787 // Inputs
1788 .scan_in(pqm6_scanin),
1789 .scan_out(pqm6_scanout),
1790 .l1clk (l1clk),
1791 .spc_pcx_req_pq (req_pq[6]), // Templated
1792 .pcx_grant (pcx_grant_lb[6]),
1793 .spc_aclk(spc_aclk),
1794 .spc_bclk(spc_bclk)); // Templated
1795
1796gkt_pqm_ctl pqm7 (/*AUTOINST*/
1797 // Outputs
1798 .pqm_req_drop (pqm_req_drop[7]), // Templated
1799 .pqm_empty (pqm_empty[7]), // Templated
1800 // Inputs
1801 .scan_in(pqm7_scanin),
1802 .scan_out(pqm7_scanout),
1803 .l1clk (l1clk),
1804 .spc_pcx_req_pq (req_pq[7]), // Templated
1805 .pcx_grant (pcx_grant_lb[7]),
1806 .spc_aclk(spc_aclk),
1807 .spc_bclk(spc_bclk)); // Templated
1808
1809gkt_pqm_ctl pqm8 (/*AUTOINST*/
1810 // Outputs
1811 .pqm_req_drop (pqm_req_drop[8]), // Templated
1812 .pqm_empty (pqm_empty[8]), // Templated
1813 // Inputs
1814 .scan_in(pqm8_scanin),
1815 .scan_out(pqm8_scanout),
1816 .l1clk (l1clk),
1817 .spc_pcx_req_pq (req_pq[8]), // Templated
1818 .pcx_grant (pcx_grant_lb[8]),
1819 .spc_aclk(spc_aclk),
1820 .spc_bclk(spc_bclk)); // Templated
1821
1822
1823////////////////////////////////////////////////////////
1824// SPARE CELLS
1825////////////////////////////////////////////////////////
1826gkt_ipc_ctl_spare_ctl_macro__num_5 spares (
1827 .scan_in(spares_scanin),
1828 .scan_out(spares_scanout),
1829 .l1clk (l1clk),
1830 .siclk(siclk),
1831 .soclk(soclk)
1832);
1833////////////////////////////////////////////////////////
1834
1835// fixscan start:
1836assign pmen_reg_scanin = scan_in ;
1837assign dff_ncu_pb_scanin = pmen_reg_scanout ;
1838assign dff_pb_sel_scanin = dff_ncu_pb_scanout ;
1839assign dff_ifu_req_v0_scanin = dff_pb_sel_scanout ;
1840assign dff_ifu_req_v1_scanin = dff_ifu_req_v0_scanout ;
1841assign dff_ifu_v0_scanin = dff_ifu_req_v1_scanout ;
1842assign dff_ifu_v1_scanin = dff_ifu_v0_scanout ;
1843assign dff_mmu_req_v0_scanin = dff_ifu_v1_scanout ;
1844assign dff_mmu_req_v1_scanin = dff_mmu_req_v0_scanout ;
1845assign dff_mmu_v0_scanin = dff_mmu_req_v1_scanout ;
1846assign dff_mmu_v1_scanin = dff_mmu_v0_scanout ;
1847assign dff_lsu_req_v0_scanin = dff_mmu_v1_scanout ;
1848assign dff_lsu_req_v1_scanin = dff_lsu_req_v0_scanout ;
1849assign dff_lsu_v0_scanin = dff_lsu_req_v1_scanout ;
1850assign dff_lsu_v1_scanin = dff_lsu_v0_scanout ;
1851assign dff_lsu_lock_v0_scanin = dff_lsu_v1_scanout ;
1852assign dff_lsu_lock_v1_scanin = dff_lsu_lock_v0_scanout ;
1853assign dff_spu_req_v0_scanin = dff_lsu_lock_v1_scanout ;
1854assign dff_spu_req_v1_scanin = dff_spu_req_v0_scanout ;
1855assign dff_spu_v0_scanin = dff_spu_req_v1_scanout ;
1856assign dff_spu_v1_scanin = dff_spu_v0_scanout ;
1857assign lock_reg_scanin = dff_spu_v1_scanout ;
1858assign favori_reg_scanin = lock_reg_scanout ;
1859assign favorim_reg_scanin = favori_reg_scanout ;
1860assign favorls_reg_scanin = favorim_reg_scanout ;
1861assign sel_reg_scanin = favorls_reg_scanout ;
1862assign grant_reg_scanin = sel_reg_scanout ;
1863assign l1_atm_req_reg_scanin = grant_reg_scanout ;
1864assign req_nrepeat_drop_reg_scanin = l1_atm_req_reg_scanout ;
1865assign req_nrepeat_ndrop_reg_scanin = req_nrepeat_drop_reg_scanout;
1866assign req_repeat_drop_reg_scanin = req_nrepeat_ndrop_reg_scanout;
1867assign req_repeat_ndrop_reg_scanin = req_repeat_drop_reg_scanout;
1868assign drop_cnt_scanin = req_repeat_ndrop_reg_scanout;
1869assign force_req_scanin = drop_cnt_scanout;
1870assign dff_xbar_type_scanin = force_req_scanout;
1871assign dff_unit_sel_pa_type_scanin = dff_xbar_type_scanout ;
1872assign dff_unit_ndrop_pa_scanin = dff_unit_sel_pa_type_scanout;
1873assign dff_req_drop_lat_scanin = dff_unit_ndrop_pa_scanout;
1874assign dff_req_drop_latx_scanin = dff_req_drop_lat_scanout ;
1875assign dff_dropreg_valid_scanin = dff_req_drop_latx_scanout;
1876assign dff_dropreg0_scanin = dff_dropreg_valid_scanout;
1877assign dff_dropreg1_scanin = dff_dropreg0_scanout ;
1878assign dff_dropreg2_scanin = dff_dropreg1_scanout ;
1879assign dff_dropreg3_scanin = dff_dropreg2_scanout ;
1880assign dff_req_pa_scanin = dff_dropreg3_scanout ;
1881assign dff_atm_pa_scanin = dff_req_pa_scanout ;
1882assign pqm0_scanin = dff_atm_pa_scanout ;
1883assign pqm1_scanin = pqm0_scanout ;
1884assign pqm2_scanin = pqm1_scanout ;
1885assign pqm3_scanin = pqm2_scanout ;
1886assign pqm4_scanin = pqm3_scanout ;
1887assign pqm5_scanin = pqm4_scanout ;
1888assign pqm6_scanin = pqm5_scanout ;
1889assign pqm7_scanin = pqm6_scanout ;
1890assign pqm8_scanin = pqm7_scanout ;
1891
1892assign spares_scanin = pqm8_scanout ;
1893assign scan_out = spares_scanout ;
1894
1895
1896// fixscan end:
1897endmodule
1898
1899
1900
1901
1902
1903
1904
1905// any PARAMS parms go into naming of macro
1906
1907module gkt_ipc_ctl_l1clkhdr_ctl_macro (
1908 l2clk,
1909 l1en,
1910 pce_ov,
1911 stop,
1912 se,
1913 l1clk);
1914
1915
1916 input l2clk;
1917 input l1en;
1918 input pce_ov;
1919 input stop;
1920 input se;
1921 output l1clk;
1922
1923
1924
1925
1926
1927cl_sc1_l1hdr_8x c_0 (
1928
1929
1930 .l2clk(l2clk),
1931 .pce(l1en),
1932 .l1clk(l1clk),
1933 .se(se),
1934 .pce_ov(pce_ov),
1935 .stop(stop)
1936);
1937
1938
1939
1940endmodule
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954// any PARAMS parms go into naming of macro
1955
1956module gkt_ipc_ctl_msff_ctl_macro__width_1 (
1957 din,
1958 l1clk,
1959 scan_in,
1960 siclk,
1961 soclk,
1962 dout,
1963 scan_out);
1964wire [0:0] fdin;
1965
1966 input [0:0] din;
1967 input l1clk;
1968 input scan_in;
1969
1970
1971 input siclk;
1972 input soclk;
1973
1974 output [0:0] dout;
1975 output scan_out;
1976assign fdin[0:0] = din[0:0];
1977
1978
1979
1980
1981
1982
1983dff #(1) d0_0 (
1984.l1clk(l1clk),
1985.siclk(siclk),
1986.soclk(soclk),
1987.d(fdin[0:0]),
1988.si(scan_in),
1989.so(scan_out),
1990.q(dout[0:0])
1991);
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004endmodule
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018// any PARAMS parms go into naming of macro
2019
2020module gkt_ipc_ctl_msff_ctl_macro__width_5 (
2021 din,
2022 l1clk,
2023 scan_in,
2024 siclk,
2025 soclk,
2026 dout,
2027 scan_out);
2028wire [4:0] fdin;
2029wire [3:0] so;
2030
2031 input [4:0] din;
2032 input l1clk;
2033 input scan_in;
2034
2035
2036 input siclk;
2037 input soclk;
2038
2039 output [4:0] dout;
2040 output scan_out;
2041assign fdin[4:0] = din[4:0];
2042
2043
2044
2045
2046
2047
2048dff #(5) d0_0 (
2049.l1clk(l1clk),
2050.siclk(siclk),
2051.soclk(soclk),
2052.d(fdin[4:0]),
2053.si({scan_in,so[3:0]}),
2054.so({so[3:0],scan_out}),
2055.q(dout[4:0])
2056);
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069endmodule
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083// any PARAMS parms go into naming of macro
2084
2085module gkt_ipc_ctl_msff_ctl_macro__width_6 (
2086 din,
2087 l1clk,
2088 scan_in,
2089 siclk,
2090 soclk,
2091 dout,
2092 scan_out);
2093wire [5:0] fdin;
2094wire [4:0] so;
2095
2096 input [5:0] din;
2097 input l1clk;
2098 input scan_in;
2099
2100
2101 input siclk;
2102 input soclk;
2103
2104 output [5:0] dout;
2105 output scan_out;
2106assign fdin[5:0] = din[5:0];
2107
2108
2109
2110
2111
2112
2113dff #(6) d0_0 (
2114.l1clk(l1clk),
2115.siclk(siclk),
2116.soclk(soclk),
2117.d(fdin[5:0]),
2118.si({scan_in,so[4:0]}),
2119.so({so[4:0],scan_out}),
2120.q(dout[5:0])
2121);
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134endmodule
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148// any PARAMS parms go into naming of macro
2149
2150module gkt_ipc_ctl_msff_ctl_macro__width_9 (
2151 din,
2152 l1clk,
2153 scan_in,
2154 siclk,
2155 soclk,
2156 dout,
2157 scan_out);
2158wire [8:0] fdin;
2159wire [7:0] so;
2160
2161 input [8:0] din;
2162 input l1clk;
2163 input scan_in;
2164
2165
2166 input siclk;
2167 input soclk;
2168
2169 output [8:0] dout;
2170 output scan_out;
2171assign fdin[8:0] = din[8:0];
2172
2173
2174
2175
2176
2177
2178dff #(9) d0_0 (
2179.l1clk(l1clk),
2180.siclk(siclk),
2181.soclk(soclk),
2182.d(fdin[8:0]),
2183.si({scan_in,so[7:0]}),
2184.so({so[7:0],scan_out}),
2185.q(dout[8:0])
2186);
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199endmodule
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213// any PARAMS parms go into naming of macro
2214
2215module gkt_ipc_ctl_msff_ctl_macro__width_4 (
2216 din,
2217 l1clk,
2218 scan_in,
2219 siclk,
2220 soclk,
2221 dout,
2222 scan_out);
2223wire [3:0] fdin;
2224wire [2:0] so;
2225
2226 input [3:0] din;
2227 input l1clk;
2228 input scan_in;
2229
2230
2231 input siclk;
2232 input soclk;
2233
2234 output [3:0] dout;
2235 output scan_out;
2236assign fdin[3:0] = din[3:0];
2237
2238
2239
2240
2241
2242
2243dff #(4) d0_0 (
2244.l1clk(l1clk),
2245.siclk(siclk),
2246.soclk(soclk),
2247.d(fdin[3:0]),
2248.si({scan_in,so[2:0]}),
2249.so({so[2:0],scan_out}),
2250.q(dout[3:0])
2251);
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264endmodule
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278// any PARAMS parms go into naming of macro
2279
2280module gkt_ipc_ctl_msff_ctl_macro__width_13 (
2281 din,
2282 l1clk,
2283 scan_in,
2284 siclk,
2285 soclk,
2286 dout,
2287 scan_out);
2288wire [12:0] fdin;
2289wire [11:0] so;
2290
2291 input [12:0] din;
2292 input l1clk;
2293 input scan_in;
2294
2295
2296 input siclk;
2297 input soclk;
2298
2299 output [12:0] dout;
2300 output scan_out;
2301assign fdin[12:0] = din[12:0];
2302
2303
2304
2305
2306
2307
2308dff #(13) d0_0 (
2309.l1clk(l1clk),
2310.siclk(siclk),
2311.soclk(soclk),
2312.d(fdin[12:0]),
2313.si({scan_in,so[11:0]}),
2314.so({so[11:0],scan_out}),
2315.q(dout[12:0])
2316);
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329endmodule
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343// any PARAMS parms go into naming of macro
2344
2345module gkt_ipc_ctl_msff_ctl_macro__width_7 (
2346 din,
2347 l1clk,
2348 scan_in,
2349 siclk,
2350 soclk,
2351 dout,
2352 scan_out);
2353wire [6:0] fdin;
2354wire [5:0] so;
2355
2356 input [6:0] din;
2357 input l1clk;
2358 input scan_in;
2359
2360
2361 input siclk;
2362 input soclk;
2363
2364 output [6:0] dout;
2365 output scan_out;
2366assign fdin[6:0] = din[6:0];
2367
2368
2369
2370
2371
2372
2373dff #(7) d0_0 (
2374.l1clk(l1clk),
2375.siclk(siclk),
2376.soclk(soclk),
2377.d(fdin[6:0]),
2378.si({scan_in,so[5:0]}),
2379.so({so[5:0],scan_out}),
2380.q(dout[6:0])
2381);
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394endmodule
2395
2396
2397
2398
2399// any PARAMS parms go into naming of macro
2400
2401module gkt_ipc_ctl_msff_ctl_macro__width_2 (
2402 din,
2403 l1clk,
2404 scan_in,
2405 siclk,
2406 soclk,
2407 dout,
2408 scan_out);
2409wire [1:0] fdin;
2410wire [0:0] so;
2411
2412 input [1:0] din;
2413 input l1clk;
2414 input scan_in;
2415
2416
2417 input siclk;
2418 input soclk;
2419
2420 output [1:0] dout;
2421 output scan_out;
2422assign fdin[1:0] = din[1:0];
2423
2424
2425
2426
2427
2428
2429dff #(2) d0_0 (
2430.l1clk(l1clk),
2431.siclk(siclk),
2432.soclk(soclk),
2433.d(fdin[1:0]),
2434.si({scan_in,so[0:0]}),
2435.so({so[0:0],scan_out}),
2436.q(dout[1:0])
2437);
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450endmodule
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460// Description: Spare gate macro for control blocks
2461//
2462// Param num controls the number of times the macro is added
2463// flops=0 can be used to use only combination spare logic
2464
2465
2466module gkt_ipc_ctl_spare_ctl_macro__num_5 (
2467 l1clk,
2468 scan_in,
2469 siclk,
2470 soclk,
2471 scan_out);
2472wire si_0;
2473wire so_0;
2474wire spare0_flop_unused;
2475wire spare0_buf_32x_unused;
2476wire spare0_nand3_8x_unused;
2477wire spare0_inv_8x_unused;
2478wire spare0_aoi22_4x_unused;
2479wire spare0_buf_8x_unused;
2480wire spare0_oai22_4x_unused;
2481wire spare0_inv_16x_unused;
2482wire spare0_nand2_16x_unused;
2483wire spare0_nor3_4x_unused;
2484wire spare0_nand2_8x_unused;
2485wire spare0_buf_16x_unused;
2486wire spare0_nor2_16x_unused;
2487wire spare0_inv_32x_unused;
2488wire si_1;
2489wire so_1;
2490wire spare1_flop_unused;
2491wire spare1_buf_32x_unused;
2492wire spare1_nand3_8x_unused;
2493wire spare1_inv_8x_unused;
2494wire spare1_aoi22_4x_unused;
2495wire spare1_buf_8x_unused;
2496wire spare1_oai22_4x_unused;
2497wire spare1_inv_16x_unused;
2498wire spare1_nand2_16x_unused;
2499wire spare1_nor3_4x_unused;
2500wire spare1_nand2_8x_unused;
2501wire spare1_buf_16x_unused;
2502wire spare1_nor2_16x_unused;
2503wire spare1_inv_32x_unused;
2504wire si_2;
2505wire so_2;
2506wire spare2_flop_unused;
2507wire spare2_buf_32x_unused;
2508wire spare2_nand3_8x_unused;
2509wire spare2_inv_8x_unused;
2510wire spare2_aoi22_4x_unused;
2511wire spare2_buf_8x_unused;
2512wire spare2_oai22_4x_unused;
2513wire spare2_inv_16x_unused;
2514wire spare2_nand2_16x_unused;
2515wire spare2_nor3_4x_unused;
2516wire spare2_nand2_8x_unused;
2517wire spare2_buf_16x_unused;
2518wire spare2_nor2_16x_unused;
2519wire spare2_inv_32x_unused;
2520wire si_3;
2521wire so_3;
2522wire spare3_flop_unused;
2523wire spare3_buf_32x_unused;
2524wire spare3_nand3_8x_unused;
2525wire spare3_inv_8x_unused;
2526wire spare3_aoi22_4x_unused;
2527wire spare3_buf_8x_unused;
2528wire spare3_oai22_4x_unused;
2529wire spare3_inv_16x_unused;
2530wire spare3_nand2_16x_unused;
2531wire spare3_nor3_4x_unused;
2532wire spare3_nand2_8x_unused;
2533wire spare3_buf_16x_unused;
2534wire spare3_nor2_16x_unused;
2535wire spare3_inv_32x_unused;
2536wire si_4;
2537wire so_4;
2538wire spare4_flop_unused;
2539wire spare4_buf_32x_unused;
2540wire spare4_nand3_8x_unused;
2541wire spare4_inv_8x_unused;
2542wire spare4_aoi22_4x_unused;
2543wire spare4_buf_8x_unused;
2544wire spare4_oai22_4x_unused;
2545wire spare4_inv_16x_unused;
2546wire spare4_nand2_16x_unused;
2547wire spare4_nor3_4x_unused;
2548wire spare4_nand2_8x_unused;
2549wire spare4_buf_16x_unused;
2550wire spare4_nor2_16x_unused;
2551wire spare4_inv_32x_unused;
2552
2553
2554input l1clk;
2555input scan_in;
2556input siclk;
2557input soclk;
2558output scan_out;
2559
2560cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
2561 .siclk(siclk),
2562 .soclk(soclk),
2563 .si(si_0),
2564 .so(so_0),
2565 .d(1'b0),
2566 .q(spare0_flop_unused));
2567assign si_0 = scan_in;
2568
2569cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
2570 .out(spare0_buf_32x_unused));
2571cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
2572 .in1(1'b1),
2573 .in2(1'b1),
2574 .out(spare0_nand3_8x_unused));
2575cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
2576 .out(spare0_inv_8x_unused));
2577cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
2578 .in01(1'b1),
2579 .in10(1'b1),
2580 .in11(1'b1),
2581 .out(spare0_aoi22_4x_unused));
2582cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
2583 .out(spare0_buf_8x_unused));
2584cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
2585 .in01(1'b1),
2586 .in10(1'b1),
2587 .in11(1'b1),
2588 .out(spare0_oai22_4x_unused));
2589cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
2590 .out(spare0_inv_16x_unused));
2591cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
2592 .in1(1'b1),
2593 .out(spare0_nand2_16x_unused));
2594cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
2595 .in1(1'b0),
2596 .in2(1'b0),
2597 .out(spare0_nor3_4x_unused));
2598cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
2599 .in1(1'b1),
2600 .out(spare0_nand2_8x_unused));
2601cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
2602 .out(spare0_buf_16x_unused));
2603cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
2604 .in1(1'b0),
2605 .out(spare0_nor2_16x_unused));
2606cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
2607 .out(spare0_inv_32x_unused));
2608
2609cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
2610 .siclk(siclk),
2611 .soclk(soclk),
2612 .si(si_1),
2613 .so(so_1),
2614 .d(1'b0),
2615 .q(spare1_flop_unused));
2616assign si_1 = so_0;
2617
2618cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
2619 .out(spare1_buf_32x_unused));
2620cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
2621 .in1(1'b1),
2622 .in2(1'b1),
2623 .out(spare1_nand3_8x_unused));
2624cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
2625 .out(spare1_inv_8x_unused));
2626cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
2627 .in01(1'b1),
2628 .in10(1'b1),
2629 .in11(1'b1),
2630 .out(spare1_aoi22_4x_unused));
2631cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
2632 .out(spare1_buf_8x_unused));
2633cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
2634 .in01(1'b1),
2635 .in10(1'b1),
2636 .in11(1'b1),
2637 .out(spare1_oai22_4x_unused));
2638cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
2639 .out(spare1_inv_16x_unused));
2640cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
2641 .in1(1'b1),
2642 .out(spare1_nand2_16x_unused));
2643cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
2644 .in1(1'b0),
2645 .in2(1'b0),
2646 .out(spare1_nor3_4x_unused));
2647cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
2648 .in1(1'b1),
2649 .out(spare1_nand2_8x_unused));
2650cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
2651 .out(spare1_buf_16x_unused));
2652cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
2653 .in1(1'b0),
2654 .out(spare1_nor2_16x_unused));
2655cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
2656 .out(spare1_inv_32x_unused));
2657
2658cl_sc1_msff_8x spare2_flop (.l1clk(l1clk),
2659 .siclk(siclk),
2660 .soclk(soclk),
2661 .si(si_2),
2662 .so(so_2),
2663 .d(1'b0),
2664 .q(spare2_flop_unused));
2665assign si_2 = so_1;
2666
2667cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
2668 .out(spare2_buf_32x_unused));
2669cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
2670 .in1(1'b1),
2671 .in2(1'b1),
2672 .out(spare2_nand3_8x_unused));
2673cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
2674 .out(spare2_inv_8x_unused));
2675cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
2676 .in01(1'b1),
2677 .in10(1'b1),
2678 .in11(1'b1),
2679 .out(spare2_aoi22_4x_unused));
2680cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
2681 .out(spare2_buf_8x_unused));
2682cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
2683 .in01(1'b1),
2684 .in10(1'b1),
2685 .in11(1'b1),
2686 .out(spare2_oai22_4x_unused));
2687cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
2688 .out(spare2_inv_16x_unused));
2689cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
2690 .in1(1'b1),
2691 .out(spare2_nand2_16x_unused));
2692cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
2693 .in1(1'b0),
2694 .in2(1'b0),
2695 .out(spare2_nor3_4x_unused));
2696cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
2697 .in1(1'b1),
2698 .out(spare2_nand2_8x_unused));
2699cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
2700 .out(spare2_buf_16x_unused));
2701cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
2702 .in1(1'b0),
2703 .out(spare2_nor2_16x_unused));
2704cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
2705 .out(spare2_inv_32x_unused));
2706
2707cl_sc1_msff_8x spare3_flop (.l1clk(l1clk),
2708 .siclk(siclk),
2709 .soclk(soclk),
2710 .si(si_3),
2711 .so(so_3),
2712 .d(1'b0),
2713 .q(spare3_flop_unused));
2714assign si_3 = so_2;
2715
2716cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
2717 .out(spare3_buf_32x_unused));
2718cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
2719 .in1(1'b1),
2720 .in2(1'b1),
2721 .out(spare3_nand3_8x_unused));
2722cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
2723 .out(spare3_inv_8x_unused));
2724cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
2725 .in01(1'b1),
2726 .in10(1'b1),
2727 .in11(1'b1),
2728 .out(spare3_aoi22_4x_unused));
2729cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
2730 .out(spare3_buf_8x_unused));
2731cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
2732 .in01(1'b1),
2733 .in10(1'b1),
2734 .in11(1'b1),
2735 .out(spare3_oai22_4x_unused));
2736cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
2737 .out(spare3_inv_16x_unused));
2738cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
2739 .in1(1'b1),
2740 .out(spare3_nand2_16x_unused));
2741cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
2742 .in1(1'b0),
2743 .in2(1'b0),
2744 .out(spare3_nor3_4x_unused));
2745cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
2746 .in1(1'b1),
2747 .out(spare3_nand2_8x_unused));
2748cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
2749 .out(spare3_buf_16x_unused));
2750cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
2751 .in1(1'b0),
2752 .out(spare3_nor2_16x_unused));
2753cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
2754 .out(spare3_inv_32x_unused));
2755
2756cl_sc1_msff_8x spare4_flop (.l1clk(l1clk),
2757 .siclk(siclk),
2758 .soclk(soclk),
2759 .si(si_4),
2760 .so(so_4),
2761 .d(1'b0),
2762 .q(spare4_flop_unused));
2763assign si_4 = so_3;
2764
2765cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
2766 .out(spare4_buf_32x_unused));
2767cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
2768 .in1(1'b1),
2769 .in2(1'b1),
2770 .out(spare4_nand3_8x_unused));
2771cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
2772 .out(spare4_inv_8x_unused));
2773cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
2774 .in01(1'b1),
2775 .in10(1'b1),
2776 .in11(1'b1),
2777 .out(spare4_aoi22_4x_unused));
2778cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
2779 .out(spare4_buf_8x_unused));
2780cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
2781 .in01(1'b1),
2782 .in10(1'b1),
2783 .in11(1'b1),
2784 .out(spare4_oai22_4x_unused));
2785cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
2786 .out(spare4_inv_16x_unused));
2787cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
2788 .in1(1'b1),
2789 .out(spare4_nand2_16x_unused));
2790cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
2791 .in1(1'b0),
2792 .in2(1'b0),
2793 .out(spare4_nor3_4x_unused));
2794cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
2795 .in1(1'b1),
2796 .out(spare4_nand2_8x_unused));
2797cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
2798 .out(spare4_buf_16x_unused));
2799cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
2800 .in1(1'b0),
2801 .out(spare4_nor2_16x_unused));
2802cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
2803 .out(spare4_inv_32x_unused));
2804assign scan_out = so_4;
2805
2806
2807
2808endmodule
2809