Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / ifu / rtl / ifu_ftu_ftp_ctl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: ifu_ftu_ftp_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 ifu_ftu_ftp_ctl (
36 tcu_scan_en,
37 l2clk,
38 scan_in,
39 tcu_pce_ov,
40 spc_aclk,
41 spc_bclk,
42 spc_core_running_status,
43 tlu_pstate_am,
44 tlu_flush_ifu,
45 tlu_itlb_bypass,
46 tlu_trap_0_tid,
47 tlu_trap_1_tid,
48 tlu_trap_pc_0_valid,
49 tlu_trap_pc_1_valid,
50 dec_br_taken_e,
51 dec_valid_e,
52 dec_tid0_d,
53 dec_tid1_d,
54 itc_demap_next,
55 mbi_run,
56 mbi_itb_cam_en_pre,
57 mbi_cmpsel,
58 mbi_ict_read_en,
59 mbi_ict_write_en,
60 mbi_icd_read_en,
61 mbi_icd_write_en,
62 mbi_icv_read_en,
63 mbi_icv_write_en,
64 cmu_thr0_data_ready,
65 cmu_thr1_data_ready,
66 cmu_thr2_data_ready,
67 cmu_thr3_data_ready,
68 cmu_thr4_data_ready,
69 cmu_thr5_data_ready,
70 cmu_thr6_data_ready,
71 cmu_thr7_data_ready,
72 tsm_thr0_ignore_by_pass,
73 tsm_thr1_ignore_by_pass,
74 tsm_thr2_ignore_by_pass,
75 tsm_thr3_ignore_by_pass,
76 tsm_thr4_ignore_by_pass,
77 tsm_thr5_ignore_by_pass,
78 tsm_thr6_ignore_by_pass,
79 tsm_thr7_ignore_by_pass,
80 dec_load_flush_w,
81 tsm_thr0_ready_hp_bf_in,
82 tsm_thr1_ready_hp_bf_in,
83 tsm_thr2_ready_hp_bf_in,
84 tsm_thr3_ready_hp_bf_in,
85 tsm_thr4_ready_hp_bf_in,
86 tsm_thr5_ready_hp_bf_in,
87 tsm_thr6_ready_hp_bf_in,
88 tsm_thr7_ready_hp_bf_in,
89 tsm_thr0_fill_rdy0,
90 tsm_thr1_fill_rdy0,
91 tsm_thr2_fill_rdy0,
92 tsm_thr3_fill_rdy0,
93 tsm_thr4_fill_rdy0,
94 tsm_thr5_fill_rdy0,
95 tsm_thr6_fill_rdy0,
96 tsm_thr7_fill_rdy0,
97 cmu_icache_invalidate,
98 cmu_any_un_cacheable,
99 cmu_any_data_ready,
100 ibu_empty,
101 ibu_room_4ormore,
102 agc_by_pass_update_lru_bf,
103 agc_invalidation_req_ff,
104 agc_kill_fetch_cv_c,
105 agc_thr0_micro_flush_unq_c,
106 agc_thr1_micro_flush_unq_c,
107 agc_thr2_micro_flush_unq_c,
108 agc_thr3_micro_flush_unq_c,
109 agc_thr4_micro_flush_unq_c,
110 agc_thr5_micro_flush_unq_c,
111 agc_thr6_micro_flush_unq_c,
112 agc_thr7_micro_flush_unq_c,
113 agc_thr0_sf_valid_f,
114 agc_thr1_sf_valid_f,
115 agc_thr2_sf_valid_f,
116 agc_thr3_sf_valid_f,
117 agc_thr4_sf_valid_f,
118 agc_thr5_sf_valid_f,
119 agc_thr6_sf_valid_f,
120 agc_thr7_sf_valid_f,
121 asi_sel_cntx_0,
122 asi_ic_wr_req,
123 asi_ic_rd_req,
124 asi_tg_wr_req,
125 asi_tg_rd_req,
126 asi_itd_rd_req,
127 asi_itt_rd_req,
128 asi_ith_det_req,
129 asi_tid,
130 agd_address0_m,
131 agd_address1_m,
132 agd_thr0_pc_4_2_f,
133 agd_thr1_pc_4_2_f,
134 agd_thr2_pc_4_2_f,
135 agd_thr3_pc_4_2_f,
136 agd_thr4_pc_4_2_f,
137 agd_thr5_pc_4_2_f,
138 agd_thr6_pc_4_2_f,
139 agd_thr7_pc_4_2_f,
140 ifu_agd_pc_f,
141 asi_addr_bf,
142 lsu_ifu_ftu_pmen,
143 lsu_ic_pmen,
144 lsu_ifu_wr_pid,
145 lsu_ifu_tid_w,
146 lsu_ifu_pid_data,
147 ftp_asi_rd_done,
148 ftp_asi_wr_done,
149 ftp_reset_fill_wait,
150 ftp_ic_rd_req_bf,
151 ftp_ic_wr_ps_en_bf,
152 ftp_ic_wr_req_bf,
153 ftp_tg_rd_req_bf,
154 ftp_tg_wr_req_bf,
155 ftp_iv_rd_req_bf,
156 ftp_itt_rd_req_bf,
157 ftp_itd_rd_req_bf,
158 ftp_itlb_cam_vld_bf,
159 ftp_itlb_cam_vld_f,
160 ftp_ith_det_req_bf,
161 ftp_itlb_probe_req_l,
162 ftp_sel_icv_mbist_addr,
163 ftp_sel_mbist_itb_cycle0,
164 ftp_sel_mbist_itb_cycle1,
165 ftp_sel_mbist_itb_cycle2,
166 ftp_sel_mbist_itb_cycle3,
167 ftp_sel_itlb_tag_cntx0_c,
168 ftp_sel_itlb_tag_cntx1_c,
169 ftp_sel_itlb_data_c,
170 ftp_sel_itlb_pa_c,
171 ftp_asi_mbist_access_bf,
172 ftp_asi_it_rd_done,
173 ftp_asi_ic_rd_done,
174 ftp_asi_ic_wr_done,
175 ftp_asi_tg_rd_done,
176 ftp_asi_tg_wr_done,
177 ftp_asi_tg_wr_req_hold,
178 ftp_thr0_room_is_less_t_3,
179 ftp_thr1_room_is_less_t_3,
180 ftp_thr2_room_is_less_t_3,
181 ftp_thr3_room_is_less_t_3,
182 ftp_thr4_room_is_less_t_3,
183 ftp_thr5_room_is_less_t_3,
184 ftp_thr6_room_is_less_t_3,
185 ftp_thr7_room_is_less_t_3,
186 ftp_thr0_go_to_sf_wait,
187 ftp_thr1_go_to_sf_wait,
188 ftp_thr2_go_to_sf_wait,
189 ftp_thr3_go_to_sf_wait,
190 ftp_thr4_go_to_sf_wait,
191 ftp_thr5_go_to_sf_wait,
192 ftp_thr6_go_to_sf_wait,
193 ftp_thr7_go_to_sf_wait,
194 ftp_thr0_trprdpc_sel_bf,
195 ftp_thr1_trprdpc_sel_bf,
196 ftp_thr2_trprdpc_sel_bf,
197 ftp_thr3_trprdpc_sel_bf,
198 ftp_thr4_trprdpc_sel_bf,
199 ftp_thr5_trprdpc_sel_bf,
200 ftp_thr6_trprdpc_sel_bf,
201 ftp_thr7_trprdpc_sel_bf,
202 ftp_thr0_sel_br_bf,
203 ftp_thr1_sel_br_bf,
204 ftp_thr2_sel_br_bf,
205 ftp_thr3_sel_br_bf,
206 ftp_thr4_sel_br_bf,
207 ftp_thr5_sel_br_bf,
208 ftp_thr6_sel_br_bf,
209 ftp_thr7_sel_br_bf,
210 ftp_icd_quad_0_en_bf,
211 ftp_icd_quad_1_en_bf,
212 ftp_icd_quad_2_en_bf,
213 ftp_icd_quad_3_en_bf,
214 ftp_tg_clk_en,
215 ftp_pc_sel_am,
216 ftp_pc_sel_tag_part1,
217 ftp_pc_sel_tag_part2,
218 ftp_pc_sel_tag_pc_bot,
219 ftp_pc_sel_tag_pc_top,
220 ftp_icaddr_sel_first_mux,
221 ftp_itb_fetch_thr_bf,
222 ftp_new_thr_sel_bf,
223 ftu_curr_fetch_thr_f,
224 ftp_curr_fetch_thr_f,
225 ftp_fetch_thr_q_f,
226 ftp_tid0_e,
227 ftp_tid1_e,
228 ftp_fetch_v_f,
229 ftp_fill_req_q_bf,
230 ftp_mbi_icd_read_en_bf,
231 ftp_mbi_ict_read_en_bf,
232 ftp_ict_data_sel_bf,
233 ftp_any_thr_clken,
234 scan_out,
235 ftp_curr_pid_bf,
236 ftp_thr7_pid_data,
237 ftp_thr6_pid_data,
238 ftp_thr5_pid_data,
239 ftp_thr4_pid_data,
240 ftp_thr3_pid_data,
241 ftp_thr2_pid_data,
242 ftp_thr1_pid_data,
243 ftp_thr0_pid_data);
244wire pce_ov;
245wire stop;
246wire siclk;
247wire soclk;
248wire l1clk;
249wire l1clk_pm1;
250wire br_reg_scanin;
251wire br_reg_scanout;
252wire br0_matches_curr;
253wire br1_matches_curr;
254wire [1:0] dec_br_taken_m;
255wire [1:0] dec_valid_m;
256wire br0_matches_curr_f;
257wire br1_matches_curr_f;
258wire [1:0] br_taken_ff;
259wire tlu_flush_ifu_req_scanin;
260wire tlu_flush_ifu_req_scanout;
261wire [7:0] ftp_tlu_flush_f;
262wire br_tid_reg_scanin;
263wire br_tid_reg_scanout;
264wire [1:0] tid1_m;
265wire [1:0] tid0_m;
266wire [1:0] tid1_b;
267wire [1:0] tid0_b;
268wire [7:0] next_tid_dec_b;
269wire tid_dec_w_reg_scanin;
270wire tid_dec_w_reg_scanout;
271wire [7:0] tid_dec_w;
272wire ftp_any_thread_ready;
273wire [7:0] ready_hp_bf;
274wire [7:0] fpick;
275wire [7:0] hp_pick;
276wire [7:0] ftp_curr_fetch_thr_bf;
277wire [7:0] next_ith_det_thr_id;
278wire [7:0] ith_det_thr_id;
279wire it_rd_req_done_f;
280wire tid_bf_reg_scanin;
281wire tid_bf_reg_scanout;
282wire [7:0] ftp_itb_fetch_thr_dup_bf;
283wire [3:0] top_hp_ready;
284wire [7:0] enabled_threads;
285wire [3:0] bot_hp_ready;
286wire top_hp_pickready;
287wire bot_hp_pickready;
288wire hp_pickready;
289wire [3:0] bot_hp_pick;
290wire [7:0] bot_lru;
291wire [3:0] top_hp_pick;
292wire [7:0] top_lru;
293wire sel_top_hp;
294wire favor_top;
295wire [3:0] top_fpick;
296wire [3:0] bot_fpick;
297wire [7:0] ntop_lru;
298wire [7:0] ntop_lru_in;
299wire top_lruf_scanin;
300wire top_lruf_scanout;
301wire [7:0] top_lru_out;
302wire [7:0] nbot_lru;
303wire [7:0] nbot_lru_in;
304wire bot_lruf_scanin;
305wire bot_lruf_scanout;
306wire [7:0] bot_lru_out;
307wire set_favor_top;
308wire reset_favor_top;
309wire next_favor_top;
310wire favor_top_reg_scanin;
311wire favor_top_reg_scanout;
312wire [7:0] next_curr_fetch_f_bf;
313wire curr_fetch_thr_f_reg_scanin;
314wire curr_fetch_thr_f_reg_scanout;
315wire curr_fetch_thr_c_reg_scanin;
316wire curr_fetch_thr_c_reg_scanout;
317wire [7:0] ftp_curr_fetch_thr_c;
318wire ftp_fetch_v_dup_f;
319wire next_ftp_fill_req_q;
320wire inv_line_reg_scanin;
321wire inv_line_reg_scanout;
322wire inv_line_bf;
323wire next_fill_req;
324wire fill_req_bf_reg_scanin;
325wire fill_req_bf_reg_scanout;
326wire ftp_fill_req_bf;
327wire asi_rd_request;
328wire next_rd_is_first;
329wire wr_request_pending;
330wire rd_request_pending;
331wire asi_rd_is_first;
332wire rd_is_first_reg_scanin;
333wire rd_is_first_reg_scanout;
334wire asi_wr_request;
335wire next_wr_request_pending;
336wire asi_wr_done_in;
337wire next_rd_request_pending;
338wire wr_request_pending_reg_scanin;
339wire wr_request_pending_reg_scanout;
340wire asi_rd_ok;
341wire asi_wr_ok;
342wire next_ic_wr_req;
343wire ic_wr_req_ff;
344wire ic_wr_req_ff_reg_scanin;
345wire ic_wr_req_ff_reg_scanout;
346wire next_ic_rd_req;
347wire ic_rd_req_ff;
348wire ic_rd_req_ff_reg_scanin;
349wire ic_rd_req_ff_reg_scanout;
350wire next_tg_wr_req;
351wire tg_wr_req_ff;
352wire tg_wr_req_ff_reg_scanin;
353wire tg_wr_req_ff_reg_scanout;
354wire next_tg_rd_req;
355wire tg_rd_req_ff;
356wire tg_rd_req_ff_reg_scanin;
357wire tg_rd_req_ff_reg_scanout;
358wire next_itt_rd_req;
359wire itt_rd_req_ff;
360wire reload;
361wire reload_last;
362wire itt_rd_req_ff_reg_scanin;
363wire itt_rd_req_ff_reg_scanout;
364wire next_itd_rd_req;
365wire itd_rd_req_ff;
366wire itd_rd_req_ff_reg_scanin;
367wire itd_rd_req_ff_reg_scanout;
368wire next_ith_det_req;
369wire ith_det_req_ff;
370wire ith_det_req_ff_reg_scanin;
371wire ith_det_req_ff_reg_scanout;
372wire next_itlb_probe_req_l;
373wire itlb_probe_l_reg_scanin;
374wire itlb_probe_l_reg_scanout;
375wire fill_req_bf_q_reg_scanin;
376wire fill_req_bf_q_reg_scanout;
377wire mbist_in_reg_scanin;
378wire mbist_in_reg_scanout;
379wire ftp_itb_cam_en_1;
380wire mbi_run_bf;
381wire mbi_icd_write_en_bf;
382wire mbi_ict_write_en_bf;
383wire [1:0] mbi_cmpsel_bf;
384wire ftp_mbi_icv_read_en_bf;
385wire ftp_mbi_icv_write_en_bf;
386wire ftp_itb_cam_en_2;
387wire ftp_fetch_v_bf;
388wire ifu_ic_pmen;
389wire ftp_bypass_bf;
390wire itlb_cam_vld_reg_scanin;
391wire itlb_cam_vld_reg_scanout;
392wire itlb_bypass_lat_scanin;
393wire itlb_bypass_lat_scanout;
394wire [7:0] itlb_bypass;
395wire [7:0] pre_bypass_bf;
396wire ic_rd_req_done_in;
397wire ic_rd_done_f_reg_scanin;
398wire ic_rd_done_f_reg_scanout;
399wire ic_rd_req_done_f;
400wire ic_rd_done_c_reg_scanin;
401wire ic_rd_done_c_reg_scanout;
402wire ic_rd_req_done_c;
403wire ic_rd_done_p_reg_scanin;
404wire ic_rd_done_p_reg_scanout;
405wire ic_rd_req_done_p;
406wire ic_wr_req_done_in;
407wire ic_wr_done_f_reg_scanin;
408wire ic_wr_done_f_reg_scanout;
409wire ic_wr_req_done_f;
410wire tg_rd_req_done_in;
411wire tg_rd_done_f_reg_scanin;
412wire tg_rd_done_f_reg_scanout;
413wire tg_rd_req_done_f;
414wire tg_rd_done_c_reg_scanin;
415wire tg_rd_done_c_reg_scanout;
416wire tg_rd_req_done_c;
417wire tg_wr_req_done_in;
418wire tg_wr_done_f_reg_scanin;
419wire tg_wr_done_f_reg_scanout;
420wire tg_wr_req_done_f;
421wire it_rd_req_done_in;
422wire it_rd_done_f_reg_scanin;
423wire it_rd_done_f_reg_scanout;
424wire it_rd_done_c_reg_scanin;
425wire it_rd_done_c_reg_scanout;
426wire it_rd_req_done_c;
427wire asi_rd_done_in;
428wire ftp_asi_it_rd_done_p;
429wire asi_rd_done_reg_scanin;
430wire asi_rd_done_reg_scanout;
431wire asi_wr_done_reg_scanin;
432wire asi_wr_done_reg_scanout;
433wire asi_it_rd_done_reg_scanin;
434wire asi_it_rd_done_reg_scanout;
435wire next_sel_mbist_itb_cycle0;
436wire next_sel_mbist_itb_cycle1;
437wire next_sel_mbist_itb_cycle2;
438wire next_sel_mbist_itb_cycle3;
439wire next_sel_itlb_tag;
440wire itlb_sel_tag_f_reg_scanin;
441wire itlb_sel_tag_f_reg_scanout;
442wire ftp_sel_itlb_tag_f;
443wire next_sel_itlb_data;
444wire itlb_sel_data_f_reg_scanin;
445wire itlb_sel_data_f_reg_scanout;
446wire ftp_sel_itlb_data_f;
447wire next_sel_itlb_pa;
448wire itlb_sel_pa_f_reg_scanin;
449wire itlb_sel_pa_f_reg_scanout;
450wire ftp_sel_itlb_pa_f;
451wire sel_itlb_tag_cntx0_f;
452wire sel_itlb_tag_cntx1_f;
453wire itlb_sel_c_reg_scanin;
454wire itlb_sel_c_reg_scanout;
455wire [3:0] trap_thread_g0;
456wire [3:0] trap_thread_g1;
457wire thr0_trap_pcaddr_is_valid_bf;
458wire thr1_trap_pcaddr_is_valid_bf;
459wire thr2_trap_pcaddr_is_valid_bf;
460wire thr3_trap_pcaddr_is_valid_bf;
461wire thr4_trap_pcaddr_is_valid_bf;
462wire thr5_trap_pcaddr_is_valid_bf;
463wire thr6_trap_pcaddr_is_valid_bf;
464wire thr7_trap_pcaddr_is_valid_bf;
465wire [7:0] load_flush_w;
466wire thr0_red_no_br_bf;
467wire thr1_red_no_br_bf;
468wire thr2_red_no_br_bf;
469wire thr3_red_no_br_bf;
470wire thr4_red_no_br_bf;
471wire thr5_red_no_br_bf;
472wire thr6_red_no_br_bf;
473wire thr7_red_no_br_bf;
474wire thrx_redirect_reg_scanin;
475wire thrx_redirect_reg_scanout;
476wire thr7_redirect_part_bf;
477wire thr6_redirect_part_bf;
478wire thr5_redirect_part_bf;
479wire thr4_redirect_part_bf;
480wire thr3_redirect_part_bf;
481wire thr2_redirect_part_bf;
482wire thr1_redirect_part_bf;
483wire thr0_redirect_part_bf;
484wire thr0_redirect_bf;
485wire thr0_br_taken_ff;
486wire thr1_redirect_bf;
487wire thr1_br_taken_ff;
488wire thr2_redirect_bf;
489wire thr2_br_taken_ff;
490wire thr3_redirect_bf;
491wire thr3_br_taken_ff;
492wire thr4_redirect_bf;
493wire thr4_br_taken_ff;
494wire thr5_redirect_bf;
495wire thr5_br_taken_ff;
496wire thr6_redirect_bf;
497wire thr6_br_taken_ff;
498wire thr7_redirect_bf;
499wire thr7_br_taken_ff;
500wire kill_fetch_fv_bf;
501wire next_fetch_fv_unq_bf;
502wire fetch_v_f_reg_scanin;
503wire fetch_v_f_reg_scanout;
504wire ftp_fetch_v_unq_f;
505wire fetch_v_f_dup_reg_scanin;
506wire fetch_v_f_dup_reg_scanout;
507wire ftp_fetch_v_unq_dup_f;
508wire br_redirect_disqual;
509wire br_redirect_dup_disqual;
510wire next_fetch_v_c_f;
511wire fetch_v_c_reg_scanin;
512wire fetch_v_c_reg_scanout;
513wire ftp_fetch_v_c_unq;
514wire ftp_fetch_v_c;
515wire [7:0] next_enabled_thread;
516wire enabled_thr_reg_scanin;
517wire enabled_thr_reg_scanout;
518wire ifu_ftu_pmen;
519wire [7:0] br_room_reset;
520wire ftp_thr0_fetch_v_wo_br_bf;
521wire thr0_by_pass_2_cycles_at_c;
522wire ftp_thr1_fetch_v_wo_br_bf;
523wire thr1_by_pass_2_cycles_at_c;
524wire ftp_thr2_fetch_v_wo_br_bf;
525wire thr2_by_pass_2_cycles_at_c;
526wire ftp_thr3_fetch_v_wo_br_bf;
527wire thr3_by_pass_2_cycles_at_c;
528wire ftp_thr4_fetch_v_wo_br_bf;
529wire thr4_by_pass_2_cycles_at_c;
530wire ftp_thr5_fetch_v_wo_br_bf;
531wire thr5_by_pass_2_cycles_at_c;
532wire ftp_thr6_fetch_v_wo_br_bf;
533wire thr6_by_pass_2_cycles_at_c;
534wire ftp_thr7_fetch_v_wo_br_bf;
535wire thr7_by_pass_2_cycles_at_c;
536wire ftp_thr0_fetch_v_f;
537wire thr0_by_pass_next_cycle_at_c;
538wire ftp_thr1_fetch_v_f;
539wire thr1_by_pass_next_cycle_at_c;
540wire ftp_thr2_fetch_v_f;
541wire thr2_by_pass_next_cycle_at_c;
542wire ftp_thr3_fetch_v_f;
543wire thr3_by_pass_next_cycle_at_c;
544wire ftp_thr4_fetch_v_f;
545wire thr4_by_pass_next_cycle_at_c;
546wire ftp_thr5_fetch_v_f;
547wire thr5_by_pass_next_cycle_at_c;
548wire ftp_thr6_fetch_v_f;
549wire thr6_by_pass_next_cycle_at_c;
550wire ftp_thr7_fetch_v_f;
551wire thr7_by_pass_next_cycle_at_c;
552wire ftp_thr0_fetch_v_c;
553wire thr0_by_pass_is_at_c;
554wire ftp_thr1_fetch_v_c;
555wire thr1_by_pass_is_at_c;
556wire ftp_thr2_fetch_v_c;
557wire thr2_by_pass_is_at_c;
558wire ftp_thr3_fetch_v_c;
559wire thr3_by_pass_is_at_c;
560wire ftp_thr4_fetch_v_c;
561wire thr4_by_pass_is_at_c;
562wire ftp_thr5_fetch_v_c;
563wire thr5_by_pass_is_at_c;
564wire ftp_thr6_fetch_v_c;
565wire thr6_by_pass_is_at_c;
566wire ftp_thr7_fetch_v_c;
567wire thr7_by_pass_is_at_c;
568wire thr0_is_empty_c;
569wire thr1_is_empty_c;
570wire thr2_is_empty_c;
571wire thr3_is_empty_c;
572wire thr4_is_empty_c;
573wire thr5_is_empty_c;
574wire thr6_is_empty_c;
575wire thr7_is_empty_c;
576wire thr0_room_4ormore;
577wire thr1_room_4ormore;
578wire thr2_room_4ormore;
579wire thr3_room_4ormore;
580wire thr4_room_4ormore;
581wire thr5_room_4ormore;
582wire thr6_room_4ormore;
583wire thr7_room_4ormore;
584wire [7:0] ready_hp_in;
585wire tsm_thr0_ready_hp_bf;
586wire tsm_thr1_ready_hp_bf;
587wire tsm_thr2_ready_hp_bf;
588wire tsm_thr3_ready_hp_bf;
589wire tsm_thr4_ready_hp_bf;
590wire tsm_thr5_ready_hp_bf;
591wire tsm_thr6_ready_hp_bf;
592wire tsm_thr7_ready_hp_bf;
593wire [7:0] ftp_unused;
594wire ready_fp_reg_scanin;
595wire ready_fp_reg_scanout;
596wire [7:0] next_by_pass_sel_bbf;
597wire cmu_fill_byp_thread_reg_scanin;
598wire cmu_fill_byp_thread_reg_scanout;
599wire [7:0] by_pass_sel_bf;
600wire by_pass_sel_f_reg_scanin;
601wire by_pass_sel_f_reg_scanout;
602wire [7:0] by_pass_sel_f;
603wire by_pass_sel_c_reg_scanin;
604wire by_pass_sel_c_reg_scanout;
605wire [7:0] by_pass_sel_c;
606wire thr0_kill_by_pass_bbf;
607wire thr1_kill_by_pass_bbf;
608wire thr2_kill_by_pass_bbf;
609wire thr3_kill_by_pass_bbf;
610wire thr4_kill_by_pass_bbf;
611wire thr5_kill_by_pass_bbf;
612wire thr6_kill_by_pass_bbf;
613wire thr7_kill_by_pass_bbf;
614wire byp_valid_in;
615wire byp_valid_reg_scanin;
616wire byp_valid_reg_scanout;
617wire ftp_byp_valid;
618wire thrx_kill_by_pass_reg_scanin;
619wire thrx_kill_by_pass_reg_scanout;
620wire thr7_kill_by_pass_bf;
621wire thr6_kill_by_pass_bf;
622wire thr5_kill_by_pass_bf;
623wire thr4_kill_by_pass_bf;
624wire thr3_kill_by_pass_bf;
625wire thr2_kill_by_pass_bf;
626wire thr1_kill_by_pass_bf;
627wire thr0_kill_by_pass_bf;
628wire kill2_by_pass_bf;
629wire bypass_thread_killed;
630wire by_pass_valid_bf;
631wire prev_by_pass_at_cycle_1;
632wire cycle_2_by_pass_ok_f;
633wire cycle_3_by_pass_ok_c;
634wire prev_by_pass_at_cycle_2;
635wire cycle_3_by_pass_ok_f;
636wire cycle_2_by_pass_ok_bf;
637wire cycle_3_by_pass_ok_bf;
638wire cycle_2_by_pass_f_reg_scanin;
639wire cycle_2_by_pass_f_reg_scanout;
640wire cycle_3_by_pass_f_reg_scanin;
641wire cycle_3_by_pass_f_reg_scanout;
642wire cycle_3_by_pass_c_reg_scanin;
643wire cycle_3_by_pass_c_reg_scanout;
644wire by_pass_v_f_reg_scanin;
645wire by_pass_v_f_reg_scanout;
646wire by_pass_valid_unq_f;
647wire by_pass_valid_f;
648wire bypass_thread_redirected_p_f;
649wire bypass_thread_redirected_f;
650wire next_by_pass_c_valid;
651wire by_pass_v_c_reg_scanin;
652wire by_pass_v_c_reg_scanout;
653wire by_pass_valid_c;
654wire sel_by_pass_cycle_2_int_f;
655wire sel_by_pass_cycle_3_int_c;
656wire thr0_by_pass_valid_bf;
657wire thr1_by_pass_valid_bf;
658wire thr2_by_pass_valid_bf;
659wire thr3_by_pass_valid_bf;
660wire thr4_by_pass_valid_bf;
661wire thr5_by_pass_valid_bf;
662wire thr6_by_pass_valid_bf;
663wire thr7_by_pass_valid_bf;
664wire thr0_by_pass_valid_f;
665wire thr1_by_pass_valid_f;
666wire thr2_by_pass_valid_f;
667wire thr3_by_pass_valid_f;
668wire thr4_by_pass_valid_f;
669wire thr5_by_pass_valid_f;
670wire thr6_by_pass_valid_f;
671wire thr7_by_pass_valid_f;
672wire thr0_by_pass_valid_c;
673wire thr1_by_pass_valid_c;
674wire thr2_by_pass_valid_c;
675wire thr3_by_pass_valid_c;
676wire thr4_by_pass_valid_c;
677wire thr5_by_pass_valid_c;
678wire thr6_by_pass_valid_c;
679wire thr7_by_pass_valid_c;
680wire thr0_by_pass_cycle_2_bf;
681wire thr0_by_pass_cycle_3_f;
682wire thr1_by_pass_cycle_2_bf;
683wire thr1_by_pass_cycle_3_f;
684wire thr2_by_pass_cycle_2_bf;
685wire thr2_by_pass_cycle_3_f;
686wire thr3_by_pass_cycle_2_bf;
687wire thr3_by_pass_cycle_3_f;
688wire thr4_by_pass_cycle_2_bf;
689wire thr4_by_pass_cycle_3_f;
690wire thr5_by_pass_cycle_2_bf;
691wire thr5_by_pass_cycle_3_f;
692wire thr6_by_pass_cycle_2_bf;
693wire thr6_by_pass_cycle_3_f;
694wire thr7_by_pass_cycle_2_bf;
695wire thr7_by_pass_cycle_3_f;
696wire fetch_same_thr_again_bf;
697wire ftp_curr_pstate_am_bf_;
698wire select_itc_va;
699wire sel_am_5;
700wire [7:0] next_pstate_am_;
701wire pstate_am_reg_scanin;
702wire pstate_am_reg_scanout;
703wire [7:0] ftp_pstate_am_bf_;
704wire reload_in;
705wire reload_latch_scanin;
706wire reload_latch_scanout;
707wire next_ftp_ith_det_req_bf;
708wire next_select_itc_va;
709wire next_sel_am_5;
710wire pre_sel_am_reg_scanin;
711wire pre_sel_am_reg_scanout;
712wire [2:0] next_thr0_pid_data;
713wire [2:0] thr0_pid_data;
714wire [2:0] next_thr1_pid_data;
715wire [2:0] thr1_pid_data;
716wire [2:0] next_thr2_pid_data;
717wire [2:0] thr2_pid_data;
718wire [2:0] next_thr3_pid_data;
719wire [2:0] thr3_pid_data;
720wire [2:0] next_thr4_pid_data;
721wire [2:0] thr4_pid_data;
722wire [2:0] next_thr5_pid_data;
723wire [2:0] thr5_pid_data;
724wire [2:0] next_thr6_pid_data;
725wire [2:0] thr6_pid_data;
726wire [2:0] next_thr7_pid_data;
727wire [2:0] thr7_pid_data;
728wire thr0_pid_reg_scanin;
729wire thr0_pid_reg_scanout;
730wire thr1_pid_reg_scanin;
731wire thr1_pid_reg_scanout;
732wire thr2_pid_reg_scanin;
733wire thr2_pid_reg_scanout;
734wire thr3_pid_reg_scanin;
735wire thr3_pid_reg_scanout;
736wire thr4_pid_reg_scanin;
737wire thr4_pid_reg_scanout;
738wire thr5_pid_reg_scanin;
739wire thr5_pid_reg_scanout;
740wire thr6_pid_reg_scanin;
741wire thr6_pid_reg_scanout;
742wire thr7_pid_reg_scanin;
743wire thr7_pid_reg_scanout;
744wire invalidation_req_f;
745wire spares_scanin;
746wire spares_scanout;
747wire [4:2] curr_thr_pc_bf;
748wire [2:0] ic_pwr_sel_index;
749wire [4:2] thr0_pc_muxed_f;
750wire [4:2] thr1_pc_muxed_f;
751wire [4:2] thr2_pc_muxed_f;
752wire [4:2] thr3_pc_muxed_f;
753wire [4:2] thr4_pc_muxed_f;
754wire [4:2] thr5_pc_muxed_f;
755wire [4:2] thr6_pc_muxed_f;
756wire [4:2] thr7_pc_muxed_f;
757wire [4:2] new_thr_pc_bf;
758wire [4:2] ic_index_bf;
759wire se;
760
761input tcu_scan_en ;
762input l2clk;
763input scan_in;
764input tcu_pce_ov; // scan signals
765input spc_aclk;
766input spc_bclk;
767
768input [7:0] spc_core_running_status;
769input [7:0] tlu_pstate_am;
770input [7:0] tlu_flush_ifu;
771input [7:0] tlu_itlb_bypass;
772
773input [1:0] tlu_trap_0_tid;
774input [1:0] tlu_trap_1_tid;
775input tlu_trap_pc_0_valid;
776input tlu_trap_pc_1_valid;
777
778input [1:0] dec_br_taken_e;
779input [1:0] dec_valid_e;
780// input [1:0] dec_br_reg_taken_e;
781// input [1:0] dec_br_noreg_taken_e;
782input [1:0] dec_tid0_d;
783input [1:0] dec_tid1_d;
784
785input itc_demap_next;
786input mbi_run;
787input mbi_itb_cam_en_pre ;
788input [1:0] mbi_cmpsel;
789input mbi_ict_read_en;
790input mbi_ict_write_en;
791input mbi_icd_read_en;
792input mbi_icd_write_en;
793input mbi_icv_read_en;
794input mbi_icv_write_en;
795
796
797input cmu_thr0_data_ready ;
798input cmu_thr1_data_ready ;
799input cmu_thr2_data_ready ;
800input cmu_thr3_data_ready ;
801input cmu_thr4_data_ready ;
802input cmu_thr5_data_ready ;
803input cmu_thr6_data_ready ;
804input cmu_thr7_data_ready ;
805
806
807input tsm_thr0_ignore_by_pass ;
808input tsm_thr1_ignore_by_pass ;
809input tsm_thr2_ignore_by_pass ;
810input tsm_thr3_ignore_by_pass ;
811input tsm_thr4_ignore_by_pass ;
812input tsm_thr5_ignore_by_pass ;
813input tsm_thr6_ignore_by_pass ;
814input tsm_thr7_ignore_by_pass ;
815
816
817// input agc_ld_flush_hi_pr_bf ;
818// input [2:0] agc_ld_flush_tid_bf ;
819input [1:0] dec_load_flush_w;
820
821
822
823input tsm_thr0_ready_hp_bf_in;
824input tsm_thr1_ready_hp_bf_in;
825input tsm_thr2_ready_hp_bf_in;
826input tsm_thr3_ready_hp_bf_in;
827input tsm_thr4_ready_hp_bf_in;
828input tsm_thr5_ready_hp_bf_in;
829input tsm_thr6_ready_hp_bf_in;
830input tsm_thr7_ready_hp_bf_in;
831
832
833
834
835
836input tsm_thr0_fill_rdy0;
837input tsm_thr1_fill_rdy0;
838input tsm_thr2_fill_rdy0;
839input tsm_thr3_fill_rdy0;
840input tsm_thr4_fill_rdy0;
841input tsm_thr5_fill_rdy0;
842input tsm_thr6_fill_rdy0;
843input tsm_thr7_fill_rdy0;
844
845
846input cmu_icache_invalidate ;
847input cmu_any_un_cacheable ;
848
849input cmu_any_data_ready ;
850
851input [7:0] ibu_empty;
852input [7:0] ibu_room_4ormore;
853
854
855input [7:0] agc_by_pass_update_lru_bf;
856input [7:0] agc_invalidation_req_ff;
857// input [2:0] itd_tid;
858
859input agc_kill_fetch_cv_c;
860
861input agc_thr0_micro_flush_unq_c ;
862input agc_thr1_micro_flush_unq_c ;
863input agc_thr2_micro_flush_unq_c ;
864input agc_thr3_micro_flush_unq_c ;
865input agc_thr4_micro_flush_unq_c ;
866input agc_thr5_micro_flush_unq_c ;
867input agc_thr6_micro_flush_unq_c ;
868input agc_thr7_micro_flush_unq_c ;
869
870input agc_thr0_sf_valid_f;
871input agc_thr1_sf_valid_f;
872input agc_thr2_sf_valid_f;
873input agc_thr3_sf_valid_f;
874input agc_thr4_sf_valid_f;
875input agc_thr5_sf_valid_f;
876input agc_thr6_sf_valid_f;
877input agc_thr7_sf_valid_f;
878
879input asi_sel_cntx_0;
880input asi_ic_wr_req;
881input asi_ic_rd_req;
882input asi_tg_wr_req;
883input asi_tg_rd_req;
884input asi_itd_rd_req;
885input asi_itt_rd_req;
886input asi_ith_det_req;
887
888input [2:0] asi_tid ;
889
890input [4:2] agd_address0_m ;
891input [4:2] agd_address1_m ;
892input [4:2] agd_thr0_pc_4_2_f ;
893input [4:2] agd_thr1_pc_4_2_f ;
894input [4:2] agd_thr2_pc_4_2_f ;
895input [4:2] agd_thr3_pc_4_2_f ;
896input [4:2] agd_thr4_pc_4_2_f ;
897input [4:2] agd_thr5_pc_4_2_f ;
898input [4:2] agd_thr6_pc_4_2_f ;
899input [4:2] agd_thr7_pc_4_2_f ;
900input [4:2] ifu_agd_pc_f ;
901input [5:3] asi_addr_bf ;
902
903
904
905// input agc_sel_by_pass_cycle_2_int_f ;
906// input agc_sel_by_pass_cycle_3_int_c ;
907input lsu_ifu_ftu_pmen; // enable power management.
908input lsu_ic_pmen; // enable power management for the ICD and ICT.
909input lsu_ifu_wr_pid ;
910input [2:0] lsu_ifu_tid_w ;
911input [2:0] lsu_ifu_pid_data ;
912
913
914// output ftp_sel_flush_ld_flush;
915output ftp_asi_rd_done;
916output ftp_asi_wr_done;
917
918output ftp_reset_fill_wait;
919output ftp_ic_rd_req_bf;
920output ftp_ic_wr_ps_en_bf;
921output ftp_ic_wr_req_bf;
922output ftp_tg_rd_req_bf;
923output ftp_tg_wr_req_bf;
924output ftp_iv_rd_req_bf;
925output ftp_itt_rd_req_bf;
926output ftp_itd_rd_req_bf;
927output ftp_itlb_cam_vld_bf ;
928output ftp_itlb_cam_vld_f ;
929output ftp_ith_det_req_bf ;
930
931output ftp_itlb_probe_req_l ;
932
933output ftp_sel_icv_mbist_addr ;
934
935output ftp_sel_mbist_itb_cycle0 ;
936output ftp_sel_mbist_itb_cycle1 ;
937output ftp_sel_mbist_itb_cycle2 ;
938output ftp_sel_mbist_itb_cycle3 ;
939
940output ftp_sel_itlb_tag_cntx0_c;
941output ftp_sel_itlb_tag_cntx1_c;
942output ftp_sel_itlb_data_c;
943output ftp_sel_itlb_pa_c;
944output ftp_asi_mbist_access_bf;
945
946output ftp_asi_it_rd_done;
947output ftp_asi_ic_rd_done;
948output ftp_asi_ic_wr_done;
949output ftp_asi_tg_rd_done;
950output ftp_asi_tg_wr_done;
951output ftp_asi_tg_wr_req_hold;
952
953output ftp_thr0_room_is_less_t_3;
954output ftp_thr1_room_is_less_t_3;
955output ftp_thr2_room_is_less_t_3;
956output ftp_thr3_room_is_less_t_3;
957output ftp_thr4_room_is_less_t_3;
958output ftp_thr5_room_is_less_t_3;
959output ftp_thr6_room_is_less_t_3;
960output ftp_thr7_room_is_less_t_3;
961
962output ftp_thr0_go_to_sf_wait;
963output ftp_thr1_go_to_sf_wait;
964output ftp_thr2_go_to_sf_wait;
965output ftp_thr3_go_to_sf_wait;
966output ftp_thr4_go_to_sf_wait;
967output ftp_thr5_go_to_sf_wait;
968output ftp_thr6_go_to_sf_wait;
969output ftp_thr7_go_to_sf_wait;
970
971output [2:0] ftp_thr0_trprdpc_sel_bf;
972output [2:0] ftp_thr1_trprdpc_sel_bf;
973output [2:0] ftp_thr2_trprdpc_sel_bf;
974output [2:0] ftp_thr3_trprdpc_sel_bf;
975output [2:0] ftp_thr4_trprdpc_sel_bf;
976output [2:0] ftp_thr5_trprdpc_sel_bf;
977output [2:0] ftp_thr6_trprdpc_sel_bf;
978output [2:0] ftp_thr7_trprdpc_sel_bf;
979
980output ftp_thr0_sel_br_bf;
981output ftp_thr1_sel_br_bf;
982output ftp_thr2_sel_br_bf;
983output ftp_thr3_sel_br_bf;
984output ftp_thr4_sel_br_bf;
985output ftp_thr5_sel_br_bf;
986output ftp_thr6_sel_br_bf;
987output ftp_thr7_sel_br_bf;
988
989output ftp_icd_quad_0_en_bf;
990output ftp_icd_quad_1_en_bf;
991output ftp_icd_quad_2_en_bf;
992output ftp_icd_quad_3_en_bf;
993
994output ftp_tg_clk_en;
995
996// output [1:0] ftp_pc_sel_nb0_nb1;
997// output [2:0] ftp_pc_sel_b0_nb1;
998// output [2:0] ftp_pc_sel_nb0_b1;
999// output [1:0] ftp_pc_sel_b0_b1;
1000
1001output [5:0] ftp_pc_sel_am;
1002output [2:0] ftp_pc_sel_tag_part1;
1003output [3:0] ftp_pc_sel_tag_part2;
1004output [1:0] ftp_pc_sel_tag_pc_bot;
1005output [1:0] ftp_pc_sel_tag_pc_top;
1006
1007
1008output [4:0] ftp_icaddr_sel_first_mux;
1009
1010// output [4:0] ftp_icaddr_sel_nb0_nb1;
1011// output [4:0] ftp_icaddr_sel_b0_nb1;
1012// output [4:0] ftp_icaddr_sel_nb0_b1;
1013// output [4:0] ftp_icaddr_sel_b0_b1;
1014
1015output [7:0] ftp_itb_fetch_thr_bf;
1016// output [7:0] ftp_ctx_fetch_thr_bf;
1017output [7:0] ftp_new_thr_sel_bf;
1018output [7:0] ftu_curr_fetch_thr_f;
1019output [7:0] ftp_curr_fetch_thr_f;
1020output [7:0] ftp_fetch_thr_q_f;
1021output [1:0] ftp_tid0_e;
1022output [1:0] ftp_tid1_e;
1023// output ftp_go_to_fill_wait;
1024
1025// output ftp_thr0_go_to_fill_wait;
1026// output ftp_thr1_go_to_fill_wait;
1027// output ftp_thr2_go_to_fill_wait;
1028// output ftp_thr3_go_to_fill_wait;
1029// output ftp_thr4_go_to_fill_wait;
1030// output ftp_thr5_go_to_fill_wait;
1031// output ftp_thr6_go_to_fill_wait;
1032// output ftp_thr7_go_to_fill_wait;
1033
1034output ftp_fetch_v_f;
1035
1036// output ftp_fill_req_bf;
1037output ftp_fill_req_q_bf;
1038output ftp_mbi_icd_read_en_bf;
1039output ftp_mbi_ict_read_en_bf;
1040output [2:0] ftp_ict_data_sel_bf;
1041output ftp_any_thr_clken;
1042output scan_out;
1043
1044output [2:0] ftp_curr_pid_bf;
1045output [2:0] ftp_thr7_pid_data;
1046output [2:0] ftp_thr6_pid_data;
1047output [2:0] ftp_thr5_pid_data;
1048output [2:0] ftp_thr4_pid_data;
1049output [2:0] ftp_thr3_pid_data;
1050output [2:0] ftp_thr2_pid_data;
1051output [2:0] ftp_thr1_pid_data;
1052output [2:0] ftp_thr0_pid_data;
1053
1054
1055
1056// scan renames
1057assign pce_ov = tcu_pce_ov;
1058assign stop = 1'b0;
1059assign siclk = spc_aclk;
1060assign soclk = spc_bclk;
1061// end scan
1062
1063
1064// assign br_reg_taken_e[1:0] = dec_br_reg_taken_e[1:0] & dec_valid_e[1:0];
1065// assign br_noreg_taken_e[1:0] = dec_br_noreg_taken_e[1:0] & dec_valid_e[1:0];
1066
1067
1068
1069ifu_ftu_ftp_ctl_l1clkhdr_ctl_macro clkgen (
1070 .l2clk(l2clk),
1071 .l1en (1'b1 ),
1072 .l1clk(l1clk),
1073 .pce_ov(pce_ov),
1074 .stop(stop),
1075 .se(se));
1076
1077ifu_ftu_ftp_ctl_l1clkhdr_ctl_macro clkgen_pm (
1078 .l2clk(l2clk),
1079 .l1en (ftp_any_thr_clken),
1080 .l1clk(l1clk_pm1),
1081 .pce_ov(pce_ov),
1082 .stop(stop),
1083 .se(se));
1084
1085
1086
1087
1088////////////////////////////////////////////////////////////////
1089
1090
1091ifu_ftu_ftp_ctl_msff_ctl_macro__width_6 br_reg (
1092 .scan_in(br_reg_scanin),
1093 .scan_out(br_reg_scanout),
1094 .l1clk(l1clk_pm1),
1095 .din ({dec_br_taken_e[1:0], dec_valid_e[1:0] , br0_matches_curr , br1_matches_curr}),
1096 .dout ({dec_br_taken_m[1:0], dec_valid_m[1:0] , br0_matches_curr_f, br1_matches_curr_f}),
1097 .siclk(siclk),
1098 .soclk(soclk)
1099);
1100
1101assign br_taken_ff[0] = dec_br_taken_m[0] & dec_valid_m[0] ;
1102assign br_taken_ff[1] = dec_br_taken_m[1] & dec_valid_m[1] ;
1103
1104ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 tlu_flush_ifu_req (
1105 .scan_in(tlu_flush_ifu_req_scanin),
1106 .scan_out(tlu_flush_ifu_req_scanout),
1107 .l1clk(l1clk),
1108 .din (tlu_flush_ifu[7:0]),
1109 .dout (ftp_tlu_flush_f[7:0]),
1110 .siclk(siclk),
1111 .soclk(soclk)
1112);
1113
1114ifu_ftu_ftp_ctl_msff_ctl_macro__width_12 br_tid_reg (
1115 .scan_in(br_tid_reg_scanin),
1116 .scan_out(br_tid_reg_scanout),
1117 .l1clk(l1clk_pm1),
1118 .din ({dec_tid1_d[1:0],dec_tid0_d[1:0], ftp_tid1_e[1:0], ftp_tid0_e[1:0], tid1_m[1:0], tid0_m[1:0]}),
1119 .dout ({ftp_tid1_e[1:0],ftp_tid0_e[1:0], tid1_m[1:0], tid0_m[1:0], tid1_b[1:0], tid0_b[1:0]}),
1120 .siclk(siclk),
1121 .soclk(soclk)
1122);
1123
1124assign next_tid_dec_b[0] = ~tid0_b[1] & ~tid0_b[0] ;
1125assign next_tid_dec_b[1] = ~tid0_b[1] & tid0_b[0] ;
1126assign next_tid_dec_b[2] = tid0_b[1] & ~tid0_b[0] ;
1127assign next_tid_dec_b[3] = tid0_b[1] & tid0_b[0] ;
1128assign next_tid_dec_b[4] = ~tid1_b[1] & ~tid1_b[0] ;
1129assign next_tid_dec_b[5] = ~tid1_b[1] & tid1_b[0] ;
1130assign next_tid_dec_b[6] = tid1_b[1] & ~tid1_b[0] ;
1131assign next_tid_dec_b[7] = tid1_b[1] & tid1_b[0] ;
1132
1133ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 tid_dec_w_reg (
1134 .scan_in(tid_dec_w_reg_scanin),
1135 .scan_out(tid_dec_w_reg_scanout),
1136 .l1clk(l1clk),
1137 .din (next_tid_dec_b[7:0]),
1138 .dout (tid_dec_w[7:0]),
1139 .siclk(siclk),
1140 .soclk(soclk)
1141);
1142
1143
1144
1145assign ftp_any_thread_ready = |ready_hp_bf[7:0] ;
1146assign fpick[7:0] = hp_pick[7:0] | agc_by_pass_update_lru_bf[7:0] ;
1147assign ftp_curr_fetch_thr_bf[7:0] = hp_pick[7:0] ;
1148assign ftp_new_thr_sel_bf[7:1] = hp_pick[7:1] ;
1149assign ftp_new_thr_sel_bf[0] = hp_pick[0] | ~ftp_any_thread_ready ;
1150
1151assign next_ith_det_thr_id[0] = asi_ith_det_req ? (~asi_tid[2] & ~asi_tid[1] & ~asi_tid[0]) : (ith_det_thr_id[0] & ~it_rd_req_done_f);
1152assign next_ith_det_thr_id[1] = asi_ith_det_req ? (~asi_tid[2] & ~asi_tid[1] & asi_tid[0]) : (ith_det_thr_id[1] & ~it_rd_req_done_f);
1153assign next_ith_det_thr_id[2] = asi_ith_det_req ? (~asi_tid[2] & asi_tid[1] & ~asi_tid[0]) : (ith_det_thr_id[2] & ~it_rd_req_done_f);
1154assign next_ith_det_thr_id[3] = asi_ith_det_req ? (~asi_tid[2] & asi_tid[1] & asi_tid[0]) : (ith_det_thr_id[3] & ~it_rd_req_done_f);
1155assign next_ith_det_thr_id[4] = asi_ith_det_req ? ( asi_tid[2] & ~asi_tid[1] & ~asi_tid[0]) : (ith_det_thr_id[4] & ~it_rd_req_done_f);
1156assign next_ith_det_thr_id[5] = asi_ith_det_req ? ( asi_tid[2] & ~asi_tid[1] & asi_tid[0]) : (ith_det_thr_id[5] & ~it_rd_req_done_f);
1157assign next_ith_det_thr_id[6] = asi_ith_det_req ? ( asi_tid[2] & asi_tid[1] & ~asi_tid[0]) : (ith_det_thr_id[6] & ~it_rd_req_done_f);
1158assign next_ith_det_thr_id[7] = asi_ith_det_req ? ( asi_tid[2] & asi_tid[1] & asi_tid[0]) : (ith_det_thr_id[7] & ~it_rd_req_done_f);
1159
1160
1161 ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 tid_bf_reg (
1162 .scan_in(tid_bf_reg_scanin),
1163 .scan_out(tid_bf_reg_scanout),
1164 .l1clk (l1clk),
1165 .din (next_ith_det_thr_id[7:0]),
1166 .dout (ith_det_thr_id[7:0]),
1167 .siclk(siclk),
1168 .soclk(soclk)
1169 );
1170
1171
1172
1173
1174 assign ftp_itb_fetch_thr_bf[7:0] = ftp_ith_det_req_bf ? ith_det_thr_id[7:0] : hp_pick[7:0] ;
1175 assign ftp_itb_fetch_thr_dup_bf[7:0] = ftp_ith_det_req_bf ? ith_det_thr_id[7:0] : hp_pick[7:0] ;
1176// assign ftp_itb_fetch_thr_bf[7:0] = ith_det_thr_id[7:0] | hp_pick[7:0] ;
1177// assign ftp_itb_fetch_thr_dup_bf[7:0] = ith_det_thr_id[7:0] | hp_pick[7:0] ;
1178// assign ftp_ctx_fetch_thr_bf[7:0] = ftp_select_itc_ctx ? tlb_wr_thr_id[7:0] : ftp_itb_fetch_thr_bf[7:0] ;
1179
1180assign top_hp_ready[3:0] = ready_hp_bf[7:4] & enabled_threads[7:4];
1181assign bot_hp_ready[3:0] = ready_hp_bf[3:0] & enabled_threads[3:0];
1182
1183assign top_hp_pickready = (|top_hp_ready[3:0]) ;
1184assign bot_hp_pickready = (|bot_hp_ready[3:0]) ;
1185assign hp_pickready = top_hp_pickready | bot_hp_pickready ;
1186
1187assign bot_hp_pick[3] = (bot_hp_ready[3]&!bot_hp_ready[1]&!bot_hp_ready[0]&bot_lru[1]&!bot_lru[0]) |
1188 (bot_hp_ready[3]&!bot_hp_ready[2]&!bot_hp_ready[0]&!bot_lru[1]&bot_lru[0]) |
1189 (bot_hp_ready[3]&!bot_hp_ready[1]&!bot_lru[2]&!bot_lru[0]) |
1190 (bot_hp_ready[3]&!bot_hp_ready[2]&!bot_lru[3]&!bot_lru[1]) |
1191 (bot_hp_ready[3]&!bot_hp_ready[2]&!bot_hp_ready[1]&!bot_lru[1]&!bot_lru[0]) |
1192 (bot_hp_ready[3]&!bot_hp_ready[0]&!bot_lru[7]&!bot_lru[6]&bot_lru[5]&bot_lru[4]) |
1193 (bot_hp_ready[3]&bot_lru[7]&bot_lru[6]) |
1194 (bot_hp_ready[3]&!bot_hp_ready[2]&!bot_hp_ready[1]&!bot_hp_ready[0]);
1195
1196assign bot_hp_pick[2] = (!bot_hp_ready[3]&bot_hp_ready[2]&!bot_hp_ready[1]&!bot_lru[1]&!bot_lru[0]) |
1197 (bot_hp_ready[2]&!bot_hp_ready[1]&!bot_hp_ready[0]&bot_lru[1]&bot_lru[0]) |
1198 (bot_hp_ready[2]&!bot_hp_ready[0]&bot_lru[2]&bot_lru[0]) |
1199 (!bot_hp_ready[3]&bot_hp_ready[2]&!bot_lru[3]&!bot_lru[1]) |
1200 (!bot_hp_ready[3]&bot_hp_ready[2]&!bot_hp_ready[0]&!bot_lru[1]&bot_lru[0]) |
1201 (bot_hp_ready[2]&!bot_hp_ready[1]&!bot_lru[7]&bot_lru[6]&bot_lru[5]&!bot_lru[4]) |
1202 (bot_hp_ready[2]&bot_lru[7]&!bot_lru[6]) |
1203 (!bot_hp_ready[3]&bot_hp_ready[2]&!bot_hp_ready[1]&!bot_hp_ready[0]);
1204
1205assign bot_hp_pick[1] = (!bot_hp_ready[3]&!bot_hp_ready[2]&bot_hp_ready[1]&!bot_lru[1]&!bot_lru[0]) |
1206 (!bot_hp_ready[2]&bot_hp_ready[1]&!bot_hp_ready[0]&bot_lru[1]&bot_lru[0]) |
1207 (!bot_hp_ready[3]&bot_hp_ready[1]&!bot_lru[2]&!bot_lru[0]) |
1208 (bot_hp_ready[1]&!bot_hp_ready[0]&bot_lru[3]&bot_lru[1]) |
1209 (!bot_hp_ready[3]&bot_hp_ready[1]&!bot_hp_ready[0]&bot_lru[1]&!bot_lru[0]) |
1210 (!bot_hp_ready[2]&bot_hp_ready[1]&bot_lru[7]&!bot_lru[6]&!bot_lru[5]&bot_lru[4]) |
1211 (bot_hp_ready[1]&!bot_lru[7]&bot_lru[6]) |
1212 (!bot_hp_ready[3]&!bot_hp_ready[2]&bot_hp_ready[1]&!bot_hp_ready[0]);
1213
1214assign bot_hp_pick[0] = (!bot_hp_ready[3]&!bot_hp_ready[1]&bot_hp_ready[0]&bot_lru[1]&!bot_lru[0]) |
1215 (!bot_hp_ready[3]&!bot_hp_ready[2]&bot_hp_ready[0]&!bot_lru[1]&bot_lru[0]) |
1216 (!bot_hp_ready[2]&bot_hp_ready[0]&bot_lru[2]&bot_lru[0]) |
1217 (!bot_hp_ready[1]&bot_hp_ready[0]&bot_lru[3]&bot_lru[1]) |
1218 (!bot_hp_ready[2]&!bot_hp_ready[1]&bot_hp_ready[0]&bot_lru[1]&bot_lru[0]) |
1219 (!bot_hp_ready[3]&bot_hp_ready[0]&bot_lru[7]&bot_lru[6]&!bot_lru[5]&!bot_lru[4]) |
1220 (bot_hp_ready[0]&!bot_lru[7]&!bot_lru[6]) |
1221 (!bot_hp_ready[3]&!bot_hp_ready[2]&!bot_hp_ready[1]&bot_hp_ready[0]);
1222
1223assign top_hp_pick[3] = (top_hp_ready[3]&!top_hp_ready[1]&!top_hp_ready[0]&top_lru[1]&!top_lru[0]) |
1224 (top_hp_ready[3]
1225 &!top_hp_ready[2]&!top_hp_ready[0]&!top_lru[1]&top_lru[0]) |
1226 (top_hp_ready[3]&!top_hp_ready[1]&!top_lru[2]
1227 &!top_lru[0]) |
1228 (top_hp_ready[3]&!top_hp_ready[2]&!top_lru[3]&!top_lru[1]) |
1229 (top_hp_ready[3]&!top_hp_ready[2]
1230 &!top_hp_ready[1]&!top_lru[1]&!top_lru[0]) |
1231 (top_hp_ready[3]&!top_hp_ready[0]&!top_lru[7]&!top_lru[6]
1232 &top_lru[5]&top_lru[4]) |
1233 (top_hp_ready[3]&top_lru[7]&top_lru[6]) |
1234 (top_hp_ready[3]&!top_hp_ready[2]
1235 &!top_hp_ready[1]&!top_hp_ready[0]);
1236
1237assign top_hp_pick[2] = (!top_hp_ready[3]&top_hp_ready[2]&!top_hp_ready[1]&!top_lru[1]&!top_lru[0]) |
1238 (top_hp_ready[2]&!top_hp_ready[1]&!top_hp_ready[0]&top_lru[1]&top_lru[0]) |
1239 (top_hp_ready[2]&!top_hp_ready[0]&top_lru[2]&top_lru[0]) |
1240 (!top_hp_ready[3]&top_hp_ready[2]&!top_lru[3]&!top_lru[1]) |
1241 (!top_hp_ready[3]&top_hp_ready[2]&!top_hp_ready[0]&!top_lru[1]&top_lru[0]) |
1242 (top_hp_ready[2]&!top_hp_ready[1]&!top_lru[7]&top_lru[6]&top_lru[5]&!top_lru[4]) |
1243 (top_hp_ready[2]&top_lru[7]&!top_lru[6]) |
1244 (!top_hp_ready[3]&top_hp_ready[2]&!top_hp_ready[1]&!top_hp_ready[0]);
1245
1246assign top_hp_pick[1] = (!top_hp_ready[3]&!top_hp_ready[2]&top_hp_ready[1]&!top_lru[1]&!top_lru[0]) |
1247 (!top_hp_ready[2]&top_hp_ready[1]&!top_hp_ready[0]&top_lru[1]&top_lru[0]) |
1248 (!top_hp_ready[3]&top_hp_ready[1]&!top_lru[2]&!top_lru[0]) |
1249 (top_hp_ready[1]&!top_hp_ready[0]&top_lru[3]&top_lru[1]) |
1250 (!top_hp_ready[3]&top_hp_ready[1]&!top_hp_ready[0]&top_lru[1]&!top_lru[0]) |
1251 (!top_hp_ready[2]&top_hp_ready[1]&top_lru[7]&!top_lru[6]&!top_lru[5]&top_lru[4]) |
1252 (top_hp_ready[1]&!top_lru[7]&top_lru[6]) |
1253 (!top_hp_ready[3]&!top_hp_ready[2]&top_hp_ready[1]&!top_hp_ready[0]);
1254
1255assign top_hp_pick[0] = (!top_hp_ready[3]&!top_hp_ready[1]&top_hp_ready[0]&top_lru[1]&!top_lru[0]) |
1256 (!top_hp_ready[3]&!top_hp_ready[2]&top_hp_ready[0]&!top_lru[1]&top_lru[0]) |
1257 (!top_hp_ready[2]&top_hp_ready[0]&top_lru[2]&top_lru[0]) |
1258 (!top_hp_ready[1]&top_hp_ready[0]&top_lru[3]&top_lru[1]) |
1259 (!top_hp_ready[2]&!top_hp_ready[1]&top_hp_ready[0]&top_lru[1]&top_lru[0]) |
1260 (!top_hp_ready[3]&top_hp_ready[0]&top_lru[7]&top_lru[6]&!top_lru[5]&!top_lru[4]) |
1261 (top_hp_ready[0]&!top_lru[7]&!top_lru[6]) |
1262 (!top_hp_ready[3]&!top_hp_ready[2]&!top_hp_ready[1]&top_hp_ready[0]);
1263assign sel_top_hp = (~favor_top & top_hp_pickready & ~bot_hp_pickready) |
1264 ( favor_top & ~top_hp_pickready & ~bot_hp_pickready) |
1265 ( favor_top & top_hp_pickready) ;
1266
1267assign hp_pick[7:0] = ({8{sel_top_hp}} & {top_hp_pick[3:0],4'b0000}) |
1268 ({8{~sel_top_hp}} & {4'b0000,bot_hp_pick[3:0]}) ;
1269
1270
1271
1272
1273assign top_fpick[3:0] = fpick[7:4] ;
1274assign bot_fpick[3:0] = fpick[3:0] ;
1275
1276// lru is msb pair of the lru vector
1277assign ntop_lru[7] = (top_fpick[0]&!top_lru[6]&top_lru[5]) |
1278 (top_fpick[1]&top_lru[6]&top_lru[5]) |
1279 (!top_lru[3]&!top_lru[1]) |
1280 (!top_fpick[2]&top_lru[7]&!top_lru[6]) |
1281 (!top_fpick[3]&top_lru[7]&top_lru[6]);
1282
1283assign ntop_lru[6] = (top_fpick[0]&!top_lru[7]&top_lru[4]) |
1284 (top_fpick[2]&top_lru[7]&top_lru[4]) |
1285 (!top_lru[2]&!top_lru[0]) |
1286 (!top_fpick[1]&!top_lru[7]&top_lru[6]) |
1287 (!top_fpick[3]&top_lru[7]&top_lru[6]);
1288
1289assign ntop_lru[5] = (!top_fpick[3]&!top_fpick[0]&top_lru[5]&top_lru[4]&top_lru[2]&top_lru[1]) |
1290 (top_fpick[0]&!top_lru[1]&top_lru[0]) |
1291 (top_fpick[1]&top_lru[3]&top_lru[1]) |
1292 (top_fpick[3]&top_lru[3]&!top_lru[2]&!top_lru[1]) |
1293 (top_fpick[0]&!top_lru[7]&top_lru[3]) |
1294 (top_fpick[2]&top_lru[3]&top_lru[2]&!top_lru[1]) |
1295 (top_fpick[1]&top_lru[3]&!top_lru[0]) |
1296 (!top_fpick[2]&!top_fpick[0]&!top_lru[7]&top_lru[5]&!top_lru[4]&top_lru[2]) |
1297 (!top_fpick[3]&!top_fpick[1]&!top_lru[7]&top_lru[5]&top_lru[4]&!top_lru[2]) |
1298 (!top_fpick[2]&!top_fpick[1]&!top_lru[7]&top_lru[5]&!top_lru[2]&top_lru[0]) |
1299 (!top_fpick[3]&!top_fpick[2]&top_lru[5]&!top_lru[1]);
1300
1301assign ntop_lru[4] = (top_fpick[0]&top_lru[1]&!top_lru[0]) |
1302 (top_fpick[2]&top_lru[2]&top_lru[0]) |
1303 (!top_fpick[3]&!top_fpick[2]&top_lru[4]&!top_lru[3]&!top_lru[1]) |
1304 (top_fpick[3]&!top_lru[3]&top_lru[2]&!top_lru[0]) |
1305 (top_fpick[0]&!top_lru[6]&top_lru[2]) |
1306 (top_fpick[1]&top_lru[3]&top_lru[2]&!top_lru[0]) |
1307 (top_fpick[2]&top_lru[2]&!top_lru[1]) |
1308 (!top_fpick[3]&!top_fpick[0]&!top_lru[7]&!top_lru[6]&top_lru[5]&top_lru[4]) |
1309 (!top_fpick[1]&!top_fpick[0]&!top_lru[6]&!top_lru[5]&top_lru[4]&top_lru[3]) |
1310 (!top_fpick[2]&!top_fpick[1]&!top_lru[6]&top_lru[4]&!top_lru[3]&top_lru[1]) |
1311 (!top_fpick[3]&!top_fpick[1]&top_lru[4]&!top_lru[0]);
1312
1313assign ntop_lru[3] = (top_fpick[3]&top_lru[1]&!top_lru[0]) |
1314 (top_fpick[2]&top_lru[1]&top_lru[0]) |
1315 (!top_fpick[3]&!top_fpick[2]&!top_fpick[1]&top_lru[3]&!top_lru[0]) |
1316 (!top_fpick[3]&!top_fpick[2]&!top_fpick[0]&top_lru[3]&top_lru[0]) |
1317 (top_fpick[1]&top_lru[1]) |
1318 (top_fpick[0]&top_lru[1]) |
1319 (top_lru[3]&top_lru[1]);
1320
1321assign ntop_lru[2] = (top_fpick[3]&!top_lru[1]&top_lru[0]) |
1322 (top_fpick[1]&top_lru[1]&top_lru[0]) |
1323 (top_lru[2]&top_lru[0]) |
1324 (!top_fpick[3]&!top_fpick[2]&!top_fpick[1]&top_lru[2]&!top_lru[1]) |
1325 (!top_fpick[3]&!top_fpick[1]&!top_fpick[0]&top_lru[2]&top_lru[1]) |
1326 (top_fpick[2]&top_lru[0]) |
1327 (top_fpick[0]&top_lru[0]);
1328
1329assign ntop_lru[1] = (!top_fpick[1]&!top_fpick[0]&top_lru[1]) |
1330 (top_fpick[3]) |
1331 (top_fpick[2]);
1332
1333assign ntop_lru[0] = (!top_fpick[2]&!top_fpick[0]&top_lru[0]) |
1334 (top_fpick[3]) |
1335 (top_fpick[1]);
1336assign ntop_lru_in[7:0] = {ntop_lru[7],ntop_lru[6], ntop_lru[5],~ntop_lru[4],
1337 ~ntop_lru[3],ntop_lru[2],~ntop_lru[1],~ntop_lru[0]};
1338
1339ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 top_lruf (
1340 .scan_in(top_lruf_scanin),
1341 .scan_out(top_lruf_scanout),
1342 .l1clk(l1clk_pm1),
1343 .din (ntop_lru_in[7:0]),
1344 .dout (top_lru_out[7:0]),
1345 .siclk(siclk),
1346 .soclk(soclk)
1347);
1348
1349assign top_lru[7:0] = {top_lru_out[7],top_lru_out[6], top_lru_out[5],~top_lru_out[4],
1350 ~top_lru_out[3],top_lru_out[2],~top_lru_out[1],~top_lru_out[0]};
1351
1352assign nbot_lru[7] = (bot_fpick[0]&!bot_lru[6]&bot_lru[5]) |
1353 (bot_fpick[1]&bot_lru[6]&bot_lru[5]) |
1354 (!bot_lru[3]&!bot_lru[1]) |
1355 (!bot_fpick[2]&bot_lru[7]&!bot_lru[6]) |
1356 (!bot_fpick[3]&bot_lru[7]&bot_lru[6]);
1357
1358assign nbot_lru[6] = (bot_fpick[0]&!bot_lru[7]&bot_lru[4]) |
1359 (bot_fpick[2]&bot_lru[7]&bot_lru[4]) |
1360 (!bot_lru[2]&!bot_lru[0]) |
1361 (!bot_fpick[1]&!bot_lru[7]&bot_lru[6]) |
1362 (!bot_fpick[3]&bot_lru[7]&bot_lru[6]);
1363
1364assign nbot_lru[5] = (!bot_fpick[3]&!bot_fpick[0]&bot_lru[5]&bot_lru[4]&bot_lru[2]&bot_lru[1]) |
1365 (bot_fpick[0]&!bot_lru[1]&bot_lru[0]) |
1366 (bot_fpick[1]&bot_lru[3]&bot_lru[1]) |
1367 (bot_fpick[3]&bot_lru[3]&!bot_lru[2]&!bot_lru[1]) |
1368 (bot_fpick[0]&!bot_lru[7]&bot_lru[3]) |
1369 (bot_fpick[2]&bot_lru[3]&bot_lru[2]&!bot_lru[1]) |
1370 (bot_fpick[1]&bot_lru[3]&!bot_lru[0]) |
1371 (!bot_fpick[2]&!bot_fpick[0]&!bot_lru[7]&bot_lru[5]&!bot_lru[4]&bot_lru[2]) |
1372 (!bot_fpick[3]&!bot_fpick[1]&!bot_lru[7]&bot_lru[5]&bot_lru[4]&!bot_lru[2]) |
1373 (!bot_fpick[2]&!bot_fpick[1]&!bot_lru[7]&bot_lru[5]&!bot_lru[2]&bot_lru[0]) |
1374 (!bot_fpick[3]&!bot_fpick[2]&bot_lru[5]&!bot_lru[1]);
1375
1376assign nbot_lru[4] = (bot_fpick[0]&bot_lru[1]&!bot_lru[0]) |
1377 (bot_fpick[2]&bot_lru[2]&bot_lru[0]) |
1378 (!bot_fpick[3]&!bot_fpick[2]&bot_lru[4]&!bot_lru[3]&!bot_lru[1]) |
1379 (bot_fpick[3]&!bot_lru[3]&bot_lru[2]&!bot_lru[0]) |
1380 (bot_fpick[0]&!bot_lru[6]&bot_lru[2]) |
1381 (bot_fpick[1]&bot_lru[3]&bot_lru[2]&!bot_lru[0]) |
1382 (bot_fpick[2]&bot_lru[2]&!bot_lru[1]) |
1383 (!bot_fpick[3]&!bot_fpick[0]&!bot_lru[7]&!bot_lru[6]&bot_lru[5]&bot_lru[4]) |
1384 (!bot_fpick[1]&!bot_fpick[0]&!bot_lru[6]&!bot_lru[5]&bot_lru[4]&bot_lru[3]) |
1385 (!bot_fpick[2]&!bot_fpick[1]&!bot_lru[6]&bot_lru[4]&!bot_lru[3]&bot_lru[1]) |
1386 (!bot_fpick[3]&!bot_fpick[1]&bot_lru[4]&!bot_lru[0]);
1387
1388assign nbot_lru[3] = (bot_fpick[3]&bot_lru[1]&!bot_lru[0]) |
1389 (bot_fpick[2]&bot_lru[1]&bot_lru[0]) |
1390 (!bot_fpick[3]&!bot_fpick[2]&!bot_fpick[1]&bot_lru[3]&!bot_lru[0]) |
1391 (!bot_fpick[3]&!bot_fpick[2]&!bot_fpick[0]&bot_lru[3]&bot_lru[0]) |
1392 (bot_fpick[1]&bot_lru[1]) |
1393 (bot_fpick[0]&bot_lru[1]) |
1394 (bot_lru[3]&bot_lru[1]);
1395
1396assign nbot_lru[2] = (bot_fpick[3]&!bot_lru[1]&bot_lru[0]) |
1397 (bot_fpick[1]&bot_lru[1]&bot_lru[0]) |
1398 (bot_lru[2]&bot_lru[0]) |
1399 (!bot_fpick[3]&!bot_fpick[2]&!bot_fpick[1]&bot_lru[2]&!bot_lru[1]) |
1400 (!bot_fpick[3]&!bot_fpick[1]&!bot_fpick[0]&bot_lru[2]&bot_lru[1]) |
1401 (bot_fpick[2]&bot_lru[0]) |
1402 (bot_fpick[0]&bot_lru[0]);
1403
1404assign nbot_lru[1] = (!bot_fpick[1]&!bot_fpick[0]&bot_lru[1]) | (bot_fpick[3]) | (bot_fpick[2]);
1405
1406assign nbot_lru[0] = (!bot_fpick[2]&!bot_fpick[0]&bot_lru[0]) | (bot_fpick[3]) | (bot_fpick[1]);
1407
1408assign nbot_lru_in[7:0] = {nbot_lru[7],nbot_lru[6], nbot_lru[5],~nbot_lru[4],
1409 ~nbot_lru[3],nbot_lru[2],~nbot_lru[1],~nbot_lru[0]};
1410ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 bot_lruf (
1411 .scan_in(bot_lruf_scanin),
1412 .scan_out(bot_lruf_scanout),
1413 .l1clk(l1clk_pm1),
1414 .din (nbot_lru_in[7:0]),
1415 .dout (bot_lru_out[7:0]),
1416 .siclk(siclk),
1417 .soclk(soclk)
1418);
1419
1420assign bot_lru[7:0] = {bot_lru_out[7],bot_lru_out[6], bot_lru_out[5],~bot_lru_out[4],
1421 ~bot_lru_out[3],bot_lru_out[2],~bot_lru_out[1],~bot_lru_out[0]};
1422////////////////////////////////////////////////////////////
1423// Manage the favor bit. //
1424////////////////////////////////////////////////////////////
1425assign set_favor_top = |bot_fpick[3:0] | favor_top ;
1426assign reset_favor_top = |top_fpick[3:0] ;
1427assign next_favor_top = set_favor_top & ~reset_favor_top ;
1428
1429ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 favor_top_reg (
1430 .scan_in(favor_top_reg_scanin),
1431 .scan_out(favor_top_reg_scanout),
1432 .l1clk(l1clk_pm1),
1433 .din (next_favor_top),
1434 .dout (favor_top),
1435 .siclk(siclk),
1436 .soclk(soclk)
1437);
1438
1439
1440
1441assign next_curr_fetch_f_bf[7:0] = hp_pick[7:0] ;
1442
1443
1444ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 curr_fetch_thr_f_reg (
1445 .scan_in(curr_fetch_thr_f_reg_scanin),
1446 .scan_out(curr_fetch_thr_f_reg_scanout),
1447 .l1clk(l1clk_pm1),
1448 .din (next_curr_fetch_f_bf[7:0]),
1449 .dout (ftp_curr_fetch_thr_f[7:0]),
1450 .siclk(siclk),
1451 .soclk(soclk)
1452);
1453
1454assign ftu_curr_fetch_thr_f[7:0] = ftp_curr_fetch_thr_f[7:0] ;
1455
1456
1457ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 curr_fetch_thr_c_reg (
1458 .scan_in(curr_fetch_thr_c_reg_scanin),
1459 .scan_out(curr_fetch_thr_c_reg_scanout),
1460 .l1clk(l1clk),
1461 .din (ftp_curr_fetch_thr_f[7:0]),
1462 .dout (ftp_curr_fetch_thr_c[7:0]),
1463 .siclk(siclk),
1464 .soclk(soclk)
1465);
1466
1467
1468assign ftp_fetch_thr_q_f[0] = ftp_curr_fetch_thr_f[0] & ftp_fetch_v_dup_f;
1469assign ftp_fetch_thr_q_f[1] = ftp_curr_fetch_thr_f[1] & ftp_fetch_v_dup_f;
1470assign ftp_fetch_thr_q_f[2] = ftp_curr_fetch_thr_f[2] & ftp_fetch_v_dup_f;
1471assign ftp_fetch_thr_q_f[3] = ftp_curr_fetch_thr_f[3] & ftp_fetch_v_dup_f;
1472assign ftp_fetch_thr_q_f[4] = ftp_curr_fetch_thr_f[4] & ftp_fetch_v_dup_f;
1473assign ftp_fetch_thr_q_f[5] = ftp_curr_fetch_thr_f[5] & ftp_fetch_v_dup_f;
1474assign ftp_fetch_thr_q_f[6] = ftp_curr_fetch_thr_f[6] & ftp_fetch_v_dup_f;
1475assign ftp_fetch_thr_q_f[7] = ftp_curr_fetch_thr_f[7] & ftp_fetch_v_dup_f;
1476
1477////////////////////////////////////////////////////////////////////////
1478////////////////////////////////////////////////////////////////////////
1479
1480assign next_ftp_fill_req_q = (cmu_any_data_ready & ~cmu_any_un_cacheable ) ;
1481
1482////////////////////////////////////////////////////////////////////////
1483////////////////////////////////////////////////////////////////////////
1484////////////////////////////////////////////////////////////////////////
1485ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 inv_line_reg (
1486 .scan_in(inv_line_reg_scanin),
1487 .scan_out(inv_line_reg_scanout),
1488 .l1clk( l1clk ),
1489 .din (cmu_icache_invalidate),
1490 .dout (inv_line_bf),
1491 .siclk(siclk),
1492 .soclk(soclk));
1493
1494////////////////////////////////////////////////////////////////////////
1495////////////////////////////////////////////////////////////////////////
1496////////////////////////////////////////////////////////////////////////
1497// Generate valid fetch signals. //
1498////////////////////////////////////////////////////////////////////////
1499assign next_fill_req = cmu_any_data_ready ;
1500ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 fill_req_bf_reg (
1501 .scan_in(fill_req_bf_reg_scanin),
1502 .scan_out(fill_req_bf_reg_scanout),
1503 .l1clk(l1clk),
1504 .din (next_fill_req),
1505 .dout (ftp_fill_req_bf),
1506 .siclk(siclk),
1507 .soclk(soclk)
1508);
1509
1510////////////////////////////////////////////////////////////////////////
1511////////////////////////////////////////////////////////////////////////
1512assign asi_rd_request = asi_ic_rd_req | asi_tg_rd_req | asi_itd_rd_req |
1513 asi_itt_rd_req | asi_ith_det_req;
1514
1515assign next_rd_is_first = (asi_rd_request & ~wr_request_pending) |
1516 (rd_request_pending & ~wr_request_pending & ~ftp_asi_rd_done) |
1517 (asi_rd_is_first & ~ftp_asi_rd_done);
1518
1519ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 rd_is_first_reg (
1520 .scan_in(rd_is_first_reg_scanin),
1521 .scan_out(rd_is_first_reg_scanout),
1522 .l1clk (l1clk),
1523 .din (next_rd_is_first),
1524 .dout (asi_rd_is_first),
1525 .siclk(siclk),
1526 .soclk(soclk)
1527);
1528
1529
1530assign asi_wr_request = asi_ic_wr_req | asi_tg_wr_req ;
1531assign next_wr_request_pending = asi_wr_request | (wr_request_pending & ~asi_wr_done_in);
1532assign next_rd_request_pending = asi_rd_request | (rd_request_pending & ~ftp_asi_rd_done);
1533
1534ifu_ftu_ftp_ctl_msff_ctl_macro__width_2 wr_request_pending_reg (
1535 .scan_in(wr_request_pending_reg_scanin),
1536 .scan_out(wr_request_pending_reg_scanout),
1537 .l1clk (l1clk),
1538 .din ({next_wr_request_pending,next_rd_request_pending}),
1539 .dout ({wr_request_pending,rd_request_pending}),
1540 .siclk(siclk),
1541 .soclk(soclk)
1542);
1543
1544assign asi_rd_ok = !wr_request_pending | asi_rd_is_first;
1545assign asi_wr_ok = wr_request_pending & !asi_rd_is_first;
1546
1547
1548assign next_ic_wr_req = asi_ic_wr_req | (ic_wr_req_ff & (ftp_fill_req_q_bf | !asi_wr_ok) ) ;
1549ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ic_wr_req_ff_reg (
1550 .scan_in(ic_wr_req_ff_reg_scanin),
1551 .scan_out(ic_wr_req_ff_reg_scanout),
1552 .l1clk(l1clk),
1553 .din (next_ic_wr_req),
1554 .dout (ic_wr_req_ff),
1555 .siclk(siclk),
1556 .soclk(soclk)
1557);
1558
1559
1560assign next_ic_rd_req = asi_ic_rd_req | (ic_rd_req_ff & (ftp_fill_req_q_bf | !asi_rd_ok)) ;
1561ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ic_rd_req_ff_reg (
1562 .scan_in(ic_rd_req_ff_reg_scanin),
1563 .scan_out(ic_rd_req_ff_reg_scanout),
1564 .l1clk(l1clk),
1565 .din (next_ic_rd_req),
1566 .dout (ic_rd_req_ff),
1567 .siclk(siclk),
1568 .soclk(soclk)
1569);
1570
1571
1572assign next_tg_wr_req = asi_tg_wr_req | (tg_wr_req_ff & (ftp_fill_req_q_bf | inv_line_bf | !asi_wr_ok)) ;
1573ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 tg_wr_req_ff_reg (
1574 .scan_in(tg_wr_req_ff_reg_scanin),
1575 .scan_out(tg_wr_req_ff_reg_scanout),
1576 .l1clk(l1clk),
1577 .din (next_tg_wr_req),
1578 .dout (tg_wr_req_ff),
1579 .siclk(siclk),
1580 .soclk(soclk)
1581);
1582
1583
1584assign next_tg_rd_req = asi_tg_rd_req | (tg_rd_req_ff & (ftp_fill_req_q_bf | !asi_rd_ok)) ;
1585ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 tg_rd_req_ff_reg (
1586 .scan_in(tg_rd_req_ff_reg_scanin),
1587 .scan_out(tg_rd_req_ff_reg_scanout),
1588 .l1clk(l1clk_pm1),
1589 .din (next_tg_rd_req),
1590 .dout (tg_rd_req_ff),
1591 .siclk(siclk),
1592 .soclk(soclk)
1593);
1594
1595
1596assign next_itt_rd_req = asi_itt_rd_req | (itt_rd_req_ff & (reload | reload_last | !asi_rd_ok)) ;
1597ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 itt_rd_req_ff_reg (
1598 .scan_in(itt_rd_req_ff_reg_scanin),
1599 .scan_out(itt_rd_req_ff_reg_scanout),
1600 .l1clk(l1clk_pm1),
1601 .din (next_itt_rd_req),
1602 .dout (itt_rd_req_ff),
1603 .siclk(siclk),
1604 .soclk(soclk)
1605);
1606
1607
1608assign next_itd_rd_req = asi_itd_rd_req | (itd_rd_req_ff & (reload | reload_last | !asi_rd_ok)) ;
1609ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 itd_rd_req_ff_reg (
1610 .scan_in(itd_rd_req_ff_reg_scanin),
1611 .scan_out(itd_rd_req_ff_reg_scanout),
1612 .l1clk(l1clk_pm1),
1613 .din (next_itd_rd_req),
1614 .dout (itd_rd_req_ff),
1615 .siclk(siclk),
1616 .soclk(soclk)
1617);
1618
1619assign next_ith_det_req = asi_ith_det_req | (ith_det_req_ff & (reload | reload_last | !asi_rd_ok)) ;
1620ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ith_det_req_ff_reg (
1621 .scan_in(ith_det_req_ff_reg_scanin),
1622 .scan_out(ith_det_req_ff_reg_scanout),
1623 .l1clk(l1clk_pm1),
1624 .din (next_ith_det_req),
1625 .dout (ith_det_req_ff),
1626 .siclk(siclk),
1627 .soclk(soclk)
1628);
1629
1630
1631assign next_itlb_probe_req_l = ~(asi_ith_det_req | (ith_det_req_ff & (reload | reload_last | !asi_rd_ok))) ;
1632ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 itlb_probe_l_reg (
1633 .scan_in(itlb_probe_l_reg_scanin),
1634 .scan_out(itlb_probe_l_reg_scanout),
1635 .l1clk(l1clk_pm1),
1636 .din (next_itlb_probe_req_l),
1637 .dout (ftp_itlb_probe_req_l),
1638 .siclk(siclk),
1639 .soclk(soclk)
1640);
1641
1642
1643ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 fill_req_bf_q_reg (
1644 .scan_in(fill_req_bf_q_reg_scanin),
1645 .scan_out(fill_req_bf_q_reg_scanout),
1646 .l1clk(l1clk_pm1),
1647 .din (next_ftp_fill_req_q),
1648 .dout (ftp_fill_req_q_bf),
1649 .siclk(siclk),
1650 .soclk(soclk)
1651);
1652
1653ifu_ftu_ftp_ctl_msff_ctl_macro__width_11 mbist_in_reg (
1654 .scan_in(mbist_in_reg_scanin),
1655 .scan_out(mbist_in_reg_scanout),
1656 .l1clk(l1clk),
1657 .din ({mbi_run, mbi_icd_read_en, mbi_ict_read_en,
1658 mbi_icd_write_en , mbi_ict_write_en,
1659 mbi_cmpsel[1:0] ,
1660 mbi_icv_read_en, mbi_icv_write_en, mbi_itb_cam_en_pre,ftp_itb_cam_en_1}),
1661 .dout ({mbi_run_bf, ftp_mbi_icd_read_en_bf,ftp_mbi_ict_read_en_bf,
1662 mbi_icd_write_en_bf,mbi_ict_write_en_bf,
1663 mbi_cmpsel_bf[1:0],
1664 ftp_mbi_icv_read_en_bf, ftp_mbi_icv_write_en_bf, ftp_itb_cam_en_1,ftp_itb_cam_en_2}),
1665 .siclk(siclk),
1666 .soclk(soclk));
1667
1668assign ftp_sel_icv_mbist_addr = ftp_mbi_icv_read_en_bf | ftp_mbi_icv_write_en_bf ;
1669assign ftp_ict_data_sel_bf[0] = ftp_fill_req_q_bf & ~mbi_run_bf;
1670assign ftp_ict_data_sel_bf[1] = ~ftp_fill_req_q_bf & ~mbi_run_bf;
1671assign ftp_ict_data_sel_bf[2] = mbi_run_bf ;
1672
1673assign ftp_ic_rd_req_bf = mbi_run_bf ? ftp_mbi_icd_read_en_bf : (ftp_fetch_v_bf | (ic_rd_req_ff & ~ftp_fill_req_q_bf & asi_rd_ok)) ;
1674assign ftp_ic_wr_req_bf = mbi_run_bf ? mbi_icd_write_en_bf : (ftp_fill_req_q_bf | (ic_wr_req_ff & asi_wr_ok)) ;
1675assign ftp_ic_wr_ps_en_bf = (mbi_run_bf & mbi_icd_write_en_bf) | (~mbi_run_bf & (ftp_fill_req_q_bf | ic_wr_req_ff)) | ~ifu_ic_pmen;
1676
1677assign ftp_tg_rd_req_bf = mbi_run_bf ? ftp_mbi_ict_read_en_bf : (ftp_fetch_v_bf | (tg_rd_req_ff & ~ftp_fill_req_q_bf & asi_rd_ok)) ;
1678assign ftp_tg_wr_req_bf = mbi_run_bf ? mbi_ict_write_en_bf : (ftp_fill_req_q_bf | (tg_wr_req_ff & asi_wr_ok & ~inv_line_bf)) ;
1679assign ftp_iv_rd_req_bf = mbi_run_bf ? ftp_mbi_icv_read_en_bf : (ftp_fetch_v_bf | (tg_rd_req_ff & asi_rd_ok & ~ftp_fill_req_q_bf)) ;
1680
1681assign ftp_tg_clk_en = mbi_run_bf | tg_rd_req_ff | tg_wr_req_ff | ftp_fill_req_q_bf | ftp_fetch_v_bf | ~ifu_ic_pmen;
1682
1683assign ftp_itt_rd_req_bf = itt_rd_req_ff & ~(reload | reload_last) & asi_rd_ok;
1684assign ftp_itd_rd_req_bf = itd_rd_req_ff & ~(reload | reload_last) & asi_rd_ok;
1685assign ftp_ith_det_req_bf = ith_det_req_ff & ~(reload | reload_last) & asi_rd_ok;
1686// assign ftp_itlb_probe_req_l = ~ith_det_req_ff ;
1687assign ftp_itlb_cam_vld_bf = (ftp_fetch_v_bf & ~ftp_bypass_bf & ~mbi_run_bf) |
1688 (ftp_ith_det_req_bf & ~mbi_run_bf) |
1689 (ftp_itb_cam_en_2 & mbi_run_bf) ;
1690
1691ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 itlb_cam_vld_reg (
1692 .scan_in(itlb_cam_vld_reg_scanin),
1693 .scan_out(itlb_cam_vld_reg_scanout),
1694 .din (ftp_itlb_cam_vld_bf ),
1695 .dout (ftp_itlb_cam_vld_f ),
1696 .l1clk(l1clk),
1697 .siclk(siclk),
1698 .soclk(soclk)
1699);
1700
1701//////////////////////////////////////////////////////////////////////
1702// ITLB bypass control
1703
1704ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 itlb_bypass_lat (
1705 .scan_in(itlb_bypass_lat_scanin),
1706 .scan_out(itlb_bypass_lat_scanout),
1707 .din (tlu_itlb_bypass [7:0] ),
1708 .dout (itlb_bypass [7:0] ),
1709 .l1clk(l1clk),
1710 .siclk(siclk),
1711 .soclk(soclk)
1712);
1713
1714
1715assign pre_bypass_bf[7:0] = ftp_ith_det_req_bf ? 8'h00 :
1716 itlb_bypass[7:0];
1717
1718
1719assign ftp_bypass_bf = (| (ftp_itb_fetch_thr_bf[7:0] & pre_bypass_bf[7:0]));
1720/////////////////////////////////////////////////////////////////////
1721
1722
1723assign ic_rd_req_done_in = (ic_rd_req_ff & ~ftp_fill_req_q_bf & asi_rd_ok);
1724ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ic_rd_done_f_reg (
1725 .scan_in(ic_rd_done_f_reg_scanin),
1726 .scan_out(ic_rd_done_f_reg_scanout),
1727 .l1clk(l1clk_pm1),
1728 .din (ic_rd_req_done_in),
1729 .dout (ic_rd_req_done_f),
1730 .siclk(siclk),
1731 .soclk(soclk)
1732);
1733
1734ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ic_rd_done_c_reg (
1735 .scan_in(ic_rd_done_c_reg_scanin),
1736 .scan_out(ic_rd_done_c_reg_scanout),
1737 .l1clk(l1clk_pm1),
1738 .din (ic_rd_req_done_f),
1739 .dout (ic_rd_req_done_c),
1740 .siclk(siclk),
1741 .soclk(soclk)
1742);
1743
1744ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ic_rd_done_p_reg (
1745 .scan_in(ic_rd_done_p_reg_scanin),
1746 .scan_out(ic_rd_done_p_reg_scanout),
1747 .l1clk(l1clk_pm1),
1748 .din (ic_rd_req_done_c),
1749 .dout (ic_rd_req_done_p),
1750 .siclk(siclk),
1751 .soclk(soclk)
1752);
1753
1754assign ic_wr_req_done_in = (ic_wr_req_ff & ~ftp_fill_req_q_bf & asi_wr_ok);
1755ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 ic_wr_done_f_reg (
1756 .scan_in(ic_wr_done_f_reg_scanin),
1757 .scan_out(ic_wr_done_f_reg_scanout),
1758 .l1clk(l1clk_pm1),
1759 .din (ic_wr_req_done_in),
1760 .dout (ic_wr_req_done_f),
1761 .siclk(siclk),
1762 .soclk(soclk)
1763);
1764
1765assign ftp_asi_ic_rd_done = ic_rd_req_done_p ;
1766assign ftp_asi_ic_wr_done = ic_wr_req_done_f ;
1767
1768assign tg_rd_req_done_in = (tg_rd_req_ff & ~ftp_fill_req_q_bf & asi_rd_ok);
1769ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 tg_rd_done_f_reg (
1770 .scan_in(tg_rd_done_f_reg_scanin),
1771 .scan_out(tg_rd_done_f_reg_scanout),
1772 .l1clk(l1clk_pm1),
1773 .din (tg_rd_req_done_in),
1774 .dout (tg_rd_req_done_f),
1775 .siclk(siclk),
1776 .soclk(soclk)
1777);
1778
1779ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 tg_rd_done_c_reg (
1780 .scan_in(tg_rd_done_c_reg_scanin),
1781 .scan_out(tg_rd_done_c_reg_scanout),
1782 .l1clk(l1clk_pm1),
1783 .din (tg_rd_req_done_f),
1784 .dout (tg_rd_req_done_c),
1785 .siclk(siclk),
1786 .soclk(soclk)
1787);
1788
1789
1790assign tg_wr_req_done_in = (tg_wr_req_ff & ~(ftp_fill_req_q_bf | inv_line_bf) & asi_wr_ok);
1791ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 tg_wr_done_f_reg (
1792 .scan_in(tg_wr_done_f_reg_scanin),
1793 .scan_out(tg_wr_done_f_reg_scanout),
1794 .l1clk(l1clk_pm1),
1795 .din (tg_wr_req_done_in),
1796 .dout (tg_wr_req_done_f),
1797 .siclk(siclk),
1798 .soclk(soclk)
1799);
1800
1801assign ftp_asi_tg_rd_done = tg_rd_req_done_c ;
1802assign ftp_asi_tg_wr_done = tg_wr_req_done_f ;
1803assign ftp_asi_tg_wr_req_hold = tg_wr_req_ff ;
1804
1805assign it_rd_req_done_in = ((itt_rd_req_ff | itd_rd_req_ff | ith_det_req_ff) & ~(reload | reload_last) & asi_rd_ok);
1806ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 it_rd_done_f_reg (
1807 .scan_in(it_rd_done_f_reg_scanin),
1808 .scan_out(it_rd_done_f_reg_scanout),
1809 .l1clk(l1clk_pm1),
1810 .din (it_rd_req_done_in),
1811 .dout (it_rd_req_done_f),
1812 .siclk(siclk),
1813 .soclk(soclk)
1814);
1815
1816ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 it_rd_done_c_reg (
1817 .scan_in(it_rd_done_c_reg_scanin),
1818 .scan_out(it_rd_done_c_reg_scanout),
1819 .l1clk(l1clk_pm1),
1820 .din (it_rd_req_done_f),
1821 .dout (it_rd_req_done_c),
1822 .siclk(siclk),
1823 .soclk(soclk)
1824);
1825
1826assign asi_rd_done_in = ftp_asi_ic_rd_done | ftp_asi_tg_rd_done | ftp_asi_it_rd_done_p ;
1827assign asi_wr_done_in = ftp_asi_ic_wr_done | ftp_asi_tg_wr_done;
1828
1829
1830ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 asi_rd_done_reg (
1831 .scan_in(asi_rd_done_reg_scanin),
1832 .scan_out(asi_rd_done_reg_scanout),
1833 .l1clk (l1clk),
1834 .din( asi_rd_done_in),
1835 .dout( ftp_asi_rd_done),
1836 .siclk(siclk),
1837 .soclk(soclk));
1838
1839ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 asi_wr_done_reg (
1840 .scan_in(asi_wr_done_reg_scanin),
1841 .scan_out(asi_wr_done_reg_scanout),
1842 .l1clk (l1clk),
1843 .din( asi_wr_done_in),
1844 .dout( ftp_asi_wr_done),
1845 .siclk(siclk),
1846 .soclk(soclk));
1847
1848ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 asi_it_rd_done_reg (
1849 .scan_in(asi_it_rd_done_reg_scanin),
1850 .scan_out(asi_it_rd_done_reg_scanout),
1851 .l1clk (l1clk),
1852 .din (ftp_asi_it_rd_done),
1853 .dout (ftp_asi_it_rd_done_p),
1854 .siclk(siclk),
1855 .soclk(soclk)
1856);
1857
1858
1859////////////////////////////////////////////////////////////////////////////////////
1860assign next_sel_mbist_itb_cycle0 = mbi_run_bf & ~mbi_cmpsel_bf[1] & ~mbi_cmpsel_bf[0];
1861assign next_sel_mbist_itb_cycle1 = mbi_run_bf & ~mbi_cmpsel_bf[1] & mbi_cmpsel_bf[0];
1862assign next_sel_mbist_itb_cycle2 = mbi_run_bf & mbi_cmpsel_bf[1] & ~mbi_cmpsel_bf[0];
1863assign next_sel_mbist_itb_cycle3 = mbi_run_bf & mbi_cmpsel_bf[1] & mbi_cmpsel_bf[0];
1864
1865assign next_sel_itlb_tag = (itt_rd_req_ff & ~(reload | reload_last) & asi_rd_ok) ;
1866ifu_ftu_ftp_ctl_msff_ctl_macro__width_5 itlb_sel_tag_f_reg (
1867 .scan_in(itlb_sel_tag_f_reg_scanin),
1868 .scan_out(itlb_sel_tag_f_reg_scanout),
1869 .l1clk(l1clk_pm1),
1870 .din ({next_sel_itlb_tag,next_sel_mbist_itb_cycle0,next_sel_mbist_itb_cycle1,
1871 next_sel_mbist_itb_cycle2, next_sel_mbist_itb_cycle3}),
1872 .dout ({ftp_sel_itlb_tag_f,ftp_sel_mbist_itb_cycle0,ftp_sel_mbist_itb_cycle1,
1873 ftp_sel_mbist_itb_cycle2,ftp_sel_mbist_itb_cycle3}),
1874 .siclk(siclk),
1875 .soclk(soclk)
1876);
1877assign next_sel_itlb_data = (itd_rd_req_ff & ~(reload | reload_last) & asi_rd_ok) ;
1878ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 itlb_sel_data_f_reg (
1879 .scan_in(itlb_sel_data_f_reg_scanin),
1880 .scan_out(itlb_sel_data_f_reg_scanout),
1881 .l1clk(l1clk_pm1),
1882 .din (next_sel_itlb_data),
1883 .dout (ftp_sel_itlb_data_f),
1884 .siclk(siclk),
1885 .soclk(soclk)
1886);
1887assign next_sel_itlb_pa = (ith_det_req_ff & ~(reload | reload_last) & asi_rd_ok) ;
1888ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 itlb_sel_pa_f_reg (
1889 .scan_in(itlb_sel_pa_f_reg_scanin),
1890 .scan_out(itlb_sel_pa_f_reg_scanout),
1891 .l1clk(l1clk_pm1),
1892 .din (next_sel_itlb_pa),
1893 .dout (ftp_sel_itlb_pa_f),
1894 .siclk(siclk),
1895 .soclk(soclk)
1896);
1897
1898assign sel_itlb_tag_cntx0_f = ftp_sel_itlb_tag_f & asi_sel_cntx_0 ;
1899assign sel_itlb_tag_cntx1_f = ftp_sel_itlb_tag_f & ~asi_sel_cntx_0 ;
1900ifu_ftu_ftp_ctl_msff_ctl_macro__width_4 itlb_sel_c_reg (
1901 .scan_in(itlb_sel_c_reg_scanin),
1902 .scan_out(itlb_sel_c_reg_scanout),
1903 .l1clk(l1clk_pm1 ),
1904 .din ({sel_itlb_tag_cntx0_f,sel_itlb_tag_cntx1_f,ftp_sel_itlb_data_f,ftp_sel_itlb_pa_f}),
1905 .dout ({ftp_sel_itlb_tag_cntx0_c,ftp_sel_itlb_tag_cntx1_c, ftp_sel_itlb_data_c,ftp_sel_itlb_pa_c}),
1906 .siclk(siclk),
1907 .soclk(soclk)
1908);
1909
1910assign ftp_asi_it_rd_done = it_rd_req_done_c ;
1911
1912assign ftp_asi_mbist_access_bf = ic_wr_req_done_in | ic_rd_req_done_in | mbi_run_bf;
1913
1914////////////////////////////////////////////////////////////////////////////////////
1915/// Killing the instructions can be moved to F and C stage for timing reasons later
1916////////////////////////////////////////////////////////////////////////////////////
1917
1918assign trap_thread_g0[0] = ~tlu_trap_0_tid[1] & ~tlu_trap_0_tid[0] ;
1919assign trap_thread_g0[1] = ~tlu_trap_0_tid[1] & tlu_trap_0_tid[0] ;
1920assign trap_thread_g0[2] = tlu_trap_0_tid[1] & ~tlu_trap_0_tid[0] ;
1921assign trap_thread_g0[3] = tlu_trap_0_tid[1] & tlu_trap_0_tid[0] ;
1922
1923assign trap_thread_g1[0] = ~tlu_trap_1_tid[1] & ~tlu_trap_1_tid[0] ;
1924assign trap_thread_g1[1] = ~tlu_trap_1_tid[1] & tlu_trap_1_tid[0] ;
1925assign trap_thread_g1[2] = tlu_trap_1_tid[1] & ~tlu_trap_1_tid[0] ;
1926assign trap_thread_g1[3] = tlu_trap_1_tid[1] & tlu_trap_1_tid[0] ;
1927
1928assign thr0_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[0] ;
1929assign thr1_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[1] ;
1930assign thr2_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[2] ;
1931assign thr3_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[3] ;
1932
1933assign thr4_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[0] ;
1934assign thr5_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[1] ;
1935assign thr6_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[2] ;
1936assign thr7_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[3] ;
1937
1938assign load_flush_w[0] = dec_load_flush_w[0] & tid_dec_w[0] ;
1939assign load_flush_w[1] = dec_load_flush_w[0] & tid_dec_w[1] ;
1940assign load_flush_w[2] = dec_load_flush_w[0] & tid_dec_w[2] ;
1941assign load_flush_w[3] = dec_load_flush_w[0] & tid_dec_w[3] ;
1942assign load_flush_w[4] = dec_load_flush_w[1] & tid_dec_w[4] ;
1943assign load_flush_w[5] = dec_load_flush_w[1] & tid_dec_w[5] ;
1944assign load_flush_w[6] = dec_load_flush_w[1] & tid_dec_w[6] ;
1945assign load_flush_w[7] = dec_load_flush_w[1] & tid_dec_w[7] ;
1946
1947assign ftp_thr0_trprdpc_sel_bf[0] = thr0_trap_pcaddr_is_valid_bf ;
1948assign ftp_thr0_trprdpc_sel_bf[1] = load_flush_w[0] & ~thr0_trap_pcaddr_is_valid_bf;
1949assign ftp_thr0_trprdpc_sel_bf[2] = ~load_flush_w[0] & ~thr0_trap_pcaddr_is_valid_bf ;
1950
1951assign ftp_thr1_trprdpc_sel_bf[0] = thr1_trap_pcaddr_is_valid_bf ;
1952assign ftp_thr1_trprdpc_sel_bf[1] = load_flush_w[1] & ~thr1_trap_pcaddr_is_valid_bf;
1953assign ftp_thr1_trprdpc_sel_bf[2] = ~load_flush_w[1] & ~thr1_trap_pcaddr_is_valid_bf ;
1954
1955assign ftp_thr2_trprdpc_sel_bf[0] = thr2_trap_pcaddr_is_valid_bf ;
1956assign ftp_thr2_trprdpc_sel_bf[1] = load_flush_w[2] & ~thr2_trap_pcaddr_is_valid_bf;
1957assign ftp_thr2_trprdpc_sel_bf[2] = ~load_flush_w[2] & ~thr2_trap_pcaddr_is_valid_bf ;
1958
1959assign ftp_thr3_trprdpc_sel_bf[0] = thr3_trap_pcaddr_is_valid_bf ;
1960assign ftp_thr3_trprdpc_sel_bf[1] = load_flush_w[3] & ~thr3_trap_pcaddr_is_valid_bf;
1961assign ftp_thr3_trprdpc_sel_bf[2] = ~load_flush_w[3] & ~thr3_trap_pcaddr_is_valid_bf ;
1962
1963
1964assign ftp_thr4_trprdpc_sel_bf[0] = thr4_trap_pcaddr_is_valid_bf ;
1965assign ftp_thr4_trprdpc_sel_bf[1] = load_flush_w[4] & ~thr4_trap_pcaddr_is_valid_bf;
1966assign ftp_thr4_trprdpc_sel_bf[2] = ~load_flush_w[4] & ~thr4_trap_pcaddr_is_valid_bf ;
1967
1968assign ftp_thr5_trprdpc_sel_bf[0] = thr5_trap_pcaddr_is_valid_bf ;
1969assign ftp_thr5_trprdpc_sel_bf[1] = load_flush_w[5] & ~thr5_trap_pcaddr_is_valid_bf;
1970assign ftp_thr5_trprdpc_sel_bf[2] = ~load_flush_w[5] & ~thr5_trap_pcaddr_is_valid_bf ;
1971
1972assign ftp_thr6_trprdpc_sel_bf[0] = thr6_trap_pcaddr_is_valid_bf ;
1973assign ftp_thr6_trprdpc_sel_bf[1] = load_flush_w[6] & ~thr6_trap_pcaddr_is_valid_bf;
1974assign ftp_thr6_trprdpc_sel_bf[2] = ~load_flush_w[6] & ~thr6_trap_pcaddr_is_valid_bf ;
1975
1976assign ftp_thr7_trprdpc_sel_bf[0] = thr7_trap_pcaddr_is_valid_bf ;
1977assign ftp_thr7_trprdpc_sel_bf[1] = load_flush_w[7] & ~thr7_trap_pcaddr_is_valid_bf;
1978assign ftp_thr7_trprdpc_sel_bf[2] = ~load_flush_w[7] & ~thr7_trap_pcaddr_is_valid_bf ;
1979
1980
1981
1982assign thr0_red_no_br_bf = thr0_trap_pcaddr_is_valid_bf | load_flush_w[0] ;
1983assign thr1_red_no_br_bf = thr1_trap_pcaddr_is_valid_bf | load_flush_w[1] ;
1984assign thr2_red_no_br_bf = thr2_trap_pcaddr_is_valid_bf | load_flush_w[2] ;
1985assign thr3_red_no_br_bf = thr3_trap_pcaddr_is_valid_bf | load_flush_w[3] ;
1986assign thr4_red_no_br_bf = thr4_trap_pcaddr_is_valid_bf | load_flush_w[4] ;
1987assign thr5_red_no_br_bf = thr5_trap_pcaddr_is_valid_bf | load_flush_w[5] ;
1988assign thr6_red_no_br_bf = thr6_trap_pcaddr_is_valid_bf | load_flush_w[6] ;
1989assign thr7_red_no_br_bf = thr7_trap_pcaddr_is_valid_bf | load_flush_w[7] ;
1990
1991
1992
1993
1994
1995ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 thrx_redirect_reg (
1996 .scan_in(thrx_redirect_reg_scanin),
1997 .scan_out(thrx_redirect_reg_scanout),
1998 .l1clk( l1clk ),
1999 .din ({thr7_red_no_br_bf,thr6_red_no_br_bf,thr5_red_no_br_bf,thr4_red_no_br_bf,
2000 thr3_red_no_br_bf,thr2_red_no_br_bf,thr1_red_no_br_bf,thr0_red_no_br_bf}),
2001 .dout ({thr7_redirect_part_bf,thr6_redirect_part_bf,thr5_redirect_part_bf,thr4_redirect_part_bf,
2002 thr3_redirect_part_bf,thr2_redirect_part_bf,thr1_redirect_part_bf,thr0_redirect_part_bf}),
2003 .siclk(siclk),
2004 .soclk(soclk));
2005
2006assign thr0_redirect_bf = thr0_redirect_part_bf | ftp_tlu_flush_f[0] | thr0_br_taken_ff ;
2007assign thr1_redirect_bf = thr1_redirect_part_bf | ftp_tlu_flush_f[1] | thr1_br_taken_ff ;
2008assign thr2_redirect_bf = thr2_redirect_part_bf | ftp_tlu_flush_f[2] | thr2_br_taken_ff ;
2009assign thr3_redirect_bf = thr3_redirect_part_bf | ftp_tlu_flush_f[3] | thr3_br_taken_ff ;
2010assign thr4_redirect_bf = thr4_redirect_part_bf | ftp_tlu_flush_f[4] | thr4_br_taken_ff ;
2011assign thr5_redirect_bf = thr5_redirect_part_bf | ftp_tlu_flush_f[5] | thr5_br_taken_ff ;
2012assign thr6_redirect_bf = thr6_redirect_part_bf | ftp_tlu_flush_f[6] | thr6_br_taken_ff ;
2013assign thr7_redirect_bf = thr7_redirect_part_bf | ftp_tlu_flush_f[7] | thr7_br_taken_ff ;
2014
2015
2016assign kill_fetch_fv_bf = (((thr0_red_no_br_bf | agc_thr0_micro_flush_unq_c )
2017 & ftp_curr_fetch_thr_bf[0])|
2018 ((thr1_red_no_br_bf | agc_thr1_micro_flush_unq_c )
2019 & ftp_curr_fetch_thr_bf[1])|
2020 ((thr2_red_no_br_bf | agc_thr2_micro_flush_unq_c )
2021 & ftp_curr_fetch_thr_bf[2])|
2022 ((thr3_red_no_br_bf | agc_thr3_micro_flush_unq_c )
2023 & ftp_curr_fetch_thr_bf[3])|
2024 ((thr4_red_no_br_bf | agc_thr4_micro_flush_unq_c )
2025 & ftp_curr_fetch_thr_bf[4])|
2026 ((thr5_red_no_br_bf | agc_thr5_micro_flush_unq_c )
2027 & ftp_curr_fetch_thr_bf[5])|
2028 ((thr6_red_no_br_bf | agc_thr6_micro_flush_unq_c )
2029 & ftp_curr_fetch_thr_bf[6])|
2030 ((thr7_red_no_br_bf | agc_thr7_micro_flush_unq_c )
2031 & ftp_curr_fetch_thr_bf[7])) ;
2032
2033assign ftp_fetch_v_bf = (hp_pickready ) ;
2034
2035
2036assign next_fetch_fv_unq_bf = ((hp_pickready & ~kill_fetch_fv_bf) );
2037
2038
2039ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 fetch_v_f_reg (
2040 .scan_in(fetch_v_f_reg_scanin),
2041 .scan_out(fetch_v_f_reg_scanout),
2042 .l1clk(l1clk_pm1),
2043 .din (next_fetch_fv_unq_bf),
2044 .dout (ftp_fetch_v_unq_f),
2045 .siclk(siclk),
2046 .soclk(soclk)
2047);
2048
2049ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 fetch_v_f_dup_reg (
2050 .scan_in(fetch_v_f_dup_reg_scanin),
2051 .scan_out(fetch_v_f_dup_reg_scanout),
2052 .l1clk(l1clk_pm1),
2053 .din (next_fetch_fv_unq_bf),
2054 .dout (ftp_fetch_v_unq_dup_f),
2055 .siclk(siclk),
2056 .soclk(soclk)
2057);
2058
2059
2060assign br_redirect_disqual = (br_taken_ff[0] & br0_matches_curr_f) |
2061 (br_taken_ff[1] & br1_matches_curr_f) ;
2062
2063assign br_redirect_dup_disqual = (br_taken_ff[0] & br0_matches_curr_f) |
2064 (br_taken_ff[1] & br1_matches_curr_f) ;
2065
2066assign ftp_fetch_v_dup_f = ftp_fetch_v_unq_dup_f & ~br_redirect_dup_disqual;
2067assign ftp_fetch_v_f = ftp_fetch_v_unq_f & ~br_redirect_disqual;
2068
2069assign next_fetch_v_c_f = ftp_fetch_v_dup_f ; //
2070ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 fetch_v_c_reg (
2071 .scan_in(fetch_v_c_reg_scanin),
2072 .scan_out(fetch_v_c_reg_scanout),
2073 .l1clk(l1clk_pm1),
2074 .din (next_fetch_v_c_f),
2075 .dout (ftp_fetch_v_c_unq),
2076 .siclk(siclk),
2077 .soclk(soclk)
2078);
2079
2080assign ftp_fetch_v_c = ftp_fetch_v_c_unq & ~agc_kill_fetch_cv_c ;
2081assign next_enabled_thread[7:0] = spc_core_running_status[7:0] ;
2082ifu_ftu_ftp_ctl_msff_ctl_macro__width_10 enabled_thr_reg (
2083 .scan_in(enabled_thr_reg_scanin),
2084 .scan_out(enabled_thr_reg_scanout),
2085 .l1clk(l1clk),
2086 .din ({next_enabled_thread[7:0],lsu_ifu_ftu_pmen,lsu_ic_pmen}),
2087 .dout ({enabled_threads[7:0],ifu_ftu_pmen,ifu_ic_pmen}),
2088 .siclk(siclk),
2089 .soclk(soclk)
2090);
2091
2092
2093assign ftp_any_thr_clken = |enabled_threads[7:0] | (~ifu_ftu_pmen) | mbi_run_bf;
2094
2095
2096
2097
2098////////////////////////////////////////////////////////////////////////
2099////////////////////////////////////////////////////////////////////////
2100assign thr0_br_taken_ff = br_taken_ff[0] & ~tid0_m[1] & ~tid0_m[0] ;
2101assign thr1_br_taken_ff = br_taken_ff[0] & ~tid0_m[1] & tid0_m[0] ;
2102assign thr2_br_taken_ff = br_taken_ff[0] & tid0_m[1] & ~tid0_m[0] ;
2103assign thr3_br_taken_ff = br_taken_ff[0] & tid0_m[1] & tid0_m[0] ;
2104assign thr4_br_taken_ff = br_taken_ff[1] & ~tid1_m[1] & ~tid1_m[0] ;
2105assign thr5_br_taken_ff = br_taken_ff[1] & ~tid1_m[1] & tid1_m[0] ;
2106assign thr6_br_taken_ff = br_taken_ff[1] & tid1_m[1] & ~tid1_m[0] ;
2107assign thr7_br_taken_ff = br_taken_ff[1] & tid1_m[1] & tid1_m[0] ;
2108
2109
2110assign ftp_thr0_sel_br_bf = br_taken_ff[0] & ~tid0_m[1] & ~tid0_m[0] ;
2111assign ftp_thr1_sel_br_bf = br_taken_ff[0] & ~tid0_m[1] & tid0_m[0] ;
2112assign ftp_thr2_sel_br_bf = br_taken_ff[0] & tid0_m[1] & ~tid0_m[0] ;
2113assign ftp_thr3_sel_br_bf = br_taken_ff[0] & tid0_m[1] & tid0_m[0] ;
2114
2115assign ftp_thr4_sel_br_bf = br_taken_ff[1] & ~tid1_m[1] & ~tid1_m[0] ;
2116assign ftp_thr5_sel_br_bf = br_taken_ff[1] & ~tid1_m[1] & tid1_m[0] ;
2117assign ftp_thr6_sel_br_bf = br_taken_ff[1] & tid1_m[1] & ~tid1_m[0] ;
2118assign ftp_thr7_sel_br_bf = br_taken_ff[1] & tid1_m[1] & tid1_m[0] ;
2119
2120
2121assign br_room_reset[0] = thr0_br_taken_ff & ~ftp_curr_fetch_thr_bf[0];
2122assign br_room_reset[1] = thr1_br_taken_ff & ~ftp_curr_fetch_thr_bf[1];
2123assign br_room_reset[2] = thr2_br_taken_ff & ~ftp_curr_fetch_thr_bf[2];
2124assign br_room_reset[3] = thr3_br_taken_ff & ~ftp_curr_fetch_thr_bf[3];
2125assign br_room_reset[4] = thr4_br_taken_ff & ~ftp_curr_fetch_thr_bf[4];
2126assign br_room_reset[5] = thr5_br_taken_ff & ~ftp_curr_fetch_thr_bf[5];
2127assign br_room_reset[6] = thr6_br_taken_ff & ~ftp_curr_fetch_thr_bf[6];
2128assign br_room_reset[7] = thr7_br_taken_ff & ~ftp_curr_fetch_thr_bf[7];
2129////////////////////////////////////////////////////////////////////////
2130////////////////////////////////////////////////////////////////////////
2131////////////////////////////////////////////////////////////////////////
2132////////////////////////////////////////////////////////////////////////
2133// Generate buffer space available, taking into consideration any //
2134// fetches in progress. //
2135////////////////////////////////////////////////////////////////////////
2136////////////////////////////////////////////////////////////////////////////////////////
2137// Room should refelect the actual data in flight including by_pass that will be at C//
2138// two cycles from now. //
2139////////////////////////////////////////////////////////////////////////////////////////
2140assign ftp_thr0_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[0] | thr0_by_pass_2_cycles_at_c;
2141assign ftp_thr1_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[1] | thr1_by_pass_2_cycles_at_c;
2142assign ftp_thr2_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[2] | thr2_by_pass_2_cycles_at_c;
2143assign ftp_thr3_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[3] | thr3_by_pass_2_cycles_at_c;
2144assign ftp_thr4_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[4] | thr4_by_pass_2_cycles_at_c;
2145assign ftp_thr5_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[5] | thr5_by_pass_2_cycles_at_c;
2146assign ftp_thr6_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[6] | thr6_by_pass_2_cycles_at_c;
2147assign ftp_thr7_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[7] | thr7_by_pass_2_cycles_at_c;
2148
2149
2150
2151////////////////////////////////////////////////////////////////////////////////////////
2152// Room should refelect the actual data in flight including by_pass that will be at C//
2153// next cycle. //
2154////////////////////////////////////////////////////////////////////////////////////////
2155assign ftp_thr0_fetch_v_f = (ftp_curr_fetch_thr_f[0] & ftp_fetch_v_dup_f ) | (thr0_by_pass_next_cycle_at_c);
2156assign ftp_thr1_fetch_v_f = (ftp_curr_fetch_thr_f[1] & ftp_fetch_v_dup_f ) | (thr1_by_pass_next_cycle_at_c);
2157assign ftp_thr2_fetch_v_f = (ftp_curr_fetch_thr_f[2] & ftp_fetch_v_dup_f ) | (thr2_by_pass_next_cycle_at_c);
2158assign ftp_thr3_fetch_v_f = (ftp_curr_fetch_thr_f[3] & ftp_fetch_v_dup_f ) | (thr3_by_pass_next_cycle_at_c);
2159assign ftp_thr4_fetch_v_f = (ftp_curr_fetch_thr_f[4] & ftp_fetch_v_dup_f ) | (thr4_by_pass_next_cycle_at_c);
2160assign ftp_thr5_fetch_v_f = (ftp_curr_fetch_thr_f[5] & ftp_fetch_v_dup_f ) | (thr5_by_pass_next_cycle_at_c);
2161assign ftp_thr6_fetch_v_f = (ftp_curr_fetch_thr_f[6] & ftp_fetch_v_dup_f ) | (thr6_by_pass_next_cycle_at_c);
2162assign ftp_thr7_fetch_v_f = (ftp_curr_fetch_thr_f[7] & ftp_fetch_v_dup_f ) | (thr7_by_pass_next_cycle_at_c);
2163////////////////////////////////////////////////////////////////////////////////////////
2164// Room should refelect the actual data in flight including by_pass at C //
2165////////////////////////////////////////////////////////////////////////////////////////
2166assign ftp_thr0_fetch_v_c = (ftp_curr_fetch_thr_c[0] & ftp_fetch_v_c & ~ftp_tlu_flush_f[0]) | thr0_by_pass_is_at_c ;
2167assign ftp_thr1_fetch_v_c = (ftp_curr_fetch_thr_c[1] & ftp_fetch_v_c & ~ftp_tlu_flush_f[1]) | thr1_by_pass_is_at_c ;
2168assign ftp_thr2_fetch_v_c = (ftp_curr_fetch_thr_c[2] & ftp_fetch_v_c & ~ftp_tlu_flush_f[2]) | thr2_by_pass_is_at_c ;
2169assign ftp_thr3_fetch_v_c = (ftp_curr_fetch_thr_c[3] & ftp_fetch_v_c & ~ftp_tlu_flush_f[3]) | thr3_by_pass_is_at_c ;
2170assign ftp_thr4_fetch_v_c = (ftp_curr_fetch_thr_c[4] & ftp_fetch_v_c & ~ftp_tlu_flush_f[4]) | thr4_by_pass_is_at_c ;
2171assign ftp_thr5_fetch_v_c = (ftp_curr_fetch_thr_c[5] & ftp_fetch_v_c & ~ftp_tlu_flush_f[5]) | thr5_by_pass_is_at_c ;
2172assign ftp_thr6_fetch_v_c = (ftp_curr_fetch_thr_c[6] & ftp_fetch_v_c & ~ftp_tlu_flush_f[6]) | thr6_by_pass_is_at_c ;
2173assign ftp_thr7_fetch_v_c = (ftp_curr_fetch_thr_c[7] & ftp_fetch_v_c & ~ftp_tlu_flush_f[7]) | thr7_by_pass_is_at_c ;
2174
2175
2176assign thr0_is_empty_c = ibu_empty[0] ;
2177assign thr1_is_empty_c = ibu_empty[1] ;
2178assign thr2_is_empty_c = ibu_empty[2] ;
2179assign thr3_is_empty_c = ibu_empty[3] ;
2180assign thr4_is_empty_c = ibu_empty[4] ;
2181assign thr5_is_empty_c = ibu_empty[5] ;
2182assign thr6_is_empty_c = ibu_empty[6] ;
2183assign thr7_is_empty_c = ibu_empty[7] ;
2184
2185
2186
2187assign thr0_room_4ormore = ibu_room_4ormore[0] ;
2188assign thr1_room_4ormore = ibu_room_4ormore[1] ;
2189assign thr2_room_4ormore = ibu_room_4ormore[2] ;
2190assign thr3_room_4ormore = ibu_room_4ormore[3] ;
2191assign thr4_room_4ormore = ibu_room_4ormore[4] ;
2192assign thr5_room_4ormore = ibu_room_4ormore[5] ;
2193assign thr6_room_4ormore = ibu_room_4ormore[6] ;
2194assign thr7_room_4ormore = ibu_room_4ormore[7] ;
2195
2196
2197
2198assign ftp_thr0_room_is_less_t_3 = ((!thr0_is_empty_c & !thr0_room_4ormore) |
2199 ( ftp_thr0_fetch_v_wo_br_bf & ftp_thr0_fetch_v_f & ftp_thr0_fetch_v_c) |
2200 ( ftp_thr0_fetch_v_wo_br_bf & ftp_thr0_fetch_v_f & thr0_is_empty_c ) |
2201 ( ftp_thr0_fetch_v_wo_br_bf & ftp_thr0_fetch_v_c & thr0_is_empty_c ) |
2202 ( ftp_thr0_fetch_v_f & ftp_thr0_fetch_v_c & thr0_is_empty_c ) |
2203 (!thr0_is_empty_c & thr0_room_4ormore & (ftp_thr0_fetch_v_wo_br_bf ))|
2204 (!thr0_is_empty_c & thr0_room_4ormore & ftp_thr0_fetch_v_f) |
2205 (!thr0_is_empty_c & thr0_room_4ormore & ftp_thr0_fetch_v_c)) & ~load_flush_w[0] & ~br_room_reset[0];
2206
2207
2208
2209assign ftp_thr1_room_is_less_t_3 = ((!thr1_is_empty_c & !thr1_room_4ormore) |
2210 ( ftp_thr1_fetch_v_wo_br_bf & ftp_thr1_fetch_v_f & ftp_thr1_fetch_v_c) |
2211 ( ftp_thr1_fetch_v_wo_br_bf & ftp_thr1_fetch_v_f & thr1_is_empty_c ) |
2212 ( ftp_thr1_fetch_v_wo_br_bf & ftp_thr1_fetch_v_c & thr1_is_empty_c ) |
2213 ( ftp_thr1_fetch_v_f & ftp_thr1_fetch_v_c & thr1_is_empty_c ) |
2214 (!thr1_is_empty_c & thr1_room_4ormore & (ftp_thr1_fetch_v_wo_br_bf ))|
2215 (!thr1_is_empty_c & thr1_room_4ormore & ftp_thr1_fetch_v_f) |
2216 (!thr1_is_empty_c & thr1_room_4ormore & ftp_thr1_fetch_v_c)) & ~load_flush_w[1] & ~br_room_reset[1];
2217
2218
2219assign ftp_thr2_room_is_less_t_3 = ((!thr2_is_empty_c & !thr2_room_4ormore) |
2220 ( ftp_thr2_fetch_v_wo_br_bf & ftp_thr2_fetch_v_f & ftp_thr2_fetch_v_c) |
2221 ( ftp_thr2_fetch_v_wo_br_bf & ftp_thr2_fetch_v_f & thr2_is_empty_c ) |
2222 ( ftp_thr2_fetch_v_wo_br_bf & ftp_thr2_fetch_v_c & thr2_is_empty_c ) |
2223 ( ftp_thr2_fetch_v_f & ftp_thr2_fetch_v_c & thr2_is_empty_c ) |
2224 ( !thr2_is_empty_c & thr2_room_4ormore & (ftp_thr2_fetch_v_wo_br_bf ))|
2225 ( !thr2_is_empty_c & thr2_room_4ormore & ftp_thr2_fetch_v_f) |
2226 ( !thr2_is_empty_c & thr2_room_4ormore & ftp_thr2_fetch_v_c)) & ~load_flush_w[2] & ~br_room_reset[2];
2227
2228
2229assign ftp_thr3_room_is_less_t_3 = ((!thr3_is_empty_c & !thr3_room_4ormore) |
2230 ( ftp_thr3_fetch_v_wo_br_bf & ftp_thr3_fetch_v_f & ftp_thr3_fetch_v_c) |
2231 ( ftp_thr3_fetch_v_wo_br_bf & ftp_thr3_fetch_v_f & thr3_is_empty_c ) |
2232 ( ftp_thr3_fetch_v_wo_br_bf & ftp_thr3_fetch_v_c & thr3_is_empty_c ) |
2233 ( ftp_thr3_fetch_v_f & ftp_thr3_fetch_v_c & thr3_is_empty_c ) |
2234 ( !thr3_is_empty_c & thr3_room_4ormore & (ftp_thr3_fetch_v_wo_br_bf ))|
2235 ( !thr3_is_empty_c & thr3_room_4ormore & ftp_thr3_fetch_v_f) |
2236 ( !thr3_is_empty_c & thr3_room_4ormore & ftp_thr3_fetch_v_c)) & ~load_flush_w[3] & ~br_room_reset[3];
2237
2238
2239assign ftp_thr4_room_is_less_t_3 = ((!thr4_is_empty_c & !thr4_room_4ormore) |
2240 ( ftp_thr4_fetch_v_wo_br_bf & ftp_thr4_fetch_v_f & ftp_thr4_fetch_v_c) |
2241 ( ftp_thr4_fetch_v_wo_br_bf & ftp_thr4_fetch_v_f & thr4_is_empty_c ) |
2242 ( ftp_thr4_fetch_v_wo_br_bf & ftp_thr4_fetch_v_c & thr4_is_empty_c ) |
2243 ( ftp_thr4_fetch_v_f & ftp_thr4_fetch_v_c & thr4_is_empty_c ) |
2244 ( !thr4_is_empty_c & thr4_room_4ormore & (ftp_thr4_fetch_v_wo_br_bf ))|
2245 ( !thr4_is_empty_c & thr4_room_4ormore & ftp_thr4_fetch_v_f) |
2246 ( !thr4_is_empty_c & thr4_room_4ormore & ftp_thr4_fetch_v_c)) & ~load_flush_w[4] & ~br_room_reset[4];
2247
2248
2249assign ftp_thr5_room_is_less_t_3 = ((!thr5_is_empty_c & !thr5_room_4ormore) |
2250 ( ftp_thr5_fetch_v_wo_br_bf & ftp_thr5_fetch_v_f & ftp_thr5_fetch_v_c) |
2251 ( ftp_thr5_fetch_v_wo_br_bf & ftp_thr5_fetch_v_f & thr5_is_empty_c ) |
2252 ( ftp_thr5_fetch_v_wo_br_bf & ftp_thr5_fetch_v_c & thr5_is_empty_c ) |
2253 ( ftp_thr5_fetch_v_f & ftp_thr5_fetch_v_c & thr5_is_empty_c ) |
2254 ( !thr5_is_empty_c & thr5_room_4ormore & (ftp_thr5_fetch_v_wo_br_bf ))|
2255 ( !thr5_is_empty_c & thr5_room_4ormore & ftp_thr5_fetch_v_f) |
2256 ( !thr5_is_empty_c & thr5_room_4ormore & ftp_thr5_fetch_v_c)) & ~load_flush_w[5] & ~br_room_reset[5];
2257
2258
2259assign ftp_thr6_room_is_less_t_3 = ((!thr6_is_empty_c & !thr6_room_4ormore) |
2260 ( ftp_thr6_fetch_v_wo_br_bf & ftp_thr6_fetch_v_f & ftp_thr6_fetch_v_c) |
2261 ( ftp_thr6_fetch_v_wo_br_bf & ftp_thr6_fetch_v_f & thr6_is_empty_c ) |
2262 ( ftp_thr6_fetch_v_wo_br_bf & ftp_thr6_fetch_v_c & thr6_is_empty_c ) |
2263 ( ftp_thr6_fetch_v_f & ftp_thr6_fetch_v_c & thr6_is_empty_c ) |
2264 ( !thr6_is_empty_c & thr6_room_4ormore & (ftp_thr6_fetch_v_wo_br_bf ))|
2265 ( !thr6_is_empty_c & thr6_room_4ormore & ftp_thr6_fetch_v_f) |
2266 ( !thr6_is_empty_c & thr6_room_4ormore & ftp_thr6_fetch_v_c)) & ~load_flush_w[6] & ~br_room_reset[6];
2267
2268
2269assign ftp_thr7_room_is_less_t_3 = ((!thr7_is_empty_c & !thr7_room_4ormore) |
2270 ( ftp_thr7_fetch_v_wo_br_bf & ftp_thr7_fetch_v_f & ftp_thr7_fetch_v_c) |
2271 ( ftp_thr7_fetch_v_wo_br_bf & ftp_thr7_fetch_v_f & thr7_is_empty_c ) |
2272 ( ftp_thr7_fetch_v_wo_br_bf & ftp_thr7_fetch_v_c & thr7_is_empty_c ) |
2273 ( ftp_thr7_fetch_v_f & ftp_thr7_fetch_v_c & thr7_is_empty_c ) |
2274 ( !thr7_is_empty_c & thr7_room_4ormore & (ftp_thr7_fetch_v_wo_br_bf ))|
2275 ( !thr7_is_empty_c & thr7_room_4ormore & ftp_thr7_fetch_v_f) |
2276 ( !thr7_is_empty_c & thr7_room_4ormore & ftp_thr7_fetch_v_c)) & ~load_flush_w[7] & ~br_room_reset[7];
2277
2278
2279
2280
2281assign ready_hp_in[0] = tsm_thr0_ready_hp_bf_in & ~ftp_thr0_room_is_less_t_3 ;
2282assign ready_hp_in[1] = tsm_thr1_ready_hp_bf_in & ~ftp_thr1_room_is_less_t_3 ;
2283assign ready_hp_in[2] = tsm_thr2_ready_hp_bf_in & ~ftp_thr2_room_is_less_t_3 ;
2284assign ready_hp_in[3] = tsm_thr3_ready_hp_bf_in & ~ftp_thr3_room_is_less_t_3 ;
2285assign ready_hp_in[4] = tsm_thr4_ready_hp_bf_in & ~ftp_thr4_room_is_less_t_3 ;
2286assign ready_hp_in[5] = tsm_thr5_ready_hp_bf_in & ~ftp_thr5_room_is_less_t_3 ;
2287assign ready_hp_in[6] = tsm_thr6_ready_hp_bf_in & ~ftp_thr6_room_is_less_t_3 ;
2288assign ready_hp_in[7] = tsm_thr7_ready_hp_bf_in & ~ftp_thr7_room_is_less_t_3 ;
2289
2290/// To keep old zero_in files happy
2291assign tsm_thr0_ready_hp_bf = ready_hp_bf[0];
2292assign tsm_thr1_ready_hp_bf = ready_hp_bf[1];
2293assign tsm_thr2_ready_hp_bf = ready_hp_bf[2];
2294assign tsm_thr3_ready_hp_bf = ready_hp_bf[3];
2295assign tsm_thr4_ready_hp_bf = ready_hp_bf[4];
2296assign tsm_thr5_ready_hp_bf = ready_hp_bf[5];
2297assign tsm_thr6_ready_hp_bf = ready_hp_bf[6];
2298assign tsm_thr7_ready_hp_bf = ready_hp_bf[7];
2299
2300assign ftp_unused[7:0] = {tsm_thr7_ready_hp_bf, tsm_thr6_ready_hp_bf,
2301 tsm_thr5_ready_hp_bf, tsm_thr4_ready_hp_bf,
2302 tsm_thr3_ready_hp_bf, tsm_thr2_ready_hp_bf,
2303 tsm_thr1_ready_hp_bf, tsm_thr0_ready_hp_bf} ;
2304
2305ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 ready_fp_reg (
2306 .scan_in(ready_fp_reg_scanin),
2307 .scan_out(ready_fp_reg_scanout),
2308 .l1clk(l1clk_pm1),
2309 .din (ready_hp_in[7:0]),
2310 .dout (ready_hp_bf[7:0]),
2311 .siclk(siclk),
2312 .soclk(soclk)
2313);
2314
2315
2316assign ftp_reset_fill_wait = tsm_thr0_fill_rdy0 |
2317 tsm_thr1_fill_rdy0 |
2318 tsm_thr2_fill_rdy0 |
2319 tsm_thr3_fill_rdy0 |
2320 tsm_thr4_fill_rdy0 |
2321 tsm_thr5_fill_rdy0 |
2322 tsm_thr6_fill_rdy0 |
2323 tsm_thr7_fill_rdy0 ;
2324
2325
2326
2327///////////////////////////////////////////////////////////
2328// By_pass for each thread should be included in the room
2329// calculations.
2330///////////////////////////////////////////////////////////
2331assign next_by_pass_sel_bbf[0] = cmu_thr0_data_ready;
2332assign next_by_pass_sel_bbf[1] = cmu_thr1_data_ready;
2333assign next_by_pass_sel_bbf[2] = cmu_thr2_data_ready;
2334assign next_by_pass_sel_bbf[3] = cmu_thr3_data_ready;
2335assign next_by_pass_sel_bbf[4] = cmu_thr4_data_ready;
2336assign next_by_pass_sel_bbf[5] = cmu_thr5_data_ready;
2337assign next_by_pass_sel_bbf[6] = cmu_thr6_data_ready;
2338assign next_by_pass_sel_bbf[7] = cmu_thr7_data_ready;
2339
2340ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 cmu_fill_byp_thread_reg (
2341 .scan_in(cmu_fill_byp_thread_reg_scanin),
2342 .scan_out(cmu_fill_byp_thread_reg_scanout),
2343 .l1clk( l1clk_pm1 ),
2344 .din (next_by_pass_sel_bbf[7:0]),
2345 .dout (by_pass_sel_bf[7:0]),
2346 .siclk(siclk),
2347 .soclk(soclk));
2348
2349ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 by_pass_sel_f_reg (
2350 .scan_in(by_pass_sel_f_reg_scanin),
2351 .scan_out(by_pass_sel_f_reg_scanout),
2352 .l1clk(l1clk_pm1),
2353 .din (by_pass_sel_bf[7:0]),
2354 .dout (by_pass_sel_f[7:0]),
2355 .siclk(siclk),
2356 .soclk(soclk)
2357);
2358
2359ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 by_pass_sel_c_reg (
2360 .scan_in(by_pass_sel_c_reg_scanin),
2361 .scan_out(by_pass_sel_c_reg_scanout),
2362 .l1clk(l1clk_pm1),
2363 .din (by_pass_sel_f[7:0]),
2364 .dout (by_pass_sel_c[7:0]),
2365 .siclk(siclk),
2366 .soclk(soclk)
2367);
2368
2369///////////////////////////////////////////////////////////////////////////////////////////////
2370// Generate by_pass signals //
2371///////////////////////////////////////////////////////////////////////////////////////////////
2372assign thr0_kill_by_pass_bbf = cmu_thr0_data_ready & (tsm_thr0_ignore_by_pass | thr0_redirect_bf) ;
2373assign thr1_kill_by_pass_bbf = cmu_thr1_data_ready & (tsm_thr1_ignore_by_pass | thr1_redirect_bf) ;
2374assign thr2_kill_by_pass_bbf = cmu_thr2_data_ready & (tsm_thr2_ignore_by_pass | thr2_redirect_bf) ;
2375assign thr3_kill_by_pass_bbf = cmu_thr3_data_ready & (tsm_thr3_ignore_by_pass | thr3_redirect_bf) ;
2376assign thr4_kill_by_pass_bbf = cmu_thr4_data_ready & (tsm_thr4_ignore_by_pass | thr4_redirect_bf) ;
2377assign thr5_kill_by_pass_bbf = cmu_thr5_data_ready & (tsm_thr5_ignore_by_pass | thr5_redirect_bf) ;
2378assign thr6_kill_by_pass_bbf = cmu_thr6_data_ready & (tsm_thr6_ignore_by_pass | thr6_redirect_bf) ;
2379assign thr7_kill_by_pass_bbf = cmu_thr7_data_ready & (tsm_thr7_ignore_by_pass | thr7_redirect_bf) ;
2380
2381assign byp_valid_in = cmu_any_data_ready & ~( thr0_kill_by_pass_bbf |
2382 thr1_kill_by_pass_bbf |
2383 thr2_kill_by_pass_bbf |
2384 thr3_kill_by_pass_bbf |
2385 thr4_kill_by_pass_bbf |
2386 thr5_kill_by_pass_bbf |
2387 thr6_kill_by_pass_bbf |
2388 thr7_kill_by_pass_bbf ) ;
2389
2390ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 byp_valid_reg (
2391 .scan_in(byp_valid_reg_scanin),
2392 .scan_out(byp_valid_reg_scanout),
2393 .l1clk( l1clk_pm1 ),
2394 .din (byp_valid_in),
2395 .dout (ftp_byp_valid),
2396 .siclk(siclk),
2397 .soclk(soclk));
2398
2399
2400 ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 thrx_kill_by_pass_reg (
2401 .scan_in(thrx_kill_by_pass_reg_scanin),
2402 .scan_out(thrx_kill_by_pass_reg_scanout),
2403 .l1clk( l1clk ),
2404 .din ({thr7_kill_by_pass_bbf,thr6_kill_by_pass_bbf,thr5_kill_by_pass_bbf,thr4_kill_by_pass_bbf,
2405 thr3_kill_by_pass_bbf,thr2_kill_by_pass_bbf,thr1_kill_by_pass_bbf,thr0_kill_by_pass_bbf}),
2406 .dout ({thr7_kill_by_pass_bf,thr6_kill_by_pass_bf,thr5_kill_by_pass_bf,thr4_kill_by_pass_bf,
2407 thr3_kill_by_pass_bf,thr2_kill_by_pass_bf,thr1_kill_by_pass_bf,thr0_kill_by_pass_bf}),
2408 .siclk(siclk),
2409 .soclk(soclk));
2410
2411assign kill2_by_pass_bf = (by_pass_sel_bf[0] & thr0_redirect_bf) |
2412 (by_pass_sel_bf[1] & thr1_redirect_bf) |
2413 (by_pass_sel_bf[2] & thr2_redirect_bf) |
2414 (by_pass_sel_bf[3] & thr3_redirect_bf) |
2415 (by_pass_sel_bf[4] & thr4_redirect_bf) |
2416 (by_pass_sel_bf[5] & thr5_redirect_bf) |
2417 (by_pass_sel_bf[6] & thr6_redirect_bf) |
2418 (by_pass_sel_bf[7] & thr7_redirect_bf) ;
2419
2420assign bypass_thread_killed = thr7_kill_by_pass_bf | thr6_kill_by_pass_bf | thr5_kill_by_pass_bf |
2421 thr4_kill_by_pass_bf | thr3_kill_by_pass_bf | thr2_kill_by_pass_bf |
2422 thr1_kill_by_pass_bf | thr0_kill_by_pass_bf | kill2_by_pass_bf ;
2423
2424assign by_pass_valid_bf = ftp_byp_valid & ~bypass_thread_killed ;
2425
2426assign prev_by_pass_at_cycle_1 = cycle_2_by_pass_ok_f | cycle_3_by_pass_ok_c ;
2427assign prev_by_pass_at_cycle_2 = cycle_3_by_pass_ok_f ;
2428
2429assign cycle_2_by_pass_ok_bf= ((ftp_fetch_v_c_unq | prev_by_pass_at_cycle_1) & ~(ftp_fetch_v_dup_f | prev_by_pass_at_cycle_2) & by_pass_valid_bf);
2430assign cycle_3_by_pass_ok_bf= ((ftp_fetch_v_c_unq | prev_by_pass_at_cycle_1) & (ftp_fetch_v_dup_f | prev_by_pass_at_cycle_2) & by_pass_valid_bf) ;
2431
2432// Cycle_2
2433 ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 cycle_2_by_pass_f_reg (
2434 .scan_in(cycle_2_by_pass_f_reg_scanin),
2435 .scan_out(cycle_2_by_pass_f_reg_scanout),
2436 .l1clk( l1clk_pm1 ),
2437 .din (cycle_2_by_pass_ok_bf),
2438 .dout (cycle_2_by_pass_ok_f),
2439 .siclk(siclk),
2440 .soclk(soclk));
2441
2442// Cycle_3
2443 ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 cycle_3_by_pass_f_reg (
2444 .scan_in(cycle_3_by_pass_f_reg_scanin),
2445 .scan_out(cycle_3_by_pass_f_reg_scanout),
2446 .l1clk( l1clk_pm1 ),
2447 .din (cycle_3_by_pass_ok_bf),
2448 .dout (cycle_3_by_pass_ok_f),
2449 .siclk(siclk),
2450 .soclk(soclk));
2451
2452 ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 cycle_3_by_pass_c_reg (
2453 .scan_in(cycle_3_by_pass_c_reg_scanin),
2454 .scan_out(cycle_3_by_pass_c_reg_scanout),
2455 .l1clk( l1clk_pm1 ),
2456 .din (cycle_3_by_pass_ok_f),
2457 .dout (cycle_3_by_pass_ok_c),
2458 .siclk(siclk),
2459 .soclk(soclk));
2460
2461///////////////////////////////////////////////////////////////////////////////////////////////
2462
2463ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 by_pass_v_f_reg (
2464 .scan_in(by_pass_v_f_reg_scanin),
2465 .scan_out(by_pass_v_f_reg_scanout),
2466 .l1clk( l1clk_pm1 ),
2467 .din (by_pass_valid_bf),
2468 .dout (by_pass_valid_unq_f),
2469 .siclk(siclk),
2470 .soclk(soclk));
2471
2472
2473assign by_pass_valid_f = by_pass_valid_unq_f & ~bypass_thread_redirected_p_f ;
2474assign bypass_thread_redirected_p_f = ((thr0_redirect_bf) & by_pass_sel_f[0]) |
2475 ((thr1_redirect_bf) & by_pass_sel_f[1]) |
2476 ((thr2_redirect_bf) & by_pass_sel_f[2]) |
2477 ((thr3_redirect_bf) & by_pass_sel_f[3]) |
2478 ((thr4_redirect_bf) & by_pass_sel_f[4]) |
2479 ((thr5_redirect_bf) & by_pass_sel_f[5]) |
2480 ((thr6_redirect_bf) & by_pass_sel_f[6]) |
2481 ((thr7_redirect_bf) & by_pass_sel_f[7]) ;
2482
2483
2484assign bypass_thread_redirected_f = ((thr0_red_no_br_bf | thr0_redirect_bf) & by_pass_sel_f[0]) |
2485 ((thr1_red_no_br_bf | thr1_redirect_bf) & by_pass_sel_f[1]) |
2486 ((thr2_red_no_br_bf | thr2_redirect_bf) & by_pass_sel_f[2]) |
2487 ((thr3_red_no_br_bf | thr3_redirect_bf) & by_pass_sel_f[3]) |
2488 ((thr4_red_no_br_bf | thr4_redirect_bf) & by_pass_sel_f[4]) |
2489 ((thr5_red_no_br_bf | thr5_redirect_bf) & by_pass_sel_f[5]) |
2490 ((thr6_red_no_br_bf | thr6_redirect_bf) & by_pass_sel_f[6]) |
2491 ((thr7_red_no_br_bf | thr7_redirect_bf) & by_pass_sel_f[7]) ;
2492
2493
2494 assign next_by_pass_c_valid = by_pass_valid_f & ~bypass_thread_redirected_f ;
2495 ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 by_pass_v_c_reg (
2496 .scan_in(by_pass_v_c_reg_scanin),
2497 .scan_out(by_pass_v_c_reg_scanout),
2498 .l1clk( l1clk_pm1 ),
2499 .din (next_by_pass_c_valid),
2500 .dout (by_pass_valid_c),
2501 .siclk(siclk),
2502 .soclk(soclk));
2503
2504
2505
2506// assign sel_by_pass_cycle_1_int_bf = (cycle_1_by_pass_ok_bf & by_pass_valid_bf) ;
2507assign sel_by_pass_cycle_2_int_f = (cycle_2_by_pass_ok_f & by_pass_valid_f) ;
2508assign sel_by_pass_cycle_3_int_c = (cycle_3_by_pass_ok_c & by_pass_valid_c) ;
2509
2510
2511
2512///////////////////////////////////////////////////////////////////////////////////////////////
2513// Generate signals that show which thread is by_passing at C this cycle. (equivalent to C //
2514// stage in normal fetching. //
2515///////////////////////////////////////////////////////////////////////////////////////////////
2516// thr0 is by_passing the cycle after cmu_by_pass_valid //
2517// DO NOT OVER QUALIFY with actual bypass when calculating room. //
2518// It does not matter for performance and it is a timing path. //
2519///////////////////////////////////////////////////////////////////////////////////////////////
2520assign thr0_by_pass_valid_bf = by_pass_sel_bf[0] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2521assign thr1_by_pass_valid_bf = by_pass_sel_bf[1] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2522assign thr2_by_pass_valid_bf = by_pass_sel_bf[2] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2523assign thr3_by_pass_valid_bf = by_pass_sel_bf[3] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2524assign thr4_by_pass_valid_bf = by_pass_sel_bf[4] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2525assign thr5_by_pass_valid_bf = by_pass_sel_bf[5] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2526assign thr6_by_pass_valid_bf = by_pass_sel_bf[6] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2527assign thr7_by_pass_valid_bf = by_pass_sel_bf[7] ; // & agc_sel_by_pass_cycle_1_int_bf ;
2528
2529///////////////////////////////////////////////////////////////////////////////////////////////
2530// thr0 is by_passing the 2 cycles after cmu_by_pass_valid //
2531///////////////////////////////////////////////////////////////////////////////////////////////
2532assign thr0_by_pass_valid_f = by_pass_sel_f[0] & sel_by_pass_cycle_2_int_f ;
2533assign thr1_by_pass_valid_f = by_pass_sel_f[1] & sel_by_pass_cycle_2_int_f ;
2534assign thr2_by_pass_valid_f = by_pass_sel_f[2] & sel_by_pass_cycle_2_int_f ;
2535assign thr3_by_pass_valid_f = by_pass_sel_f[3] & sel_by_pass_cycle_2_int_f ;
2536assign thr4_by_pass_valid_f = by_pass_sel_f[4] & sel_by_pass_cycle_2_int_f ;
2537assign thr5_by_pass_valid_f = by_pass_sel_f[5] & sel_by_pass_cycle_2_int_f ;
2538assign thr6_by_pass_valid_f = by_pass_sel_f[6] & sel_by_pass_cycle_2_int_f ;
2539assign thr7_by_pass_valid_f = by_pass_sel_f[7] & sel_by_pass_cycle_2_int_f ;
2540
2541///////////////////////////////////////////////////////////////////////////////////////////////
2542// thr0 is by_passing the 3 cycles after cmu_by_pass_valid //
2543///////////////////////////////////////////////////////////////////////////////////////////////
2544assign thr0_by_pass_valid_c = by_pass_sel_c[0] & sel_by_pass_cycle_3_int_c ;
2545assign thr1_by_pass_valid_c = by_pass_sel_c[1] & sel_by_pass_cycle_3_int_c ;
2546assign thr2_by_pass_valid_c = by_pass_sel_c[2] & sel_by_pass_cycle_3_int_c ;
2547assign thr3_by_pass_valid_c = by_pass_sel_c[3] & sel_by_pass_cycle_3_int_c ;
2548assign thr4_by_pass_valid_c = by_pass_sel_c[4] & sel_by_pass_cycle_3_int_c ;
2549assign thr5_by_pass_valid_c = by_pass_sel_c[5] & sel_by_pass_cycle_3_int_c ;
2550assign thr6_by_pass_valid_c = by_pass_sel_c[6] & sel_by_pass_cycle_3_int_c ;
2551assign thr7_by_pass_valid_c = by_pass_sel_c[7] & sel_by_pass_cycle_3_int_c ;
2552
2553assign thr0_by_pass_is_at_c = thr0_by_pass_valid_bf | thr0_by_pass_valid_f | thr0_by_pass_valid_c ;
2554assign thr1_by_pass_is_at_c = thr1_by_pass_valid_bf | thr1_by_pass_valid_f | thr1_by_pass_valid_c ;
2555assign thr2_by_pass_is_at_c = thr2_by_pass_valid_bf | thr2_by_pass_valid_f | thr2_by_pass_valid_c ;
2556assign thr3_by_pass_is_at_c = thr3_by_pass_valid_bf | thr3_by_pass_valid_f | thr3_by_pass_valid_c ;
2557assign thr4_by_pass_is_at_c = thr4_by_pass_valid_bf | thr4_by_pass_valid_f | thr4_by_pass_valid_c ;
2558assign thr5_by_pass_is_at_c = thr5_by_pass_valid_bf | thr5_by_pass_valid_f | thr5_by_pass_valid_c ;
2559assign thr6_by_pass_is_at_c = thr6_by_pass_valid_bf | thr6_by_pass_valid_f | thr6_by_pass_valid_c ;
2560assign thr7_by_pass_is_at_c = thr7_by_pass_valid_bf | thr7_by_pass_valid_f | thr7_by_pass_valid_c ;
2561
2562///////////////////////////////////////////////////////////////////////////////////////////////
2563// Generate signals that show which thread is by_passing at C next cycle. (equivalent to F //
2564// stage in normal fetching. //
2565///////////////////////////////////////////////////////////////////////////////////////////////
2566assign thr0_by_pass_cycle_2_bf = by_pass_sel_bf[0] & cycle_2_by_pass_ok_bf ;
2567assign thr0_by_pass_cycle_3_f = by_pass_sel_f[0] & cycle_3_by_pass_ok_f ;
2568
2569assign thr1_by_pass_cycle_2_bf = by_pass_sel_bf[1] & cycle_2_by_pass_ok_bf ;
2570assign thr1_by_pass_cycle_3_f = by_pass_sel_f[1] & cycle_3_by_pass_ok_f ;
2571
2572assign thr2_by_pass_cycle_2_bf = by_pass_sel_bf[2] & cycle_2_by_pass_ok_bf ;
2573assign thr2_by_pass_cycle_3_f = by_pass_sel_f[2] & cycle_3_by_pass_ok_f ;
2574
2575assign thr3_by_pass_cycle_2_bf = by_pass_sel_bf[3] & cycle_2_by_pass_ok_bf ;
2576assign thr3_by_pass_cycle_3_f = by_pass_sel_f[3] & cycle_3_by_pass_ok_f ;
2577
2578assign thr4_by_pass_cycle_2_bf = by_pass_sel_bf[4] & cycle_2_by_pass_ok_bf ;
2579assign thr4_by_pass_cycle_3_f = by_pass_sel_f[4] & cycle_3_by_pass_ok_f ;
2580
2581assign thr5_by_pass_cycle_2_bf = by_pass_sel_bf[5] & cycle_2_by_pass_ok_bf ;
2582assign thr5_by_pass_cycle_3_f = by_pass_sel_f[5] & cycle_3_by_pass_ok_f ;
2583
2584assign thr6_by_pass_cycle_2_bf = by_pass_sel_bf[6] & cycle_2_by_pass_ok_bf ;
2585assign thr6_by_pass_cycle_3_f = by_pass_sel_f[6] & cycle_3_by_pass_ok_f ;
2586
2587assign thr7_by_pass_cycle_2_bf = by_pass_sel_bf[7] & cycle_2_by_pass_ok_bf ;
2588assign thr7_by_pass_cycle_3_f = by_pass_sel_f[7] & cycle_3_by_pass_ok_f ;
2589
2590
2591assign thr0_by_pass_next_cycle_at_c = thr0_by_pass_cycle_2_bf | thr0_by_pass_cycle_3_f ;
2592assign thr1_by_pass_next_cycle_at_c = thr1_by_pass_cycle_2_bf | thr1_by_pass_cycle_3_f ;
2593assign thr2_by_pass_next_cycle_at_c = thr2_by_pass_cycle_2_bf | thr2_by_pass_cycle_3_f ;
2594assign thr3_by_pass_next_cycle_at_c = thr3_by_pass_cycle_2_bf | thr3_by_pass_cycle_3_f ;
2595assign thr4_by_pass_next_cycle_at_c = thr4_by_pass_cycle_2_bf | thr4_by_pass_cycle_3_f ;
2596assign thr5_by_pass_next_cycle_at_c = thr5_by_pass_cycle_2_bf | thr5_by_pass_cycle_3_f ;
2597assign thr6_by_pass_next_cycle_at_c = thr6_by_pass_cycle_2_bf | thr6_by_pass_cycle_3_f ;
2598assign thr7_by_pass_next_cycle_at_c = thr7_by_pass_cycle_2_bf | thr7_by_pass_cycle_3_f ;
2599
2600assign thr0_by_pass_2_cycles_at_c = by_pass_sel_bf[0] & cycle_3_by_pass_ok_bf ;
2601assign thr1_by_pass_2_cycles_at_c = by_pass_sel_bf[1] & cycle_3_by_pass_ok_bf ;
2602assign thr2_by_pass_2_cycles_at_c = by_pass_sel_bf[2] & cycle_3_by_pass_ok_bf ;
2603assign thr3_by_pass_2_cycles_at_c = by_pass_sel_bf[3] & cycle_3_by_pass_ok_bf ;
2604assign thr4_by_pass_2_cycles_at_c = by_pass_sel_bf[4] & cycle_3_by_pass_ok_bf ;
2605assign thr5_by_pass_2_cycles_at_c = by_pass_sel_bf[5] & cycle_3_by_pass_ok_bf ;
2606assign thr6_by_pass_2_cycles_at_c = by_pass_sel_bf[6] & cycle_3_by_pass_ok_bf ;
2607assign thr7_by_pass_2_cycles_at_c = by_pass_sel_bf[7] & cycle_3_by_pass_ok_bf ;
2608
2609////////////////////////////////////////////////////////////////////////
2610
2611///////////////////////////////////////////////////////////////////////
2612// Generate a signal to show if fetching the thread again or not //
2613///////////////////////////////////////////////////////////////////////
2614assign fetch_same_thr_again_bf = ((ftp_curr_fetch_thr_bf[0] & ftp_curr_fetch_thr_f[0]) |
2615 (ftp_curr_fetch_thr_bf[1] & ftp_curr_fetch_thr_f[1]) |
2616 (ftp_curr_fetch_thr_bf[2] & ftp_curr_fetch_thr_f[2]) |
2617 (ftp_curr_fetch_thr_bf[3] & ftp_curr_fetch_thr_f[3]) |
2618 (ftp_curr_fetch_thr_bf[4] & ftp_curr_fetch_thr_f[4]) |
2619 (ftp_curr_fetch_thr_bf[5] & ftp_curr_fetch_thr_f[5]) |
2620 (ftp_curr_fetch_thr_bf[6] & ftp_curr_fetch_thr_f[6]) |
2621 (ftp_curr_fetch_thr_bf[7] & ftp_curr_fetch_thr_f[7])) &
2622 ftp_fetch_v_dup_f;
2623
2624
2625////////////////////////////////////////////////////////////////////////
2626// current fetch thread matches the branch redirection thread
2627////////////////////////////////////////////////////////////////////////
2628
2629assign br0_matches_curr = ((~ftp_tid0_e[1] & ~ftp_tid0_e[0] &
2630 ftp_curr_fetch_thr_bf[0] ) |
2631 (~ftp_tid0_e[1] & ftp_tid0_e[0] &
2632 ftp_curr_fetch_thr_bf[1] ) |
2633 (ftp_tid0_e[1] & ~ftp_tid0_e[0] &
2634 ftp_curr_fetch_thr_bf[2] ) |
2635 (ftp_tid0_e[1] & ftp_tid0_e[0] &
2636 ftp_curr_fetch_thr_bf[3] )) ;
2637
2638assign br1_matches_curr = ((~ftp_tid1_e[1] & ~ftp_tid1_e[0] &
2639 ftp_curr_fetch_thr_bf[4] ) |
2640 (~ftp_tid1_e[1] & ftp_tid1_e[0] &
2641 ftp_curr_fetch_thr_bf[5] ) |
2642 (ftp_tid1_e[1] & ~ftp_tid1_e[0] &
2643 ftp_curr_fetch_thr_bf[6] ) |
2644 (ftp_tid1_e[1] & ftp_tid1_e[0] &
2645 ftp_curr_fetch_thr_bf[7] )) ;
2646
2647 // assign br_tid_matches_curr = br0_matches_curr | br1_matches_curr ;
2648///////////////////////////////////////////////////////////////////////
2649// Final mux for the PC_F //
2650///////////////////////////////////////////////////////////////////////
2651/////////////////////////////////////////////////////////
2652// assuming dec_br_taken_e[0] = 0 and dec_br_taken_e[0] = 0
2653/////////////////////////////////////////////////////////
2654// assign ftp_pc_sel_nb0_nb1[0] = ~fetch_same_thr_again_bf ;
2655// assign ftp_pc_sel_nb0_nb1[1] = fetch_same_thr_again_bf ;
2656
2657/////////////////////////////////////////////////////////
2658// assuming dec_br_taken_e[0] = 1 and dec_br_taken_e[0] = 0
2659/////////////////////////////////////////////////////////
2660// assign ftp_pc_sel_b0_nb1[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~single_thread_active;
2661// assign ftp_pc_sel_b0_nb1[1] = ftp_any_thread_ready & fetch_same_thr_again_bf & ~single_thread_active;
2662// assign ftp_pc_sel_b0_nb1[2] = single_thread_active ; //
2663
2664/////////////////////////////////////////////////////////
2665// assuming dec_br_taken_e[0] = 0 and dec_br_taken_e[0] = 1
2666/////////////////////////////////////////////////////////
2667// assign ftp_pc_sel_nb0_b1[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~single_thread_active;
2668// assign ftp_pc_sel_nb0_b1[1] = ftp_any_thread_ready & fetch_same_thr_again_bf & ~single_thread_active;
2669// assign ftp_pc_sel_nb0_b1[2] = single_thread_active ;
2670
2671/////////////////////////////////////////////////////////
2672// assuming dec_br_taken_e[0] = 1 and dec_br_taken_e[0] = 1
2673/////////////////////////////////////////////////////////
2674// assign ftp_pc_sel_b0_b1[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~br1_matches_curr & ~br0_matches_curr;
2675// assign ftp_pc_sel_b0_b1[1] = ftp_any_thread_ready & fetch_same_thr_again_bf & ~br1_matches_curr & ~br0_matches_curr;
2676// assign ftp_pc_sel_b0_b1[2] = ( ~(ftp_any_thread_ready | br1_matches_curr) | br0_matches_curr) ;
2677// assign ftp_pc_sel_b0_b1[3] = br1_matches_curr ;
2678// Note: In single thread mode this case is NOT possible. In MT mode, we do NOT care what is selected this
2679// this cycle because we DO not force the branch address in BF stage.
2680///////////////////////////////////////////////////////////////////////////////////////////////
2681// assign ftp_pc_sel_b0_b1[0] = ~fetch_same_thr_again_bf ;
2682// assign ftp_pc_sel_b0_b1[1] = fetch_same_thr_again_bf ;
2683
2684/////////////////////////////////////////////////////////
2685// assuming dec_br_taken_e[0] = 0 and dec_br_taken_e[0] = 0
2686/////////////////////////////////////////////////////////
2687//assign ftp_pc_sel_am_nb0_nb1[0] = ~fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va;
2688//assign ftp_pc_sel_am_nb0_nb1[1] = fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va;
2689//assign ftp_pc_sel_am_nb0_nb1[2] = ~fetch_same_thr_again_bf & ~ftp_curr_pstate_am_bf_ & ~select_itc_va;
2690//assign ftp_pc_sel_am_nb0_nb1[3] = fetch_same_thr_again_bf & ~ftp_curr_pstate_am_bf_ & ~select_itc_va;
2691//assign ftp_pc_sel_am_nb0_nb1[4] = select_itc_va ;
2692//
2693/////////////////////////////////////////////////////////
2694// assuming dec_br_taken_e[0] = 1 and dec_br_taken_e[0] = 0
2695/////////////////////////////////////////////////////////
2696 assign ftp_pc_sel_am[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va &
2697 ~sel_am_5;
2698
2699 assign ftp_pc_sel_am[1] = ftp_any_thread_ready & fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va &
2700 ~sel_am_5;
2701
2702 assign ftp_pc_sel_am[2] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~ftp_curr_pstate_am_bf_ & ~select_itc_va &
2703 ~sel_am_5;
2704
2705 assign ftp_pc_sel_am[3] = ftp_any_thread_ready & fetch_same_thr_again_bf & ~ftp_curr_pstate_am_bf_ & ~select_itc_va &
2706 ~sel_am_5;
2707
2708 assign ftp_pc_sel_am[4] = select_itc_va & ~sel_am_5;
2709 assign ftp_pc_sel_am[5] = sel_am_5 | (~ftp_any_thread_ready & ~select_itc_va) ;
2710
2711
2712assign ftp_pc_sel_tag_part1[0] = ftp_any_thread_ready & ~select_itc_va & ~sel_am_5;
2713assign ftp_pc_sel_tag_part1[1] = select_itc_va & ~sel_am_5 ;
2714assign ftp_pc_sel_tag_part1[2] = ~ftp_pc_sel_tag_part1[1] & ~ftp_pc_sel_tag_part1[0];
2715
2716assign ftp_pc_sel_tag_part2[0] = ftp_any_thread_ready & ~select_itc_va & ftp_curr_pstate_am_bf_ & ~sel_am_5;
2717assign ftp_pc_sel_tag_part2[1] = select_itc_va & ~sel_am_5;
2718assign ftp_pc_sel_tag_part2[2] = ~ftp_pc_sel_tag_part2[0] & ~ftp_pc_sel_tag_part2[1] & ~ ftp_pc_sel_tag_part2[3] ;
2719assign ftp_pc_sel_tag_part2[3] = ftp_any_thread_ready & ~select_itc_va & ~ftp_curr_pstate_am_bf_ & ~sel_am_5 ;
2720
2721assign ftp_pc_sel_tag_pc_bot[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~select_itc_va;
2722assign ftp_pc_sel_tag_pc_bot[1] = ~( ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~select_itc_va);
2723
2724assign ftp_pc_sel_tag_pc_top[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va;
2725assign ftp_pc_sel_tag_pc_top[1] = ~( ftp_any_thread_ready & ~fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va);
2726
2727///////////////////////////////////////////////////////////////////////
2728///////////////////////////////////////////////////////////////////////
2729// Final mux for the ICADDR //
2730///////////////////////////////////////////////////////////////////////
2731
2732assign ftp_icaddr_sel_first_mux[0] = ~fetch_same_thr_again_bf & ~ftp_fill_req_q_bf & ~ic_rd_req_ff & ~ic_wr_req_ff & ~mbi_run_bf &
2733 ~tg_rd_req_ff & ~tg_wr_req_ff;
2734assign ftp_icaddr_sel_first_mux[1] = fetch_same_thr_again_bf & ~ftp_fill_req_q_bf & ~ic_rd_req_ff & ~ic_wr_req_ff & ~mbi_run_bf &
2735 ~tg_rd_req_ff & ~tg_wr_req_ff;
2736assign ftp_icaddr_sel_first_mux[2] = ftp_fill_req_q_bf & ~mbi_run_bf;
2737assign ftp_icaddr_sel_first_mux[3] = (ic_rd_req_ff | ic_wr_req_ff | tg_rd_req_ff | tg_wr_req_ff) & ~ftp_fill_req_q_bf & ~mbi_run_bf;
2738assign ftp_icaddr_sel_first_mux[4] = mbi_run_bf ;
2739
2740
2741
2742assign next_pstate_am_[7:0] = ~tlu_pstate_am[7:0] ;
2743
2744ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 pstate_am_reg (
2745 .scan_in(pstate_am_reg_scanin),
2746 .scan_out(pstate_am_reg_scanout),
2747 .l1clk( l1clk_pm1),
2748 .din (next_pstate_am_[7:0]),
2749 .dout (ftp_pstate_am_bf_[7:0]),
2750 .siclk(siclk),
2751 .soclk(soclk));
2752
2753
2754assign ftp_curr_pstate_am_bf_ = (ftp_curr_fetch_thr_bf[0] & ftp_pstate_am_bf_[0]) |
2755 (ftp_curr_fetch_thr_bf[1] & ftp_pstate_am_bf_[1]) |
2756 (ftp_curr_fetch_thr_bf[2] & ftp_pstate_am_bf_[2]) |
2757 (ftp_curr_fetch_thr_bf[3] & ftp_pstate_am_bf_[3]) |
2758 (ftp_curr_fetch_thr_bf[4] & ftp_pstate_am_bf_[4]) |
2759 (ftp_curr_fetch_thr_bf[5] & ftp_pstate_am_bf_[5]) |
2760 (ftp_curr_fetch_thr_bf[6] & ftp_pstate_am_bf_[6]) |
2761 (ftp_curr_fetch_thr_bf[7] & ftp_pstate_am_bf_[7]) ;
2762
2763
2764assign reload_in = itc_demap_next;
2765
2766
2767//flop reload
2768
2769ifu_ftu_ftp_ctl_msff_ctl_macro__width_2 reload_latch (
2770 .scan_in(reload_latch_scanin),
2771 .scan_out(reload_latch_scanout),
2772 .din ({reload_in,
2773 reload}),
2774 .dout ({reload,
2775 reload_last}),
2776 .l1clk(l1clk),
2777 .siclk(siclk),
2778 .soclk(soclk)
2779);
2780
2781// assign select_itc_va = (reload | reload_last) | mbi_run_bf ;
2782
2783assign next_ftp_ith_det_req_bf = next_ith_det_req & ~(reload_in | reload) ;
2784assign next_select_itc_va = reload_in | reload | mbi_run_bf ;
2785assign next_sel_am_5 = next_ftp_ith_det_req_bf & ~next_select_itc_va ;
2786
2787ifu_ftu_ftp_ctl_msff_ctl_macro__width_2 pre_sel_am_reg (
2788 .scan_in(pre_sel_am_reg_scanin),
2789 .scan_out(pre_sel_am_reg_scanout),
2790 .din ({next_select_itc_va,
2791 next_sel_am_5}),
2792 .dout ({select_itc_va,
2793 sel_am_5}),
2794 .l1clk(l1clk),
2795 .siclk(siclk),
2796 .soclk(soclk)
2797);
2798
2799// assign ftp_select_itc_ctx = (reload | reload_last);
2800
2801
2802assign next_thr0_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b000)) ? lsu_ifu_pid_data:
2803 thr0_pid_data[2:0] ;
2804assign next_thr1_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b001)) ? lsu_ifu_pid_data:
2805 thr1_pid_data[2:0] ;
2806assign next_thr2_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b010)) ? lsu_ifu_pid_data:
2807 thr2_pid_data[2:0] ;
2808assign next_thr3_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b011)) ? lsu_ifu_pid_data:
2809 thr3_pid_data[2:0] ;
2810assign next_thr4_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b100)) ? lsu_ifu_pid_data:
2811 thr4_pid_data[2:0] ;
2812assign next_thr5_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b101)) ? lsu_ifu_pid_data:
2813 thr5_pid_data[2:0] ;
2814assign next_thr6_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b110)) ? lsu_ifu_pid_data:
2815 thr6_pid_data[2:0] ;
2816assign next_thr7_pid_data[2:0] = (lsu_ifu_wr_pid & (lsu_ifu_tid_w[2:0] == 3'b111)) ? lsu_ifu_pid_data:
2817 thr7_pid_data[2:0] ;
2818
2819ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr0_pid_reg (
2820 .scan_in(thr0_pid_reg_scanin),
2821 .scan_out(thr0_pid_reg_scanout),
2822 .l1clk( l1clk_pm1 ),
2823 .din (next_thr0_pid_data[2:0]),
2824 .dout (thr0_pid_data[2:0]),
2825 .siclk(siclk),
2826 .soclk(soclk));
2827
2828ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr1_pid_reg (
2829 .scan_in(thr1_pid_reg_scanin),
2830 .scan_out(thr1_pid_reg_scanout),
2831 .l1clk( l1clk_pm1 ),
2832 .din (next_thr1_pid_data[2:0]),
2833 .dout (thr1_pid_data[2:0]),
2834 .siclk(siclk),
2835 .soclk(soclk));
2836
2837ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr2_pid_reg (
2838 .scan_in(thr2_pid_reg_scanin),
2839 .scan_out(thr2_pid_reg_scanout),
2840 .l1clk( l1clk_pm1 ),
2841 .din (next_thr2_pid_data[2:0]),
2842 .dout (thr2_pid_data[2:0]),
2843 .siclk(siclk),
2844 .soclk(soclk));
2845
2846ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr3_pid_reg (
2847 .scan_in(thr3_pid_reg_scanin),
2848 .scan_out(thr3_pid_reg_scanout),
2849 .l1clk( l1clk_pm1 ),
2850 .din (next_thr3_pid_data[2:0]),
2851 .dout (thr3_pid_data[2:0]),
2852 .siclk(siclk),
2853 .soclk(soclk));
2854
2855ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr4_pid_reg (
2856 .scan_in(thr4_pid_reg_scanin),
2857 .scan_out(thr4_pid_reg_scanout),
2858 .l1clk( l1clk_pm1 ),
2859 .din (next_thr4_pid_data[2:0]),
2860 .dout (thr4_pid_data[2:0]),
2861 .siclk(siclk),
2862 .soclk(soclk));
2863
2864ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr5_pid_reg (
2865 .scan_in(thr5_pid_reg_scanin),
2866 .scan_out(thr5_pid_reg_scanout),
2867 .l1clk( l1clk_pm1 ),
2868 .din (next_thr5_pid_data[2:0]),
2869 .dout (thr5_pid_data[2:0]),
2870 .siclk(siclk),
2871 .soclk(soclk));
2872
2873ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr6_pid_reg (
2874 .scan_in(thr6_pid_reg_scanin),
2875 .scan_out(thr6_pid_reg_scanout),
2876 .l1clk( l1clk_pm1 ),
2877 .din (next_thr6_pid_data[2:0]),
2878 .dout (thr6_pid_data[2:0]),
2879 .siclk(siclk),
2880 .soclk(soclk));
2881
2882ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 thr7_pid_reg (
2883 .scan_in(thr7_pid_reg_scanin),
2884 .scan_out(thr7_pid_reg_scanout),
2885 .l1clk( l1clk_pm1 ),
2886 .din (next_thr7_pid_data[2:0]),
2887 .dout (thr7_pid_data[2:0]),
2888 .siclk(siclk),
2889 .soclk(soclk));
2890
2891assign ftp_curr_pid_bf[2:0] = ({3{ftp_itb_fetch_thr_dup_bf[7]}} & thr7_pid_data[2:0]) |
2892 ({3{ftp_itb_fetch_thr_dup_bf[6]}} & thr6_pid_data[2:0]) |
2893 ({3{ftp_itb_fetch_thr_dup_bf[5]}} & thr5_pid_data[2:0]) |
2894 ({3{ftp_itb_fetch_thr_dup_bf[4]}} & thr4_pid_data[2:0]) |
2895 ({3{ftp_itb_fetch_thr_dup_bf[3]}} & thr3_pid_data[2:0]) |
2896 ({3{ftp_itb_fetch_thr_dup_bf[2]}} & thr2_pid_data[2:0]) |
2897 ({3{ftp_itb_fetch_thr_dup_bf[1]}} & thr1_pid_data[2:0]) |
2898 ({3{ftp_itb_fetch_thr_dup_bf[0]}} & thr0_pid_data[2:0]) ;
2899
2900assign ftp_thr7_pid_data[2:0] = thr7_pid_data[2:0] ;
2901assign ftp_thr6_pid_data[2:0] = thr6_pid_data[2:0] ;
2902assign ftp_thr5_pid_data[2:0] = thr5_pid_data[2:0] ;
2903assign ftp_thr4_pid_data[2:0] = thr4_pid_data[2:0] ;
2904assign ftp_thr3_pid_data[2:0] = thr3_pid_data[2:0] ;
2905assign ftp_thr2_pid_data[2:0] = thr2_pid_data[2:0] ;
2906assign ftp_thr1_pid_data[2:0] = thr1_pid_data[2:0] ;
2907assign ftp_thr0_pid_data[2:0] = thr0_pid_data[2:0] ;
2908
2909assign ftp_thr0_go_to_sf_wait = (((ftp_fetch_thr_q_f[0] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[0])) & agc_thr0_sf_valid_f) ;
2910assign ftp_thr1_go_to_sf_wait = (((ftp_fetch_thr_q_f[1] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[1])) & agc_thr1_sf_valid_f) ;
2911assign ftp_thr2_go_to_sf_wait = (((ftp_fetch_thr_q_f[2] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[2])) & agc_thr2_sf_valid_f) ;
2912assign ftp_thr3_go_to_sf_wait = (((ftp_fetch_thr_q_f[3] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[3])) & agc_thr3_sf_valid_f) ;
2913assign ftp_thr4_go_to_sf_wait = (((ftp_fetch_thr_q_f[4] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[4])) & agc_thr4_sf_valid_f) ;
2914assign ftp_thr5_go_to_sf_wait = (((ftp_fetch_thr_q_f[5] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[5])) & agc_thr5_sf_valid_f) ;
2915assign ftp_thr6_go_to_sf_wait = (((ftp_fetch_thr_q_f[6] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[6])) & agc_thr6_sf_valid_f) ;
2916assign ftp_thr7_go_to_sf_wait = (((ftp_fetch_thr_q_f[7] & ~invalidation_req_f) | (by_pass_valid_bf & by_pass_sel_bf[7])) & agc_thr7_sf_valid_f) ;
2917
2918assign invalidation_req_f = (ftp_fetch_thr_q_f[0] & agc_invalidation_req_ff[0]) |
2919 (ftp_fetch_thr_q_f[1] & agc_invalidation_req_ff[1]) |
2920 (ftp_fetch_thr_q_f[2] & agc_invalidation_req_ff[2]) |
2921 (ftp_fetch_thr_q_f[3] & agc_invalidation_req_ff[3]) |
2922 (ftp_fetch_thr_q_f[4] & agc_invalidation_req_ff[4]) |
2923 (ftp_fetch_thr_q_f[5] & agc_invalidation_req_ff[5]) |
2924 (ftp_fetch_thr_q_f[6] & agc_invalidation_req_ff[6]) |
2925 (ftp_fetch_thr_q_f[7] & agc_invalidation_req_ff[7]) ;
2926
2927
2928///////////////////////////////////////////////////////////////////////
2929// Spare circuits //
2930///////////////////////////////////////////////////////////////////////
2931ifu_ftu_ftp_ctl_spare_ctl_macro__num_5 spares (
2932 .scan_in(spares_scanin),
2933 .scan_out(spares_scanout),
2934 .l1clk (l1clk),
2935 .siclk(siclk),
2936 .soclk(soclk)
2937);
2938
2939////////////////////////////////////////////////////////////////////////////////////////////////
2940// Power management for ICD //
2941////////////////////////////////////////////////////////////////////////////////////////////////
2942
2943assign curr_thr_pc_bf[4] = ~ifu_agd_pc_f[4] ;
2944assign curr_thr_pc_bf[3] = ~ifu_agd_pc_f[4] & ifu_agd_pc_f[3] ;
2945assign curr_thr_pc_bf[2] = ~ifu_agd_pc_f[4] & ifu_agd_pc_f[2] ;
2946
2947assign ic_pwr_sel_index[0] = ~fetch_same_thr_again_bf & ~ic_rd_req_ff & ~ic_wr_req_ff & ~tg_rd_req_ff & ~tg_wr_req_ff;
2948assign ic_pwr_sel_index[1] = fetch_same_thr_again_bf & ~ic_rd_req_ff & ~ic_wr_req_ff & ~tg_rd_req_ff & ~tg_wr_req_ff;
2949assign ic_pwr_sel_index[2] = (ic_rd_req_ff | ic_wr_req_ff | tg_rd_req_ff | tg_wr_req_ff) ;
2950
2951assign thr0_pc_muxed_f[4:2] = ftp_thr0_sel_br_bf ? agd_address0_m[4:2] : agd_thr0_pc_4_2_f[4:2] ;
2952assign thr1_pc_muxed_f[4:2] = ftp_thr1_sel_br_bf ? agd_address0_m[4:2] : agd_thr1_pc_4_2_f[4:2] ;
2953assign thr2_pc_muxed_f[4:2] = ftp_thr2_sel_br_bf ? agd_address0_m[4:2] : agd_thr2_pc_4_2_f[4:2] ;
2954assign thr3_pc_muxed_f[4:2] = ftp_thr3_sel_br_bf ? agd_address0_m[4:2] : agd_thr3_pc_4_2_f[4:2] ;
2955assign thr4_pc_muxed_f[4:2] = ftp_thr4_sel_br_bf ? agd_address1_m[4:2] : agd_thr4_pc_4_2_f[4:2] ;
2956assign thr5_pc_muxed_f[4:2] = ftp_thr5_sel_br_bf ? agd_address1_m[4:2] : agd_thr5_pc_4_2_f[4:2] ;
2957assign thr6_pc_muxed_f[4:2] = ftp_thr6_sel_br_bf ? agd_address1_m[4:2] : agd_thr6_pc_4_2_f[4:2] ;
2958assign thr7_pc_muxed_f[4:2] = ftp_thr7_sel_br_bf ? agd_address1_m[4:2] : agd_thr7_pc_4_2_f[4:2] ;
2959
2960assign new_thr_pc_bf[4:2] = ({3{ftp_curr_fetch_thr_bf[0]}} & thr0_pc_muxed_f[4:2]) |
2961 ({3{ftp_curr_fetch_thr_bf[1]}} & thr1_pc_muxed_f[4:2]) |
2962 ({3{ftp_curr_fetch_thr_bf[2]}} & thr2_pc_muxed_f[4:2]) |
2963 ({3{ftp_curr_fetch_thr_bf[3]}} & thr3_pc_muxed_f[4:2]) |
2964 ({3{ftp_curr_fetch_thr_bf[4]}} & thr4_pc_muxed_f[4:2]) |
2965 ({3{ftp_curr_fetch_thr_bf[5]}} & thr5_pc_muxed_f[4:2]) |
2966 ({3{ftp_curr_fetch_thr_bf[6]}} & thr6_pc_muxed_f[4:2]) |
2967 ({3{ftp_curr_fetch_thr_bf[7]}} & thr7_pc_muxed_f[4:2]) ;
2968
2969assign ic_index_bf[4:2] = ({3{ic_pwr_sel_index[0]}} & new_thr_pc_bf[4:2]) |
2970 ({3{ic_pwr_sel_index[1]}} & curr_thr_pc_bf[4:2]) |
2971 ({3{ic_pwr_sel_index[2]}} & asi_addr_bf[5:3]) ;
2972
2973assign ftp_icd_quad_3_en_bf = (hp_pickready |
2974 ic_pwr_sel_index[2] |
2975 ftp_fill_req_q_bf) | ~ifu_ic_pmen | mbi_run_bf;
2976
2977assign ftp_icd_quad_2_en_bf = (~(ic_index_bf[4:2] == 3'b111) & (hp_pickready | ic_pwr_sel_index[2])) |
2978 ftp_fill_req_q_bf | ~ifu_ic_pmen | mbi_run_bf;
2979
2980assign ftp_icd_quad_1_en_bf = (~(ic_index_bf[4:3] == 2'b11) & (hp_pickready | ic_pwr_sel_index[2])) |
2981 ftp_fill_req_q_bf | ~ifu_ic_pmen | mbi_run_bf;
2982
2983assign ftp_icd_quad_0_en_bf = (~(ic_index_bf[4:3] == 2'b11) & (hp_pickready | ic_pwr_sel_index[2])) |
2984 (~({ic_index_bf[4],ic_index_bf[2]} == 2'b11) & (hp_pickready | ic_pwr_sel_index[2])) |
2985 ftp_fill_req_q_bf | ~ifu_ic_pmen | mbi_run_bf;
2986
2987
2988
2989
2990
2991supply0 vss;
2992supply1 vdd;
2993assign se = tcu_scan_en ;
2994// fixscan start:
2995assign br_reg_scanin = scan_in ;
2996assign tlu_flush_ifu_req_scanin = br_reg_scanout ;
2997assign br_tid_reg_scanin = tlu_flush_ifu_req_scanout;
2998assign tid_dec_w_reg_scanin = br_tid_reg_scanout ;
2999assign tid_bf_reg_scanin = tid_dec_w_reg_scanout ;
3000assign top_lruf_scanin = tid_bf_reg_scanout ;
3001assign bot_lruf_scanin = top_lruf_scanout ;
3002assign favor_top_reg_scanin = bot_lruf_scanout ;
3003assign curr_fetch_thr_f_reg_scanin = favor_top_reg_scanout ;
3004assign curr_fetch_thr_c_reg_scanin = curr_fetch_thr_f_reg_scanout;
3005assign inv_line_reg_scanin = curr_fetch_thr_c_reg_scanout;
3006assign fill_req_bf_reg_scanin = inv_line_reg_scanout ;
3007assign rd_is_first_reg_scanin = fill_req_bf_reg_scanout ;
3008assign wr_request_pending_reg_scanin = rd_is_first_reg_scanout ;
3009assign ic_wr_req_ff_reg_scanin = wr_request_pending_reg_scanout;
3010assign ic_rd_req_ff_reg_scanin = ic_wr_req_ff_reg_scanout ;
3011assign tg_wr_req_ff_reg_scanin = ic_rd_req_ff_reg_scanout ;
3012assign tg_rd_req_ff_reg_scanin = tg_wr_req_ff_reg_scanout ;
3013assign itt_rd_req_ff_reg_scanin = tg_rd_req_ff_reg_scanout ;
3014assign itd_rd_req_ff_reg_scanin = itt_rd_req_ff_reg_scanout;
3015assign ith_det_req_ff_reg_scanin = itd_rd_req_ff_reg_scanout;
3016assign itlb_probe_l_reg_scanin = ith_det_req_ff_reg_scanout;
3017assign fill_req_bf_q_reg_scanin = itlb_probe_l_reg_scanout ;
3018assign mbist_in_reg_scanin = fill_req_bf_q_reg_scanout;
3019assign itlb_cam_vld_reg_scanin = mbist_in_reg_scanout ;
3020assign itlb_bypass_lat_scanin = itlb_cam_vld_reg_scanout ;
3021assign ic_rd_done_f_reg_scanin = itlb_bypass_lat_scanout ;
3022assign ic_rd_done_c_reg_scanin = ic_rd_done_f_reg_scanout ;
3023assign ic_rd_done_p_reg_scanin = ic_rd_done_c_reg_scanout ;
3024assign ic_wr_done_f_reg_scanin = ic_rd_done_p_reg_scanout ;
3025assign tg_rd_done_f_reg_scanin = ic_wr_done_f_reg_scanout ;
3026assign tg_rd_done_c_reg_scanin = tg_rd_done_f_reg_scanout ;
3027assign tg_wr_done_f_reg_scanin = tg_rd_done_c_reg_scanout ;
3028assign it_rd_done_f_reg_scanin = tg_wr_done_f_reg_scanout ;
3029assign it_rd_done_c_reg_scanin = it_rd_done_f_reg_scanout ;
3030assign asi_rd_done_reg_scanin = it_rd_done_c_reg_scanout ;
3031assign asi_wr_done_reg_scanin = asi_rd_done_reg_scanout ;
3032assign asi_it_rd_done_reg_scanin = asi_wr_done_reg_scanout ;
3033assign itlb_sel_tag_f_reg_scanin = asi_it_rd_done_reg_scanout;
3034assign itlb_sel_data_f_reg_scanin = itlb_sel_tag_f_reg_scanout;
3035assign itlb_sel_pa_f_reg_scanin = itlb_sel_data_f_reg_scanout;
3036assign itlb_sel_c_reg_scanin = itlb_sel_pa_f_reg_scanout;
3037assign thrx_redirect_reg_scanin = itlb_sel_c_reg_scanout ;
3038assign fetch_v_f_reg_scanin = thrx_redirect_reg_scanout;
3039assign fetch_v_f_dup_reg_scanin = fetch_v_f_reg_scanout ;
3040assign fetch_v_c_reg_scanin = fetch_v_f_dup_reg_scanout;
3041assign enabled_thr_reg_scanin = fetch_v_c_reg_scanout ;
3042assign ready_fp_reg_scanin = enabled_thr_reg_scanout ;
3043assign cmu_fill_byp_thread_reg_scanin = ready_fp_reg_scanout ;
3044assign by_pass_sel_f_reg_scanin = cmu_fill_byp_thread_reg_scanout;
3045assign by_pass_sel_c_reg_scanin = by_pass_sel_f_reg_scanout;
3046assign byp_valid_reg_scanin = by_pass_sel_c_reg_scanout;
3047assign thrx_kill_by_pass_reg_scanin = byp_valid_reg_scanout ;
3048assign cycle_2_by_pass_f_reg_scanin = thrx_kill_by_pass_reg_scanout;
3049assign cycle_3_by_pass_f_reg_scanin = cycle_2_by_pass_f_reg_scanout;
3050assign cycle_3_by_pass_c_reg_scanin = cycle_3_by_pass_f_reg_scanout;
3051assign by_pass_v_f_reg_scanin = cycle_3_by_pass_c_reg_scanout;
3052assign by_pass_v_c_reg_scanin = by_pass_v_f_reg_scanout ;
3053assign pstate_am_reg_scanin = by_pass_v_c_reg_scanout ;
3054assign reload_latch_scanin = pstate_am_reg_scanout ;
3055assign pre_sel_am_reg_scanin = reload_latch_scanout ;
3056assign thr0_pid_reg_scanin = pre_sel_am_reg_scanout ;
3057assign thr1_pid_reg_scanin = thr0_pid_reg_scanout ;
3058assign thr2_pid_reg_scanin = thr1_pid_reg_scanout ;
3059assign thr3_pid_reg_scanin = thr2_pid_reg_scanout ;
3060assign thr4_pid_reg_scanin = thr3_pid_reg_scanout ;
3061assign thr5_pid_reg_scanin = thr4_pid_reg_scanout ;
3062assign thr6_pid_reg_scanin = thr5_pid_reg_scanout ;
3063assign thr7_pid_reg_scanin = thr6_pid_reg_scanout ;
3064assign spares_scanin = thr7_pid_reg_scanout ;
3065assign scan_out = spares_scanout ;
3066// fixscan end:
3067endmodule
3068
3069
3070
3071
3072
3073
3074
3075// any PARAMS parms go into naming of macro
3076
3077module ifu_ftu_ftp_ctl_l1clkhdr_ctl_macro (
3078 l2clk,
3079 l1en,
3080 pce_ov,
3081 stop,
3082 se,
3083 l1clk);
3084
3085
3086 input l2clk;
3087 input l1en;
3088 input pce_ov;
3089 input stop;
3090 input se;
3091 output l1clk;
3092
3093
3094
3095
3096
3097cl_sc1_l1hdr_8x c_0 (
3098
3099
3100 .l2clk(l2clk),
3101 .pce(l1en),
3102 .l1clk(l1clk),
3103 .se(se),
3104 .pce_ov(pce_ov),
3105 .stop(stop)
3106);
3107
3108
3109
3110endmodule
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124// any PARAMS parms go into naming of macro
3125
3126module ifu_ftu_ftp_ctl_msff_ctl_macro__width_6 (
3127 din,
3128 l1clk,
3129 scan_in,
3130 siclk,
3131 soclk,
3132 dout,
3133 scan_out);
3134wire [5:0] fdin;
3135wire [4:0] so;
3136
3137 input [5:0] din;
3138 input l1clk;
3139 input scan_in;
3140
3141
3142 input siclk;
3143 input soclk;
3144
3145 output [5:0] dout;
3146 output scan_out;
3147assign fdin[5:0] = din[5:0];
3148
3149
3150
3151
3152
3153
3154dff #(6) d0_0 (
3155.l1clk(l1clk),
3156.siclk(siclk),
3157.soclk(soclk),
3158.d(fdin[5:0]),
3159.si({scan_in,so[4:0]}),
3160.so({so[4:0],scan_out}),
3161.q(dout[5:0])
3162);
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175endmodule
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189// any PARAMS parms go into naming of macro
3190
3191module ifu_ftu_ftp_ctl_msff_ctl_macro__width_8 (
3192 din,
3193 l1clk,
3194 scan_in,
3195 siclk,
3196 soclk,
3197 dout,
3198 scan_out);
3199wire [7:0] fdin;
3200wire [6:0] so;
3201
3202 input [7:0] din;
3203 input l1clk;
3204 input scan_in;
3205
3206
3207 input siclk;
3208 input soclk;
3209
3210 output [7:0] dout;
3211 output scan_out;
3212assign fdin[7:0] = din[7:0];
3213
3214
3215
3216
3217
3218
3219dff #(8) d0_0 (
3220.l1clk(l1clk),
3221.siclk(siclk),
3222.soclk(soclk),
3223.d(fdin[7:0]),
3224.si({scan_in,so[6:0]}),
3225.so({so[6:0],scan_out}),
3226.q(dout[7:0])
3227);
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240endmodule
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254// any PARAMS parms go into naming of macro
3255
3256module ifu_ftu_ftp_ctl_msff_ctl_macro__width_12 (
3257 din,
3258 l1clk,
3259 scan_in,
3260 siclk,
3261 soclk,
3262 dout,
3263 scan_out);
3264wire [11:0] fdin;
3265wire [10:0] so;
3266
3267 input [11:0] din;
3268 input l1clk;
3269 input scan_in;
3270
3271
3272 input siclk;
3273 input soclk;
3274
3275 output [11:0] dout;
3276 output scan_out;
3277assign fdin[11:0] = din[11:0];
3278
3279
3280
3281
3282
3283
3284dff #(12) d0_0 (
3285.l1clk(l1clk),
3286.siclk(siclk),
3287.soclk(soclk),
3288.d(fdin[11:0]),
3289.si({scan_in,so[10:0]}),
3290.so({so[10:0],scan_out}),
3291.q(dout[11:0])
3292);
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305endmodule
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319// any PARAMS parms go into naming of macro
3320
3321module ifu_ftu_ftp_ctl_msff_ctl_macro__width_1 (
3322 din,
3323 l1clk,
3324 scan_in,
3325 siclk,
3326 soclk,
3327 dout,
3328 scan_out);
3329wire [0:0] fdin;
3330
3331 input [0:0] din;
3332 input l1clk;
3333 input scan_in;
3334
3335
3336 input siclk;
3337 input soclk;
3338
3339 output [0:0] dout;
3340 output scan_out;
3341assign fdin[0:0] = din[0:0];
3342
3343
3344
3345
3346
3347
3348dff #(1) d0_0 (
3349.l1clk(l1clk),
3350.siclk(siclk),
3351.soclk(soclk),
3352.d(fdin[0:0]),
3353.si(scan_in),
3354.so(scan_out),
3355.q(dout[0:0])
3356);
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369endmodule
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383// any PARAMS parms go into naming of macro
3384
3385module ifu_ftu_ftp_ctl_msff_ctl_macro__width_2 (
3386 din,
3387 l1clk,
3388 scan_in,
3389 siclk,
3390 soclk,
3391 dout,
3392 scan_out);
3393wire [1:0] fdin;
3394wire [0:0] so;
3395
3396 input [1:0] din;
3397 input l1clk;
3398 input scan_in;
3399
3400
3401 input siclk;
3402 input soclk;
3403
3404 output [1:0] dout;
3405 output scan_out;
3406assign fdin[1:0] = din[1:0];
3407
3408
3409
3410
3411
3412
3413dff #(2) d0_0 (
3414.l1clk(l1clk),
3415.siclk(siclk),
3416.soclk(soclk),
3417.d(fdin[1:0]),
3418.si({scan_in,so[0:0]}),
3419.so({so[0:0],scan_out}),
3420.q(dout[1:0])
3421);
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434endmodule
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448// any PARAMS parms go into naming of macro
3449
3450module ifu_ftu_ftp_ctl_msff_ctl_macro__width_11 (
3451 din,
3452 l1clk,
3453 scan_in,
3454 siclk,
3455 soclk,
3456 dout,
3457 scan_out);
3458wire [10:0] fdin;
3459wire [9:0] so;
3460
3461 input [10:0] din;
3462 input l1clk;
3463 input scan_in;
3464
3465
3466 input siclk;
3467 input soclk;
3468
3469 output [10:0] dout;
3470 output scan_out;
3471assign fdin[10:0] = din[10:0];
3472
3473
3474
3475
3476
3477
3478dff #(11) d0_0 (
3479.l1clk(l1clk),
3480.siclk(siclk),
3481.soclk(soclk),
3482.d(fdin[10:0]),
3483.si({scan_in,so[9:0]}),
3484.so({so[9:0],scan_out}),
3485.q(dout[10:0])
3486);
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499endmodule
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513// any PARAMS parms go into naming of macro
3514
3515module ifu_ftu_ftp_ctl_msff_ctl_macro__width_5 (
3516 din,
3517 l1clk,
3518 scan_in,
3519 siclk,
3520 soclk,
3521 dout,
3522 scan_out);
3523wire [4:0] fdin;
3524wire [3:0] so;
3525
3526 input [4:0] din;
3527 input l1clk;
3528 input scan_in;
3529
3530
3531 input siclk;
3532 input soclk;
3533
3534 output [4:0] dout;
3535 output scan_out;
3536assign fdin[4:0] = din[4:0];
3537
3538
3539
3540
3541
3542
3543dff #(5) d0_0 (
3544.l1clk(l1clk),
3545.siclk(siclk),
3546.soclk(soclk),
3547.d(fdin[4:0]),
3548.si({scan_in,so[3:0]}),
3549.so({so[3:0],scan_out}),
3550.q(dout[4:0])
3551);
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564endmodule
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578// any PARAMS parms go into naming of macro
3579
3580module ifu_ftu_ftp_ctl_msff_ctl_macro__width_4 (
3581 din,
3582 l1clk,
3583 scan_in,
3584 siclk,
3585 soclk,
3586 dout,
3587 scan_out);
3588wire [3:0] fdin;
3589wire [2:0] so;
3590
3591 input [3:0] din;
3592 input l1clk;
3593 input scan_in;
3594
3595
3596 input siclk;
3597 input soclk;
3598
3599 output [3:0] dout;
3600 output scan_out;
3601assign fdin[3:0] = din[3:0];
3602
3603
3604
3605
3606
3607
3608dff #(4) d0_0 (
3609.l1clk(l1clk),
3610.siclk(siclk),
3611.soclk(soclk),
3612.d(fdin[3:0]),
3613.si({scan_in,so[2:0]}),
3614.so({so[2:0],scan_out}),
3615.q(dout[3:0])
3616);
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629endmodule
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643// any PARAMS parms go into naming of macro
3644
3645module ifu_ftu_ftp_ctl_msff_ctl_macro__width_10 (
3646 din,
3647 l1clk,
3648 scan_in,
3649 siclk,
3650 soclk,
3651 dout,
3652 scan_out);
3653wire [9:0] fdin;
3654wire [8:0] so;
3655
3656 input [9:0] din;
3657 input l1clk;
3658 input scan_in;
3659
3660
3661 input siclk;
3662 input soclk;
3663
3664 output [9:0] dout;
3665 output scan_out;
3666assign fdin[9:0] = din[9:0];
3667
3668
3669
3670
3671
3672
3673dff #(10) d0_0 (
3674.l1clk(l1clk),
3675.siclk(siclk),
3676.soclk(soclk),
3677.d(fdin[9:0]),
3678.si({scan_in,so[8:0]}),
3679.so({so[8:0],scan_out}),
3680.q(dout[9:0])
3681);
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694endmodule
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708// any PARAMS parms go into naming of macro
3709
3710module ifu_ftu_ftp_ctl_msff_ctl_macro__width_3 (
3711 din,
3712 l1clk,
3713 scan_in,
3714 siclk,
3715 soclk,
3716 dout,
3717 scan_out);
3718wire [2:0] fdin;
3719wire [1:0] so;
3720
3721 input [2:0] din;
3722 input l1clk;
3723 input scan_in;
3724
3725
3726 input siclk;
3727 input soclk;
3728
3729 output [2:0] dout;
3730 output scan_out;
3731assign fdin[2:0] = din[2:0];
3732
3733
3734
3735
3736
3737
3738dff #(3) d0_0 (
3739.l1clk(l1clk),
3740.siclk(siclk),
3741.soclk(soclk),
3742.d(fdin[2:0]),
3743.si({scan_in,so[1:0]}),
3744.so({so[1:0],scan_out}),
3745.q(dout[2:0])
3746);
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759endmodule
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769// Description: Spare gate macro for control blocks
3770//
3771// Param num controls the number of times the macro is added
3772// flops=0 can be used to use only combination spare logic
3773
3774
3775module ifu_ftu_ftp_ctl_spare_ctl_macro__num_5 (
3776 l1clk,
3777 scan_in,
3778 siclk,
3779 soclk,
3780 scan_out);
3781wire si_0;
3782wire so_0;
3783wire spare0_flop_unused;
3784wire spare0_buf_32x_unused;
3785wire spare0_nand3_8x_unused;
3786wire spare0_inv_8x_unused;
3787wire spare0_aoi22_4x_unused;
3788wire spare0_buf_8x_unused;
3789wire spare0_oai22_4x_unused;
3790wire spare0_inv_16x_unused;
3791wire spare0_nand2_16x_unused;
3792wire spare0_nor3_4x_unused;
3793wire spare0_nand2_8x_unused;
3794wire spare0_buf_16x_unused;
3795wire spare0_nor2_16x_unused;
3796wire spare0_inv_32x_unused;
3797wire si_1;
3798wire so_1;
3799wire spare1_flop_unused;
3800wire spare1_buf_32x_unused;
3801wire spare1_nand3_8x_unused;
3802wire spare1_inv_8x_unused;
3803wire spare1_aoi22_4x_unused;
3804wire spare1_buf_8x_unused;
3805wire spare1_oai22_4x_unused;
3806wire spare1_inv_16x_unused;
3807wire spare1_nand2_16x_unused;
3808wire spare1_nor3_4x_unused;
3809wire spare1_nand2_8x_unused;
3810wire spare1_buf_16x_unused;
3811wire spare1_nor2_16x_unused;
3812wire spare1_inv_32x_unused;
3813wire si_2;
3814wire so_2;
3815wire spare2_flop_unused;
3816wire spare2_buf_32x_unused;
3817wire spare2_nand3_8x_unused;
3818wire spare2_inv_8x_unused;
3819wire spare2_aoi22_4x_unused;
3820wire spare2_buf_8x_unused;
3821wire spare2_oai22_4x_unused;
3822wire spare2_inv_16x_unused;
3823wire spare2_nand2_16x_unused;
3824wire spare2_nor3_4x_unused;
3825wire spare2_nand2_8x_unused;
3826wire spare2_buf_16x_unused;
3827wire spare2_nor2_16x_unused;
3828wire spare2_inv_32x_unused;
3829wire si_3;
3830wire so_3;
3831wire spare3_flop_unused;
3832wire spare3_buf_32x_unused;
3833wire spare3_nand3_8x_unused;
3834wire spare3_inv_8x_unused;
3835wire spare3_aoi22_4x_unused;
3836wire spare3_buf_8x_unused;
3837wire spare3_oai22_4x_unused;
3838wire spare3_inv_16x_unused;
3839wire spare3_nand2_16x_unused;
3840wire spare3_nor3_4x_unused;
3841wire spare3_nand2_8x_unused;
3842wire spare3_buf_16x_unused;
3843wire spare3_nor2_16x_unused;
3844wire spare3_inv_32x_unused;
3845wire si_4;
3846wire so_4;
3847wire spare4_flop_unused;
3848wire spare4_buf_32x_unused;
3849wire spare4_nand3_8x_unused;
3850wire spare4_inv_8x_unused;
3851wire spare4_aoi22_4x_unused;
3852wire spare4_buf_8x_unused;
3853wire spare4_oai22_4x_unused;
3854wire spare4_inv_16x_unused;
3855wire spare4_nand2_16x_unused;
3856wire spare4_nor3_4x_unused;
3857wire spare4_nand2_8x_unused;
3858wire spare4_buf_16x_unused;
3859wire spare4_nor2_16x_unused;
3860wire spare4_inv_32x_unused;
3861
3862
3863input l1clk;
3864input scan_in;
3865input siclk;
3866input soclk;
3867output scan_out;
3868
3869cl_sc1_msff_8x spare0_flop (.l1clk(l1clk),
3870 .siclk(siclk),
3871 .soclk(soclk),
3872 .si(si_0),
3873 .so(so_0),
3874 .d(1'b0),
3875 .q(spare0_flop_unused));
3876assign si_0 = scan_in;
3877
3878cl_u1_buf_32x spare0_buf_32x (.in(1'b1),
3879 .out(spare0_buf_32x_unused));
3880cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1),
3881 .in1(1'b1),
3882 .in2(1'b1),
3883 .out(spare0_nand3_8x_unused));
3884cl_u1_inv_8x spare0_inv_8x (.in(1'b1),
3885 .out(spare0_inv_8x_unused));
3886cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1),
3887 .in01(1'b1),
3888 .in10(1'b1),
3889 .in11(1'b1),
3890 .out(spare0_aoi22_4x_unused));
3891cl_u1_buf_8x spare0_buf_8x (.in(1'b1),
3892 .out(spare0_buf_8x_unused));
3893cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1),
3894 .in01(1'b1),
3895 .in10(1'b1),
3896 .in11(1'b1),
3897 .out(spare0_oai22_4x_unused));
3898cl_u1_inv_16x spare0_inv_16x (.in(1'b1),
3899 .out(spare0_inv_16x_unused));
3900cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1),
3901 .in1(1'b1),
3902 .out(spare0_nand2_16x_unused));
3903cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0),
3904 .in1(1'b0),
3905 .in2(1'b0),
3906 .out(spare0_nor3_4x_unused));
3907cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1),
3908 .in1(1'b1),
3909 .out(spare0_nand2_8x_unused));
3910cl_u1_buf_16x spare0_buf_16x (.in(1'b1),
3911 .out(spare0_buf_16x_unused));
3912cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0),
3913 .in1(1'b0),
3914 .out(spare0_nor2_16x_unused));
3915cl_u1_inv_32x spare0_inv_32x (.in(1'b1),
3916 .out(spare0_inv_32x_unused));
3917
3918cl_sc1_msff_8x spare1_flop (.l1clk(l1clk),
3919 .siclk(siclk),
3920 .soclk(soclk),
3921 .si(si_1),
3922 .so(so_1),
3923 .d(1'b0),
3924 .q(spare1_flop_unused));
3925assign si_1 = so_0;
3926
3927cl_u1_buf_32x spare1_buf_32x (.in(1'b1),
3928 .out(spare1_buf_32x_unused));
3929cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1),
3930 .in1(1'b1),
3931 .in2(1'b1),
3932 .out(spare1_nand3_8x_unused));
3933cl_u1_inv_8x spare1_inv_8x (.in(1'b1),
3934 .out(spare1_inv_8x_unused));
3935cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1),
3936 .in01(1'b1),
3937 .in10(1'b1),
3938 .in11(1'b1),
3939 .out(spare1_aoi22_4x_unused));
3940cl_u1_buf_8x spare1_buf_8x (.in(1'b1),
3941 .out(spare1_buf_8x_unused));
3942cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1),
3943 .in01(1'b1),
3944 .in10(1'b1),
3945 .in11(1'b1),
3946 .out(spare1_oai22_4x_unused));
3947cl_u1_inv_16x spare1_inv_16x (.in(1'b1),
3948 .out(spare1_inv_16x_unused));
3949cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1),
3950 .in1(1'b1),
3951 .out(spare1_nand2_16x_unused));
3952cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0),
3953 .in1(1'b0),
3954 .in2(1'b0),
3955 .out(spare1_nor3_4x_unused));
3956cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1),
3957 .in1(1'b1),
3958 .out(spare1_nand2_8x_unused));
3959cl_u1_buf_16x spare1_buf_16x (.in(1'b1),
3960 .out(spare1_buf_16x_unused));
3961cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0),
3962 .in1(1'b0),
3963 .out(spare1_nor2_16x_unused));
3964cl_u1_inv_32x spare1_inv_32x (.in(1'b1),
3965 .out(spare1_inv_32x_unused));
3966
3967cl_sc1_msff_8x spare2_flop (.l1clk(l1clk),
3968 .siclk(siclk),
3969 .soclk(soclk),
3970 .si(si_2),
3971 .so(so_2),
3972 .d(1'b0),
3973 .q(spare2_flop_unused));
3974assign si_2 = so_1;
3975
3976cl_u1_buf_32x spare2_buf_32x (.in(1'b1),
3977 .out(spare2_buf_32x_unused));
3978cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1),
3979 .in1(1'b1),
3980 .in2(1'b1),
3981 .out(spare2_nand3_8x_unused));
3982cl_u1_inv_8x spare2_inv_8x (.in(1'b1),
3983 .out(spare2_inv_8x_unused));
3984cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1),
3985 .in01(1'b1),
3986 .in10(1'b1),
3987 .in11(1'b1),
3988 .out(spare2_aoi22_4x_unused));
3989cl_u1_buf_8x spare2_buf_8x (.in(1'b1),
3990 .out(spare2_buf_8x_unused));
3991cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1),
3992 .in01(1'b1),
3993 .in10(1'b1),
3994 .in11(1'b1),
3995 .out(spare2_oai22_4x_unused));
3996cl_u1_inv_16x spare2_inv_16x (.in(1'b1),
3997 .out(spare2_inv_16x_unused));
3998cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1),
3999 .in1(1'b1),
4000 .out(spare2_nand2_16x_unused));
4001cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0),
4002 .in1(1'b0),
4003 .in2(1'b0),
4004 .out(spare2_nor3_4x_unused));
4005cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1),
4006 .in1(1'b1),
4007 .out(spare2_nand2_8x_unused));
4008cl_u1_buf_16x spare2_buf_16x (.in(1'b1),
4009 .out(spare2_buf_16x_unused));
4010cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0),
4011 .in1(1'b0),
4012 .out(spare2_nor2_16x_unused));
4013cl_u1_inv_32x spare2_inv_32x (.in(1'b1),
4014 .out(spare2_inv_32x_unused));
4015
4016cl_sc1_msff_8x spare3_flop (.l1clk(l1clk),
4017 .siclk(siclk),
4018 .soclk(soclk),
4019 .si(si_3),
4020 .so(so_3),
4021 .d(1'b0),
4022 .q(spare3_flop_unused));
4023assign si_3 = so_2;
4024
4025cl_u1_buf_32x spare3_buf_32x (.in(1'b1),
4026 .out(spare3_buf_32x_unused));
4027cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1),
4028 .in1(1'b1),
4029 .in2(1'b1),
4030 .out(spare3_nand3_8x_unused));
4031cl_u1_inv_8x spare3_inv_8x (.in(1'b1),
4032 .out(spare3_inv_8x_unused));
4033cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1),
4034 .in01(1'b1),
4035 .in10(1'b1),
4036 .in11(1'b1),
4037 .out(spare3_aoi22_4x_unused));
4038cl_u1_buf_8x spare3_buf_8x (.in(1'b1),
4039 .out(spare3_buf_8x_unused));
4040cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1),
4041 .in01(1'b1),
4042 .in10(1'b1),
4043 .in11(1'b1),
4044 .out(spare3_oai22_4x_unused));
4045cl_u1_inv_16x spare3_inv_16x (.in(1'b1),
4046 .out(spare3_inv_16x_unused));
4047cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1),
4048 .in1(1'b1),
4049 .out(spare3_nand2_16x_unused));
4050cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0),
4051 .in1(1'b0),
4052 .in2(1'b0),
4053 .out(spare3_nor3_4x_unused));
4054cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1),
4055 .in1(1'b1),
4056 .out(spare3_nand2_8x_unused));
4057cl_u1_buf_16x spare3_buf_16x (.in(1'b1),
4058 .out(spare3_buf_16x_unused));
4059cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0),
4060 .in1(1'b0),
4061 .out(spare3_nor2_16x_unused));
4062cl_u1_inv_32x spare3_inv_32x (.in(1'b1),
4063 .out(spare3_inv_32x_unused));
4064
4065cl_sc1_msff_8x spare4_flop (.l1clk(l1clk),
4066 .siclk(siclk),
4067 .soclk(soclk),
4068 .si(si_4),
4069 .so(so_4),
4070 .d(1'b0),
4071 .q(spare4_flop_unused));
4072assign si_4 = so_3;
4073
4074cl_u1_buf_32x spare4_buf_32x (.in(1'b1),
4075 .out(spare4_buf_32x_unused));
4076cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1),
4077 .in1(1'b1),
4078 .in2(1'b1),
4079 .out(spare4_nand3_8x_unused));
4080cl_u1_inv_8x spare4_inv_8x (.in(1'b1),
4081 .out(spare4_inv_8x_unused));
4082cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1),
4083 .in01(1'b1),
4084 .in10(1'b1),
4085 .in11(1'b1),
4086 .out(spare4_aoi22_4x_unused));
4087cl_u1_buf_8x spare4_buf_8x (.in(1'b1),
4088 .out(spare4_buf_8x_unused));
4089cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1),
4090 .in01(1'b1),
4091 .in10(1'b1),
4092 .in11(1'b1),
4093 .out(spare4_oai22_4x_unused));
4094cl_u1_inv_16x spare4_inv_16x (.in(1'b1),
4095 .out(spare4_inv_16x_unused));
4096cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1),
4097 .in1(1'b1),
4098 .out(spare4_nand2_16x_unused));
4099cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0),
4100 .in1(1'b0),
4101 .in2(1'b0),
4102 .out(spare4_nor3_4x_unused));
4103cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1),
4104 .in1(1'b1),
4105 .out(spare4_nand2_8x_unused));
4106cl_u1_buf_16x spare4_buf_16x (.in(1'b1),
4107 .out(spare4_buf_16x_unused));
4108cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0),
4109 .in1(1'b0),
4110 .out(spare4_nor2_16x_unused));
4111cl_u1_inv_32x spare4_inv_32x (.in(1'b1),
4112 .out(spare4_inv_32x_unused));
4113assign scan_out = so_4;
4114
4115
4116
4117endmodule
4118