Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: lsu_dcc_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 lsu_dcc_ctl ( | |
36 | dec_lsu_tg_d, | |
37 | dec_ld_inst_d, | |
38 | dec_ld_inst_e, | |
39 | dec_st_inst_e, | |
40 | dec_fpldst_inst_e, | |
41 | dec_fsr_ldst_e, | |
42 | dec_ldst_dbl_e, | |
43 | dec_pref_inst_e, | |
44 | dec_flush_inst_e, | |
45 | dec_memstbar_inst_e, | |
46 | dec_sr_inst_e, | |
47 | dec_pr_inst_e, | |
48 | dec_hpr_inst_e, | |
49 | dec_casa_inst_e, | |
50 | dec_ldstub_inst_e, | |
51 | dec_swap_inst_e, | |
52 | dec_altspace_d, | |
53 | dec_sign_ext_e, | |
54 | dec_ldst_sz_e, | |
55 | dec_lsu_rd_e, | |
56 | dec_sraddr_e, | |
57 | dec_imm_asi_vld_d, | |
58 | dec_imm_asi_d, | |
59 | dec_flush_lm, | |
60 | dec_flush_lb, | |
61 | dec_lsu_tid0_d, | |
62 | dec_lsu_tid1_d, | |
63 | tlu_pstate_cle, | |
64 | tlu_asi_0_tid, | |
65 | tlu_asi_1_tid, | |
66 | tlu_asi_0_valid, | |
67 | tlu_asi_1_valid, | |
68 | tlu_flush_lsu_b, | |
69 | tlu_lsu_hpstate_hpriv, | |
70 | tlu_lsu_pstate_priv, | |
71 | tlu_tl_gt_0, | |
72 | tlu_lsu_clear_ctl_reg_, | |
73 | tlu_cerer_dttp, | |
74 | tlu_cerer_dttm, | |
75 | tlu_cerer_dtdp, | |
76 | tlu_cerer_dcvp, | |
77 | tlu_cerer_dctp, | |
78 | tlu_cerer_dctm, | |
79 | tlu_cerer_dcdp, | |
80 | tlc_use_primary_context_c0, | |
81 | tlc_use_secondary_context_c0, | |
82 | tld_tid, | |
83 | tlc_wr_or_demap, | |
84 | tld_va_m_eq_zero, | |
85 | exu_lsu_va_error_m, | |
86 | exu_ecc_m, | |
87 | exu_lsu_rs2_e, | |
88 | fgu_fst_ecc_error_fx2, | |
89 | lmd_sz_m, | |
90 | lmd_fpld_m, | |
91 | lmd_sxt_fsr_m, | |
92 | lmd_rd_m, | |
93 | lmd_fpodd32b_m, | |
94 | lmd_fp32b_m, | |
95 | lmd_bendian_m, | |
96 | lmd_fill_addr_e, | |
97 | lmd_ld_addr_m, | |
98 | lmd_fill_way_e, | |
99 | lmd_wrtag_parity_e, | |
100 | lmc_cpq_tid_m, | |
101 | lmc_thrd_byp_sel_e, | |
102 | lmc_byp_tid_m, | |
103 | lmc_byp_vld_m, | |
104 | lmc_asi_bypass_m, | |
105 | lmc_pref_issued, | |
106 | lmc_bld_annul, | |
107 | lmc_bld_last_e, | |
108 | lmc_bld_miss_e, | |
109 | lmc_full_raw_w, | |
110 | lmc_ld_stall, | |
111 | lmc_l2_err_noup, | |
112 | lmc_l2_uerr, | |
113 | tlb_tte_ie_b, | |
114 | tlb_tte_cp_b, | |
115 | tlb_tte_wbit_b, | |
116 | tlb_tte_ebit_b, | |
117 | tlb_tte_pbit_b, | |
118 | tlb_tte_nfo_b, | |
119 | tlb_cache_way_hit_b, | |
120 | tlb_cache_hit_b, | |
121 | tlb_pgnum_b39, | |
122 | tlb_cam_hit, | |
123 | tlb_cam_mhit, | |
124 | tlb_pgsize, | |
125 | tlb_context0_hit, | |
126 | tlb_tag_parity, | |
127 | tlb_tte_data_parity, | |
128 | dcs_asi_d, | |
129 | dcs_wpt_mask_m, | |
130 | dcs_wpt_enable_m, | |
131 | dcs_wpt_mode_m, | |
132 | dcs_dc_enable, | |
133 | dcs_dmmu_enable_d, | |
134 | lsu_va_m, | |
135 | lsu_va_b, | |
136 | cic_l2fill_vld_e, | |
137 | cic_cpq_ld_sel, | |
138 | cic_invalidate_e, | |
139 | cic_xinval_e, | |
140 | cic_st_update_e, | |
141 | cic_rtn_cmplt, | |
142 | cic_oddrd_e, | |
143 | cic_inv_wen_e, | |
144 | cic_cpq_stall, | |
145 | cid_tid, | |
146 | cid_xway, | |
147 | cid_st_addr, | |
148 | cid_st_way, | |
149 | cid_st_bmask, | |
150 | cid_inv_index, | |
151 | cid_ncache, | |
152 | cid_atomic, | |
153 | cid_l2miss, | |
154 | stb_cam_hit, | |
155 | sbc_bst_in_prog_m, | |
156 | sbc_tid_m, | |
157 | lsu_block_store_alloc, | |
158 | lsu_block_store_kill, | |
159 | sbd_st_data_b, | |
160 | tgd_w0_parity_b, | |
161 | tgd_w1_parity_b, | |
162 | tgd_w2_parity_b, | |
163 | tgd_w3_parity_b, | |
164 | tgd_va_wp_47_16, | |
165 | tgd_va_wp_15_3, | |
166 | tgd_pa_wp_39_16, | |
167 | tgd_pa_wp_15_3, | |
168 | tgd_prty_256m_b, | |
169 | tgd_prty_4m_b, | |
170 | tgd_prty_64k_b, | |
171 | tgd_prty_8k_b, | |
172 | tgd_prty_ctxt0_b, | |
173 | tgd_prty_ctxt1_b, | |
174 | tgc_cache_way_vld_m, | |
175 | tgc_verr_b, | |
176 | dca_perr_w0_b, | |
177 | dca_perr_w1_b, | |
178 | dca_perr_w2_b, | |
179 | dca_perr_w3_b, | |
180 | dca_rparity_b, | |
181 | lru_rdata_m, | |
182 | ifu_lsu_if_vld, | |
183 | ifu_lsu_if_tid, | |
184 | ifu_lsu_if_addr, | |
185 | arc_pid_ctl_2f, | |
186 | dcd_dca_data_compare, | |
187 | lbist_run, | |
188 | mbi_addr, | |
189 | mbi_wdata, | |
190 | mbi_run, | |
191 | mbi_dca_read_en, | |
192 | mbi_dca_write_en, | |
193 | mbi_cmpsel, | |
194 | mbi_dta_read_en, | |
195 | mbi_dta_write_en, | |
196 | mbi_dva_read_en, | |
197 | mbi_dva_write_en, | |
198 | mbi_lru_read_en, | |
199 | mbi_lru_write_en, | |
200 | mbi_dtb_read_en, | |
201 | mbi_dtb_cam_en_pre, | |
202 | mbi_scm_cam_en_pre, | |
203 | dmo_dcmuxctl, | |
204 | bist_cmp_data, | |
205 | bist_cmpsel_1, | |
206 | bist_addr_1, | |
207 | bist_srm_rd_1, | |
208 | bist_scm_rd_1, | |
209 | lsu_trap_flush, | |
210 | dcc_exception_flush_b, | |
211 | dcc_asi_load_m, | |
212 | dcc_asi_load_b, | |
213 | dcc_asi_store_b, | |
214 | dcc_asi_iomap_m, | |
215 | dcc_asi_iomap_b, | |
216 | dcc_asi_rngf_b, | |
217 | dcc_asi_indet_b, | |
218 | dcc_binit_st_b, | |
219 | dcc_dca_rvld_e, | |
220 | dcc_dca_wvld_e, | |
221 | dcc_dca_clk_en_e, | |
222 | dcc_dca_wclk_en_e, | |
223 | dcc_dca_rclk_en_m, | |
224 | dcc_dca_bypass_e_, | |
225 | dcc_dca_fill_way_e, | |
226 | dcc_dca_fill_addr_e, | |
227 | dcc_dca_byte_wr_en_e, | |
228 | dcc_parity_invert, | |
229 | dcc_dta_parity, | |
230 | dcc_alt_addr_sel_e, | |
231 | dcc_alt_way_sel_m, | |
232 | dcc_alt_rsel_way_m, | |
233 | dcc_dta_fill_addr_e, | |
234 | dcc_dta_fill_way_e, | |
235 | dcc_dta_wvld_e, | |
236 | dcc_dta_rvld_e, | |
237 | dcc_dta_index1_sel_e, | |
238 | dcc_dta_clken, | |
239 | dcc_dva_wvld_e, | |
240 | dcc_dva_rvld_e, | |
241 | dcc_dva_din_e, | |
242 | dcc_dva_din2_e, | |
243 | dcc_dva_wr_addr_e, | |
244 | dcc_dva_bit_wen_e, | |
245 | dcc_cache_diag_wr_m, | |
246 | dcc_cache_diag_wr_b, | |
247 | dcc_lru_rvld_e, | |
248 | dcc_lru_wvld_w, | |
249 | dcc_lru_wdata_w, | |
250 | dcc_lru_wen_w, | |
251 | dcc_lru_wr_addr_w, | |
252 | dcc_ldst_bmask, | |
253 | dcc_bmask_parity_b, | |
254 | dcc_ld_miss_b, | |
255 | dcc_early_ld_b, | |
256 | dcc_stb_quad_ld_cam, | |
257 | dcc_l2fill_vld_m, | |
258 | dcc_ctxt_tid0_d, | |
259 | dcc_ctxt_tid1_d, | |
260 | dcc_ctxt_tg_d, | |
261 | dcc_tid_e, | |
262 | dcc_tid_m, | |
263 | dcc_tid_b, | |
264 | dcc_asi_m, | |
265 | dcc_ld_inst_unqual_e, | |
266 | dcc_ld_inst_vld_m, | |
267 | dcc_stb_cam_vld_m, | |
268 | dcc_baddr_m, | |
269 | dcc_signed_m, | |
270 | dcc_pref_inst_m, | |
271 | dcc_std_inst_m, | |
272 | dcc_ldstub_inst_m, | |
273 | dcc_atomic_b, | |
274 | dcc_casa_inst_b, | |
275 | dcc_lendian_pre_m, | |
276 | dcc_bendian_byp_m, | |
277 | dcc_pst_asi_b, | |
278 | dcc_tte_vld_m, | |
279 | dcc_ldst_sz_m, | |
280 | dcc_ld_sz_m, | |
281 | dcc_fp32b_sel_m, | |
282 | dcc_blk_inst_m, | |
283 | dcc_blk_inst_b, | |
284 | dcc_ldbl_b, | |
285 | dcc_ncache_b, | |
286 | dcc_st_rq_type_w, | |
287 | dcc_sync_pipe_w, | |
288 | dcc_priv_b, | |
289 | dcc_hpriv_b, | |
290 | dcc_pctxt_sel_e, | |
291 | dcc_sctxt_sel_e, | |
292 | dcc_ld_miss_ldd, | |
293 | dcc_ld_miss_ctl, | |
294 | dcc_sync_inst_w, | |
295 | dcc_asi_reload_sel, | |
296 | dcc_wr_wtchpt, | |
297 | dcc_wr_lsu_ctl_reg, | |
298 | dcc_wr_pwr_mgmt, | |
299 | dcc_ceter_wr_w, | |
300 | dcc_p0ctxt_rd_m, | |
301 | dcc_p1ctxt_rd_m, | |
302 | dcc_s0ctxt_rd_m, | |
303 | dcc_s1ctxt_rd_m, | |
304 | dcc_pid_rd_m, | |
305 | dcc_wtchpt_sel_m, | |
306 | dcc_demap_asi_m, | |
307 | dcc_wtchpt_rd_b, | |
308 | dcc_rd_lsu_ctl_reg_b, | |
309 | dcc_rd_diag_reg_b, | |
310 | dcc_rd_diag_dca_b, | |
311 | dcc_rd_core_id_b, | |
312 | dcc_rd_intr_id_b, | |
313 | dcc_rd_dt_diag_m, | |
314 | dcc_rd_dt_diag_b, | |
315 | dcc_stb_diag_rd_m, | |
316 | dcc_rd_error_inj_b, | |
317 | dcc_rd_pwr_mgmt_b, | |
318 | dcc_wr_error_inj_m, | |
319 | dcc_wr_error_inj_w, | |
320 | dcc_tlb_data_read_b, | |
321 | dcc_tlb_tag0_read_b, | |
322 | dcc_tlb_tag1_read_b, | |
323 | dcc_tlb_rw_index_e, | |
324 | dcc_rd_rhs_asi_b, | |
325 | dcc_lsu_asi_rd_b, | |
326 | dcc_lsu_asi_sel_w, | |
327 | dcc_stb_diag_sel_w3, | |
328 | dcc_stb_data_rd_w3, | |
329 | dcc_stb_ecc_rd_w3, | |
330 | dcc_stb_ctl_rd_w3, | |
331 | dcc_stb_addr_sel_w3, | |
332 | dcc_stb_ptr_rd_w3, | |
333 | dcc_direct_map, | |
334 | dcc_dcs_memref_e, | |
335 | dcc_tlb_lookup, | |
336 | dcc_tlb_bypass, | |
337 | dcc_tlb_real, | |
338 | dcc_tlb_rd_e, | |
339 | dcc_perror_b, | |
340 | dcc_perr_enc_b, | |
341 | dcc_dmo_parity, | |
342 | lsu_va_w, | |
343 | dcc_sbd_e_clken, | |
344 | dcc_sbd_m_clken, | |
345 | dcc_ldst_m_clken, | |
346 | dcc_asi_rtn_vld, | |
347 | dcc_asi_rtn_excp, | |
348 | dcc_asi_rtn_rd, | |
349 | lsu_exu_ld_vld_w, | |
350 | lsu_exu_ld_b, | |
351 | lsu_exu_tid_m, | |
352 | lsu_exu_rd_m, | |
353 | lsu_fgu_fld_vld_w, | |
354 | lsu_fgu_fld_b, | |
355 | lsu_fgu_fld_32b_b, | |
356 | lsu_fgu_fld_odd32b_b, | |
357 | lsu_fgu_fsr_load_b, | |
358 | lsu_fgu_fld_tid_b, | |
359 | lsu_fgu_fld_addr_b, | |
360 | lsu_fgu_exception_w, | |
361 | lsu_sync, | |
362 | lsu_complete, | |
363 | lsu_cpq_stall, | |
364 | lsu_tlu_twocycle_m, | |
365 | lsu_tlb_bypass_b, | |
366 | lsu_tlb_real_b, | |
367 | lsu_align_b, | |
368 | lsu_lddf_align_b, | |
369 | lsu_stdf_align_b, | |
370 | lsu_dae_invalid_asi_b, | |
371 | lsu_dae_nc_page_b, | |
372 | lsu_dae_nfo_page_b, | |
373 | lsu_dae_priv_viol_b, | |
374 | lsu_dae_so_page, | |
375 | lsu_priv_action_b, | |
376 | lsu_va_watchpoint_b, | |
377 | lsu_pa_watchpoint_b, | |
378 | lsu_illegal_inst_b, | |
379 | lsu_daccess_prot_b, | |
380 | lsu_tlb_miss_b_, | |
381 | lsu_perfmon_trap_b, | |
382 | lsu_perfmon_trap_g, | |
383 | lsu_tlu_dsfsr_ct_b, | |
384 | lsu_sync_inst_b, | |
385 | lsu_dttp_err_b, | |
386 | lsu_dtdp_err_b, | |
387 | lsu_dtmh_err_b, | |
388 | lsu_ifu_direct_map, | |
389 | dcc_mbi_run, | |
390 | lsu_mbi_dca_fail, | |
391 | lsu_mbi_lru_fail, | |
392 | pmu_lsu_dcmiss_trap_m, | |
393 | pmu_lsu_dtmiss_trap_m, | |
394 | pmu_lsu_l2dmiss_trap_m, | |
395 | lsu_pmu_mem_type_b, | |
396 | lsu_dc_pmen, | |
397 | lsu_lsu_pmen, | |
398 | lsu_lsu_pmen_, | |
399 | l2clk, | |
400 | scan_in, | |
401 | tcu_pce_ov, | |
402 | tcu_scan_en, | |
403 | spc_aclk, | |
404 | spc_bclk, | |
405 | scan_out); | |
406 | wire se; | |
407 | wire pce_ov; | |
408 | wire stop; | |
409 | wire siclk; | |
410 | wire soclk; | |
411 | wire dcc_pm_clken; | |
412 | wire l1clk_pm1; | |
413 | wire ifu_indx_clken; | |
414 | wire l1clk_pm2; | |
415 | wire l1clk; | |
416 | wire dff_cerer_scanin; | |
417 | wire dff_cerer_scanout; | |
418 | wire cerer_dttp; | |
419 | wire cerer_dttm; | |
420 | wire cerer_dtdp; | |
421 | wire cerer_dcvp; | |
422 | wire cerer_dctp; | |
423 | wire cerer_dctm; | |
424 | wire cerer_dcdp; | |
425 | wire exu_error_m; | |
426 | wire [2:0] tid_m; | |
427 | wire tlb_bypass_m; | |
428 | wire exu_error_qual_m; | |
429 | wire ld_inst_vld_m; | |
430 | wire st_inst_vld_m; | |
431 | wire flush_inst_m; | |
432 | wire mb_inst_m; | |
433 | wire exu_va_oor_m; | |
434 | wire dff_flush_b_scanin; | |
435 | wire dff_flush_b_scanout; | |
436 | wire pipe_flush_b; | |
437 | wire exu_error_pre_b; | |
438 | wire exu_va_oor_b; | |
439 | wire exu_error_b; | |
440 | wire [2:0] tid_b; | |
441 | wire twocycle_b; | |
442 | wire fgu_error_b; | |
443 | wire st_inst_vld_b; | |
444 | wire fpldst_inst_vld_b; | |
445 | wire dcc_any_exception_b; | |
446 | wire flush_b; | |
447 | wire flush_all_b; | |
448 | wire dff_flush_w_scanin; | |
449 | wire dff_flush_w_scanout; | |
450 | wire flush_w; | |
451 | wire dff_asi_d_scanin; | |
452 | wire dff_asi_d_scanout; | |
453 | wire [7:0] asi_d; | |
454 | wire dcc_imm_asi_vld_e; | |
455 | wire [7:0] dcc_asi_e; | |
456 | wire altspace_e; | |
457 | wire dmmu_enable_e; | |
458 | wire ld_inst_unqual_e; | |
459 | wire [7:0] asx_e; | |
460 | wire asi_use_rd_e; | |
461 | wire asi_use_sr_e; | |
462 | wire mbi_run_local; | |
463 | wire bist_cam_en; | |
464 | wire asi_internal_e; | |
465 | wire pref_inst_qual_e; | |
466 | wire dff_dec_inst1_m_scanin; | |
467 | wire dff_dec_inst1_m_scanout; | |
468 | wire fpldst_inst_vld_m; | |
469 | wire pref_inst_m; | |
470 | wire casa_inst_pre_m; | |
471 | wire ldstub_inst_pre_m; | |
472 | wire swap_inst_pre_m; | |
473 | wire ldst_dbl_m; | |
474 | wire sr_inst_m; | |
475 | wire pr_inst_m; | |
476 | wire hpr_inst_m; | |
477 | wire fsr_ldst_m; | |
478 | wire imm_asi_vld_m; | |
479 | wire casa_inst_m; | |
480 | wire swap_inst_m; | |
481 | wire ldstub_inst_m; | |
482 | wire dff_sync_inst_scanin; | |
483 | wire dff_sync_inst_scanout; | |
484 | wire sync_inst_m; | |
485 | wire sync_inst_pre_b; | |
486 | wire mbi_scm_cam_en; | |
487 | wire atomic_m; | |
488 | wire asi_internal_m; | |
489 | wire blk_inst_m; | |
490 | wire [1:0] ldst_sz_mod_m; | |
491 | wire asi_iomap_m; | |
492 | wire asi_sync_m; | |
493 | wire dff_dec_ctl_m_scanin; | |
494 | wire dff_dec_ctl_m_scanout; | |
495 | wire [1:0] ldst_sz_m; | |
496 | wire [4:0] ld_rd_inst_m; | |
497 | wire sign_ext_m; | |
498 | wire asi_sz_byte_m; | |
499 | wire asi_sz_hw_m; | |
500 | wire asi_legal_m; | |
501 | wire sxt_fsr_m; | |
502 | wire [4:0] ld_rd_m; | |
503 | wire [1:0] asi_type_m; | |
504 | wire dff_dec_inst_b_scanin; | |
505 | wire dff_dec_inst_b_scanout; | |
506 | wire ld_inst_vld_b; | |
507 | wire pref_inst_b; | |
508 | wire casa_inst_b; | |
509 | wire ldst_dbl_b; | |
510 | wire atomic_b; | |
511 | wire [1:0] asi_type_b; | |
512 | wire sync_inst_b; | |
513 | wire pst_asi_b; | |
514 | wire tlb_tte_vld_b; | |
515 | wire dff_dec_ctl_b_scanin; | |
516 | wire dff_dec_ctl_b_scanout; | |
517 | wire [1:0] ldst_sz_b; | |
518 | wire [4:0] ld_rd_b; | |
519 | wire ldst_sz_b0_b; | |
520 | wire quad_asi_b; | |
521 | wire [2:0] tid_d; | |
522 | wire thread0_d; | |
523 | wire thread1_d; | |
524 | wire thread2_d; | |
525 | wire thread3_d; | |
526 | wire thread4_d; | |
527 | wire thread5_d; | |
528 | wire thread6_d; | |
529 | wire thread7_d; | |
530 | wire dff_tid_e_scanin; | |
531 | wire dff_tid_e_scanout; | |
532 | wire [2:0] tid_e; | |
533 | wire thread0_e; | |
534 | wire thread1_e; | |
535 | wire thread2_e; | |
536 | wire thread3_e; | |
537 | wire thread4_e; | |
538 | wire thread5_e; | |
539 | wire thread6_e; | |
540 | wire thread7_e; | |
541 | wire dff_tid_m_scanin; | |
542 | wire dff_tid_m_scanout; | |
543 | wire dff_tid_b_scanin; | |
544 | wire dff_tid_b_scanout; | |
545 | wire thread0_b; | |
546 | wire thread1_b; | |
547 | wire thread2_b; | |
548 | wire thread3_b; | |
549 | wire thread4_b; | |
550 | wire thread5_b; | |
551 | wire thread6_b; | |
552 | wire thread7_b; | |
553 | wire dff_tid_w_scanin; | |
554 | wire dff_tid_w_scanout; | |
555 | wire [2:0] tid_w; | |
556 | wire [7:0] thread_w; | |
557 | wire fpld_32b_m; | |
558 | wire fpld_odd32b_m; | |
559 | wire altspace_ldst_e; | |
560 | wire dff_altspace_m_scanin; | |
561 | wire dff_altspace_m_scanout; | |
562 | wire altspace_ldst_m; | |
563 | wire dff_altspace_b_scanin; | |
564 | wire dff_altspace_b_scanout; | |
565 | wire altspace_ldst_b; | |
566 | wire fpld_inst_m; | |
567 | wire dff_fpld_b_scanin; | |
568 | wire dff_fpld_b_scanout; | |
569 | wire fpld_inst_b; | |
570 | wire blk_asi_m; | |
571 | wire blk_asi_b; | |
572 | wire dff_oddrd_scanin; | |
573 | wire dff_oddrd_scanout; | |
574 | wire oddrd_m; | |
575 | wire dff_rs2_m_scanin; | |
576 | wire dff_rs2_m_scanout; | |
577 | wire [7:0] rs2_m; | |
578 | wire ldst_byte; | |
579 | wire bad_fp_asi; | |
580 | wire ldst_hword; | |
581 | wire ldst_word; | |
582 | wire ldst_dword; | |
583 | wire [7:0] ldst_bmask; | |
584 | wire [7:0] pst_bmask; | |
585 | wire asi_pst32_m; | |
586 | wire asi_pst16_m; | |
587 | wire asi_pst8_m; | |
588 | wire [7:0] lend_pst_bmask; | |
589 | wire [7:0] ldst_bmask_mod; | |
590 | wire asi_store_m; | |
591 | wire pst_asi_m; | |
592 | wire lendian_asi_m; | |
593 | wire st_bmask_parity_m; | |
594 | wire dff_sba_par_scanin; | |
595 | wire dff_sba_par_scanout; | |
596 | wire l1_ld_miss_b; | |
597 | wire dcache_enable_b; | |
598 | wire ncache_rq_b; | |
599 | wire early_ld_m; | |
600 | wire dcache_enable_m; | |
601 | wire dff_early_ld_scanin; | |
602 | wire dff_early_ld_scanout; | |
603 | wire sync_pipe; | |
604 | wire asi_dcd_diag_rd_b; | |
605 | wire asi_sync_b; | |
606 | wire dff_sync_pipe_scanin; | |
607 | wire dff_sync_pipe_scanout; | |
608 | wire [7:0] sync_st_in; | |
609 | wire st_inst_vld_w; | |
610 | wire [7:0] sync_st; | |
611 | wire dff_sync_st_scanin; | |
612 | wire dff_sync_st_scanout; | |
613 | wire stb_diag_rd_e; | |
614 | wire asi_cache_diag_wr_m; | |
615 | wire dcache_enable_e; | |
616 | wire dcache_read_e; | |
617 | wire asi_dca_diag_rd_e; | |
618 | wire asi_dta_diag_rd_e; | |
619 | wire dcache_nodiag_read_e; | |
620 | wire dc_enable_scanin; | |
621 | wire dc_enable_scanout; | |
622 | wire dcache_read_m; | |
623 | wire dcache_nodiag_read_m; | |
624 | wire dcache_read_b; | |
625 | wire dcc_dca_rvld_m; | |
626 | wire ld_fill_e; | |
627 | wire dca_diag_wr_e; | |
628 | wire l2fill_vld_m; | |
629 | wire asi_dca_diag_rd_m; | |
630 | wire dta_diag_wr_e; | |
631 | wire diag_write_e; | |
632 | wire [20:3] va_w; | |
633 | wire [10:4] xinv_index; | |
634 | wire [1:0] st_data_w; | |
635 | wire [15:0] fill_bit_wen_e; | |
636 | wire [15:0] xinval_bit_wen_e; | |
637 | wire l2fill_vld_e; | |
638 | wire dff_l2fill_m_scanin; | |
639 | wire dff_l2fill_m_scanout; | |
640 | wire int_fill_or_byp_m; | |
641 | wire l2_perfmon_wb_cancel_m; | |
642 | wire fp_fill_or_byp_m; | |
643 | wire exu_ld_m; | |
644 | wire fgu_fld_m; | |
645 | wire dff_l2fill_b_scanin; | |
646 | wire dff_l2fill_b_scanout; | |
647 | wire int_fill_or_byp_b; | |
648 | wire fp_fill_or_byp_b; | |
649 | wire fld_32b_m; | |
650 | wire fld_odd32b_m; | |
651 | wire fld_sxt_fsr_m; | |
652 | wire [4:0] return_rd_m; | |
653 | wire [2:0] ld_tid_m; | |
654 | wire dff_ld_tid_b_scanin; | |
655 | wire dff_ld_tid_b_scanout; | |
656 | wire [2:0] ld_tid_b; | |
657 | wire dff_fp32_b_scanin; | |
658 | wire dff_fp32_b_scanout; | |
659 | wire fld_32b_b; | |
660 | wire fld_odd32b_b; | |
661 | wire fld_sxt_fsr_b; | |
662 | wire [4:0] return_rd_b; | |
663 | wire fsr_load_unqual_b; | |
664 | wire ld_inst_qual_b; | |
665 | wire exu_ld_vld_b; | |
666 | wire fgu_fld_vld_b; | |
667 | wire dff_ld_vld_w_scanin; | |
668 | wire dff_ld_vld_w_scanout; | |
669 | wire exu_ld_vld_w; | |
670 | wire fgu_fld_vld_w; | |
671 | wire ld_inst_vld_w; | |
672 | wire pstate_cle_d; | |
673 | wire pstate_cle_m; | |
674 | wire dff_le_bits_scanin; | |
675 | wire dff_le_bits_scanout; | |
676 | wire pstate_cle_e; | |
677 | wire pstate_cle_b; | |
678 | wire l1hit_lendian_b; | |
679 | wire asi_internal_b; | |
680 | wire lendian_asi_b; | |
681 | wire [2:0] byp_baddr_m; | |
682 | wire asi_legal_e_unqual; | |
683 | wire tl_gt_0_d; | |
684 | wire [7:0] tl_gt_0; | |
685 | wire dff_tl_gt_0_scanin; | |
686 | wire dff_tl_gt_0_scanout; | |
687 | wire tl_gt_0_e; | |
688 | wire tl_gt_0_m; | |
689 | wire dff_tlc_scanin; | |
690 | wire dff_tlc_scanout; | |
691 | wire tlc_use_primary_context_c1; | |
692 | wire tlc_use_secondary_context_c1; | |
693 | wire wr_or_demap; | |
694 | wire tlc_use_primary_context_c2; | |
695 | wire tlc_use_secondary_context_c2; | |
696 | wire tlc_use_secondary_context; | |
697 | wire tlc_use_primary_context; | |
698 | wire primary_asi_e; | |
699 | wire secondary_asi_e; | |
700 | wire [1:0] context_enc_e; | |
701 | wire dff_ct_scanin; | |
702 | wire dff_ct_scanout; | |
703 | wire [1:0] context_enc_m; | |
704 | wire [1:0] context_enc_b; | |
705 | wire hpstate_hpriv_e; | |
706 | wire real_asi_e; | |
707 | wire as_if_user_asi_e; | |
708 | wire as_if_priv_asi_e; | |
709 | wire dff_asi_m_scanin; | |
710 | wire dff_asi_m_scanout; | |
711 | wire blk_asi_e; | |
712 | wire as_if_user_asi_m; | |
713 | wire asi_legal_m_unqual; | |
714 | wire dff_asi_b_scanin; | |
715 | wire dff_asi_b_scanout; | |
716 | wire asi_rngf_m; | |
717 | wire quad_asi_m; | |
718 | wire atomic_asi_m; | |
719 | wire asi_indet_m; | |
720 | wire binit_quad_asi_m; | |
721 | wire nofault_asi_m; | |
722 | wire quad_ld_m; | |
723 | wire asi_rngf_b; | |
724 | wire atomic_asi_b; | |
725 | wire asi_store_b; | |
726 | wire asi_indet_b; | |
727 | wire binit_quad_asi_b; | |
728 | wire nofault_asi_b; | |
729 | wire quad_ldd_b; | |
730 | wire [7:0] dcc_asi_b; | |
731 | wire asi_legal_b; | |
732 | wire bist_dtb_read_en; | |
733 | wire asi_dca_diag_e; | |
734 | wire asi_dta_diag_e; | |
735 | wire dff_int_asi_m_scanin; | |
736 | wire dff_int_asi_m_scanout; | |
737 | wire asi_dca_diag_m; | |
738 | wire asi_dta_diag_m; | |
739 | wire asi_dta_diag_rd_m; | |
740 | wire dcc_wtchpt_rd_m; | |
741 | wire tlb_tag_read_m; | |
742 | wire tlb_data_read_m; | |
743 | wire asi_dcd_diag_rd_m; | |
744 | wire lsu_asi_rd_m; | |
745 | wire dff_int_asi_b_scanin; | |
746 | wire dff_int_asi_b_scanout; | |
747 | wire wr_error_inj_m; | |
748 | wire lsu_asi_rd_b; | |
749 | wire asi_dca_diag_rd_b; | |
750 | wire stb_diag_rd_b; | |
751 | wire wr_error_inj_b; | |
752 | wire asi_cache_diag_wr_b; | |
753 | wire dcc_tlb_tag_read_b; | |
754 | wire dff_int_asi_w_scanin; | |
755 | wire dff_int_asi_w_scanout; | |
756 | wire lsu_asi_sel_b; | |
757 | wire lsu_asi_sel_w; | |
758 | wire stb_diag_rd_w; | |
759 | wire asi_cache_diag_wr_w; | |
760 | wire asi_dta_not_dca_diag_w; | |
761 | wire asi_wtchpt_wr_b; | |
762 | wire asi_ctl_reg_wr_b; | |
763 | wire asi_diag_reg_wr_b; | |
764 | wire asi_wr_pwr_mgmt_b; | |
765 | wire asi_ceter_wr_b; | |
766 | wire dff_wr_state_w_scanin; | |
767 | wire dff_wr_state_w_scanout; | |
768 | wire asi_wtchpt_wr_w; | |
769 | wire asi_ctl_reg_wr_w; | |
770 | wire asi_diag_reg_wr_w; | |
771 | wire asi_wr_pwr_mgmt_w; | |
772 | wire wr_error_inj_w; | |
773 | wire asi_ceter_wr_w; | |
774 | wire dff_tlu_asi_scanin; | |
775 | wire dff_tlu_asi_scanout; | |
776 | wire reload_asi_0_valid; | |
777 | wire reload_asi_1_valid; | |
778 | wire [1:0] reload_asi_0_tid; | |
779 | wire [1:0] reload_asi_1_tid; | |
780 | wire stb_diag_rd_w_qual; | |
781 | wire stb_ptr_rd_w2; | |
782 | wire stb_diag_rd_w2; | |
783 | wire [10:4] va_w2; | |
784 | wire stb_data_rd_w2; | |
785 | wire stb_ecc_rd_w2; | |
786 | wire stb_ctl_rd_w2; | |
787 | wire stb_addr_rd_w2; | |
788 | wire dff_stb_w3_scanin; | |
789 | wire dff_stb_w3_scanout; | |
790 | wire stb_data_rd_w3; | |
791 | wire stb_ecc_rd_w3; | |
792 | wire stb_ctl_rd_w3; | |
793 | wire stb_ptr_rd_w3; | |
794 | wire stb_addr_rd_w3; | |
795 | wire [1:0] diag_reg_in; | |
796 | wire [1:0] diag_reg; | |
797 | wire dff_diag_reg_scanin; | |
798 | wire dff_diag_reg_scanout; | |
799 | wire [1:0] way_hit_enc; | |
800 | wire [1:0] ld_way_b; | |
801 | wire [1:0] way_err_enc; | |
802 | wire [1:0] rway; | |
803 | wire [3:0] lru_line_sel; | |
804 | wire [5:0] lru_rd_data_m; | |
805 | wire bypass_from_w2; | |
806 | wire ld_inst_vld_w2; | |
807 | wire bypass_from_w; | |
808 | wire bypass_from_b; | |
809 | wire [5:0] lru_state_in_m; | |
810 | wire [5:0] new_lru_state_b; | |
811 | wire [5:0] lru_state_w; | |
812 | wire [5:0] lru_state_w2; | |
813 | wire dff_lru_data_b_scanin; | |
814 | wire dff_lru_data_b_scanout; | |
815 | wire [5:0] lru_state_in_b; | |
816 | wire [5:0] lru_state_b; | |
817 | wire [3:0] lru_way; | |
818 | wire ldhit_b; | |
819 | wire [3:0] used_way; | |
820 | wire dff_new_lru_w_scanin; | |
821 | wire dff_new_lru_w_scanout; | |
822 | wire [5:0] new_lru_state_w; | |
823 | wire [5:0] old_lru_state_w; | |
824 | wire dff_new_lru_w2_scanin; | |
825 | wire dff_new_lru_w2_scanout; | |
826 | wire update_lru_noraw_b; | |
827 | wire update_lru_raw_b; | |
828 | wire dff_update_lru_scanin; | |
829 | wire dff_update_lru_scanout; | |
830 | wire update_lru_noraw_w; | |
831 | wire update_lru_raw_w; | |
832 | wire lru_new_state; | |
833 | wire [2:0] ld_rq_type; | |
834 | wire pgnum_b39_qual; | |
835 | wire [1:0] ld_pkt_way_b; | |
836 | wire [60:40] mem_ld_miss_ctl; | |
837 | wire pref_ice_b; | |
838 | wire [60:40] asi_ld_miss_ctl; | |
839 | wire dff_sync_inst_w_scanin; | |
840 | wire dff_sync_inst_w_scanout; | |
841 | wire sync_inst_w; | |
842 | wire [1:0] st_rq_type_b; | |
843 | wire dff_st_type_w_scanin; | |
844 | wire dff_st_type_w_scanout; | |
845 | wire pstate_priv_d; | |
846 | wire hpstate_hpriv_d; | |
847 | wire dff_priv_state_e_scanin; | |
848 | wire dff_priv_state_e_scanout; | |
849 | wire pstate_priv_e; | |
850 | wire dff_priv_state_m_scanin; | |
851 | wire dff_priv_state_m_scanout; | |
852 | wire pstate_priv_m; | |
853 | wire hpstate_hpriv_m; | |
854 | wire bst_priv_m; | |
855 | wire bst_hpriv_m; | |
856 | wire pstate_priv_m_in; | |
857 | wire pstate_priv_b; | |
858 | wire hpstate_hpriv_m_in; | |
859 | wire hpstate_hpriv_b; | |
860 | wire dff_priv_state_b_scanin; | |
861 | wire dff_priv_state_b_scanout; | |
862 | wire tlb_bypass_b; | |
863 | wire blk_rd_align_err_m; | |
864 | wire rd_odd_align_err_m; | |
865 | wire illegal_spr_m; | |
866 | wire asr_legal_m; | |
867 | wire pst_with_imm_m; | |
868 | wire asi_wo_viol; | |
869 | wire priv_wrpr_tick_m; | |
870 | wire wrhpr_ver_m; | |
871 | wire tl_eq_0_m; | |
872 | wire illegal_inst_m; | |
873 | wire hw_aligned; | |
874 | wire wd_aligned; | |
875 | wire dw_aligned; | |
876 | wire qw_aligned; | |
877 | wire bl_aligned; | |
878 | wire hw_size; | |
879 | wire wd_size; | |
880 | wire dw_size; | |
881 | wire bl_size; | |
882 | wire qw_size; | |
883 | wire mem_addr_not_aligned; | |
884 | wire lddf_not_aligned; | |
885 | wire stdf_not_aligned; | |
886 | wire hpriv_asi; | |
887 | wire hpriv_asi_excp; | |
888 | wire priv_action_m; | |
889 | wire illegal_asi_m; | |
890 | wire non_atomic_asi_m; | |
891 | wire atomic_uncache_b; | |
892 | wire nfo_pg_nonnfo_asi_b; | |
893 | wire nfo_asi_ebit_b; | |
894 | wire user_page_access_m; | |
895 | wire dff_usr_pg_access_b_scanin; | |
896 | wire dff_usr_pg_access_b_scanout; | |
897 | wire user_page_access_b; | |
898 | wire priv_page_viol_b; | |
899 | wire ldxa_asi_exception; | |
900 | wire quad_ldda_exception; | |
901 | wire block_inst_exception; | |
902 | wire bld_to_io_b; | |
903 | wire nofault_st_exception; | |
904 | wire bis_with_fp; | |
905 | wire asi_ro_viol; | |
906 | wire asi_read_only_m; | |
907 | wire asi_write_only_m; | |
908 | wire bad_asi_va_exception_m; | |
909 | wire asi_no_va_check_m; | |
910 | wire legal_asi_va_m; | |
911 | wire wrpriv_intq_reg_m; | |
912 | wire dae_invalid_asi_m; | |
913 | wire dff_excp_b_scanin; | |
914 | wire dff_excp_b_scanout; | |
915 | wire tlb_real_m; | |
916 | wire dae_invalid_asi_b; | |
917 | wire tlb_real_b; | |
918 | wire access_exception_b; | |
919 | wire va_wpt_en_m; | |
920 | wire pa_wpt_en_m; | |
921 | wire va_wpt_rd_en_m; | |
922 | wire va_wpt_wr_en_m; | |
923 | wire pa_wpt_rd_en_m; | |
924 | wire pa_wpt_wr_en_m; | |
925 | wire [7:0] wpt_bmask; | |
926 | wire mask_match_m; | |
927 | wire va_wpt_check_m; | |
928 | wire pa_wpt_check_m; | |
929 | wire dff_wpt_scanin; | |
930 | wire dff_wpt_scanout; | |
931 | wire va_wpt_check_b; | |
932 | wire pa_wpt_check_b; | |
933 | wire asi_rtn_vld_2f; | |
934 | wire asi_rtn_excp_2f; | |
935 | wire asi_rtn_rd_2f; | |
936 | wire [2:0] asi_rtn_tid_2f; | |
937 | wire dff_asi_g_scanin; | |
938 | wire dff_asi_g_scanout; | |
939 | wire asi_rtn_vld_3f; | |
940 | wire asi_rtn_excp_3f; | |
941 | wire asi_rtn_rd_3f; | |
942 | wire [2:0] asi_rtn_tid_3f; | |
943 | wire dff_except_scanin; | |
944 | wire dff_except_scanout; | |
945 | wire priv_action_b; | |
946 | wire nop_pref_func; | |
947 | wire pref_nop_b; | |
948 | wire dff_fgu_excp_w_scanin; | |
949 | wire dff_fgu_excp_w_scanout; | |
950 | wire [10:5] if_indx_0_in; | |
951 | wire [10:5] if_indx_0; | |
952 | wire [10:5] if_indx_1_in; | |
953 | wire [10:5] if_indx_1; | |
954 | wire [10:5] if_indx_2_in; | |
955 | wire [10:5] if_indx_2; | |
956 | wire [10:5] if_indx_3_in; | |
957 | wire [10:5] if_indx_3; | |
958 | wire [10:5] if_indx_4_in; | |
959 | wire [10:5] if_indx_4; | |
960 | wire [10:5] if_indx_5_in; | |
961 | wire [10:5] if_indx_5; | |
962 | wire [10:5] if_indx_6_in; | |
963 | wire [10:5] if_indx_6; | |
964 | wire [10:5] if_indx_7_in; | |
965 | wire [10:5] if_indx_7; | |
966 | wire dff_if_indx_0_scanin; | |
967 | wire dff_if_indx_0_scanout; | |
968 | wire dff_if_indx_1_scanin; | |
969 | wire dff_if_indx_1_scanout; | |
970 | wire dff_if_indx_2_scanin; | |
971 | wire dff_if_indx_2_scanout; | |
972 | wire dff_if_indx_3_scanin; | |
973 | wire dff_if_indx_3_scanout; | |
974 | wire dff_if_indx_4_scanin; | |
975 | wire dff_if_indx_4_scanout; | |
976 | wire dff_if_indx_5_scanin; | |
977 | wire dff_if_indx_5_scanout; | |
978 | wire dff_if_indx_6_scanin; | |
979 | wire dff_if_indx_6_scanout; | |
980 | wire dff_if_indx_7_scanin; | |
981 | wire dff_if_indx_7_scanout; | |
982 | wire dff_way_vld_b_scanin; | |
983 | wire dff_way_vld_b_scanout; | |
984 | wire [3:0] cache_way_vld_b; | |
985 | wire [3:0] dval_perr_b; | |
986 | wire dval_perror_b; | |
987 | wire [3:0] dtag_perr_b; | |
988 | wire dtag_perror_b; | |
989 | wire mhit_err_b; | |
990 | wire mhit_error_b; | |
991 | wire [3:0] data_perr_b; | |
992 | wire data_perror_b; | |
993 | wire [2:0] way_err; | |
994 | wire prty_ctxt; | |
995 | wire tag_parity; | |
996 | wire dcmiss_trap_m; | |
997 | wire dtmiss_trap_m; | |
998 | wire dcmiss_trap_b; | |
999 | wire dtmiss_trap_b; | |
1000 | wire l2miss_no_atomic_e; | |
1001 | wire dff_l2miss_scanin; | |
1002 | wire dff_l2miss_scanout; | |
1003 | wire l2miss_no_atomic_m; | |
1004 | wire l2lmiss_trap_e; | |
1005 | wire dff_pmu_trap_scanin; | |
1006 | wire dff_pmu_trap_scanout; | |
1007 | wire load_complete_e; | |
1008 | wire l2lmiss_trap_m; | |
1009 | wire load_complete_m; | |
1010 | wire sbd_m_clken; | |
1011 | wire dff_pwr_mgmt_scanin; | |
1012 | wire dff_pwr_mgmt_scanout; | |
1013 | wire dff_bist_run_scanin; | |
1014 | wire dff_bist_run_scanout; | |
1015 | wire dff_bist_in_scanin; | |
1016 | wire dff_bist_in_scanout; | |
1017 | wire bist_dca_rd_1; | |
1018 | wire bist_lru_rd_1; | |
1019 | wire tlb_cam_en_pre; | |
1020 | wire bist_dca_cmp_en; | |
1021 | wire bist_lru_cmp_en; | |
1022 | wire dca_parity_compare; | |
1023 | wire dca_fail; | |
1024 | wire lru_fail; | |
1025 | wire dff_bist_fail_scanin; | |
1026 | wire dff_bist_fail_scanout; | |
1027 | wire spares_scanin; | |
1028 | wire spares_scanout; | |
1029 | ||
1030 | ||
1031 | // Inputs from decode unit. | |
1032 | input dec_lsu_tg_d; // Thread group of instruction in D | |
1033 | input dec_ld_inst_d; // Load instruction in D | |
1034 | input dec_ld_inst_e; // Load instruction in E | |
1035 | input dec_st_inst_e; // Store instruction in E | |
1036 | input dec_fpldst_inst_e; // Float ldst instruction in E | |
1037 | input dec_fsr_ldst_e; // LDFSR/STFSR instruction in E | |
1038 | input dec_ldst_dbl_e; // LDD or STB instruction in E | |
1039 | input dec_pref_inst_e; // Prefetch instruction in E | |
1040 | input dec_flush_inst_e; // Flush instruction in E | |
1041 | input dec_memstbar_inst_e; // Membar/stbar instruction in E | |
1042 | input dec_sr_inst_e; // Rd/rw state register instruction in E | |
1043 | input dec_pr_inst_e; // Rd/rw priv. register instruction in E | |
1044 | input dec_hpr_inst_e; // Rd/rw hyper-priv. register instruction in E | |
1045 | input dec_casa_inst_e; // CASA instruction in E | |
1046 | input dec_ldstub_inst_e; // LDSTUB instruction in E | |
1047 | input dec_swap_inst_e; // SWAP instruction in E | |
1048 | input dec_altspace_d; // Memory access to alternate space | |
1049 | input dec_sign_ext_e; // Instruction requiring sign extension of data (op3[3:2]==10) | |
1050 | input [1:0] dec_ldst_sz_e; // Size bits for the instruction in E | |
1051 | input [4:0] dec_lsu_rd_e; // Dest. register for load data | |
1052 | input [4:0] dec_sraddr_e; // Source register for store data | |
1053 | input dec_imm_asi_vld_d; // Instruction in D uses immediate ASI | |
1054 | input [7:0] dec_imm_asi_d; | |
1055 | input dec_flush_lm; | |
1056 | input dec_flush_lb; | |
1057 | input [1:0] dec_lsu_tid0_d; | |
1058 | input [1:0] dec_lsu_tid1_d; | |
1059 | ||
1060 | input [7:0] tlu_pstate_cle; // PSTATE.CLE bit for the 8 threads | |
1061 | input [1:0] tlu_asi_0_tid; // Thread for TLU reload | |
1062 | input [1:0] tlu_asi_1_tid; // Thread for TLU reload | |
1063 | input tlu_asi_0_valid; | |
1064 | input tlu_asi_1_valid; | |
1065 | input tlu_flush_lsu_b; | |
1066 | input [7:0] tlu_lsu_hpstate_hpriv; | |
1067 | input [7:0] tlu_lsu_pstate_priv; | |
1068 | input [7:0] tlu_tl_gt_0; | |
1069 | input [7:0] tlu_lsu_clear_ctl_reg_; | |
1070 | input tlu_cerer_dttp; | |
1071 | input tlu_cerer_dttm; | |
1072 | input tlu_cerer_dtdp; | |
1073 | input tlu_cerer_dcvp; | |
1074 | input tlu_cerer_dctp; | |
1075 | input tlu_cerer_dctm; | |
1076 | input tlu_cerer_dcdp; | |
1077 | ||
1078 | input tlc_use_primary_context_c0; | |
1079 | input tlc_use_secondary_context_c0; | |
1080 | input [2:0] tld_tid; | |
1081 | input tlc_wr_or_demap; | |
1082 | input tld_va_m_eq_zero; // Zero compare result of VA[47:16] | |
1083 | ||
1084 | input [1:0] exu_lsu_va_error_m; | |
1085 | input [1:0] exu_ecc_m; | |
1086 | input [7:0] exu_lsu_rs2_e; | |
1087 | ||
1088 | input fgu_fst_ecc_error_fx2; // ECC error on FRF read (B) | |
1089 | ||
1090 | input [1:0] lmd_sz_m; // Size bits from LMQ | |
1091 | input lmd_fpld_m; // Load float | |
1092 | input lmd_sxt_fsr_m; // Sign extend / LDFSR for load misses | |
1093 | input [4:0] lmd_rd_m; | |
1094 | input lmd_fpodd32b_m; | |
1095 | input lmd_fp32b_m; | |
1096 | input lmd_bendian_m; | |
1097 | input [10:3] lmd_fill_addr_e; | |
1098 | input [2:0] lmd_ld_addr_m; // Byte offset address of LMQ entry | |
1099 | input [1:0] lmd_fill_way_e; // Replacement way for fill data write | |
1100 | input lmd_wrtag_parity_e; | |
1101 | ||
1102 | input [2:0] lmc_cpq_tid_m; // Thread ID of fill packet | |
1103 | input [7:0] lmc_thrd_byp_sel_e; // Thread is bypassing data | |
1104 | input [2:0] lmc_byp_tid_m; // Thread is bypassing data | |
1105 | input lmc_byp_vld_m; // Thread is bypassing data | |
1106 | input lmc_asi_bypass_m; // ASI data is byapssing now | |
1107 | input [7:0] lmc_pref_issued; | |
1108 | input lmc_bld_annul; | |
1109 | input lmc_bld_last_e; | |
1110 | input lmc_bld_miss_e; | |
1111 | input lmc_full_raw_w; | |
1112 | input lmc_ld_stall; | |
1113 | input lmc_l2_err_noup; | |
1114 | input lmc_l2_uerr; | |
1115 | ||
1116 | input tlb_tte_ie_b; // Invert endianess bit | |
1117 | input tlb_tte_cp_b; // Cacheable physical bit | |
1118 | input tlb_tte_wbit_b; // Writeable page bit | |
1119 | input tlb_tte_ebit_b; // Side effect bit | |
1120 | input tlb_tte_pbit_b; // Privileged page bit | |
1121 | input tlb_tte_nfo_b; // Non faulting page bit | |
1122 | input [3:0] tlb_cache_way_hit_b; // tag compare result | |
1123 | input tlb_cache_hit_b; // OR of the four way tag compares | |
1124 | input tlb_pgnum_b39; // For indetifying IO accesses | |
1125 | input tlb_cam_hit; | |
1126 | input tlb_cam_mhit; | |
1127 | input [2:0] tlb_pgsize; | |
1128 | input tlb_context0_hit; | |
1129 | input tlb_tag_parity; | |
1130 | input tlb_tte_data_parity; | |
1131 | ||
1132 | input [7:0] dcs_asi_d; // ASI value of instruction in E stage | |
1133 | input [7:0] dcs_wpt_mask_m; | |
1134 | input [1:0] dcs_wpt_enable_m; | |
1135 | input [1:0] dcs_wpt_mode_m; | |
1136 | input [7:0] dcs_dc_enable; | |
1137 | input dcs_dmmu_enable_d; | |
1138 | ||
1139 | input [15:0] lsu_va_m; // VA of instruction in M | |
1140 | input [20:3] lsu_va_b; // VA of instruction in B | |
1141 | ||
1142 | input cic_l2fill_vld_e; // Fill data is coming from the cpx | |
1143 | //input cic_cpq_ld_rdy; // Load at cpq head and cpq is not blocked | |
1144 | input cic_cpq_ld_sel; // Load at cpq head (blocking unknown) | |
1145 | input cic_invalidate_e; // Invalidations are coming from the cpx | |
1146 | input cic_xinval_e; // Cross invalidation | |
1147 | input cic_st_update_e; // Store data writes to cache | |
1148 | input cic_rtn_cmplt; // Load/Atomic complete | |
1149 | input cic_oddrd_e; // 2nd pass of a 2 pass load | |
1150 | input [15:0] cic_inv_wen_e; // Invalidation data | |
1151 | input cic_cpq_stall; | |
1152 | ||
1153 | input [2:0] cid_tid; // Thread ID of packet at head of CPQ | |
1154 | input [1:0] cid_xway; // Way for cross invalidation | |
1155 | input [10:3] cid_st_addr; // Index for store update | |
1156 | input [1:0] cid_st_way; // Way for store update | |
1157 | input [7:0] cid_st_bmask; // Byte mask for store update | |
1158 | input [10:6] cid_inv_index; // Cache index for invalidation | |
1159 | input cid_ncache; // NC bit of the CPX packet | |
1160 | input cid_atomic; // Also indicates 2nd ifill packet | |
1161 | input cid_l2miss; | |
1162 | ||
1163 | input stb_cam_hit; // RAW hit in the stb | |
1164 | ||
1165 | input sbc_bst_in_prog_m; | |
1166 | input [2:0] sbc_tid_m; | |
1167 | ||
1168 | input [7:0] lsu_block_store_alloc; | |
1169 | input [7:0] lsu_block_store_kill; | |
1170 | ||
1171 | input [1:0] sbd_st_data_b; // store data | |
1172 | input tgd_w0_parity_b; | |
1173 | input tgd_w1_parity_b; | |
1174 | input tgd_w2_parity_b; | |
1175 | input tgd_w3_parity_b; | |
1176 | input tgd_va_wp_47_16; | |
1177 | input tgd_va_wp_15_3; | |
1178 | input tgd_pa_wp_39_16; | |
1179 | input tgd_pa_wp_15_3; | |
1180 | input tgd_prty_256m_b; | |
1181 | input tgd_prty_4m_b; | |
1182 | input tgd_prty_64k_b; | |
1183 | input tgd_prty_8k_b; | |
1184 | input tgd_prty_ctxt0_b; | |
1185 | input tgd_prty_ctxt1_b; | |
1186 | input [3:0] tgc_cache_way_vld_m; | |
1187 | input [3:0] tgc_verr_b; | |
1188 | ||
1189 | input dca_perr_w0_b; | |
1190 | input dca_perr_w1_b; | |
1191 | input dca_perr_w2_b; | |
1192 | input dca_perr_w3_b; | |
1193 | input [7:0] dca_rparity_b; | |
1194 | ||
1195 | input [23:0] lru_rdata_m; | |
1196 | ||
1197 | input ifu_lsu_if_vld; // ifetch request (for cross invalidation) | |
1198 | input [2:0] ifu_lsu_if_tid; | |
1199 | input [10:5] ifu_lsu_if_addr; | |
1200 | ||
1201 | input [6:0] arc_pid_ctl_2f; | |
1202 | ||
1203 | input [1:0] dcd_dca_data_compare; | |
1204 | ||
1205 | input lbist_run; | |
1206 | input [8:0] mbi_addr; | |
1207 | input [7:0] mbi_wdata; | |
1208 | input mbi_run; | |
1209 | input mbi_dca_read_en; | |
1210 | input mbi_dca_write_en; | |
1211 | input mbi_cmpsel; | |
1212 | input mbi_dta_read_en; | |
1213 | input mbi_dta_write_en; | |
1214 | input mbi_dva_read_en; | |
1215 | input mbi_dva_write_en; | |
1216 | input mbi_lru_read_en; | |
1217 | input mbi_lru_write_en; | |
1218 | input mbi_dtb_read_en; | |
1219 | input mbi_dtb_cam_en_pre; | |
1220 | input mbi_scm_cam_en_pre; | |
1221 | ||
1222 | input dmo_dcmuxctl; | |
1223 | ||
1224 | input [7:0] bist_cmp_data; | |
1225 | input [1:0] bist_cmpsel_1; | |
1226 | input [8:5] bist_addr_1; | |
1227 | input bist_srm_rd_1; | |
1228 | input bist_scm_rd_1; | |
1229 | ||
1230 | input [7:0] lsu_trap_flush; // must send lsu_complete on a trap_flush | |
1231 | ||
1232 | output dcc_exception_flush_b; | |
1233 | output dcc_asi_load_m; // Access is to internal ASI | |
1234 | output dcc_asi_load_b; // Access is to internal ASI | |
1235 | output dcc_asi_store_b; // Access is to internal ASI | |
1236 | output dcc_asi_iomap_m; | |
1237 | output dcc_asi_iomap_b; | |
1238 | output dcc_asi_rngf_b; // ASI access targeted to fast ring | |
1239 | output dcc_asi_indet_b; // ASI access is indeterminate | |
1240 | output dcc_binit_st_b; | |
1241 | ||
1242 | output dcc_dca_rvld_e; // Dcache read enable | |
1243 | output dcc_dca_wvld_e; // Dcache write enable | |
1244 | output dcc_dca_clk_en_e; // Dcache array clock enable | |
1245 | output dcc_dca_wclk_en_e; // Dcache output flop clock enable | |
1246 | output dcc_dca_rclk_en_m; // Dcache output flop clock enable | |
1247 | output dcc_dca_bypass_e_; // Dcache bypass enable | |
1248 | output [1:0] dcc_dca_fill_way_e; // Dcache replacement way | |
1249 | output [10:3] dcc_dca_fill_addr_e; // Dcache write index | |
1250 | output [15:0] dcc_dca_byte_wr_en_e; // Dcache byte enables | |
1251 | output [7:0] dcc_parity_invert; | |
1252 | output dcc_dta_parity; | |
1253 | output dcc_alt_addr_sel_e; // read/write addr select for dca | |
1254 | output dcc_alt_way_sel_m; // way source select for dca | |
1255 | output [3:0] dcc_alt_rsel_way_m; // Way select for bist/diag | |
1256 | output [10:4] dcc_dta_fill_addr_e; // Dtag write index | |
1257 | output [1:0] dcc_dta_fill_way_e; // Dcache replacement way | |
1258 | output dcc_dta_wvld_e; // dtag write enable | |
1259 | output dcc_dta_rvld_e; // dtag read enable | |
1260 | output dcc_dta_index1_sel_e; // dtag address select | |
1261 | output dcc_dta_clken; // dtag clock enable | |
1262 | output dcc_dva_wvld_e; // dva write enable | |
1263 | output dcc_dva_rvld_e; // dva write enable | |
1264 | output dcc_dva_din_e; // dva write data | |
1265 | output dcc_dva_din2_e; // dva write data (redundant copy) | |
1266 | output [10:6] dcc_dva_wr_addr_e; // dva update address | |
1267 | output [15:0] dcc_dva_bit_wen_e; // Valid bit mapping | |
1268 | output dcc_cache_diag_wr_m; | |
1269 | output dcc_cache_diag_wr_b; | |
1270 | output dcc_lru_rvld_e; | |
1271 | output dcc_lru_wvld_w; | |
1272 | output [5:0] dcc_lru_wdata_w; | |
1273 | output [3:0] dcc_lru_wen_w; | |
1274 | output [10:6] dcc_lru_wr_addr_w; | |
1275 | output [7:0] dcc_ldst_bmask; | |
1276 | output dcc_bmask_parity_b; | |
1277 | ||
1278 | output dcc_ld_miss_b; // Load needs to go to L2 | |
1279 | output dcc_early_ld_b; // Load with D$ enabled to pcx | |
1280 | output dcc_stb_quad_ld_cam; | |
1281 | ||
1282 | output dcc_l2fill_vld_m; | |
1283 | ||
1284 | output [1:0] dcc_ctxt_tid0_d; | |
1285 | output [1:0] dcc_ctxt_tid1_d; | |
1286 | output dcc_ctxt_tg_d; | |
1287 | output [2:0] dcc_tid_e; // Used by other blocks in the LSU | |
1288 | output [2:0] dcc_tid_m; // Used by other blocks in the LSU | |
1289 | output [2:0] dcc_tid_b; // Used by other blocks in the LSU | |
1290 | output [7:0] dcc_asi_m; | |
1291 | output dcc_ld_inst_unqual_e; | |
1292 | output dcc_ld_inst_vld_m; | |
1293 | output dcc_stb_cam_vld_m; | |
1294 | output [2:0] dcc_baddr_m; | |
1295 | output dcc_signed_m; | |
1296 | output dcc_pref_inst_m; | |
1297 | output dcc_std_inst_m; | |
1298 | output dcc_ldstub_inst_m; | |
1299 | output dcc_atomic_b; | |
1300 | output dcc_casa_inst_b; | |
1301 | output dcc_lendian_pre_m; | |
1302 | output dcc_bendian_byp_m; | |
1303 | output dcc_pst_asi_b; | |
1304 | output dcc_tte_vld_m; | |
1305 | output [1:0] dcc_ldst_sz_m; // Size for loads and stores | |
1306 | output [1:0] dcc_ld_sz_m; // Size for loads | |
1307 | output dcc_fp32b_sel_m; // Selects 32b fp store data | |
1308 | output dcc_blk_inst_m; // Block load/store instruction in pipe | |
1309 | output dcc_blk_inst_b; // Block load/store instruction in pipe | |
1310 | output dcc_ldbl_b; // Double return instruction (LDD/QUAD/BLD) | |
1311 | output dcc_ncache_b; | |
1312 | output [1:0] dcc_st_rq_type_w; | |
1313 | output dcc_sync_pipe_w; // so other blocks know when an instruction was sync'ed | |
1314 | output dcc_priv_b; | |
1315 | output dcc_hpriv_b; | |
1316 | output dcc_pctxt_sel_e; | |
1317 | output dcc_sctxt_sel_e; | |
1318 | output dcc_ld_miss_ldd; | |
1319 | output [60:40] dcc_ld_miss_ctl; // Load miss info for the LMQ | |
1320 | ||
1321 | output [7:0] dcc_sync_inst_w; // Sync instruction to store buffers | |
1322 | ||
1323 | output [7:0] dcc_asi_reload_sel; | |
1324 | output [7:0] dcc_wr_wtchpt; | |
1325 | output [7:0] dcc_wr_lsu_ctl_reg; | |
1326 | output dcc_wr_pwr_mgmt; | |
1327 | output dcc_ceter_wr_w; | |
1328 | output dcc_p0ctxt_rd_m; | |
1329 | output dcc_p1ctxt_rd_m; | |
1330 | output dcc_s0ctxt_rd_m; | |
1331 | output dcc_s1ctxt_rd_m; | |
1332 | output dcc_pid_rd_m; | |
1333 | output dcc_wtchpt_sel_m; | |
1334 | output dcc_demap_asi_m; | |
1335 | output dcc_wtchpt_rd_b; | |
1336 | output dcc_rd_lsu_ctl_reg_b; | |
1337 | output dcc_rd_diag_reg_b; | |
1338 | output dcc_rd_diag_dca_b; | |
1339 | output dcc_rd_core_id_b; | |
1340 | output dcc_rd_intr_id_b; | |
1341 | output dcc_rd_dt_diag_m; | |
1342 | output dcc_rd_dt_diag_b; | |
1343 | output dcc_stb_diag_rd_m; | |
1344 | output dcc_rd_error_inj_b; | |
1345 | output dcc_rd_pwr_mgmt_b; | |
1346 | output dcc_wr_error_inj_m; | |
1347 | output dcc_wr_error_inj_w; // flush qualified | |
1348 | output dcc_tlb_data_read_b; | |
1349 | output dcc_tlb_tag0_read_b; | |
1350 | output dcc_tlb_tag1_read_b; | |
1351 | output dcc_tlb_rw_index_e; | |
1352 | output dcc_rd_rhs_asi_b; // reading an ASI on the right hand side | |
1353 | output dcc_lsu_asi_rd_b; | |
1354 | output dcc_lsu_asi_sel_w; | |
1355 | output dcc_stb_diag_sel_w3; | |
1356 | output dcc_stb_data_rd_w3; | |
1357 | output dcc_stb_ecc_rd_w3; | |
1358 | output dcc_stb_ctl_rd_w3; | |
1359 | output dcc_stb_addr_sel_w3; | |
1360 | output dcc_stb_ptr_rd_w3; | |
1361 | output dcc_direct_map; // output for diag reads only | |
1362 | output dcc_dcs_memref_e; // Used for power management | |
1363 | output dcc_tlb_lookup; | |
1364 | output dcc_tlb_bypass; | |
1365 | output dcc_tlb_real; | |
1366 | output dcc_tlb_rd_e; | |
1367 | output dcc_perror_b; | |
1368 | output [1:0] dcc_perr_enc_b; // error encoding | |
1369 | output [3:0] dcc_dmo_parity; | |
1370 | ||
1371 | output [12:3] lsu_va_w; | |
1372 | ||
1373 | output dcc_sbd_e_clken; | |
1374 | output dcc_sbd_m_clken; | |
1375 | output dcc_ldst_m_clken; // ld/st instruction in M | |
1376 | ||
1377 | output [7:0] dcc_asi_rtn_vld; | |
1378 | output dcc_asi_rtn_excp; | |
1379 | output dcc_asi_rtn_rd; | |
1380 | ||
1381 | output lsu_exu_ld_vld_w; // Valid data is being sent to the IRF | |
1382 | output lsu_exu_ld_b; | |
1383 | output [2:0] lsu_exu_tid_m; // Thread ID of return data | |
1384 | output [4:0] lsu_exu_rd_m; | |
1385 | output lsu_fgu_fld_vld_w; // Valid data is being sent to the FRF | |
1386 | output lsu_fgu_fld_b; | |
1387 | output lsu_fgu_fld_32b_b; | |
1388 | output lsu_fgu_fld_odd32b_b; | |
1389 | output lsu_fgu_fsr_load_b; | |
1390 | output [2:0] lsu_fgu_fld_tid_b; // Thread ID of return data | |
1391 | output [4:0] lsu_fgu_fld_addr_b; | |
1392 | output lsu_fgu_exception_w; | |
1393 | output [7:0] lsu_sync; // Flush thread | |
1394 | output [7:0] lsu_complete; // Restart the thread | |
1395 | output lsu_cpq_stall; // Stall pipe at decode | |
1396 | ||
1397 | output lsu_tlu_twocycle_m; // A two-cycle op is in M | |
1398 | output lsu_tlb_bypass_b; | |
1399 | output lsu_tlb_real_b; | |
1400 | output lsu_align_b; | |
1401 | output lsu_lddf_align_b; | |
1402 | output lsu_stdf_align_b; | |
1403 | output lsu_dae_invalid_asi_b; | |
1404 | output lsu_dae_nc_page_b; | |
1405 | output lsu_dae_nfo_page_b; | |
1406 | output lsu_dae_priv_viol_b; | |
1407 | output lsu_dae_so_page; | |
1408 | output lsu_priv_action_b; | |
1409 | output lsu_va_watchpoint_b; | |
1410 | output lsu_pa_watchpoint_b; | |
1411 | output lsu_illegal_inst_b; | |
1412 | output lsu_daccess_prot_b; | |
1413 | output lsu_tlb_miss_b_; | |
1414 | output lsu_perfmon_trap_b; | |
1415 | output lsu_perfmon_trap_g; | |
1416 | output [1:0] lsu_tlu_dsfsr_ct_b; | |
1417 | ||
1418 | output lsu_sync_inst_b; | |
1419 | output lsu_dttp_err_b; | |
1420 | output lsu_dtdp_err_b; | |
1421 | output lsu_dtmh_err_b; | |
1422 | ||
1423 | output lsu_ifu_direct_map; | |
1424 | ||
1425 | output dcc_mbi_run; | |
1426 | output lsu_mbi_dca_fail; | |
1427 | output lsu_mbi_lru_fail; | |
1428 | ||
1429 | input pmu_lsu_dcmiss_trap_m; | |
1430 | input pmu_lsu_dtmiss_trap_m; | |
1431 | input [7:0] pmu_lsu_l2dmiss_trap_m; | |
1432 | ||
1433 | output [2:0] lsu_pmu_mem_type_b; // 2:0 - {l2 d-miss, dt_miss, d-cache miss} | |
1434 | ||
1435 | input lsu_dc_pmen; | |
1436 | input lsu_lsu_pmen; // Dynamic power management enable | |
1437 | output lsu_lsu_pmen_; | |
1438 | ||
1439 | // Globals | |
1440 | input l2clk; | |
1441 | input scan_in; | |
1442 | input tcu_pce_ov; // scan signals | |
1443 | input tcu_scan_en; | |
1444 | input spc_aclk; | |
1445 | input spc_bclk; | |
1446 | output scan_out; | |
1447 | ||
1448 | // scan renames | |
1449 | assign se = tcu_scan_en; | |
1450 | assign pce_ov = tcu_pce_ov; | |
1451 | assign stop = 1'b0; | |
1452 | assign siclk = spc_aclk; | |
1453 | assign soclk = spc_bclk; | |
1454 | // end scan | |
1455 | ||
1456 | ////////////////////////////// | |
1457 | // Clock header | |
1458 | ////////////////////////////// | |
1459 | lsu_dcc_ctl_l1clkhdr_ctl_macro clkgen_pm ( | |
1460 | .l2clk (l2clk ), | |
1461 | .l1en (dcc_pm_clken ), | |
1462 | .l1clk (l1clk_pm1 ), | |
1463 | .pce_ov(pce_ov), | |
1464 | .stop(stop), | |
1465 | .se(se) | |
1466 | ); | |
1467 | ||
1468 | lsu_dcc_ctl_l1clkhdr_ctl_macro clkgen_ifu_indx ( | |
1469 | .l2clk (l2clk ), | |
1470 | .l1en (ifu_indx_clken ), | |
1471 | .l1clk (l1clk_pm2 ), | |
1472 | .pce_ov(pce_ov), | |
1473 | .stop(stop), | |
1474 | .se(se) | |
1475 | ); | |
1476 | ||
1477 | lsu_dcc_ctl_l1clkhdr_ctl_macro clkgen ( | |
1478 | .l2clk (l2clk ), | |
1479 | .l1en (1'b1 ), | |
1480 | .l1clk (l1clk ), | |
1481 | .pce_ov(pce_ov), | |
1482 | .stop(stop), | |
1483 | .se(se) | |
1484 | ); | |
1485 | ||
1486 | lsu_dcc_ctl_msff_ctl_macro__width_7 dff_cerer ( | |
1487 | .scan_in(dff_cerer_scanin), | |
1488 | .scan_out(dff_cerer_scanout), | |
1489 | .l1clk (l1clk_pm1), | |
1490 | .din ({tlu_cerer_dttp,tlu_cerer_dttm, tlu_cerer_dtdp,tlu_cerer_dcvp,tlu_cerer_dctp, | |
1491 | tlu_cerer_dctm,tlu_cerer_dcdp}), | |
1492 | .dout ({cerer_dttp, cerer_dttm, cerer_dtdp, cerer_dcvp, cerer_dctp, | |
1493 | cerer_dctm, cerer_dcdp}), | |
1494 | .siclk(siclk), | |
1495 | .soclk(soclk) | |
1496 | ); | |
1497 | ||
1498 | ////////////////////////////// | |
1499 | // Flush logic | |
1500 | ////////////////////////////// | |
1501 | ||
1502 | // Factor upstream exceptions into flush. VA error is ignored if tlb_bypass. | |
1503 | assign exu_error_m = tid_m[2] ? (exu_ecc_m[1] | (exu_lsu_va_error_m[1] & ~tlb_bypass_m)) : | |
1504 | (exu_ecc_m[0] | (exu_lsu_va_error_m[0] & ~tlb_bypass_m)) ; | |
1505 | assign exu_error_qual_m = exu_error_m & (ld_inst_vld_m | st_inst_vld_m | flush_inst_m | mb_inst_m); | |
1506 | ||
1507 | assign exu_va_oor_m = tid_m[2] ? exu_lsu_va_error_m[1] : exu_lsu_va_error_m[0]; | |
1508 | ||
1509 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_flush_b ( | |
1510 | .scan_in(dff_flush_b_scanin), | |
1511 | .scan_out(dff_flush_b_scanout), | |
1512 | .l1clk (l1clk_pm1), | |
1513 | .din ({dec_flush_lm,exu_error_qual_m,exu_va_oor_m}), | |
1514 | .dout ({pipe_flush_b,exu_error_pre_b, exu_va_oor_b}), | |
1515 | .siclk(siclk), | |
1516 | .soclk(soclk) | |
1517 | ); | |
1518 | ||
1519 | // Need to take into account ECC errors on the second read of a STD instruction | |
1520 | assign exu_error_b = exu_error_pre_b | | |
1521 | ((tid_b[2] ? exu_ecc_m[1] : exu_ecc_m[0]) & twocycle_b); | |
1522 | ||
1523 | // Internally generated flush conditions | |
1524 | assign fgu_error_b = fgu_fst_ecc_error_fx2 & st_inst_vld_b & fpldst_inst_vld_b; | |
1525 | ||
1526 | assign dcc_exception_flush_b = dcc_any_exception_b | exu_error_b | fgu_error_b; | |
1527 | ||
1528 | assign flush_b = dec_flush_lb | pipe_flush_b | dcc_any_exception_b | exu_error_b | fgu_error_b; | |
1529 | ||
1530 | assign flush_all_b = flush_b | tlu_flush_lsu_b; | |
1531 | ||
1532 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_flush_w ( | |
1533 | .scan_in(dff_flush_w_scanin), | |
1534 | .scan_out(dff_flush_w_scanout), | |
1535 | .l1clk (l1clk_pm1), | |
1536 | .din (flush_all_b), | |
1537 | .dout (flush_w), | |
1538 | .siclk(siclk), | |
1539 | .soclk(soclk) | |
1540 | ); | |
1541 | ||
1542 | //////////////////////////////////////////////////////////////////////////////// | |
1543 | // Stage the main lsu controls coming from the decode and trap units. | |
1544 | //////////////////////////////////////////////////////////////////////////////// | |
1545 | ||
1546 | // 0in bits_on -var {(dec_ld_inst_e | dec_st_inst_e) & altspace_e,(dec_ld_inst_e | dec_st_inst_e) & dec_sr_inst_e,(dec_ld_inst_e | dec_st_inst_e) & dec_pr_inst_e,(dec_ld_inst_e | dec_st_inst_e) & dec_hpr_inst_e} -max 1 | |
1547 | ||
1548 | lsu_dcc_ctl_msff_ctl_macro__width_12 dff_asi_d ( | |
1549 | .scan_in(dff_asi_d_scanin), | |
1550 | .scan_out(dff_asi_d_scanout), | |
1551 | .din ({dec_imm_asi_vld_d, asi_d[7:0], dec_altspace_d,dcs_dmmu_enable_d,dec_ld_inst_d}), | |
1552 | .dout ({dcc_imm_asi_vld_e, dcc_asi_e[7:0], altspace_e, dmmu_enable_e, ld_inst_unqual_e}), | |
1553 | .l1clk(l1clk), | |
1554 | .siclk(siclk), | |
1555 | .soclk(soclk) | |
1556 | ); | |
1557 | ||
1558 | assign dcc_ld_inst_unqual_e = ld_inst_unqual_e; | |
1559 | ||
1560 | assign asi_d[7:0] = dec_imm_asi_vld_d ? dec_imm_asi_d[7:0] : dcs_asi_d[7:0]; | |
1561 | ||
1562 | assign asx_e[7:0] = ({8{asi_use_rd_e}} & {3'b000,dec_lsu_rd_e[4:0]}) | | |
1563 | ({8{asi_use_sr_e}} & {3'b000,dec_sraddr_e[4:0]}) | | |
1564 | ({8{~(asi_use_rd_e | asi_use_sr_e)}} & dcc_asi_e[7:0]); | |
1565 | ||
1566 | assign dcc_tlb_lookup = mbi_run_local ? bist_cam_en : | |
1567 | ((dec_ld_inst_e | dec_st_inst_e) & ~asi_internal_e & ~dcc_tlb_bypass) ; | |
1568 | ||
1569 | assign dcc_tlb_rw_index_e = ld_inst_unqual_e; | |
1570 | ||
1571 | // dcc_memref_e is used to gate registers for power management | |
1572 | assign dcc_dcs_memref_e = dec_ld_inst_e | dec_st_inst_e | mbi_run_local | lsu_lsu_pmen_ ; | |
1573 | ||
1574 | assign pref_inst_qual_e = dec_ld_inst_e & dec_pref_inst_e; | |
1575 | ||
1576 | lsu_dcc_ctl_msff_ctl_macro__width_13 dff_dec_inst1_m ( | |
1577 | .scan_in(dff_dec_inst1_m_scanin), | |
1578 | .scan_out(dff_dec_inst1_m_scanout), | |
1579 | .l1clk (l1clk_pm1), | |
1580 | .din ({dec_ld_inst_e, dec_st_inst_e, dec_fpldst_inst_e, | |
1581 | pref_inst_qual_e, | |
1582 | dec_casa_inst_e, dec_ldstub_inst_e, dec_swap_inst_e, | |
1583 | dec_ldst_dbl_e, dec_sr_inst_e, dec_pr_inst_e, dec_hpr_inst_e, | |
1584 | dec_fsr_ldst_e, dcc_imm_asi_vld_e}), | |
1585 | .dout ({ld_inst_vld_m, st_inst_vld_m, fpldst_inst_vld_m, | |
1586 | pref_inst_m, | |
1587 | casa_inst_pre_m, ldstub_inst_pre_m, swap_inst_pre_m, | |
1588 | ldst_dbl_m, sr_inst_m, pr_inst_m, hpr_inst_m, | |
1589 | fsr_ldst_m, imm_asi_vld_m}), | |
1590 | .siclk(siclk), | |
1591 | .soclk(soclk) | |
1592 | ); | |
1593 | ||
1594 | assign casa_inst_m = casa_inst_pre_m & st_inst_vld_m; | |
1595 | assign swap_inst_m = swap_inst_pre_m & st_inst_vld_m; | |
1596 | assign ldstub_inst_m = ldstub_inst_pre_m & st_inst_vld_m; | |
1597 | assign dcc_ldstub_inst_m = ldstub_inst_m; | |
1598 | ||
1599 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_sync_inst ( | |
1600 | .scan_in(dff_sync_inst_scanin), | |
1601 | .scan_out(dff_sync_inst_scanout), | |
1602 | .l1clk (l1clk_pm1), | |
1603 | .din ({dec_memstbar_inst_e, dec_flush_inst_e,sync_inst_m}), | |
1604 | .dout ({mb_inst_m, flush_inst_m, sync_inst_pre_b}), | |
1605 | .siclk(siclk), | |
1606 | .soclk(soclk) | |
1607 | ); | |
1608 | ||
1609 | assign dcc_ld_inst_vld_m = ld_inst_vld_m; // Used in other blocks | |
1610 | ||
1611 | assign dcc_stb_cam_vld_m = mbi_run_local ? mbi_scm_cam_en : | |
1612 | (ld_inst_vld_m & ~pref_inst_m & ~atomic_m & ~asi_internal_m & ~dec_flush_lm & ~blk_inst_m); | |
1613 | ||
1614 | assign dcc_pref_inst_m = pref_inst_m; // Used in other blocks | |
1615 | assign dcc_std_inst_m = ldst_dbl_m & st_inst_vld_m & ~fpldst_inst_vld_m; | |
1616 | assign dcc_fp32b_sel_m = fpldst_inst_vld_m & ldst_sz_mod_m[1] & ~ldst_sz_mod_m[0]; | |
1617 | ||
1618 | assign atomic_m = casa_inst_m | ldstub_inst_m | swap_inst_m; | |
1619 | ||
1620 | // Use lbist_run here to force the store address mux. | |
1621 | assign dcc_asi_iomap_m = asi_iomap_m; | |
1622 | ||
1623 | assign sync_inst_m = flush_inst_m | mb_inst_m | (asi_sync_m & st_inst_vld_m); | |
1624 | ||
1625 | lsu_dcc_ctl_msff_ctl_macro__width_8 dff_dec_ctl_m ( | |
1626 | .scan_in(dff_dec_ctl_m_scanin), | |
1627 | .scan_out(dff_dec_ctl_m_scanout), | |
1628 | .l1clk (l1clk_pm1), | |
1629 | .din ({dec_ldst_sz_e[1:0], dec_lsu_rd_e[4:0], dec_sign_ext_e}), | |
1630 | .dout ({ldst_sz_m[1:0], ld_rd_inst_m[4:0], sign_ext_m}), | |
1631 | .siclk(siclk), | |
1632 | .soclk(soclk) | |
1633 | ); | |
1634 | ||
1635 | // Modify the size bits for short and paritial ASIs | |
1636 | assign ldst_sz_mod_m[1] = (ldst_sz_m[1] & ~asi_sz_byte_m & ~asi_sz_hw_m) | (ldst_sz_m[1] & ~asi_legal_m); | |
1637 | assign ldst_sz_mod_m[0] = (ldst_sz_m[0] & (~asi_sz_byte_m | ~asi_legal_m)) | (asi_sz_hw_m & asi_legal_m); | |
1638 | ||
1639 | // The sign_ext and ldst_fsr bits share the same status bit since sign_ext | |
1640 | // only has meaning in the integer context and ldst_fsr in the fp context. | |
1641 | // NOTE: Add an assertion to check that sign_ext is never valid for fpldst instructions. | |
1642 | assign sxt_fsr_m = fsr_ldst_m | sign_ext_m; | |
1643 | ||
1644 | assign dcc_ldst_sz_m[1:0] = ldst_sz_mod_m[1:0]; // For use elsewhere in the LSU | |
1645 | ||
1646 | // Rd must be swizzled for fp loads | |
1647 | assign ld_rd_m[4:0] = ({5{~fpldst_inst_vld_m}} & ld_rd_inst_m[4:0]) | // Int | |
1648 | ({5{fpldst_inst_vld_m & ldst_sz_m[0]}} & | |
1649 | {ld_rd_inst_m[0],ld_rd_inst_m[4:1]}) | // Fp64 | |
1650 | ({5{fpldst_inst_vld_m & ~ldst_sz_m[0]}} & | |
1651 | {1'b0,ld_rd_inst_m[4:1]}); // Fp32 | |
1652 | ||
1653 | assign asi_type_m[1] = (pr_inst_m | hpr_inst_m) & (ld_inst_vld_m | st_inst_vld_m); | |
1654 | assign asi_type_m[0] = (sr_inst_m | hpr_inst_m) & (ld_inst_vld_m | st_inst_vld_m); | |
1655 | ||
1656 | lsu_dcc_ctl_msff_ctl_macro__width_9 dff_dec_inst_b ( | |
1657 | .scan_in(dff_dec_inst_b_scanin), | |
1658 | .scan_out(dff_dec_inst_b_scanout), | |
1659 | .l1clk (l1clk_pm1), | |
1660 | .din ({ld_inst_vld_m, st_inst_vld_m, fpldst_inst_vld_m, | |
1661 | pref_inst_m, casa_inst_m, | |
1662 | ldst_dbl_m, atomic_m, asi_type_m[1:0]}), | |
1663 | .dout ({ld_inst_vld_b, st_inst_vld_b, fpldst_inst_vld_b, | |
1664 | pref_inst_b, casa_inst_b, | |
1665 | ldst_dbl_b, atomic_b, asi_type_b[1:0]}), | |
1666 | .siclk(siclk), | |
1667 | .soclk(soclk) | |
1668 | ); | |
1669 | ||
1670 | // Partial stores with TTE.IE=1 sync the thread so that later loads don't have | |
1671 | // to deal with an inverted byte mask in the CAM | |
1672 | assign sync_inst_b = sync_inst_pre_b | (pst_asi_b & tlb_tte_ie_b & tlb_tte_vld_b & st_inst_vld_b); | |
1673 | ||
1674 | assign lsu_sync_inst_b = sync_inst_b; | |
1675 | assign dcc_atomic_b = atomic_b; | |
1676 | assign dcc_casa_inst_b = casa_inst_b; | |
1677 | ||
1678 | lsu_dcc_ctl_msff_ctl_macro__width_7 dff_dec_ctl_b ( | |
1679 | .scan_in(dff_dec_ctl_b_scanin), | |
1680 | .scan_out(dff_dec_ctl_b_scanout), | |
1681 | .l1clk (l1clk_pm1), | |
1682 | .din ({ldst_sz_mod_m[1:0], ld_rd_m[4:0]}), | |
1683 | .dout ({ldst_sz_b[1:0], ld_rd_b[4:0]}), | |
1684 | .siclk(siclk), | |
1685 | .soclk(soclk) | |
1686 | ); | |
1687 | ||
1688 | // TLU has to know about two cycle ops in case the second cycle IRF read results | |
1689 | // in an ECC error | |
1690 | assign lsu_tlu_twocycle_m = casa_inst_m | (ldst_dbl_m & st_inst_vld_m & ~fpldst_inst_vld_m); | |
1691 | assign twocycle_b = casa_inst_b | (ldst_dbl_b & st_inst_vld_b & ~fpldst_inst_vld_b); | |
1692 | ||
1693 | // Manipulate size to that non-quad ldd's are words and quad ldd's are dword | |
1694 | assign ldst_sz_b0_b = (ldst_sz_b[0] & (~ldst_dbl_b | fpldst_inst_vld_b)) | | |
1695 | (ldst_dbl_b & ~fpldst_inst_vld_b & quad_asi_b); | |
1696 | ||
1697 | // Thread ID staging and decode. | |
1698 | ||
1699 | assign tid_d[2:0] = dec_lsu_tg_d ? {1'b1,dec_lsu_tid1_d[1:0]} : {1'b0,dec_lsu_tid0_d[1:0]}; | |
1700 | assign thread0_d = ~tid_d[2] & ~tid_d[1] & ~tid_d[0]; | |
1701 | assign thread1_d = ~tid_d[2] & ~tid_d[1] & tid_d[0]; | |
1702 | assign thread2_d = ~tid_d[2] & tid_d[1] & ~tid_d[0]; | |
1703 | assign thread3_d = ~tid_d[2] & tid_d[1] & tid_d[0]; | |
1704 | assign thread4_d = tid_d[2] & ~tid_d[1] & ~tid_d[0]; | |
1705 | assign thread5_d = tid_d[2] & ~tid_d[1] & tid_d[0]; | |
1706 | assign thread6_d = tid_d[2] & tid_d[1] & ~tid_d[0]; | |
1707 | assign thread7_d = tid_d[2] & tid_d[1] & tid_d[0]; | |
1708 | ||
1709 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_tid_e ( | |
1710 | .scan_in(dff_tid_e_scanin), | |
1711 | .scan_out(dff_tid_e_scanout), | |
1712 | .din (tid_d[2:0]), | |
1713 | .dout (tid_e[2:0]), | |
1714 | .l1clk(l1clk), | |
1715 | .siclk(siclk), | |
1716 | .soclk(soclk) | |
1717 | ); | |
1718 | ||
1719 | assign thread0_e = ~tid_e[2] & ~tid_e[1] & ~tid_e[0]; | |
1720 | assign thread1_e = ~tid_e[2] & ~tid_e[1] & tid_e[0]; | |
1721 | assign thread2_e = ~tid_e[2] & tid_e[1] & ~tid_e[0]; | |
1722 | assign thread3_e = ~tid_e[2] & tid_e[1] & tid_e[0]; | |
1723 | assign thread4_e = tid_e[2] & ~tid_e[1] & ~tid_e[0]; | |
1724 | assign thread5_e = tid_e[2] & ~tid_e[1] & tid_e[0]; | |
1725 | assign thread6_e = tid_e[2] & tid_e[1] & ~tid_e[0]; | |
1726 | assign thread7_e = tid_e[2] & tid_e[1] & tid_e[0]; | |
1727 | ||
1728 | assign dcc_tid_e[2:0] = tid_e[2:0]; // for distribution to other blocks | |
1729 | ||
1730 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_tid_m ( | |
1731 | .scan_in(dff_tid_m_scanin), | |
1732 | .scan_out(dff_tid_m_scanout), | |
1733 | .l1clk (l1clk_pm1), | |
1734 | .din (tid_e[2:0]), | |
1735 | .dout (tid_m[2:0]), | |
1736 | .siclk(siclk), | |
1737 | .soclk(soclk) | |
1738 | ); | |
1739 | ||
1740 | assign dcc_tid_m[2:0] = tid_m[2:0]; // for distribution to other blocks | |
1741 | ||
1742 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_tid_b ( | |
1743 | .scan_in(dff_tid_b_scanin), | |
1744 | .scan_out(dff_tid_b_scanout), | |
1745 | .l1clk (l1clk_pm1), | |
1746 | .din (tid_m[2:0]), | |
1747 | .dout (tid_b[2:0]), | |
1748 | .siclk(siclk), | |
1749 | .soclk(soclk) | |
1750 | ); | |
1751 | ||
1752 | assign dcc_tid_b[2:0] = tid_b[2:0]; // for distribution to other blocks | |
1753 | ||
1754 | assign thread0_b = ~tid_b[2] & ~tid_b[1] & ~tid_b[0]; | |
1755 | assign thread1_b = ~tid_b[2] & ~tid_b[1] & tid_b[0]; | |
1756 | assign thread2_b = ~tid_b[2] & tid_b[1] & ~tid_b[0]; | |
1757 | assign thread3_b = ~tid_b[2] & tid_b[1] & tid_b[0]; | |
1758 | assign thread4_b = tid_b[2] & ~tid_b[1] & ~tid_b[0]; | |
1759 | assign thread5_b = tid_b[2] & ~tid_b[1] & tid_b[0]; | |
1760 | assign thread6_b = tid_b[2] & tid_b[1] & ~tid_b[0]; | |
1761 | assign thread7_b = tid_b[2] & tid_b[1] & tid_b[0]; | |
1762 | ||
1763 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_tid_w ( | |
1764 | .scan_in(dff_tid_w_scanin), | |
1765 | .scan_out(dff_tid_w_scanout), | |
1766 | .l1clk (l1clk_pm1), | |
1767 | .din (tid_b[2:0]), | |
1768 | .dout (tid_w[2:0]), | |
1769 | .siclk(siclk), | |
1770 | .soclk(soclk) | |
1771 | ); | |
1772 | ||
1773 | assign thread_w[0] = ~tid_w[2] & ~tid_w[1] & ~tid_w[0]; | |
1774 | assign thread_w[1] = ~tid_w[2] & ~tid_w[1] & tid_w[0]; | |
1775 | assign thread_w[2] = ~tid_w[2] & tid_w[1] & ~tid_w[0]; | |
1776 | assign thread_w[3] = ~tid_w[2] & tid_w[1] & tid_w[0]; | |
1777 | assign thread_w[4] = tid_w[2] & ~tid_w[1] & ~tid_w[0]; | |
1778 | assign thread_w[5] = tid_w[2] & ~tid_w[1] & tid_w[0]; | |
1779 | assign thread_w[6] = tid_w[2] & tid_w[1] & ~tid_w[0]; | |
1780 | assign thread_w[7] = tid_w[2] & tid_w[1] & tid_w[0]; | |
1781 | ||
1782 | assign fpld_32b_m = ~ldst_sz_m[0]; | |
1783 | assign fpld_odd32b_m = ~ldst_sz_m[0] & ld_rd_inst_m[0]; | |
1784 | ||
1785 | ||
1786 | // Stage and qualify controls | |
1787 | ||
1788 | assign altspace_ldst_e = altspace_e & (dec_ld_inst_e | dec_st_inst_e); | |
1789 | ||
1790 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_altspace_m ( | |
1791 | .scan_in(dff_altspace_m_scanin), | |
1792 | .scan_out(dff_altspace_m_scanout), | |
1793 | .l1clk (l1clk_pm1), | |
1794 | .din (altspace_ldst_e), | |
1795 | .dout (altspace_ldst_m), | |
1796 | .siclk(siclk), | |
1797 | .soclk(soclk) | |
1798 | ); | |
1799 | ||
1800 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_altspace_b ( | |
1801 | .scan_in(dff_altspace_b_scanin), | |
1802 | .scan_out(dff_altspace_b_scanout), | |
1803 | .l1clk (l1clk_pm1), | |
1804 | .din (altspace_ldst_m), | |
1805 | .dout (altspace_ldst_b), | |
1806 | .siclk(siclk), | |
1807 | .soclk(soclk) | |
1808 | ); | |
1809 | ||
1810 | assign fpld_inst_m = ld_inst_vld_m & (fpldst_inst_vld_m | fsr_ldst_m); | |
1811 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_fpld_b ( | |
1812 | .scan_in(dff_fpld_b_scanin), | |
1813 | .scan_out(dff_fpld_b_scanout), | |
1814 | .l1clk (l1clk_pm1), | |
1815 | .din (fpld_inst_m), | |
1816 | .dout (fpld_inst_b), | |
1817 | .siclk(siclk), | |
1818 | .soclk(soclk) | |
1819 | ); | |
1820 | ||
1821 | ||
1822 | assign blk_inst_m = blk_asi_m & asi_legal_m & ldst_dbl_m & fpldst_inst_vld_m; | |
1823 | assign dcc_blk_inst_m = blk_inst_m; | |
1824 | assign dcc_blk_inst_b = blk_asi_b & altspace_ldst_b & ldst_dbl_b; | |
1825 | ||
1826 | assign dcc_ldbl_b = ld_inst_vld_b & ldst_dbl_b & ~fpld_inst_b; | |
1827 | ||
1828 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_oddrd ( | |
1829 | .scan_in(dff_oddrd_scanin), | |
1830 | .scan_out(dff_oddrd_scanout), | |
1831 | .din (cic_oddrd_e), | |
1832 | .dout (oddrd_m), | |
1833 | .l1clk(l1clk), | |
1834 | .siclk(siclk), | |
1835 | .soclk(soclk) | |
1836 | ); | |
1837 | ||
1838 | //////////////////////////////////////////////////////////////////////////////// | |
1839 | // LD/ST byte mask generation | |
1840 | //////////////////////////////////////////////////////////////////////////////// | |
1841 | // For a normal ldst, the mask is based on the size and address. For partial stores, | |
1842 | // the mask will come from rs2. | |
1843 | ||
1844 | lsu_dcc_ctl_msff_ctl_macro__width_8 dff_rs2_m ( | |
1845 | .scan_in(dff_rs2_m_scanin), | |
1846 | .scan_out(dff_rs2_m_scanout), | |
1847 | .l1clk (l1clk_pm1), | |
1848 | .din (exu_lsu_rs2_e[7:0]), | |
1849 | .dout (rs2_m[7:0]), | |
1850 | .siclk(siclk), | |
1851 | .soclk(soclk) | |
1852 | ); | |
1853 | ||
1854 | //assign ldst_byte = ~ldst_sz_mod_m[1] & ~ldst_sz_mod_m[0]; | |
1855 | //assign ldst_hword = ~ldst_sz_mod_m[1] & ldst_sz_mod_m[0]; | |
1856 | //assign ldst_word = ldst_sz_mod_m[1] & ~ldst_sz_mod_m[0]; | |
1857 | //assign ldst_dword = ldst_sz_mod_m[1] & ldst_sz_mod_m[0]; | |
1858 | ||
1859 | assign ldst_byte = bad_fp_asi ? (ldst_sz_m[1:0] == 2'b00) : (ldst_sz_mod_m[1:0] == 2'b00); | |
1860 | assign ldst_hword = bad_fp_asi ? (ldst_sz_m[1:0] == 2'b01) : (ldst_sz_mod_m[1:0] == 2'b01); | |
1861 | assign ldst_word = bad_fp_asi ? (ldst_sz_m[1:0] == 2'b10) : (ldst_sz_mod_m[1:0] == 2'b10); | |
1862 | assign ldst_dword = bad_fp_asi ? (ldst_sz_m[1:0] == 2'b11) : (ldst_sz_mod_m[1:0] == 2'b11); | |
1863 | ||
1864 | assign ldst_bmask[7] = (~lsu_va_m[2] & ~lsu_va_m[1] & ~lsu_va_m[0]); | |
1865 | ||
1866 | assign ldst_bmask[6] = (~lsu_va_m[2] & ~lsu_va_m[1] & ~ldst_byte) | | |
1867 | (~lsu_va_m[2] & ~lsu_va_m[1] & lsu_va_m[0]); | |
1868 | ||
1869 | assign ldst_bmask[5] = (~lsu_va_m[2] & ~ldst_byte & ~ldst_hword) | | |
1870 | (~lsu_va_m[2] & lsu_va_m[1] & ~lsu_va_m[0]); | |
1871 | ||
1872 | assign ldst_bmask[4] = (~lsu_va_m[2] & lsu_va_m[1] & ldst_hword) | | |
1873 | (~lsu_va_m[2] & ~ldst_byte & ~ldst_hword) | | |
1874 | (~lsu_va_m[2] & lsu_va_m[1] & lsu_va_m[0]); | |
1875 | ||
1876 | assign ldst_bmask[3] = (ldst_dword) | | |
1877 | (lsu_va_m[2] & ~lsu_va_m[1] & ~lsu_va_m[0]); | |
1878 | ||
1879 | assign ldst_bmask[2] = (ldst_dword) | | |
1880 | (lsu_va_m[2] & ~lsu_va_m[1] & ~ldst_byte) | | |
1881 | (lsu_va_m[2] & ~lsu_va_m[1] & lsu_va_m[0]); | |
1882 | ||
1883 | assign ldst_bmask[1] = (ldst_dword) | | |
1884 | (lsu_va_m[2] & ldst_word) | | |
1885 | (lsu_va_m[2] & lsu_va_m[1] & ~lsu_va_m[0]); | |
1886 | ||
1887 | assign ldst_bmask[0] = (ldst_dword) | | |
1888 | (lsu_va_m[2] & lsu_va_m[1] & ldst_hword) | | |
1889 | (lsu_va_m[2] & ldst_word) | | |
1890 | (lsu_va_m[2] & lsu_va_m[1] & lsu_va_m[0]); | |
1891 | ||
1892 | assign pst_bmask[7:0] = ({8{asi_pst32_m}} & {{4{rs2_m[1]}},{4{rs2_m[0]}}}) | | |
1893 | ({8{asi_pst16_m}} & {{2{rs2_m[3]}},{2{rs2_m[2]}},{2{rs2_m[1]}},{2{rs2_m[0]}}}) | | |
1894 | ({8{asi_pst8_m}} & rs2_m[7:0]); | |
1895 | ||
1896 | assign lend_pst_bmask[7:0] = {pst_bmask[0],pst_bmask[1],pst_bmask[2],pst_bmask[3], | |
1897 | pst_bmask[4],pst_bmask[5],pst_bmask[6],pst_bmask[7]}; | |
1898 | ||
1899 | ||
1900 | // 0in bits_on -var {(asi_legal_m & asi_store_m),(asi_legal_m & pst_asi_m)} -max 1 | |
1901 | assign ldst_bmask_mod[7:0] = ({8{asi_store_m}} & (dcc_asi_m[7:0] | {8{asi_iomap_m}})) | | |
1902 | ({8{pst_asi_m & lendian_asi_m}} & lend_pst_bmask[7:0]) | | |
1903 | ({8{pst_asi_m & ~lendian_asi_m}} & pst_bmask[7:0]) | | |
1904 | ({8{~asi_store_m & ~pst_asi_m}} & (ldst_bmask[7:0] | {8{sbc_bst_in_prog_m}})); | |
1905 | ||
1906 | assign dcc_ldst_bmask[7:0] = mbi_run_local ? mbi_wdata[7:0] : ldst_bmask_mod[7:0]; | |
1907 | ||
1908 | assign st_bmask_parity_m = ^(ldst_bmask_mod[7:0]); | |
1909 | ||
1910 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_sba_par ( | |
1911 | .scan_in(dff_sba_par_scanin), | |
1912 | .scan_out(dff_sba_par_scanout), | |
1913 | .din (st_bmask_parity_m), | |
1914 | .dout (dcc_bmask_parity_b), | |
1915 | .l1clk(l1clk), | |
1916 | .siclk(siclk), | |
1917 | .soclk(soclk) | |
1918 | ); | |
1919 | ||
1920 | //////////////////////////////////////////////////////////////////////////////// | |
1921 | // Hit/miss signaling | |
1922 | //////////////////////////////////////////////////////////////////////////////// | |
1923 | ||
1924 | // Need to track flushes through the pipe so lsu_sync isn't fired repeatedly. | |
1925 | // PKU will ignore an lsu_sync that asserts in the same cycle as dec_flush_lb | |
1926 | // since doing so here would create a bad timing path. I'm responsible for | |
1927 | // tracking the flush_m. | |
1928 | ||
1929 | // TLU flush can be ignored because the primary purpose of flush_b is to prevent | |
1930 | // the LMQ from loading on a flushed load. If the flushed load is due to a | |
1931 | // previous load miss, that's handled by the dec_flush_lb. If the load is flushed | |
1932 | // due to a trap, the LMQ will be loaded but the valid bit won't be set. | |
1933 | ||
1934 | // This is a true load miss indicator used for advancing the rr replacement counter. | |
1935 | //assign l1_ld_miss_b = ld_inst_vld_b & ~tlb_cache_hit_b & ~flush_b; | |
1936 | assign l1_ld_miss_b = ld_inst_vld_b & ~(tlb_cache_hit_b & dcache_enable_b); | |
1937 | ||
1938 | // In addition to true load misses, this signal asserts on any load type instruction | |
1939 | // that needs to go to L2. (Ex. atomics, LDD, blk-ld, etc.) This will cause the | |
1940 | // LMQ to load the miss information and begin requesting pcx access. | |
1941 | assign dcc_ld_miss_b = (l1_ld_miss_b | ncache_rq_b | dcc_perror_b) & ld_inst_vld_b; | |
1942 | ||
1943 | // True load misses are eligible to request pcx access in B. The arbitration | |
1944 | // will be done in lsu_pic_ctl. The cache hit result is sent there to be AND'ed | |
1945 | // with this signal. If the D$ is disabled, loads cannot request early. | |
1946 | assign early_ld_m = ld_inst_vld_m & ~asi_internal_m & ~(blk_asi_m & altspace_ldst_m & ldst_dbl_m) & | |
1947 | ~atomic_m & ~(ldst_dbl_m & ~fpld_inst_m) & ~pref_inst_m & dcache_enable_m & ~dec_flush_lm; | |
1948 | ||
1949 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_early_ld ( | |
1950 | .scan_in(dff_early_ld_scanin), | |
1951 | .scan_out(dff_early_ld_scanout), | |
1952 | .l1clk (l1clk_pm1), | |
1953 | .din (early_ld_m), | |
1954 | .dout (dcc_early_ld_b), | |
1955 | .siclk(siclk), | |
1956 | .soclk(soclk) | |
1957 | ); | |
1958 | ||
1959 | //assign dcc_early_ld_b = ld_inst_vld_b & ~asi_internal_b & ~dcc_blk_inst_b & ~atomic_b & ~dcc_ldbl_b & ~pref_inst_b & dcache_enable_b; | |
1960 | ||
1961 | // lsu_sync tells the IFU that the instruction in B cannot complete in the normal | |
1962 | // pipeline. IFU will flush the thread and refetch from the next instruction. | |
1963 | // The thread must be restarted by either a lsu_complete signal or a trap flush. | |
1964 | // Cannot use flush_b as a factor here because that would create a roundtrip | |
1965 | // between lsu and dec. | |
1966 | assign sync_pipe = ((((l1_ld_miss_b | ncache_rq_b | dcc_perror_b) & ~asi_dcd_diag_rd_b & ld_inst_vld_b) | | |
1967 | (((altspace_ldst_b & blk_asi_b) | asi_sync_b | (pst_asi_b & tlb_tte_ie_b & tlb_tte_vld_b)) & st_inst_vld_b) | | |
1968 | lsu_dtmh_err_b | |
1969 | ) & ~pipe_flush_b | |
1970 | ) | stb_cam_hit | lbist_run ; | |
1971 | ||
1972 | assign lsu_sync[0] = sync_pipe & thread0_b; | |
1973 | assign lsu_sync[1] = sync_pipe & thread1_b; | |
1974 | assign lsu_sync[2] = sync_pipe & thread2_b; | |
1975 | assign lsu_sync[3] = sync_pipe & thread3_b; | |
1976 | assign lsu_sync[4] = sync_pipe & thread4_b; | |
1977 | assign lsu_sync[5] = sync_pipe & thread5_b; | |
1978 | assign lsu_sync[6] = sync_pipe & thread6_b; | |
1979 | assign lsu_sync[7] = sync_pipe & thread7_b; | |
1980 | ||
1981 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_sync_pipe ( | |
1982 | .scan_in(dff_sync_pipe_scanin), | |
1983 | .scan_out(dff_sync_pipe_scanout), | |
1984 | .l1clk (l1clk_pm1), | |
1985 | .din (sync_pipe), | |
1986 | .dout (dcc_sync_pipe_w), | |
1987 | .siclk(siclk), | |
1988 | .soclk(soclk) | |
1989 | ); | |
1990 | ||
1991 | // Must track cases where thread was stopped due to a store event. If a | |
1992 | // disrupting store buffer error occurs while the thread is stopped due | |
1993 | // to a store event, lsu_complete must be sent to restart the thread. | |
1994 | ||
1995 | assign sync_st_in[7:0] = ((thread_w[7:0] & {8{dcc_sync_pipe_w & st_inst_vld_w & ~flush_w}}) | sync_st[7:0]) & | |
1996 | ~lsu_complete[7:0]; | |
1997 | ||
1998 | lsu_dcc_ctl_msff_ctl_macro__width_8 dff_sync_st ( | |
1999 | .scan_in(dff_sync_st_scanin), | |
2000 | .scan_out(dff_sync_st_scanout), | |
2001 | .din (sync_st_in[7:0]), | |
2002 | .dout (sync_st[7:0]), | |
2003 | .l1clk(l1clk), | |
2004 | .siclk(siclk), | |
2005 | .soclk(soclk) | |
2006 | ); | |
2007 | ||
2008 | ||
2009 | //////////////////////////////////////////////////////////////////////////////// | |
2010 | // Complete signaling | |
2011 | //////////////////////////////////////////////////////////////////////////////// | |
2012 | ||
2013 | // lsu_complete can only be signalled following an lsu_sync or postsync. | |
2014 | ||
2015 | assign lsu_complete[0] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd0) & ~lmc_bld_annul) | | |
2016 | lmc_thrd_byp_sel_e[0] | lsu_block_store_alloc[0] | | |
2017 | lmc_pref_issued[0] | lsu_trap_flush[0] | | |
2018 | (sync_st[0] & lsu_block_store_kill[0]); | |
2019 | assign lsu_complete[1] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd1) & ~lmc_bld_annul) | | |
2020 | lmc_thrd_byp_sel_e[1] | lsu_block_store_alloc[1] | | |
2021 | lmc_pref_issued[1] | lsu_trap_flush[1] | | |
2022 | (sync_st[1] & lsu_block_store_kill[1]); | |
2023 | assign lsu_complete[2] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd2) & ~lmc_bld_annul) | | |
2024 | lmc_thrd_byp_sel_e[2] | lsu_block_store_alloc[2] | | |
2025 | lmc_pref_issued[2] | lsu_trap_flush[2] | | |
2026 | (sync_st[2] & lsu_block_store_kill[2]); | |
2027 | assign lsu_complete[3] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd3) & ~lmc_bld_annul) | | |
2028 | lmc_thrd_byp_sel_e[3] | lsu_block_store_alloc[3] | | |
2029 | lmc_pref_issued[3] | lsu_trap_flush[3] | | |
2030 | (sync_st[3] & lsu_block_store_kill[3]); | |
2031 | assign lsu_complete[4] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd4) & ~lmc_bld_annul) | | |
2032 | lmc_thrd_byp_sel_e[4] | lsu_block_store_alloc[4] | | |
2033 | lmc_pref_issued[4] | lsu_trap_flush[4] | | |
2034 | (sync_st[4] & lsu_block_store_kill[4]); | |
2035 | assign lsu_complete[5] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd5) & ~lmc_bld_annul) | | |
2036 | lmc_thrd_byp_sel_e[5] | lsu_block_store_alloc[5] | | |
2037 | lmc_pref_issued[5] | lsu_trap_flush[5] | | |
2038 | (sync_st[5] & lsu_block_store_kill[5]); | |
2039 | assign lsu_complete[6] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd6) & ~lmc_bld_annul) | | |
2040 | lmc_thrd_byp_sel_e[6] | lsu_block_store_alloc[6] | | |
2041 | lmc_pref_issued[6] | lsu_trap_flush[6] | | |
2042 | (sync_st[6] & lsu_block_store_kill[6]); | |
2043 | assign lsu_complete[7] = (cic_rtn_cmplt & (cid_tid[2:0] == 3'd7) & ~lmc_bld_annul) | | |
2044 | lmc_thrd_byp_sel_e[7] | lsu_block_store_alloc[7] | | |
2045 | lmc_pref_issued[7] | lsu_trap_flush[7] | | |
2046 | (sync_st[7] & lsu_block_store_kill[7]); | |
2047 | ||
2048 | //////////////////////////////////////////////////////////////////////////////// | |
2049 | // Decode stall | |
2050 | // Stalls are requested at decode to allow cpq or bypass regs to drain. | |
2051 | // Also to clear holes for diagnostic accesses | |
2052 | //////////////////////////////////////////////////////////////////////////////// | |
2053 | ||
2054 | assign lsu_cpq_stall = cic_cpq_stall | lmc_ld_stall | stb_diag_rd_e | asi_cache_diag_wr_m; | |
2055 | ||
2056 | //////////////////////////////////////////////////////////////////////////////// | |
2057 | // Dcache Array Control | |
2058 | //////////////////////////////////////////////////////////////////////////////// | |
2059 | ||
2060 | assign dcache_enable_e = (thread0_e & dcs_dc_enable[0]) | | |
2061 | (thread1_e & dcs_dc_enable[1]) | | |
2062 | (thread2_e & dcs_dc_enable[2]) | | |
2063 | (thread3_e & dcs_dc_enable[3]) | | |
2064 | (thread4_e & dcs_dc_enable[4]) | | |
2065 | (thread5_e & dcs_dc_enable[5]) | | |
2066 | (thread6_e & dcs_dc_enable[6]) | | |
2067 | (thread7_e & dcs_dc_enable[7]) ; | |
2068 | ||
2069 | assign dcache_read_e = dec_ld_inst_e & | |
2070 | (~(asi_internal_e | dec_pref_inst_e | dec_casa_inst_e | | |
2071 | dec_ldstub_inst_e | dec_swap_inst_e) & dcache_enable_e) | | |
2072 | (asi_internal_e & (asi_dca_diag_rd_e | asi_dta_diag_rd_e)); | |
2073 | ||
2074 | assign dcache_nodiag_read_e = ld_inst_unqual_e & | |
2075 | (~(asi_internal_e | dec_pref_inst_e | dec_casa_inst_e | | |
2076 | dec_ldstub_inst_e | dec_swap_inst_e) & dcache_enable_e); | |
2077 | ||
2078 | lsu_dcc_ctl_msff_ctl_macro__width_5 dc_enable ( | |
2079 | .scan_in(dc_enable_scanin), | |
2080 | .scan_out(dc_enable_scanout), | |
2081 | .l1clk (l1clk_pm1), | |
2082 | .din ({dcache_enable_e,dcache_enable_m,dcache_nodiag_read_e,dcache_read_m,dcc_dca_rvld_e}), | |
2083 | .dout ({dcache_enable_m,dcache_enable_b,dcache_nodiag_read_m,dcache_read_b,dcc_dca_rvld_m}), | |
2084 | .siclk(siclk), | |
2085 | .soclk(soclk) | |
2086 | ); | |
2087 | ||
2088 | assign dcache_read_m = dcache_nodiag_read_m & ld_inst_vld_m; | |
2089 | ||
2090 | assign ld_fill_e = cic_l2fill_vld_e & ~cid_ncache; | |
2091 | ||
2092 | assign dcc_dca_wvld_e = mbi_run_local ? mbi_dca_write_en : | |
2093 | (ld_fill_e | // l2 fills | |
2094 | cic_st_update_e | // store updates | |
2095 | dca_diag_wr_e ); // diagnostic write | |
2096 | ||
2097 | ||
2098 | // Data read enable | |
2099 | assign dcc_dca_rvld_e = mbi_run_local ? mbi_dca_read_en : dcache_read_e; | |
2100 | ||
2101 | assign dcc_dca_clk_en_e = ld_inst_unqual_e | dcc_dca_wvld_e | mbi_run_local | ~lsu_dc_pmen; // E stage | |
2102 | assign dcc_dca_wclk_en_e = dcc_dca_wvld_e | mbi_run_local | ~lsu_dc_pmen; // E stage | |
2103 | assign dcc_dca_rclk_en_m = dcc_dca_rvld_m | l2fill_vld_m | lmc_byp_vld_m | mbi_run_local | ~lsu_dc_pmen; // M stage | |
2104 | ||
2105 | // Force bypass mode off during BIST and during macrotest if possible. | |
2106 | assign dcc_dca_bypass_e_ = ld_inst_unqual_e | mbi_run_local; | |
2107 | assign dcc_alt_addr_sel_e = ~ld_inst_unqual_e | mbi_run_local; | |
2108 | ||
2109 | // Use alternate way for diag data reads and bist reads. If not performing a diag or bist read, | |
2110 | // way zero must be selected to allow for cache bypassing. | |
2111 | assign dcc_alt_way_sel_m = asi_dca_diag_rd_m | ~ld_inst_vld_m | mbi_run_local; | |
2112 | assign dcc_alt_rsel_way_m[0] = (asi_dca_diag_rd_m & ~mbi_run_local & ~lsu_va_m[12] & ~lsu_va_m[11]) | | |
2113 | (mbi_run_local & ~bist_addr_1[8] & ~bist_addr_1[7]) | | |
2114 | ~(asi_dca_diag_rd_m | mbi_run_local); | |
2115 | assign dcc_alt_rsel_way_m[1] = mbi_run_local ? (~bist_addr_1[8] & bist_addr_1[7]) : | |
2116 | (asi_dca_diag_rd_m & ~lsu_va_m[12] & lsu_va_m[11]) ; | |
2117 | assign dcc_alt_rsel_way_m[2] = mbi_run_local ? ( bist_addr_1[8] & ~bist_addr_1[7]) : | |
2118 | (asi_dca_diag_rd_m & lsu_va_m[12] & ~lsu_va_m[11]) ; | |
2119 | assign dcc_alt_rsel_way_m[3] = mbi_run_local ? ( bist_addr_1[8] & bist_addr_1[7]) : | |
2120 | (asi_dca_diag_rd_m & lsu_va_m[12] & lsu_va_m[11]) ; | |
2121 | ||
2122 | // Tag read/write enable | |
2123 | assign dcc_dta_rvld_e = mbi_run_local ? mbi_dta_read_en : dcache_read_e; | |
2124 | assign dcc_dta_wvld_e = mbi_run_local ? mbi_dta_write_en : (ld_fill_e | dta_diag_wr_e); | |
2125 | assign dcc_dta_clken = ld_inst_unqual_e | cic_cpq_ld_sel | dta_diag_wr_e | mbi_run_local | ~lsu_dc_pmen; | |
2126 | assign dcc_dta_index1_sel_e = ~ld_inst_unqual_e | mbi_run_local; | |
2127 | ||
2128 | // Fill/bypass control | |
2129 | assign dcc_dca_fill_way_e[1:0] = | |
2130 | ({2{mbi_run_local}} & mbi_addr[8:7]) | | |
2131 | ({2{(cic_cpq_ld_sel | diag_write_e) & ~mbi_run_local}} & lmd_fill_way_e[1:0]) | | |
2132 | ({2{~(mbi_run_local | cic_cpq_ld_sel | dca_diag_wr_e)}} & cid_st_way[1:0]); | |
2133 | ||
2134 | assign dcc_dta_fill_way_e[1:0] = mbi_run_local ? mbi_addr[8:7] : lmd_fill_way_e[1:0]; | |
2135 | ||
2136 | assign dcc_dca_fill_addr_e[10:3] = | |
2137 | ({8{mbi_run_local}} & {mbi_addr[6:0],mbi_cmpsel}) | | |
2138 | ({8{(cic_cpq_ld_sel | diag_write_e) & ~mbi_run_local}} & lmd_fill_addr_e[10:3]) | | |
2139 | ({8{~(mbi_run_local | cic_cpq_ld_sel | diag_write_e)}} & cid_st_addr[10:3]); | |
2140 | ||
2141 | assign dcc_dta_fill_addr_e[10:4] = mbi_run_local ? mbi_addr[6:0] : lmd_fill_addr_e[10:4]; | |
2142 | ||
2143 | // 0in bits_on -var {ld_fill_e,diag_write_e} -max 1 | |
2144 | ||
2145 | // Fills from L2 update all bytes. Stores are selective. | |
2146 | assign dcc_dca_byte_wr_en_e[15:0] = | |
2147 | ({16{dca_diag_wr_e}} & {{8{~va_w[3]}},{8{va_w[3]}}}) | | |
2148 | ({16{(cic_cpq_ld_sel & ~dca_diag_wr_e) | mbi_run_local}}) | | |
2149 | ({16{~(dca_diag_wr_e | cic_cpq_ld_sel | mbi_run_local)}} & | |
2150 | {({8{~cid_st_addr[3]}} & cid_st_bmask[7:0]),({8{cid_st_addr[3]}} & cid_st_bmask[7:0])}); | |
2151 | ||
2152 | ||
2153 | //////////////////////////////////////////////////////////////////////////////// | |
2154 | // Valid Array Control | |
2155 | // The array is organized as 32x16. Each line corresponds to one L2 cache line. | |
2156 | // (4 ways x 4 16B D$ lines per L2 line = 16) | |
2157 | // The valid array is read on every load instruction. | |
2158 | // The valid array is written on: | |
2159 | // 1 - a load fill sets one valid bit | |
2160 | // 2 - a diag write sets or clears one valid bit | |
2161 | // 3 - an invalidate caused by an L2 evicition clears up to four bits | |
2162 | // 4 - other invalidates clear one bit | |
2163 | ||
2164 | assign dcc_dva_rvld_e = mbi_run_local ? mbi_dva_read_en : (dcache_read_e | asi_dta_diag_rd_e); | |
2165 | assign dcc_dva_wvld_e = mbi_run_local ? mbi_dva_write_en : (ld_fill_e | dta_diag_wr_e | cic_invalidate_e | cic_xinval_e); | |
2166 | // 0in bits_on -var {ld_fill_e,dta_diag_wr_e,cic_invalidate_e,cic_xinval_e} -max 1 | |
2167 | ||
2168 | // 0in bits_on -var {mbi_run_local,cic_l2fill_vld_e,cic_invalidate_e,cic_xinval_e} -max 1 | |
2169 | assign dcc_dva_wr_addr_e[10:6] = mbi_run_local ? mbi_addr[4:0] : | |
2170 | (({5{cic_invalidate_e}} & cid_inv_index[10:6]) | | |
2171 | ({5{cic_xinval_e}} & xinv_index[10:6]) | | |
2172 | ({5{(cic_l2fill_vld_e | dta_diag_wr_e)}} & dcc_dta_fill_addr_e[10:6])); | |
2173 | ||
2174 | assign dcc_dva_din_e = mbi_run_local ? mbi_wdata[1] : ((cic_cpq_ld_sel & ~dta_diag_wr_e) | (dta_diag_wr_e & st_data_w[1])); | |
2175 | assign dcc_dva_din2_e = mbi_run_local ? mbi_wdata[0] : ((cic_cpq_ld_sel & ~dta_diag_wr_e) | (dta_diag_wr_e & (st_data_w[1] ^ va_w[14]))); | |
2176 | ||
2177 | assign fill_bit_wen_e[0] = ~lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2178 | assign fill_bit_wen_e[1] = ~lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2179 | assign fill_bit_wen_e[2] = ~lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2180 | assign fill_bit_wen_e[3] = ~lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2181 | assign fill_bit_wen_e[4] = ~lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2182 | assign fill_bit_wen_e[5] = ~lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2183 | assign fill_bit_wen_e[6] = ~lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2184 | assign fill_bit_wen_e[7] = ~lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2185 | assign fill_bit_wen_e[8] = lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2186 | assign fill_bit_wen_e[9] = lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2187 | assign fill_bit_wen_e[10] = lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2188 | assign fill_bit_wen_e[11] = lmd_fill_addr_e[5] & ~lmd_fill_addr_e[4] & lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2189 | assign fill_bit_wen_e[12] = lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2190 | assign fill_bit_wen_e[13] = lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & ~lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2191 | assign fill_bit_wen_e[14] = lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & lmd_fill_way_e[1] & ~lmd_fill_way_e[0]; | |
2192 | assign fill_bit_wen_e[15] = lmd_fill_addr_e[5] & lmd_fill_addr_e[4] & lmd_fill_way_e[1] & lmd_fill_way_e[0]; | |
2193 | ||
2194 | assign dcc_dva_bit_wen_e[15:0] = | |
2195 | ({16{mbi_run_local}}) | | |
2196 | ({16{cic_invalidate_e}} & cic_inv_wen_e[15:0]) | | |
2197 | ({16{cic_xinval_e}} & xinval_bit_wen_e[15:0]) | | |
2198 | ({16{(cic_l2fill_vld_e | dta_diag_wr_e)}} & fill_bit_wen_e[15:0]); | |
2199 | ||
2200 | //////////////////////////////////////////////////////////////////////////////// | |
2201 | // Regfile Data Control | |
2202 | //////////////////////////////////////////////////////////////////////////////// | |
2203 | ||
2204 | // Select the source of data to be passed to the register files. | |
2205 | // The same set of data always goes to both register files. | |
2206 | // [0] = load hit data from the dcache | |
2207 | // [1] = fill data from the CPX | |
2208 | // else bypass store buffer data | |
2209 | ||
2210 | assign l2fill_vld_e = cic_l2fill_vld_e & ~lmc_l2_err_noup; | |
2211 | ||
2212 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_l2fill_m ( | |
2213 | .scan_in(dff_l2fill_m_scanin), | |
2214 | .scan_out(dff_l2fill_m_scanout), | |
2215 | .din (l2fill_vld_e), | |
2216 | .dout (l2fill_vld_m), | |
2217 | .l1clk(l1clk), | |
2218 | .siclk(siclk), | |
2219 | .soclk(soclk) | |
2220 | ); | |
2221 | ||
2222 | assign dcc_l2fill_vld_m = l2fill_vld_m; | |
2223 | ||
2224 | assign int_fill_or_byp_m = ((l2fill_vld_m & ~l2_perfmon_wb_cancel_m) | lmc_byp_vld_m) & ~lmd_fpld_m; | |
2225 | assign fp_fill_or_byp_m = ((l2fill_vld_m & ~l2_perfmon_wb_cancel_m) | lmc_byp_vld_m) & lmd_fpld_m; | |
2226 | ||
2227 | assign exu_ld_m = (ld_inst_vld_m & ~fpld_inst_m) | int_fill_or_byp_m; | |
2228 | assign fgu_fld_m = (ld_inst_vld_m & fpld_inst_m) | fp_fill_or_byp_m; | |
2229 | ||
2230 | lsu_dcc_ctl_msff_ctl_macro__width_4 dff_l2fill_b ( | |
2231 | .scan_in(dff_l2fill_b_scanin), | |
2232 | .scan_out(dff_l2fill_b_scanout), | |
2233 | .din ({int_fill_or_byp_m,fp_fill_or_byp_m, exu_ld_m, fgu_fld_m}), | |
2234 | .dout ({int_fill_or_byp_b,fp_fill_or_byp_b,lsu_exu_ld_b,lsu_fgu_fld_b}), | |
2235 | .l1clk(l1clk), | |
2236 | .siclk(siclk), | |
2237 | .soclk(soclk) | |
2238 | ); | |
2239 | assign fld_32b_m = ld_inst_vld_m ? fpld_32b_m : lmd_fp32b_m; | |
2240 | assign fld_odd32b_m = ld_inst_vld_m ? fpld_odd32b_m : lmd_fpodd32b_m; | |
2241 | assign fld_sxt_fsr_m = ld_inst_vld_m ? sxt_fsr_m : lmd_sxt_fsr_m; | |
2242 | ||
2243 | assign return_rd_m[4:0] = ld_inst_vld_m ? ld_rd_m[4:0] : lmd_rd_m[4:0]; | |
2244 | ||
2245 | assign lsu_exu_rd_m[4:0] = ld_inst_vld_m ? ld_rd_inst_m[4:0] : lmd_rd_m[4:0]; | |
2246 | ||
2247 | assign ld_tid_m[2:0] = ({3{ld_inst_vld_m}} & tid_m[2:0]) | // pipe | |
2248 | ({3{l2fill_vld_m}} & lmc_cpq_tid_m[2:0]) | // ld miss | |
2249 | ({3{lmc_byp_vld_m}} & lmc_byp_tid_m[2:0]); // bypass | |
2250 | ||
2251 | assign lsu_exu_tid_m[2:0] = ld_tid_m[2:0]; | |
2252 | ||
2253 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_ld_tid_b ( | |
2254 | .scan_in(dff_ld_tid_b_scanin), | |
2255 | .scan_out(dff_ld_tid_b_scanout), | |
2256 | .din (ld_tid_m[2:0]), | |
2257 | .dout (ld_tid_b[2:0]), | |
2258 | .l1clk(l1clk), | |
2259 | .siclk(siclk), | |
2260 | .soclk(soclk) | |
2261 | ); | |
2262 | ||
2263 | lsu_dcc_ctl_msff_ctl_macro__width_8 dff_fp32_b ( | |
2264 | .scan_in(dff_fp32_b_scanin), | |
2265 | .scan_out(dff_fp32_b_scanout), | |
2266 | .din ({fld_32b_m,fld_odd32b_m,fld_sxt_fsr_m,return_rd_m[4:0]}), | |
2267 | .dout ({fld_32b_b,fld_odd32b_b,fld_sxt_fsr_b,return_rd_b[4:0]}), | |
2268 | .l1clk(l1clk), | |
2269 | .siclk(siclk), | |
2270 | .soclk(soclk) | |
2271 | ); | |
2272 | ||
2273 | assign lsu_fgu_fld_32b_b = fld_32b_b; | |
2274 | assign lsu_fgu_fld_odd32b_b = fld_odd32b_b; | |
2275 | assign fsr_load_unqual_b = fld_sxt_fsr_b; | |
2276 | ||
2277 | // Data is valid for the IRF/FRF when | |
2278 | // 1 - A load in the pipe hit the dcache. | |
2279 | // 2 - Data is returned from the CPX | |
2280 | // 3 - Data is bypassed from the LMQ bypass register (STB RAW, ASI, etc.) | |
2281 | assign ld_inst_qual_b = ld_inst_vld_b & ~sync_pipe & ~pipe_flush_b & ~dcc_any_exception_b; | |
2282 | ||
2283 | assign exu_ld_vld_b = (ld_inst_qual_b & ~fpld_inst_b) | // pipe | |
2284 | int_fill_or_byp_b; | |
2285 | ||
2286 | assign fgu_fld_vld_b = (ld_inst_qual_b & fpld_inst_b) | // pipe | |
2287 | fp_fill_or_byp_b; | |
2288 | ||
2289 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_ld_vld_w ( | |
2290 | .scan_in(dff_ld_vld_w_scanin), | |
2291 | .scan_out(dff_ld_vld_w_scanout), | |
2292 | .din ({exu_ld_vld_b,fgu_fld_vld_b}), | |
2293 | .dout ({exu_ld_vld_w,fgu_fld_vld_w}), | |
2294 | .l1clk(l1clk), | |
2295 | .siclk(siclk), | |
2296 | .soclk(soclk) | |
2297 | ); | |
2298 | assign lsu_exu_ld_vld_w = exu_ld_vld_w & ~(ld_inst_vld_w & flush_w); | |
2299 | assign lsu_fgu_fld_vld_w = fgu_fld_vld_w & ~(ld_inst_vld_w & flush_w); | |
2300 | ||
2301 | ||
2302 | assign lsu_fgu_fld_tid_b[2:0] = ld_tid_b[2:0]; | |
2303 | ||
2304 | assign lsu_fgu_fld_addr_b[4:0] = return_rd_b[4:0]; | |
2305 | ||
2306 | assign lsu_fgu_fsr_load_b = fsr_load_unqual_b & lsu_fgu_fld_b; | |
2307 | ||
2308 | //////////////////////////////////////////////////////////////////////////////// | |
2309 | // Big/little Endian | |
2310 | // Endianess is controlled by the following rules | |
2311 | // 1. Internal ASI's are all big endian. | |
2312 | // 2. Accesses with implicit ASI's are controlled by (PSTATE.CLE ^ TTE.IE) | |
2313 | // 3. Accesses with explicit ASI's are controlled by (ASI value ^ TTE.IE) | |
2314 | ||
2315 | assign pstate_cle_d = tlu_pstate_cle[0] & thread0_d | | |
2316 | tlu_pstate_cle[1] & thread1_d | | |
2317 | tlu_pstate_cle[2] & thread2_d | | |
2318 | tlu_pstate_cle[3] & thread3_d | | |
2319 | tlu_pstate_cle[4] & thread4_d | | |
2320 | tlu_pstate_cle[5] & thread5_d | | |
2321 | tlu_pstate_cle[6] & thread6_d | | |
2322 | tlu_pstate_cle[7] & thread7_d; | |
2323 | ||
2324 | assign dcc_lendian_pre_m = altspace_ldst_m ? lendian_asi_m : (pstate_cle_m & ~asi_internal_m); | |
2325 | assign dcc_bendian_byp_m = (~ld_inst_vld_m & lmd_bendian_m) | lmc_asi_bypass_m | dcc_asi_load_m; | |
2326 | ||
2327 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_le_bits ( | |
2328 | .scan_in(dff_le_bits_scanin), | |
2329 | .scan_out(dff_le_bits_scanout), | |
2330 | .din ({pstate_cle_d,pstate_cle_e,pstate_cle_m}), | |
2331 | .dout ({pstate_cle_e,pstate_cle_m,pstate_cle_b}), | |
2332 | .l1clk(l1clk), | |
2333 | .siclk(siclk), | |
2334 | .soclk(soclk) | |
2335 | ); | |
2336 | ||
2337 | assign l1hit_lendian_b = (ld_inst_vld_b | st_inst_vld_b) & ~asi_internal_b & | |
2338 | ((~altspace_ldst_b & (pstate_cle_b ^ (tlb_tte_ie_b & tlb_tte_vld_b))) | | |
2339 | (altspace_ldst_b & (lendian_asi_b ^ (tlb_tte_ie_b & tlb_tte_vld_b)))); | |
2340 | ||
2341 | // Insure that TTE.IE is never high for internal ASI's | |
2342 | // 0in custom -fire (st_inst_vld_b & asi_internal_b & tlb_tte_ie_b & ~flush_all_b) -message "TTE.IE high for internal ASI store" | |
2343 | ||
2344 | //////////////////////////////////////////////////////////////////////////////// | |
2345 | // Byte offset address | |
2346 | ||
2347 | assign byp_baddr_m[2:0] = {lmd_ld_addr_m[2] ^ (oddrd_m & ~lmd_sz_m[0]), lmd_ld_addr_m[1:0]}; | |
2348 | ||
2349 | assign dcc_baddr_m[2:0] = ld_inst_vld_m ? lsu_va_m[2:0] : byp_baddr_m[2:0]; | |
2350 | ||
2351 | //////////////////////////////////////////////////////////////////////////////// | |
2352 | // Alignment and sign extension for load return data. | |
2353 | // Integer data is aligned and sign-extended as defined in the Sparc V9 | |
2354 | // architecture. Floating point data is either 64bit (endian swapping may | |
2355 | // occur, but no other alignment is applicable) or 32bit (endian swapping may | |
2356 | // occur and the 32b data is replicated on the upper and lower halves of the | |
2357 | // 64b return bus). | |
2358 | // | |
2359 | ||
2360 | // Return data (and it's size information) can come from | |
2361 | // 1. Load Hit (ldst_sz_m) | |
2362 | // 2. Load Miss | |
2363 | // 3. ASI bypass | |
2364 | ||
2365 | assign dcc_ld_sz_m[1:0] = ld_inst_vld_m ? ldst_sz_mod_m[1:0] : lmd_sz_m[1:0]; | |
2366 | ||
2367 | assign dcc_signed_m = ld_inst_vld_m ? sxt_fsr_m : (lmd_sxt_fsr_m & ~lmc_asi_bypass_m); | |
2368 | ||
2369 | //////////////////////////////////////////////////////////////////////////////// | |
2370 | // ASI Decode | |
2371 | ||
2372 | lsu_adc_ctl adc ( | |
2373 | .asi_e (dcc_asi_e[7:0]), | |
2374 | .asi_m (dcc_asi_m[7:0]), | |
2375 | .sr_inst_e (dec_sr_inst_e), | |
2376 | .pr_inst_e (dec_pr_inst_e), | |
2377 | .hpr_inst_e (dec_hpr_inst_e), | |
2378 | .altspace_ldst_e(altspace_e), | |
2379 | .asi_legal_e (asi_legal_e_unqual), | |
2380 | .lsu_va_m(lsu_va_m[11:3]), | |
2381 | .sr_inst_m(sr_inst_m), | |
2382 | .pr_inst_m(pr_inst_m), | |
2383 | .hpr_inst_m(hpr_inst_m), | |
2384 | .altspace_ldst_m(altspace_ldst_m), | |
2385 | .ld_inst_vld_m(ld_inst_vld_m), | |
2386 | .legal_asi_va_m(legal_asi_va_m), | |
2387 | .asr_legal_m(asr_legal_m), | |
2388 | .asi_sync_m(asi_sync_m), | |
2389 | .asi_internal_e(asi_internal_e), | |
2390 | .asi_rngf_m(asi_rngf_m), | |
2391 | .asi_indet_m(asi_indet_m), | |
2392 | .lendian_asi_m(lendian_asi_m), | |
2393 | .asi_sz_byte_m(asi_sz_byte_m), | |
2394 | .asi_sz_hw_m(asi_sz_hw_m), | |
2395 | .pst_asi_m(pst_asi_m), | |
2396 | .asi_pst8_m(asi_pst8_m), | |
2397 | .asi_pst16_m(asi_pst16_m), | |
2398 | .asi_pst32_m(asi_pst32_m), | |
2399 | .asi_read_only_m(asi_read_only_m), | |
2400 | .asi_write_only_m(asi_write_only_m), | |
2401 | .quad_asi_m(quad_asi_m), | |
2402 | .binit_quad_asi_m(binit_quad_asi_m), | |
2403 | .primary_asi_e(primary_asi_e), | |
2404 | .secondary_asi_e(secondary_asi_e), | |
2405 | .real_asi_e(real_asi_e), | |
2406 | .as_if_user_asi_e(as_if_user_asi_e), | |
2407 | .as_if_priv_asi_e(as_if_priv_asi_e), | |
2408 | .atomic_asi_m(atomic_asi_m), | |
2409 | .blk_asi_e(blk_asi_e), | |
2410 | .nofault_asi_m(nofault_asi_m), | |
2411 | .asi_iomap_m(asi_iomap_m), | |
2412 | .asi_no_va_check_m(asi_no_va_check_m) | |
2413 | ); | |
2414 | ||
2415 | // Context selection. Alternate instructions get their context from the ASI value. | |
2416 | // Non-alternates default to primary, unless TL>0, then it's nulceus. | |
2417 | assign tl_gt_0_d = (thread0_d & tl_gt_0[0]) | | |
2418 | (thread1_d & tl_gt_0[1]) | | |
2419 | (thread2_d & tl_gt_0[2]) | | |
2420 | (thread3_d & tl_gt_0[3]) | | |
2421 | (thread4_d & tl_gt_0[4]) | | |
2422 | (thread5_d & tl_gt_0[5]) | | |
2423 | (thread6_d & tl_gt_0[6]) | | |
2424 | (thread7_d & tl_gt_0[7]) ; | |
2425 | ||
2426 | lsu_dcc_ctl_msff_ctl_macro__width_10 dff_tl_gt_0 ( | |
2427 | .scan_in(dff_tl_gt_0_scanin), | |
2428 | .scan_out(dff_tl_gt_0_scanout), | |
2429 | .din ({tlu_tl_gt_0[7:0],tl_gt_0_d,tl_gt_0_e}), | |
2430 | .dout ({tl_gt_0[7:0], tl_gt_0_e,tl_gt_0_m}), | |
2431 | .l1clk(l1clk), | |
2432 | .siclk(siclk), | |
2433 | .soclk(soclk) | |
2434 | ); | |
2435 | ||
2436 | lsu_dcc_ctl_msff_ctl_macro__width_5 dff_tlc ( | |
2437 | .scan_in(dff_tlc_scanin), | |
2438 | .scan_out(dff_tlc_scanout), | |
2439 | .din ({tlc_wr_or_demap, | |
2440 | tlc_use_primary_context_c0,tlc_use_secondary_context_c0, | |
2441 | tlc_use_primary_context_c1,tlc_use_secondary_context_c1}), | |
2442 | .dout ({wr_or_demap, | |
2443 | tlc_use_primary_context_c1,tlc_use_secondary_context_c1, | |
2444 | tlc_use_primary_context_c2,tlc_use_secondary_context_c2}), | |
2445 | .l1clk(l1clk), | |
2446 | .siclk(siclk), | |
2447 | .soclk(soclk) | |
2448 | ); | |
2449 | ||
2450 | assign tlc_use_secondary_context = tlc_use_secondary_context_c1 | tlc_use_secondary_context_c2; | |
2451 | assign tlc_use_primary_context = tlc_use_primary_context_c1 | tlc_use_primary_context_c2; | |
2452 | ||
2453 | assign dcc_ctxt_tid0_d[1:0] = tlc_wr_or_demap ? tld_tid[1:0] : dec_lsu_tid0_d[1:0]; | |
2454 | assign dcc_ctxt_tid1_d[1:0] = tlc_wr_or_demap ? tld_tid[1:0] : dec_lsu_tid1_d[1:0]; | |
2455 | assign dcc_ctxt_tg_d = tlc_wr_or_demap ? tld_tid[2] : dec_lsu_tg_d; | |
2456 | ||
2457 | assign dcc_pctxt_sel_e = wr_or_demap ? tlc_use_primary_context : (altspace_e ? primary_asi_e : ~tl_gt_0_e); | |
2458 | assign dcc_sctxt_sel_e = wr_or_demap ? tlc_use_secondary_context : (altspace_e & secondary_asi_e); | |
2459 | ||
2460 | assign context_enc_e[1:0] = {(asi_internal_e | ~(dcc_pctxt_sel_e | dcc_sctxt_sel_e)), | |
2461 | (asi_internal_e | dcc_sctxt_sel_e)}; | |
2462 | ||
2463 | lsu_dcc_ctl_msff_ctl_macro__width_4 dff_ct ( | |
2464 | .scan_in(dff_ct_scanin), | |
2465 | .scan_out(dff_ct_scanout), | |
2466 | .l1clk (l1clk_pm1), | |
2467 | .din ({context_enc_e[1:0],context_enc_m[1:0]}), | |
2468 | .dout ({context_enc_m[1:0],context_enc_b[1:0]}), | |
2469 | .siclk(siclk), | |
2470 | .soclk(soclk) | |
2471 | ); | |
2472 | ||
2473 | // TLB translation controls | |
2474 | // 1. All except aiu/aip/real bypass in HPRIV ENB mode | |
2475 | // 2. All internal ASIs are non-translating | |
2476 | assign dcc_tlb_bypass = mbi_run_local ? ~bist_cam_en : | |
2477 | ((hpstate_hpriv_e & ~(real_asi_e | as_if_user_asi_e | as_if_priv_asi_e)) | // #1 | |
2478 | asi_internal_e); // #2 | |
2479 | ||
2480 | // this is dont_care when bypassing | |
2481 | assign dcc_tlb_real = (~dmmu_enable_e & ~hpstate_hpriv_e) | real_asi_e; | |
2482 | ||
2483 | lsu_dcc_ctl_msff_ctl_macro__width_12 dff_asi_m ( | |
2484 | .scan_in(dff_asi_m_scanin), | |
2485 | .scan_out(dff_asi_m_scanout), | |
2486 | .l1clk (l1clk_pm1), | |
2487 | .din ({blk_asi_e,asi_internal_e,as_if_user_asi_e,asi_legal_e_unqual,asx_e[7:0]}), | |
2488 | .dout ({blk_asi_m,asi_internal_m,as_if_user_asi_m,asi_legal_m_unqual,dcc_asi_m[7:0]}), | |
2489 | .siclk(siclk), | |
2490 | .soclk(soclk) | |
2491 | ); | |
2492 | ||
2493 | assign asi_legal_m = asi_legal_m_unqual & (ld_inst_vld_m | st_inst_vld_m); | |
2494 | ||
2495 | // Don't make dcache diagnostics look like an internal ASI because they never go to | |
2496 | // the ASI ring and they don't sync the thread. | |
2497 | assign dcc_asi_load_m = asi_internal_m & ld_inst_vld_m; | |
2498 | ||
2499 | assign asi_store_m = asi_internal_m & st_inst_vld_m; | |
2500 | ||
2501 | lsu_dcc_ctl_msff_ctl_macro__width_24 dff_asi_b ( | |
2502 | .scan_in(dff_asi_b_scanin), | |
2503 | .scan_out(dff_asi_b_scanout), | |
2504 | .l1clk (l1clk_pm1), | |
2505 | .din ({asi_internal_m, lendian_asi_m, asi_rngf_m, asi_sync_m, blk_asi_m, quad_asi_m, atomic_asi_m, | |
2506 | dcc_asi_load_m, asi_store_m, asi_iomap_m, asi_indet_m, binit_quad_asi_m, pst_asi_m, | |
2507 | nofault_asi_m, quad_ld_m, dcc_asi_m[7:0], asi_legal_m}), | |
2508 | .dout ({asi_internal_b, lendian_asi_b, asi_rngf_b, asi_sync_b, blk_asi_b, quad_asi_b, atomic_asi_b, | |
2509 | dcc_asi_load_b, asi_store_b, dcc_asi_iomap_b, asi_indet_b, binit_quad_asi_b, pst_asi_b, | |
2510 | nofault_asi_b, quad_ldd_b, dcc_asi_b[7:0], asi_legal_b}), | |
2511 | .siclk(siclk), | |
2512 | .soclk(soclk) | |
2513 | ); | |
2514 | ||
2515 | assign dcc_asi_store_b = asi_store_b; | |
2516 | assign dcc_binit_st_b = binit_quad_asi_b & st_inst_vld_b; | |
2517 | assign dcc_pst_asi_b = pst_asi_b; | |
2518 | assign dcc_asi_indet_b = asi_indet_b; | |
2519 | ||
2520 | // Used in store buffer. For ASI_ITLB_DATA_ACCESS (ASI=0x55), writes need to go to the | |
2521 | // fast ring but reads to the local ring. Take care of that special case here. | |
2522 | assign dcc_asi_rngf_b = asi_rngf_b | (st_inst_vld_b & asi_internal_b & (dcc_asi_b[7:0] == 8'h55)); | |
2523 | ||
2524 | // ASI comes from Rd for wsr, wpr, and whpr. | |
2525 | assign asi_use_rd_e = (dec_sr_inst_e | dec_pr_inst_e | dec_hpr_inst_e) & dec_st_inst_e; | |
2526 | // ASI comes from sraddr for rsr, rpr, and rhpr. | |
2527 | assign asi_use_sr_e = (dec_sr_inst_e | dec_pr_inst_e | dec_hpr_inst_e) & ld_inst_unqual_e; | |
2528 | ||
2529 | assign quad_ld_m = ld_inst_vld_m & ldst_dbl_m & quad_asi_m & ~fpldst_inst_vld_m; | |
2530 | ||
2531 | assign dcc_stb_quad_ld_cam = quad_ld_m & ~mbi_run_local; | |
2532 | ||
2533 | //////////////////////////////////////////////////////////////////////////////// | |
2534 | // ASI and state register control | |
2535 | ||
2536 | assign dcc_tlb_rd_e = mbi_run_local ? bist_dtb_read_en : | |
2537 | (ld_inst_unqual_e & altspace_e & ((dcc_asi_e[7:0] == 8'h5D) | (dcc_asi_e[7:0] == 8'h5E))); | |
2538 | assign stb_diag_rd_e = dec_ld_inst_e & ~dec_pref_inst_e & ~dec_st_inst_e & altspace_e & (dcc_asi_e[7:0] == 8'h4A); | |
2539 | ||
2540 | assign asi_dca_diag_e = altspace_e & (dcc_asi_e[7:0] == 8'h46); | |
2541 | assign asi_dta_diag_e = altspace_e & (dcc_asi_e[7:0] == 8'h47); | |
2542 | ||
2543 | assign asi_dca_diag_rd_e = dec_ld_inst_e & ~dec_pref_inst_e & asi_dca_diag_e; | |
2544 | assign asi_dta_diag_rd_e = dec_ld_inst_e & ~dec_pref_inst_e & asi_dta_diag_e; | |
2545 | ||
2546 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_int_asi_m ( | |
2547 | .scan_in(dff_int_asi_m_scanin), | |
2548 | .scan_out(dff_int_asi_m_scanout), | |
2549 | .l1clk (l1clk_pm1), | |
2550 | .din ({stb_diag_rd_e, asi_dca_diag_e,asi_dta_diag_e}), | |
2551 | .dout ({dcc_stb_diag_rd_m,asi_dca_diag_m,asi_dta_diag_m}), | |
2552 | .siclk(siclk), | |
2553 | .soclk(soclk) | |
2554 | ); | |
2555 | assign asi_dca_diag_rd_m = ld_inst_vld_m & ~pref_inst_m & asi_dca_diag_m; | |
2556 | assign asi_dta_diag_rd_m = ld_inst_vld_m & ~pref_inst_m & asi_dta_diag_m; | |
2557 | ||
2558 | assign asi_cache_diag_wr_m = st_inst_vld_m & ~atomic_m & (asi_dca_diag_m | asi_dta_diag_m); | |
2559 | assign dcc_cache_diag_wr_m = asi_cache_diag_wr_m | lbist_run; | |
2560 | ||
2561 | assign dcc_p0ctxt_rd_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h21) & ~lsu_va_m[8] & lsu_va_m[3]; | |
2562 | assign dcc_p1ctxt_rd_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h21) & lsu_va_m[8] & lsu_va_m[3]; | |
2563 | assign dcc_s0ctxt_rd_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h21) & ~lsu_va_m[8] & lsu_va_m[4]; | |
2564 | assign dcc_s1ctxt_rd_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h21) & lsu_va_m[8] & lsu_va_m[4]; | |
2565 | assign dcc_pid_rd_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h58) & lsu_va_m[7]; | |
2566 | assign dcc_wtchpt_rd_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h58) & (lsu_va_m[5] & lsu_va_m[4] & lsu_va_m[3]); | |
2567 | assign tlb_tag_read_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h5E); | |
2568 | assign tlb_data_read_m = ld_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h5D); | |
2569 | assign asi_dcd_diag_rd_m = asi_dca_diag_rd_m & lsu_va_m[13]; | |
2570 | ||
2571 | // This signal gates the flop for tag/valid read data. It must be active during BIST also. | |
2572 | assign dcc_rd_dt_diag_m = asi_dta_diag_rd_m | mbi_run_local; | |
2573 | ||
2574 | // These are ASI's for which no ring transaction should be generated. | |
2575 | assign lsu_asi_rd_m = dcc_p0ctxt_rd_m | dcc_p1ctxt_rd_m | dcc_s0ctxt_rd_m | dcc_s1ctxt_rd_m | dcc_pid_rd_m | | |
2576 | dcc_wtchpt_rd_m | dcc_stb_diag_rd_m | asi_dca_diag_rd_m; | |
2577 | ||
2578 | assign dcc_wtchpt_sel_m = dcc_wtchpt_rd_m; | |
2579 | ||
2580 | lsu_dcc_ctl_msff_ctl_macro__width_10 dff_int_asi_b ( | |
2581 | .scan_in(dff_int_asi_b_scanin), | |
2582 | .scan_out(dff_int_asi_b_scanout), | |
2583 | .l1clk (l1clk_pm1), | |
2584 | .din ({lsu_asi_rd_m, dcc_wtchpt_rd_m, asi_dca_diag_rd_m, | |
2585 | dcc_stb_diag_rd_m, asi_dcd_diag_rd_m, asi_dta_diag_rd_m, wr_error_inj_m, | |
2586 | asi_cache_diag_wr_m, tlb_tag_read_m, tlb_data_read_m }), | |
2587 | .dout ({lsu_asi_rd_b, dcc_wtchpt_rd_b, asi_dca_diag_rd_b, | |
2588 | stb_diag_rd_b, asi_dcd_diag_rd_b, dcc_rd_dt_diag_b, wr_error_inj_b, | |
2589 | asi_cache_diag_wr_b, dcc_tlb_tag_read_b, dcc_tlb_data_read_b }), | |
2590 | .siclk(siclk), | |
2591 | .soclk(soclk) | |
2592 | ); | |
2593 | ||
2594 | assign dcc_cache_diag_wr_b = asi_cache_diag_wr_b; | |
2595 | ||
2596 | lsu_dcc_ctl_msff_ctl_macro__width_4 dff_int_asi_w ( | |
2597 | .scan_in(dff_int_asi_w_scanin), | |
2598 | .scan_out(dff_int_asi_w_scanout), | |
2599 | .l1clk (l1clk_pm1), | |
2600 | .din ({lsu_asi_sel_b,stb_diag_rd_b,asi_cache_diag_wr_b,dcc_asi_b[0]}), | |
2601 | .dout ({lsu_asi_sel_w,stb_diag_rd_w,asi_cache_diag_wr_w,asi_dta_not_dca_diag_w}), | |
2602 | .siclk(siclk), | |
2603 | .soclk(soclk) | |
2604 | ); | |
2605 | ||
2606 | assign dca_diag_wr_e = asi_cache_diag_wr_w & ~asi_dta_not_dca_diag_w & ~flush_w & ~mbi_run_local; | |
2607 | assign dta_diag_wr_e = asi_cache_diag_wr_w & asi_dta_not_dca_diag_w & ~flush_w & ~mbi_run_local; | |
2608 | assign diag_write_e = asi_cache_diag_wr_w & ~mbi_run_local; | |
2609 | ||
2610 | // dcc_lsu_asi_sel_w is used to enable the loading of the bypass mux | |
2611 | assign lsu_asi_sel_b = dcc_lsu_asi_rd_b & ~(stb_diag_rd_b | asi_dcd_diag_rd_b); | |
2612 | assign dcc_lsu_asi_sel_w = lsu_asi_sel_w; | |
2613 | ||
2614 | assign dcc_rd_diag_dca_b = asi_dca_diag_rd_b; | |
2615 | ||
2616 | assign dcc_rd_lsu_ctl_reg_b = ld_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h45) & ~|(lsu_va_b[4:3]); | |
2617 | assign dcc_rd_intr_id_b = ld_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h63) & ~lsu_va_b[4]; | |
2618 | assign dcc_rd_core_id_b = ld_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h63) & lsu_va_b[4]; | |
2619 | assign dcc_rd_diag_reg_b = ld_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h42) & lsu_va_b[4]; | |
2620 | assign dcc_rd_error_inj_b = ld_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h43); | |
2621 | assign dcc_rd_pwr_mgmt_b = ld_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h4E); | |
2622 | ||
2623 | assign dcc_tlb_tag0_read_b = dcc_tlb_tag_read_b & ~lsu_va_b[10]; | |
2624 | assign dcc_tlb_tag1_read_b = dcc_tlb_tag_read_b & lsu_va_b[10]; | |
2625 | ||
2626 | // ASI reads are muxed in two levels. This controls the mux that selects among the sources | |
2627 | // on the right hand side of the LSU. (DTAG, DTLB_DATA, DTLB_TAG, etc.) | |
2628 | assign dcc_rd_rhs_asi_b = dcc_rd_dt_diag_b | dcc_tlb_tag_read_b | dcc_tlb_data_read_b; | |
2629 | ||
2630 | // dcc_lsu_asi_rd_b is used to block the load from going out on the ASI ring | |
2631 | assign dcc_lsu_asi_rd_b = lsu_asi_rd_b | dcc_rd_lsu_ctl_reg_b | dcc_rd_intr_id_b | | |
2632 | dcc_rd_core_id_b | dcc_rd_diag_reg_b | dcc_rd_dt_diag_b | | |
2633 | dcc_rd_diag_dca_b | dcc_tlb_tag_read_b | dcc_tlb_data_read_b | | |
2634 | dcc_rd_error_inj_b | dcc_rd_pwr_mgmt_b; | |
2635 | ||
2636 | assign wr_error_inj_m = st_inst_vld_m & altspace_ldst_m & (dcc_asi_m[7:0] == 8'h43); | |
2637 | ||
2638 | assign dcc_wr_error_inj_m = wr_error_inj_m; | |
2639 | ||
2640 | // Need this to copy the address to the store data | |
2641 | assign dcc_demap_asi_m = st_inst_vld_m & altspace_ldst_m & ((dcc_asi_m[7:0] == 8'h57) | (dcc_asi_m[7:0] == 8'h5f)); | |
2642 | ||
2643 | assign asi_wtchpt_wr_b = st_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h58) & (lsu_va_b[5] & lsu_va_b[4] & lsu_va_b[3]); | |
2644 | assign asi_ctl_reg_wr_b = st_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h45) & ~|(lsu_va_b[4:3]); | |
2645 | assign asi_diag_reg_wr_b = st_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h42) & lsu_va_b[4]; | |
2646 | assign asi_wr_pwr_mgmt_b = st_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h4E); | |
2647 | assign asi_ceter_wr_b = st_inst_vld_b & altspace_ldst_b & (dcc_asi_b[7:0] == 8'h4C) & (~lsu_va_b[5] & lsu_va_b[4] & lsu_va_b[3]); | |
2648 | ||
2649 | lsu_dcc_ctl_msff_ctl_macro__width_8 dff_wr_state_w ( | |
2650 | .scan_in(dff_wr_state_w_scanin), | |
2651 | .scan_out(dff_wr_state_w_scanout), | |
2652 | .l1clk (l1clk_pm1), | |
2653 | .din ({asi_wtchpt_wr_b,asi_ctl_reg_wr_b,asi_diag_reg_wr_b,sbd_st_data_b[1:0], | |
2654 | asi_wr_pwr_mgmt_b,wr_error_inj_b,asi_ceter_wr_b}), | |
2655 | .dout ({asi_wtchpt_wr_w,asi_ctl_reg_wr_w,asi_diag_reg_wr_w,st_data_w[1:0], | |
2656 | asi_wr_pwr_mgmt_w,wr_error_inj_w,asi_ceter_wr_w}), | |
2657 | .siclk(siclk), | |
2658 | .soclk(soclk) | |
2659 | ); | |
2660 | ||
2661 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_tlu_asi ( | |
2662 | .scan_in(dff_tlu_asi_scanin), | |
2663 | .scan_out(dff_tlu_asi_scanout), | |
2664 | .din ({tlu_asi_0_valid, tlu_asi_1_valid, tlu_asi_0_tid[1:0], tlu_asi_1_tid[1:0]}), | |
2665 | .dout ({reload_asi_0_valid,reload_asi_1_valid,reload_asi_0_tid[1:0],reload_asi_1_tid[1:0]}), | |
2666 | .l1clk(l1clk), | |
2667 | .siclk(siclk), | |
2668 | .soclk(soclk) | |
2669 | ); | |
2670 | ||
2671 | assign dcc_asi_reload_sel[0] = ~reload_asi_0_tid[1] & ~reload_asi_0_tid[0] & reload_asi_0_valid; | |
2672 | assign dcc_asi_reload_sel[1] = ~reload_asi_0_tid[1] & reload_asi_0_tid[0] & reload_asi_0_valid; | |
2673 | assign dcc_asi_reload_sel[2] = reload_asi_0_tid[1] & ~reload_asi_0_tid[0] & reload_asi_0_valid; | |
2674 | assign dcc_asi_reload_sel[3] = reload_asi_0_tid[1] & reload_asi_0_tid[0] & reload_asi_0_valid; | |
2675 | assign dcc_asi_reload_sel[4] = ~reload_asi_1_tid[1] & ~reload_asi_1_tid[0] & reload_asi_1_valid; | |
2676 | assign dcc_asi_reload_sel[5] = ~reload_asi_1_tid[1] & reload_asi_1_tid[0] & reload_asi_1_valid; | |
2677 | assign dcc_asi_reload_sel[6] = reload_asi_1_tid[1] & ~reload_asi_1_tid[0] & reload_asi_1_valid; | |
2678 | assign dcc_asi_reload_sel[7] = reload_asi_1_tid[1] & reload_asi_1_tid[0] & reload_asi_1_valid; | |
2679 | ||
2680 | assign dcc_wr_wtchpt[0] = asi_wtchpt_wr_w & thread_w[0] & ~flush_w; | |
2681 | assign dcc_wr_wtchpt[1] = asi_wtchpt_wr_w & thread_w[1] & ~flush_w; | |
2682 | assign dcc_wr_wtchpt[2] = asi_wtchpt_wr_w & thread_w[2] & ~flush_w; | |
2683 | assign dcc_wr_wtchpt[3] = asi_wtchpt_wr_w & thread_w[3] & ~flush_w; | |
2684 | assign dcc_wr_wtchpt[4] = asi_wtchpt_wr_w & thread_w[4] & ~flush_w; | |
2685 | assign dcc_wr_wtchpt[5] = asi_wtchpt_wr_w & thread_w[5] & ~flush_w; | |
2686 | assign dcc_wr_wtchpt[6] = asi_wtchpt_wr_w & thread_w[6] & ~flush_w; | |
2687 | assign dcc_wr_wtchpt[7] = asi_wtchpt_wr_w & thread_w[7] & ~flush_w; | |
2688 | ||
2689 | assign dcc_wr_lsu_ctl_reg[0] = (asi_ctl_reg_wr_w & thread_w[0] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[0]; | |
2690 | assign dcc_wr_lsu_ctl_reg[1] = (asi_ctl_reg_wr_w & thread_w[1] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[1]; | |
2691 | assign dcc_wr_lsu_ctl_reg[2] = (asi_ctl_reg_wr_w & thread_w[2] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[2]; | |
2692 | assign dcc_wr_lsu_ctl_reg[3] = (asi_ctl_reg_wr_w & thread_w[3] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[3]; | |
2693 | assign dcc_wr_lsu_ctl_reg[4] = (asi_ctl_reg_wr_w & thread_w[4] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[4]; | |
2694 | assign dcc_wr_lsu_ctl_reg[5] = (asi_ctl_reg_wr_w & thread_w[5] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[5]; | |
2695 | assign dcc_wr_lsu_ctl_reg[6] = (asi_ctl_reg_wr_w & thread_w[6] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[6]; | |
2696 | assign dcc_wr_lsu_ctl_reg[7] = (asi_ctl_reg_wr_w & thread_w[7] & ~flush_w) | ~tlu_lsu_clear_ctl_reg_[7]; | |
2697 | ||
2698 | assign dcc_wr_pwr_mgmt = asi_wr_pwr_mgmt_w & ~flush_w; | |
2699 | assign dcc_wr_error_inj_w = wr_error_inj_w & ~flush_w; | |
2700 | assign dcc_ceter_wr_w = asi_ceter_wr_w & ~flush_w; | |
2701 | ||
2702 | assign stb_diag_rd_w_qual = stb_diag_rd_w & ~flush_w & ~mbi_run_local; | |
2703 | ||
2704 | assign stb_ptr_rd_w2 = (stb_diag_rd_w2 & va_w2[8]) & ~mbi_run_local; | |
2705 | assign stb_data_rd_w2 = (stb_diag_rd_w2 & ~va_w2[8] & ~va_w2[7] & ~va_w2[6]) | | |
2706 | (mbi_run_local & bist_srm_rd_1 & ~bist_cmpsel_1[1] & ~bist_cmpsel_1[0]); | |
2707 | assign stb_ecc_rd_w2 = (stb_diag_rd_w2 & ~va_w2[8] & ~va_w2[7] & va_w2[6]) | | |
2708 | (mbi_run_local & bist_srm_rd_1 & ~bist_cmpsel_1[1] & bist_cmpsel_1[0]); | |
2709 | assign stb_ctl_rd_w2 = (stb_diag_rd_w2 & ~va_w2[8] & va_w2[7] & ~va_w2[6]) | | |
2710 | (mbi_run_local & bist_srm_rd_1 & bist_cmpsel_1[1] & ~bist_cmpsel_1[0]); | |
2711 | assign stb_addr_rd_w2 = (stb_diag_rd_w2 & ~va_w2[8] & va_w2[7] & va_w2[6]) | | |
2712 | (mbi_run_local & bist_scm_rd_1); | |
2713 | ||
2714 | lsu_dcc_ctl_msff_ctl_macro__width_13 dff_stb_w3 ( | |
2715 | .scan_in(dff_stb_w3_scanin), | |
2716 | .scan_out(dff_stb_w3_scanout), | |
2717 | .din ({stb_diag_rd_w_qual,va_w[10:4], stb_data_rd_w2,stb_ecc_rd_w2,stb_ctl_rd_w2,stb_ptr_rd_w2,stb_addr_rd_w2}), | |
2718 | .dout ({stb_diag_rd_w2, va_w2[10:4],stb_data_rd_w3,stb_ecc_rd_w3,stb_ctl_rd_w3,stb_ptr_rd_w3,stb_addr_rd_w3}), | |
2719 | .l1clk(l1clk), | |
2720 | .siclk(siclk), | |
2721 | .soclk(soclk) | |
2722 | ); | |
2723 | ||
2724 | assign dcc_stb_ptr_rd_w3 = stb_ptr_rd_w3; | |
2725 | assign dcc_stb_data_rd_w3 = stb_data_rd_w3; | |
2726 | assign dcc_stb_ecc_rd_w3 = stb_ecc_rd_w3; | |
2727 | assign dcc_stb_ctl_rd_w3 = stb_ctl_rd_w3; | |
2728 | assign dcc_stb_addr_sel_w3 = stb_addr_rd_w3; | |
2729 | ||
2730 | // dcc_stb_diag_sel_w3 loads the bypass mux | |
2731 | assign dcc_stb_diag_sel_w3 = stb_ptr_rd_w3 | stb_data_rd_w3 | stb_ecc_rd_w3 | stb_ctl_rd_w3 | stb_addr_rd_w3; | |
2732 | ||
2733 | // ASI_LSU_DIAG_REG is just two bits and not threaded, so keep it here. | |
2734 | assign diag_reg_in[1:0] = (asi_diag_reg_wr_w & ~flush_w) ? st_data_w[1:0] : diag_reg[1:0] ; | |
2735 | ||
2736 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_diag_reg ( | |
2737 | .scan_in(dff_diag_reg_scanin), | |
2738 | .scan_out(dff_diag_reg_scanout), | |
2739 | .l1clk (l1clk_pm1), | |
2740 | .din (diag_reg_in[1:0]), | |
2741 | .dout (diag_reg[1:0]), | |
2742 | .siclk(siclk), | |
2743 | .soclk(soclk) | |
2744 | ); | |
2745 | ||
2746 | assign lsu_ifu_direct_map = diag_reg[0]; | |
2747 | assign dcc_direct_map = diag_reg[1] | asi_cache_diag_wr_b; | |
2748 | ||
2749 | //////////////////////////////////////////////////////////////////////////////// | |
2750 | // Replacement way for load miss. | |
2751 | //////////////////////////////////////////////////////////////////////////////// | |
2752 | ||
2753 | assign way_hit_enc[0] = tlb_cache_way_hit_b[1] | tlb_cache_way_hit_b[3]; | |
2754 | assign way_hit_enc[1] = tlb_cache_way_hit_b[2] | tlb_cache_way_hit_b[3]; | |
2755 | ||
2756 | // Replacement way is from one of the following sources | |
2757 | // (1) The way with the error in case of D$ error | |
2758 | // (2) The way hit in the dcache in the case of a partial raw. | |
2759 | // (3) Bits 12:11 of the VA in direct mapped mode. | |
2760 | // (4) LRU replacement in all other cases | |
2761 | ||
2762 | assign ld_way_b[1:0] = dcc_perror_b ? way_err_enc[1:0] : // (1) | |
2763 | (tlb_cache_hit_b & ld_inst_vld_b) ? way_hit_enc[1:0] : // (2) | |
2764 | dcc_direct_map ? lsu_va_b[12:11] : // (3) | |
2765 | rway[1:0]; // (4) | |
2766 | ||
2767 | ////////////////////////////////////////////////////////////// | |
2768 | // LRU replacement. Use the matrix method for LRU calculation. | |
2769 | // | |
2770 | // 3| When line is used, set row to all 1's and | |
2771 | // 2| [5] set column to all 0's | |
2772 | // 1| [3] [4] | |
2773 | // 0| [0] [1] [2] LRU way is the one with all 0's in | |
2774 | // ------------- its row and all 1's in it's column | |
2775 | // 0 1 2 3 | |
2776 | ||
2777 | // State data from LRU array | |
2778 | assign lru_line_sel[0] = mbi_run_local ? (~bist_addr_1[6] & ~bist_addr_1[5]) : (~lsu_va_m[5] & ~lsu_va_m[4]); | |
2779 | assign lru_line_sel[1] = mbi_run_local ? (~bist_addr_1[6] & bist_addr_1[5]) : (~lsu_va_m[5] & lsu_va_m[4]); | |
2780 | assign lru_line_sel[2] = mbi_run_local ? ( bist_addr_1[6] & ~bist_addr_1[5]) : ( lsu_va_m[5] & ~lsu_va_m[4]); | |
2781 | assign lru_line_sel[3] = mbi_run_local ? ( bist_addr_1[6] & bist_addr_1[5]) : ( lsu_va_m[5] & lsu_va_m[4]); | |
2782 | ||
2783 | assign lru_rd_data_m[5:0] = ({6{lru_line_sel[3]}} & lru_rdata_m[23:18]) | | |
2784 | ({6{lru_line_sel[2]}} & lru_rdata_m[17:12]) | | |
2785 | ({6{lru_line_sel[1]}} & lru_rdata_m[11:6]) | | |
2786 | ({6{lru_line_sel[0]}} & lru_rdata_m[5:0]) ; | |
2787 | ||
2788 | assign bypass_from_w2 = (lsu_va_m[10:4] == va_w2[10:4]) & ld_inst_vld_w2 & ~mbi_run_local; | |
2789 | assign bypass_from_w = (lsu_va_m[10:4] == va_w[10:4]) & ld_inst_vld_w & ~mbi_run_local; | |
2790 | assign bypass_from_b = (lsu_va_m[10:4] == lsu_va_b[10:4]) & ld_inst_vld_b & ~mbi_run_local; | |
2791 | ||
2792 | assign lru_state_in_m[5:0] = | |
2793 | bypass_from_b ? new_lru_state_b[5:0] : | |
2794 | (bypass_from_w ? lru_state_w[5:0] : | |
2795 | (bypass_from_w2 ? lru_state_w2[5:0] : lru_rd_data_m[5:0]) | |
2796 | ); | |
2797 | ||
2798 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_lru_data_b ( | |
2799 | .scan_in(dff_lru_data_b_scanin), | |
2800 | .scan_out(dff_lru_data_b_scanout), | |
2801 | .l1clk (l1clk_pm1), | |
2802 | .din (lru_state_in_m[5:0]), | |
2803 | .dout (lru_state_in_b[5:0]), | |
2804 | .siclk(siclk), | |
2805 | .soclk(soclk) | |
2806 | ); | |
2807 | ||
2808 | // If this was bypassed from W and that load missed the cache and was a full RAW, we | |
2809 | // don't want to use the modified state since the cache is unchanged. | |
2810 | ||
2811 | assign lru_state_b[5:0] = lru_state_in_b[5:0]; | |
2812 | ||
2813 | // This is the logic that takes the lru state and "hit" way and generates the LRU way | |
2814 | // and the new lru state | |
2815 | assign lru_way[0] = ~(lru_state_b[0] | lru_state_b[1] | lru_state_b[2]); | |
2816 | assign lru_way[1] = ~(lru_state_b[3] | lru_state_b[4]) & lru_state_b[0]; | |
2817 | assign lru_way[2] = ~lru_state_b[5] & lru_state_b[1] & lru_state_b[3]; | |
2818 | assign lru_way[3] = lru_state_b[2] & lru_state_b[4] & lru_state_b[5]; | |
2819 | ||
2820 | assign rway[0] = lru_way[1] | lru_way[3]; | |
2821 | assign rway[1] = lru_way[2] | lru_way[3]; | |
2822 | ||
2823 | assign ldhit_b = ld_inst_vld_b & (tlb_cache_hit_b & dcache_enable_b); | |
2824 | assign used_way[3:0] = ldhit_b ? tlb_cache_way_hit_b[3:0] : lru_way[3:0]; | |
2825 | ||
2826 | assign new_lru_state_b[0] = (lru_state_b[0] & ~used_way[1]) | used_way[0]; | |
2827 | assign new_lru_state_b[1] = (lru_state_b[1] & ~used_way[2]) | used_way[0]; | |
2828 | assign new_lru_state_b[2] = (lru_state_b[2] & ~used_way[3]) | used_way[0]; | |
2829 | assign new_lru_state_b[3] = (lru_state_b[3] & ~used_way[2]) | used_way[1]; | |
2830 | assign new_lru_state_b[4] = (lru_state_b[4] & ~used_way[3]) | used_way[1]; | |
2831 | assign new_lru_state_b[5] = (lru_state_b[5] & ~used_way[3]) | used_way[2]; | |
2832 | ||
2833 | ||
2834 | lsu_dcc_ctl_msff_ctl_macro__width_13 dff_new_lru_w ( | |
2835 | .scan_in(dff_new_lru_w_scanin), | |
2836 | .scan_out(dff_new_lru_w_scanout), | |
2837 | .l1clk (l1clk_pm1), | |
2838 | .din ({new_lru_state_b[5:0],lru_state_b[5:0], ld_inst_vld_b}), | |
2839 | .dout ({new_lru_state_w[5:0],old_lru_state_w[5:0],ld_inst_vld_w}), | |
2840 | .siclk(siclk), | |
2841 | .soclk(soclk) | |
2842 | ); | |
2843 | ||
2844 | lsu_dcc_ctl_msff_ctl_macro__width_7 dff_new_lru_w2 ( | |
2845 | .scan_in(dff_new_lru_w2_scanin), | |
2846 | .scan_out(dff_new_lru_w2_scanout), | |
2847 | .din ({lru_state_w[5:0], ld_inst_vld_w}), | |
2848 | .dout ({lru_state_w2[5:0],ld_inst_vld_w2}), | |
2849 | .l1clk(l1clk), | |
2850 | .siclk(siclk), | |
2851 | .soclk(soclk) | |
2852 | ); | |
2853 | ||
2854 | // LRU state should not be updated on full RAWs which miss the cache or non-cacheable loads | |
2855 | // The full RAW timing is too critical to use in B, so it gets factored in in W. | |
2856 | ||
2857 | assign update_lru_noraw_b = ld_inst_vld_b & ~ncache_rq_b; | |
2858 | assign update_lru_raw_b = ld_inst_vld_b & ~ncache_rq_b & tlb_cache_hit_b; | |
2859 | ||
2860 | lsu_dcc_ctl_msff_ctl_macro__width_20 dff_update_lru ( | |
2861 | .scan_in(dff_update_lru_scanin), | |
2862 | .scan_out(dff_update_lru_scanout), | |
2863 | .l1clk (l1clk_pm1), | |
2864 | .din ({update_lru_noraw_b,update_lru_raw_b,lsu_va_b[20:3]}), | |
2865 | .dout ({update_lru_noraw_w,update_lru_raw_w,va_w[20:3]}), | |
2866 | .siclk(siclk), | |
2867 | .soclk(soclk) | |
2868 | ); | |
2869 | ||
2870 | assign lsu_va_w[12:3] = va_w[12:3]; | |
2871 | ||
2872 | assign dcc_lru_wr_addr_w[10:6] = mbi_run_local ? mbi_addr[4:0] : va_w[10:6]; | |
2873 | ||
2874 | assign dcc_lru_rvld_e = mbi_run_local ? mbi_lru_read_en : dcache_read_e; | |
2875 | assign lru_new_state = (lmc_full_raw_w ? update_lru_raw_w : update_lru_noraw_w) & ~flush_w; | |
2876 | assign dcc_lru_wvld_w = mbi_run_local ? mbi_lru_write_en : lru_new_state; | |
2877 | ||
2878 | assign lru_state_w[5:0] = lru_new_state ? new_lru_state_w[5:0] : old_lru_state_w[5:0]; | |
2879 | ||
2880 | assign dcc_lru_wdata_w[5:0] = mbi_run_local ? mbi_wdata[5:0] : new_lru_state_w[5:0]; | |
2881 | ||
2882 | assign dcc_lru_wen_w[0] = mbi_run_local ? (~mbi_addr[6] & ~mbi_addr[5]) : (~va_w[5] & ~va_w[4]); | |
2883 | assign dcc_lru_wen_w[1] = mbi_run_local ? (~mbi_addr[6] & mbi_addr[5]) : (~va_w[5] & va_w[4]); | |
2884 | assign dcc_lru_wen_w[2] = mbi_run_local ? ( mbi_addr[6] & ~mbi_addr[5]) : ( va_w[5] & ~va_w[4]); | |
2885 | assign dcc_lru_wen_w[3] = mbi_run_local ? ( mbi_addr[6] & mbi_addr[5]) : ( va_w[5] & va_w[4]); | |
2886 | ||
2887 | ||
2888 | //////////////////////////////////////////////////////////////////////////////// | |
2889 | // LMQ packet formating | |
2890 | //////////////////////////////////////////////////////////////////////////////// | |
2891 | ||
2892 | // Second packet of CAS uses load packet port. Otherwise it's a normal load. | |
2893 | assign ld_rq_type[2:0] = atomic_b ? 3'b011 : 3'b000; | |
2894 | ||
2895 | // Non-cacheable requests (all will sync the thread and initiate a pcx request) | |
2896 | assign ncache_rq_b = | |
2897 | (tlb_tte_vld_b & ~tlb_tte_cp_b) | // page has CP=0 | |
2898 | (tlb_tte_vld_b & tlb_tte_ie_b) | // page has IE=1 | |
2899 | atomic_b | // cas,ldstub,swap | |
2900 | pgnum_b39_qual | // IO access | |
2901 | ldst_dbl_b & (~fpld_inst_b | (altspace_ldst_b & blk_asi_b)) | // LDD and blk-ld | |
2902 | dcc_asi_load_b | // internal ASI loads do not allocate | |
2903 | pref_inst_b | // Prefetch does not allocate in the L1 caches | |
2904 | ~dcache_enable_b; // all loads are NC when D$ disabled | |
2905 | ||
2906 | assign dcc_ncache_b = ncache_rq_b; | |
2907 | ||
2908 | // The way should not matter for CAS since it's non-cacheable | |
2909 | //assign ld_pkt_way_b[1:0] = casa_inst_b ? 2'b00 : ld_way_b[1:0]; | |
2910 | assign ld_pkt_way_b[1:0] = ld_way_b[1:0]; | |
2911 | ||
2912 | assign mem_ld_miss_ctl[60:40] = { | |
2913 | 1'b0, | |
2914 | fld_odd32b_b, | |
2915 | fld_32b_b, | |
2916 | fpld_inst_b, | |
2917 | fld_sxt_fsr_b, | |
2918 | ~l1hit_lendian_b, | |
2919 | ld_rd_b[4:0], | |
2920 | (ldst_dbl_b & (~fpld_inst_b | (altspace_ldst_b & blk_asi_b))) | pref_ice_b, | |
2921 | ldst_sz_b[1],ldst_sz_b0_b, | |
2922 | ld_rq_type[2:0], | |
2923 | ncache_rq_b, | |
2924 | pref_inst_b, | |
2925 | ld_pkt_way_b[1:0] | |
2926 | }; | |
2927 | assign dcc_ld_miss_ldd = mem_ld_miss_ctl[49] & ~pref_ice_b; | |
2928 | ||
2929 | assign asi_ld_miss_ctl[60:40] = { | |
2930 | 1'b1, | |
2931 | 3'b000, | |
2932 | asi_indet_b, | |
2933 | asi_rngf_b, | |
2934 | ld_rd_b[4:0], | |
2935 | asi_type_b[1:0], | |
2936 | dcc_asi_b[7:0] | |
2937 | }; | |
2938 | ||
2939 | assign dcc_ld_miss_ctl[60:40] = (dcc_asi_load_b & ~dcc_asi_iomap_b) ? asi_ld_miss_ctl[60:40] : mem_ld_miss_ctl[60:40]; | |
2940 | ||
2941 | //////////////////////////////////////////////////////////////////////////////// | |
2942 | // Signal sync instructions (flush/membar/stbar) to the store buffers | |
2943 | //////////////////////////////////////////////////////////////////////////////// | |
2944 | ||
2945 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_sync_inst_w ( | |
2946 | .scan_in(dff_sync_inst_w_scanin), | |
2947 | .scan_out(dff_sync_inst_w_scanout), | |
2948 | .l1clk (l1clk_pm1), | |
2949 | .din (sync_inst_b), | |
2950 | .dout (sync_inst_w), | |
2951 | .siclk(siclk), | |
2952 | .soclk(soclk) | |
2953 | ); | |
2954 | ||
2955 | assign dcc_sync_inst_w[0] = sync_inst_w & thread_w[0] & ~flush_w; | |
2956 | assign dcc_sync_inst_w[1] = sync_inst_w & thread_w[1] & ~flush_w; | |
2957 | assign dcc_sync_inst_w[2] = sync_inst_w & thread_w[2] & ~flush_w; | |
2958 | assign dcc_sync_inst_w[3] = sync_inst_w & thread_w[3] & ~flush_w; | |
2959 | assign dcc_sync_inst_w[4] = sync_inst_w & thread_w[4] & ~flush_w; | |
2960 | assign dcc_sync_inst_w[5] = sync_inst_w & thread_w[5] & ~flush_w; | |
2961 | assign dcc_sync_inst_w[6] = sync_inst_w & thread_w[6] & ~flush_w; | |
2962 | assign dcc_sync_inst_w[7] = sync_inst_w & thread_w[7] & ~flush_w; | |
2963 | ||
2964 | //////////////////////////////////////////////////////////////////////////////// | |
2965 | ||
2966 | // Encode store request types | |
2967 | assign st_rq_type_b[1] = (atomic_b & ~casa_inst_b) | asi_type_b[1]; | |
2968 | assign st_rq_type_b[0] = atomic_b | asi_type_b[0]; | |
2969 | ||
2970 | lsu_dcc_ctl_msff_ctl_macro__width_3 dff_st_type_w ( | |
2971 | .scan_in(dff_st_type_w_scanin), | |
2972 | .scan_out(dff_st_type_w_scanout), | |
2973 | .l1clk (l1clk_pm1), | |
2974 | .din ({st_rq_type_b[1:0], st_inst_vld_b}), | |
2975 | .dout ({dcc_st_rq_type_w[1:0],st_inst_vld_w}), | |
2976 | .siclk(siclk), | |
2977 | .soclk(soclk) | |
2978 | ); | |
2979 | ||
2980 | ||
2981 | //////////////////////////////////////////////////////////////////////////////// | |
2982 | // Parity generation | |
2983 | //////////////////////////////////////////////////////////////////////////////// | |
2984 | ||
2985 | // Parity invert. Parity can be inverted by diagnostic accesses. | |
2986 | // UE/ND errors from L2 also cause an error to be injected | |
2987 | // NOTE : lmc_l2_uerr will not assert when dca_diag_wr_e is high | |
2988 | // 0in bits_on -var {lmc_l2_uerr,dca_diag_wr_e} -max 1 | |
2989 | ||
2990 | assign dcc_parity_invert[7:0] = (va_w[20:13] & {8{dca_diag_wr_e}}) | {8{(cic_cpq_ld_sel & lmc_l2_uerr)}}; | |
2991 | ||
2992 | assign dcc_dta_parity = mbi_run_local ? mbi_wdata[5] : ((dta_diag_wr_e & va_w[13]) ^ lmd_wrtag_parity_e); | |
2993 | ||
2994 | //////////////////////////////////////////////////////////////////////////////// | |
2995 | // Exceptions (listed in order of priority) | |
2996 | //////////////////////////////////////////////////////////////////////////////// | |
2997 | ||
2998 | // mux in the privilege status | |
2999 | assign pstate_priv_d = (thread0_d & tlu_lsu_pstate_priv[0]) | | |
3000 | (thread1_d & tlu_lsu_pstate_priv[1]) | | |
3001 | (thread2_d & tlu_lsu_pstate_priv[2]) | | |
3002 | (thread3_d & tlu_lsu_pstate_priv[3]) | | |
3003 | (thread4_d & tlu_lsu_pstate_priv[4]) | | |
3004 | (thread5_d & tlu_lsu_pstate_priv[5]) | | |
3005 | (thread6_d & tlu_lsu_pstate_priv[6]) | | |
3006 | (thread7_d & tlu_lsu_pstate_priv[7]) ; | |
3007 | ||
3008 | assign hpstate_hpriv_d = (thread0_d & tlu_lsu_hpstate_hpriv[0]) | | |
3009 | (thread1_d & tlu_lsu_hpstate_hpriv[1]) | | |
3010 | (thread2_d & tlu_lsu_hpstate_hpriv[2]) | | |
3011 | (thread3_d & tlu_lsu_hpstate_hpriv[3]) | | |
3012 | (thread4_d & tlu_lsu_hpstate_hpriv[4]) | | |
3013 | (thread5_d & tlu_lsu_hpstate_hpriv[5]) | | |
3014 | (thread6_d & tlu_lsu_hpstate_hpriv[6]) | | |
3015 | (thread7_d & tlu_lsu_hpstate_hpriv[7]) ; | |
3016 | ||
3017 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_priv_state_e ( | |
3018 | .scan_in(dff_priv_state_e_scanin), | |
3019 | .scan_out(dff_priv_state_e_scanout), | |
3020 | .l1clk (l1clk), | |
3021 | .din ({pstate_priv_d,hpstate_hpriv_d}), | |
3022 | .dout ({pstate_priv_e,hpstate_hpriv_e}), | |
3023 | .siclk(siclk), | |
3024 | .soclk(soclk) | |
3025 | ); | |
3026 | ||
3027 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_priv_state_m ( | |
3028 | .scan_in(dff_priv_state_m_scanin), | |
3029 | .scan_out(dff_priv_state_m_scanout), | |
3030 | .l1clk (l1clk_pm1), | |
3031 | .din ({pstate_priv_e,hpstate_hpriv_e}), | |
3032 | .dout ({pstate_priv_m,hpstate_hpriv_m}), | |
3033 | .siclk(siclk), | |
3034 | .soclk(soclk) | |
3035 | ); | |
3036 | ||
3037 | assign bst_priv_m = ((sbc_tid_m[2:0] == 3'd0) & tlu_lsu_pstate_priv[0]) | | |
3038 | ((sbc_tid_m[2:0] == 3'd1) & tlu_lsu_pstate_priv[1]) | | |
3039 | ((sbc_tid_m[2:0] == 3'd2) & tlu_lsu_pstate_priv[2]) | | |
3040 | ((sbc_tid_m[2:0] == 3'd3) & tlu_lsu_pstate_priv[3]) | | |
3041 | ((sbc_tid_m[2:0] == 3'd4) & tlu_lsu_pstate_priv[4]) | | |
3042 | ((sbc_tid_m[2:0] == 3'd5) & tlu_lsu_pstate_priv[5]) | | |
3043 | ((sbc_tid_m[2:0] == 3'd6) & tlu_lsu_pstate_priv[6]) | | |
3044 | ((sbc_tid_m[2:0] == 3'd7) & tlu_lsu_pstate_priv[7]) ; | |
3045 | ||
3046 | assign bst_hpriv_m = ((sbc_tid_m[2:0] == 3'd0) & tlu_lsu_hpstate_hpriv[0]) | | |
3047 | ((sbc_tid_m[2:0] == 3'd1) & tlu_lsu_hpstate_hpriv[1]) | | |
3048 | ((sbc_tid_m[2:0] == 3'd2) & tlu_lsu_hpstate_hpriv[2]) | | |
3049 | ((sbc_tid_m[2:0] == 3'd3) & tlu_lsu_hpstate_hpriv[3]) | | |
3050 | ((sbc_tid_m[2:0] == 3'd4) & tlu_lsu_hpstate_hpriv[4]) | | |
3051 | ((sbc_tid_m[2:0] == 3'd5) & tlu_lsu_hpstate_hpriv[5]) | | |
3052 | ((sbc_tid_m[2:0] == 3'd6) & tlu_lsu_hpstate_hpriv[6]) | | |
3053 | ((sbc_tid_m[2:0] == 3'd7) & tlu_lsu_hpstate_hpriv[7]) ; | |
3054 | ||
3055 | assign pstate_priv_m_in = (sbc_bst_in_prog_m & bst_priv_m) | | |
3056 | (twocycle_b & pstate_priv_b) | | |
3057 | (~(sbc_bst_in_prog_m | twocycle_b) & pstate_priv_m); | |
3058 | assign hpstate_hpriv_m_in = (sbc_bst_in_prog_m & bst_hpriv_m) | | |
3059 | (twocycle_b & hpstate_hpriv_b) | | |
3060 | (~(sbc_bst_in_prog_m | twocycle_b) & hpstate_hpriv_m); | |
3061 | ||
3062 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_priv_state_b ( | |
3063 | .scan_in(dff_priv_state_b_scanin), | |
3064 | .scan_out(dff_priv_state_b_scanout), | |
3065 | .din ({pstate_priv_m_in,hpstate_hpriv_m_in}), | |
3066 | .dout ({pstate_priv_b, hpstate_hpriv_b}), | |
3067 | .l1clk(l1clk), | |
3068 | .siclk(siclk), | |
3069 | .soclk(soclk) | |
3070 | ); | |
3071 | ||
3072 | assign dcc_priv_b = pstate_priv_b; | |
3073 | assign dcc_hpriv_b = hpstate_hpriv_b; | |
3074 | ||
3075 | // TTE's are not valid for internal ASIs and cases where the VA was out-of-range | |
3076 | assign tlb_tte_vld_b = (ld_inst_vld_b | st_inst_vld_b) & ~tlb_bypass_b & tlb_cam_hit & ~tlb_cam_mhit & ~asi_internal_b & ~exu_va_oor_b; | |
3077 | ||
3078 | // Qualify tlb_pgnum_b39 with cam_mhit to prevent propagation of bad data | |
3079 | assign pgnum_b39_qual = tlb_pgnum_b39 & ~tlb_cam_mhit; | |
3080 | ||
3081 | // Make an M stage version. This won't reflect the result of tlb_miss, so that has to be factored in elsewhere. | |
3082 | // This is only used for endian determination, so exu_va_oor doesn't have to be factored. | |
3083 | assign dcc_tte_vld_m = (ld_inst_vld_m | st_inst_vld_m) & ~tlb_bypass_m & ~asi_internal_m; | |
3084 | ||
3085 | ||
3086 | //////////////////////////////////////// | |
3087 | // illegal_instruction | |
3088 | // - illegal register alignment | |
3089 | // - illegal rs/rd values for RDPR/RDASR/WRPR/WRASR | |
3090 | // - partial store ASI with i=1 | |
3091 | // - wrpr %tick in mode other than hpriv or wrasr to %tick (%asr4) | |
3092 | // - wrhpr to %hver (Rd=6) | |
3093 | // - access to pr<=3 or hpr==1 when tl=0 and not in user mode | |
3094 | ||
3095 | assign blk_rd_align_err_m = blk_inst_m & asi_legal_m & ~bad_fp_asi & |(ld_rd_m[2:0]); | |
3096 | assign rd_odd_align_err_m = (ld_inst_vld_m | st_inst_vld_m) & (ldst_dbl_m & ~fpldst_inst_vld_m) & ld_rd_m[0]; | |
3097 | ||
3098 | assign illegal_spr_m = ~asr_legal_m & ~altspace_ldst_m; | |
3099 | ||
3100 | assign pst_with_imm_m = pst_asi_m & asi_legal_m & ~imm_asi_vld_m & ~bad_fp_asi & ~asi_wo_viol; | |
3101 | ||
3102 | assign priv_wrpr_tick_m = st_inst_vld_m & (ld_rd_inst_m[4:0] == 5'b00100) & | |
3103 | ((pr_inst_m & ~hpstate_hpriv_m & pstate_priv_m) | sr_inst_m); | |
3104 | ||
3105 | assign wrhpr_ver_m = hpr_inst_m & st_inst_vld_m & (ld_rd_inst_m[3:0] == 4'b0110); | |
3106 | ||
3107 | assign tl_eq_0_m = (ld_inst_vld_m | st_inst_vld_m) & ~tl_gt_0_m & (pstate_priv_m | hpstate_hpriv_m) & | |
3108 | ((pr_inst_m & dcc_asi_m[4:2]==3'b000) | (hpr_inst_m & dcc_asi_m[4:0]==5'b00001)); | |
3109 | ||
3110 | assign illegal_inst_m = (blk_rd_align_err_m | rd_odd_align_err_m | pst_with_imm_m | | |
3111 | illegal_spr_m | priv_wrpr_tick_m | wrhpr_ver_m | | |
3112 | tl_eq_0_m) & | |
3113 | (ld_inst_vld_m | st_inst_vld_m); | |
3114 | ||
3115 | //////////////////////////////////////// | |
3116 | // mem_address_not_aligned | |
3117 | // Alignment is checked against the VA, unless the instruction | |
3118 | // alignment is modified by an ASI. ASI modifiers are only used | |
3119 | // if a proper instruction/ASI combination is present. | |
3120 | ||
3121 | assign hw_aligned = ~lsu_va_m[0]; | |
3122 | assign wd_aligned = ~|(lsu_va_m[1:0]); | |
3123 | assign dw_aligned = ~|(lsu_va_m[2:0]); | |
3124 | assign qw_aligned = ~|(lsu_va_m[3:0]); | |
3125 | assign bl_aligned = ~|(lsu_va_m[5:0]); | |
3126 | ||
3127 | assign hw_size = bad_fp_asi ? (ldst_sz_m[1:0] == 2'b01) : (ldst_sz_mod_m[1:0] == 2'b01); | |
3128 | assign wd_size = bad_fp_asi ? (ldst_sz_m[1:0] == 2'b10) : (ldst_sz_mod_m[1:0] == 2'b10); | |
3129 | assign dw_size = (bad_fp_asi ? (ldst_sz_m[1:0] == 2'b11) : (ldst_sz_mod_m[1:0] == 2'b11)) & ~bl_size; | |
3130 | assign qw_size = quad_ld_m; | |
3131 | assign bl_size = blk_inst_m; | |
3132 | ||
3133 | assign mem_addr_not_aligned = | |
3134 | (st_inst_vld_m | (ld_inst_vld_m & ~pref_inst_m)) & | |
3135 | ~(sr_inst_m | pr_inst_m | hpr_inst_m) & | |
3136 | ((hw_size & ~hw_aligned) | | |
3137 | (wd_size & ~wd_aligned) | | |
3138 | (dw_size & ~dw_aligned) | | |
3139 | (qw_size & ~qw_aligned) | | |
3140 | (bl_size & ~bl_aligned)) & | |
3141 | ~(lddf_not_aligned | stdf_not_aligned); | |
3142 | ||
3143 | assign lddf_not_aligned = fpldst_inst_vld_m & ldst_dbl_m & ld_inst_vld_m & dw_size & wd_aligned & ~dw_aligned; | |
3144 | assign stdf_not_aligned = fpldst_inst_vld_m & ldst_dbl_m & st_inst_vld_m & dw_size & wd_aligned & ~dw_aligned; | |
3145 | ||
3146 | //////////////////////////////////////// | |
3147 | // privileged_action | |
3148 | // - ASI privilege violations | |
3149 | // ASI's 0x00-0x2F are privileged | |
3150 | // ASI's 0x30-0x7F are hyperprivileged | |
3151 | // NOTE: If TL>0, the implicit ASI=0x04, so user access should cause the trap | |
3152 | ||
3153 | // priv access to hpriv ASI's | |
3154 | assign hpriv_asi = ~dcc_asi_m[7] & (dcc_asi_m[6] | (dcc_asi_m[5] & dcc_asi_m[4])); | |
3155 | ||
3156 | assign hpriv_asi_excp = altspace_ldst_m & (hpriv_asi & ~hpstate_hpriv_m & pstate_priv_m); | |
3157 | ||
3158 | assign priv_action_m = (ld_inst_vld_m | st_inst_vld_m) & // valid ld/st inst. AND | |
3159 | ~(sr_inst_m | pr_inst_m | hpr_inst_m) & // NOT WRSR/WRPR/WRHPR AND | |
3160 | ((((altspace_ldst_m & ~dcc_asi_m[7]) | // explicit ASI<0x80 OR | |
3161 | (~altspace_ldst_m & tl_gt_0_m)) & // implicit ASI=0x04 AND | |
3162 | ~(hpstate_hpriv_m | pstate_priv_m)) | // in user mode OR | |
3163 | hpriv_asi_excp); // priv access to hpriv ASIs | |
3164 | ||
3165 | //////////////////////////////////////// | |
3166 | // data_access_exception | |
3167 | // - attempts to access privileged pages when PSTATE.PRIV=0 | |
3168 | // - atomic accesses to ASIs other than those specifically allowed | |
3169 | // - atomic accesses to non-cacheable pages (TTE.CP=0) | |
3170 | // - access to NFO page with an ASI other than non-fault | |
3171 | // - access to NFO page with TTE.E=1 | |
3172 | // - non-priv access to pages with TTE.P set | |
3173 | // - invalid ASIs | |
3174 | // - undefined/unimplemented ASI values | |
3175 | // - disallowed ASI/instruction combination | |
3176 | // - write to read-only or read to write-only | |
3177 | // - internal ASIs with bad VA | |
3178 | ||
3179 | assign illegal_asi_m = ~asi_legal_m & altspace_ldst_m; | |
3180 | ||
3181 | assign non_atomic_asi_m = atomic_m & ~atomic_asi_m; | |
3182 | ||
3183 | assign atomic_uncache_b = (atomic_b | quad_ldd_b) & ((tlb_tte_vld_b & ~tlb_tte_cp_b) | (pgnum_b39_qual & tlb_cam_hit)); | |
3184 | ||
3185 | assign nfo_pg_nonnfo_asi_b = (ld_inst_vld_b | st_inst_vld_b) & tlb_tte_nfo_b & ~nofault_asi_b & tlb_tte_vld_b; | |
3186 | ||
3187 | assign nfo_asi_ebit_b = ld_inst_vld_b & nofault_asi_b & ((tlb_tte_ebit_b & tlb_tte_vld_b) | (tlb_bypass_b & pgnum_b39_qual)); | |
3188 | ||
3189 | assign user_page_access_m = (ld_inst_vld_m | st_inst_vld_m) & (as_if_user_asi_m | ~(hpstate_hpriv_m | pstate_priv_m)); | |
3190 | ||
3191 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_usr_pg_access_b ( | |
3192 | .scan_in(dff_usr_pg_access_b_scanin), | |
3193 | .scan_out(dff_usr_pg_access_b_scanout), | |
3194 | .l1clk (l1clk_pm1), | |
3195 | .din (user_page_access_m), | |
3196 | .dout (user_page_access_b), | |
3197 | .siclk(siclk), | |
3198 | .soclk(soclk) | |
3199 | ); | |
3200 | assign priv_page_viol_b = user_page_access_b & tlb_tte_pbit_b & tlb_tte_vld_b; | |
3201 | ||
3202 | // Internal ASI's can only be accessed with LDXA/STXA | |
3203 | assign ldxa_asi_exception = (ld_inst_vld_m | st_inst_vld_m) & asi_internal_m & (~(ldst_sz_mod_m[1:0] == 2'b11) | ldst_dbl_m); | |
3204 | ||
3205 | // Quad ASI's can only be accessed via LDDA | |
3206 | assign quad_ldda_exception = (ld_inst_vld_m & quad_asi_m & (fpldst_inst_vld_m | ~ldst_dbl_m)) | | |
3207 | (st_inst_vld_m & quad_asi_m & ~binit_quad_asi_m); | |
3208 | ||
3209 | // Block load/store ASI's can only be accessed via LDDFA/STDFA | |
3210 | assign block_inst_exception = blk_asi_m & ~(ldst_dbl_m & fpldst_inst_vld_m) & (ld_inst_vld_m | st_inst_vld_m); | |
3211 | ||
3212 | // Block loads to IO are not allowed | |
3213 | assign bld_to_io_b = ld_inst_vld_b & blk_asi_b & altspace_ldst_b & fpldst_inst_vld_b & ldst_dbl_b & pgnum_b39_qual & tlb_cam_hit; | |
3214 | ||
3215 | // Stores to nofault asi's are not allowed | |
3216 | assign nofault_st_exception = st_inst_vld_m & nofault_asi_m; | |
3217 | ||
3218 | // ASI_FL* and ASI_PST* only with LDDFA/STDFA | |
3219 | assign bad_fp_asi = (asi_sz_byte_m | asi_sz_hw_m | pst_asi_m) & ~(ldst_dbl_m & fpldst_inst_vld_m) & (ld_inst_vld_m | st_inst_vld_m); | |
3220 | ||
3221 | // BLK_INIT_ST only allowed with integer stores | |
3222 | assign bis_with_fp = st_inst_vld_m & binit_quad_asi_m & fpldst_inst_vld_m; | |
3223 | ||
3224 | // read-only/write-only violations (the ones from asi decode only indicate if the entire ASI is RO/WO) | |
3225 | assign asi_ro_viol = (altspace_ldst_m & st_inst_vld_m) & | |
3226 | (asi_read_only_m | | |
3227 | ((dcc_asi_m[7:0] == 8'h40) & ((lsu_va_m[7:5] == 3'b101) | // 0x40/0xA0 | |
3228 | (lsu_va_m[5:4] == 2'b11) ) // 0x40/0x30 | |
3229 | ) | | |
3230 | ((dcc_asi_m[7:0] == 8'h41) & ((lsu_va_m[7:5] == 3'b000) | // 0x41/0x0+0x10 | |
3231 | (lsu_va_m[7:3] == 5'b01011)) // 0x41/0x58 | |
3232 | ) | | |
3233 | ((dcc_asi_m[7:0] == 8'h50) & (lsu_va_m[7:4] == 4'b0000) // 0x50/0x0 | |
3234 | ) | | |
3235 | ((dcc_asi_m[7:0] == 8'h58) & ((lsu_va_m[7:4] == 4'b0000) | // 0x58/0x0 | |
3236 | (lsu_va_m[7:4] == 4'b0010)) // 0x58/0x20 | |
3237 | ) | | |
3238 | ((dcc_asi_m[7:0] == 8'h54) & ((lsu_va_m[7]&!lsu_va_m[4]) | // 0x54/0x50-0x88 | |
3239 | (lsu_va_m[7]&lsu_va_m[3]) | | |
3240 | (lsu_va_m[6]&lsu_va_m[5]) | | |
3241 | (lsu_va_m[6]&lsu_va_m[4])) | |
3242 | ) | | |
3243 | ((dcc_asi_m[7:0] == 8'h4c) & ((lsu_va_m[5]) | // 0x4c/0x20-0x28 | |
3244 | (lsu_va_m[5:4] == 2'b00)) // 0x4c/0x0-0x8 | |
3245 | ) | |
3246 | ); | |
3247 | ||
3248 | assign asi_wo_viol = (altspace_ldst_m & ld_inst_vld_m) & | |
3249 | (asi_write_only_m | | |
3250 | ((dcc_asi_m[7:0] == 8'h40) & (lsu_va_m[5:3] == 3'b101) // 0x40/0x28 | |
3251 | ) | | |
3252 | ((dcc_asi_m[7:0] == 8'h41) & (lsu_va_m[7:4] == 4'b0110) // 0x41/0x60+0x68 | |
3253 | ) | | |
3254 | ((dcc_asi_m[7:0] == 8'h54) & (lsu_va_m[7:4] == 4'b0000) // 0x54/0x0+0x400+0x800+0xC00 | |
3255 | ) | |
3256 | ); | |
3257 | ||
3258 | // Check for valid ASI/VA accesses. ASI's which provide diagnostic access to | |
3259 | // arrays have wide allowable ranges, so they are not checked. All other internal | |
3260 | // ASI's are strictly checked. Excluding array diag and demap ASI's, all others | |
3261 | // only use the bottom 12 bits of the VA, so [47:12] must be zeros. | |
3262 | assign bad_asi_va_exception_m = altspace_ldst_m & asi_internal_m & ~asi_no_va_check_m & | |
3263 | (~legal_asi_va_m | (|(lsu_va_m[15:12])) | ~tld_va_m_eq_zero) ; | |
3264 | ||
3265 | // Writes to the interrupt queue registers (ASI=0x25) by supervisor is not allowed. | |
3266 | assign wrpriv_intq_reg_m = (altspace_ldst_m & st_inst_vld_m) & (dcc_asi_m[7:0] == 8'h25) & | |
3267 | lsu_va_m[3] & ~hpstate_hpriv_m & pstate_priv_m; | |
3268 | //assign wrpriv_intq_reg_m = 1'b0; | |
3269 | ||
3270 | assign dae_invalid_asi_m = illegal_asi_m | ldxa_asi_exception | quad_ldda_exception | | |
3271 | asi_ro_viol | asi_wo_viol | | |
3272 | non_atomic_asi_m | bad_asi_va_exception_m| | |
3273 | block_inst_exception | nofault_st_exception | bad_fp_asi | | |
3274 | bis_with_fp | wrpriv_intq_reg_m; | |
3275 | ||
3276 | lsu_dcc_ctl_msff_ctl_macro__width_5 dff_excp_b ( | |
3277 | .scan_in(dff_excp_b_scanin), | |
3278 | .scan_out(dff_excp_b_scanout), | |
3279 | .l1clk (l1clk_pm1), | |
3280 | .din ({dae_invalid_asi_m,dcc_tlb_bypass,tlb_bypass_m,dcc_tlb_real,tlb_real_m}), | |
3281 | .dout ({dae_invalid_asi_b,tlb_bypass_m, tlb_bypass_b,tlb_real_m, tlb_real_b}), | |
3282 | .siclk(siclk), | |
3283 | .soclk(soclk) | |
3284 | ); | |
3285 | ||
3286 | assign lsu_tlb_bypass_b = tlb_bypass_b; | |
3287 | assign lsu_tlb_real_b = tlb_real_b; | |
3288 | ||
3289 | assign access_exception_b = ~pref_inst_b & | |
3290 | (dae_invalid_asi_b | nfo_pg_nonnfo_asi_b | priv_page_viol_b | atomic_uncache_b | | |
3291 | nfo_asi_ebit_b | bld_to_io_b); | |
3292 | assign lsu_dae_invalid_asi_b = ~pref_inst_b & dae_invalid_asi_b; | |
3293 | assign lsu_dae_nc_page_b = ~pref_inst_b & (atomic_uncache_b | bld_to_io_b); | |
3294 | assign lsu_dae_nfo_page_b = ~pref_inst_b & nfo_pg_nonnfo_asi_b; | |
3295 | assign lsu_dae_priv_viol_b = ~pref_inst_b & priv_page_viol_b; | |
3296 | assign lsu_dae_so_page = ~pref_inst_b & nfo_asi_ebit_b; | |
3297 | ||
3298 | //////////////////////////////////////// | |
3299 | // watchpoint exceptions | |
3300 | // Only one exception (VA or PA) can be enabled per thread. | |
3301 | // If both are enabled in ASI_LSU_CONTROL_REG, only VA will be checked. | |
3302 | // Nontranslating(internal) or illegal ASI's should not cause wpt traps. | |
3303 | // RA->PA and bypass translations should not cause VA wpt traps. | |
3304 | assign va_wpt_en_m = dcs_wpt_mode_m[1] & dcs_wpt_mode_m[0] & | |
3305 | ~asi_internal_m & ~illegal_asi_m & ~tlb_bypass_m & ~tlb_real_m & ~hpstate_hpriv_m; | |
3306 | assign pa_wpt_en_m = dcs_wpt_mode_m[1] & ~dcs_wpt_mode_m[0] & | |
3307 | ~asi_internal_m & ~illegal_asi_m; | |
3308 | ||
3309 | assign va_wpt_rd_en_m = dcs_wpt_enable_m[1] & va_wpt_en_m; | |
3310 | assign va_wpt_wr_en_m = dcs_wpt_enable_m[0] & va_wpt_en_m; | |
3311 | assign pa_wpt_rd_en_m = dcs_wpt_enable_m[1] & pa_wpt_en_m; | |
3312 | assign pa_wpt_wr_en_m = dcs_wpt_enable_m[0] & pa_wpt_en_m; | |
3313 | ||
3314 | // ldst_bmask is positional and corresponds to the byte within the 64B dword | |
3315 | // Each bit of dcs_wpt_mask corresponds to the big endian byte address within | |
3316 | // the 64B dword | |
3317 | // ldst_bmask [7] [6] [5] [4] [3] [2] [1] [0] | |
3318 | // 64B dword byte0 byte1 byte2 byte3 byte4 byte5 byte6 byte7 | |
3319 | // dcs_wpt_mask [0] [1] [2] [3] [4] [5] [6] [7] | |
3320 | ||
3321 | assign wpt_bmask[7:0] = ldst_bmask[7:0] | {8{pst_asi_m & ~bad_fp_asi}}; | |
3322 | ||
3323 | assign mask_match_m = (wpt_bmask[7] & dcs_wpt_mask_m[0]) | | |
3324 | (wpt_bmask[6] & dcs_wpt_mask_m[1]) | | |
3325 | (wpt_bmask[5] & dcs_wpt_mask_m[2]) | | |
3326 | (wpt_bmask[4] & dcs_wpt_mask_m[3]) | | |
3327 | (wpt_bmask[3] & dcs_wpt_mask_m[4]) | | |
3328 | (wpt_bmask[2] & dcs_wpt_mask_m[5]) | | |
3329 | (wpt_bmask[1] & dcs_wpt_mask_m[6]) | | |
3330 | (wpt_bmask[0] & dcs_wpt_mask_m[7]) ; | |
3331 | ||
3332 | assign va_wpt_check_m = mask_match_m & ((va_wpt_rd_en_m & ld_inst_vld_m & ~pref_inst_m) | (va_wpt_wr_en_m & st_inst_vld_m)); | |
3333 | assign pa_wpt_check_m = mask_match_m & ((pa_wpt_rd_en_m & ld_inst_vld_m & ~pref_inst_m) | (pa_wpt_wr_en_m & st_inst_vld_m)); | |
3334 | ||
3335 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_wpt ( | |
3336 | .scan_in(dff_wpt_scanin), | |
3337 | .scan_out(dff_wpt_scanout), | |
3338 | .l1clk (l1clk_pm1), | |
3339 | .din ({va_wpt_check_m,pa_wpt_check_m}), | |
3340 | .dout ({va_wpt_check_b,pa_wpt_check_b}), | |
3341 | .siclk(siclk), | |
3342 | .soclk(soclk) | |
3343 | ); | |
3344 | ||
3345 | assign lsu_va_watchpoint_b = tgd_va_wp_47_16 & tgd_va_wp_15_3 & va_wpt_check_b; | |
3346 | assign lsu_pa_watchpoint_b = tgd_pa_wp_39_16 & tgd_pa_wp_15_3 & pa_wpt_check_b & ~tlb_cam_mhit; | |
3347 | ||
3348 | // 0in bits_on -var {lsu_va_watchpoint_b,lsu_pa_watchpoint_b} -max 1 -message "Both watchpoints fired!" | |
3349 | ||
3350 | ////////////////////////////////////////// | |
3351 | // Feedback from the ASI ring | |
3352 | ||
3353 | assign asi_rtn_vld_2f = arc_pid_ctl_2f[6]; | |
3354 | assign asi_rtn_excp_2f = arc_pid_ctl_2f[5] | arc_pid_ctl_2f[4]; | |
3355 | assign asi_rtn_rd_2f = arc_pid_ctl_2f[3]; | |
3356 | assign asi_rtn_tid_2f[2:0] = arc_pid_ctl_2f[2:0]; | |
3357 | ||
3358 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_asi_g ( | |
3359 | .scan_in(dff_asi_g_scanin), | |
3360 | .scan_out(dff_asi_g_scanout), | |
3361 | .din ({asi_rtn_vld_2f,asi_rtn_excp_2f,asi_rtn_rd_2f,asi_rtn_tid_2f[2:0]}), | |
3362 | .dout ({asi_rtn_vld_3f,asi_rtn_excp_3f,asi_rtn_rd_3f,asi_rtn_tid_3f[2:0]}), | |
3363 | .l1clk(l1clk), | |
3364 | .siclk(siclk), | |
3365 | .soclk(soclk) | |
3366 | ); | |
3367 | ||
3368 | assign dcc_asi_rtn_vld[0] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd0); | |
3369 | assign dcc_asi_rtn_vld[1] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd1); | |
3370 | assign dcc_asi_rtn_vld[2] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd2); | |
3371 | assign dcc_asi_rtn_vld[3] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd3); | |
3372 | assign dcc_asi_rtn_vld[4] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd4); | |
3373 | assign dcc_asi_rtn_vld[5] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd5); | |
3374 | assign dcc_asi_rtn_vld[6] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd6); | |
3375 | assign dcc_asi_rtn_vld[7] = asi_rtn_vld_3f & (asi_rtn_tid_3f[2:0] == 3'd7); | |
3376 | assign dcc_asi_rtn_excp = asi_rtn_excp_3f; | |
3377 | assign dcc_asi_rtn_rd = asi_rtn_rd_3f; | |
3378 | ||
3379 | ||
3380 | ////////////////////////////////////////// | |
3381 | // Outputs to TLU | |
3382 | ||
3383 | lsu_dcc_ctl_msff_ctl_macro__width_5 dff_except ( | |
3384 | .scan_in(dff_except_scanin), | |
3385 | .scan_out(dff_except_scanout), | |
3386 | .l1clk (l1clk_pm1), | |
3387 | .din ({mem_addr_not_aligned,lddf_not_aligned,stdf_not_aligned,priv_action_m,illegal_inst_m}), | |
3388 | .dout ({lsu_align_b, lsu_lddf_align_b,lsu_stdf_align_b,priv_action_b,lsu_illegal_inst_b}), | |
3389 | .siclk(siclk), | |
3390 | .soclk(soclk) | |
3391 | ); | |
3392 | ||
3393 | // Prefetch should not cause priv_action or tlb_miss exception | |
3394 | assign lsu_priv_action_b = priv_action_b & ~pref_inst_b; | |
3395 | assign lsu_tlb_miss_b_ = tlb_cam_hit | pref_inst_b | dae_invalid_asi_b; | |
3396 | ||
3397 | assign lsu_daccess_prot_b = (st_inst_vld_b & ~tlb_tte_wbit_b & tlb_tte_vld_b) & ~access_exception_b; | |
3398 | ||
3399 | // Some conditions cause prefetch instructions to be treated as NOP. These include | |
3400 | // prefetch to IO space | |
3401 | // prefetch with fcn=0x4,0x19-0x1f | |
3402 | // prefetcha with "bad" asi | |
3403 | // prefetch with fcn=0x18 and not hypervisor | |
3404 | // prefetcha with fcn=0x18 | |
3405 | assign nop_pref_func = (~ld_rd_b[4]&ld_rd_b[2]) | (ld_rd_b[3] & |(ld_rd_b[2:0]));// DEC detects illegal for 0x5-0xf | |
3406 | assign pref_ice_b = pref_inst_b & (ld_rd_b[3:0] == 4'b1000); | |
3407 | ||
3408 | assign pref_nop_b = pref_inst_b & | |
3409 | (pgnum_b39_qual | | |
3410 | nop_pref_func | | |
3411 | (altspace_ldst_b & (~asi_legal_b | (~nofault_asi_b & ~atomic_asi_b))) | | |
3412 | ((ld_rd_b[3:0] == 4'b1000) & (altspace_ldst_b | ~hpstate_hpriv_b)) | |
3413 | ); | |
3414 | ||
3415 | assign dcc_any_exception_b = lsu_align_b | lsu_lddf_align_b | lsu_stdf_align_b | | |
3416 | lsu_va_watchpoint_b | lsu_pa_watchpoint_b | lsu_dtmh_err_b | | |
3417 | priv_action_b | ~tlb_cam_hit | lsu_dttp_err_b | | |
3418 | lsu_illegal_inst_b | lsu_daccess_prot_b | lsu_dtdp_err_b | | |
3419 | access_exception_b | pref_nop_b | lsu_perfmon_trap_b; | |
3420 | ||
3421 | ||
3422 | assign lsu_tlu_dsfsr_ct_b[1:0] = context_enc_b[1:0]; | |
3423 | ||
3424 | // FGU needs exceptions for setting FSR.ftt | |
3425 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_fgu_excp_w ( | |
3426 | .scan_in(dff_fgu_excp_w_scanin), | |
3427 | .scan_out(dff_fgu_excp_w_scanout), | |
3428 | .l1clk (l1clk_pm1), | |
3429 | .din ((dcc_any_exception_b | exu_error_b)), | |
3430 | .dout (lsu_fgu_exception_w), | |
3431 | .siclk(siclk), | |
3432 | .soclk(soclk) | |
3433 | ); | |
3434 | ||
3435 | ||
3436 | //////////////////////////////////////////////////////////////////////// | |
3437 | // Logic for maintaining I$/D$ exlusivity | |
3438 | // I must store the index for each outgoing ifetch request so that | |
3439 | // if an invalidation is required, I know what line it applies to | |
3440 | //////////////////////////////////////////////////////////////////////// | |
3441 | ||
3442 | assign if_indx_0_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd0)) ? ifu_lsu_if_addr[10:5] : if_indx_0[10:5]; | |
3443 | assign if_indx_1_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd1)) ? ifu_lsu_if_addr[10:5] : if_indx_1[10:5]; | |
3444 | assign if_indx_2_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd2)) ? ifu_lsu_if_addr[10:5] : if_indx_2[10:5]; | |
3445 | assign if_indx_3_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd3)) ? ifu_lsu_if_addr[10:5] : if_indx_3[10:5]; | |
3446 | assign if_indx_4_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd4)) ? ifu_lsu_if_addr[10:5] : if_indx_4[10:5]; | |
3447 | assign if_indx_5_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd5)) ? ifu_lsu_if_addr[10:5] : if_indx_5[10:5]; | |
3448 | assign if_indx_6_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd6)) ? ifu_lsu_if_addr[10:5] : if_indx_6[10:5]; | |
3449 | assign if_indx_7_in[10:5] = (ifu_lsu_if_vld & (ifu_lsu_if_tid[2:0]==3'd7)) ? ifu_lsu_if_addr[10:5] : if_indx_7[10:5]; | |
3450 | ||
3451 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_0 ( | |
3452 | .scan_in(dff_if_indx_0_scanin), | |
3453 | .scan_out(dff_if_indx_0_scanout), | |
3454 | .l1clk (l1clk_pm2), | |
3455 | .din (if_indx_0_in[10:5]), | |
3456 | .dout (if_indx_0[10:5]), | |
3457 | .siclk(siclk), | |
3458 | .soclk(soclk) | |
3459 | ); | |
3460 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_1 ( | |
3461 | .scan_in(dff_if_indx_1_scanin), | |
3462 | .scan_out(dff_if_indx_1_scanout), | |
3463 | .l1clk (l1clk_pm2), | |
3464 | .din (if_indx_1_in[10:5]), | |
3465 | .dout (if_indx_1[10:5]), | |
3466 | .siclk(siclk), | |
3467 | .soclk(soclk) | |
3468 | ); | |
3469 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_2 ( | |
3470 | .scan_in(dff_if_indx_2_scanin), | |
3471 | .scan_out(dff_if_indx_2_scanout), | |
3472 | .l1clk (l1clk_pm2), | |
3473 | .din (if_indx_2_in[10:5]), | |
3474 | .dout (if_indx_2[10:5]), | |
3475 | .siclk(siclk), | |
3476 | .soclk(soclk) | |
3477 | ); | |
3478 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_3 ( | |
3479 | .scan_in(dff_if_indx_3_scanin), | |
3480 | .scan_out(dff_if_indx_3_scanout), | |
3481 | .l1clk (l1clk_pm2), | |
3482 | .din (if_indx_3_in[10:5]), | |
3483 | .dout (if_indx_3[10:5]), | |
3484 | .siclk(siclk), | |
3485 | .soclk(soclk) | |
3486 | ); | |
3487 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_4 ( | |
3488 | .scan_in(dff_if_indx_4_scanin), | |
3489 | .scan_out(dff_if_indx_4_scanout), | |
3490 | .l1clk (l1clk_pm2), | |
3491 | .din (if_indx_4_in[10:5]), | |
3492 | .dout (if_indx_4[10:5]), | |
3493 | .siclk(siclk), | |
3494 | .soclk(soclk) | |
3495 | ); | |
3496 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_5 ( | |
3497 | .scan_in(dff_if_indx_5_scanin), | |
3498 | .scan_out(dff_if_indx_5_scanout), | |
3499 | .l1clk (l1clk_pm2), | |
3500 | .din (if_indx_5_in[10:5]), | |
3501 | .dout (if_indx_5[10:5]), | |
3502 | .siclk(siclk), | |
3503 | .soclk(soclk) | |
3504 | ); | |
3505 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_6 ( | |
3506 | .scan_in(dff_if_indx_6_scanin), | |
3507 | .scan_out(dff_if_indx_6_scanout), | |
3508 | .l1clk (l1clk_pm2), | |
3509 | .din (if_indx_6_in[10:5]), | |
3510 | .dout (if_indx_6[10:5]), | |
3511 | .siclk(siclk), | |
3512 | .soclk(soclk) | |
3513 | ); | |
3514 | lsu_dcc_ctl_msff_ctl_macro__width_6 dff_if_indx_7 ( | |
3515 | .scan_in(dff_if_indx_7_scanin), | |
3516 | .scan_out(dff_if_indx_7_scanout), | |
3517 | .l1clk (l1clk_pm2), | |
3518 | .din (if_indx_7_in[10:5]), | |
3519 | .dout (if_indx_7[10:5]), | |
3520 | .siclk(siclk), | |
3521 | .soclk(soclk) | |
3522 | ); | |
3523 | ||
3524 | assign xinv_index[10:5] = ({6{(cid_tid[2:0] == 3'd0)}} & if_indx_0[10:5]) | | |
3525 | ({6{(cid_tid[2:0] == 3'd1)}} & if_indx_1[10:5]) | | |
3526 | ({6{(cid_tid[2:0] == 3'd2)}} & if_indx_2[10:5]) | | |
3527 | ({6{(cid_tid[2:0] == 3'd3)}} & if_indx_3[10:5]) | | |
3528 | ({6{(cid_tid[2:0] == 3'd4)}} & if_indx_4[10:5]) | | |
3529 | ({6{(cid_tid[2:0] == 3'd5)}} & if_indx_5[10:5]) | | |
3530 | ({6{(cid_tid[2:0] == 3'd6)}} & if_indx_6[10:5]) | | |
3531 | ({6{(cid_tid[2:0] == 3'd7)}} & if_indx_7[10:5]) ; | |
3532 | assign xinv_index[4] = cid_atomic; | |
3533 | ||
3534 | assign xinval_bit_wen_e[0] = ~xinv_index[5] & ~xinv_index[4] & ~cid_xway[1] & ~cid_xway[0]; | |
3535 | assign xinval_bit_wen_e[1] = ~xinv_index[5] & ~xinv_index[4] & ~cid_xway[1] & cid_xway[0]; | |
3536 | assign xinval_bit_wen_e[2] = ~xinv_index[5] & ~xinv_index[4] & cid_xway[1] & ~cid_xway[0]; | |
3537 | assign xinval_bit_wen_e[3] = ~xinv_index[5] & ~xinv_index[4] & cid_xway[1] & cid_xway[0]; | |
3538 | assign xinval_bit_wen_e[4] = ~xinv_index[5] & xinv_index[4] & ~cid_xway[1] & ~cid_xway[0]; | |
3539 | assign xinval_bit_wen_e[5] = ~xinv_index[5] & xinv_index[4] & ~cid_xway[1] & cid_xway[0]; | |
3540 | assign xinval_bit_wen_e[6] = ~xinv_index[5] & xinv_index[4] & cid_xway[1] & ~cid_xway[0]; | |
3541 | assign xinval_bit_wen_e[7] = ~xinv_index[5] & xinv_index[4] & cid_xway[1] & cid_xway[0]; | |
3542 | assign xinval_bit_wen_e[8] = xinv_index[5] & ~xinv_index[4] & ~cid_xway[1] & ~cid_xway[0]; | |
3543 | assign xinval_bit_wen_e[9] = xinv_index[5] & ~xinv_index[4] & ~cid_xway[1] & cid_xway[0]; | |
3544 | assign xinval_bit_wen_e[10] = xinv_index[5] & ~xinv_index[4] & cid_xway[1] & ~cid_xway[0]; | |
3545 | assign xinval_bit_wen_e[11] = xinv_index[5] & ~xinv_index[4] & cid_xway[1] & cid_xway[0]; | |
3546 | assign xinval_bit_wen_e[12] = xinv_index[5] & xinv_index[4] & ~cid_xway[1] & ~cid_xway[0]; | |
3547 | assign xinval_bit_wen_e[13] = xinv_index[5] & xinv_index[4] & ~cid_xway[1] & cid_xway[0]; | |
3548 | assign xinval_bit_wen_e[14] = xinv_index[5] & xinv_index[4] & cid_xway[1] & ~cid_xway[0]; | |
3549 | assign xinval_bit_wen_e[15] = xinv_index[5] & xinv_index[4] & cid_xway[1] & cid_xway[0]; | |
3550 | ||
3551 | //////////////////////////////////////////////////////////////////////// | |
3552 | // Parity error detection | |
3553 | //////////////////////////////////////////////////////////////////////// | |
3554 | ||
3555 | lsu_dcc_ctl_msff_ctl_macro__width_4 dff_way_vld_b ( | |
3556 | .scan_in(dff_way_vld_b_scanin), | |
3557 | .scan_out(dff_way_vld_b_scanout), | |
3558 | .l1clk (l1clk_pm1), | |
3559 | .din (tgc_cache_way_vld_m[3:0]), | |
3560 | .dout (cache_way_vld_b[3:0]), | |
3561 | .siclk(siclk), | |
3562 | .soclk(soclk) | |
3563 | ); | |
3564 | ||
3565 | // Valid bit errors have top priority | |
3566 | assign dval_perr_b[0] = dcache_read_b & tgc_verr_b[0] & cerer_dcvp & ~pgnum_b39_qual; | |
3567 | assign dval_perr_b[1] = dcache_read_b & tgc_verr_b[1] & cerer_dcvp & ~pgnum_b39_qual; | |
3568 | assign dval_perr_b[2] = dcache_read_b & tgc_verr_b[2] & cerer_dcvp & ~pgnum_b39_qual; | |
3569 | assign dval_perr_b[3] = dcache_read_b & tgc_verr_b[3] & cerer_dcvp & ~pgnum_b39_qual; | |
3570 | assign dval_perror_b = |(dval_perr_b[3:0]); | |
3571 | ||
3572 | // Tag errors have next priority | |
3573 | assign dtag_perr_b[0] = dcache_read_b & (tgd_w0_parity_b & cache_way_vld_b[0]) & cerer_dctp & ~pgnum_b39_qual; | |
3574 | assign dtag_perr_b[1] = dcache_read_b & (tgd_w1_parity_b & cache_way_vld_b[1]) & cerer_dctp & ~pgnum_b39_qual; | |
3575 | assign dtag_perr_b[2] = dcache_read_b & (tgd_w2_parity_b & cache_way_vld_b[2]) & cerer_dctp & ~pgnum_b39_qual; | |
3576 | assign dtag_perr_b[3] = dcache_read_b & (tgd_w3_parity_b & cache_way_vld_b[3]) & cerer_dctp & ~pgnum_b39_qual; | |
3577 | assign dtag_perror_b = ~dval_perror_b & |(dtag_perr_b[3:0]); | |
3578 | ||
3579 | // Multiple tag hit errors have next priority | |
3580 | assign mhit_err_b = ((tlb_cache_way_hit_b[0] & tlb_cache_way_hit_b[1]) | | |
3581 | (tlb_cache_way_hit_b[0] & tlb_cache_way_hit_b[2]) | | |
3582 | (tlb_cache_way_hit_b[0] & tlb_cache_way_hit_b[3]) | | |
3583 | (tlb_cache_way_hit_b[1] & tlb_cache_way_hit_b[2]) | | |
3584 | (tlb_cache_way_hit_b[1] & tlb_cache_way_hit_b[3]) | | |
3585 | (tlb_cache_way_hit_b[2] & tlb_cache_way_hit_b[3])) & | |
3586 | dcache_read_b & cerer_dctm & ~pgnum_b39_qual; | |
3587 | assign mhit_error_b = mhit_err_b & ~(dval_perror_b | dtag_perror_b); | |
3588 | ||
3589 | // Data parity errors are lowest priority | |
3590 | assign data_perr_b[0] = dcache_read_b & dca_perr_w0_b & cache_way_vld_b[0] & cerer_dcdp & ~pgnum_b39_qual; | |
3591 | assign data_perr_b[1] = dcache_read_b & dca_perr_w1_b & cache_way_vld_b[1] & cerer_dcdp & ~pgnum_b39_qual; | |
3592 | assign data_perr_b[2] = dcache_read_b & dca_perr_w2_b & cache_way_vld_b[2] & cerer_dcdp & ~pgnum_b39_qual; | |
3593 | assign data_perr_b[3] = dcache_read_b & dca_perr_w3_b & cache_way_vld_b[3] & cerer_dcdp & ~pgnum_b39_qual; | |
3594 | assign data_perror_b = ~(dval_perror_b | dtag_perror_b | mhit_error_b) & |(data_perr_b[3:0]); | |
3595 | ||
3596 | assign dcc_perror_b = dval_perror_b | (|(dtag_perr_b[3:0])) | mhit_err_b | (|(data_perr_b[3:0])); | |
3597 | ||
3598 | // Error encodings - 00=valid, 01=tag, 10=mhit, 11=data - prioritized in that order | |
3599 | assign dcc_perr_enc_b[1] = mhit_error_b | data_perror_b; | |
3600 | assign dcc_perr_enc_b[0] = dtag_perror_b | data_perror_b; | |
3601 | ||
3602 | // Way encodings | |
3603 | assign way_err[0] = (dval_perror_b & dval_perr_b[0]) | | |
3604 | (dtag_perror_b & dtag_perr_b[0]) | | |
3605 | (data_perror_b & data_perr_b[0]) | | |
3606 | (mhit_error_b & tlb_cache_way_hit_b[0]); | |
3607 | assign way_err[1] = (dval_perror_b & dval_perr_b[1]) | | |
3608 | (dtag_perror_b & dtag_perr_b[1]) | | |
3609 | (data_perror_b & data_perr_b[1]) | | |
3610 | (mhit_error_b & tlb_cache_way_hit_b[1]); | |
3611 | assign way_err[2] = (dval_perror_b & dval_perr_b[2]) | | |
3612 | (dtag_perror_b & dtag_perr_b[2]) | | |
3613 | (data_perror_b & data_perr_b[2]) | | |
3614 | (mhit_error_b & tlb_cache_way_hit_b[2]); | |
3615 | ||
3616 | assign way_err_enc[1] = ~way_err[0] & ~way_err[1]; | |
3617 | assign way_err_enc[0] = ~way_err[0] & (way_err[1] | ~way_err[2]); | |
3618 | ||
3619 | // Check that errors are never signaled during normal testing | |
3620 | ||
3621 | ||
3622 | ||
3623 | /////////////////////// | |
3624 | // TLB errors | |
3625 | ||
3626 | // Resolve TLB tag parity error here. Select the proper parity bit based | |
3627 | // on the page size and compare it to the stored parity. | |
3628 | ||
3629 | assign prty_ctxt = (tlb_context0_hit ? tgd_prty_ctxt0_b : tgd_prty_ctxt1_b) & ~tlb_real_b; | |
3630 | ||
3631 | assign tag_parity = (( tlb_pgsize[2] & tgd_prty_256m_b) | | |
3632 | (~tlb_pgsize[2] & tlb_pgsize[1] & tgd_prty_4m_b) | | |
3633 | (~tlb_pgsize[2] & ~tlb_pgsize[1] & tlb_pgsize[0] & tgd_prty_64k_b) | | |
3634 | (~tlb_pgsize[2] & ~tlb_pgsize[1] & ~tlb_pgsize[0] & tgd_prty_8k_b)) ^ | |
3635 | prty_ctxt; | |
3636 | ||
3637 | ||
3638 | assign lsu_dttp_err_b = cerer_dttp & tlb_tte_vld_b & (tag_parity ^ tlb_tag_parity); | |
3639 | assign lsu_dtdp_err_b = cerer_dtdp & tlb_tte_vld_b & tlb_tte_data_parity; | |
3640 | assign lsu_dtmh_err_b = cerer_dttm & tlb_cam_mhit; | |
3641 | ||
3642 | //////////////////////////////////////////////////////////////////////// | |
3643 | // Perfmon support | |
3644 | // TID always indicates the l2_miss since pmu knows what's in B of the pipe | |
3645 | //////////////////////////////////////////////////////////////////////// | |
3646 | ||
3647 | ||
3648 | // D$ miss | |
3649 | assign lsu_pmu_mem_type_b[0] = ld_inst_vld_b & ~(tlb_cache_hit_b & dcache_enable_b) & ~asi_internal_b & | |
3650 | ~ncache_rq_b & ~pipe_flush_b & tlb_cam_hit; | |
3651 | ||
3652 | // DTLB miss | |
3653 | assign lsu_pmu_mem_type_b[1] = ~lsu_tlb_miss_b_ & ~pipe_flush_b; | |
3654 | ||
3655 | // Generate traps if pmu requests | |
3656 | assign dcmiss_trap_m = pmu_lsu_dcmiss_trap_m; | |
3657 | assign dtmiss_trap_m = pmu_lsu_dtmiss_trap_m; | |
3658 | ||
3659 | assign lsu_perfmon_trap_b = (dcmiss_trap_b & lsu_pmu_mem_type_b[0]) | | |
3660 | (dtmiss_trap_b & lsu_pmu_mem_type_b[1]) ; | |
3661 | ||
3662 | // L2 miss (Don't count atomics) | |
3663 | ||
3664 | assign l2miss_no_atomic_e = ((lmc_bld_annul | lmc_bld_last_e) ? lmc_bld_miss_e : cid_l2miss) & ~cid_atomic; | |
3665 | ||
3666 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_l2miss ( | |
3667 | .scan_in(dff_l2miss_scanin), | |
3668 | .scan_out(dff_l2miss_scanout), | |
3669 | .din (l2miss_no_atomic_e), | |
3670 | .dout (l2miss_no_atomic_m), | |
3671 | .l1clk(l1clk), | |
3672 | .siclk(siclk), | |
3673 | .soclk(soclk) | |
3674 | ); | |
3675 | ||
3676 | // The l2dmiss isn't really aligned to the M cycle. | |
3677 | assign l2lmiss_trap_e =((cid_tid[2:0] == 3'b000) & pmu_lsu_l2dmiss_trap_m[0]) | | |
3678 | ((cid_tid[2:0] == 3'b001) & pmu_lsu_l2dmiss_trap_m[1]) | | |
3679 | ((cid_tid[2:0] == 3'b010) & pmu_lsu_l2dmiss_trap_m[2]) | | |
3680 | ((cid_tid[2:0] == 3'b011) & pmu_lsu_l2dmiss_trap_m[3]) | | |
3681 | ((cid_tid[2:0] == 3'b100) & pmu_lsu_l2dmiss_trap_m[4]) | | |
3682 | ((cid_tid[2:0] == 3'b101) & pmu_lsu_l2dmiss_trap_m[5]) | | |
3683 | ((cid_tid[2:0] == 3'b110) & pmu_lsu_l2dmiss_trap_m[6]) | | |
3684 | ((cid_tid[2:0] == 3'b111) & pmu_lsu_l2dmiss_trap_m[7]) ; | |
3685 | ||
3686 | lsu_dcc_ctl_msff_ctl_macro__width_4 dff_pmu_trap ( | |
3687 | .scan_in(dff_pmu_trap_scanin), | |
3688 | .scan_out(dff_pmu_trap_scanout), | |
3689 | .din ({dcmiss_trap_m,dtmiss_trap_m,l2lmiss_trap_e,load_complete_e}), | |
3690 | .dout ({dcmiss_trap_b,dtmiss_trap_b,l2lmiss_trap_m,load_complete_m}), | |
3691 | .l1clk(l1clk), | |
3692 | .siclk(siclk), | |
3693 | .soclk(soclk) | |
3694 | ); | |
3695 | ||
3696 | assign load_complete_e = cic_rtn_cmplt & ~lmc_bld_annul; | |
3697 | ||
3698 | assign l2_perfmon_wb_cancel_m = l2fill_vld_m & l2miss_no_atomic_m & l2lmiss_trap_m; | |
3699 | ||
3700 | // These really assert in M. (The tid can be shared with TLU this way.) | |
3701 | assign lsu_pmu_mem_type_b[2] = l2miss_no_atomic_m & load_complete_m; | |
3702 | ||
3703 | assign lsu_perfmon_trap_g = l2lmiss_trap_m & l2miss_no_atomic_m & load_complete_m; | |
3704 | ||
3705 | //////////////////////////////////////////////////////////////////////// | |
3706 | // Power management controls | |
3707 | //////////////////////////////////////////////////////////////////////// | |
3708 | ||
3709 | assign lsu_lsu_pmen_ = ~lsu_lsu_pmen; | |
3710 | ||
3711 | assign dcc_sbd_e_clken = dec_st_inst_e | casa_inst_m | dcc_std_inst_m | lsu_lsu_pmen_; | |
3712 | assign dcc_sbd_m_clken = sbd_m_clken | sbc_bst_in_prog_m | lsu_lsu_pmen_; | |
3713 | ||
3714 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_pwr_mgmt ( | |
3715 | .scan_in(dff_pwr_mgmt_scanin), | |
3716 | .scan_out(dff_pwr_mgmt_scanout), | |
3717 | .din (dcc_sbd_e_clken), | |
3718 | .dout (sbd_m_clken), | |
3719 | .l1clk(l1clk), | |
3720 | .siclk(siclk), | |
3721 | .soclk(soclk) | |
3722 | ); | |
3723 | ||
3724 | assign dcc_ldst_m_clken = ld_inst_vld_m | st_inst_vld_m | lsu_lsu_pmen_; | |
3725 | ||
3726 | assign dcc_pm_clken = lsu_lsu_pmen_ | mbi_run_local | | |
3727 | ld_inst_unqual_e | dec_st_inst_e | dec_flush_inst_e | dec_memstbar_inst_e | | |
3728 | ld_inst_vld_m | st_inst_vld_m | sync_inst_m | | |
3729 | ld_inst_vld_b | st_inst_vld_b | sync_inst_b | | |
3730 | ld_inst_vld_w | st_inst_vld_w | sync_inst_w ; | |
3731 | ||
3732 | assign ifu_indx_clken = lsu_lsu_pmen_ | ifu_lsu_if_vld; | |
3733 | ||
3734 | //////////////////////////////////////////////////////////////////////// | |
3735 | // BIST / DIAGNOSTICS | |
3736 | //////////////////////////////////////////////////////////////////////// | |
3737 | ||
3738 | lsu_dcc_ctl_msff_ctl_macro__width_1 dff_bist_run ( | |
3739 | .scan_in(dff_bist_run_scanin), | |
3740 | .scan_out(dff_bist_run_scanout), | |
3741 | .din (mbi_run), | |
3742 | .dout (mbi_run_local), | |
3743 | .l1clk(l1clk), | |
3744 | .siclk(siclk), | |
3745 | .soclk(soclk) | |
3746 | ); | |
3747 | ||
3748 | lsu_dcc_ctl_msff_ctl_macro__width_8 dff_bist_in ( | |
3749 | .scan_in(dff_bist_in_scanin), | |
3750 | .scan_out(dff_bist_in_scanout), | |
3751 | .l1clk (l1clk_pm1), | |
3752 | .din ({mbi_dca_read_en,bist_dca_rd_1, mbi_lru_read_en,bist_lru_rd_1, | |
3753 | mbi_dtb_cam_en_pre, tlb_cam_en_pre, mbi_scm_cam_en_pre,mbi_dtb_read_en}), | |
3754 | .dout ({bist_dca_rd_1, bist_dca_cmp_en,bist_lru_rd_1, bist_lru_cmp_en, | |
3755 | tlb_cam_en_pre, bist_cam_en, mbi_scm_cam_en, bist_dtb_read_en}), | |
3756 | .siclk(siclk), | |
3757 | .soclk(soclk) | |
3758 | ); | |
3759 | ||
3760 | assign dcc_mbi_run = mbi_run_local; | |
3761 | ||
3762 | assign dca_parity_compare = (dca_rparity_b[7:0] == bist_cmp_data[7:0]); | |
3763 | assign dca_fail = bist_dca_cmp_en & (~dcd_dca_data_compare[1] | ~dcd_dca_data_compare[0] | ~dca_parity_compare); | |
3764 | ||
3765 | assign lru_fail = bist_lru_cmp_en & (lru_state_in_b[5:0] != bist_cmp_data[5:0]); | |
3766 | ||
3767 | lsu_dcc_ctl_msff_ctl_macro__width_2 dff_bist_fail ( | |
3768 | .scan_in(dff_bist_fail_scanin), | |
3769 | .scan_out(dff_bist_fail_scanout), | |
3770 | .l1clk (l1clk_pm1), | |
3771 | .din ({dca_fail, lru_fail}), | |
3772 | .dout ({lsu_mbi_dca_fail,lsu_mbi_lru_fail}), | |
3773 | .siclk(siclk), | |
3774 | .soclk(soclk) | |
3775 | ); | |
3776 | ||
3777 | // DMO reads parity. Need to mux between hi/lo here. | |
3778 | assign dcc_dmo_parity[3:0] = dmo_dcmuxctl ? dca_rparity_b[7:4] : dca_rparity_b[3:0]; | |
3779 | ||
3780 | lsu_dcc_ctl_spare_ctl_macro__num_9 spares ( | |
3781 | .scan_in(spares_scanin), | |
3782 | .scan_out(spares_scanout), | |
3783 | .l1clk (l1clk), | |
3784 | .siclk(siclk), | |
3785 | .soclk(soclk) | |
3786 | ); | |
3787 | ||
3788 | supply0 vss; | |
3789 | supply1 vdd; | |
3790 | // fixscan start: | |
3791 | assign dff_cerer_scanin = scan_in ; | |
3792 | assign dff_flush_b_scanin = dff_cerer_scanout ; | |
3793 | assign dff_flush_w_scanin = dff_flush_b_scanout ; | |
3794 | assign dff_asi_d_scanin = dff_flush_w_scanout ; | |
3795 | assign dff_dec_inst1_m_scanin = dff_asi_d_scanout ; | |
3796 | assign dff_sync_inst_scanin = dff_dec_inst1_m_scanout ; | |
3797 | assign dff_dec_ctl_m_scanin = dff_sync_inst_scanout ; | |
3798 | assign dff_dec_inst_b_scanin = dff_dec_ctl_m_scanout ; | |
3799 | assign dff_dec_ctl_b_scanin = dff_dec_inst_b_scanout ; | |
3800 | assign dff_tid_e_scanin = dff_dec_ctl_b_scanout ; | |
3801 | assign dff_tid_m_scanin = dff_tid_e_scanout ; | |
3802 | assign dff_tid_b_scanin = dff_tid_m_scanout ; | |
3803 | assign dff_tid_w_scanin = dff_tid_b_scanout ; | |
3804 | assign dff_altspace_m_scanin = dff_tid_w_scanout ; | |
3805 | assign dff_altspace_b_scanin = dff_altspace_m_scanout ; | |
3806 | assign dff_fpld_b_scanin = dff_altspace_b_scanout ; | |
3807 | assign dff_oddrd_scanin = dff_fpld_b_scanout ; | |
3808 | assign dff_rs2_m_scanin = dff_oddrd_scanout ; | |
3809 | assign dff_sba_par_scanin = dff_rs2_m_scanout ; | |
3810 | assign dff_early_ld_scanin = dff_sba_par_scanout ; | |
3811 | assign dff_sync_pipe_scanin = dff_early_ld_scanout ; | |
3812 | assign dff_sync_st_scanin = dff_sync_pipe_scanout ; | |
3813 | assign dc_enable_scanin = dff_sync_st_scanout ; | |
3814 | assign dff_l2fill_m_scanin = dc_enable_scanout ; | |
3815 | assign dff_l2fill_b_scanin = dff_l2fill_m_scanout ; | |
3816 | assign dff_ld_tid_b_scanin = dff_l2fill_b_scanout ; | |
3817 | assign dff_fp32_b_scanin = dff_ld_tid_b_scanout ; | |
3818 | assign dff_ld_vld_w_scanin = dff_fp32_b_scanout ; | |
3819 | assign dff_le_bits_scanin = dff_ld_vld_w_scanout ; | |
3820 | assign dff_tl_gt_0_scanin = dff_le_bits_scanout ; | |
3821 | assign dff_tlc_scanin = dff_tl_gt_0_scanout ; | |
3822 | assign dff_ct_scanin = dff_tlc_scanout ; | |
3823 | assign dff_asi_m_scanin = dff_ct_scanout ; | |
3824 | assign dff_asi_b_scanin = dff_asi_m_scanout ; | |
3825 | assign dff_int_asi_m_scanin = dff_asi_b_scanout ; | |
3826 | assign dff_int_asi_b_scanin = dff_int_asi_m_scanout ; | |
3827 | assign dff_int_asi_w_scanin = dff_int_asi_b_scanout ; | |
3828 | assign dff_wr_state_w_scanin = dff_int_asi_w_scanout ; | |
3829 | assign dff_tlu_asi_scanin = dff_wr_state_w_scanout ; | |
3830 | assign dff_stb_w3_scanin = dff_tlu_asi_scanout ; | |
3831 | assign dff_diag_reg_scanin = dff_stb_w3_scanout ; | |
3832 | assign dff_lru_data_b_scanin = dff_diag_reg_scanout ; | |
3833 | assign dff_new_lru_w_scanin = dff_lru_data_b_scanout ; | |
3834 | assign dff_new_lru_w2_scanin = dff_new_lru_w_scanout ; | |
3835 | assign dff_update_lru_scanin = dff_new_lru_w2_scanout ; | |
3836 | assign dff_sync_inst_w_scanin = dff_update_lru_scanout ; | |
3837 | assign dff_st_type_w_scanin = dff_sync_inst_w_scanout ; | |
3838 | assign dff_priv_state_e_scanin = dff_st_type_w_scanout ; | |
3839 | assign dff_priv_state_m_scanin = dff_priv_state_e_scanout ; | |
3840 | assign dff_priv_state_b_scanin = dff_priv_state_m_scanout ; | |
3841 | assign dff_usr_pg_access_b_scanin = dff_priv_state_b_scanout ; | |
3842 | assign dff_excp_b_scanin = dff_usr_pg_access_b_scanout; | |
3843 | assign dff_wpt_scanin = dff_excp_b_scanout ; | |
3844 | assign dff_asi_g_scanin = dff_wpt_scanout ; | |
3845 | assign dff_except_scanin = dff_asi_g_scanout ; | |
3846 | assign dff_fgu_excp_w_scanin = dff_except_scanout ; | |
3847 | assign dff_if_indx_0_scanin = dff_fgu_excp_w_scanout ; | |
3848 | assign dff_if_indx_1_scanin = dff_if_indx_0_scanout ; | |
3849 | assign dff_if_indx_2_scanin = dff_if_indx_1_scanout ; | |
3850 | assign dff_if_indx_3_scanin = dff_if_indx_2_scanout ; | |
3851 | assign dff_if_indx_4_scanin = dff_if_indx_3_scanout ; | |
3852 | assign dff_if_indx_5_scanin = dff_if_indx_4_scanout ; | |
3853 | assign dff_if_indx_6_scanin = dff_if_indx_5_scanout ; | |
3854 | assign dff_if_indx_7_scanin = dff_if_indx_6_scanout ; | |
3855 | assign dff_way_vld_b_scanin = dff_if_indx_7_scanout ; | |
3856 | assign dff_l2miss_scanin = dff_way_vld_b_scanout ; | |
3857 | assign dff_pmu_trap_scanin = dff_l2miss_scanout ; | |
3858 | assign dff_pwr_mgmt_scanin = dff_pmu_trap_scanout ; | |
3859 | assign dff_bist_run_scanin = dff_pwr_mgmt_scanout ; | |
3860 | assign dff_bist_in_scanin = dff_bist_run_scanout ; | |
3861 | assign dff_bist_fail_scanin = dff_bist_in_scanout ; | |
3862 | assign spares_scanin = dff_bist_fail_scanout ; | |
3863 | assign scan_out = spares_scanout ; | |
3864 | // fixscan end: | |
3865 | endmodule | |
3866 | ||
3867 | ||
3868 | ||
3869 | ||
3870 | ||
3871 | ||
3872 | // any PARAMS parms go into naming of macro | |
3873 | ||
3874 | module lsu_dcc_ctl_l1clkhdr_ctl_macro ( | |
3875 | l2clk, | |
3876 | l1en, | |
3877 | pce_ov, | |
3878 | stop, | |
3879 | se, | |
3880 | l1clk); | |
3881 | ||
3882 | ||
3883 | input l2clk; | |
3884 | input l1en; | |
3885 | input pce_ov; | |
3886 | input stop; | |
3887 | input se; | |
3888 | output l1clk; | |
3889 | ||
3890 | ||
3891 | ||
3892 | ||
3893 | ||
3894 | cl_sc1_l1hdr_8x c_0 ( | |
3895 | ||
3896 | ||
3897 | .l2clk(l2clk), | |
3898 | .pce(l1en), | |
3899 | .l1clk(l1clk), | |
3900 | .se(se), | |
3901 | .pce_ov(pce_ov), | |
3902 | .stop(stop) | |
3903 | ); | |
3904 | ||
3905 | ||
3906 | ||
3907 | endmodule | |
3908 | ||
3909 | ||
3910 | ||
3911 | ||
3912 | ||
3913 | ||
3914 | ||
3915 | ||
3916 | ||
3917 | ||
3918 | ||
3919 | ||
3920 | ||
3921 | // any PARAMS parms go into naming of macro | |
3922 | ||
3923 | module lsu_dcc_ctl_msff_ctl_macro__width_7 ( | |
3924 | din, | |
3925 | l1clk, | |
3926 | scan_in, | |
3927 | siclk, | |
3928 | soclk, | |
3929 | dout, | |
3930 | scan_out); | |
3931 | wire [6:0] fdin; | |
3932 | wire [5:0] so; | |
3933 | ||
3934 | input [6:0] din; | |
3935 | input l1clk; | |
3936 | input scan_in; | |
3937 | ||
3938 | ||
3939 | input siclk; | |
3940 | input soclk; | |
3941 | ||
3942 | output [6:0] dout; | |
3943 | output scan_out; | |
3944 | assign fdin[6:0] = din[6:0]; | |
3945 | ||
3946 | ||
3947 | ||
3948 | ||
3949 | ||
3950 | ||
3951 | dff #(7) d0_0 ( | |
3952 | .l1clk(l1clk), | |
3953 | .siclk(siclk), | |
3954 | .soclk(soclk), | |
3955 | .d(fdin[6:0]), | |
3956 | .si({scan_in,so[5:0]}), | |
3957 | .so({so[5:0],scan_out}), | |
3958 | .q(dout[6:0]) | |
3959 | ); | |
3960 | ||
3961 | ||
3962 | ||
3963 | ||
3964 | ||
3965 | ||
3966 | ||
3967 | ||
3968 | ||
3969 | ||
3970 | ||
3971 | ||
3972 | endmodule | |
3973 | ||
3974 | ||
3975 | ||
3976 | ||
3977 | ||
3978 | ||
3979 | ||
3980 | ||
3981 | ||
3982 | ||
3983 | ||
3984 | ||
3985 | ||
3986 | // any PARAMS parms go into naming of macro | |
3987 | ||
3988 | module lsu_dcc_ctl_msff_ctl_macro__width_3 ( | |
3989 | din, | |
3990 | l1clk, | |
3991 | scan_in, | |
3992 | siclk, | |
3993 | soclk, | |
3994 | dout, | |
3995 | scan_out); | |
3996 | wire [2:0] fdin; | |
3997 | wire [1:0] so; | |
3998 | ||
3999 | input [2:0] din; | |
4000 | input l1clk; | |
4001 | input scan_in; | |
4002 | ||
4003 | ||
4004 | input siclk; | |
4005 | input soclk; | |
4006 | ||
4007 | output [2:0] dout; | |
4008 | output scan_out; | |
4009 | assign fdin[2:0] = din[2:0]; | |
4010 | ||
4011 | ||
4012 | ||
4013 | ||
4014 | ||
4015 | ||
4016 | dff #(3) d0_0 ( | |
4017 | .l1clk(l1clk), | |
4018 | .siclk(siclk), | |
4019 | .soclk(soclk), | |
4020 | .d(fdin[2:0]), | |
4021 | .si({scan_in,so[1:0]}), | |
4022 | .so({so[1:0],scan_out}), | |
4023 | .q(dout[2:0]) | |
4024 | ); | |
4025 | ||
4026 | ||
4027 | ||
4028 | ||
4029 | ||
4030 | ||
4031 | ||
4032 | ||
4033 | ||
4034 | ||
4035 | ||
4036 | ||
4037 | endmodule | |
4038 | ||
4039 | ||
4040 | ||
4041 | ||
4042 | ||
4043 | ||
4044 | ||
4045 | ||
4046 | ||
4047 | ||
4048 | ||
4049 | ||
4050 | ||
4051 | // any PARAMS parms go into naming of macro | |
4052 | ||
4053 | module lsu_dcc_ctl_msff_ctl_macro__width_1 ( | |
4054 | din, | |
4055 | l1clk, | |
4056 | scan_in, | |
4057 | siclk, | |
4058 | soclk, | |
4059 | dout, | |
4060 | scan_out); | |
4061 | wire [0:0] fdin; | |
4062 | ||
4063 | input [0:0] din; | |
4064 | input l1clk; | |
4065 | input scan_in; | |
4066 | ||
4067 | ||
4068 | input siclk; | |
4069 | input soclk; | |
4070 | ||
4071 | output [0:0] dout; | |
4072 | output scan_out; | |
4073 | assign fdin[0:0] = din[0:0]; | |
4074 | ||
4075 | ||
4076 | ||
4077 | ||
4078 | ||
4079 | ||
4080 | dff #(1) d0_0 ( | |
4081 | .l1clk(l1clk), | |
4082 | .siclk(siclk), | |
4083 | .soclk(soclk), | |
4084 | .d(fdin[0:0]), | |
4085 | .si(scan_in), | |
4086 | .so(scan_out), | |
4087 | .q(dout[0:0]) | |
4088 | ); | |
4089 | ||
4090 | ||
4091 | ||
4092 | ||
4093 | ||
4094 | ||
4095 | ||
4096 | ||
4097 | ||
4098 | ||
4099 | ||
4100 | ||
4101 | endmodule | |
4102 | ||
4103 | ||
4104 | ||
4105 | ||
4106 | ||
4107 | ||
4108 | ||
4109 | ||
4110 | ||
4111 | ||
4112 | ||
4113 | ||
4114 | ||
4115 | // any PARAMS parms go into naming of macro | |
4116 | ||
4117 | module lsu_dcc_ctl_msff_ctl_macro__width_12 ( | |
4118 | din, | |
4119 | l1clk, | |
4120 | scan_in, | |
4121 | siclk, | |
4122 | soclk, | |
4123 | dout, | |
4124 | scan_out); | |
4125 | wire [11:0] fdin; | |
4126 | wire [10:0] so; | |
4127 | ||
4128 | input [11:0] din; | |
4129 | input l1clk; | |
4130 | input scan_in; | |
4131 | ||
4132 | ||
4133 | input siclk; | |
4134 | input soclk; | |
4135 | ||
4136 | output [11:0] dout; | |
4137 | output scan_out; | |
4138 | assign fdin[11:0] = din[11:0]; | |
4139 | ||
4140 | ||
4141 | ||
4142 | ||
4143 | ||
4144 | ||
4145 | dff #(12) d0_0 ( | |
4146 | .l1clk(l1clk), | |
4147 | .siclk(siclk), | |
4148 | .soclk(soclk), | |
4149 | .d(fdin[11:0]), | |
4150 | .si({scan_in,so[10:0]}), | |
4151 | .so({so[10:0],scan_out}), | |
4152 | .q(dout[11:0]) | |
4153 | ); | |
4154 | ||
4155 | ||
4156 | ||
4157 | ||
4158 | ||
4159 | ||
4160 | ||
4161 | ||
4162 | ||
4163 | ||
4164 | ||
4165 | ||
4166 | endmodule | |
4167 | ||
4168 | ||
4169 | ||
4170 | ||
4171 | ||
4172 | ||
4173 | ||
4174 | ||
4175 | ||
4176 | ||
4177 | ||
4178 | ||
4179 | ||
4180 | // any PARAMS parms go into naming of macro | |
4181 | ||
4182 | module lsu_dcc_ctl_msff_ctl_macro__width_13 ( | |
4183 | din, | |
4184 | l1clk, | |
4185 | scan_in, | |
4186 | siclk, | |
4187 | soclk, | |
4188 | dout, | |
4189 | scan_out); | |
4190 | wire [12:0] fdin; | |
4191 | wire [11:0] so; | |
4192 | ||
4193 | input [12:0] din; | |
4194 | input l1clk; | |
4195 | input scan_in; | |
4196 | ||
4197 | ||
4198 | input siclk; | |
4199 | input soclk; | |
4200 | ||
4201 | output [12:0] dout; | |
4202 | output scan_out; | |
4203 | assign fdin[12:0] = din[12:0]; | |
4204 | ||
4205 | ||
4206 | ||
4207 | ||
4208 | ||
4209 | ||
4210 | dff #(13) d0_0 ( | |
4211 | .l1clk(l1clk), | |
4212 | .siclk(siclk), | |
4213 | .soclk(soclk), | |
4214 | .d(fdin[12:0]), | |
4215 | .si({scan_in,so[11:0]}), | |
4216 | .so({so[11:0],scan_out}), | |
4217 | .q(dout[12:0]) | |
4218 | ); | |
4219 | ||
4220 | ||
4221 | ||
4222 | ||
4223 | ||
4224 | ||
4225 | ||
4226 | ||
4227 | ||
4228 | ||
4229 | ||
4230 | ||
4231 | endmodule | |
4232 | ||
4233 | ||
4234 | ||
4235 | ||
4236 | ||
4237 | ||
4238 | ||
4239 | ||
4240 | ||
4241 | ||
4242 | ||
4243 | ||
4244 | ||
4245 | // any PARAMS parms go into naming of macro | |
4246 | ||
4247 | module lsu_dcc_ctl_msff_ctl_macro__width_8 ( | |
4248 | din, | |
4249 | l1clk, | |
4250 | scan_in, | |
4251 | siclk, | |
4252 | soclk, | |
4253 | dout, | |
4254 | scan_out); | |
4255 | wire [7:0] fdin; | |
4256 | wire [6:0] so; | |
4257 | ||
4258 | input [7:0] din; | |
4259 | input l1clk; | |
4260 | input scan_in; | |
4261 | ||
4262 | ||
4263 | input siclk; | |
4264 | input soclk; | |
4265 | ||
4266 | output [7:0] dout; | |
4267 | output scan_out; | |
4268 | assign fdin[7:0] = din[7:0]; | |
4269 | ||
4270 | ||
4271 | ||
4272 | ||
4273 | ||
4274 | ||
4275 | dff #(8) d0_0 ( | |
4276 | .l1clk(l1clk), | |
4277 | .siclk(siclk), | |
4278 | .soclk(soclk), | |
4279 | .d(fdin[7:0]), | |
4280 | .si({scan_in,so[6:0]}), | |
4281 | .so({so[6:0],scan_out}), | |
4282 | .q(dout[7:0]) | |
4283 | ); | |
4284 | ||
4285 | ||
4286 | ||
4287 | ||
4288 | ||
4289 | ||
4290 | ||
4291 | ||
4292 | ||
4293 | ||
4294 | ||
4295 | ||
4296 | endmodule | |
4297 | ||
4298 | ||
4299 | ||
4300 | ||
4301 | ||
4302 | ||
4303 | ||
4304 | ||
4305 | ||
4306 | ||
4307 | ||
4308 | ||
4309 | ||
4310 | // any PARAMS parms go into naming of macro | |
4311 | ||
4312 | module lsu_dcc_ctl_msff_ctl_macro__width_9 ( | |
4313 | din, | |
4314 | l1clk, | |
4315 | scan_in, | |
4316 | siclk, | |
4317 | soclk, | |
4318 | dout, | |
4319 | scan_out); | |
4320 | wire [8:0] fdin; | |
4321 | wire [7:0] so; | |
4322 | ||
4323 | input [8:0] din; | |
4324 | input l1clk; | |
4325 | input scan_in; | |
4326 | ||
4327 | ||
4328 | input siclk; | |
4329 | input soclk; | |
4330 | ||
4331 | output [8:0] dout; | |
4332 | output scan_out; | |
4333 | assign fdin[8:0] = din[8:0]; | |
4334 | ||
4335 | ||
4336 | ||
4337 | ||
4338 | ||
4339 | ||
4340 | dff #(9) d0_0 ( | |
4341 | .l1clk(l1clk), | |
4342 | .siclk(siclk), | |
4343 | .soclk(soclk), | |
4344 | .d(fdin[8:0]), | |
4345 | .si({scan_in,so[7:0]}), | |
4346 | .so({so[7:0],scan_out}), | |
4347 | .q(dout[8:0]) | |
4348 | ); | |
4349 | ||
4350 | ||
4351 | ||
4352 | ||
4353 | ||
4354 | ||
4355 | ||
4356 | ||
4357 | ||
4358 | ||
4359 | ||
4360 | ||
4361 | endmodule | |
4362 | ||
4363 | ||
4364 | ||
4365 | ||
4366 | ||
4367 | ||
4368 | ||
4369 | ||
4370 | ||
4371 | ||
4372 | ||
4373 | ||
4374 | ||
4375 | // any PARAMS parms go into naming of macro | |
4376 | ||
4377 | module lsu_dcc_ctl_msff_ctl_macro__width_5 ( | |
4378 | din, | |
4379 | l1clk, | |
4380 | scan_in, | |
4381 | siclk, | |
4382 | soclk, | |
4383 | dout, | |
4384 | scan_out); | |
4385 | wire [4:0] fdin; | |
4386 | wire [3:0] so; | |
4387 | ||
4388 | input [4:0] din; | |
4389 | input l1clk; | |
4390 | input scan_in; | |
4391 | ||
4392 | ||
4393 | input siclk; | |
4394 | input soclk; | |
4395 | ||
4396 | output [4:0] dout; | |
4397 | output scan_out; | |
4398 | assign fdin[4:0] = din[4:0]; | |
4399 | ||
4400 | ||
4401 | ||
4402 | ||
4403 | ||
4404 | ||
4405 | dff #(5) d0_0 ( | |
4406 | .l1clk(l1clk), | |
4407 | .siclk(siclk), | |
4408 | .soclk(soclk), | |
4409 | .d(fdin[4:0]), | |
4410 | .si({scan_in,so[3:0]}), | |
4411 | .so({so[3:0],scan_out}), | |
4412 | .q(dout[4:0]) | |
4413 | ); | |
4414 | ||
4415 | ||
4416 | ||
4417 | ||
4418 | ||
4419 | ||
4420 | ||
4421 | ||
4422 | ||
4423 | ||
4424 | ||
4425 | ||
4426 | endmodule | |
4427 | ||
4428 | ||
4429 | ||
4430 | ||
4431 | ||
4432 | ||
4433 | ||
4434 | ||
4435 | ||
4436 | ||
4437 | ||
4438 | ||
4439 | ||
4440 | // any PARAMS parms go into naming of macro | |
4441 | ||
4442 | module lsu_dcc_ctl_msff_ctl_macro__width_4 ( | |
4443 | din, | |
4444 | l1clk, | |
4445 | scan_in, | |
4446 | siclk, | |
4447 | soclk, | |
4448 | dout, | |
4449 | scan_out); | |
4450 | wire [3:0] fdin; | |
4451 | wire [2:0] so; | |
4452 | ||
4453 | input [3:0] din; | |
4454 | input l1clk; | |
4455 | input scan_in; | |
4456 | ||
4457 | ||
4458 | input siclk; | |
4459 | input soclk; | |
4460 | ||
4461 | output [3:0] dout; | |
4462 | output scan_out; | |
4463 | assign fdin[3:0] = din[3:0]; | |
4464 | ||
4465 | ||
4466 | ||
4467 | ||
4468 | ||
4469 | ||
4470 | dff #(4) d0_0 ( | |
4471 | .l1clk(l1clk), | |
4472 | .siclk(siclk), | |
4473 | .soclk(soclk), | |
4474 | .d(fdin[3:0]), | |
4475 | .si({scan_in,so[2:0]}), | |
4476 | .so({so[2:0],scan_out}), | |
4477 | .q(dout[3:0]) | |
4478 | ); | |
4479 | ||
4480 | ||
4481 | ||
4482 | ||
4483 | ||
4484 | ||
4485 | ||
4486 | ||
4487 | ||
4488 | ||
4489 | ||
4490 | ||
4491 | endmodule | |
4492 | ||
4493 | ||
4494 | ||
4495 | ||
4496 | ||
4497 | ||
4498 | ||
4499 | ||
4500 | ||
4501 | ||
4502 | ||
4503 | ||
4504 | ||
4505 | // any PARAMS parms go into naming of macro | |
4506 | ||
4507 | module lsu_dcc_ctl_msff_ctl_macro__width_2 ( | |
4508 | din, | |
4509 | l1clk, | |
4510 | scan_in, | |
4511 | siclk, | |
4512 | soclk, | |
4513 | dout, | |
4514 | scan_out); | |
4515 | wire [1:0] fdin; | |
4516 | wire [0:0] so; | |
4517 | ||
4518 | input [1:0] din; | |
4519 | input l1clk; | |
4520 | input scan_in; | |
4521 | ||
4522 | ||
4523 | input siclk; | |
4524 | input soclk; | |
4525 | ||
4526 | output [1:0] dout; | |
4527 | output scan_out; | |
4528 | assign fdin[1:0] = din[1:0]; | |
4529 | ||
4530 | ||
4531 | ||
4532 | ||
4533 | ||
4534 | ||
4535 | dff #(2) d0_0 ( | |
4536 | .l1clk(l1clk), | |
4537 | .siclk(siclk), | |
4538 | .soclk(soclk), | |
4539 | .d(fdin[1:0]), | |
4540 | .si({scan_in,so[0:0]}), | |
4541 | .so({so[0:0],scan_out}), | |
4542 | .q(dout[1:0]) | |
4543 | ); | |
4544 | ||
4545 | ||
4546 | ||
4547 | ||
4548 | ||
4549 | ||
4550 | ||
4551 | ||
4552 | ||
4553 | ||
4554 | ||
4555 | ||
4556 | endmodule | |
4557 | ||
4558 | ||
4559 | ||
4560 | ||
4561 | ||
4562 | ||
4563 | ||
4564 | // any PARAMS parms go into naming of macro | |
4565 | ||
4566 | module lsu_dcc_ctl_msff_ctl_macro__width_10 ( | |
4567 | din, | |
4568 | l1clk, | |
4569 | scan_in, | |
4570 | siclk, | |
4571 | soclk, | |
4572 | dout, | |
4573 | scan_out); | |
4574 | wire [9:0] fdin; | |
4575 | wire [8:0] so; | |
4576 | ||
4577 | input [9:0] din; | |
4578 | input l1clk; | |
4579 | input scan_in; | |
4580 | ||
4581 | ||
4582 | input siclk; | |
4583 | input soclk; | |
4584 | ||
4585 | output [9:0] dout; | |
4586 | output scan_out; | |
4587 | assign fdin[9:0] = din[9:0]; | |
4588 | ||
4589 | ||
4590 | ||
4591 | ||
4592 | ||
4593 | ||
4594 | dff #(10) d0_0 ( | |
4595 | .l1clk(l1clk), | |
4596 | .siclk(siclk), | |
4597 | .soclk(soclk), | |
4598 | .d(fdin[9:0]), | |
4599 | .si({scan_in,so[8:0]}), | |
4600 | .so({so[8:0],scan_out}), | |
4601 | .q(dout[9:0]) | |
4602 | ); | |
4603 | ||
4604 | ||
4605 | ||
4606 | ||
4607 | ||
4608 | ||
4609 | ||
4610 | ||
4611 | ||
4612 | ||
4613 | ||
4614 | ||
4615 | endmodule | |
4616 | ||
4617 | ||
4618 | ||
4619 | ||
4620 | ||
4621 | ||
4622 | ||
4623 | ||
4624 | ||
4625 | ||
4626 | ||
4627 | ||
4628 | ||
4629 | // any PARAMS parms go into naming of macro | |
4630 | ||
4631 | module lsu_dcc_ctl_msff_ctl_macro__width_24 ( | |
4632 | din, | |
4633 | l1clk, | |
4634 | scan_in, | |
4635 | siclk, | |
4636 | soclk, | |
4637 | dout, | |
4638 | scan_out); | |
4639 | wire [23:0] fdin; | |
4640 | wire [22:0] so; | |
4641 | ||
4642 | input [23:0] din; | |
4643 | input l1clk; | |
4644 | input scan_in; | |
4645 | ||
4646 | ||
4647 | input siclk; | |
4648 | input soclk; | |
4649 | ||
4650 | output [23:0] dout; | |
4651 | output scan_out; | |
4652 | assign fdin[23:0] = din[23:0]; | |
4653 | ||
4654 | ||
4655 | ||
4656 | ||
4657 | ||
4658 | ||
4659 | dff #(24) d0_0 ( | |
4660 | .l1clk(l1clk), | |
4661 | .siclk(siclk), | |
4662 | .soclk(soclk), | |
4663 | .d(fdin[23:0]), | |
4664 | .si({scan_in,so[22:0]}), | |
4665 | .so({so[22:0],scan_out}), | |
4666 | .q(dout[23:0]) | |
4667 | ); | |
4668 | ||
4669 | ||
4670 | ||
4671 | ||
4672 | ||
4673 | ||
4674 | ||
4675 | ||
4676 | ||
4677 | ||
4678 | ||
4679 | ||
4680 | endmodule | |
4681 | ||
4682 | ||
4683 | ||
4684 | ||
4685 | ||
4686 | ||
4687 | ||
4688 | ||
4689 | ||
4690 | ||
4691 | ||
4692 | ||
4693 | ||
4694 | // any PARAMS parms go into naming of macro | |
4695 | ||
4696 | module lsu_dcc_ctl_msff_ctl_macro__width_6 ( | |
4697 | din, | |
4698 | l1clk, | |
4699 | scan_in, | |
4700 | siclk, | |
4701 | soclk, | |
4702 | dout, | |
4703 | scan_out); | |
4704 | wire [5:0] fdin; | |
4705 | wire [4:0] so; | |
4706 | ||
4707 | input [5:0] din; | |
4708 | input l1clk; | |
4709 | input scan_in; | |
4710 | ||
4711 | ||
4712 | input siclk; | |
4713 | input soclk; | |
4714 | ||
4715 | output [5:0] dout; | |
4716 | output scan_out; | |
4717 | assign fdin[5:0] = din[5:0]; | |
4718 | ||
4719 | ||
4720 | ||
4721 | ||
4722 | ||
4723 | ||
4724 | dff #(6) d0_0 ( | |
4725 | .l1clk(l1clk), | |
4726 | .siclk(siclk), | |
4727 | .soclk(soclk), | |
4728 | .d(fdin[5:0]), | |
4729 | .si({scan_in,so[4:0]}), | |
4730 | .so({so[4:0],scan_out}), | |
4731 | .q(dout[5:0]) | |
4732 | ); | |
4733 | ||
4734 | ||
4735 | ||
4736 | ||
4737 | ||
4738 | ||
4739 | ||
4740 | ||
4741 | ||
4742 | ||
4743 | ||
4744 | ||
4745 | endmodule | |
4746 | ||
4747 | ||
4748 | ||
4749 | ||
4750 | ||
4751 | ||
4752 | ||
4753 | ||
4754 | ||
4755 | ||
4756 | ||
4757 | ||
4758 | ||
4759 | // any PARAMS parms go into naming of macro | |
4760 | ||
4761 | module lsu_dcc_ctl_msff_ctl_macro__width_20 ( | |
4762 | din, | |
4763 | l1clk, | |
4764 | scan_in, | |
4765 | siclk, | |
4766 | soclk, | |
4767 | dout, | |
4768 | scan_out); | |
4769 | wire [19:0] fdin; | |
4770 | wire [18:0] so; | |
4771 | ||
4772 | input [19:0] din; | |
4773 | input l1clk; | |
4774 | input scan_in; | |
4775 | ||
4776 | ||
4777 | input siclk; | |
4778 | input soclk; | |
4779 | ||
4780 | output [19:0] dout; | |
4781 | output scan_out; | |
4782 | assign fdin[19:0] = din[19:0]; | |
4783 | ||
4784 | ||
4785 | ||
4786 | ||
4787 | ||
4788 | ||
4789 | dff #(20) d0_0 ( | |
4790 | .l1clk(l1clk), | |
4791 | .siclk(siclk), | |
4792 | .soclk(soclk), | |
4793 | .d(fdin[19:0]), | |
4794 | .si({scan_in,so[18:0]}), | |
4795 | .so({so[18:0],scan_out}), | |
4796 | .q(dout[19:0]) | |
4797 | ); | |
4798 | ||
4799 | ||
4800 | ||
4801 | ||
4802 | ||
4803 | ||
4804 | ||
4805 | ||
4806 | ||
4807 | ||
4808 | ||
4809 | ||
4810 | endmodule | |
4811 | ||
4812 | ||
4813 | ||
4814 | ||
4815 | ||
4816 | ||
4817 | ||
4818 | ||
4819 | ||
4820 | // Description: Spare gate macro for control blocks | |
4821 | // | |
4822 | // Param num controls the number of times the macro is added | |
4823 | // flops=0 can be used to use only combination spare logic | |
4824 | ||
4825 | ||
4826 | module lsu_dcc_ctl_spare_ctl_macro__num_9 ( | |
4827 | l1clk, | |
4828 | scan_in, | |
4829 | siclk, | |
4830 | soclk, | |
4831 | scan_out); | |
4832 | wire si_0; | |
4833 | wire so_0; | |
4834 | wire spare0_flop_unused; | |
4835 | wire spare0_buf_32x_unused; | |
4836 | wire spare0_nand3_8x_unused; | |
4837 | wire spare0_inv_8x_unused; | |
4838 | wire spare0_aoi22_4x_unused; | |
4839 | wire spare0_buf_8x_unused; | |
4840 | wire spare0_oai22_4x_unused; | |
4841 | wire spare0_inv_16x_unused; | |
4842 | wire spare0_nand2_16x_unused; | |
4843 | wire spare0_nor3_4x_unused; | |
4844 | wire spare0_nand2_8x_unused; | |
4845 | wire spare0_buf_16x_unused; | |
4846 | wire spare0_nor2_16x_unused; | |
4847 | wire spare0_inv_32x_unused; | |
4848 | wire si_1; | |
4849 | wire so_1; | |
4850 | wire spare1_flop_unused; | |
4851 | wire spare1_buf_32x_unused; | |
4852 | wire spare1_nand3_8x_unused; | |
4853 | wire spare1_inv_8x_unused; | |
4854 | wire spare1_aoi22_4x_unused; | |
4855 | wire spare1_buf_8x_unused; | |
4856 | wire spare1_oai22_4x_unused; | |
4857 | wire spare1_inv_16x_unused; | |
4858 | wire spare1_nand2_16x_unused; | |
4859 | wire spare1_nor3_4x_unused; | |
4860 | wire spare1_nand2_8x_unused; | |
4861 | wire spare1_buf_16x_unused; | |
4862 | wire spare1_nor2_16x_unused; | |
4863 | wire spare1_inv_32x_unused; | |
4864 | wire si_2; | |
4865 | wire so_2; | |
4866 | wire spare2_flop_unused; | |
4867 | wire spare2_buf_32x_unused; | |
4868 | wire spare2_nand3_8x_unused; | |
4869 | wire spare2_inv_8x_unused; | |
4870 | wire spare2_aoi22_4x_unused; | |
4871 | wire spare2_buf_8x_unused; | |
4872 | wire spare2_oai22_4x_unused; | |
4873 | wire spare2_inv_16x_unused; | |
4874 | wire spare2_nand2_16x_unused; | |
4875 | wire spare2_nor3_4x_unused; | |
4876 | wire spare2_nand2_8x_unused; | |
4877 | wire spare2_buf_16x_unused; | |
4878 | wire spare2_nor2_16x_unused; | |
4879 | wire spare2_inv_32x_unused; | |
4880 | wire si_3; | |
4881 | wire so_3; | |
4882 | wire spare3_flop_unused; | |
4883 | wire spare3_buf_32x_unused; | |
4884 | wire spare3_nand3_8x_unused; | |
4885 | wire spare3_inv_8x_unused; | |
4886 | wire spare3_aoi22_4x_unused; | |
4887 | wire spare3_buf_8x_unused; | |
4888 | wire spare3_oai22_4x_unused; | |
4889 | wire spare3_inv_16x_unused; | |
4890 | wire spare3_nand2_16x_unused; | |
4891 | wire spare3_nor3_4x_unused; | |
4892 | wire spare3_nand2_8x_unused; | |
4893 | wire spare3_buf_16x_unused; | |
4894 | wire spare3_nor2_16x_unused; | |
4895 | wire spare3_inv_32x_unused; | |
4896 | wire si_4; | |
4897 | wire so_4; | |
4898 | wire spare4_flop_unused; | |
4899 | wire spare4_buf_32x_unused; | |
4900 | wire spare4_nand3_8x_unused; | |
4901 | wire spare4_inv_8x_unused; | |
4902 | wire spare4_aoi22_4x_unused; | |
4903 | wire spare4_buf_8x_unused; | |
4904 | wire spare4_oai22_4x_unused; | |
4905 | wire spare4_inv_16x_unused; | |
4906 | wire spare4_nand2_16x_unused; | |
4907 | wire spare4_nor3_4x_unused; | |
4908 | wire spare4_nand2_8x_unused; | |
4909 | wire spare4_buf_16x_unused; | |
4910 | wire spare4_nor2_16x_unused; | |
4911 | wire spare4_inv_32x_unused; | |
4912 | wire si_5; | |
4913 | wire so_5; | |
4914 | wire spare5_flop_unused; | |
4915 | wire spare5_buf_32x_unused; | |
4916 | wire spare5_nand3_8x_unused; | |
4917 | wire spare5_inv_8x_unused; | |
4918 | wire spare5_aoi22_4x_unused; | |
4919 | wire spare5_buf_8x_unused; | |
4920 | wire spare5_oai22_4x_unused; | |
4921 | wire spare5_inv_16x_unused; | |
4922 | wire spare5_nand2_16x_unused; | |
4923 | wire spare5_nor3_4x_unused; | |
4924 | wire spare5_nand2_8x_unused; | |
4925 | wire spare5_buf_16x_unused; | |
4926 | wire spare5_nor2_16x_unused; | |
4927 | wire spare5_inv_32x_unused; | |
4928 | wire si_6; | |
4929 | wire so_6; | |
4930 | wire spare6_flop_unused; | |
4931 | wire spare6_buf_32x_unused; | |
4932 | wire spare6_nand3_8x_unused; | |
4933 | wire spare6_inv_8x_unused; | |
4934 | wire spare6_aoi22_4x_unused; | |
4935 | wire spare6_buf_8x_unused; | |
4936 | wire spare6_oai22_4x_unused; | |
4937 | wire spare6_inv_16x_unused; | |
4938 | wire spare6_nand2_16x_unused; | |
4939 | wire spare6_nor3_4x_unused; | |
4940 | wire spare6_nand2_8x_unused; | |
4941 | wire spare6_buf_16x_unused; | |
4942 | wire spare6_nor2_16x_unused; | |
4943 | wire spare6_inv_32x_unused; | |
4944 | wire si_7; | |
4945 | wire so_7; | |
4946 | wire spare7_flop_unused; | |
4947 | wire spare7_buf_32x_unused; | |
4948 | wire spare7_nand3_8x_unused; | |
4949 | wire spare7_inv_8x_unused; | |
4950 | wire spare7_aoi22_4x_unused; | |
4951 | wire spare7_buf_8x_unused; | |
4952 | wire spare7_oai22_4x_unused; | |
4953 | wire spare7_inv_16x_unused; | |
4954 | wire spare7_nand2_16x_unused; | |
4955 | wire spare7_nor3_4x_unused; | |
4956 | wire spare7_nand2_8x_unused; | |
4957 | wire spare7_buf_16x_unused; | |
4958 | wire spare7_nor2_16x_unused; | |
4959 | wire spare7_inv_32x_unused; | |
4960 | wire si_8; | |
4961 | wire so_8; | |
4962 | wire spare8_flop_unused; | |
4963 | wire spare8_buf_32x_unused; | |
4964 | wire spare8_nand3_8x_unused; | |
4965 | wire spare8_inv_8x_unused; | |
4966 | wire spare8_aoi22_4x_unused; | |
4967 | wire spare8_buf_8x_unused; | |
4968 | wire spare8_oai22_4x_unused; | |
4969 | wire spare8_inv_16x_unused; | |
4970 | wire spare8_nand2_16x_unused; | |
4971 | wire spare8_nor3_4x_unused; | |
4972 | wire spare8_nand2_8x_unused; | |
4973 | wire spare8_buf_16x_unused; | |
4974 | wire spare8_nor2_16x_unused; | |
4975 | wire spare8_inv_32x_unused; | |
4976 | ||
4977 | ||
4978 | input l1clk; | |
4979 | input scan_in; | |
4980 | input siclk; | |
4981 | input soclk; | |
4982 | output scan_out; | |
4983 | ||
4984 | cl_sc1_msff_8x spare0_flop (.l1clk(l1clk), | |
4985 | .siclk(siclk), | |
4986 | .soclk(soclk), | |
4987 | .si(si_0), | |
4988 | .so(so_0), | |
4989 | .d(1'b0), | |
4990 | .q(spare0_flop_unused)); | |
4991 | assign si_0 = scan_in; | |
4992 | ||
4993 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
4994 | .out(spare0_buf_32x_unused)); | |
4995 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
4996 | .in1(1'b1), | |
4997 | .in2(1'b1), | |
4998 | .out(spare0_nand3_8x_unused)); | |
4999 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
5000 | .out(spare0_inv_8x_unused)); | |
5001 | cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1), | |
5002 | .in01(1'b1), | |
5003 | .in10(1'b1), | |
5004 | .in11(1'b1), | |
5005 | .out(spare0_aoi22_4x_unused)); | |
5006 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
5007 | .out(spare0_buf_8x_unused)); | |
5008 | cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1), | |
5009 | .in01(1'b1), | |
5010 | .in10(1'b1), | |
5011 | .in11(1'b1), | |
5012 | .out(spare0_oai22_4x_unused)); | |
5013 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
5014 | .out(spare0_inv_16x_unused)); | |
5015 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
5016 | .in1(1'b1), | |
5017 | .out(spare0_nand2_16x_unused)); | |
5018 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
5019 | .in1(1'b0), | |
5020 | .in2(1'b0), | |
5021 | .out(spare0_nor3_4x_unused)); | |
5022 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
5023 | .in1(1'b1), | |
5024 | .out(spare0_nand2_8x_unused)); | |
5025 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
5026 | .out(spare0_buf_16x_unused)); | |
5027 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
5028 | .in1(1'b0), | |
5029 | .out(spare0_nor2_16x_unused)); | |
5030 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
5031 | .out(spare0_inv_32x_unused)); | |
5032 | ||
5033 | cl_sc1_msff_8x spare1_flop (.l1clk(l1clk), | |
5034 | .siclk(siclk), | |
5035 | .soclk(soclk), | |
5036 | .si(si_1), | |
5037 | .so(so_1), | |
5038 | .d(1'b0), | |
5039 | .q(spare1_flop_unused)); | |
5040 | assign si_1 = so_0; | |
5041 | ||
5042 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
5043 | .out(spare1_buf_32x_unused)); | |
5044 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
5045 | .in1(1'b1), | |
5046 | .in2(1'b1), | |
5047 | .out(spare1_nand3_8x_unused)); | |
5048 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
5049 | .out(spare1_inv_8x_unused)); | |
5050 | cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1), | |
5051 | .in01(1'b1), | |
5052 | .in10(1'b1), | |
5053 | .in11(1'b1), | |
5054 | .out(spare1_aoi22_4x_unused)); | |
5055 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
5056 | .out(spare1_buf_8x_unused)); | |
5057 | cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1), | |
5058 | .in01(1'b1), | |
5059 | .in10(1'b1), | |
5060 | .in11(1'b1), | |
5061 | .out(spare1_oai22_4x_unused)); | |
5062 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
5063 | .out(spare1_inv_16x_unused)); | |
5064 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
5065 | .in1(1'b1), | |
5066 | .out(spare1_nand2_16x_unused)); | |
5067 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
5068 | .in1(1'b0), | |
5069 | .in2(1'b0), | |
5070 | .out(spare1_nor3_4x_unused)); | |
5071 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
5072 | .in1(1'b1), | |
5073 | .out(spare1_nand2_8x_unused)); | |
5074 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
5075 | .out(spare1_buf_16x_unused)); | |
5076 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
5077 | .in1(1'b0), | |
5078 | .out(spare1_nor2_16x_unused)); | |
5079 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
5080 | .out(spare1_inv_32x_unused)); | |
5081 | ||
5082 | cl_sc1_msff_8x spare2_flop (.l1clk(l1clk), | |
5083 | .siclk(siclk), | |
5084 | .soclk(soclk), | |
5085 | .si(si_2), | |
5086 | .so(so_2), | |
5087 | .d(1'b0), | |
5088 | .q(spare2_flop_unused)); | |
5089 | assign si_2 = so_1; | |
5090 | ||
5091 | cl_u1_buf_32x spare2_buf_32x (.in(1'b1), | |
5092 | .out(spare2_buf_32x_unused)); | |
5093 | cl_u1_nand3_8x spare2_nand3_8x (.in0(1'b1), | |
5094 | .in1(1'b1), | |
5095 | .in2(1'b1), | |
5096 | .out(spare2_nand3_8x_unused)); | |
5097 | cl_u1_inv_8x spare2_inv_8x (.in(1'b1), | |
5098 | .out(spare2_inv_8x_unused)); | |
5099 | cl_u1_aoi22_4x spare2_aoi22_4x (.in00(1'b1), | |
5100 | .in01(1'b1), | |
5101 | .in10(1'b1), | |
5102 | .in11(1'b1), | |
5103 | .out(spare2_aoi22_4x_unused)); | |
5104 | cl_u1_buf_8x spare2_buf_8x (.in(1'b1), | |
5105 | .out(spare2_buf_8x_unused)); | |
5106 | cl_u1_oai22_4x spare2_oai22_4x (.in00(1'b1), | |
5107 | .in01(1'b1), | |
5108 | .in10(1'b1), | |
5109 | .in11(1'b1), | |
5110 | .out(spare2_oai22_4x_unused)); | |
5111 | cl_u1_inv_16x spare2_inv_16x (.in(1'b1), | |
5112 | .out(spare2_inv_16x_unused)); | |
5113 | cl_u1_nand2_16x spare2_nand2_16x (.in0(1'b1), | |
5114 | .in1(1'b1), | |
5115 | .out(spare2_nand2_16x_unused)); | |
5116 | cl_u1_nor3_4x spare2_nor3_4x (.in0(1'b0), | |
5117 | .in1(1'b0), | |
5118 | .in2(1'b0), | |
5119 | .out(spare2_nor3_4x_unused)); | |
5120 | cl_u1_nand2_8x spare2_nand2_8x (.in0(1'b1), | |
5121 | .in1(1'b1), | |
5122 | .out(spare2_nand2_8x_unused)); | |
5123 | cl_u1_buf_16x spare2_buf_16x (.in(1'b1), | |
5124 | .out(spare2_buf_16x_unused)); | |
5125 | cl_u1_nor2_16x spare2_nor2_16x (.in0(1'b0), | |
5126 | .in1(1'b0), | |
5127 | .out(spare2_nor2_16x_unused)); | |
5128 | cl_u1_inv_32x spare2_inv_32x (.in(1'b1), | |
5129 | .out(spare2_inv_32x_unused)); | |
5130 | ||
5131 | cl_sc1_msff_8x spare3_flop (.l1clk(l1clk), | |
5132 | .siclk(siclk), | |
5133 | .soclk(soclk), | |
5134 | .si(si_3), | |
5135 | .so(so_3), | |
5136 | .d(1'b0), | |
5137 | .q(spare3_flop_unused)); | |
5138 | assign si_3 = so_2; | |
5139 | ||
5140 | cl_u1_buf_32x spare3_buf_32x (.in(1'b1), | |
5141 | .out(spare3_buf_32x_unused)); | |
5142 | cl_u1_nand3_8x spare3_nand3_8x (.in0(1'b1), | |
5143 | .in1(1'b1), | |
5144 | .in2(1'b1), | |
5145 | .out(spare3_nand3_8x_unused)); | |
5146 | cl_u1_inv_8x spare3_inv_8x (.in(1'b1), | |
5147 | .out(spare3_inv_8x_unused)); | |
5148 | cl_u1_aoi22_4x spare3_aoi22_4x (.in00(1'b1), | |
5149 | .in01(1'b1), | |
5150 | .in10(1'b1), | |
5151 | .in11(1'b1), | |
5152 | .out(spare3_aoi22_4x_unused)); | |
5153 | cl_u1_buf_8x spare3_buf_8x (.in(1'b1), | |
5154 | .out(spare3_buf_8x_unused)); | |
5155 | cl_u1_oai22_4x spare3_oai22_4x (.in00(1'b1), | |
5156 | .in01(1'b1), | |
5157 | .in10(1'b1), | |
5158 | .in11(1'b1), | |
5159 | .out(spare3_oai22_4x_unused)); | |
5160 | cl_u1_inv_16x spare3_inv_16x (.in(1'b1), | |
5161 | .out(spare3_inv_16x_unused)); | |
5162 | cl_u1_nand2_16x spare3_nand2_16x (.in0(1'b1), | |
5163 | .in1(1'b1), | |
5164 | .out(spare3_nand2_16x_unused)); | |
5165 | cl_u1_nor3_4x spare3_nor3_4x (.in0(1'b0), | |
5166 | .in1(1'b0), | |
5167 | .in2(1'b0), | |
5168 | .out(spare3_nor3_4x_unused)); | |
5169 | cl_u1_nand2_8x spare3_nand2_8x (.in0(1'b1), | |
5170 | .in1(1'b1), | |
5171 | .out(spare3_nand2_8x_unused)); | |
5172 | cl_u1_buf_16x spare3_buf_16x (.in(1'b1), | |
5173 | .out(spare3_buf_16x_unused)); | |
5174 | cl_u1_nor2_16x spare3_nor2_16x (.in0(1'b0), | |
5175 | .in1(1'b0), | |
5176 | .out(spare3_nor2_16x_unused)); | |
5177 | cl_u1_inv_32x spare3_inv_32x (.in(1'b1), | |
5178 | .out(spare3_inv_32x_unused)); | |
5179 | ||
5180 | cl_sc1_msff_8x spare4_flop (.l1clk(l1clk), | |
5181 | .siclk(siclk), | |
5182 | .soclk(soclk), | |
5183 | .si(si_4), | |
5184 | .so(so_4), | |
5185 | .d(1'b0), | |
5186 | .q(spare4_flop_unused)); | |
5187 | assign si_4 = so_3; | |
5188 | ||
5189 | cl_u1_buf_32x spare4_buf_32x (.in(1'b1), | |
5190 | .out(spare4_buf_32x_unused)); | |
5191 | cl_u1_nand3_8x spare4_nand3_8x (.in0(1'b1), | |
5192 | .in1(1'b1), | |
5193 | .in2(1'b1), | |
5194 | .out(spare4_nand3_8x_unused)); | |
5195 | cl_u1_inv_8x spare4_inv_8x (.in(1'b1), | |
5196 | .out(spare4_inv_8x_unused)); | |
5197 | cl_u1_aoi22_4x spare4_aoi22_4x (.in00(1'b1), | |
5198 | .in01(1'b1), | |
5199 | .in10(1'b1), | |
5200 | .in11(1'b1), | |
5201 | .out(spare4_aoi22_4x_unused)); | |
5202 | cl_u1_buf_8x spare4_buf_8x (.in(1'b1), | |
5203 | .out(spare4_buf_8x_unused)); | |
5204 | cl_u1_oai22_4x spare4_oai22_4x (.in00(1'b1), | |
5205 | .in01(1'b1), | |
5206 | .in10(1'b1), | |
5207 | .in11(1'b1), | |
5208 | .out(spare4_oai22_4x_unused)); | |
5209 | cl_u1_inv_16x spare4_inv_16x (.in(1'b1), | |
5210 | .out(spare4_inv_16x_unused)); | |
5211 | cl_u1_nand2_16x spare4_nand2_16x (.in0(1'b1), | |
5212 | .in1(1'b1), | |
5213 | .out(spare4_nand2_16x_unused)); | |
5214 | cl_u1_nor3_4x spare4_nor3_4x (.in0(1'b0), | |
5215 | .in1(1'b0), | |
5216 | .in2(1'b0), | |
5217 | .out(spare4_nor3_4x_unused)); | |
5218 | cl_u1_nand2_8x spare4_nand2_8x (.in0(1'b1), | |
5219 | .in1(1'b1), | |
5220 | .out(spare4_nand2_8x_unused)); | |
5221 | cl_u1_buf_16x spare4_buf_16x (.in(1'b1), | |
5222 | .out(spare4_buf_16x_unused)); | |
5223 | cl_u1_nor2_16x spare4_nor2_16x (.in0(1'b0), | |
5224 | .in1(1'b0), | |
5225 | .out(spare4_nor2_16x_unused)); | |
5226 | cl_u1_inv_32x spare4_inv_32x (.in(1'b1), | |
5227 | .out(spare4_inv_32x_unused)); | |
5228 | ||
5229 | cl_sc1_msff_8x spare5_flop (.l1clk(l1clk), | |
5230 | .siclk(siclk), | |
5231 | .soclk(soclk), | |
5232 | .si(si_5), | |
5233 | .so(so_5), | |
5234 | .d(1'b0), | |
5235 | .q(spare5_flop_unused)); | |
5236 | assign si_5 = so_4; | |
5237 | ||
5238 | cl_u1_buf_32x spare5_buf_32x (.in(1'b1), | |
5239 | .out(spare5_buf_32x_unused)); | |
5240 | cl_u1_nand3_8x spare5_nand3_8x (.in0(1'b1), | |
5241 | .in1(1'b1), | |
5242 | .in2(1'b1), | |
5243 | .out(spare5_nand3_8x_unused)); | |
5244 | cl_u1_inv_8x spare5_inv_8x (.in(1'b1), | |
5245 | .out(spare5_inv_8x_unused)); | |
5246 | cl_u1_aoi22_4x spare5_aoi22_4x (.in00(1'b1), | |
5247 | .in01(1'b1), | |
5248 | .in10(1'b1), | |
5249 | .in11(1'b1), | |
5250 | .out(spare5_aoi22_4x_unused)); | |
5251 | cl_u1_buf_8x spare5_buf_8x (.in(1'b1), | |
5252 | .out(spare5_buf_8x_unused)); | |
5253 | cl_u1_oai22_4x spare5_oai22_4x (.in00(1'b1), | |
5254 | .in01(1'b1), | |
5255 | .in10(1'b1), | |
5256 | .in11(1'b1), | |
5257 | .out(spare5_oai22_4x_unused)); | |
5258 | cl_u1_inv_16x spare5_inv_16x (.in(1'b1), | |
5259 | .out(spare5_inv_16x_unused)); | |
5260 | cl_u1_nand2_16x spare5_nand2_16x (.in0(1'b1), | |
5261 | .in1(1'b1), | |
5262 | .out(spare5_nand2_16x_unused)); | |
5263 | cl_u1_nor3_4x spare5_nor3_4x (.in0(1'b0), | |
5264 | .in1(1'b0), | |
5265 | .in2(1'b0), | |
5266 | .out(spare5_nor3_4x_unused)); | |
5267 | cl_u1_nand2_8x spare5_nand2_8x (.in0(1'b1), | |
5268 | .in1(1'b1), | |
5269 | .out(spare5_nand2_8x_unused)); | |
5270 | cl_u1_buf_16x spare5_buf_16x (.in(1'b1), | |
5271 | .out(spare5_buf_16x_unused)); | |
5272 | cl_u1_nor2_16x spare5_nor2_16x (.in0(1'b0), | |
5273 | .in1(1'b0), | |
5274 | .out(spare5_nor2_16x_unused)); | |
5275 | cl_u1_inv_32x spare5_inv_32x (.in(1'b1), | |
5276 | .out(spare5_inv_32x_unused)); | |
5277 | ||
5278 | cl_sc1_msff_8x spare6_flop (.l1clk(l1clk), | |
5279 | .siclk(siclk), | |
5280 | .soclk(soclk), | |
5281 | .si(si_6), | |
5282 | .so(so_6), | |
5283 | .d(1'b0), | |
5284 | .q(spare6_flop_unused)); | |
5285 | assign si_6 = so_5; | |
5286 | ||
5287 | cl_u1_buf_32x spare6_buf_32x (.in(1'b1), | |
5288 | .out(spare6_buf_32x_unused)); | |
5289 | cl_u1_nand3_8x spare6_nand3_8x (.in0(1'b1), | |
5290 | .in1(1'b1), | |
5291 | .in2(1'b1), | |
5292 | .out(spare6_nand3_8x_unused)); | |
5293 | cl_u1_inv_8x spare6_inv_8x (.in(1'b1), | |
5294 | .out(spare6_inv_8x_unused)); | |
5295 | cl_u1_aoi22_4x spare6_aoi22_4x (.in00(1'b1), | |
5296 | .in01(1'b1), | |
5297 | .in10(1'b1), | |
5298 | .in11(1'b1), | |
5299 | .out(spare6_aoi22_4x_unused)); | |
5300 | cl_u1_buf_8x spare6_buf_8x (.in(1'b1), | |
5301 | .out(spare6_buf_8x_unused)); | |
5302 | cl_u1_oai22_4x spare6_oai22_4x (.in00(1'b1), | |
5303 | .in01(1'b1), | |
5304 | .in10(1'b1), | |
5305 | .in11(1'b1), | |
5306 | .out(spare6_oai22_4x_unused)); | |
5307 | cl_u1_inv_16x spare6_inv_16x (.in(1'b1), | |
5308 | .out(spare6_inv_16x_unused)); | |
5309 | cl_u1_nand2_16x spare6_nand2_16x (.in0(1'b1), | |
5310 | .in1(1'b1), | |
5311 | .out(spare6_nand2_16x_unused)); | |
5312 | cl_u1_nor3_4x spare6_nor3_4x (.in0(1'b0), | |
5313 | .in1(1'b0), | |
5314 | .in2(1'b0), | |
5315 | .out(spare6_nor3_4x_unused)); | |
5316 | cl_u1_nand2_8x spare6_nand2_8x (.in0(1'b1), | |
5317 | .in1(1'b1), | |
5318 | .out(spare6_nand2_8x_unused)); | |
5319 | cl_u1_buf_16x spare6_buf_16x (.in(1'b1), | |
5320 | .out(spare6_buf_16x_unused)); | |
5321 | cl_u1_nor2_16x spare6_nor2_16x (.in0(1'b0), | |
5322 | .in1(1'b0), | |
5323 | .out(spare6_nor2_16x_unused)); | |
5324 | cl_u1_inv_32x spare6_inv_32x (.in(1'b1), | |
5325 | .out(spare6_inv_32x_unused)); | |
5326 | ||
5327 | cl_sc1_msff_8x spare7_flop (.l1clk(l1clk), | |
5328 | .siclk(siclk), | |
5329 | .soclk(soclk), | |
5330 | .si(si_7), | |
5331 | .so(so_7), | |
5332 | .d(1'b0), | |
5333 | .q(spare7_flop_unused)); | |
5334 | assign si_7 = so_6; | |
5335 | ||
5336 | cl_u1_buf_32x spare7_buf_32x (.in(1'b1), | |
5337 | .out(spare7_buf_32x_unused)); | |
5338 | cl_u1_nand3_8x spare7_nand3_8x (.in0(1'b1), | |
5339 | .in1(1'b1), | |
5340 | .in2(1'b1), | |
5341 | .out(spare7_nand3_8x_unused)); | |
5342 | cl_u1_inv_8x spare7_inv_8x (.in(1'b1), | |
5343 | .out(spare7_inv_8x_unused)); | |
5344 | cl_u1_aoi22_4x spare7_aoi22_4x (.in00(1'b1), | |
5345 | .in01(1'b1), | |
5346 | .in10(1'b1), | |
5347 | .in11(1'b1), | |
5348 | .out(spare7_aoi22_4x_unused)); | |
5349 | cl_u1_buf_8x spare7_buf_8x (.in(1'b1), | |
5350 | .out(spare7_buf_8x_unused)); | |
5351 | cl_u1_oai22_4x spare7_oai22_4x (.in00(1'b1), | |
5352 | .in01(1'b1), | |
5353 | .in10(1'b1), | |
5354 | .in11(1'b1), | |
5355 | .out(spare7_oai22_4x_unused)); | |
5356 | cl_u1_inv_16x spare7_inv_16x (.in(1'b1), | |
5357 | .out(spare7_inv_16x_unused)); | |
5358 | cl_u1_nand2_16x spare7_nand2_16x (.in0(1'b1), | |
5359 | .in1(1'b1), | |
5360 | .out(spare7_nand2_16x_unused)); | |
5361 | cl_u1_nor3_4x spare7_nor3_4x (.in0(1'b0), | |
5362 | .in1(1'b0), | |
5363 | .in2(1'b0), | |
5364 | .out(spare7_nor3_4x_unused)); | |
5365 | cl_u1_nand2_8x spare7_nand2_8x (.in0(1'b1), | |
5366 | .in1(1'b1), | |
5367 | .out(spare7_nand2_8x_unused)); | |
5368 | cl_u1_buf_16x spare7_buf_16x (.in(1'b1), | |
5369 | .out(spare7_buf_16x_unused)); | |
5370 | cl_u1_nor2_16x spare7_nor2_16x (.in0(1'b0), | |
5371 | .in1(1'b0), | |
5372 | .out(spare7_nor2_16x_unused)); | |
5373 | cl_u1_inv_32x spare7_inv_32x (.in(1'b1), | |
5374 | .out(spare7_inv_32x_unused)); | |
5375 | ||
5376 | cl_sc1_msff_8x spare8_flop (.l1clk(l1clk), | |
5377 | .siclk(siclk), | |
5378 | .soclk(soclk), | |
5379 | .si(si_8), | |
5380 | .so(so_8), | |
5381 | .d(1'b0), | |
5382 | .q(spare8_flop_unused)); | |
5383 | assign si_8 = so_7; | |
5384 | ||
5385 | cl_u1_buf_32x spare8_buf_32x (.in(1'b1), | |
5386 | .out(spare8_buf_32x_unused)); | |
5387 | cl_u1_nand3_8x spare8_nand3_8x (.in0(1'b1), | |
5388 | .in1(1'b1), | |
5389 | .in2(1'b1), | |
5390 | .out(spare8_nand3_8x_unused)); | |
5391 | cl_u1_inv_8x spare8_inv_8x (.in(1'b1), | |
5392 | .out(spare8_inv_8x_unused)); | |
5393 | cl_u1_aoi22_4x spare8_aoi22_4x (.in00(1'b1), | |
5394 | .in01(1'b1), | |
5395 | .in10(1'b1), | |
5396 | .in11(1'b1), | |
5397 | .out(spare8_aoi22_4x_unused)); | |
5398 | cl_u1_buf_8x spare8_buf_8x (.in(1'b1), | |
5399 | .out(spare8_buf_8x_unused)); | |
5400 | cl_u1_oai22_4x spare8_oai22_4x (.in00(1'b1), | |
5401 | .in01(1'b1), | |
5402 | .in10(1'b1), | |
5403 | .in11(1'b1), | |
5404 | .out(spare8_oai22_4x_unused)); | |
5405 | cl_u1_inv_16x spare8_inv_16x (.in(1'b1), | |
5406 | .out(spare8_inv_16x_unused)); | |
5407 | cl_u1_nand2_16x spare8_nand2_16x (.in0(1'b1), | |
5408 | .in1(1'b1), | |
5409 | .out(spare8_nand2_16x_unused)); | |
5410 | cl_u1_nor3_4x spare8_nor3_4x (.in0(1'b0), | |
5411 | .in1(1'b0), | |
5412 | .in2(1'b0), | |
5413 | .out(spare8_nor3_4x_unused)); | |
5414 | cl_u1_nand2_8x spare8_nand2_8x (.in0(1'b1), | |
5415 | .in1(1'b1), | |
5416 | .out(spare8_nand2_8x_unused)); | |
5417 | cl_u1_buf_16x spare8_buf_16x (.in(1'b1), | |
5418 | .out(spare8_buf_16x_unused)); | |
5419 | cl_u1_nor2_16x spare8_nor2_16x (.in0(1'b0), | |
5420 | .in1(1'b0), | |
5421 | .out(spare8_nor2_16x_unused)); | |
5422 | cl_u1_inv_32x spare8_inv_32x (.in(1'b1), | |
5423 | .out(spare8_inv_32x_unused)); | |
5424 | assign scan_out = so_8; | |
5425 | ||
5426 | ||
5427 | ||
5428 | endmodule | |
5429 |