Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: mcu_l2ecc_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 mcu_l2ecc_dp ( | |
36 | din, | |
37 | mecc_err, | |
38 | pa_err, | |
39 | parity); | |
40 | wire l2_eccgen_err; | |
41 | wire dout_p0_1; | |
42 | wire dout_p0_2; | |
43 | wire dout_p0_3; | |
44 | wire dout_p0_4; | |
45 | wire dout_p0_5; | |
46 | wire dout_p0_6; | |
47 | wire dout_p0_7; | |
48 | wire dout_p0_8; | |
49 | wire dout_p1_1; | |
50 | wire dout_p1_2; | |
51 | wire dout_p1_3; | |
52 | wire dout_p1_4; | |
53 | wire dout_p1_5; | |
54 | wire dout_p1_6; | |
55 | wire dout_p1_7; | |
56 | wire dout_p1_8; | |
57 | wire dout_p2_1; | |
58 | wire dout_p2_2; | |
59 | wire dout_p2_3; | |
60 | wire dout_p2_4; | |
61 | wire dout_p2_5; | |
62 | wire dout_p2_6; | |
63 | wire dout_p2_7; | |
64 | wire dout_p2_8; | |
65 | wire dout_p3_1; | |
66 | wire dout_p3_2; | |
67 | wire dout_p3_3; | |
68 | wire dout_p3_4; | |
69 | wire dout_p3_5; | |
70 | wire dout_p4_1; | |
71 | wire dout_p4_2; | |
72 | wire dout_p4_3; | |
73 | wire dout_p4_4; | |
74 | wire dout_p4_5; | |
75 | wire dout_p5_1; | |
76 | wire dout_p6_1; | |
77 | wire dout_p6_2; | |
78 | wire dout_p6_3; | |
79 | wire dout_p6_4; | |
80 | wire dout_p6_5; | |
81 | wire dout_p6_6; | |
82 | wire dout_p6_7; | |
83 | wire dout_p6_8; | |
84 | ||
85 | ||
86 | input [31:0] din; | |
87 | input mecc_err; // ECC multi err | |
88 | input pa_err; // Physical address err | |
89 | output [6:0] parity; | |
90 | ||
91 | mcu_l2ecc_dp_or_macro__ports_2__width_1 u_mecc_pa_err (.din0 (mecc_err), .din1 (pa_err), .dout (l2_eccgen_err) ); | |
92 | // | |
93 | // P0 | |
94 | // Incase of mecc_err, flip 2 low order parity to flag L2 that theere is an mecc_err in the current data | |
95 | // | |
96 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_1 ( .din0 ( din[0] ), .din1 ( din[1] ), .din2 ( din[3] ), .dout ( dout_p0_1 )); | |
97 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_2 ( .din0 ( din[4] ), .din1 ( din[6] ), .din2 ( din[8] ), .dout ( dout_p0_2 )); | |
98 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_3 ( .din0 ( din[10] ), .din1 ( din[11] ), .din2 ( din[13] ), .dout ( dout_p0_3 )); | |
99 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_4 ( .din0 ( din[15] ), .din1 ( din[17] ), .din2 ( din[19] ), .dout ( dout_p0_4 )); | |
100 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_5 ( .din0 ( din[21] ), .din1 ( din[23] ), .din2 ( din[25] ), .dout ( dout_p0_5 )); | |
101 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_6 ( .din0 ( din[26] ), .din1 ( din[28] ), .din2 ( din[30] ), .dout ( dout_p0_6 )); | |
102 | ||
103 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_7 ( .din0 ( dout_p0_1 ), .din1 ( dout_p0_2 ), .din2 ( dout_p0_3 ), .dout ( dout_p0_7 )); | |
104 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_8 ( .din0 ( dout_p0_4 ), .din1 ( dout_p0_5 ), .din2 ( dout_p0_6 ), .dout ( dout_p0_8 )); | |
105 | ||
106 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p0_9 ( .din0 ( dout_p0_7 ), .din1 ( dout_p0_8 ), .din2 ( l2_eccgen_err ), .dout ( parity[0] )); | |
107 | ||
108 | // | |
109 | // P1 | |
110 | // | |
111 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_1 ( .din0 ( din[0] ), .din1 ( din[2] ), .din2 ( din[3] ), .dout ( dout_p1_1 )); | |
112 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_2 ( .din0 ( din[5] ), .din1 ( din[6] ), .din2 ( din[9] ), .dout ( dout_p1_2 )); | |
113 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_3 ( .din0 ( din[10] ), .din1 ( din[12] ), .din2 ( din[13] ), .dout ( dout_p1_3 )); | |
114 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_4 ( .din0 ( din[16] ), .din1 ( din[17] ), .din2 ( din[20] ), .dout ( dout_p1_4 )); | |
115 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_5 ( .din0 ( din[21] ), .din1 ( din[24] ), .din2 ( din[25] ), .dout ( dout_p1_5 )); | |
116 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_6 ( .din0 ( din[27] ), .din1 ( din[28] ), .din2 ( din[31] ), .dout ( dout_p1_6 )); | |
117 | ||
118 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_7 ( .din0 ( dout_p1_1 ), .din1 ( dout_p1_2 ), .din2 ( dout_p1_3 ), .dout ( dout_p1_7 )); | |
119 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_8 ( .din0 ( dout_p1_4 ), .din1 ( dout_p1_5 ), .din2 ( dout_p1_6 ), .dout ( dout_p1_8 )); | |
120 | ||
121 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p1_9 ( .din0 ( dout_p1_7 ), .din1 ( dout_p1_8 ), .din2 ( l2_eccgen_err ), .dout ( parity[1] )); | |
122 | ||
123 | // | |
124 | // P2 | |
125 | // | |
126 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_1 ( .din0 ( din[1] ), .din1 ( din[2] ), .din2 ( din[3] ), .dout ( dout_p2_1 )); | |
127 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_2 ( .din0 ( din[7] ), .din1 ( din[8] ), .din2 ( din[9] ), .dout ( dout_p2_2 )); | |
128 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_3 ( .din0 ( din[10] ), .din1 ( din[14] ), .din2 ( din[15] ), .dout ( dout_p2_3 )); | |
129 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_4 ( .din0 ( din[16] ), .din1 ( din[17] ), .din2 ( din[22] ), .dout ( dout_p2_4 )); | |
130 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_5 ( .din0 ( din[23] ), .din1 ( din[24] ), .din2 ( din[25] ), .dout ( dout_p2_5 )); | |
131 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_6 ( .din0 ( din[29] ), .din1 ( din[30] ), .din2 ( din[31] ), .dout ( dout_p2_6 )); | |
132 | ||
133 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_7 ( .din0 ( dout_p2_1 ), .din1 ( dout_p2_2 ), .din2 ( dout_p2_3 ), .dout ( dout_p2_7 )); | |
134 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_8 ( .din0 ( dout_p2_4 ), .din1 ( dout_p2_5 ), .din2 ( dout_p2_6 ), .dout ( dout_p2_8 )); | |
135 | ||
136 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p2_9 ( .din0 ( dout_p2_7 ), .din1 ( dout_p2_8 ), .din2 ( l2_eccgen_err ), .dout ( parity[2] )); | |
137 | ||
138 | // | |
139 | // P3 | |
140 | // | |
141 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p3_1 ( .din0 ( din[4] ), .din1 ( din[5] ), .din2 ( din[6] ), .dout ( dout_p3_1 )); | |
142 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p3_2 ( .din0 ( din[10] ), .din1 ( din[18] ), .din2 ( din[19] ), .dout ( dout_p3_2 )); | |
143 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p3_3 ( .din0 ( din[20] ), .din1 ( din[21] ), .din2 ( din[22] ), .dout ( dout_p3_3 )); | |
144 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p3_4 ( .din0 ( dout_p3_1 ), .din1 ( dout_p2_2 ), .din2 ( dout_p3_2 ), .dout ( dout_p3_4 )); | |
145 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p3_5 ( .din0 ( dout_p3_4 ), .din1 ( dout_p2_5 ), .din2 ( dout_p3_3 ), .dout ( dout_p3_5 )); | |
146 | mcu_l2ecc_dp_xor_macro__ports_2__width_1 p3_6 ( .din0 ( dout_p3_5 ), .din1 ( l2_eccgen_err ), .dout ( parity[3] )); | |
147 | ||
148 | // | |
149 | // P4 | |
150 | // | |
151 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p4_1 ( .din0 ( din[11] ), .din1 ( din[12] ), .din2 ( din[13] ), .dout ( dout_p4_1 )); | |
152 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p4_2 ( .din0 ( din[14] ), .din1 ( din[15] ), .din2 ( din[16] ), .dout ( dout_p4_2 )); | |
153 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p4_3 ( .din0 ( din[17] ), .din1 ( din[18] ), .din2 ( din[19] ), .dout ( dout_p4_3 )); | |
154 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p4_4 ( .din0 ( dout_p4_1 ), .din1 ( dout_p4_2 ), .din2 ( dout_p4_3 ), .dout ( dout_p4_4 )); | |
155 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p4_5 ( .din0 ( dout_p4_4 ), .din1 ( dout_p2_5 ), .din2 ( dout_p3_3 ), .dout ( dout_p4_5 )); | |
156 | mcu_l2ecc_dp_xor_macro__ports_2__width_1 p4_6 ( .din0 ( dout_p4_5 ), .din1 ( l2_eccgen_err ), .dout ( parity[4] )); | |
157 | ||
158 | // | |
159 | // P5 | |
160 | // | |
161 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p5_1 ( .din0 ( din[26] ), .din1 ( din[27] ), .din2 ( din[28] ), .dout ( dout_p5_1 )); | |
162 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p5_2 ( .din0 ( dout_p2_6 ), .din1 ( dout_p5_1 ),.din2 ( l2_eccgen_err ),.dout ( parity[5] )); | |
163 | ||
164 | // | |
165 | // P6 | |
166 | // | |
167 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_1 ( .din0 ( din[0] ), .din1 ( din[1] ), .din2 ( din[2] ), .dout ( dout_p6_1 )); | |
168 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_2 ( .din0 ( din[4] ), .din1 ( din[5] ), .din2 ( din[7] ), .dout ( dout_p6_2 )); | |
169 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_3 ( .din0 ( din[10] ), .din1 ( din[11] ), .din2 ( din[12] ), .dout ( dout_p6_3 )); | |
170 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_4 ( .din0 ( din[14] ), .din1 ( din[17] ), .din2 ( din[18] ), .dout ( dout_p6_4 )); | |
171 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_5 ( .din0 ( din[21] ), .din1 ( din[23] ), .din2 ( din[24] ), .dout ( dout_p6_5 )); | |
172 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_6 ( .din0 ( din[26] ), .din1 ( din[27] ), .din2 ( din[29] ), .dout ( dout_p6_6 )); | |
173 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_7 ( .din0 ( dout_p6_1 ), .din1 ( dout_p6_2 ), .din2 ( dout_p6_3 ), .dout ( dout_p6_7 )); | |
174 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_8 ( .din0 ( dout_p6_4 ), .din1 ( dout_p6_5 ), .din2 ( dout_p6_6 ), .dout ( dout_p6_8 )); | |
175 | mcu_l2ecc_dp_xor_macro__ports_3__width_1 p6_9 ( .din0 ( dout_p6_7 ), .din1 ( dout_p6_8 ), .din2 ( l2_eccgen_err ), .dout ( parity[6] )); | |
176 | ||
177 | endmodule // mcu_l2ecc_dp | |
178 | ||
179 | ||
180 | // | |
181 | // or macro for ports = 2,3 | |
182 | // | |
183 | // | |
184 | ||
185 | ||
186 | ||
187 | ||
188 | ||
189 | module mcu_l2ecc_dp_or_macro__ports_2__width_1 ( | |
190 | din0, | |
191 | din1, | |
192 | dout); | |
193 | input [0:0] din0; | |
194 | input [0:0] din1; | |
195 | output [0:0] dout; | |
196 | ||
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | or2 #(1) d0_0 ( | |
203 | .in0(din0[0:0]), | |
204 | .in1(din1[0:0]), | |
205 | .out(dout[0:0]) | |
206 | ); | |
207 | ||
208 | ||
209 | ||
210 | ||
211 | ||
212 | ||
213 | ||
214 | ||
215 | ||
216 | endmodule | |
217 | ||
218 | ||
219 | ||
220 | ||
221 | ||
222 | // | |
223 | // xor macro for ports = 2,3 | |
224 | // | |
225 | // | |
226 | ||
227 | ||
228 | ||
229 | ||
230 | ||
231 | module mcu_l2ecc_dp_xor_macro__ports_3__width_1 ( | |
232 | din0, | |
233 | din1, | |
234 | din2, | |
235 | dout); | |
236 | input [0:0] din0; | |
237 | input [0:0] din1; | |
238 | input [0:0] din2; | |
239 | output [0:0] dout; | |
240 | ||
241 | ||
242 | ||
243 | ||
244 | ||
245 | xor3 #(1) d0_0 ( | |
246 | .in0(din0[0:0]), | |
247 | .in1(din1[0:0]), | |
248 | .in2(din2[0:0]), | |
249 | .out(dout[0:0]) | |
250 | ); | |
251 | ||
252 | ||
253 | ||
254 | ||
255 | ||
256 | ||
257 | ||
258 | ||
259 | endmodule | |
260 | ||
261 | ||
262 | ||
263 | ||
264 | ||
265 | // | |
266 | // xor macro for ports = 2,3 | |
267 | // | |
268 | // | |
269 | ||
270 | ||
271 | ||
272 | ||
273 | ||
274 | module mcu_l2ecc_dp_xor_macro__ports_2__width_1 ( | |
275 | din0, | |
276 | din1, | |
277 | dout); | |
278 | input [0:0] din0; | |
279 | input [0:0] din1; | |
280 | output [0:0] dout; | |
281 | ||
282 | ||
283 | ||
284 | ||
285 | ||
286 | xor2 #(1) d0_0 ( | |
287 | .in0(din0[0:0]), | |
288 | .in1(din1[0:0]), | |
289 | .out(dout[0:0]) | |
290 | ); | |
291 | ||
292 | ||
293 | ||
294 | ||
295 | ||
296 | ||
297 | ||
298 | ||
299 | endmodule | |
300 | ||
301 | ||
302 | ||
303 |