Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / mmu / rtl / mmu_sel_dp.v
CommitLineData
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 ============================================
35module 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);
56wire pce_ov;
57wire clk;
58wire stop;
59wire siclk;
60wire soclk;
61wire se;
62wire en;
63wire [7:0] rd_ecc_in;
64wire ecc_lat_scanin;
65wire ecc_lat_scanout;
66wire scac_in;
67wire scau_in;
68wire [7:0] rd_ecc;
69wire scac;
70wire scau;
71
72
73
74
75input l2clk;
76input scan_in;
77input tcu_pce_ov;
78input spc_aclk;
79input spc_bclk;
80input tcu_scan_en;
81
82input tlu_cerer_scac;
83input tlu_cerer_scau;
84
85input asi_sel_en;
86input asi_rd_scp0;
87
88input [7:0] sed_syndrome;
89
90input [7:0] scp0_ecc;
91input [7:0] scp1_ecc;
92
93input sed_cecc_err;
94input sed_uecc_err;
95
96
97output scan_out;
98
99output [7:0] sel_syndrome;
100output [7:0] sel_crit_ecc;
101
102output sel_scac;
103output sel_scau;
104
105
106
107////////////////////////////////////////////////////////////////////////////////
108
109assign pce_ov = tcu_pce_ov;
110assign clk = l2clk;
111assign stop = 1'b0;
112assign siclk = spc_aclk;
113assign soclk = spc_bclk;
114assign se = tcu_scan_en;
115assign en = asi_sel_en;
116
117
118
119// Data is flopped, but ECC is not... so mux and flop here
120
121mmu_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
128mmu_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
148assign sel_crit_ecc[7:0] =
149 rd_ecc[7:0];
150
151
152
153// Qualify error signals
154
155mmu_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
161mmu_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
167assign sel_scac =
168 scac;
169
170assign sel_scau =
171 scau;
172
173
174supply0 vss; // <- port for ground
175supply1 vdd; // <- port for power
176
177// fixscan start:
178assign ecc_lat_scanin = scan_in ;
179assign scan_out = ecc_lat_scanout ;
180// fixscan end:
181endmodule
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
194module mmu_sel_dp_mux_macro__mux_aope__ports_2__width_8 (
195 din0,
196 din1,
197 sel0,
198 dout);
199wire psel0;
200wire 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
211cl_dp1_penc2_8x c0_0 (
212 .sel0(sel0),
213 .psel0(psel0),
214 .psel1(psel1)
215);
216
217mux2s #(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
237endmodule
238
239
240
241
242
243
244// any PARAMS parms go into naming of macro
245
246module 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);
258wire l1clk;
259wire siclk_out;
260wire soclk_out;
261wire [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
285cl_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);
297dff #(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
326endmodule
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
345module 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
358and2 #(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
372endmodule
373
374
375
376