Commit | Line | Data |
---|---|---|
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 ============================================ | |
35 | module 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); | |
244 | wire pce_ov; | |
245 | wire stop; | |
246 | wire siclk; | |
247 | wire soclk; | |
248 | wire l1clk; | |
249 | wire l1clk_pm1; | |
250 | wire br_reg_scanin; | |
251 | wire br_reg_scanout; | |
252 | wire br0_matches_curr; | |
253 | wire br1_matches_curr; | |
254 | wire [1:0] dec_br_taken_m; | |
255 | wire [1:0] dec_valid_m; | |
256 | wire br0_matches_curr_f; | |
257 | wire br1_matches_curr_f; | |
258 | wire [1:0] br_taken_ff; | |
259 | wire tlu_flush_ifu_req_scanin; | |
260 | wire tlu_flush_ifu_req_scanout; | |
261 | wire [7:0] ftp_tlu_flush_f; | |
262 | wire br_tid_reg_scanin; | |
263 | wire br_tid_reg_scanout; | |
264 | wire [1:0] tid1_m; | |
265 | wire [1:0] tid0_m; | |
266 | wire [1:0] tid1_b; | |
267 | wire [1:0] tid0_b; | |
268 | wire [7:0] next_tid_dec_b; | |
269 | wire tid_dec_w_reg_scanin; | |
270 | wire tid_dec_w_reg_scanout; | |
271 | wire [7:0] tid_dec_w; | |
272 | wire ftp_any_thread_ready; | |
273 | wire [7:0] ready_hp_bf; | |
274 | wire [7:0] fpick; | |
275 | wire [7:0] hp_pick; | |
276 | wire [7:0] ftp_curr_fetch_thr_bf; | |
277 | wire [7:0] next_ith_det_thr_id; | |
278 | wire [7:0] ith_det_thr_id; | |
279 | wire it_rd_req_done_f; | |
280 | wire tid_bf_reg_scanin; | |
281 | wire tid_bf_reg_scanout; | |
282 | wire [7:0] ftp_itb_fetch_thr_dup_bf; | |
283 | wire [3:0] top_hp_ready; | |
284 | wire [7:0] enabled_threads; | |
285 | wire [3:0] bot_hp_ready; | |
286 | wire top_hp_pickready; | |
287 | wire bot_hp_pickready; | |
288 | wire hp_pickready; | |
289 | wire [3:0] bot_hp_pick; | |
290 | wire [7:0] bot_lru; | |
291 | wire [3:0] top_hp_pick; | |
292 | wire [7:0] top_lru; | |
293 | wire sel_top_hp; | |
294 | wire favor_top; | |
295 | wire [3:0] top_fpick; | |
296 | wire [3:0] bot_fpick; | |
297 | wire [7:0] ntop_lru; | |
298 | wire [7:0] ntop_lru_in; | |
299 | wire top_lruf_scanin; | |
300 | wire top_lruf_scanout; | |
301 | wire [7:0] top_lru_out; | |
302 | wire [7:0] nbot_lru; | |
303 | wire [7:0] nbot_lru_in; | |
304 | wire bot_lruf_scanin; | |
305 | wire bot_lruf_scanout; | |
306 | wire [7:0] bot_lru_out; | |
307 | wire set_favor_top; | |
308 | wire reset_favor_top; | |
309 | wire next_favor_top; | |
310 | wire favor_top_reg_scanin; | |
311 | wire favor_top_reg_scanout; | |
312 | wire [7:0] next_curr_fetch_f_bf; | |
313 | wire curr_fetch_thr_f_reg_scanin; | |
314 | wire curr_fetch_thr_f_reg_scanout; | |
315 | wire curr_fetch_thr_c_reg_scanin; | |
316 | wire curr_fetch_thr_c_reg_scanout; | |
317 | wire [7:0] ftp_curr_fetch_thr_c; | |
318 | wire ftp_fetch_v_dup_f; | |
319 | wire next_ftp_fill_req_q; | |
320 | wire inv_line_reg_scanin; | |
321 | wire inv_line_reg_scanout; | |
322 | wire inv_line_bf; | |
323 | wire next_fill_req; | |
324 | wire fill_req_bf_reg_scanin; | |
325 | wire fill_req_bf_reg_scanout; | |
326 | wire ftp_fill_req_bf; | |
327 | wire asi_rd_request; | |
328 | wire next_rd_is_first; | |
329 | wire wr_request_pending; | |
330 | wire rd_request_pending; | |
331 | wire asi_rd_is_first; | |
332 | wire rd_is_first_reg_scanin; | |
333 | wire rd_is_first_reg_scanout; | |
334 | wire asi_wr_request; | |
335 | wire next_wr_request_pending; | |
336 | wire asi_wr_done_in; | |
337 | wire next_rd_request_pending; | |
338 | wire wr_request_pending_reg_scanin; | |
339 | wire wr_request_pending_reg_scanout; | |
340 | wire asi_rd_ok; | |
341 | wire asi_wr_ok; | |
342 | wire next_ic_wr_req; | |
343 | wire ic_wr_req_ff; | |
344 | wire ic_wr_req_ff_reg_scanin; | |
345 | wire ic_wr_req_ff_reg_scanout; | |
346 | wire next_ic_rd_req; | |
347 | wire ic_rd_req_ff; | |
348 | wire ic_rd_req_ff_reg_scanin; | |
349 | wire ic_rd_req_ff_reg_scanout; | |
350 | wire next_tg_wr_req; | |
351 | wire tg_wr_req_ff; | |
352 | wire tg_wr_req_ff_reg_scanin; | |
353 | wire tg_wr_req_ff_reg_scanout; | |
354 | wire next_tg_rd_req; | |
355 | wire tg_rd_req_ff; | |
356 | wire tg_rd_req_ff_reg_scanin; | |
357 | wire tg_rd_req_ff_reg_scanout; | |
358 | wire next_itt_rd_req; | |
359 | wire itt_rd_req_ff; | |
360 | wire reload; | |
361 | wire reload_last; | |
362 | wire itt_rd_req_ff_reg_scanin; | |
363 | wire itt_rd_req_ff_reg_scanout; | |
364 | wire next_itd_rd_req; | |
365 | wire itd_rd_req_ff; | |
366 | wire itd_rd_req_ff_reg_scanin; | |
367 | wire itd_rd_req_ff_reg_scanout; | |
368 | wire next_ith_det_req; | |
369 | wire ith_det_req_ff; | |
370 | wire ith_det_req_ff_reg_scanin; | |
371 | wire ith_det_req_ff_reg_scanout; | |
372 | wire next_itlb_probe_req_l; | |
373 | wire itlb_probe_l_reg_scanin; | |
374 | wire itlb_probe_l_reg_scanout; | |
375 | wire fill_req_bf_q_reg_scanin; | |
376 | wire fill_req_bf_q_reg_scanout; | |
377 | wire mbist_in_reg_scanin; | |
378 | wire mbist_in_reg_scanout; | |
379 | wire ftp_itb_cam_en_1; | |
380 | wire mbi_run_bf; | |
381 | wire mbi_icd_write_en_bf; | |
382 | wire mbi_ict_write_en_bf; | |
383 | wire [1:0] mbi_cmpsel_bf; | |
384 | wire ftp_mbi_icv_read_en_bf; | |
385 | wire ftp_mbi_icv_write_en_bf; | |
386 | wire ftp_itb_cam_en_2; | |
387 | wire ftp_fetch_v_bf; | |
388 | wire ifu_ic_pmen; | |
389 | wire ftp_bypass_bf; | |
390 | wire itlb_cam_vld_reg_scanin; | |
391 | wire itlb_cam_vld_reg_scanout; | |
392 | wire itlb_bypass_lat_scanin; | |
393 | wire itlb_bypass_lat_scanout; | |
394 | wire [7:0] itlb_bypass; | |
395 | wire [7:0] pre_bypass_bf; | |
396 | wire ic_rd_req_done_in; | |
397 | wire ic_rd_done_f_reg_scanin; | |
398 | wire ic_rd_done_f_reg_scanout; | |
399 | wire ic_rd_req_done_f; | |
400 | wire ic_rd_done_c_reg_scanin; | |
401 | wire ic_rd_done_c_reg_scanout; | |
402 | wire ic_rd_req_done_c; | |
403 | wire ic_rd_done_p_reg_scanin; | |
404 | wire ic_rd_done_p_reg_scanout; | |
405 | wire ic_rd_req_done_p; | |
406 | wire ic_wr_req_done_in; | |
407 | wire ic_wr_done_f_reg_scanin; | |
408 | wire ic_wr_done_f_reg_scanout; | |
409 | wire ic_wr_req_done_f; | |
410 | wire tg_rd_req_done_in; | |
411 | wire tg_rd_done_f_reg_scanin; | |
412 | wire tg_rd_done_f_reg_scanout; | |
413 | wire tg_rd_req_done_f; | |
414 | wire tg_rd_done_c_reg_scanin; | |
415 | wire tg_rd_done_c_reg_scanout; | |
416 | wire tg_rd_req_done_c; | |
417 | wire tg_wr_req_done_in; | |
418 | wire tg_wr_done_f_reg_scanin; | |
419 | wire tg_wr_done_f_reg_scanout; | |
420 | wire tg_wr_req_done_f; | |
421 | wire it_rd_req_done_in; | |
422 | wire it_rd_done_f_reg_scanin; | |
423 | wire it_rd_done_f_reg_scanout; | |
424 | wire it_rd_done_c_reg_scanin; | |
425 | wire it_rd_done_c_reg_scanout; | |
426 | wire it_rd_req_done_c; | |
427 | wire asi_rd_done_in; | |
428 | wire ftp_asi_it_rd_done_p; | |
429 | wire asi_rd_done_reg_scanin; | |
430 | wire asi_rd_done_reg_scanout; | |
431 | wire asi_wr_done_reg_scanin; | |
432 | wire asi_wr_done_reg_scanout; | |
433 | wire asi_it_rd_done_reg_scanin; | |
434 | wire asi_it_rd_done_reg_scanout; | |
435 | wire next_sel_mbist_itb_cycle0; | |
436 | wire next_sel_mbist_itb_cycle1; | |
437 | wire next_sel_mbist_itb_cycle2; | |
438 | wire next_sel_mbist_itb_cycle3; | |
439 | wire next_sel_itlb_tag; | |
440 | wire itlb_sel_tag_f_reg_scanin; | |
441 | wire itlb_sel_tag_f_reg_scanout; | |
442 | wire ftp_sel_itlb_tag_f; | |
443 | wire next_sel_itlb_data; | |
444 | wire itlb_sel_data_f_reg_scanin; | |
445 | wire itlb_sel_data_f_reg_scanout; | |
446 | wire ftp_sel_itlb_data_f; | |
447 | wire next_sel_itlb_pa; | |
448 | wire itlb_sel_pa_f_reg_scanin; | |
449 | wire itlb_sel_pa_f_reg_scanout; | |
450 | wire ftp_sel_itlb_pa_f; | |
451 | wire sel_itlb_tag_cntx0_f; | |
452 | wire sel_itlb_tag_cntx1_f; | |
453 | wire itlb_sel_c_reg_scanin; | |
454 | wire itlb_sel_c_reg_scanout; | |
455 | wire [3:0] trap_thread_g0; | |
456 | wire [3:0] trap_thread_g1; | |
457 | wire thr0_trap_pcaddr_is_valid_bf; | |
458 | wire thr1_trap_pcaddr_is_valid_bf; | |
459 | wire thr2_trap_pcaddr_is_valid_bf; | |
460 | wire thr3_trap_pcaddr_is_valid_bf; | |
461 | wire thr4_trap_pcaddr_is_valid_bf; | |
462 | wire thr5_trap_pcaddr_is_valid_bf; | |
463 | wire thr6_trap_pcaddr_is_valid_bf; | |
464 | wire thr7_trap_pcaddr_is_valid_bf; | |
465 | wire [7:0] load_flush_w; | |
466 | wire thr0_red_no_br_bf; | |
467 | wire thr1_red_no_br_bf; | |
468 | wire thr2_red_no_br_bf; | |
469 | wire thr3_red_no_br_bf; | |
470 | wire thr4_red_no_br_bf; | |
471 | wire thr5_red_no_br_bf; | |
472 | wire thr6_red_no_br_bf; | |
473 | wire thr7_red_no_br_bf; | |
474 | wire thrx_redirect_reg_scanin; | |
475 | wire thrx_redirect_reg_scanout; | |
476 | wire thr7_redirect_part_bf; | |
477 | wire thr6_redirect_part_bf; | |
478 | wire thr5_redirect_part_bf; | |
479 | wire thr4_redirect_part_bf; | |
480 | wire thr3_redirect_part_bf; | |
481 | wire thr2_redirect_part_bf; | |
482 | wire thr1_redirect_part_bf; | |
483 | wire thr0_redirect_part_bf; | |
484 | wire thr0_redirect_bf; | |
485 | wire thr0_br_taken_ff; | |
486 | wire thr1_redirect_bf; | |
487 | wire thr1_br_taken_ff; | |
488 | wire thr2_redirect_bf; | |
489 | wire thr2_br_taken_ff; | |
490 | wire thr3_redirect_bf; | |
491 | wire thr3_br_taken_ff; | |
492 | wire thr4_redirect_bf; | |
493 | wire thr4_br_taken_ff; | |
494 | wire thr5_redirect_bf; | |
495 | wire thr5_br_taken_ff; | |
496 | wire thr6_redirect_bf; | |
497 | wire thr6_br_taken_ff; | |
498 | wire thr7_redirect_bf; | |
499 | wire thr7_br_taken_ff; | |
500 | wire kill_fetch_fv_bf; | |
501 | wire next_fetch_fv_unq_bf; | |
502 | wire fetch_v_f_reg_scanin; | |
503 | wire fetch_v_f_reg_scanout; | |
504 | wire ftp_fetch_v_unq_f; | |
505 | wire fetch_v_f_dup_reg_scanin; | |
506 | wire fetch_v_f_dup_reg_scanout; | |
507 | wire ftp_fetch_v_unq_dup_f; | |
508 | wire br_redirect_disqual; | |
509 | wire br_redirect_dup_disqual; | |
510 | wire next_fetch_v_c_f; | |
511 | wire fetch_v_c_reg_scanin; | |
512 | wire fetch_v_c_reg_scanout; | |
513 | wire ftp_fetch_v_c_unq; | |
514 | wire ftp_fetch_v_c; | |
515 | wire [7:0] next_enabled_thread; | |
516 | wire enabled_thr_reg_scanin; | |
517 | wire enabled_thr_reg_scanout; | |
518 | wire ifu_ftu_pmen; | |
519 | wire [7:0] br_room_reset; | |
520 | wire ftp_thr0_fetch_v_wo_br_bf; | |
521 | wire thr0_by_pass_2_cycles_at_c; | |
522 | wire ftp_thr1_fetch_v_wo_br_bf; | |
523 | wire thr1_by_pass_2_cycles_at_c; | |
524 | wire ftp_thr2_fetch_v_wo_br_bf; | |
525 | wire thr2_by_pass_2_cycles_at_c; | |
526 | wire ftp_thr3_fetch_v_wo_br_bf; | |
527 | wire thr3_by_pass_2_cycles_at_c; | |
528 | wire ftp_thr4_fetch_v_wo_br_bf; | |
529 | wire thr4_by_pass_2_cycles_at_c; | |
530 | wire ftp_thr5_fetch_v_wo_br_bf; | |
531 | wire thr5_by_pass_2_cycles_at_c; | |
532 | wire ftp_thr6_fetch_v_wo_br_bf; | |
533 | wire thr6_by_pass_2_cycles_at_c; | |
534 | wire ftp_thr7_fetch_v_wo_br_bf; | |
535 | wire thr7_by_pass_2_cycles_at_c; | |
536 | wire ftp_thr0_fetch_v_f; | |
537 | wire thr0_by_pass_next_cycle_at_c; | |
538 | wire ftp_thr1_fetch_v_f; | |
539 | wire thr1_by_pass_next_cycle_at_c; | |
540 | wire ftp_thr2_fetch_v_f; | |
541 | wire thr2_by_pass_next_cycle_at_c; | |
542 | wire ftp_thr3_fetch_v_f; | |
543 | wire thr3_by_pass_next_cycle_at_c; | |
544 | wire ftp_thr4_fetch_v_f; | |
545 | wire thr4_by_pass_next_cycle_at_c; | |
546 | wire ftp_thr5_fetch_v_f; | |
547 | wire thr5_by_pass_next_cycle_at_c; | |
548 | wire ftp_thr6_fetch_v_f; | |
549 | wire thr6_by_pass_next_cycle_at_c; | |
550 | wire ftp_thr7_fetch_v_f; | |
551 | wire thr7_by_pass_next_cycle_at_c; | |
552 | wire ftp_thr0_fetch_v_c; | |
553 | wire thr0_by_pass_is_at_c; | |
554 | wire ftp_thr1_fetch_v_c; | |
555 | wire thr1_by_pass_is_at_c; | |
556 | wire ftp_thr2_fetch_v_c; | |
557 | wire thr2_by_pass_is_at_c; | |
558 | wire ftp_thr3_fetch_v_c; | |
559 | wire thr3_by_pass_is_at_c; | |
560 | wire ftp_thr4_fetch_v_c; | |
561 | wire thr4_by_pass_is_at_c; | |
562 | wire ftp_thr5_fetch_v_c; | |
563 | wire thr5_by_pass_is_at_c; | |
564 | wire ftp_thr6_fetch_v_c; | |
565 | wire thr6_by_pass_is_at_c; | |
566 | wire ftp_thr7_fetch_v_c; | |
567 | wire thr7_by_pass_is_at_c; | |
568 | wire thr0_is_empty_c; | |
569 | wire thr1_is_empty_c; | |
570 | wire thr2_is_empty_c; | |
571 | wire thr3_is_empty_c; | |
572 | wire thr4_is_empty_c; | |
573 | wire thr5_is_empty_c; | |
574 | wire thr6_is_empty_c; | |
575 | wire thr7_is_empty_c; | |
576 | wire thr0_room_4ormore; | |
577 | wire thr1_room_4ormore; | |
578 | wire thr2_room_4ormore; | |
579 | wire thr3_room_4ormore; | |
580 | wire thr4_room_4ormore; | |
581 | wire thr5_room_4ormore; | |
582 | wire thr6_room_4ormore; | |
583 | wire thr7_room_4ormore; | |
584 | wire [7:0] ready_hp_in; | |
585 | wire tsm_thr0_ready_hp_bf; | |
586 | wire tsm_thr1_ready_hp_bf; | |
587 | wire tsm_thr2_ready_hp_bf; | |
588 | wire tsm_thr3_ready_hp_bf; | |
589 | wire tsm_thr4_ready_hp_bf; | |
590 | wire tsm_thr5_ready_hp_bf; | |
591 | wire tsm_thr6_ready_hp_bf; | |
592 | wire tsm_thr7_ready_hp_bf; | |
593 | wire [7:0] ftp_unused; | |
594 | wire ready_fp_reg_scanin; | |
595 | wire ready_fp_reg_scanout; | |
596 | wire [7:0] next_by_pass_sel_bbf; | |
597 | wire cmu_fill_byp_thread_reg_scanin; | |
598 | wire cmu_fill_byp_thread_reg_scanout; | |
599 | wire [7:0] by_pass_sel_bf; | |
600 | wire by_pass_sel_f_reg_scanin; | |
601 | wire by_pass_sel_f_reg_scanout; | |
602 | wire [7:0] by_pass_sel_f; | |
603 | wire by_pass_sel_c_reg_scanin; | |
604 | wire by_pass_sel_c_reg_scanout; | |
605 | wire [7:0] by_pass_sel_c; | |
606 | wire thr0_kill_by_pass_bbf; | |
607 | wire thr1_kill_by_pass_bbf; | |
608 | wire thr2_kill_by_pass_bbf; | |
609 | wire thr3_kill_by_pass_bbf; | |
610 | wire thr4_kill_by_pass_bbf; | |
611 | wire thr5_kill_by_pass_bbf; | |
612 | wire thr6_kill_by_pass_bbf; | |
613 | wire thr7_kill_by_pass_bbf; | |
614 | wire byp_valid_in; | |
615 | wire byp_valid_reg_scanin; | |
616 | wire byp_valid_reg_scanout; | |
617 | wire ftp_byp_valid; | |
618 | wire thrx_kill_by_pass_reg_scanin; | |
619 | wire thrx_kill_by_pass_reg_scanout; | |
620 | wire thr7_kill_by_pass_bf; | |
621 | wire thr6_kill_by_pass_bf; | |
622 | wire thr5_kill_by_pass_bf; | |
623 | wire thr4_kill_by_pass_bf; | |
624 | wire thr3_kill_by_pass_bf; | |
625 | wire thr2_kill_by_pass_bf; | |
626 | wire thr1_kill_by_pass_bf; | |
627 | wire thr0_kill_by_pass_bf; | |
628 | wire kill2_by_pass_bf; | |
629 | wire bypass_thread_killed; | |
630 | wire by_pass_valid_bf; | |
631 | wire prev_by_pass_at_cycle_1; | |
632 | wire cycle_2_by_pass_ok_f; | |
633 | wire cycle_3_by_pass_ok_c; | |
634 | wire prev_by_pass_at_cycle_2; | |
635 | wire cycle_3_by_pass_ok_f; | |
636 | wire cycle_2_by_pass_ok_bf; | |
637 | wire cycle_3_by_pass_ok_bf; | |
638 | wire cycle_2_by_pass_f_reg_scanin; | |
639 | wire cycle_2_by_pass_f_reg_scanout; | |
640 | wire cycle_3_by_pass_f_reg_scanin; | |
641 | wire cycle_3_by_pass_f_reg_scanout; | |
642 | wire cycle_3_by_pass_c_reg_scanin; | |
643 | wire cycle_3_by_pass_c_reg_scanout; | |
644 | wire by_pass_v_f_reg_scanin; | |
645 | wire by_pass_v_f_reg_scanout; | |
646 | wire by_pass_valid_unq_f; | |
647 | wire by_pass_valid_f; | |
648 | wire bypass_thread_redirected_p_f; | |
649 | wire bypass_thread_redirected_f; | |
650 | wire next_by_pass_c_valid; | |
651 | wire by_pass_v_c_reg_scanin; | |
652 | wire by_pass_v_c_reg_scanout; | |
653 | wire by_pass_valid_c; | |
654 | wire sel_by_pass_cycle_2_int_f; | |
655 | wire sel_by_pass_cycle_3_int_c; | |
656 | wire thr0_by_pass_valid_bf; | |
657 | wire thr1_by_pass_valid_bf; | |
658 | wire thr2_by_pass_valid_bf; | |
659 | wire thr3_by_pass_valid_bf; | |
660 | wire thr4_by_pass_valid_bf; | |
661 | wire thr5_by_pass_valid_bf; | |
662 | wire thr6_by_pass_valid_bf; | |
663 | wire thr7_by_pass_valid_bf; | |
664 | wire thr0_by_pass_valid_f; | |
665 | wire thr1_by_pass_valid_f; | |
666 | wire thr2_by_pass_valid_f; | |
667 | wire thr3_by_pass_valid_f; | |
668 | wire thr4_by_pass_valid_f; | |
669 | wire thr5_by_pass_valid_f; | |
670 | wire thr6_by_pass_valid_f; | |
671 | wire thr7_by_pass_valid_f; | |
672 | wire thr0_by_pass_valid_c; | |
673 | wire thr1_by_pass_valid_c; | |
674 | wire thr2_by_pass_valid_c; | |
675 | wire thr3_by_pass_valid_c; | |
676 | wire thr4_by_pass_valid_c; | |
677 | wire thr5_by_pass_valid_c; | |
678 | wire thr6_by_pass_valid_c; | |
679 | wire thr7_by_pass_valid_c; | |
680 | wire thr0_by_pass_cycle_2_bf; | |
681 | wire thr0_by_pass_cycle_3_f; | |
682 | wire thr1_by_pass_cycle_2_bf; | |
683 | wire thr1_by_pass_cycle_3_f; | |
684 | wire thr2_by_pass_cycle_2_bf; | |
685 | wire thr2_by_pass_cycle_3_f; | |
686 | wire thr3_by_pass_cycle_2_bf; | |
687 | wire thr3_by_pass_cycle_3_f; | |
688 | wire thr4_by_pass_cycle_2_bf; | |
689 | wire thr4_by_pass_cycle_3_f; | |
690 | wire thr5_by_pass_cycle_2_bf; | |
691 | wire thr5_by_pass_cycle_3_f; | |
692 | wire thr6_by_pass_cycle_2_bf; | |
693 | wire thr6_by_pass_cycle_3_f; | |
694 | wire thr7_by_pass_cycle_2_bf; | |
695 | wire thr7_by_pass_cycle_3_f; | |
696 | wire fetch_same_thr_again_bf; | |
697 | wire ftp_curr_pstate_am_bf_; | |
698 | wire select_itc_va; | |
699 | wire sel_am_5; | |
700 | wire [7:0] next_pstate_am_; | |
701 | wire pstate_am_reg_scanin; | |
702 | wire pstate_am_reg_scanout; | |
703 | wire [7:0] ftp_pstate_am_bf_; | |
704 | wire reload_in; | |
705 | wire reload_latch_scanin; | |
706 | wire reload_latch_scanout; | |
707 | wire next_ftp_ith_det_req_bf; | |
708 | wire next_select_itc_va; | |
709 | wire next_sel_am_5; | |
710 | wire pre_sel_am_reg_scanin; | |
711 | wire pre_sel_am_reg_scanout; | |
712 | wire [2:0] next_thr0_pid_data; | |
713 | wire [2:0] thr0_pid_data; | |
714 | wire [2:0] next_thr1_pid_data; | |
715 | wire [2:0] thr1_pid_data; | |
716 | wire [2:0] next_thr2_pid_data; | |
717 | wire [2:0] thr2_pid_data; | |
718 | wire [2:0] next_thr3_pid_data; | |
719 | wire [2:0] thr3_pid_data; | |
720 | wire [2:0] next_thr4_pid_data; | |
721 | wire [2:0] thr4_pid_data; | |
722 | wire [2:0] next_thr5_pid_data; | |
723 | wire [2:0] thr5_pid_data; | |
724 | wire [2:0] next_thr6_pid_data; | |
725 | wire [2:0] thr6_pid_data; | |
726 | wire [2:0] next_thr7_pid_data; | |
727 | wire [2:0] thr7_pid_data; | |
728 | wire thr0_pid_reg_scanin; | |
729 | wire thr0_pid_reg_scanout; | |
730 | wire thr1_pid_reg_scanin; | |
731 | wire thr1_pid_reg_scanout; | |
732 | wire thr2_pid_reg_scanin; | |
733 | wire thr2_pid_reg_scanout; | |
734 | wire thr3_pid_reg_scanin; | |
735 | wire thr3_pid_reg_scanout; | |
736 | wire thr4_pid_reg_scanin; | |
737 | wire thr4_pid_reg_scanout; | |
738 | wire thr5_pid_reg_scanin; | |
739 | wire thr5_pid_reg_scanout; | |
740 | wire thr6_pid_reg_scanin; | |
741 | wire thr6_pid_reg_scanout; | |
742 | wire thr7_pid_reg_scanin; | |
743 | wire thr7_pid_reg_scanout; | |
744 | wire invalidation_req_f; | |
745 | wire spares_scanin; | |
746 | wire spares_scanout; | |
747 | wire [4:2] curr_thr_pc_bf; | |
748 | wire [2:0] ic_pwr_sel_index; | |
749 | wire [4:2] thr0_pc_muxed_f; | |
750 | wire [4:2] thr1_pc_muxed_f; | |
751 | wire [4:2] thr2_pc_muxed_f; | |
752 | wire [4:2] thr3_pc_muxed_f; | |
753 | wire [4:2] thr4_pc_muxed_f; | |
754 | wire [4:2] thr5_pc_muxed_f; | |
755 | wire [4:2] thr6_pc_muxed_f; | |
756 | wire [4:2] thr7_pc_muxed_f; | |
757 | wire [4:2] new_thr_pc_bf; | |
758 | wire [4:2] ic_index_bf; | |
759 | wire se; | |
760 | ||
761 | input tcu_scan_en ; | |
762 | input l2clk; | |
763 | input scan_in; | |
764 | input tcu_pce_ov; // scan signals | |
765 | input spc_aclk; | |
766 | input spc_bclk; | |
767 | ||
768 | input [7:0] spc_core_running_status; | |
769 | input [7:0] tlu_pstate_am; | |
770 | input [7:0] tlu_flush_ifu; | |
771 | input [7:0] tlu_itlb_bypass; | |
772 | ||
773 | input [1:0] tlu_trap_0_tid; | |
774 | input [1:0] tlu_trap_1_tid; | |
775 | input tlu_trap_pc_0_valid; | |
776 | input tlu_trap_pc_1_valid; | |
777 | ||
778 | input [1:0] dec_br_taken_e; | |
779 | input [1:0] dec_valid_e; | |
780 | // input [1:0] dec_br_reg_taken_e; | |
781 | // input [1:0] dec_br_noreg_taken_e; | |
782 | input [1:0] dec_tid0_d; | |
783 | input [1:0] dec_tid1_d; | |
784 | ||
785 | input itc_demap_next; | |
786 | input mbi_run; | |
787 | input mbi_itb_cam_en_pre ; | |
788 | input [1:0] mbi_cmpsel; | |
789 | input mbi_ict_read_en; | |
790 | input mbi_ict_write_en; | |
791 | input mbi_icd_read_en; | |
792 | input mbi_icd_write_en; | |
793 | input mbi_icv_read_en; | |
794 | input mbi_icv_write_en; | |
795 | ||
796 | ||
797 | input cmu_thr0_data_ready ; | |
798 | input cmu_thr1_data_ready ; | |
799 | input cmu_thr2_data_ready ; | |
800 | input cmu_thr3_data_ready ; | |
801 | input cmu_thr4_data_ready ; | |
802 | input cmu_thr5_data_ready ; | |
803 | input cmu_thr6_data_ready ; | |
804 | input cmu_thr7_data_ready ; | |
805 | ||
806 | ||
807 | input tsm_thr0_ignore_by_pass ; | |
808 | input tsm_thr1_ignore_by_pass ; | |
809 | input tsm_thr2_ignore_by_pass ; | |
810 | input tsm_thr3_ignore_by_pass ; | |
811 | input tsm_thr4_ignore_by_pass ; | |
812 | input tsm_thr5_ignore_by_pass ; | |
813 | input tsm_thr6_ignore_by_pass ; | |
814 | input tsm_thr7_ignore_by_pass ; | |
815 | ||
816 | ||
817 | // input agc_ld_flush_hi_pr_bf ; | |
818 | // input [2:0] agc_ld_flush_tid_bf ; | |
819 | input [1:0] dec_load_flush_w; | |
820 | ||
821 | ||
822 | ||
823 | input tsm_thr0_ready_hp_bf_in; | |
824 | input tsm_thr1_ready_hp_bf_in; | |
825 | input tsm_thr2_ready_hp_bf_in; | |
826 | input tsm_thr3_ready_hp_bf_in; | |
827 | input tsm_thr4_ready_hp_bf_in; | |
828 | input tsm_thr5_ready_hp_bf_in; | |
829 | input tsm_thr6_ready_hp_bf_in; | |
830 | input tsm_thr7_ready_hp_bf_in; | |
831 | ||
832 | ||
833 | ||
834 | ||
835 | ||
836 | input tsm_thr0_fill_rdy0; | |
837 | input tsm_thr1_fill_rdy0; | |
838 | input tsm_thr2_fill_rdy0; | |
839 | input tsm_thr3_fill_rdy0; | |
840 | input tsm_thr4_fill_rdy0; | |
841 | input tsm_thr5_fill_rdy0; | |
842 | input tsm_thr6_fill_rdy0; | |
843 | input tsm_thr7_fill_rdy0; | |
844 | ||
845 | ||
846 | input cmu_icache_invalidate ; | |
847 | input cmu_any_un_cacheable ; | |
848 | ||
849 | input cmu_any_data_ready ; | |
850 | ||
851 | input [7:0] ibu_empty; | |
852 | input [7:0] ibu_room_4ormore; | |
853 | ||
854 | ||
855 | input [7:0] agc_by_pass_update_lru_bf; | |
856 | input [7:0] agc_invalidation_req_ff; | |
857 | // input [2:0] itd_tid; | |
858 | ||
859 | input agc_kill_fetch_cv_c; | |
860 | ||
861 | input agc_thr0_micro_flush_unq_c ; | |
862 | input agc_thr1_micro_flush_unq_c ; | |
863 | input agc_thr2_micro_flush_unq_c ; | |
864 | input agc_thr3_micro_flush_unq_c ; | |
865 | input agc_thr4_micro_flush_unq_c ; | |
866 | input agc_thr5_micro_flush_unq_c ; | |
867 | input agc_thr6_micro_flush_unq_c ; | |
868 | input agc_thr7_micro_flush_unq_c ; | |
869 | ||
870 | input agc_thr0_sf_valid_f; | |
871 | input agc_thr1_sf_valid_f; | |
872 | input agc_thr2_sf_valid_f; | |
873 | input agc_thr3_sf_valid_f; | |
874 | input agc_thr4_sf_valid_f; | |
875 | input agc_thr5_sf_valid_f; | |
876 | input agc_thr6_sf_valid_f; | |
877 | input agc_thr7_sf_valid_f; | |
878 | ||
879 | input asi_sel_cntx_0; | |
880 | input asi_ic_wr_req; | |
881 | input asi_ic_rd_req; | |
882 | input asi_tg_wr_req; | |
883 | input asi_tg_rd_req; | |
884 | input asi_itd_rd_req; | |
885 | input asi_itt_rd_req; | |
886 | input asi_ith_det_req; | |
887 | ||
888 | input [2:0] asi_tid ; | |
889 | ||
890 | input [4:2] agd_address0_m ; | |
891 | input [4:2] agd_address1_m ; | |
892 | input [4:2] agd_thr0_pc_4_2_f ; | |
893 | input [4:2] agd_thr1_pc_4_2_f ; | |
894 | input [4:2] agd_thr2_pc_4_2_f ; | |
895 | input [4:2] agd_thr3_pc_4_2_f ; | |
896 | input [4:2] agd_thr4_pc_4_2_f ; | |
897 | input [4:2] agd_thr5_pc_4_2_f ; | |
898 | input [4:2] agd_thr6_pc_4_2_f ; | |
899 | input [4:2] agd_thr7_pc_4_2_f ; | |
900 | input [4:2] ifu_agd_pc_f ; | |
901 | input [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 ; | |
907 | input lsu_ifu_ftu_pmen; // enable power management. | |
908 | input lsu_ic_pmen; // enable power management for the ICD and ICT. | |
909 | input lsu_ifu_wr_pid ; | |
910 | input [2:0] lsu_ifu_tid_w ; | |
911 | input [2:0] lsu_ifu_pid_data ; | |
912 | ||
913 | ||
914 | // output ftp_sel_flush_ld_flush; | |
915 | output ftp_asi_rd_done; | |
916 | output ftp_asi_wr_done; | |
917 | ||
918 | output ftp_reset_fill_wait; | |
919 | output ftp_ic_rd_req_bf; | |
920 | output ftp_ic_wr_ps_en_bf; | |
921 | output ftp_ic_wr_req_bf; | |
922 | output ftp_tg_rd_req_bf; | |
923 | output ftp_tg_wr_req_bf; | |
924 | output ftp_iv_rd_req_bf; | |
925 | output ftp_itt_rd_req_bf; | |
926 | output ftp_itd_rd_req_bf; | |
927 | output ftp_itlb_cam_vld_bf ; | |
928 | output ftp_itlb_cam_vld_f ; | |
929 | output ftp_ith_det_req_bf ; | |
930 | ||
931 | output ftp_itlb_probe_req_l ; | |
932 | ||
933 | output ftp_sel_icv_mbist_addr ; | |
934 | ||
935 | output ftp_sel_mbist_itb_cycle0 ; | |
936 | output ftp_sel_mbist_itb_cycle1 ; | |
937 | output ftp_sel_mbist_itb_cycle2 ; | |
938 | output ftp_sel_mbist_itb_cycle3 ; | |
939 | ||
940 | output ftp_sel_itlb_tag_cntx0_c; | |
941 | output ftp_sel_itlb_tag_cntx1_c; | |
942 | output ftp_sel_itlb_data_c; | |
943 | output ftp_sel_itlb_pa_c; | |
944 | output ftp_asi_mbist_access_bf; | |
945 | ||
946 | output ftp_asi_it_rd_done; | |
947 | output ftp_asi_ic_rd_done; | |
948 | output ftp_asi_ic_wr_done; | |
949 | output ftp_asi_tg_rd_done; | |
950 | output ftp_asi_tg_wr_done; | |
951 | output ftp_asi_tg_wr_req_hold; | |
952 | ||
953 | output ftp_thr0_room_is_less_t_3; | |
954 | output ftp_thr1_room_is_less_t_3; | |
955 | output ftp_thr2_room_is_less_t_3; | |
956 | output ftp_thr3_room_is_less_t_3; | |
957 | output ftp_thr4_room_is_less_t_3; | |
958 | output ftp_thr5_room_is_less_t_3; | |
959 | output ftp_thr6_room_is_less_t_3; | |
960 | output ftp_thr7_room_is_less_t_3; | |
961 | ||
962 | output ftp_thr0_go_to_sf_wait; | |
963 | output ftp_thr1_go_to_sf_wait; | |
964 | output ftp_thr2_go_to_sf_wait; | |
965 | output ftp_thr3_go_to_sf_wait; | |
966 | output ftp_thr4_go_to_sf_wait; | |
967 | output ftp_thr5_go_to_sf_wait; | |
968 | output ftp_thr6_go_to_sf_wait; | |
969 | output ftp_thr7_go_to_sf_wait; | |
970 | ||
971 | output [2:0] ftp_thr0_trprdpc_sel_bf; | |
972 | output [2:0] ftp_thr1_trprdpc_sel_bf; | |
973 | output [2:0] ftp_thr2_trprdpc_sel_bf; | |
974 | output [2:0] ftp_thr3_trprdpc_sel_bf; | |
975 | output [2:0] ftp_thr4_trprdpc_sel_bf; | |
976 | output [2:0] ftp_thr5_trprdpc_sel_bf; | |
977 | output [2:0] ftp_thr6_trprdpc_sel_bf; | |
978 | output [2:0] ftp_thr7_trprdpc_sel_bf; | |
979 | ||
980 | output ftp_thr0_sel_br_bf; | |
981 | output ftp_thr1_sel_br_bf; | |
982 | output ftp_thr2_sel_br_bf; | |
983 | output ftp_thr3_sel_br_bf; | |
984 | output ftp_thr4_sel_br_bf; | |
985 | output ftp_thr5_sel_br_bf; | |
986 | output ftp_thr6_sel_br_bf; | |
987 | output ftp_thr7_sel_br_bf; | |
988 | ||
989 | output ftp_icd_quad_0_en_bf; | |
990 | output ftp_icd_quad_1_en_bf; | |
991 | output ftp_icd_quad_2_en_bf; | |
992 | output ftp_icd_quad_3_en_bf; | |
993 | ||
994 | output 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 | ||
1001 | output [5:0] ftp_pc_sel_am; | |
1002 | output [2:0] ftp_pc_sel_tag_part1; | |
1003 | output [3:0] ftp_pc_sel_tag_part2; | |
1004 | output [1:0] ftp_pc_sel_tag_pc_bot; | |
1005 | output [1:0] ftp_pc_sel_tag_pc_top; | |
1006 | ||
1007 | ||
1008 | output [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 | ||
1015 | output [7:0] ftp_itb_fetch_thr_bf; | |
1016 | // output [7:0] ftp_ctx_fetch_thr_bf; | |
1017 | output [7:0] ftp_new_thr_sel_bf; | |
1018 | output [7:0] ftu_curr_fetch_thr_f; | |
1019 | output [7:0] ftp_curr_fetch_thr_f; | |
1020 | output [7:0] ftp_fetch_thr_q_f; | |
1021 | output [1:0] ftp_tid0_e; | |
1022 | output [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 | ||
1034 | output ftp_fetch_v_f; | |
1035 | ||
1036 | // output ftp_fill_req_bf; | |
1037 | output ftp_fill_req_q_bf; | |
1038 | output ftp_mbi_icd_read_en_bf; | |
1039 | output ftp_mbi_ict_read_en_bf; | |
1040 | output [2:0] ftp_ict_data_sel_bf; | |
1041 | output ftp_any_thr_clken; | |
1042 | output scan_out; | |
1043 | ||
1044 | output [2:0] ftp_curr_pid_bf; | |
1045 | output [2:0] ftp_thr7_pid_data; | |
1046 | output [2:0] ftp_thr6_pid_data; | |
1047 | output [2:0] ftp_thr5_pid_data; | |
1048 | output [2:0] ftp_thr4_pid_data; | |
1049 | output [2:0] ftp_thr3_pid_data; | |
1050 | output [2:0] ftp_thr2_pid_data; | |
1051 | output [2:0] ftp_thr1_pid_data; | |
1052 | output [2:0] ftp_thr0_pid_data; | |
1053 | ||
1054 | ||
1055 | ||
1056 | // scan renames | |
1057 | assign pce_ov = tcu_pce_ov; | |
1058 | assign stop = 1'b0; | |
1059 | assign siclk = spc_aclk; | |
1060 | assign 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 | ||
1069 | ifu_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 | ||
1077 | ifu_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 | ||
1091 | ifu_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 | ||
1101 | assign br_taken_ff[0] = dec_br_taken_m[0] & dec_valid_m[0] ; | |
1102 | assign br_taken_ff[1] = dec_br_taken_m[1] & dec_valid_m[1] ; | |
1103 | ||
1104 | ifu_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 | ||
1114 | ifu_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 | ||
1124 | assign next_tid_dec_b[0] = ~tid0_b[1] & ~tid0_b[0] ; | |
1125 | assign next_tid_dec_b[1] = ~tid0_b[1] & tid0_b[0] ; | |
1126 | assign next_tid_dec_b[2] = tid0_b[1] & ~tid0_b[0] ; | |
1127 | assign next_tid_dec_b[3] = tid0_b[1] & tid0_b[0] ; | |
1128 | assign next_tid_dec_b[4] = ~tid1_b[1] & ~tid1_b[0] ; | |
1129 | assign next_tid_dec_b[5] = ~tid1_b[1] & tid1_b[0] ; | |
1130 | assign next_tid_dec_b[6] = tid1_b[1] & ~tid1_b[0] ; | |
1131 | assign next_tid_dec_b[7] = tid1_b[1] & tid1_b[0] ; | |
1132 | ||
1133 | ifu_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 | ||
1145 | assign ftp_any_thread_ready = |ready_hp_bf[7:0] ; | |
1146 | assign fpick[7:0] = hp_pick[7:0] | agc_by_pass_update_lru_bf[7:0] ; | |
1147 | assign ftp_curr_fetch_thr_bf[7:0] = hp_pick[7:0] ; | |
1148 | assign ftp_new_thr_sel_bf[7:1] = hp_pick[7:1] ; | |
1149 | assign ftp_new_thr_sel_bf[0] = hp_pick[0] | ~ftp_any_thread_ready ; | |
1150 | ||
1151 | assign 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); | |
1152 | assign 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); | |
1153 | assign 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); | |
1154 | assign 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); | |
1155 | assign 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); | |
1156 | assign 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); | |
1157 | assign 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); | |
1158 | assign 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 | ||
1180 | assign top_hp_ready[3:0] = ready_hp_bf[7:4] & enabled_threads[7:4]; | |
1181 | assign bot_hp_ready[3:0] = ready_hp_bf[3:0] & enabled_threads[3:0]; | |
1182 | ||
1183 | assign top_hp_pickready = (|top_hp_ready[3:0]) ; | |
1184 | assign bot_hp_pickready = (|bot_hp_ready[3:0]) ; | |
1185 | assign hp_pickready = top_hp_pickready | bot_hp_pickready ; | |
1186 | ||
1187 | assign 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 | ||
1196 | assign 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 | ||
1205 | assign 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 | ||
1214 | assign 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 | ||
1223 | assign 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 | ||
1237 | assign 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 | ||
1246 | assign 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 | ||
1255 | assign 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]); | |
1263 | assign 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 | ||
1267 | assign 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 | ||
1273 | assign top_fpick[3:0] = fpick[7:4] ; | |
1274 | assign bot_fpick[3:0] = fpick[3:0] ; | |
1275 | ||
1276 | // lru is msb pair of the lru vector | |
1277 | assign 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 | ||
1283 | assign 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 | ||
1289 | assign 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 | ||
1301 | assign 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 | ||
1313 | assign 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 | ||
1321 | assign 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 | ||
1329 | assign ntop_lru[1] = (!top_fpick[1]&!top_fpick[0]&top_lru[1]) | | |
1330 | (top_fpick[3]) | | |
1331 | (top_fpick[2]); | |
1332 | ||
1333 | assign ntop_lru[0] = (!top_fpick[2]&!top_fpick[0]&top_lru[0]) | | |
1334 | (top_fpick[3]) | | |
1335 | (top_fpick[1]); | |
1336 | assign 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 | ||
1339 | ifu_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 | ||
1349 | assign 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 | ||
1352 | assign 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 | ||
1358 | assign 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 | ||
1364 | assign 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 | ||
1376 | assign 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 | ||
1388 | assign 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 | ||
1396 | assign 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 | ||
1404 | assign nbot_lru[1] = (!bot_fpick[1]&!bot_fpick[0]&bot_lru[1]) | (bot_fpick[3]) | (bot_fpick[2]); | |
1405 | ||
1406 | assign nbot_lru[0] = (!bot_fpick[2]&!bot_fpick[0]&bot_lru[0]) | (bot_fpick[3]) | (bot_fpick[1]); | |
1407 | ||
1408 | assign 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]}; | |
1410 | ifu_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 | ||
1420 | assign 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 | //////////////////////////////////////////////////////////// | |
1425 | assign set_favor_top = |bot_fpick[3:0] | favor_top ; | |
1426 | assign reset_favor_top = |top_fpick[3:0] ; | |
1427 | assign next_favor_top = set_favor_top & ~reset_favor_top ; | |
1428 | ||
1429 | ifu_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 | ||
1441 | assign next_curr_fetch_f_bf[7:0] = hp_pick[7:0] ; | |
1442 | ||
1443 | ||
1444 | ifu_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 | ||
1454 | assign ftu_curr_fetch_thr_f[7:0] = ftp_curr_fetch_thr_f[7:0] ; | |
1455 | ||
1456 | ||
1457 | ifu_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 | ||
1468 | assign ftp_fetch_thr_q_f[0] = ftp_curr_fetch_thr_f[0] & ftp_fetch_v_dup_f; | |
1469 | assign ftp_fetch_thr_q_f[1] = ftp_curr_fetch_thr_f[1] & ftp_fetch_v_dup_f; | |
1470 | assign ftp_fetch_thr_q_f[2] = ftp_curr_fetch_thr_f[2] & ftp_fetch_v_dup_f; | |
1471 | assign ftp_fetch_thr_q_f[3] = ftp_curr_fetch_thr_f[3] & ftp_fetch_v_dup_f; | |
1472 | assign ftp_fetch_thr_q_f[4] = ftp_curr_fetch_thr_f[4] & ftp_fetch_v_dup_f; | |
1473 | assign ftp_fetch_thr_q_f[5] = ftp_curr_fetch_thr_f[5] & ftp_fetch_v_dup_f; | |
1474 | assign ftp_fetch_thr_q_f[6] = ftp_curr_fetch_thr_f[6] & ftp_fetch_v_dup_f; | |
1475 | assign ftp_fetch_thr_q_f[7] = ftp_curr_fetch_thr_f[7] & ftp_fetch_v_dup_f; | |
1476 | ||
1477 | //////////////////////////////////////////////////////////////////////// | |
1478 | //////////////////////////////////////////////////////////////////////// | |
1479 | ||
1480 | assign next_ftp_fill_req_q = (cmu_any_data_ready & ~cmu_any_un_cacheable ) ; | |
1481 | ||
1482 | //////////////////////////////////////////////////////////////////////// | |
1483 | //////////////////////////////////////////////////////////////////////// | |
1484 | //////////////////////////////////////////////////////////////////////// | |
1485 | ifu_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 | //////////////////////////////////////////////////////////////////////// | |
1499 | assign next_fill_req = cmu_any_data_ready ; | |
1500 | ifu_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 | //////////////////////////////////////////////////////////////////////// | |
1512 | assign 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 | ||
1515 | assign 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 | ||
1519 | ifu_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 | ||
1530 | assign asi_wr_request = asi_ic_wr_req | asi_tg_wr_req ; | |
1531 | assign next_wr_request_pending = asi_wr_request | (wr_request_pending & ~asi_wr_done_in); | |
1532 | assign next_rd_request_pending = asi_rd_request | (rd_request_pending & ~ftp_asi_rd_done); | |
1533 | ||
1534 | ifu_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 | ||
1544 | assign asi_rd_ok = !wr_request_pending | asi_rd_is_first; | |
1545 | assign asi_wr_ok = wr_request_pending & !asi_rd_is_first; | |
1546 | ||
1547 | ||
1548 | assign next_ic_wr_req = asi_ic_wr_req | (ic_wr_req_ff & (ftp_fill_req_q_bf | !asi_wr_ok) ) ; | |
1549 | ifu_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 | ||
1560 | assign next_ic_rd_req = asi_ic_rd_req | (ic_rd_req_ff & (ftp_fill_req_q_bf | !asi_rd_ok)) ; | |
1561 | ifu_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 | ||
1572 | assign next_tg_wr_req = asi_tg_wr_req | (tg_wr_req_ff & (ftp_fill_req_q_bf | inv_line_bf | !asi_wr_ok)) ; | |
1573 | ifu_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 | ||
1584 | assign next_tg_rd_req = asi_tg_rd_req | (tg_rd_req_ff & (ftp_fill_req_q_bf | !asi_rd_ok)) ; | |
1585 | ifu_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 | ||
1596 | assign next_itt_rd_req = asi_itt_rd_req | (itt_rd_req_ff & (reload | reload_last | !asi_rd_ok)) ; | |
1597 | ifu_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 | ||
1608 | assign next_itd_rd_req = asi_itd_rd_req | (itd_rd_req_ff & (reload | reload_last | !asi_rd_ok)) ; | |
1609 | ifu_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 | ||
1619 | assign next_ith_det_req = asi_ith_det_req | (ith_det_req_ff & (reload | reload_last | !asi_rd_ok)) ; | |
1620 | ifu_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 | ||
1631 | assign next_itlb_probe_req_l = ~(asi_ith_det_req | (ith_det_req_ff & (reload | reload_last | !asi_rd_ok))) ; | |
1632 | ifu_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 | ||
1643 | ifu_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 | ||
1653 | ifu_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 | ||
1668 | assign ftp_sel_icv_mbist_addr = ftp_mbi_icv_read_en_bf | ftp_mbi_icv_write_en_bf ; | |
1669 | assign ftp_ict_data_sel_bf[0] = ftp_fill_req_q_bf & ~mbi_run_bf; | |
1670 | assign ftp_ict_data_sel_bf[1] = ~ftp_fill_req_q_bf & ~mbi_run_bf; | |
1671 | assign ftp_ict_data_sel_bf[2] = mbi_run_bf ; | |
1672 | ||
1673 | assign 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)) ; | |
1674 | assign 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)) ; | |
1675 | assign 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 | ||
1677 | assign 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)) ; | |
1678 | assign 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)) ; | |
1679 | assign 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 | ||
1681 | assign 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 | ||
1683 | assign ftp_itt_rd_req_bf = itt_rd_req_ff & ~(reload | reload_last) & asi_rd_ok; | |
1684 | assign ftp_itd_rd_req_bf = itd_rd_req_ff & ~(reload | reload_last) & asi_rd_ok; | |
1685 | assign 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 ; | |
1687 | assign 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 | ||
1691 | ifu_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 | ||
1704 | ifu_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 | ||
1715 | assign pre_bypass_bf[7:0] = ftp_ith_det_req_bf ? 8'h00 : | |
1716 | itlb_bypass[7:0]; | |
1717 | ||
1718 | ||
1719 | assign ftp_bypass_bf = (| (ftp_itb_fetch_thr_bf[7:0] & pre_bypass_bf[7:0])); | |
1720 | ///////////////////////////////////////////////////////////////////// | |
1721 | ||
1722 | ||
1723 | assign ic_rd_req_done_in = (ic_rd_req_ff & ~ftp_fill_req_q_bf & asi_rd_ok); | |
1724 | ifu_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 | ||
1734 | ifu_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 | ||
1744 | ifu_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 | ||
1754 | assign ic_wr_req_done_in = (ic_wr_req_ff & ~ftp_fill_req_q_bf & asi_wr_ok); | |
1755 | ifu_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 | ||
1765 | assign ftp_asi_ic_rd_done = ic_rd_req_done_p ; | |
1766 | assign ftp_asi_ic_wr_done = ic_wr_req_done_f ; | |
1767 | ||
1768 | assign tg_rd_req_done_in = (tg_rd_req_ff & ~ftp_fill_req_q_bf & asi_rd_ok); | |
1769 | ifu_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 | ||
1779 | ifu_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 | ||
1790 | assign tg_wr_req_done_in = (tg_wr_req_ff & ~(ftp_fill_req_q_bf | inv_line_bf) & asi_wr_ok); | |
1791 | ifu_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 | ||
1801 | assign ftp_asi_tg_rd_done = tg_rd_req_done_c ; | |
1802 | assign ftp_asi_tg_wr_done = tg_wr_req_done_f ; | |
1803 | assign ftp_asi_tg_wr_req_hold = tg_wr_req_ff ; | |
1804 | ||
1805 | assign it_rd_req_done_in = ((itt_rd_req_ff | itd_rd_req_ff | ith_det_req_ff) & ~(reload | reload_last) & asi_rd_ok); | |
1806 | ifu_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 | ||
1816 | ifu_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 | ||
1826 | assign asi_rd_done_in = ftp_asi_ic_rd_done | ftp_asi_tg_rd_done | ftp_asi_it_rd_done_p ; | |
1827 | assign asi_wr_done_in = ftp_asi_ic_wr_done | ftp_asi_tg_wr_done; | |
1828 | ||
1829 | ||
1830 | ifu_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 | ||
1839 | ifu_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 | ||
1848 | ifu_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 | //////////////////////////////////////////////////////////////////////////////////// | |
1860 | assign next_sel_mbist_itb_cycle0 = mbi_run_bf & ~mbi_cmpsel_bf[1] & ~mbi_cmpsel_bf[0]; | |
1861 | assign next_sel_mbist_itb_cycle1 = mbi_run_bf & ~mbi_cmpsel_bf[1] & mbi_cmpsel_bf[0]; | |
1862 | assign next_sel_mbist_itb_cycle2 = mbi_run_bf & mbi_cmpsel_bf[1] & ~mbi_cmpsel_bf[0]; | |
1863 | assign next_sel_mbist_itb_cycle3 = mbi_run_bf & mbi_cmpsel_bf[1] & mbi_cmpsel_bf[0]; | |
1864 | ||
1865 | assign next_sel_itlb_tag = (itt_rd_req_ff & ~(reload | reload_last) & asi_rd_ok) ; | |
1866 | ifu_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 | ); | |
1877 | assign next_sel_itlb_data = (itd_rd_req_ff & ~(reload | reload_last) & asi_rd_ok) ; | |
1878 | ifu_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 | ); | |
1887 | assign next_sel_itlb_pa = (ith_det_req_ff & ~(reload | reload_last) & asi_rd_ok) ; | |
1888 | ifu_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 | ||
1898 | assign sel_itlb_tag_cntx0_f = ftp_sel_itlb_tag_f & asi_sel_cntx_0 ; | |
1899 | assign sel_itlb_tag_cntx1_f = ftp_sel_itlb_tag_f & ~asi_sel_cntx_0 ; | |
1900 | ifu_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 | ||
1910 | assign ftp_asi_it_rd_done = it_rd_req_done_c ; | |
1911 | ||
1912 | assign 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 | ||
1918 | assign trap_thread_g0[0] = ~tlu_trap_0_tid[1] & ~tlu_trap_0_tid[0] ; | |
1919 | assign trap_thread_g0[1] = ~tlu_trap_0_tid[1] & tlu_trap_0_tid[0] ; | |
1920 | assign trap_thread_g0[2] = tlu_trap_0_tid[1] & ~tlu_trap_0_tid[0] ; | |
1921 | assign trap_thread_g0[3] = tlu_trap_0_tid[1] & tlu_trap_0_tid[0] ; | |
1922 | ||
1923 | assign trap_thread_g1[0] = ~tlu_trap_1_tid[1] & ~tlu_trap_1_tid[0] ; | |
1924 | assign trap_thread_g1[1] = ~tlu_trap_1_tid[1] & tlu_trap_1_tid[0] ; | |
1925 | assign trap_thread_g1[2] = tlu_trap_1_tid[1] & ~tlu_trap_1_tid[0] ; | |
1926 | assign trap_thread_g1[3] = tlu_trap_1_tid[1] & tlu_trap_1_tid[0] ; | |
1927 | ||
1928 | assign thr0_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[0] ; | |
1929 | assign thr1_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[1] ; | |
1930 | assign thr2_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[2] ; | |
1931 | assign thr3_trap_pcaddr_is_valid_bf = tlu_trap_pc_0_valid & trap_thread_g0[3] ; | |
1932 | ||
1933 | assign thr4_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[0] ; | |
1934 | assign thr5_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[1] ; | |
1935 | assign thr6_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[2] ; | |
1936 | assign thr7_trap_pcaddr_is_valid_bf = tlu_trap_pc_1_valid & trap_thread_g1[3] ; | |
1937 | ||
1938 | assign load_flush_w[0] = dec_load_flush_w[0] & tid_dec_w[0] ; | |
1939 | assign load_flush_w[1] = dec_load_flush_w[0] & tid_dec_w[1] ; | |
1940 | assign load_flush_w[2] = dec_load_flush_w[0] & tid_dec_w[2] ; | |
1941 | assign load_flush_w[3] = dec_load_flush_w[0] & tid_dec_w[3] ; | |
1942 | assign load_flush_w[4] = dec_load_flush_w[1] & tid_dec_w[4] ; | |
1943 | assign load_flush_w[5] = dec_load_flush_w[1] & tid_dec_w[5] ; | |
1944 | assign load_flush_w[6] = dec_load_flush_w[1] & tid_dec_w[6] ; | |
1945 | assign load_flush_w[7] = dec_load_flush_w[1] & tid_dec_w[7] ; | |
1946 | ||
1947 | assign ftp_thr0_trprdpc_sel_bf[0] = thr0_trap_pcaddr_is_valid_bf ; | |
1948 | assign ftp_thr0_trprdpc_sel_bf[1] = load_flush_w[0] & ~thr0_trap_pcaddr_is_valid_bf; | |
1949 | assign ftp_thr0_trprdpc_sel_bf[2] = ~load_flush_w[0] & ~thr0_trap_pcaddr_is_valid_bf ; | |
1950 | ||
1951 | assign ftp_thr1_trprdpc_sel_bf[0] = thr1_trap_pcaddr_is_valid_bf ; | |
1952 | assign ftp_thr1_trprdpc_sel_bf[1] = load_flush_w[1] & ~thr1_trap_pcaddr_is_valid_bf; | |
1953 | assign ftp_thr1_trprdpc_sel_bf[2] = ~load_flush_w[1] & ~thr1_trap_pcaddr_is_valid_bf ; | |
1954 | ||
1955 | assign ftp_thr2_trprdpc_sel_bf[0] = thr2_trap_pcaddr_is_valid_bf ; | |
1956 | assign ftp_thr2_trprdpc_sel_bf[1] = load_flush_w[2] & ~thr2_trap_pcaddr_is_valid_bf; | |
1957 | assign ftp_thr2_trprdpc_sel_bf[2] = ~load_flush_w[2] & ~thr2_trap_pcaddr_is_valid_bf ; | |
1958 | ||
1959 | assign ftp_thr3_trprdpc_sel_bf[0] = thr3_trap_pcaddr_is_valid_bf ; | |
1960 | assign ftp_thr3_trprdpc_sel_bf[1] = load_flush_w[3] & ~thr3_trap_pcaddr_is_valid_bf; | |
1961 | assign ftp_thr3_trprdpc_sel_bf[2] = ~load_flush_w[3] & ~thr3_trap_pcaddr_is_valid_bf ; | |
1962 | ||
1963 | ||
1964 | assign ftp_thr4_trprdpc_sel_bf[0] = thr4_trap_pcaddr_is_valid_bf ; | |
1965 | assign ftp_thr4_trprdpc_sel_bf[1] = load_flush_w[4] & ~thr4_trap_pcaddr_is_valid_bf; | |
1966 | assign ftp_thr4_trprdpc_sel_bf[2] = ~load_flush_w[4] & ~thr4_trap_pcaddr_is_valid_bf ; | |
1967 | ||
1968 | assign ftp_thr5_trprdpc_sel_bf[0] = thr5_trap_pcaddr_is_valid_bf ; | |
1969 | assign ftp_thr5_trprdpc_sel_bf[1] = load_flush_w[5] & ~thr5_trap_pcaddr_is_valid_bf; | |
1970 | assign ftp_thr5_trprdpc_sel_bf[2] = ~load_flush_w[5] & ~thr5_trap_pcaddr_is_valid_bf ; | |
1971 | ||
1972 | assign ftp_thr6_trprdpc_sel_bf[0] = thr6_trap_pcaddr_is_valid_bf ; | |
1973 | assign ftp_thr6_trprdpc_sel_bf[1] = load_flush_w[6] & ~thr6_trap_pcaddr_is_valid_bf; | |
1974 | assign ftp_thr6_trprdpc_sel_bf[2] = ~load_flush_w[6] & ~thr6_trap_pcaddr_is_valid_bf ; | |
1975 | ||
1976 | assign ftp_thr7_trprdpc_sel_bf[0] = thr7_trap_pcaddr_is_valid_bf ; | |
1977 | assign ftp_thr7_trprdpc_sel_bf[1] = load_flush_w[7] & ~thr7_trap_pcaddr_is_valid_bf; | |
1978 | assign ftp_thr7_trprdpc_sel_bf[2] = ~load_flush_w[7] & ~thr7_trap_pcaddr_is_valid_bf ; | |
1979 | ||
1980 | ||
1981 | ||
1982 | assign thr0_red_no_br_bf = thr0_trap_pcaddr_is_valid_bf | load_flush_w[0] ; | |
1983 | assign thr1_red_no_br_bf = thr1_trap_pcaddr_is_valid_bf | load_flush_w[1] ; | |
1984 | assign thr2_red_no_br_bf = thr2_trap_pcaddr_is_valid_bf | load_flush_w[2] ; | |
1985 | assign thr3_red_no_br_bf = thr3_trap_pcaddr_is_valid_bf | load_flush_w[3] ; | |
1986 | assign thr4_red_no_br_bf = thr4_trap_pcaddr_is_valid_bf | load_flush_w[4] ; | |
1987 | assign thr5_red_no_br_bf = thr5_trap_pcaddr_is_valid_bf | load_flush_w[5] ; | |
1988 | assign thr6_red_no_br_bf = thr6_trap_pcaddr_is_valid_bf | load_flush_w[6] ; | |
1989 | assign thr7_red_no_br_bf = thr7_trap_pcaddr_is_valid_bf | load_flush_w[7] ; | |
1990 | ||
1991 | ||
1992 | ||
1993 | ||
1994 | ||
1995 | ifu_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 | ||
2006 | assign thr0_redirect_bf = thr0_redirect_part_bf | ftp_tlu_flush_f[0] | thr0_br_taken_ff ; | |
2007 | assign thr1_redirect_bf = thr1_redirect_part_bf | ftp_tlu_flush_f[1] | thr1_br_taken_ff ; | |
2008 | assign thr2_redirect_bf = thr2_redirect_part_bf | ftp_tlu_flush_f[2] | thr2_br_taken_ff ; | |
2009 | assign thr3_redirect_bf = thr3_redirect_part_bf | ftp_tlu_flush_f[3] | thr3_br_taken_ff ; | |
2010 | assign thr4_redirect_bf = thr4_redirect_part_bf | ftp_tlu_flush_f[4] | thr4_br_taken_ff ; | |
2011 | assign thr5_redirect_bf = thr5_redirect_part_bf | ftp_tlu_flush_f[5] | thr5_br_taken_ff ; | |
2012 | assign thr6_redirect_bf = thr6_redirect_part_bf | ftp_tlu_flush_f[6] | thr6_br_taken_ff ; | |
2013 | assign thr7_redirect_bf = thr7_redirect_part_bf | ftp_tlu_flush_f[7] | thr7_br_taken_ff ; | |
2014 | ||
2015 | ||
2016 | assign 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 | ||
2033 | assign ftp_fetch_v_bf = (hp_pickready ) ; | |
2034 | ||
2035 | ||
2036 | assign next_fetch_fv_unq_bf = ((hp_pickready & ~kill_fetch_fv_bf) ); | |
2037 | ||
2038 | ||
2039 | ifu_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 | ||
2049 | ifu_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 | ||
2060 | assign br_redirect_disqual = (br_taken_ff[0] & br0_matches_curr_f) | | |
2061 | (br_taken_ff[1] & br1_matches_curr_f) ; | |
2062 | ||
2063 | assign br_redirect_dup_disqual = (br_taken_ff[0] & br0_matches_curr_f) | | |
2064 | (br_taken_ff[1] & br1_matches_curr_f) ; | |
2065 | ||
2066 | assign ftp_fetch_v_dup_f = ftp_fetch_v_unq_dup_f & ~br_redirect_dup_disqual; | |
2067 | assign ftp_fetch_v_f = ftp_fetch_v_unq_f & ~br_redirect_disqual; | |
2068 | ||
2069 | assign next_fetch_v_c_f = ftp_fetch_v_dup_f ; // | |
2070 | ifu_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 | ||
2080 | assign ftp_fetch_v_c = ftp_fetch_v_c_unq & ~agc_kill_fetch_cv_c ; | |
2081 | assign next_enabled_thread[7:0] = spc_core_running_status[7:0] ; | |
2082 | ifu_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 | ||
2093 | assign ftp_any_thr_clken = |enabled_threads[7:0] | (~ifu_ftu_pmen) | mbi_run_bf; | |
2094 | ||
2095 | ||
2096 | ||
2097 | ||
2098 | //////////////////////////////////////////////////////////////////////// | |
2099 | //////////////////////////////////////////////////////////////////////// | |
2100 | assign thr0_br_taken_ff = br_taken_ff[0] & ~tid0_m[1] & ~tid0_m[0] ; | |
2101 | assign thr1_br_taken_ff = br_taken_ff[0] & ~tid0_m[1] & tid0_m[0] ; | |
2102 | assign thr2_br_taken_ff = br_taken_ff[0] & tid0_m[1] & ~tid0_m[0] ; | |
2103 | assign thr3_br_taken_ff = br_taken_ff[0] & tid0_m[1] & tid0_m[0] ; | |
2104 | assign thr4_br_taken_ff = br_taken_ff[1] & ~tid1_m[1] & ~tid1_m[0] ; | |
2105 | assign thr5_br_taken_ff = br_taken_ff[1] & ~tid1_m[1] & tid1_m[0] ; | |
2106 | assign thr6_br_taken_ff = br_taken_ff[1] & tid1_m[1] & ~tid1_m[0] ; | |
2107 | assign thr7_br_taken_ff = br_taken_ff[1] & tid1_m[1] & tid1_m[0] ; | |
2108 | ||
2109 | ||
2110 | assign ftp_thr0_sel_br_bf = br_taken_ff[0] & ~tid0_m[1] & ~tid0_m[0] ; | |
2111 | assign ftp_thr1_sel_br_bf = br_taken_ff[0] & ~tid0_m[1] & tid0_m[0] ; | |
2112 | assign ftp_thr2_sel_br_bf = br_taken_ff[0] & tid0_m[1] & ~tid0_m[0] ; | |
2113 | assign ftp_thr3_sel_br_bf = br_taken_ff[0] & tid0_m[1] & tid0_m[0] ; | |
2114 | ||
2115 | assign ftp_thr4_sel_br_bf = br_taken_ff[1] & ~tid1_m[1] & ~tid1_m[0] ; | |
2116 | assign ftp_thr5_sel_br_bf = br_taken_ff[1] & ~tid1_m[1] & tid1_m[0] ; | |
2117 | assign ftp_thr6_sel_br_bf = br_taken_ff[1] & tid1_m[1] & ~tid1_m[0] ; | |
2118 | assign ftp_thr7_sel_br_bf = br_taken_ff[1] & tid1_m[1] & tid1_m[0] ; | |
2119 | ||
2120 | ||
2121 | assign br_room_reset[0] = thr0_br_taken_ff & ~ftp_curr_fetch_thr_bf[0]; | |
2122 | assign br_room_reset[1] = thr1_br_taken_ff & ~ftp_curr_fetch_thr_bf[1]; | |
2123 | assign br_room_reset[2] = thr2_br_taken_ff & ~ftp_curr_fetch_thr_bf[2]; | |
2124 | assign br_room_reset[3] = thr3_br_taken_ff & ~ftp_curr_fetch_thr_bf[3]; | |
2125 | assign br_room_reset[4] = thr4_br_taken_ff & ~ftp_curr_fetch_thr_bf[4]; | |
2126 | assign br_room_reset[5] = thr5_br_taken_ff & ~ftp_curr_fetch_thr_bf[5]; | |
2127 | assign br_room_reset[6] = thr6_br_taken_ff & ~ftp_curr_fetch_thr_bf[6]; | |
2128 | assign 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 | //////////////////////////////////////////////////////////////////////////////////////// | |
2140 | assign ftp_thr0_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[0] | thr0_by_pass_2_cycles_at_c; | |
2141 | assign ftp_thr1_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[1] | thr1_by_pass_2_cycles_at_c; | |
2142 | assign ftp_thr2_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[2] | thr2_by_pass_2_cycles_at_c; | |
2143 | assign ftp_thr3_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[3] | thr3_by_pass_2_cycles_at_c; | |
2144 | assign ftp_thr4_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[4] | thr4_by_pass_2_cycles_at_c; | |
2145 | assign ftp_thr5_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[5] | thr5_by_pass_2_cycles_at_c; | |
2146 | assign ftp_thr6_fetch_v_wo_br_bf = ftp_curr_fetch_thr_bf[6] | thr6_by_pass_2_cycles_at_c; | |
2147 | assign 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 | //////////////////////////////////////////////////////////////////////////////////////// | |
2155 | assign ftp_thr0_fetch_v_f = (ftp_curr_fetch_thr_f[0] & ftp_fetch_v_dup_f ) | (thr0_by_pass_next_cycle_at_c); | |
2156 | assign ftp_thr1_fetch_v_f = (ftp_curr_fetch_thr_f[1] & ftp_fetch_v_dup_f ) | (thr1_by_pass_next_cycle_at_c); | |
2157 | assign ftp_thr2_fetch_v_f = (ftp_curr_fetch_thr_f[2] & ftp_fetch_v_dup_f ) | (thr2_by_pass_next_cycle_at_c); | |
2158 | assign ftp_thr3_fetch_v_f = (ftp_curr_fetch_thr_f[3] & ftp_fetch_v_dup_f ) | (thr3_by_pass_next_cycle_at_c); | |
2159 | assign ftp_thr4_fetch_v_f = (ftp_curr_fetch_thr_f[4] & ftp_fetch_v_dup_f ) | (thr4_by_pass_next_cycle_at_c); | |
2160 | assign ftp_thr5_fetch_v_f = (ftp_curr_fetch_thr_f[5] & ftp_fetch_v_dup_f ) | (thr5_by_pass_next_cycle_at_c); | |
2161 | assign ftp_thr6_fetch_v_f = (ftp_curr_fetch_thr_f[6] & ftp_fetch_v_dup_f ) | (thr6_by_pass_next_cycle_at_c); | |
2162 | assign 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 | //////////////////////////////////////////////////////////////////////////////////////// | |
2166 | assign 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 ; | |
2167 | assign 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 ; | |
2168 | assign 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 ; | |
2169 | assign 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 ; | |
2170 | assign 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 ; | |
2171 | assign 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 ; | |
2172 | assign 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 ; | |
2173 | assign 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 | ||
2176 | assign thr0_is_empty_c = ibu_empty[0] ; | |
2177 | assign thr1_is_empty_c = ibu_empty[1] ; | |
2178 | assign thr2_is_empty_c = ibu_empty[2] ; | |
2179 | assign thr3_is_empty_c = ibu_empty[3] ; | |
2180 | assign thr4_is_empty_c = ibu_empty[4] ; | |
2181 | assign thr5_is_empty_c = ibu_empty[5] ; | |
2182 | assign thr6_is_empty_c = ibu_empty[6] ; | |
2183 | assign thr7_is_empty_c = ibu_empty[7] ; | |
2184 | ||
2185 | ||
2186 | ||
2187 | assign thr0_room_4ormore = ibu_room_4ormore[0] ; | |
2188 | assign thr1_room_4ormore = ibu_room_4ormore[1] ; | |
2189 | assign thr2_room_4ormore = ibu_room_4ormore[2] ; | |
2190 | assign thr3_room_4ormore = ibu_room_4ormore[3] ; | |
2191 | assign thr4_room_4ormore = ibu_room_4ormore[4] ; | |
2192 | assign thr5_room_4ormore = ibu_room_4ormore[5] ; | |
2193 | assign thr6_room_4ormore = ibu_room_4ormore[6] ; | |
2194 | assign thr7_room_4ormore = ibu_room_4ormore[7] ; | |
2195 | ||
2196 | ||
2197 | ||
2198 | assign 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 | ||
2209 | assign 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 | ||
2219 | assign 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 | ||
2229 | assign 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 | ||
2239 | assign 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 | ||
2249 | assign 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 | ||
2259 | assign 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 | ||
2269 | assign 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 | ||
2281 | assign ready_hp_in[0] = tsm_thr0_ready_hp_bf_in & ~ftp_thr0_room_is_less_t_3 ; | |
2282 | assign ready_hp_in[1] = tsm_thr1_ready_hp_bf_in & ~ftp_thr1_room_is_less_t_3 ; | |
2283 | assign ready_hp_in[2] = tsm_thr2_ready_hp_bf_in & ~ftp_thr2_room_is_less_t_3 ; | |
2284 | assign ready_hp_in[3] = tsm_thr3_ready_hp_bf_in & ~ftp_thr3_room_is_less_t_3 ; | |
2285 | assign ready_hp_in[4] = tsm_thr4_ready_hp_bf_in & ~ftp_thr4_room_is_less_t_3 ; | |
2286 | assign ready_hp_in[5] = tsm_thr5_ready_hp_bf_in & ~ftp_thr5_room_is_less_t_3 ; | |
2287 | assign ready_hp_in[6] = tsm_thr6_ready_hp_bf_in & ~ftp_thr6_room_is_less_t_3 ; | |
2288 | assign 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 | |
2291 | assign tsm_thr0_ready_hp_bf = ready_hp_bf[0]; | |
2292 | assign tsm_thr1_ready_hp_bf = ready_hp_bf[1]; | |
2293 | assign tsm_thr2_ready_hp_bf = ready_hp_bf[2]; | |
2294 | assign tsm_thr3_ready_hp_bf = ready_hp_bf[3]; | |
2295 | assign tsm_thr4_ready_hp_bf = ready_hp_bf[4]; | |
2296 | assign tsm_thr5_ready_hp_bf = ready_hp_bf[5]; | |
2297 | assign tsm_thr6_ready_hp_bf = ready_hp_bf[6]; | |
2298 | assign tsm_thr7_ready_hp_bf = ready_hp_bf[7]; | |
2299 | ||
2300 | assign 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 | ||
2305 | ifu_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 | ||
2316 | assign 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 | /////////////////////////////////////////////////////////// | |
2331 | assign next_by_pass_sel_bbf[0] = cmu_thr0_data_ready; | |
2332 | assign next_by_pass_sel_bbf[1] = cmu_thr1_data_ready; | |
2333 | assign next_by_pass_sel_bbf[2] = cmu_thr2_data_ready; | |
2334 | assign next_by_pass_sel_bbf[3] = cmu_thr3_data_ready; | |
2335 | assign next_by_pass_sel_bbf[4] = cmu_thr4_data_ready; | |
2336 | assign next_by_pass_sel_bbf[5] = cmu_thr5_data_ready; | |
2337 | assign next_by_pass_sel_bbf[6] = cmu_thr6_data_ready; | |
2338 | assign next_by_pass_sel_bbf[7] = cmu_thr7_data_ready; | |
2339 | ||
2340 | ifu_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 | ||
2349 | ifu_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 | ||
2359 | ifu_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 | /////////////////////////////////////////////////////////////////////////////////////////////// | |
2372 | assign thr0_kill_by_pass_bbf = cmu_thr0_data_ready & (tsm_thr0_ignore_by_pass | thr0_redirect_bf) ; | |
2373 | assign thr1_kill_by_pass_bbf = cmu_thr1_data_ready & (tsm_thr1_ignore_by_pass | thr1_redirect_bf) ; | |
2374 | assign thr2_kill_by_pass_bbf = cmu_thr2_data_ready & (tsm_thr2_ignore_by_pass | thr2_redirect_bf) ; | |
2375 | assign thr3_kill_by_pass_bbf = cmu_thr3_data_ready & (tsm_thr3_ignore_by_pass | thr3_redirect_bf) ; | |
2376 | assign thr4_kill_by_pass_bbf = cmu_thr4_data_ready & (tsm_thr4_ignore_by_pass | thr4_redirect_bf) ; | |
2377 | assign thr5_kill_by_pass_bbf = cmu_thr5_data_ready & (tsm_thr5_ignore_by_pass | thr5_redirect_bf) ; | |
2378 | assign thr6_kill_by_pass_bbf = cmu_thr6_data_ready & (tsm_thr6_ignore_by_pass | thr6_redirect_bf) ; | |
2379 | assign thr7_kill_by_pass_bbf = cmu_thr7_data_ready & (tsm_thr7_ignore_by_pass | thr7_redirect_bf) ; | |
2380 | ||
2381 | assign 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 | ||
2390 | ifu_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 | ||
2411 | assign 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 | ||
2420 | assign 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 | ||
2424 | assign by_pass_valid_bf = ftp_byp_valid & ~bypass_thread_killed ; | |
2425 | ||
2426 | assign prev_by_pass_at_cycle_1 = cycle_2_by_pass_ok_f | cycle_3_by_pass_ok_c ; | |
2427 | assign prev_by_pass_at_cycle_2 = cycle_3_by_pass_ok_f ; | |
2428 | ||
2429 | assign 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); | |
2430 | assign 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 | ||
2463 | ifu_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 | ||
2473 | assign by_pass_valid_f = by_pass_valid_unq_f & ~bypass_thread_redirected_p_f ; | |
2474 | assign 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 | ||
2484 | assign 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) ; | |
2507 | assign sel_by_pass_cycle_2_int_f = (cycle_2_by_pass_ok_f & by_pass_valid_f) ; | |
2508 | assign 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 | /////////////////////////////////////////////////////////////////////////////////////////////// | |
2520 | assign thr0_by_pass_valid_bf = by_pass_sel_bf[0] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2521 | assign thr1_by_pass_valid_bf = by_pass_sel_bf[1] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2522 | assign thr2_by_pass_valid_bf = by_pass_sel_bf[2] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2523 | assign thr3_by_pass_valid_bf = by_pass_sel_bf[3] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2524 | assign thr4_by_pass_valid_bf = by_pass_sel_bf[4] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2525 | assign thr5_by_pass_valid_bf = by_pass_sel_bf[5] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2526 | assign thr6_by_pass_valid_bf = by_pass_sel_bf[6] ; // & agc_sel_by_pass_cycle_1_int_bf ; | |
2527 | assign 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 | /////////////////////////////////////////////////////////////////////////////////////////////// | |
2532 | assign thr0_by_pass_valid_f = by_pass_sel_f[0] & sel_by_pass_cycle_2_int_f ; | |
2533 | assign thr1_by_pass_valid_f = by_pass_sel_f[1] & sel_by_pass_cycle_2_int_f ; | |
2534 | assign thr2_by_pass_valid_f = by_pass_sel_f[2] & sel_by_pass_cycle_2_int_f ; | |
2535 | assign thr3_by_pass_valid_f = by_pass_sel_f[3] & sel_by_pass_cycle_2_int_f ; | |
2536 | assign thr4_by_pass_valid_f = by_pass_sel_f[4] & sel_by_pass_cycle_2_int_f ; | |
2537 | assign thr5_by_pass_valid_f = by_pass_sel_f[5] & sel_by_pass_cycle_2_int_f ; | |
2538 | assign thr6_by_pass_valid_f = by_pass_sel_f[6] & sel_by_pass_cycle_2_int_f ; | |
2539 | assign 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 | /////////////////////////////////////////////////////////////////////////////////////////////// | |
2544 | assign thr0_by_pass_valid_c = by_pass_sel_c[0] & sel_by_pass_cycle_3_int_c ; | |
2545 | assign thr1_by_pass_valid_c = by_pass_sel_c[1] & sel_by_pass_cycle_3_int_c ; | |
2546 | assign thr2_by_pass_valid_c = by_pass_sel_c[2] & sel_by_pass_cycle_3_int_c ; | |
2547 | assign thr3_by_pass_valid_c = by_pass_sel_c[3] & sel_by_pass_cycle_3_int_c ; | |
2548 | assign thr4_by_pass_valid_c = by_pass_sel_c[4] & sel_by_pass_cycle_3_int_c ; | |
2549 | assign thr5_by_pass_valid_c = by_pass_sel_c[5] & sel_by_pass_cycle_3_int_c ; | |
2550 | assign thr6_by_pass_valid_c = by_pass_sel_c[6] & sel_by_pass_cycle_3_int_c ; | |
2551 | assign thr7_by_pass_valid_c = by_pass_sel_c[7] & sel_by_pass_cycle_3_int_c ; | |
2552 | ||
2553 | assign thr0_by_pass_is_at_c = thr0_by_pass_valid_bf | thr0_by_pass_valid_f | thr0_by_pass_valid_c ; | |
2554 | assign thr1_by_pass_is_at_c = thr1_by_pass_valid_bf | thr1_by_pass_valid_f | thr1_by_pass_valid_c ; | |
2555 | assign thr2_by_pass_is_at_c = thr2_by_pass_valid_bf | thr2_by_pass_valid_f | thr2_by_pass_valid_c ; | |
2556 | assign thr3_by_pass_is_at_c = thr3_by_pass_valid_bf | thr3_by_pass_valid_f | thr3_by_pass_valid_c ; | |
2557 | assign thr4_by_pass_is_at_c = thr4_by_pass_valid_bf | thr4_by_pass_valid_f | thr4_by_pass_valid_c ; | |
2558 | assign thr5_by_pass_is_at_c = thr5_by_pass_valid_bf | thr5_by_pass_valid_f | thr5_by_pass_valid_c ; | |
2559 | assign thr6_by_pass_is_at_c = thr6_by_pass_valid_bf | thr6_by_pass_valid_f | thr6_by_pass_valid_c ; | |
2560 | assign 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 | /////////////////////////////////////////////////////////////////////////////////////////////// | |
2566 | assign thr0_by_pass_cycle_2_bf = by_pass_sel_bf[0] & cycle_2_by_pass_ok_bf ; | |
2567 | assign thr0_by_pass_cycle_3_f = by_pass_sel_f[0] & cycle_3_by_pass_ok_f ; | |
2568 | ||
2569 | assign thr1_by_pass_cycle_2_bf = by_pass_sel_bf[1] & cycle_2_by_pass_ok_bf ; | |
2570 | assign thr1_by_pass_cycle_3_f = by_pass_sel_f[1] & cycle_3_by_pass_ok_f ; | |
2571 | ||
2572 | assign thr2_by_pass_cycle_2_bf = by_pass_sel_bf[2] & cycle_2_by_pass_ok_bf ; | |
2573 | assign thr2_by_pass_cycle_3_f = by_pass_sel_f[2] & cycle_3_by_pass_ok_f ; | |
2574 | ||
2575 | assign thr3_by_pass_cycle_2_bf = by_pass_sel_bf[3] & cycle_2_by_pass_ok_bf ; | |
2576 | assign thr3_by_pass_cycle_3_f = by_pass_sel_f[3] & cycle_3_by_pass_ok_f ; | |
2577 | ||
2578 | assign thr4_by_pass_cycle_2_bf = by_pass_sel_bf[4] & cycle_2_by_pass_ok_bf ; | |
2579 | assign thr4_by_pass_cycle_3_f = by_pass_sel_f[4] & cycle_3_by_pass_ok_f ; | |
2580 | ||
2581 | assign thr5_by_pass_cycle_2_bf = by_pass_sel_bf[5] & cycle_2_by_pass_ok_bf ; | |
2582 | assign thr5_by_pass_cycle_3_f = by_pass_sel_f[5] & cycle_3_by_pass_ok_f ; | |
2583 | ||
2584 | assign thr6_by_pass_cycle_2_bf = by_pass_sel_bf[6] & cycle_2_by_pass_ok_bf ; | |
2585 | assign thr6_by_pass_cycle_3_f = by_pass_sel_f[6] & cycle_3_by_pass_ok_f ; | |
2586 | ||
2587 | assign thr7_by_pass_cycle_2_bf = by_pass_sel_bf[7] & cycle_2_by_pass_ok_bf ; | |
2588 | assign thr7_by_pass_cycle_3_f = by_pass_sel_f[7] & cycle_3_by_pass_ok_f ; | |
2589 | ||
2590 | ||
2591 | assign thr0_by_pass_next_cycle_at_c = thr0_by_pass_cycle_2_bf | thr0_by_pass_cycle_3_f ; | |
2592 | assign thr1_by_pass_next_cycle_at_c = thr1_by_pass_cycle_2_bf | thr1_by_pass_cycle_3_f ; | |
2593 | assign thr2_by_pass_next_cycle_at_c = thr2_by_pass_cycle_2_bf | thr2_by_pass_cycle_3_f ; | |
2594 | assign thr3_by_pass_next_cycle_at_c = thr3_by_pass_cycle_2_bf | thr3_by_pass_cycle_3_f ; | |
2595 | assign thr4_by_pass_next_cycle_at_c = thr4_by_pass_cycle_2_bf | thr4_by_pass_cycle_3_f ; | |
2596 | assign thr5_by_pass_next_cycle_at_c = thr5_by_pass_cycle_2_bf | thr5_by_pass_cycle_3_f ; | |
2597 | assign thr6_by_pass_next_cycle_at_c = thr6_by_pass_cycle_2_bf | thr6_by_pass_cycle_3_f ; | |
2598 | assign thr7_by_pass_next_cycle_at_c = thr7_by_pass_cycle_2_bf | thr7_by_pass_cycle_3_f ; | |
2599 | ||
2600 | assign thr0_by_pass_2_cycles_at_c = by_pass_sel_bf[0] & cycle_3_by_pass_ok_bf ; | |
2601 | assign thr1_by_pass_2_cycles_at_c = by_pass_sel_bf[1] & cycle_3_by_pass_ok_bf ; | |
2602 | assign thr2_by_pass_2_cycles_at_c = by_pass_sel_bf[2] & cycle_3_by_pass_ok_bf ; | |
2603 | assign thr3_by_pass_2_cycles_at_c = by_pass_sel_bf[3] & cycle_3_by_pass_ok_bf ; | |
2604 | assign thr4_by_pass_2_cycles_at_c = by_pass_sel_bf[4] & cycle_3_by_pass_ok_bf ; | |
2605 | assign thr5_by_pass_2_cycles_at_c = by_pass_sel_bf[5] & cycle_3_by_pass_ok_bf ; | |
2606 | assign thr6_by_pass_2_cycles_at_c = by_pass_sel_bf[6] & cycle_3_by_pass_ok_bf ; | |
2607 | assign 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 | /////////////////////////////////////////////////////////////////////// | |
2614 | assign 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 | ||
2629 | assign 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 | ||
2638 | assign 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 | ||
2712 | assign ftp_pc_sel_tag_part1[0] = ftp_any_thread_ready & ~select_itc_va & ~sel_am_5; | |
2713 | assign ftp_pc_sel_tag_part1[1] = select_itc_va & ~sel_am_5 ; | |
2714 | assign ftp_pc_sel_tag_part1[2] = ~ftp_pc_sel_tag_part1[1] & ~ftp_pc_sel_tag_part1[0]; | |
2715 | ||
2716 | assign ftp_pc_sel_tag_part2[0] = ftp_any_thread_ready & ~select_itc_va & ftp_curr_pstate_am_bf_ & ~sel_am_5; | |
2717 | assign ftp_pc_sel_tag_part2[1] = select_itc_va & ~sel_am_5; | |
2718 | assign ftp_pc_sel_tag_part2[2] = ~ftp_pc_sel_tag_part2[0] & ~ftp_pc_sel_tag_part2[1] & ~ ftp_pc_sel_tag_part2[3] ; | |
2719 | assign ftp_pc_sel_tag_part2[3] = ftp_any_thread_ready & ~select_itc_va & ~ftp_curr_pstate_am_bf_ & ~sel_am_5 ; | |
2720 | ||
2721 | assign ftp_pc_sel_tag_pc_bot[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~select_itc_va; | |
2722 | assign ftp_pc_sel_tag_pc_bot[1] = ~( ftp_any_thread_ready & ~fetch_same_thr_again_bf & ~select_itc_va); | |
2723 | ||
2724 | assign ftp_pc_sel_tag_pc_top[0] = ftp_any_thread_ready & ~fetch_same_thr_again_bf & ftp_curr_pstate_am_bf_ & ~select_itc_va; | |
2725 | assign 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 | ||
2732 | assign 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; | |
2734 | assign 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; | |
2736 | assign ftp_icaddr_sel_first_mux[2] = ftp_fill_req_q_bf & ~mbi_run_bf; | |
2737 | assign 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; | |
2738 | assign ftp_icaddr_sel_first_mux[4] = mbi_run_bf ; | |
2739 | ||
2740 | ||
2741 | ||
2742 | assign next_pstate_am_[7:0] = ~tlu_pstate_am[7:0] ; | |
2743 | ||
2744 | ifu_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 | ||
2754 | assign 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 | ||
2764 | assign reload_in = itc_demap_next; | |
2765 | ||
2766 | ||
2767 | //flop reload | |
2768 | ||
2769 | ifu_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 | ||
2783 | assign next_ftp_ith_det_req_bf = next_ith_det_req & ~(reload_in | reload) ; | |
2784 | assign next_select_itc_va = reload_in | reload | mbi_run_bf ; | |
2785 | assign next_sel_am_5 = next_ftp_ith_det_req_bf & ~next_select_itc_va ; | |
2786 | ||
2787 | ifu_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 | ||
2802 | assign 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] ; | |
2804 | assign 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] ; | |
2806 | assign 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] ; | |
2808 | assign 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] ; | |
2810 | assign 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] ; | |
2812 | assign 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] ; | |
2814 | assign 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] ; | |
2816 | assign 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 | ||
2819 | ifu_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 | ||
2828 | ifu_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 | ||
2837 | ifu_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 | ||
2846 | ifu_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 | ||
2855 | ifu_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 | ||
2864 | ifu_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 | ||
2873 | ifu_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 | ||
2882 | ifu_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 | ||
2891 | assign 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 | ||
2900 | assign ftp_thr7_pid_data[2:0] = thr7_pid_data[2:0] ; | |
2901 | assign ftp_thr6_pid_data[2:0] = thr6_pid_data[2:0] ; | |
2902 | assign ftp_thr5_pid_data[2:0] = thr5_pid_data[2:0] ; | |
2903 | assign ftp_thr4_pid_data[2:0] = thr4_pid_data[2:0] ; | |
2904 | assign ftp_thr3_pid_data[2:0] = thr3_pid_data[2:0] ; | |
2905 | assign ftp_thr2_pid_data[2:0] = thr2_pid_data[2:0] ; | |
2906 | assign ftp_thr1_pid_data[2:0] = thr1_pid_data[2:0] ; | |
2907 | assign ftp_thr0_pid_data[2:0] = thr0_pid_data[2:0] ; | |
2908 | ||
2909 | assign 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) ; | |
2910 | assign 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) ; | |
2911 | assign 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) ; | |
2912 | assign 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) ; | |
2913 | assign 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) ; | |
2914 | assign 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) ; | |
2915 | assign 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) ; | |
2916 | assign 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 | ||
2918 | assign 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 | /////////////////////////////////////////////////////////////////////// | |
2931 | ifu_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 | ||
2943 | assign curr_thr_pc_bf[4] = ~ifu_agd_pc_f[4] ; | |
2944 | assign curr_thr_pc_bf[3] = ~ifu_agd_pc_f[4] & ifu_agd_pc_f[3] ; | |
2945 | assign curr_thr_pc_bf[2] = ~ifu_agd_pc_f[4] & ifu_agd_pc_f[2] ; | |
2946 | ||
2947 | assign 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; | |
2948 | assign 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; | |
2949 | assign ic_pwr_sel_index[2] = (ic_rd_req_ff | ic_wr_req_ff | tg_rd_req_ff | tg_wr_req_ff) ; | |
2950 | ||
2951 | assign thr0_pc_muxed_f[4:2] = ftp_thr0_sel_br_bf ? agd_address0_m[4:2] : agd_thr0_pc_4_2_f[4:2] ; | |
2952 | assign thr1_pc_muxed_f[4:2] = ftp_thr1_sel_br_bf ? agd_address0_m[4:2] : agd_thr1_pc_4_2_f[4:2] ; | |
2953 | assign thr2_pc_muxed_f[4:2] = ftp_thr2_sel_br_bf ? agd_address0_m[4:2] : agd_thr2_pc_4_2_f[4:2] ; | |
2954 | assign thr3_pc_muxed_f[4:2] = ftp_thr3_sel_br_bf ? agd_address0_m[4:2] : agd_thr3_pc_4_2_f[4:2] ; | |
2955 | assign thr4_pc_muxed_f[4:2] = ftp_thr4_sel_br_bf ? agd_address1_m[4:2] : agd_thr4_pc_4_2_f[4:2] ; | |
2956 | assign thr5_pc_muxed_f[4:2] = ftp_thr5_sel_br_bf ? agd_address1_m[4:2] : agd_thr5_pc_4_2_f[4:2] ; | |
2957 | assign thr6_pc_muxed_f[4:2] = ftp_thr6_sel_br_bf ? agd_address1_m[4:2] : agd_thr6_pc_4_2_f[4:2] ; | |
2958 | assign 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 | ||
2960 | assign 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 | ||
2969 | assign 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 | ||
2973 | assign 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 | ||
2977 | assign 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 | ||
2980 | assign 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 | ||
2983 | assign 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 | ||
2991 | supply0 vss; | |
2992 | supply1 vdd; | |
2993 | assign se = tcu_scan_en ; | |
2994 | // fixscan start: | |
2995 | assign br_reg_scanin = scan_in ; | |
2996 | assign tlu_flush_ifu_req_scanin = br_reg_scanout ; | |
2997 | assign br_tid_reg_scanin = tlu_flush_ifu_req_scanout; | |
2998 | assign tid_dec_w_reg_scanin = br_tid_reg_scanout ; | |
2999 | assign tid_bf_reg_scanin = tid_dec_w_reg_scanout ; | |
3000 | assign top_lruf_scanin = tid_bf_reg_scanout ; | |
3001 | assign bot_lruf_scanin = top_lruf_scanout ; | |
3002 | assign favor_top_reg_scanin = bot_lruf_scanout ; | |
3003 | assign curr_fetch_thr_f_reg_scanin = favor_top_reg_scanout ; | |
3004 | assign curr_fetch_thr_c_reg_scanin = curr_fetch_thr_f_reg_scanout; | |
3005 | assign inv_line_reg_scanin = curr_fetch_thr_c_reg_scanout; | |
3006 | assign fill_req_bf_reg_scanin = inv_line_reg_scanout ; | |
3007 | assign rd_is_first_reg_scanin = fill_req_bf_reg_scanout ; | |
3008 | assign wr_request_pending_reg_scanin = rd_is_first_reg_scanout ; | |
3009 | assign ic_wr_req_ff_reg_scanin = wr_request_pending_reg_scanout; | |
3010 | assign ic_rd_req_ff_reg_scanin = ic_wr_req_ff_reg_scanout ; | |
3011 | assign tg_wr_req_ff_reg_scanin = ic_rd_req_ff_reg_scanout ; | |
3012 | assign tg_rd_req_ff_reg_scanin = tg_wr_req_ff_reg_scanout ; | |
3013 | assign itt_rd_req_ff_reg_scanin = tg_rd_req_ff_reg_scanout ; | |
3014 | assign itd_rd_req_ff_reg_scanin = itt_rd_req_ff_reg_scanout; | |
3015 | assign ith_det_req_ff_reg_scanin = itd_rd_req_ff_reg_scanout; | |
3016 | assign itlb_probe_l_reg_scanin = ith_det_req_ff_reg_scanout; | |
3017 | assign fill_req_bf_q_reg_scanin = itlb_probe_l_reg_scanout ; | |
3018 | assign mbist_in_reg_scanin = fill_req_bf_q_reg_scanout; | |
3019 | assign itlb_cam_vld_reg_scanin = mbist_in_reg_scanout ; | |
3020 | assign itlb_bypass_lat_scanin = itlb_cam_vld_reg_scanout ; | |
3021 | assign ic_rd_done_f_reg_scanin = itlb_bypass_lat_scanout ; | |
3022 | assign ic_rd_done_c_reg_scanin = ic_rd_done_f_reg_scanout ; | |
3023 | assign ic_rd_done_p_reg_scanin = ic_rd_done_c_reg_scanout ; | |
3024 | assign ic_wr_done_f_reg_scanin = ic_rd_done_p_reg_scanout ; | |
3025 | assign tg_rd_done_f_reg_scanin = ic_wr_done_f_reg_scanout ; | |
3026 | assign tg_rd_done_c_reg_scanin = tg_rd_done_f_reg_scanout ; | |
3027 | assign tg_wr_done_f_reg_scanin = tg_rd_done_c_reg_scanout ; | |
3028 | assign it_rd_done_f_reg_scanin = tg_wr_done_f_reg_scanout ; | |
3029 | assign it_rd_done_c_reg_scanin = it_rd_done_f_reg_scanout ; | |
3030 | assign asi_rd_done_reg_scanin = it_rd_done_c_reg_scanout ; | |
3031 | assign asi_wr_done_reg_scanin = asi_rd_done_reg_scanout ; | |
3032 | assign asi_it_rd_done_reg_scanin = asi_wr_done_reg_scanout ; | |
3033 | assign itlb_sel_tag_f_reg_scanin = asi_it_rd_done_reg_scanout; | |
3034 | assign itlb_sel_data_f_reg_scanin = itlb_sel_tag_f_reg_scanout; | |
3035 | assign itlb_sel_pa_f_reg_scanin = itlb_sel_data_f_reg_scanout; | |
3036 | assign itlb_sel_c_reg_scanin = itlb_sel_pa_f_reg_scanout; | |
3037 | assign thrx_redirect_reg_scanin = itlb_sel_c_reg_scanout ; | |
3038 | assign fetch_v_f_reg_scanin = thrx_redirect_reg_scanout; | |
3039 | assign fetch_v_f_dup_reg_scanin = fetch_v_f_reg_scanout ; | |
3040 | assign fetch_v_c_reg_scanin = fetch_v_f_dup_reg_scanout; | |
3041 | assign enabled_thr_reg_scanin = fetch_v_c_reg_scanout ; | |
3042 | assign ready_fp_reg_scanin = enabled_thr_reg_scanout ; | |
3043 | assign cmu_fill_byp_thread_reg_scanin = ready_fp_reg_scanout ; | |
3044 | assign by_pass_sel_f_reg_scanin = cmu_fill_byp_thread_reg_scanout; | |
3045 | assign by_pass_sel_c_reg_scanin = by_pass_sel_f_reg_scanout; | |
3046 | assign byp_valid_reg_scanin = by_pass_sel_c_reg_scanout; | |
3047 | assign thrx_kill_by_pass_reg_scanin = byp_valid_reg_scanout ; | |
3048 | assign cycle_2_by_pass_f_reg_scanin = thrx_kill_by_pass_reg_scanout; | |
3049 | assign cycle_3_by_pass_f_reg_scanin = cycle_2_by_pass_f_reg_scanout; | |
3050 | assign cycle_3_by_pass_c_reg_scanin = cycle_3_by_pass_f_reg_scanout; | |
3051 | assign by_pass_v_f_reg_scanin = cycle_3_by_pass_c_reg_scanout; | |
3052 | assign by_pass_v_c_reg_scanin = by_pass_v_f_reg_scanout ; | |
3053 | assign pstate_am_reg_scanin = by_pass_v_c_reg_scanout ; | |
3054 | assign reload_latch_scanin = pstate_am_reg_scanout ; | |
3055 | assign pre_sel_am_reg_scanin = reload_latch_scanout ; | |
3056 | assign thr0_pid_reg_scanin = pre_sel_am_reg_scanout ; | |
3057 | assign thr1_pid_reg_scanin = thr0_pid_reg_scanout ; | |
3058 | assign thr2_pid_reg_scanin = thr1_pid_reg_scanout ; | |
3059 | assign thr3_pid_reg_scanin = thr2_pid_reg_scanout ; | |
3060 | assign thr4_pid_reg_scanin = thr3_pid_reg_scanout ; | |
3061 | assign thr5_pid_reg_scanin = thr4_pid_reg_scanout ; | |
3062 | assign thr6_pid_reg_scanin = thr5_pid_reg_scanout ; | |
3063 | assign thr7_pid_reg_scanin = thr6_pid_reg_scanout ; | |
3064 | assign spares_scanin = thr7_pid_reg_scanout ; | |
3065 | assign scan_out = spares_scanout ; | |
3066 | // fixscan end: | |
3067 | endmodule | |
3068 | ||
3069 | ||
3070 | ||
3071 | ||
3072 | ||
3073 | ||
3074 | ||
3075 | // any PARAMS parms go into naming of macro | |
3076 | ||
3077 | module 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 | ||
3097 | cl_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 | ||
3110 | endmodule | |
3111 | ||
3112 | ||
3113 | ||
3114 | ||
3115 | ||
3116 | ||
3117 | ||
3118 | ||
3119 | ||
3120 | ||
3121 | ||
3122 | ||
3123 | ||
3124 | // any PARAMS parms go into naming of macro | |
3125 | ||
3126 | module 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); | |
3134 | wire [5:0] fdin; | |
3135 | wire [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; | |
3147 | assign fdin[5:0] = din[5:0]; | |
3148 | ||
3149 | ||
3150 | ||
3151 | ||
3152 | ||
3153 | ||
3154 | dff #(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 | ||
3175 | endmodule | |
3176 | ||
3177 | ||
3178 | ||
3179 | ||
3180 | ||
3181 | ||
3182 | ||
3183 | ||
3184 | ||
3185 | ||
3186 | ||
3187 | ||
3188 | ||
3189 | // any PARAMS parms go into naming of macro | |
3190 | ||
3191 | module 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); | |
3199 | wire [7:0] fdin; | |
3200 | wire [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; | |
3212 | assign fdin[7:0] = din[7:0]; | |
3213 | ||
3214 | ||
3215 | ||
3216 | ||
3217 | ||
3218 | ||
3219 | dff #(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 | ||
3240 | endmodule | |
3241 | ||
3242 | ||
3243 | ||
3244 | ||
3245 | ||
3246 | ||
3247 | ||
3248 | ||
3249 | ||
3250 | ||
3251 | ||
3252 | ||
3253 | ||
3254 | // any PARAMS parms go into naming of macro | |
3255 | ||
3256 | module 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); | |
3264 | wire [11:0] fdin; | |
3265 | wire [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; | |
3277 | assign fdin[11:0] = din[11:0]; | |
3278 | ||
3279 | ||
3280 | ||
3281 | ||
3282 | ||
3283 | ||
3284 | dff #(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 | ||
3305 | endmodule | |
3306 | ||
3307 | ||
3308 | ||
3309 | ||
3310 | ||
3311 | ||
3312 | ||
3313 | ||
3314 | ||
3315 | ||
3316 | ||
3317 | ||
3318 | ||
3319 | // any PARAMS parms go into naming of macro | |
3320 | ||
3321 | module 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); | |
3329 | wire [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; | |
3341 | assign fdin[0:0] = din[0:0]; | |
3342 | ||
3343 | ||
3344 | ||
3345 | ||
3346 | ||
3347 | ||
3348 | dff #(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 | ||
3369 | endmodule | |
3370 | ||
3371 | ||
3372 | ||
3373 | ||
3374 | ||
3375 | ||
3376 | ||
3377 | ||
3378 | ||
3379 | ||
3380 | ||
3381 | ||
3382 | ||
3383 | // any PARAMS parms go into naming of macro | |
3384 | ||
3385 | module 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); | |
3393 | wire [1:0] fdin; | |
3394 | wire [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; | |
3406 | assign fdin[1:0] = din[1:0]; | |
3407 | ||
3408 | ||
3409 | ||
3410 | ||
3411 | ||
3412 | ||
3413 | dff #(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 | ||
3434 | endmodule | |
3435 | ||
3436 | ||
3437 | ||
3438 | ||
3439 | ||
3440 | ||
3441 | ||
3442 | ||
3443 | ||
3444 | ||
3445 | ||
3446 | ||
3447 | ||
3448 | // any PARAMS parms go into naming of macro | |
3449 | ||
3450 | module 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); | |
3458 | wire [10:0] fdin; | |
3459 | wire [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; | |
3471 | assign fdin[10:0] = din[10:0]; | |
3472 | ||
3473 | ||
3474 | ||
3475 | ||
3476 | ||
3477 | ||
3478 | dff #(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 | ||
3499 | endmodule | |
3500 | ||
3501 | ||
3502 | ||
3503 | ||
3504 | ||
3505 | ||
3506 | ||
3507 | ||
3508 | ||
3509 | ||
3510 | ||
3511 | ||
3512 | ||
3513 | // any PARAMS parms go into naming of macro | |
3514 | ||
3515 | module 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); | |
3523 | wire [4:0] fdin; | |
3524 | wire [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; | |
3536 | assign fdin[4:0] = din[4:0]; | |
3537 | ||
3538 | ||
3539 | ||
3540 | ||
3541 | ||
3542 | ||
3543 | dff #(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 | ||
3564 | endmodule | |
3565 | ||
3566 | ||
3567 | ||
3568 | ||
3569 | ||
3570 | ||
3571 | ||
3572 | ||
3573 | ||
3574 | ||
3575 | ||
3576 | ||
3577 | ||
3578 | // any PARAMS parms go into naming of macro | |
3579 | ||
3580 | module 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); | |
3588 | wire [3:0] fdin; | |
3589 | wire [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; | |
3601 | assign fdin[3:0] = din[3:0]; | |
3602 | ||
3603 | ||
3604 | ||
3605 | ||
3606 | ||
3607 | ||
3608 | dff #(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 | ||
3629 | endmodule | |
3630 | ||
3631 | ||
3632 | ||
3633 | ||
3634 | ||
3635 | ||
3636 | ||
3637 | ||
3638 | ||
3639 | ||
3640 | ||
3641 | ||
3642 | ||
3643 | // any PARAMS parms go into naming of macro | |
3644 | ||
3645 | module 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); | |
3653 | wire [9:0] fdin; | |
3654 | wire [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; | |
3666 | assign fdin[9:0] = din[9:0]; | |
3667 | ||
3668 | ||
3669 | ||
3670 | ||
3671 | ||
3672 | ||
3673 | dff #(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 | ||
3694 | endmodule | |
3695 | ||
3696 | ||
3697 | ||
3698 | ||
3699 | ||
3700 | ||
3701 | ||
3702 | ||
3703 | ||
3704 | ||
3705 | ||
3706 | ||
3707 | ||
3708 | // any PARAMS parms go into naming of macro | |
3709 | ||
3710 | module 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); | |
3718 | wire [2:0] fdin; | |
3719 | wire [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; | |
3731 | assign fdin[2:0] = din[2:0]; | |
3732 | ||
3733 | ||
3734 | ||
3735 | ||
3736 | ||
3737 | ||
3738 | dff #(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 | ||
3759 | endmodule | |
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 | ||
3775 | module ifu_ftu_ftp_ctl_spare_ctl_macro__num_5 ( | |
3776 | l1clk, | |
3777 | scan_in, | |
3778 | siclk, | |
3779 | soclk, | |
3780 | scan_out); | |
3781 | wire si_0; | |
3782 | wire so_0; | |
3783 | wire spare0_flop_unused; | |
3784 | wire spare0_buf_32x_unused; | |
3785 | wire spare0_nand3_8x_unused; | |
3786 | wire spare0_inv_8x_unused; | |
3787 | wire spare0_aoi22_4x_unused; | |
3788 | wire spare0_buf_8x_unused; | |
3789 | wire spare0_oai22_4x_unused; | |
3790 | wire spare0_inv_16x_unused; | |
3791 | wire spare0_nand2_16x_unused; | |
3792 | wire spare0_nor3_4x_unused; | |
3793 | wire spare0_nand2_8x_unused; | |
3794 | wire spare0_buf_16x_unused; | |
3795 | wire spare0_nor2_16x_unused; | |
3796 | wire spare0_inv_32x_unused; | |
3797 | wire si_1; | |
3798 | wire so_1; | |
3799 | wire spare1_flop_unused; | |
3800 | wire spare1_buf_32x_unused; | |
3801 | wire spare1_nand3_8x_unused; | |
3802 | wire spare1_inv_8x_unused; | |
3803 | wire spare1_aoi22_4x_unused; | |
3804 | wire spare1_buf_8x_unused; | |
3805 | wire spare1_oai22_4x_unused; | |
3806 | wire spare1_inv_16x_unused; | |
3807 | wire spare1_nand2_16x_unused; | |
3808 | wire spare1_nor3_4x_unused; | |
3809 | wire spare1_nand2_8x_unused; | |
3810 | wire spare1_buf_16x_unused; | |
3811 | wire spare1_nor2_16x_unused; | |
3812 | wire spare1_inv_32x_unused; | |
3813 | wire si_2; | |
3814 | wire so_2; | |
3815 | wire spare2_flop_unused; | |
3816 | wire spare2_buf_32x_unused; | |
3817 | wire spare2_nand3_8x_unused; | |
3818 | wire spare2_inv_8x_unused; | |
3819 | wire spare2_aoi22_4x_unused; | |
3820 | wire spare2_buf_8x_unused; | |
3821 | wire spare2_oai22_4x_unused; | |
3822 | wire spare2_inv_16x_unused; | |
3823 | wire spare2_nand2_16x_unused; | |
3824 | wire spare2_nor3_4x_unused; | |
3825 | wire spare2_nand2_8x_unused; | |
3826 | wire spare2_buf_16x_unused; | |
3827 | wire spare2_nor2_16x_unused; | |
3828 | wire spare2_inv_32x_unused; | |
3829 | wire si_3; | |
3830 | wire so_3; | |
3831 | wire spare3_flop_unused; | |
3832 | wire spare3_buf_32x_unused; | |
3833 | wire spare3_nand3_8x_unused; | |
3834 | wire spare3_inv_8x_unused; | |
3835 | wire spare3_aoi22_4x_unused; | |
3836 | wire spare3_buf_8x_unused; | |
3837 | wire spare3_oai22_4x_unused; | |
3838 | wire spare3_inv_16x_unused; | |
3839 | wire spare3_nand2_16x_unused; | |
3840 | wire spare3_nor3_4x_unused; | |
3841 | wire spare3_nand2_8x_unused; | |
3842 | wire spare3_buf_16x_unused; | |
3843 | wire spare3_nor2_16x_unused; | |
3844 | wire spare3_inv_32x_unused; | |
3845 | wire si_4; | |
3846 | wire so_4; | |
3847 | wire spare4_flop_unused; | |
3848 | wire spare4_buf_32x_unused; | |
3849 | wire spare4_nand3_8x_unused; | |
3850 | wire spare4_inv_8x_unused; | |
3851 | wire spare4_aoi22_4x_unused; | |
3852 | wire spare4_buf_8x_unused; | |
3853 | wire spare4_oai22_4x_unused; | |
3854 | wire spare4_inv_16x_unused; | |
3855 | wire spare4_nand2_16x_unused; | |
3856 | wire spare4_nor3_4x_unused; | |
3857 | wire spare4_nand2_8x_unused; | |
3858 | wire spare4_buf_16x_unused; | |
3859 | wire spare4_nor2_16x_unused; | |
3860 | wire spare4_inv_32x_unused; | |
3861 | ||
3862 | ||
3863 | input l1clk; | |
3864 | input scan_in; | |
3865 | input siclk; | |
3866 | input soclk; | |
3867 | output scan_out; | |
3868 | ||
3869 | cl_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)); | |
3876 | assign si_0 = scan_in; | |
3877 | ||
3878 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
3879 | .out(spare0_buf_32x_unused)); | |
3880 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
3881 | .in1(1'b1), | |
3882 | .in2(1'b1), | |
3883 | .out(spare0_nand3_8x_unused)); | |
3884 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
3885 | .out(spare0_inv_8x_unused)); | |
3886 | cl_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)); | |
3891 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
3892 | .out(spare0_buf_8x_unused)); | |
3893 | cl_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)); | |
3898 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
3899 | .out(spare0_inv_16x_unused)); | |
3900 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
3901 | .in1(1'b1), | |
3902 | .out(spare0_nand2_16x_unused)); | |
3903 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
3904 | .in1(1'b0), | |
3905 | .in2(1'b0), | |
3906 | .out(spare0_nor3_4x_unused)); | |
3907 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
3908 | .in1(1'b1), | |
3909 | .out(spare0_nand2_8x_unused)); | |
3910 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
3911 | .out(spare0_buf_16x_unused)); | |
3912 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
3913 | .in1(1'b0), | |
3914 | .out(spare0_nor2_16x_unused)); | |
3915 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
3916 | .out(spare0_inv_32x_unused)); | |
3917 | ||
3918 | cl_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)); | |
3925 | assign si_1 = so_0; | |
3926 | ||
3927 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
3928 | .out(spare1_buf_32x_unused)); | |
3929 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
3930 | .in1(1'b1), | |
3931 | .in2(1'b1), | |
3932 | .out(spare1_nand3_8x_unused)); | |
3933 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
3934 | .out(spare1_inv_8x_unused)); | |
3935 | cl_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)); | |
3940 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
3941 | .out(spare1_buf_8x_unused)); | |
3942 | cl_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)); | |
3947 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
3948 | .out(spare1_inv_16x_unused)); | |
3949 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
3950 | .in1(1'b1), | |
3951 | .out(spare1_nand2_16x_unused)); | |
3952 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
3953 | .in1(1'b0), | |
3954 | .in2(1'b0), | |
3955 | .out(spare1_nor3_4x_unused)); | |
3956 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
3957 | .in1(1'b1), | |
3958 | .out(spare1_nand2_8x_unused)); | |
3959 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
3960 | .out(spare1_buf_16x_unused)); | |
3961 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
3962 | .in1(1'b0), | |
3963 | .out(spare1_nor2_16x_unused)); | |
3964 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
3965 | .out(spare1_inv_32x_unused)); | |
3966 | ||
3967 | cl_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)); | |
3974 | assign si_2 = so_1; | |
3975 | ||
3976 | cl_u1_buf_32x spare2_buf_32x (.in(1'b1), | |
3977 | .out(spare2_buf_32x_unused)); | |
3978 | cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1), | |
3979 | .in1(1'b1), | |
3980 | .in2(1'b1), | |
3981 | .out(spare2_nand3_8x_unused)); | |
3982 | cl_u1_inv_8x spare2_inv_8x (.in(1'b1), | |
3983 | .out(spare2_inv_8x_unused)); | |
3984 | cl_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)); | |
3989 | cl_u1_buf_8x spare2_buf_8x (.in(1'b1), | |
3990 | .out(spare2_buf_8x_unused)); | |
3991 | cl_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)); | |
3996 | cl_u1_inv_16x spare2_inv_16x (.in(1'b1), | |
3997 | .out(spare2_inv_16x_unused)); | |
3998 | cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1), | |
3999 | .in1(1'b1), | |
4000 | .out(spare2_nand2_16x_unused)); | |
4001 | cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0), | |
4002 | .in1(1'b0), | |
4003 | .in2(1'b0), | |
4004 | .out(spare2_nor3_4x_unused)); | |
4005 | cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1), | |
4006 | .in1(1'b1), | |
4007 | .out(spare2_nand2_8x_unused)); | |
4008 | cl_u1_buf_16x spare2_buf_16x (.in(1'b1), | |
4009 | .out(spare2_buf_16x_unused)); | |
4010 | cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0), | |
4011 | .in1(1'b0), | |
4012 | .out(spare2_nor2_16x_unused)); | |
4013 | cl_u1_inv_32x spare2_inv_32x (.in(1'b1), | |
4014 | .out(spare2_inv_32x_unused)); | |
4015 | ||
4016 | cl_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)); | |
4023 | assign si_3 = so_2; | |
4024 | ||
4025 | cl_u1_buf_32x spare3_buf_32x (.in(1'b1), | |
4026 | .out(spare3_buf_32x_unused)); | |
4027 | cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1), | |
4028 | .in1(1'b1), | |
4029 | .in2(1'b1), | |
4030 | .out(spare3_nand3_8x_unused)); | |
4031 | cl_u1_inv_8x spare3_inv_8x (.in(1'b1), | |
4032 | .out(spare3_inv_8x_unused)); | |
4033 | cl_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)); | |
4038 | cl_u1_buf_8x spare3_buf_8x (.in(1'b1), | |
4039 | .out(spare3_buf_8x_unused)); | |
4040 | cl_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)); | |
4045 | cl_u1_inv_16x spare3_inv_16x (.in(1'b1), | |
4046 | .out(spare3_inv_16x_unused)); | |
4047 | cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1), | |
4048 | .in1(1'b1), | |
4049 | .out(spare3_nand2_16x_unused)); | |
4050 | cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0), | |
4051 | .in1(1'b0), | |
4052 | .in2(1'b0), | |
4053 | .out(spare3_nor3_4x_unused)); | |
4054 | cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1), | |
4055 | .in1(1'b1), | |
4056 | .out(spare3_nand2_8x_unused)); | |
4057 | cl_u1_buf_16x spare3_buf_16x (.in(1'b1), | |
4058 | .out(spare3_buf_16x_unused)); | |
4059 | cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0), | |
4060 | .in1(1'b0), | |
4061 | .out(spare3_nor2_16x_unused)); | |
4062 | cl_u1_inv_32x spare3_inv_32x (.in(1'b1), | |
4063 | .out(spare3_inv_32x_unused)); | |
4064 | ||
4065 | cl_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)); | |
4072 | assign si_4 = so_3; | |
4073 | ||
4074 | cl_u1_buf_32x spare4_buf_32x (.in(1'b1), | |
4075 | .out(spare4_buf_32x_unused)); | |
4076 | cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1), | |
4077 | .in1(1'b1), | |
4078 | .in2(1'b1), | |
4079 | .out(spare4_nand3_8x_unused)); | |
4080 | cl_u1_inv_8x spare4_inv_8x (.in(1'b1), | |
4081 | .out(spare4_inv_8x_unused)); | |
4082 | cl_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)); | |
4087 | cl_u1_buf_8x spare4_buf_8x (.in(1'b1), | |
4088 | .out(spare4_buf_8x_unused)); | |
4089 | cl_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)); | |
4094 | cl_u1_inv_16x spare4_inv_16x (.in(1'b1), | |
4095 | .out(spare4_inv_16x_unused)); | |
4096 | cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1), | |
4097 | .in1(1'b1), | |
4098 | .out(spare4_nand2_16x_unused)); | |
4099 | cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0), | |
4100 | .in1(1'b0), | |
4101 | .in2(1'b0), | |
4102 | .out(spare4_nor3_4x_unused)); | |
4103 | cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1), | |
4104 | .in1(1'b1), | |
4105 | .out(spare4_nand2_8x_unused)); | |
4106 | cl_u1_buf_16x spare4_buf_16x (.in(1'b1), | |
4107 | .out(spare4_buf_16x_unused)); | |
4108 | cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0), | |
4109 | .in1(1'b0), | |
4110 | .out(spare4_nor2_16x_unused)); | |
4111 | cl_u1_inv_32x spare4_inv_32x (.in(1'b1), | |
4112 | .out(spare4_inv_32x_unused)); | |
4113 | assign scan_out = so_4; | |
4114 | ||
4115 | ||
4116 | ||
4117 | endmodule | |
4118 |