Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: lsu_tgd_dp.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_tgd_dp ( | |
36 | dta_rdata_w0_m, | |
37 | dta_rdata_w1_m, | |
38 | dta_rdata_w2_m, | |
39 | dta_rdata_w3_m, | |
40 | tgc_cache_way_vld_m, | |
41 | tgc_cache_way_vld2_m, | |
42 | tgc_way_sel_m, | |
43 | dcs_watchpoint_m, | |
44 | dcs_context0_e, | |
45 | dcs_context1_e, | |
46 | dcc_rd_dt_diag_m, | |
47 | dcc_rd_dt_diag_b, | |
48 | dcc_tlb_tag0_read_b, | |
49 | dcc_tlb_tag1_read_b, | |
50 | dcc_tlb_data_read_b, | |
51 | dcc_ld_inst_vld_m, | |
52 | dcc_ldst_m_clken, | |
53 | tlb_pgnum, | |
54 | tlb_tte_data, | |
55 | tlb_tte_tag, | |
56 | tlb_tte_u_bit, | |
57 | tlb_cam_hit, | |
58 | tlb_context0_hit, | |
59 | tlb_cam_mhit, | |
60 | tld_prty_256m, | |
61 | tld_prty_4m, | |
62 | tld_prty_64k, | |
63 | tld_prty_8k, | |
64 | tld_prty_ctxt0, | |
65 | tld_prty_ctxt1, | |
66 | tld_tag_c0, | |
67 | tld_tag_c1, | |
68 | tlc_sel_tte_tag, | |
69 | tlc_sel_demap_tag_c0, | |
70 | tlc_sel_demap_tag_c1, | |
71 | bist_cmp_data, | |
72 | bist_dta_cmp_en, | |
73 | bist_cmpsel_2, | |
74 | lsu_va_m, | |
75 | tgd_w0_parity_b, | |
76 | tgd_w1_parity_b, | |
77 | tgd_w2_parity_b, | |
78 | tgd_w3_parity_b, | |
79 | dta_rdata_w0_rep, | |
80 | dta_rdata_w1_rep, | |
81 | dta_rdata_w2_rep, | |
82 | dta_rdata_w3_rep, | |
83 | tgd_prty_256m_b, | |
84 | tgd_prty_4m_b, | |
85 | tgd_prty_64k_b, | |
86 | tgd_prty_8k_b, | |
87 | tgd_prty_ctxt0_b, | |
88 | tgd_prty_ctxt1_b, | |
89 | tgd_va_wp_47_16, | |
90 | tgd_va_wp_15_3, | |
91 | tgd_pa_wp_39_16, | |
92 | tgd_pa_wp_15_3, | |
93 | tgd_tag_c0, | |
94 | tgd_tag_c1, | |
95 | tlb_tag_parity, | |
96 | tlb_pgsize, | |
97 | tlb_tte_nfo_b, | |
98 | tlb_tte_ie_b, | |
99 | tlb_tte_cp_b, | |
100 | tlb_tte_ebit_b, | |
101 | tlb_tte_pbit_b, | |
102 | tlb_tte_wbit_b, | |
103 | tgd_ldxa_asi_data_b, | |
104 | tgd_bist_compare, | |
105 | lsu_mbi_tlb_data_cmp, | |
106 | lsu_mbi_tlb_cam_hit, | |
107 | lsu_mbi_tlb_cam_mhit, | |
108 | lsu_mbi_tlb_ctxt0_hit, | |
109 | lsu_mbi_tlb_valid, | |
110 | lsu_mbi_tlb_used, | |
111 | l2clk, | |
112 | scan_in, | |
113 | tcu_pce_ov, | |
114 | tcu_scan_en, | |
115 | tcu_se_scancollar_out, | |
116 | spc_aclk, | |
117 | spc_bclk, | |
118 | scan_out); | |
119 | wire stop; | |
120 | wire se; | |
121 | wire pce_ov; | |
122 | wire siclk; | |
123 | wire soclk; | |
124 | wire clk; | |
125 | wire [1:0] w0_16b_parity_m; | |
126 | wire [1:0] w1_16b_parity_m; | |
127 | wire [1:0] w2_16b_parity_m; | |
128 | wire [1:0] w3_16b_parity_m; | |
129 | wire dff_16b_prty_w01_scanin; | |
130 | wire dff_16b_prty_w01_scanout; | |
131 | wire [1:0] w0_16b_parity_b; | |
132 | wire [1:0] w1_16b_parity_b; | |
133 | wire dff_16b_prty_w23_scanin; | |
134 | wire dff_16b_prty_w23_scanout; | |
135 | wire [1:0] w2_16b_parity_b; | |
136 | wire [1:0] w3_16b_parity_b; | |
137 | wire [3:0] tag_parity_b; | |
138 | wire [31:0] tgd_diag_tag01_m; | |
139 | wire [31:0] tgd_diag_tag23_m; | |
140 | wire dff_diag_tag_scanin; | |
141 | wire dff_diag_tag_scanout; | |
142 | wire [31:0] tgd_diag_tag_b; | |
143 | wire tte_data_va_27_22_v_; | |
144 | wire tte_data_sz_1; | |
145 | wire [12:0] tag_c0; | |
146 | wire [12:0] tag_c1; | |
147 | wire [63:0] ldxa_asi_data_b; | |
148 | wire [47:3] va_m_buf; | |
149 | wire dff_va_b_scanin; | |
150 | wire dff_va_b_scanout; | |
151 | wire [47:3] va_b; | |
152 | wire dff_wpt_b_scanin; | |
153 | wire dff_wpt_b_scanout; | |
154 | wire [47:3] watchpoint_b; | |
155 | wire va_wp_47_16; | |
156 | wire va_wp_15_3; | |
157 | wire pa_wp_39_16; | |
158 | wire pa_wp_15_3; | |
159 | wire [63:0] bist_mux_data; | |
160 | ||
161 | ||
162 | input [29:0] dta_rdata_w0_m; | |
163 | input [29:0] dta_rdata_w1_m; | |
164 | input [29:0] dta_rdata_w2_m; | |
165 | input [29:0] dta_rdata_w3_m; | |
166 | ||
167 | input [3:0] tgc_cache_way_vld_m; | |
168 | input [3:0] tgc_cache_way_vld2_m; | |
169 | input [1:0] tgc_way_sel_m; | |
170 | ||
171 | input [47:3] dcs_watchpoint_m; | |
172 | input [12:0] dcs_context0_e; | |
173 | input [12:0] dcs_context1_e; | |
174 | ||
175 | input dcc_rd_dt_diag_m; | |
176 | input dcc_rd_dt_diag_b; | |
177 | input dcc_tlb_tag0_read_b; | |
178 | input dcc_tlb_tag1_read_b; | |
179 | input dcc_tlb_data_read_b; | |
180 | input dcc_ld_inst_vld_m; | |
181 | input dcc_ldst_m_clken; | |
182 | ||
183 | input [39:13] tlb_pgnum; | |
184 | input [37:0] tlb_tte_data; // for diag read muxing | |
185 | input [65:0] tlb_tte_tag; // for diag read muxing | |
186 | input tlb_tte_u_bit; // for diag read muxing | |
187 | input tlb_cam_hit; | |
188 | input tlb_context0_hit; | |
189 | input tlb_cam_mhit; | |
190 | ||
191 | input tld_prty_256m; | |
192 | input tld_prty_4m; | |
193 | input tld_prty_64k; | |
194 | input tld_prty_8k; | |
195 | input tld_prty_ctxt0; | |
196 | input tld_prty_ctxt1; | |
197 | input [12:0] tld_tag_c0; | |
198 | input [12:0] tld_tag_c1; | |
199 | ||
200 | input tlc_sel_tte_tag; | |
201 | input tlc_sel_demap_tag_c0; | |
202 | input tlc_sel_demap_tag_c1; | |
203 | ||
204 | input [7:0] bist_cmp_data; | |
205 | input bist_dta_cmp_en; | |
206 | input bist_cmpsel_2; | |
207 | ||
208 | input [47:3] lsu_va_m; | |
209 | ||
210 | output tgd_w0_parity_b; | |
211 | output tgd_w1_parity_b; | |
212 | output tgd_w2_parity_b; | |
213 | output tgd_w3_parity_b; | |
214 | ||
215 | output [28:0] dta_rdata_w0_rep; | |
216 | output [28:0] dta_rdata_w1_rep; | |
217 | output [28:0] dta_rdata_w2_rep; | |
218 | output [28:0] dta_rdata_w3_rep; | |
219 | ||
220 | //output tgd_tte_tag_parity; | |
221 | //output tgd_tte_data_parity; | |
222 | output tgd_prty_256m_b; | |
223 | output tgd_prty_4m_b; | |
224 | output tgd_prty_64k_b; | |
225 | output tgd_prty_8k_b; | |
226 | output tgd_prty_ctxt0_b; | |
227 | output tgd_prty_ctxt1_b; | |
228 | ||
229 | ||
230 | output tgd_va_wp_47_16; | |
231 | output tgd_va_wp_15_3; | |
232 | output tgd_pa_wp_39_16; | |
233 | output tgd_pa_wp_15_3; | |
234 | ||
235 | output [12:0] tgd_tag_c0; | |
236 | output [12:0] tgd_tag_c1; | |
237 | ||
238 | output tlb_tag_parity; | |
239 | output [2:0] tlb_pgsize; | |
240 | output tlb_tte_nfo_b; | |
241 | output tlb_tte_ie_b; | |
242 | output tlb_tte_cp_b; | |
243 | output tlb_tte_ebit_b; | |
244 | output tlb_tte_pbit_b; | |
245 | output tlb_tte_wbit_b; | |
246 | ||
247 | output [63:0] tgd_ldxa_asi_data_b; | |
248 | ||
249 | output tgd_bist_compare; | |
250 | ||
251 | output lsu_mbi_tlb_data_cmp; | |
252 | output lsu_mbi_tlb_cam_hit; | |
253 | output lsu_mbi_tlb_cam_mhit; | |
254 | output lsu_mbi_tlb_ctxt0_hit; | |
255 | output lsu_mbi_tlb_valid; | |
256 | output lsu_mbi_tlb_used; | |
257 | ||
258 | ||
259 | ||
260 | // Globals | |
261 | input l2clk; | |
262 | input scan_in; | |
263 | input tcu_pce_ov; // scan signals | |
264 | input tcu_scan_en; | |
265 | input tcu_se_scancollar_out; | |
266 | input spc_aclk; | |
267 | input spc_bclk; | |
268 | output scan_out; | |
269 | ||
270 | // scan renames | |
271 | assign stop = 1'b0; | |
272 | // end scan | |
273 | ||
274 | lsu_tgd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 test_rep0 ( | |
275 | .din ({tcu_scan_en,tcu_pce_ov,spc_aclk,spc_bclk}), | |
276 | .dout({se,pce_ov,siclk,soclk}) | |
277 | ); | |
278 | ||
279 | assign clk = l2clk; | |
280 | ||
281 | // TLB TTE defines | |
282 | `define TAG_CNTX1_HI 65 | |
283 | `define TAG_CNTX1_LO 53 | |
284 | `define TAG_PID_HI 52 | |
285 | `define TAG_PID_LO 50 | |
286 | `define TAG_REAL 49 | |
287 | `define TAG_VA_47_28_HI 48 | |
288 | `define TAG_VA_47_28_LO 29 | |
289 | `define TAG_VA_27_22_HI 28 | |
290 | `define TAG_VA_27_22_LO 23 | |
291 | `define TAG_V 22 | |
292 | `define TAG_VA_21_16_HI 21 | |
293 | `define TAG_VA_21_16_LO 16 | |
294 | `define TAG_VA_15_13_HI 15 | |
295 | `define TAG_VA_15_13_LO 13 | |
296 | `define TAG_CNTX0_HI 12 | |
297 | `define TAG_CNTX0_LO 0 | |
298 | ||
299 | `define TAG_PARITY 37 | |
300 | `define DATA_PARITY 36 | |
301 | `define DATA_PA_39_28_HI 35 | |
302 | `define DATA_PA_39_28_LO 24 | |
303 | `define DATA_PA_27_22_HI 23 | |
304 | `define DATA_PA_27_22_LO 18 | |
305 | `define DATA_VA_27_22_V 17 | |
306 | `define DATA_PA_21_16_HI 16 | |
307 | `define DATA_PA_21_16_LO 11 | |
308 | `define DATA_VA_21_16_V 10 | |
309 | `define DATA_PA_15_13_HI 9 | |
310 | `define DATA_PA_15_13_LO 7 | |
311 | `define DATA_VA_15_13_V 6 | |
312 | `define DATA_NFO 5 | |
313 | `define DATA_IE 4 | |
314 | `define DATA_CP 3 | |
315 | `define DATA_E 2 | |
316 | `define DATA_P 1 | |
317 | `define DATA_W 0 | |
318 | ||
319 | // Parity checking for tag. Tag is available late in M. Flopping all 4 tags into | |
320 | // B would require 120 flops, but there is not enough time to check 30b parity in M. | |
321 | // So, generate 16b parity in M and flop that result (2 flops/way). Then finish the | |
322 | // check in B. | |
323 | ||
324 | lsu_tgd_dp_prty_macro__width_16 w0_16b_p1 ( | |
325 | .din ({2'b00,dta_rdata_w0_m[29:16]}), | |
326 | .dout (w0_16b_parity_m[1]) | |
327 | ); | |
328 | lsu_tgd_dp_prty_macro__width_16 w0_16b_p0 ( | |
329 | .din (dta_rdata_w0_m[15:0]), | |
330 | .dout (w0_16b_parity_m[0]) | |
331 | ); | |
332 | ||
333 | lsu_tgd_dp_prty_macro__width_16 w1_16b_p1 ( | |
334 | .din ({2'b00,dta_rdata_w1_m[29:16]}), | |
335 | .dout (w1_16b_parity_m[1]) | |
336 | ); | |
337 | lsu_tgd_dp_prty_macro__width_16 w1_16b_p0 ( | |
338 | .din (dta_rdata_w1_m[15:0]), | |
339 | .dout (w1_16b_parity_m[0]) | |
340 | ); | |
341 | ||
342 | lsu_tgd_dp_prty_macro__width_16 w2_16b_p1 ( | |
343 | .din ({2'b00,dta_rdata_w2_m[29:16]}), | |
344 | .dout (w2_16b_parity_m[1]) | |
345 | ); | |
346 | lsu_tgd_dp_prty_macro__width_16 w2_16b_p0 ( | |
347 | .din (dta_rdata_w2_m[15:0]), | |
348 | .dout (w2_16b_parity_m[0]) | |
349 | ); | |
350 | ||
351 | lsu_tgd_dp_prty_macro__width_16 w3_16b_p1 ( | |
352 | .din ({2'b00,dta_rdata_w3_m[29:16]}), | |
353 | .dout (w3_16b_parity_m[1]) | |
354 | ); | |
355 | lsu_tgd_dp_prty_macro__width_16 w3_16b_p0 ( | |
356 | .din (dta_rdata_w3_m[15:0]), | |
357 | .dout (w3_16b_parity_m[0]) | |
358 | ); | |
359 | ||
360 | lsu_tgd_dp_msff_macro__width_4 dff_16b_prty_w01 ( | |
361 | .scan_in(dff_16b_prty_w01_scanin), | |
362 | .scan_out(dff_16b_prty_w01_scanout), | |
363 | .se (tcu_se_scancollar_out), | |
364 | .din ({w0_16b_parity_m[1:0],w1_16b_parity_m[1:0]}), | |
365 | .dout ({w0_16b_parity_b[1:0],w1_16b_parity_b[1:0]}), | |
366 | .en (dcc_ld_inst_vld_m), | |
367 | .clk(clk), | |
368 | .siclk(siclk), | |
369 | .soclk(soclk), | |
370 | .pce_ov(pce_ov), | |
371 | .stop(stop) | |
372 | ); | |
373 | lsu_tgd_dp_msff_macro__width_4 dff_16b_prty_w23 ( | |
374 | .scan_in(dff_16b_prty_w23_scanin), | |
375 | .scan_out(dff_16b_prty_w23_scanout), | |
376 | .se (tcu_se_scancollar_out), | |
377 | .din ({w2_16b_parity_m[1:0],w3_16b_parity_m[1:0]}), | |
378 | .dout ({w2_16b_parity_b[1:0],w3_16b_parity_b[1:0]}), | |
379 | .en (dcc_ld_inst_vld_m), | |
380 | .clk(clk), | |
381 | .siclk(siclk), | |
382 | .soclk(soclk), | |
383 | .pce_ov(pce_ov), | |
384 | .stop(stop) | |
385 | ); | |
386 | ||
387 | lsu_tgd_dp_xor_macro__width_4 prty_xor ( | |
388 | .din0 ({w3_16b_parity_b[0],w2_16b_parity_b[0],w1_16b_parity_b[0],w0_16b_parity_b[0]}), | |
389 | .din1 ({w3_16b_parity_b[1],w2_16b_parity_b[1],w1_16b_parity_b[1],w0_16b_parity_b[1]}), | |
390 | .dout (tag_parity_b[3:0]) | |
391 | ); | |
392 | lsu_tgd_dp_buff_macro__width_4 prty_buf ( | |
393 | .din (tag_parity_b[3:0]), | |
394 | .dout ({tgd_w3_parity_b,tgd_w2_parity_b,tgd_w1_parity_b,tgd_w0_parity_b}) | |
395 | ); | |
396 | ||
397 | // Mux for diagnostic read | |
398 | lsu_tgd_dp_mux_macro__mux_pgpe__ports_2__stack_32c__width_32 mx_tag_way01 ( | |
399 | .din0 ({dta_rdata_w1_m[29:0],tgc_cache_way_vld_m[1],tgc_cache_way_vld2_m[1]}), | |
400 | .din1 ({dta_rdata_w0_m[29:0],tgc_cache_way_vld_m[0],tgc_cache_way_vld2_m[0]}), | |
401 | .sel0 (tgc_way_sel_m[0]), | |
402 | .dout (tgd_diag_tag01_m[31:0]) | |
403 | ); | |
404 | lsu_tgd_dp_mux_macro__mux_pgpe__ports_2__stack_32c__width_32 mx_tag_way23 ( | |
405 | .din0 ({dta_rdata_w3_m[29:0],tgc_cache_way_vld_m[3],tgc_cache_way_vld2_m[3]}), | |
406 | .din1 ({dta_rdata_w2_m[29:0],tgc_cache_way_vld_m[2],tgc_cache_way_vld2_m[2]}), | |
407 | .sel0 (tgc_way_sel_m[0]), | |
408 | .dout (tgd_diag_tag23_m[31:0]) | |
409 | ); | |
410 | lsu_tgd_dp_msff_macro__mux_pgpe__ports_2__stack_32l__width_32 dff_diag_tag ( | |
411 | .scan_in(dff_diag_tag_scanin), | |
412 | .scan_out(dff_diag_tag_scanout), | |
413 | .se (tcu_se_scancollar_out), | |
414 | .din0 (tgd_diag_tag23_m[31:0]), | |
415 | .din1 (tgd_diag_tag01_m[31:0]), | |
416 | .sel0 (tgc_way_sel_m[1]), | |
417 | .dout (tgd_diag_tag_b[31:0]), | |
418 | .en (dcc_rd_dt_diag_m), | |
419 | .clk(clk), | |
420 | .siclk(siclk), | |
421 | .soclk(soclk), | |
422 | .pce_ov(pce_ov), | |
423 | .stop(stop) | |
424 | ); | |
425 | ||
426 | // Buffer tag to tlb | |
427 | lsu_tgd_dp_buff_macro__left_2__rep_1__stack_32c__width_29 buf_tag_w0 ( | |
428 | .din (dta_rdata_w0_m[28:0]), | |
429 | .dout (dta_rdata_w0_rep[28:0]) | |
430 | ); | |
431 | lsu_tgd_dp_buff_macro__left_2__rep_1__stack_32c__width_29 buf_tag_w1 ( | |
432 | .din (dta_rdata_w1_m[28:0]), | |
433 | .dout (dta_rdata_w1_rep[28:0]) | |
434 | ); | |
435 | lsu_tgd_dp_buff_macro__left_2__rep_1__stack_32c__width_29 buf_tag_w2 ( | |
436 | .din (dta_rdata_w2_m[28:0]), | |
437 | .dout (dta_rdata_w2_rep[28:0]) | |
438 | ); | |
439 | lsu_tgd_dp_buff_macro__left_2__rep_1__stack_32c__width_29 buf_tag_w3 ( | |
440 | .din (dta_rdata_w3_m[28:0]), | |
441 | .dout (dta_rdata_w3_rep[28:0]) | |
442 | ); | |
443 | ||
444 | lsu_tgd_dp_inv_macro__width_1 inv_sz_mux ( | |
445 | .din (tlb_tte_data[`DATA_VA_27_22_V]), | |
446 | .dout (tte_data_va_27_22_v_) | |
447 | ); | |
448 | lsu_tgd_dp_and_macro__ports_2__width_1 and_sz ( | |
449 | .din0 (tlb_tte_data[`DATA_VA_21_16_V]), | |
450 | .din1 (tte_data_va_27_22_v_), | |
451 | .dout (tte_data_sz_1) | |
452 | ); | |
453 | ||
454 | //////////////////////////////////////////////////////////////////////////// | |
455 | // tte_tag context muxing | |
456 | ||
457 | // First level of muxing is done in lsu_tld_dp and comes in as tld_tag_c0 | |
458 | // and tld_tag_c1. | |
459 | ||
460 | lsu_tgd_dp_mux_macro__mux_aope__ports_3__stack_14l__width_13 mx_tag_c0 ( | |
461 | .din0 (tld_tag_c0[12:0]), | |
462 | .din1 (dcs_context1_e[12:0]), | |
463 | .din2 (dcs_context0_e[12:0]), | |
464 | .sel0 (tlc_sel_tte_tag), | |
465 | .sel1 (tlc_sel_demap_tag_c1), | |
466 | .dout (tag_c0[12:0]) | |
467 | ); | |
468 | lsu_tgd_dp_buff_macro__stack_14l__width_13 buf_tag_c0 ( | |
469 | .din (tag_c0[12:0]), | |
470 | .dout (tgd_tag_c0[12:0]) | |
471 | ); | |
472 | ||
473 | lsu_tgd_dp_mux_macro__mux_aope__ports_3__stack_14r__width_13 mx_tag_c1 ( | |
474 | .din0 (tld_tag_c1[12:0]), | |
475 | .din1 (dcs_context0_e[12:0]), | |
476 | .din2 (dcs_context1_e[12:0]), | |
477 | .sel0 (tlc_sel_tte_tag), | |
478 | .sel1 (tlc_sel_demap_tag_c0), | |
479 | .dout (tag_c1[12:0]) | |
480 | ); | |
481 | lsu_tgd_dp_buff_macro__stack_14r__width_13 buf_tag_c1 ( | |
482 | .din (tag_c1[12:0]), | |
483 | .dout (tgd_tag_c1[12:0]) | |
484 | ); | |
485 | ||
486 | ////// | |
487 | // Data access read format (sun4v TTE) is | |
488 | // V NFO PRTY 0 0 PA IE E CP 0 P 0 W 0 SZ | |
489 | // 63 | 62 | 61 | 60:56 | 55:40 | 39:13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5:3 | 2:0 | |
490 | // | |
491 | // Tag read register format is | |
492 | // PID R P U 0 VA Context | |
493 | // 63:61 | 60 | 59 | 58 | 57:48 | 47:13 | 12:0 | |
494 | ||
495 | ||
496 | // Mux the different ASI read sources that are on the right side of the LSU | |
497 | lsu_tgd_dp_mux_macro__mux_aonpe__ports_4__stack_64c__width_64 mx_asi_b ( | |
498 | .din0 ({32'd0,tgd_diag_tag_b[31:0]}), | |
499 | .din1 ({tlb_tte_tag[`TAG_V], // V | |
500 | tlb_tte_data[`DATA_NFO], // NFO | |
501 | tlb_tte_data[`DATA_PARITY], // PARITY | |
502 | 5'b0, // SOFT | |
503 | 16'b0, | |
504 | tlb_tte_data[`DATA_PA_39_28_HI:`DATA_PA_39_28_LO], // PA | |
505 | tlb_tte_data[`DATA_PA_27_22_HI:`DATA_PA_27_22_LO], | |
506 | tlb_tte_data[`DATA_PA_21_16_HI:`DATA_PA_21_16_LO], | |
507 | tlb_tte_data[`DATA_PA_15_13_HI:`DATA_PA_15_13_LO], | |
508 | tlb_tte_data[`DATA_IE], // IE | |
509 | tlb_tte_data[`DATA_E], // E | |
510 | tlb_tte_data[`DATA_CP], // CP | |
511 | 1'b0, // CV | |
512 | tlb_tte_data[`DATA_P], // P | |
513 | 1'b0, // EP | |
514 | tlb_tte_data[`DATA_W], // W | |
515 | 3'b0, | |
516 | tlb_tte_data[`DATA_VA_27_22_V], // SZ | |
517 | tte_data_sz_1,tlb_tte_data[`DATA_VA_15_13_V] // SZ | |
518 | }), | |
519 | .din2 ({tlb_tte_tag[`TAG_PID_HI:`TAG_PID_LO], // PID | |
520 | tlb_tte_tag[`TAG_REAL], // REAL | |
521 | tlb_tte_data[`TAG_PARITY], // PARITY | |
522 | tlb_tte_u_bit, // USED | |
523 | 10'b0, | |
524 | tlb_tte_tag[`TAG_VA_47_28_HI:`TAG_VA_27_22_LO], | |
525 | tlb_tte_tag[`TAG_VA_21_16_HI:`TAG_VA_21_16_LO], | |
526 | tlb_tte_tag[`TAG_VA_15_13_HI:`TAG_VA_15_13_LO], | |
527 | tlb_tte_tag[`TAG_CNTX0_HI:`TAG_CNTX0_LO] // context | |
528 | }), | |
529 | .din3 ({tlb_tte_tag[`TAG_PID_HI:`TAG_PID_LO], // PID | |
530 | tlb_tte_tag[`TAG_REAL], // REAL | |
531 | tlb_tte_data[`TAG_PARITY], // PARITY | |
532 | tlb_tte_u_bit, // USED | |
533 | 10'b0, | |
534 | tlb_tte_tag[`TAG_VA_47_28_HI:`TAG_VA_27_22_LO], | |
535 | tlb_tte_tag[`TAG_VA_21_16_HI:`TAG_VA_21_16_LO], | |
536 | tlb_tte_tag[`TAG_VA_15_13_HI:`TAG_VA_15_13_LO], | |
537 | tlb_tte_tag[`TAG_CNTX1_HI:`TAG_CNTX1_LO] // context | |
538 | }), | |
539 | .sel0 (dcc_rd_dt_diag_b), | |
540 | .sel1 (dcc_tlb_data_read_b), | |
541 | .sel2 (dcc_tlb_tag0_read_b), | |
542 | .sel3 (dcc_tlb_tag1_read_b), | |
543 | .dout (ldxa_asi_data_b[63:0]) | |
544 | ); | |
545 | ||
546 | lsu_tgd_dp_buff_macro__rep_1__stack_64c__width_64 buf_asi_b ( | |
547 | .din (ldxa_asi_data_b[63:0]), | |
548 | .dout (tgd_ldxa_asi_data_b[63:0]) | |
549 | ); | |
550 | ||
551 | lsu_tgd_dp_buff_macro__left_19__minbuff_1__stack_64c__width_45 va_minbuf ( | |
552 | .din (lsu_va_m[47:3]), | |
553 | .dout (va_m_buf[47:3]) | |
554 | ); | |
555 | ||
556 | // VA staging | |
557 | lsu_tgd_dp_msff_macro__left_13__stack_64c__width_51 dff_va_b ( | |
558 | .scan_in(dff_va_b_scanin), | |
559 | .scan_out(dff_va_b_scanout), | |
560 | .din ({va_m_buf[47:3], | |
561 | tld_prty_256m ,tld_prty_4m ,tld_prty_64k ,tld_prty_8k ,tld_prty_ctxt0 ,tld_prty_ctxt1}), | |
562 | .dout ({va_b[47:3], | |
563 | tgd_prty_256m_b,tgd_prty_4m_b,tgd_prty_64k_b,tgd_prty_8k_b,tgd_prty_ctxt0_b,tgd_prty_ctxt1_b}), | |
564 | .en (dcc_ldst_m_clken), | |
565 | .clk(clk), | |
566 | .se(se), | |
567 | .siclk(siclk), | |
568 | .soclk(soclk), | |
569 | .pce_ov(pce_ov), | |
570 | .stop(stop) | |
571 | ); | |
572 | ||
573 | /////////////////////////////////////////////////////////////// | |
574 | // Watchpoint mux and compare is here so it's close to the TLB | |
575 | ||
576 | lsu_tgd_dp_msff_macro__left_19__stack_64c__width_45 dff_wpt_b ( | |
577 | .scan_in(dff_wpt_b_scanin), | |
578 | .scan_out(dff_wpt_b_scanout), | |
579 | .din (dcs_watchpoint_m[47:3]), | |
580 | .dout (watchpoint_b[47:3]), | |
581 | .en (dcc_ldst_m_clken), | |
582 | .clk(clk), | |
583 | .se(se), | |
584 | .siclk(siclk), | |
585 | .soclk(soclk), | |
586 | .pce_ov(pce_ov), | |
587 | .stop(stop) | |
588 | ); | |
589 | ||
590 | lsu_tgd_dp_cmp_macro__width_32 cmp_va_47_16 ( | |
591 | .din0 (watchpoint_b[47:16]), | |
592 | .din1 (va_b[47:16]), | |
593 | .dout (va_wp_47_16) | |
594 | ); | |
595 | lsu_tgd_dp_cmp_macro__width_16 cmp_va_15_3 ( | |
596 | .din0 ({3'b0,watchpoint_b[15:3]}), | |
597 | .din1 ({3'b0,va_b[15:3]}), | |
598 | .dout (va_wp_15_3) | |
599 | ); | |
600 | ||
601 | lsu_tgd_dp_cmp_macro__width_32 cmp_pa_39_16 ( | |
602 | .din0 ({8'b0,watchpoint_b[39:16]}), | |
603 | .din1 ({8'b0,tlb_pgnum[39:16]}), | |
604 | .dout (pa_wp_39_16) | |
605 | ); | |
606 | lsu_tgd_dp_cmp_macro__width_16 cmp_pa_15_3 ( | |
607 | .din0 ({3'b0,watchpoint_b[15:3]}), | |
608 | .din1 ({3'b0,tlb_pgnum[15:13],va_b[12:3]}), | |
609 | .dout (pa_wp_15_3) | |
610 | ); | |
611 | ||
612 | lsu_tgd_dp_buff_macro__width_4 wpt_buf ( | |
613 | .din ({ va_wp_47_16, pa_wp_39_16, va_wp_15_3, pa_wp_15_3}), | |
614 | .dout ({tgd_va_wp_47_16,tgd_pa_wp_39_16,tgd_va_wp_15_3,tgd_pa_wp_15_3}) | |
615 | ); | |
616 | ||
617 | lsu_tgd_dp_buff_macro__rep_1__width_10 tte_buf ( | |
618 | .din ({tlb_tte_data[`TAG_PARITY],tlb_tte_data[`DATA_VA_27_22_V], | |
619 | tlb_tte_data[`DATA_VA_21_16_V],tlb_tte_data[`DATA_VA_15_13_V], | |
620 | tlb_tte_data[`DATA_NFO:`DATA_W]}), | |
621 | .dout ({tlb_tag_parity, tlb_pgsize[2:0],tlb_tte_nfo_b,tlb_tte_ie_b, | |
622 | tlb_tte_cp_b,tlb_tte_ebit_b,tlb_tte_pbit_b,tlb_tte_wbit_b}) | |
623 | ); | |
624 | ||
625 | // BIST mux and tag comparator | |
626 | lsu_tgd_dp_mux_macro__mux_aope__ports_3__stack_64c__width_64 bist_mx ( | |
627 | .din0 ({{4{bist_cmp_data[7:0]}},bist_cmp_data[7:6],tgd_diag_tag_b[31:2]}), | |
628 | .din1 ({bist_cmp_data[7:1],tlb_tte_u_bit,bist_cmp_data[7:5],tlb_tte_tag[52:50], | |
629 | bist_cmp_data[1],tlb_tte_tag[48:0]}), | |
630 | .din2 ({tlb_tte_tag[65:53],bist_cmp_data[2:0],bist_cmp_data[7:0], | |
631 | bist_cmp_data[7:6],tlb_tte_data[37:0]}), | |
632 | .sel0 (bist_dta_cmp_en), | |
633 | .sel1 (bist_cmpsel_2), | |
634 | .dout (bist_mux_data[63:0]) | |
635 | ); | |
636 | ||
637 | lsu_tgd_dp_cmp_macro__width_64 bist_cmp ( | |
638 | .din0 ({8{bist_cmp_data[7:0]}}), | |
639 | .din1 (bist_mux_data[63:0]), | |
640 | .dout (tgd_bist_compare) | |
641 | ); | |
642 | ||
643 | lsu_tgd_dp_cmp_macro__width_8 cambist_cmp ( | |
644 | .din0 ({1'b0,bist_cmp_data[6:0]}), | |
645 | .din1 ({1'b0,tlb_tte_data[6:0]}), | |
646 | .dout (lsu_mbi_tlb_data_cmp) | |
647 | ); | |
648 | ||
649 | lsu_tgd_dp_buff_macro__width_5 cambist_buf ( | |
650 | .din ({tlb_cam_hit, tlb_context0_hit, tlb_cam_mhit, | |
651 | tlb_tte_u_bit, tlb_tte_tag[`TAG_V]}), | |
652 | .dout ({lsu_mbi_tlb_cam_hit,lsu_mbi_tlb_ctxt0_hit,lsu_mbi_tlb_cam_mhit, | |
653 | lsu_mbi_tlb_used, lsu_mbi_tlb_valid}) | |
654 | ); | |
655 | ||
656 | // fixscan start: | |
657 | assign dff_16b_prty_w01_scanin = scan_in ; | |
658 | assign dff_16b_prty_w23_scanin = dff_16b_prty_w01_scanout ; | |
659 | assign dff_diag_tag_scanin = dff_16b_prty_w23_scanout ; | |
660 | assign dff_va_b_scanin = dff_diag_tag_scanout ; | |
661 | assign dff_wpt_b_scanin = dff_va_b_scanout ; | |
662 | assign scan_out = dff_wpt_b_scanout ; | |
663 | // fixscan end: | |
664 | endmodule | |
665 | ||
666 | ||
667 | // | |
668 | // buff macro | |
669 | // | |
670 | // | |
671 | ||
672 | ||
673 | ||
674 | ||
675 | ||
676 | module lsu_tgd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 ( | |
677 | din, | |
678 | dout); | |
679 | input [3:0] din; | |
680 | output [3:0] dout; | |
681 | ||
682 | ||
683 | ||
684 | ||
685 | ||
686 | ||
687 | buff #(4) d0_0 ( | |
688 | .in(din[3:0]), | |
689 | .out(dout[3:0]) | |
690 | ); | |
691 | ||
692 | ||
693 | ||
694 | ||
695 | ||
696 | ||
697 | ||
698 | ||
699 | endmodule | |
700 | ||
701 | ||
702 | ||
703 | ||
704 | ||
705 | // | |
706 | // parity macro (even parity) | |
707 | // | |
708 | // | |
709 | ||
710 | ||
711 | ||
712 | ||
713 | ||
714 | module lsu_tgd_dp_prty_macro__width_16 ( | |
715 | din, | |
716 | dout); | |
717 | input [15:0] din; | |
718 | output dout; | |
719 | ||
720 | ||
721 | ||
722 | ||
723 | ||
724 | ||
725 | ||
726 | prty #(16) m0_0 ( | |
727 | .in(din[15:0]), | |
728 | .out(dout) | |
729 | ); | |
730 | ||
731 | ||
732 | ||
733 | ||
734 | ||
735 | ||
736 | ||
737 | ||
738 | ||
739 | ||
740 | endmodule | |
741 | ||
742 | ||
743 | ||
744 | ||
745 | ||
746 | ||
747 | ||
748 | ||
749 | ||
750 | // any PARAMS parms go into naming of macro | |
751 | ||
752 | module lsu_tgd_dp_msff_macro__width_4 ( | |
753 | din, | |
754 | clk, | |
755 | en, | |
756 | se, | |
757 | scan_in, | |
758 | siclk, | |
759 | soclk, | |
760 | pce_ov, | |
761 | stop, | |
762 | dout, | |
763 | scan_out); | |
764 | wire l1clk; | |
765 | wire siclk_out; | |
766 | wire soclk_out; | |
767 | wire [2:0] so; | |
768 | ||
769 | input [3:0] din; | |
770 | ||
771 | ||
772 | input clk; | |
773 | input en; | |
774 | input se; | |
775 | input scan_in; | |
776 | input siclk; | |
777 | input soclk; | |
778 | input pce_ov; | |
779 | input stop; | |
780 | ||
781 | ||
782 | ||
783 | output [3:0] dout; | |
784 | ||
785 | ||
786 | output scan_out; | |
787 | ||
788 | ||
789 | ||
790 | ||
791 | cl_dp1_l1hdr_8x c0_0 ( | |
792 | .l2clk(clk), | |
793 | .pce(en), | |
794 | .aclk(siclk), | |
795 | .bclk(soclk), | |
796 | .l1clk(l1clk), | |
797 | .se(se), | |
798 | .pce_ov(pce_ov), | |
799 | .stop(stop), | |
800 | .siclk_out(siclk_out), | |
801 | .soclk_out(soclk_out) | |
802 | ); | |
803 | dff #(4) d0_0 ( | |
804 | .l1clk(l1clk), | |
805 | .siclk(siclk_out), | |
806 | .soclk(soclk_out), | |
807 | .d(din[3:0]), | |
808 | .si({scan_in,so[2:0]}), | |
809 | .so({so[2:0],scan_out}), | |
810 | .q(dout[3:0]) | |
811 | ); | |
812 | ||
813 | ||
814 | ||
815 | ||
816 | ||
817 | ||
818 | ||
819 | ||
820 | ||
821 | ||
822 | ||
823 | ||
824 | ||
825 | ||
826 | ||
827 | ||
828 | ||
829 | ||
830 | ||
831 | ||
832 | endmodule | |
833 | ||
834 | ||
835 | ||
836 | ||
837 | ||
838 | ||
839 | ||
840 | ||
841 | ||
842 | // | |
843 | // xor macro for ports = 2,3 | |
844 | // | |
845 | // | |
846 | ||
847 | ||
848 | ||
849 | ||
850 | ||
851 | module lsu_tgd_dp_xor_macro__width_4 ( | |
852 | din0, | |
853 | din1, | |
854 | dout); | |
855 | input [3:0] din0; | |
856 | input [3:0] din1; | |
857 | output [3:0] dout; | |
858 | ||
859 | ||
860 | ||
861 | ||
862 | ||
863 | xor2 #(4) d0_0 ( | |
864 | .in0(din0[3:0]), | |
865 | .in1(din1[3:0]), | |
866 | .out(dout[3:0]) | |
867 | ); | |
868 | ||
869 | ||
870 | ||
871 | ||
872 | ||
873 | ||
874 | ||
875 | ||
876 | endmodule | |
877 | ||
878 | ||
879 | ||
880 | ||
881 | ||
882 | // | |
883 | // buff macro | |
884 | // | |
885 | // | |
886 | ||
887 | ||
888 | ||
889 | ||
890 | ||
891 | module lsu_tgd_dp_buff_macro__width_4 ( | |
892 | din, | |
893 | dout); | |
894 | input [3:0] din; | |
895 | output [3:0] dout; | |
896 | ||
897 | ||
898 | ||
899 | ||
900 | ||
901 | ||
902 | buff #(4) d0_0 ( | |
903 | .in(din[3:0]), | |
904 | .out(dout[3:0]) | |
905 | ); | |
906 | ||
907 | ||
908 | ||
909 | ||
910 | ||
911 | ||
912 | ||
913 | ||
914 | endmodule | |
915 | ||
916 | ||
917 | ||
918 | ||
919 | ||
920 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
921 | // also for pass-gate with decoder | |
922 | ||
923 | ||
924 | ||
925 | ||
926 | ||
927 | // any PARAMS parms go into naming of macro | |
928 | ||
929 | module lsu_tgd_dp_mux_macro__mux_pgpe__ports_2__stack_32c__width_32 ( | |
930 | din0, | |
931 | din1, | |
932 | sel0, | |
933 | dout); | |
934 | wire psel0_unused; | |
935 | wire psel1; | |
936 | ||
937 | input [31:0] din0; | |
938 | input [31:0] din1; | |
939 | input sel0; | |
940 | output [31:0] dout; | |
941 | ||
942 | ||
943 | ||
944 | ||
945 | ||
946 | cl_dp1_penc2_8x c0_0 ( | |
947 | .sel0(sel0), | |
948 | .psel0(psel0_unused), | |
949 | .psel1(psel1) | |
950 | ); | |
951 | ||
952 | mux2e #(32) d0_0 ( | |
953 | .sel(psel1), | |
954 | .in0(din0[31:0]), | |
955 | .in1(din1[31:0]), | |
956 | .dout(dout[31:0]) | |
957 | ); | |
958 | ||
959 | ||
960 | ||
961 | ||
962 | ||
963 | ||
964 | ||
965 | ||
966 | ||
967 | ||
968 | ||
969 | ||
970 | ||
971 | endmodule | |
972 | ||
973 | ||
974 | ||
975 | ||
976 | ||
977 | ||
978 | // any PARAMS parms go into naming of macro | |
979 | ||
980 | module lsu_tgd_dp_msff_macro__mux_pgpe__ports_2__stack_32l__width_32 ( | |
981 | din0, | |
982 | din1, | |
983 | sel0, | |
984 | clk, | |
985 | en, | |
986 | se, | |
987 | scan_in, | |
988 | siclk, | |
989 | soclk, | |
990 | pce_ov, | |
991 | stop, | |
992 | dout, | |
993 | scan_out); | |
994 | wire psel0_unused; | |
995 | wire psel1; | |
996 | wire [31:0] muxout; | |
997 | wire l1clk; | |
998 | wire siclk_out; | |
999 | wire soclk_out; | |
1000 | wire [30:0] so; | |
1001 | ||
1002 | input [31:0] din0; | |
1003 | input [31:0] din1; | |
1004 | input sel0; | |
1005 | ||
1006 | ||
1007 | input clk; | |
1008 | input en; | |
1009 | input se; | |
1010 | input scan_in; | |
1011 | input siclk; | |
1012 | input soclk; | |
1013 | input pce_ov; | |
1014 | input stop; | |
1015 | ||
1016 | ||
1017 | ||
1018 | output [31:0] dout; | |
1019 | ||
1020 | ||
1021 | output scan_out; | |
1022 | ||
1023 | ||
1024 | ||
1025 | ||
1026 | cl_dp1_penc2_8x c1_0 ( | |
1027 | .sel0(sel0), | |
1028 | .psel0(psel0_unused), | |
1029 | .psel1(psel1) | |
1030 | ); | |
1031 | ||
1032 | mux2e #(32) d1_0 ( | |
1033 | .sel(psel1), | |
1034 | .in0(din0[31:0]), | |
1035 | .in1(din1[31:0]), | |
1036 | .dout(muxout[31:0]) | |
1037 | ); | |
1038 | cl_dp1_l1hdr_8x c0_0 ( | |
1039 | .l2clk(clk), | |
1040 | .pce(en), | |
1041 | .aclk(siclk), | |
1042 | .bclk(soclk), | |
1043 | .l1clk(l1clk), | |
1044 | .se(se), | |
1045 | .pce_ov(pce_ov), | |
1046 | .stop(stop), | |
1047 | .siclk_out(siclk_out), | |
1048 | .soclk_out(soclk_out) | |
1049 | ); | |
1050 | dff #(32) d0_0 ( | |
1051 | .l1clk(l1clk), | |
1052 | .siclk(siclk_out), | |
1053 | .soclk(soclk_out), | |
1054 | .d(muxout[31:0]), | |
1055 | .si({scan_in,so[30:0]}), | |
1056 | .so({so[30:0],scan_out}), | |
1057 | .q(dout[31:0]) | |
1058 | ); | |
1059 | ||
1060 | ||
1061 | ||
1062 | ||
1063 | ||
1064 | ||
1065 | ||
1066 | ||
1067 | ||
1068 | ||
1069 | ||
1070 | ||
1071 | ||
1072 | ||
1073 | ||
1074 | ||
1075 | ||
1076 | ||
1077 | ||
1078 | ||
1079 | endmodule | |
1080 | ||
1081 | ||
1082 | ||
1083 | ||
1084 | ||
1085 | ||
1086 | ||
1087 | ||
1088 | ||
1089 | // | |
1090 | // buff macro | |
1091 | // | |
1092 | // | |
1093 | ||
1094 | ||
1095 | ||
1096 | ||
1097 | ||
1098 | module lsu_tgd_dp_buff_macro__left_2__rep_1__stack_32c__width_29 ( | |
1099 | din, | |
1100 | dout); | |
1101 | input [28:0] din; | |
1102 | output [28:0] dout; | |
1103 | ||
1104 | ||
1105 | ||
1106 | ||
1107 | ||
1108 | ||
1109 | buff #(29) d0_0 ( | |
1110 | .in(din[28:0]), | |
1111 | .out(dout[28:0]) | |
1112 | ); | |
1113 | ||
1114 | ||
1115 | ||
1116 | ||
1117 | ||
1118 | ||
1119 | ||
1120 | ||
1121 | endmodule | |
1122 | ||
1123 | ||
1124 | ||
1125 | ||
1126 | ||
1127 | // | |
1128 | // invert macro | |
1129 | // | |
1130 | // | |
1131 | ||
1132 | ||
1133 | ||
1134 | ||
1135 | ||
1136 | module lsu_tgd_dp_inv_macro__width_1 ( | |
1137 | din, | |
1138 | dout); | |
1139 | input [0:0] din; | |
1140 | output [0:0] dout; | |
1141 | ||
1142 | ||
1143 | ||
1144 | ||
1145 | ||
1146 | ||
1147 | inv #(1) d0_0 ( | |
1148 | .in(din[0:0]), | |
1149 | .out(dout[0:0]) | |
1150 | ); | |
1151 | ||
1152 | ||
1153 | ||
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | ||
1159 | ||
1160 | endmodule | |
1161 | ||
1162 | ||
1163 | ||
1164 | ||
1165 | ||
1166 | // | |
1167 | // and macro for ports = 2,3,4 | |
1168 | // | |
1169 | // | |
1170 | ||
1171 | ||
1172 | ||
1173 | ||
1174 | ||
1175 | module lsu_tgd_dp_and_macro__ports_2__width_1 ( | |
1176 | din0, | |
1177 | din1, | |
1178 | dout); | |
1179 | input [0:0] din0; | |
1180 | input [0:0] din1; | |
1181 | output [0:0] dout; | |
1182 | ||
1183 | ||
1184 | ||
1185 | ||
1186 | ||
1187 | ||
1188 | and2 #(1) d0_0 ( | |
1189 | .in0(din0[0:0]), | |
1190 | .in1(din1[0:0]), | |
1191 | .out(dout[0:0]) | |
1192 | ); | |
1193 | ||
1194 | ||
1195 | ||
1196 | ||
1197 | ||
1198 | ||
1199 | ||
1200 | ||
1201 | ||
1202 | endmodule | |
1203 | ||
1204 | ||
1205 | ||
1206 | ||
1207 | ||
1208 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
1209 | // also for pass-gate with decoder | |
1210 | ||
1211 | ||
1212 | ||
1213 | ||
1214 | ||
1215 | // any PARAMS parms go into naming of macro | |
1216 | ||
1217 | module lsu_tgd_dp_mux_macro__mux_aope__ports_3__stack_14l__width_13 ( | |
1218 | din0, | |
1219 | din1, | |
1220 | din2, | |
1221 | sel0, | |
1222 | sel1, | |
1223 | dout); | |
1224 | wire psel0; | |
1225 | wire psel1; | |
1226 | wire psel2; | |
1227 | ||
1228 | input [12:0] din0; | |
1229 | input [12:0] din1; | |
1230 | input [12:0] din2; | |
1231 | input sel0; | |
1232 | input sel1; | |
1233 | output [12:0] dout; | |
1234 | ||
1235 | ||
1236 | ||
1237 | ||
1238 | ||
1239 | cl_dp1_penc3_8x c0_0 ( | |
1240 | .test(1'b1), | |
1241 | .sel0(sel0), | |
1242 | .sel1(sel1), | |
1243 | .psel0(psel0), | |
1244 | .psel1(psel1), | |
1245 | .psel2(psel2) | |
1246 | ); | |
1247 | ||
1248 | mux3s #(13) d0_0 ( | |
1249 | .sel0(psel0), | |
1250 | .sel1(psel1), | |
1251 | .sel2(psel2), | |
1252 | .in0(din0[12:0]), | |
1253 | .in1(din1[12:0]), | |
1254 | .in2(din2[12:0]), | |
1255 | .dout(dout[12:0]) | |
1256 | ); | |
1257 | ||
1258 | ||
1259 | ||
1260 | ||
1261 | ||
1262 | ||
1263 | ||
1264 | ||
1265 | ||
1266 | ||
1267 | ||
1268 | ||
1269 | ||
1270 | endmodule | |
1271 | ||
1272 | ||
1273 | // | |
1274 | // buff macro | |
1275 | // | |
1276 | // | |
1277 | ||
1278 | ||
1279 | ||
1280 | ||
1281 | ||
1282 | module lsu_tgd_dp_buff_macro__stack_14l__width_13 ( | |
1283 | din, | |
1284 | dout); | |
1285 | input [12:0] din; | |
1286 | output [12:0] dout; | |
1287 | ||
1288 | ||
1289 | ||
1290 | ||
1291 | ||
1292 | ||
1293 | buff #(13) d0_0 ( | |
1294 | .in(din[12:0]), | |
1295 | .out(dout[12:0]) | |
1296 | ); | |
1297 | ||
1298 | ||
1299 | ||
1300 | ||
1301 | ||
1302 | ||
1303 | ||
1304 | ||
1305 | endmodule | |
1306 | ||
1307 | ||
1308 | ||
1309 | ||
1310 | ||
1311 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
1312 | // also for pass-gate with decoder | |
1313 | ||
1314 | ||
1315 | ||
1316 | ||
1317 | ||
1318 | // any PARAMS parms go into naming of macro | |
1319 | ||
1320 | module lsu_tgd_dp_mux_macro__mux_aope__ports_3__stack_14r__width_13 ( | |
1321 | din0, | |
1322 | din1, | |
1323 | din2, | |
1324 | sel0, | |
1325 | sel1, | |
1326 | dout); | |
1327 | wire psel0; | |
1328 | wire psel1; | |
1329 | wire psel2; | |
1330 | ||
1331 | input [12:0] din0; | |
1332 | input [12:0] din1; | |
1333 | input [12:0] din2; | |
1334 | input sel0; | |
1335 | input sel1; | |
1336 | output [12:0] dout; | |
1337 | ||
1338 | ||
1339 | ||
1340 | ||
1341 | ||
1342 | cl_dp1_penc3_8x c0_0 ( | |
1343 | .test(1'b1), | |
1344 | .sel0(sel0), | |
1345 | .sel1(sel1), | |
1346 | .psel0(psel0), | |
1347 | .psel1(psel1), | |
1348 | .psel2(psel2) | |
1349 | ); | |
1350 | ||
1351 | mux3s #(13) d0_0 ( | |
1352 | .sel0(psel0), | |
1353 | .sel1(psel1), | |
1354 | .sel2(psel2), | |
1355 | .in0(din0[12:0]), | |
1356 | .in1(din1[12:0]), | |
1357 | .in2(din2[12:0]), | |
1358 | .dout(dout[12:0]) | |
1359 | ); | |
1360 | ||
1361 | ||
1362 | ||
1363 | ||
1364 | ||
1365 | ||
1366 | ||
1367 | ||
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | endmodule | |
1374 | ||
1375 | ||
1376 | // | |
1377 | // buff macro | |
1378 | // | |
1379 | // | |
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | module lsu_tgd_dp_buff_macro__stack_14r__width_13 ( | |
1386 | din, | |
1387 | dout); | |
1388 | input [12:0] din; | |
1389 | output [12:0] dout; | |
1390 | ||
1391 | ||
1392 | ||
1393 | ||
1394 | ||
1395 | ||
1396 | buff #(13) d0_0 ( | |
1397 | .in(din[12:0]), | |
1398 | .out(dout[12:0]) | |
1399 | ); | |
1400 | ||
1401 | ||
1402 | ||
1403 | ||
1404 | ||
1405 | ||
1406 | ||
1407 | ||
1408 | endmodule | |
1409 | ||
1410 | ||
1411 | ||
1412 | ||
1413 | ||
1414 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
1415 | // also for pass-gate with decoder | |
1416 | ||
1417 | ||
1418 | ||
1419 | ||
1420 | ||
1421 | // any PARAMS parms go into naming of macro | |
1422 | ||
1423 | module lsu_tgd_dp_mux_macro__mux_aonpe__ports_4__stack_64c__width_64 ( | |
1424 | din0, | |
1425 | sel0, | |
1426 | din1, | |
1427 | sel1, | |
1428 | din2, | |
1429 | sel2, | |
1430 | din3, | |
1431 | sel3, | |
1432 | dout); | |
1433 | wire buffout0; | |
1434 | wire buffout1; | |
1435 | wire buffout2; | |
1436 | wire buffout3; | |
1437 | ||
1438 | input [63:0] din0; | |
1439 | input sel0; | |
1440 | input [63:0] din1; | |
1441 | input sel1; | |
1442 | input [63:0] din2; | |
1443 | input sel2; | |
1444 | input [63:0] din3; | |
1445 | input sel3; | |
1446 | output [63:0] dout; | |
1447 | ||
1448 | ||
1449 | ||
1450 | ||
1451 | ||
1452 | cl_dp1_muxbuff4_8x c0_0 ( | |
1453 | .in0(sel0), | |
1454 | .in1(sel1), | |
1455 | .in2(sel2), | |
1456 | .in3(sel3), | |
1457 | .out0(buffout0), | |
1458 | .out1(buffout1), | |
1459 | .out2(buffout2), | |
1460 | .out3(buffout3) | |
1461 | ); | |
1462 | mux4s #(64) d0_0 ( | |
1463 | .sel0(buffout0), | |
1464 | .sel1(buffout1), | |
1465 | .sel2(buffout2), | |
1466 | .sel3(buffout3), | |
1467 | .in0(din0[63:0]), | |
1468 | .in1(din1[63:0]), | |
1469 | .in2(din2[63:0]), | |
1470 | .in3(din3[63:0]), | |
1471 | .dout(dout[63:0]) | |
1472 | ); | |
1473 | ||
1474 | ||
1475 | ||
1476 | ||
1477 | ||
1478 | ||
1479 | ||
1480 | ||
1481 | ||
1482 | ||
1483 | ||
1484 | ||
1485 | ||
1486 | endmodule | |
1487 | ||
1488 | ||
1489 | // | |
1490 | // buff macro | |
1491 | // | |
1492 | // | |
1493 | ||
1494 | ||
1495 | ||
1496 | ||
1497 | ||
1498 | module lsu_tgd_dp_buff_macro__rep_1__stack_64c__width_64 ( | |
1499 | din, | |
1500 | dout); | |
1501 | input [63:0] din; | |
1502 | output [63:0] dout; | |
1503 | ||
1504 | ||
1505 | ||
1506 | ||
1507 | ||
1508 | ||
1509 | buff #(64) d0_0 ( | |
1510 | .in(din[63:0]), | |
1511 | .out(dout[63:0]) | |
1512 | ); | |
1513 | ||
1514 | ||
1515 | ||
1516 | ||
1517 | ||
1518 | ||
1519 | ||
1520 | ||
1521 | endmodule | |
1522 | ||
1523 | ||
1524 | ||
1525 | ||
1526 | ||
1527 | // | |
1528 | // buff macro | |
1529 | // | |
1530 | // | |
1531 | ||
1532 | ||
1533 | ||
1534 | ||
1535 | ||
1536 | module lsu_tgd_dp_buff_macro__left_19__minbuff_1__stack_64c__width_45 ( | |
1537 | din, | |
1538 | dout); | |
1539 | input [44:0] din; | |
1540 | output [44:0] dout; | |
1541 | ||
1542 | ||
1543 | ||
1544 | ||
1545 | ||
1546 | ||
1547 | buff #(45) d0_0 ( | |
1548 | .in(din[44:0]), | |
1549 | .out(dout[44:0]) | |
1550 | ); | |
1551 | ||
1552 | ||
1553 | ||
1554 | ||
1555 | ||
1556 | ||
1557 | ||
1558 | ||
1559 | endmodule | |
1560 | ||
1561 | ||
1562 | ||
1563 | ||
1564 | ||
1565 | ||
1566 | ||
1567 | ||
1568 | ||
1569 | // any PARAMS parms go into naming of macro | |
1570 | ||
1571 | module lsu_tgd_dp_msff_macro__left_13__stack_64c__width_51 ( | |
1572 | din, | |
1573 | clk, | |
1574 | en, | |
1575 | se, | |
1576 | scan_in, | |
1577 | siclk, | |
1578 | soclk, | |
1579 | pce_ov, | |
1580 | stop, | |
1581 | dout, | |
1582 | scan_out); | |
1583 | wire l1clk; | |
1584 | wire siclk_out; | |
1585 | wire soclk_out; | |
1586 | wire [49:0] so; | |
1587 | ||
1588 | input [50:0] din; | |
1589 | ||
1590 | ||
1591 | input clk; | |
1592 | input en; | |
1593 | input se; | |
1594 | input scan_in; | |
1595 | input siclk; | |
1596 | input soclk; | |
1597 | input pce_ov; | |
1598 | input stop; | |
1599 | ||
1600 | ||
1601 | ||
1602 | output [50:0] dout; | |
1603 | ||
1604 | ||
1605 | output scan_out; | |
1606 | ||
1607 | ||
1608 | ||
1609 | ||
1610 | cl_dp1_l1hdr_8x c0_0 ( | |
1611 | .l2clk(clk), | |
1612 | .pce(en), | |
1613 | .aclk(siclk), | |
1614 | .bclk(soclk), | |
1615 | .l1clk(l1clk), | |
1616 | .se(se), | |
1617 | .pce_ov(pce_ov), | |
1618 | .stop(stop), | |
1619 | .siclk_out(siclk_out), | |
1620 | .soclk_out(soclk_out) | |
1621 | ); | |
1622 | dff #(51) d0_0 ( | |
1623 | .l1clk(l1clk), | |
1624 | .siclk(siclk_out), | |
1625 | .soclk(soclk_out), | |
1626 | .d(din[50:0]), | |
1627 | .si({scan_in,so[49:0]}), | |
1628 | .so({so[49:0],scan_out}), | |
1629 | .q(dout[50:0]) | |
1630 | ); | |
1631 | ||
1632 | ||
1633 | ||
1634 | ||
1635 | ||
1636 | ||
1637 | ||
1638 | ||
1639 | ||
1640 | ||
1641 | ||
1642 | ||
1643 | ||
1644 | ||
1645 | ||
1646 | ||
1647 | ||
1648 | ||
1649 | ||
1650 | ||
1651 | endmodule | |
1652 | ||
1653 | ||
1654 | ||
1655 | ||
1656 | ||
1657 | ||
1658 | ||
1659 | ||
1660 | ||
1661 | ||
1662 | ||
1663 | ||
1664 | ||
1665 | // any PARAMS parms go into naming of macro | |
1666 | ||
1667 | module lsu_tgd_dp_msff_macro__left_19__stack_64c__width_45 ( | |
1668 | din, | |
1669 | clk, | |
1670 | en, | |
1671 | se, | |
1672 | scan_in, | |
1673 | siclk, | |
1674 | soclk, | |
1675 | pce_ov, | |
1676 | stop, | |
1677 | dout, | |
1678 | scan_out); | |
1679 | wire l1clk; | |
1680 | wire siclk_out; | |
1681 | wire soclk_out; | |
1682 | wire [43:0] so; | |
1683 | ||
1684 | input [44:0] din; | |
1685 | ||
1686 | ||
1687 | input clk; | |
1688 | input en; | |
1689 | input se; | |
1690 | input scan_in; | |
1691 | input siclk; | |
1692 | input soclk; | |
1693 | input pce_ov; | |
1694 | input stop; | |
1695 | ||
1696 | ||
1697 | ||
1698 | output [44:0] dout; | |
1699 | ||
1700 | ||
1701 | output scan_out; | |
1702 | ||
1703 | ||
1704 | ||
1705 | ||
1706 | cl_dp1_l1hdr_8x c0_0 ( | |
1707 | .l2clk(clk), | |
1708 | .pce(en), | |
1709 | .aclk(siclk), | |
1710 | .bclk(soclk), | |
1711 | .l1clk(l1clk), | |
1712 | .se(se), | |
1713 | .pce_ov(pce_ov), | |
1714 | .stop(stop), | |
1715 | .siclk_out(siclk_out), | |
1716 | .soclk_out(soclk_out) | |
1717 | ); | |
1718 | dff #(45) d0_0 ( | |
1719 | .l1clk(l1clk), | |
1720 | .siclk(siclk_out), | |
1721 | .soclk(soclk_out), | |
1722 | .d(din[44:0]), | |
1723 | .si({scan_in,so[43:0]}), | |
1724 | .so({so[43:0],scan_out}), | |
1725 | .q(dout[44:0]) | |
1726 | ); | |
1727 | ||
1728 | ||
1729 | ||
1730 | ||
1731 | ||
1732 | ||
1733 | ||
1734 | ||
1735 | ||
1736 | ||
1737 | ||
1738 | ||
1739 | ||
1740 | ||
1741 | ||
1742 | ||
1743 | ||
1744 | ||
1745 | ||
1746 | ||
1747 | endmodule | |
1748 | ||
1749 | ||
1750 | ||
1751 | ||
1752 | ||
1753 | ||
1754 | ||
1755 | ||
1756 | ||
1757 | // | |
1758 | // comparator macro (output is 1 if both inputs are equal; 0 otherwise) | |
1759 | // | |
1760 | // | |
1761 | ||
1762 | ||
1763 | ||
1764 | ||
1765 | ||
1766 | module lsu_tgd_dp_cmp_macro__width_32 ( | |
1767 | din0, | |
1768 | din1, | |
1769 | dout); | |
1770 | input [31:0] din0; | |
1771 | input [31:0] din1; | |
1772 | output dout; | |
1773 | ||
1774 | ||
1775 | ||
1776 | ||
1777 | ||
1778 | ||
1779 | cmp #(32) m0_0 ( | |
1780 | .in0(din0[31:0]), | |
1781 | .in1(din1[31:0]), | |
1782 | .out(dout) | |
1783 | ); | |
1784 | ||
1785 | ||
1786 | ||
1787 | ||
1788 | ||
1789 | ||
1790 | ||
1791 | ||
1792 | ||
1793 | ||
1794 | endmodule | |
1795 | ||
1796 | ||
1797 | ||
1798 | ||
1799 | ||
1800 | // | |
1801 | // comparator macro (output is 1 if both inputs are equal; 0 otherwise) | |
1802 | // | |
1803 | // | |
1804 | ||
1805 | ||
1806 | ||
1807 | ||
1808 | ||
1809 | module lsu_tgd_dp_cmp_macro__width_16 ( | |
1810 | din0, | |
1811 | din1, | |
1812 | dout); | |
1813 | input [15:0] din0; | |
1814 | input [15:0] din1; | |
1815 | output dout; | |
1816 | ||
1817 | ||
1818 | ||
1819 | ||
1820 | ||
1821 | ||
1822 | cmp #(16) m0_0 ( | |
1823 | .in0(din0[15:0]), | |
1824 | .in1(din1[15:0]), | |
1825 | .out(dout) | |
1826 | ); | |
1827 | ||
1828 | ||
1829 | ||
1830 | ||
1831 | ||
1832 | ||
1833 | ||
1834 | ||
1835 | ||
1836 | ||
1837 | endmodule | |
1838 | ||
1839 | ||
1840 | ||
1841 | ||
1842 | ||
1843 | // | |
1844 | // buff macro | |
1845 | // | |
1846 | // | |
1847 | ||
1848 | ||
1849 | ||
1850 | ||
1851 | ||
1852 | module lsu_tgd_dp_buff_macro__rep_1__width_10 ( | |
1853 | din, | |
1854 | dout); | |
1855 | input [9:0] din; | |
1856 | output [9:0] dout; | |
1857 | ||
1858 | ||
1859 | ||
1860 | ||
1861 | ||
1862 | ||
1863 | buff #(10) d0_0 ( | |
1864 | .in(din[9:0]), | |
1865 | .out(dout[9:0]) | |
1866 | ); | |
1867 | ||
1868 | ||
1869 | ||
1870 | ||
1871 | ||
1872 | ||
1873 | ||
1874 | ||
1875 | endmodule | |
1876 | ||
1877 | ||
1878 | ||
1879 | ||
1880 | ||
1881 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
1882 | // also for pass-gate with decoder | |
1883 | ||
1884 | ||
1885 | ||
1886 | ||
1887 | ||
1888 | // any PARAMS parms go into naming of macro | |
1889 | ||
1890 | module lsu_tgd_dp_mux_macro__mux_aope__ports_3__stack_64c__width_64 ( | |
1891 | din0, | |
1892 | din1, | |
1893 | din2, | |
1894 | sel0, | |
1895 | sel1, | |
1896 | dout); | |
1897 | wire psel0; | |
1898 | wire psel1; | |
1899 | wire psel2; | |
1900 | ||
1901 | input [63:0] din0; | |
1902 | input [63:0] din1; | |
1903 | input [63:0] din2; | |
1904 | input sel0; | |
1905 | input sel1; | |
1906 | output [63:0] dout; | |
1907 | ||
1908 | ||
1909 | ||
1910 | ||
1911 | ||
1912 | cl_dp1_penc3_8x c0_0 ( | |
1913 | .test(1'b1), | |
1914 | .sel0(sel0), | |
1915 | .sel1(sel1), | |
1916 | .psel0(psel0), | |
1917 | .psel1(psel1), | |
1918 | .psel2(psel2) | |
1919 | ); | |
1920 | ||
1921 | mux3s #(64) d0_0 ( | |
1922 | .sel0(psel0), | |
1923 | .sel1(psel1), | |
1924 | .sel2(psel2), | |
1925 | .in0(din0[63:0]), | |
1926 | .in1(din1[63:0]), | |
1927 | .in2(din2[63:0]), | |
1928 | .dout(dout[63:0]) | |
1929 | ); | |
1930 | ||
1931 | ||
1932 | ||
1933 | ||
1934 | ||
1935 | ||
1936 | ||
1937 | ||
1938 | ||
1939 | ||
1940 | ||
1941 | ||
1942 | ||
1943 | endmodule | |
1944 | ||
1945 | ||
1946 | // | |
1947 | // comparator macro (output is 1 if both inputs are equal; 0 otherwise) | |
1948 | // | |
1949 | // | |
1950 | ||
1951 | ||
1952 | ||
1953 | ||
1954 | ||
1955 | module lsu_tgd_dp_cmp_macro__width_64 ( | |
1956 | din0, | |
1957 | din1, | |
1958 | dout); | |
1959 | input [63:0] din0; | |
1960 | input [63:0] din1; | |
1961 | output dout; | |
1962 | ||
1963 | ||
1964 | ||
1965 | ||
1966 | ||
1967 | ||
1968 | cmp #(64) m0_0 ( | |
1969 | .in0(din0[63:0]), | |
1970 | .in1(din1[63:0]), | |
1971 | .out(dout) | |
1972 | ); | |
1973 | ||
1974 | ||
1975 | ||
1976 | ||
1977 | ||
1978 | ||
1979 | ||
1980 | ||
1981 | ||
1982 | ||
1983 | endmodule | |
1984 | ||
1985 | ||
1986 | ||
1987 | ||
1988 | ||
1989 | // | |
1990 | // comparator macro (output is 1 if both inputs are equal; 0 otherwise) | |
1991 | // | |
1992 | // | |
1993 | ||
1994 | ||
1995 | ||
1996 | ||
1997 | ||
1998 | module lsu_tgd_dp_cmp_macro__width_8 ( | |
1999 | din0, | |
2000 | din1, | |
2001 | dout); | |
2002 | input [7:0] din0; | |
2003 | input [7:0] din1; | |
2004 | output dout; | |
2005 | ||
2006 | ||
2007 | ||
2008 | ||
2009 | ||
2010 | ||
2011 | cmp #(8) m0_0 ( | |
2012 | .in0(din0[7:0]), | |
2013 | .in1(din1[7:0]), | |
2014 | .out(dout) | |
2015 | ); | |
2016 | ||
2017 | ||
2018 | ||
2019 | ||
2020 | ||
2021 | ||
2022 | ||
2023 | ||
2024 | ||
2025 | ||
2026 | endmodule | |
2027 | ||
2028 | ||
2029 | ||
2030 | ||
2031 | ||
2032 | // | |
2033 | // buff macro | |
2034 | // | |
2035 | // | |
2036 | ||
2037 | ||
2038 | ||
2039 | ||
2040 | ||
2041 | module lsu_tgd_dp_buff_macro__width_5 ( | |
2042 | din, | |
2043 | dout); | |
2044 | input [4:0] din; | |
2045 | output [4:0] dout; | |
2046 | ||
2047 | ||
2048 | ||
2049 | ||
2050 | ||
2051 | ||
2052 | buff #(5) d0_0 ( | |
2053 | .in(din[4:0]), | |
2054 | .out(dout[4:0]) | |
2055 | ); | |
2056 | ||
2057 | ||
2058 | ||
2059 | ||
2060 | ||
2061 | ||
2062 | ||
2063 | ||
2064 | endmodule | |
2065 | ||
2066 | ||
2067 | ||
2068 |