Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: mmu_sel_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 mmu_sel_dp ( | |
36 | l2clk, | |
37 | scan_in, | |
38 | tcu_pce_ov, | |
39 | spc_aclk, | |
40 | spc_bclk, | |
41 | tcu_scan_en, | |
42 | tlu_cerer_scac, | |
43 | tlu_cerer_scau, | |
44 | asi_sel_en, | |
45 | asi_rd_scp0, | |
46 | sed_syndrome, | |
47 | scp0_ecc, | |
48 | scp1_ecc, | |
49 | sed_cecc_err, | |
50 | sed_uecc_err, | |
51 | scan_out, | |
52 | sel_syndrome, | |
53 | sel_crit_ecc, | |
54 | sel_scac, | |
55 | sel_scau); | |
56 | wire pce_ov; | |
57 | wire clk; | |
58 | wire stop; | |
59 | wire siclk; | |
60 | wire soclk; | |
61 | wire se; | |
62 | wire en; | |
63 | wire [7:0] rd_ecc_in; | |
64 | wire ecc_lat_scanin; | |
65 | wire ecc_lat_scanout; | |
66 | wire scac_in; | |
67 | wire scau_in; | |
68 | wire [7:0] rd_ecc; | |
69 | wire scac; | |
70 | wire scau; | |
71 | ||
72 | ||
73 | ||
74 | ||
75 | input l2clk; | |
76 | input scan_in; | |
77 | input tcu_pce_ov; | |
78 | input spc_aclk; | |
79 | input spc_bclk; | |
80 | input tcu_scan_en; | |
81 | ||
82 | input tlu_cerer_scac; | |
83 | input tlu_cerer_scau; | |
84 | ||
85 | input asi_sel_en; | |
86 | input asi_rd_scp0; | |
87 | ||
88 | input [7:0] sed_syndrome; | |
89 | ||
90 | input [7:0] scp0_ecc; | |
91 | input [7:0] scp1_ecc; | |
92 | ||
93 | input sed_cecc_err; | |
94 | input sed_uecc_err; | |
95 | ||
96 | ||
97 | output scan_out; | |
98 | ||
99 | output [7:0] sel_syndrome; | |
100 | output [7:0] sel_crit_ecc; | |
101 | ||
102 | output sel_scac; | |
103 | output sel_scau; | |
104 | ||
105 | ||
106 | ||
107 | //////////////////////////////////////////////////////////////////////////////// | |
108 | ||
109 | assign pce_ov = tcu_pce_ov; | |
110 | assign clk = l2clk; | |
111 | assign stop = 1'b0; | |
112 | assign siclk = spc_aclk; | |
113 | assign soclk = spc_bclk; | |
114 | assign se = tcu_scan_en; | |
115 | assign en = asi_sel_en; | |
116 | ||
117 | ||
118 | ||
119 | // Data is flopped, but ECC is not... so mux and flop here | |
120 | ||
121 | mmu_sel_dp_mux_macro__mux_aope__ports_2__width_8 rd_ecc_in_mux ( | |
122 | .din0 (scp0_ecc [7:0] ), | |
123 | .din1 (scp1_ecc [7:0] ), | |
124 | .sel0 (asi_rd_scp0 ), | |
125 | .dout (rd_ecc_in [7:0] ) | |
126 | ); | |
127 | ||
128 | mmu_sel_dp_msff_macro__width_18 ecc_lat ( | |
129 | .scan_in(ecc_lat_scanin), | |
130 | .scan_out(ecc_lat_scanout), | |
131 | .din ({rd_ecc_in [7:0], | |
132 | scac_in , | |
133 | scau_in , | |
134 | sed_syndrome [7:0]}), | |
135 | .dout ({rd_ecc [7:0], | |
136 | scac , | |
137 | scau , | |
138 | sel_syndrome [7:0]}), | |
139 | .clk(clk), | |
140 | .en(en), | |
141 | .se(se), | |
142 | .siclk(siclk), | |
143 | .soclk(soclk), | |
144 | .pce_ov(pce_ov), | |
145 | .stop(stop) | |
146 | ); | |
147 | ||
148 | assign sel_crit_ecc[7:0] = | |
149 | rd_ecc[7:0]; | |
150 | ||
151 | ||
152 | ||
153 | // Qualify error signals | |
154 | ||
155 | mmu_sel_dp_and_macro__ports_2__width_1 scac_in_and ( | |
156 | .din0 (sed_cecc_err ), | |
157 | .din1 (tlu_cerer_scac ), | |
158 | .dout (scac_in ) | |
159 | ); | |
160 | ||
161 | mmu_sel_dp_and_macro__ports_2__width_1 scau_in_and ( | |
162 | .din0 (sed_uecc_err ), | |
163 | .din1 (tlu_cerer_scau ), | |
164 | .dout (scau_in ) | |
165 | ); | |
166 | ||
167 | assign sel_scac = | |
168 | scac; | |
169 | ||
170 | assign sel_scau = | |
171 | scau; | |
172 | ||
173 | ||
174 | supply0 vss; // <- port for ground | |
175 | supply1 vdd; // <- port for power | |
176 | ||
177 | // fixscan start: | |
178 | assign ecc_lat_scanin = scan_in ; | |
179 | assign scan_out = ecc_lat_scanout ; | |
180 | // fixscan end: | |
181 | endmodule | |
182 | ||
183 | ||
184 | ||
185 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
186 | // also for pass-gate with decoder | |
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | // any PARAMS parms go into naming of macro | |
193 | ||
194 | module mmu_sel_dp_mux_macro__mux_aope__ports_2__width_8 ( | |
195 | din0, | |
196 | din1, | |
197 | sel0, | |
198 | dout); | |
199 | wire psel0; | |
200 | wire psel1; | |
201 | ||
202 | input [7:0] din0; | |
203 | input [7:0] din1; | |
204 | input sel0; | |
205 | output [7:0] dout; | |
206 | ||
207 | ||
208 | ||
209 | ||
210 | ||
211 | cl_dp1_penc2_8x c0_0 ( | |
212 | .sel0(sel0), | |
213 | .psel0(psel0), | |
214 | .psel1(psel1) | |
215 | ); | |
216 | ||
217 | mux2s #(8) d0_0 ( | |
218 | .sel0(psel0), | |
219 | .sel1(psel1), | |
220 | .in0(din0[7:0]), | |
221 | .in1(din1[7:0]), | |
222 | .dout(dout[7:0]) | |
223 | ); | |
224 | ||
225 | ||
226 | ||
227 | ||
228 | ||
229 | ||
230 | ||
231 | ||
232 | ||
233 | ||
234 | ||
235 | ||
236 | ||
237 | endmodule | |
238 | ||
239 | ||
240 | ||
241 | ||
242 | ||
243 | ||
244 | // any PARAMS parms go into naming of macro | |
245 | ||
246 | module mmu_sel_dp_msff_macro__width_18 ( | |
247 | din, | |
248 | clk, | |
249 | en, | |
250 | se, | |
251 | scan_in, | |
252 | siclk, | |
253 | soclk, | |
254 | pce_ov, | |
255 | stop, | |
256 | dout, | |
257 | scan_out); | |
258 | wire l1clk; | |
259 | wire siclk_out; | |
260 | wire soclk_out; | |
261 | wire [16:0] so; | |
262 | ||
263 | input [17:0] din; | |
264 | ||
265 | ||
266 | input clk; | |
267 | input en; | |
268 | input se; | |
269 | input scan_in; | |
270 | input siclk; | |
271 | input soclk; | |
272 | input pce_ov; | |
273 | input stop; | |
274 | ||
275 | ||
276 | ||
277 | output [17:0] dout; | |
278 | ||
279 | ||
280 | output scan_out; | |
281 | ||
282 | ||
283 | ||
284 | ||
285 | cl_dp1_l1hdr_8x c0_0 ( | |
286 | .l2clk(clk), | |
287 | .pce(en), | |
288 | .aclk(siclk), | |
289 | .bclk(soclk), | |
290 | .l1clk(l1clk), | |
291 | .se(se), | |
292 | .pce_ov(pce_ov), | |
293 | .stop(stop), | |
294 | .siclk_out(siclk_out), | |
295 | .soclk_out(soclk_out) | |
296 | ); | |
297 | dff #(18) d0_0 ( | |
298 | .l1clk(l1clk), | |
299 | .siclk(siclk_out), | |
300 | .soclk(soclk_out), | |
301 | .d(din[17:0]), | |
302 | .si({scan_in,so[16:0]}), | |
303 | .so({so[16:0],scan_out}), | |
304 | .q(dout[17:0]) | |
305 | ); | |
306 | ||
307 | ||
308 | ||
309 | ||
310 | ||
311 | ||
312 | ||
313 | ||
314 | ||
315 | ||
316 | ||
317 | ||
318 | ||
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | ||
325 | ||
326 | endmodule | |
327 | ||
328 | ||
329 | ||
330 | ||
331 | ||
332 | ||
333 | ||
334 | ||
335 | ||
336 | // | |
337 | // and macro for ports = 2,3,4 | |
338 | // | |
339 | // | |
340 | ||
341 | ||
342 | ||
343 | ||
344 | ||
345 | module mmu_sel_dp_and_macro__ports_2__width_1 ( | |
346 | din0, | |
347 | din1, | |
348 | dout); | |
349 | input [0:0] din0; | |
350 | input [0:0] din1; | |
351 | output [0:0] dout; | |
352 | ||
353 | ||
354 | ||
355 | ||
356 | ||
357 | ||
358 | and2 #(1) d0_0 ( | |
359 | .in0(din0[0:0]), | |
360 | .in1(din1[0:0]), | |
361 | .out(dout[0:0]) | |
362 | ); | |
363 | ||
364 | ||
365 | ||
366 | ||
367 | ||
368 | ||
369 | ||
370 | ||
371 | ||
372 | endmodule | |
373 | ||
374 | ||
375 | ||
376 |