Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: lsu_dcp_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_dcp_dp ( | |
36 | lmd_fill_data_e, | |
37 | dcc_parity_invert, | |
38 | mbi_run, | |
39 | mbi_wdata, | |
40 | dcp_fill_data_e, | |
41 | dcp_parity); | |
42 | wire [15:0] parity; | |
43 | wire [15:0] parity_e; | |
44 | ||
45 | ||
46 | input [127:0] lmd_fill_data_e; | |
47 | input [7:0] dcc_parity_invert; | |
48 | ||
49 | input mbi_run; | |
50 | input [7:0] mbi_wdata; | |
51 | ||
52 | output [127:0] dcp_fill_data_e; | |
53 | output [15:0] dcp_parity; | |
54 | ||
55 | // Mux in BIST data | |
56 | ||
57 | lsu_dcp_dp_mux_macro__dmux_32x__mux_pgpe__ports_2__width_64 bist_dmux0 ( | |
58 | .din0 ({8{mbi_wdata[7:0]}}), | |
59 | .din1 (lmd_fill_data_e[127:64]), | |
60 | .sel0 (mbi_run), | |
61 | .dout (dcp_fill_data_e[127:64]) | |
62 | ); | |
63 | ||
64 | lsu_dcp_dp_mux_macro__dmux_32x__mux_pgpe__ports_2__width_64 bist_dmux1 ( | |
65 | .din0 ({8{mbi_wdata[7:0]}}), | |
66 | .din1 (lmd_fill_data_e[63:0]), | |
67 | .sel0 (mbi_run), | |
68 | .dout (dcp_fill_data_e[63:0]) | |
69 | ); | |
70 | ||
71 | //////////////////////////////////////////////////////////////////////////////// | |
72 | // Parity generation | |
73 | //////////////////////////////////////////////////////////////////////////////// | |
74 | ||
75 | lsu_dcp_dp_prty_macro__width_8 prty_b00 ( | |
76 | .din (lmd_fill_data_e[7:0]), | |
77 | .dout (parity[0]) | |
78 | ); | |
79 | lsu_dcp_dp_prty_macro__width_8 prty_b01 ( | |
80 | .din (lmd_fill_data_e[15:8]), | |
81 | .dout (parity[1]) | |
82 | ); | |
83 | lsu_dcp_dp_prty_macro__width_8 prty_b02 ( | |
84 | .din (lmd_fill_data_e[23:16]), | |
85 | .dout (parity[2]) | |
86 | ); | |
87 | lsu_dcp_dp_prty_macro__width_8 prty_b03 ( | |
88 | .din (lmd_fill_data_e[31:24]), | |
89 | .dout (parity[3]) | |
90 | ); | |
91 | lsu_dcp_dp_prty_macro__width_8 prty_b04 ( | |
92 | .din (lmd_fill_data_e[39:32]), | |
93 | .dout (parity[4]) | |
94 | ); | |
95 | lsu_dcp_dp_prty_macro__width_8 prty_b05 ( | |
96 | .din (lmd_fill_data_e[47:40]), | |
97 | .dout (parity[5]) | |
98 | ); | |
99 | lsu_dcp_dp_prty_macro__width_8 prty_b06 ( | |
100 | .din (lmd_fill_data_e[55:48]), | |
101 | .dout (parity[6]) | |
102 | ); | |
103 | lsu_dcp_dp_prty_macro__width_8 prty_b07 ( | |
104 | .din (lmd_fill_data_e[63:56]), | |
105 | .dout (parity[7]) | |
106 | ); | |
107 | lsu_dcp_dp_prty_macro__width_8 prty_b08 ( | |
108 | .din (lmd_fill_data_e[71:64]), | |
109 | .dout (parity[8]) | |
110 | ); | |
111 | lsu_dcp_dp_prty_macro__width_8 prty_b09 ( | |
112 | .din (lmd_fill_data_e[79:72]), | |
113 | .dout (parity[9]) | |
114 | ); | |
115 | lsu_dcp_dp_prty_macro__width_8 prty_b10 ( | |
116 | .din (lmd_fill_data_e[87:80]), | |
117 | .dout (parity[10]) | |
118 | ); | |
119 | lsu_dcp_dp_prty_macro__width_8 prty_b11 ( | |
120 | .din (lmd_fill_data_e[95:88]), | |
121 | .dout (parity[11]) | |
122 | ); | |
123 | lsu_dcp_dp_prty_macro__width_8 prty_b12 ( | |
124 | .din (lmd_fill_data_e[103:96]), | |
125 | .dout (parity[12]) | |
126 | ); | |
127 | lsu_dcp_dp_prty_macro__width_8 prty_b13 ( | |
128 | .din (lmd_fill_data_e[111:104]), | |
129 | .dout (parity[13]) | |
130 | ); | |
131 | lsu_dcp_dp_prty_macro__width_8 prty_b14 ( | |
132 | .din (lmd_fill_data_e[119:112]), | |
133 | .dout (parity[14]) | |
134 | ); | |
135 | lsu_dcp_dp_prty_macro__width_8 prty_b15 ( | |
136 | .din (lmd_fill_data_e[127:120]), | |
137 | .dout (parity[15]) | |
138 | ); | |
139 | ||
140 | //////////////////////////////////////////////////////////////////////////////// | |
141 | // Error injection | |
142 | //////////////////////////////////////////////////////////////////////////////// | |
143 | ||
144 | lsu_dcp_dp_xor_macro__stack_16l__width_16 error_inj ( | |
145 | .din0 (parity[15:0]), | |
146 | .din1 ({dcc_parity_invert[7:0],dcc_parity_invert[7:0]}), | |
147 | .dout (parity_e[15:0]) | |
148 | ); | |
149 | ||
150 | //////////////////////////////////////////////////////////////////////////////// | |
151 | // Mux in BIST data | |
152 | // NOTE: If timing is too tight, this mux could be removed. It would mean that | |
153 | // the bist engine doesn't have direct control over the parity bits. | |
154 | //////////////////////////////////////////////////////////////////////////////// | |
155 | ||
156 | lsu_dcp_dp_mux_macro__dmux_32x__mux_pgpe__ports_2__stack_16l__width_16 bist_pmux ( | |
157 | .din0 ({2{mbi_wdata[7:0]}}), | |
158 | .din1 (parity_e[15:0]), | |
159 | .sel0 (mbi_run), | |
160 | .dout (dcp_parity[15:0]) | |
161 | ); | |
162 | ||
163 | endmodule | |
164 | ||
165 | ||
166 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
167 | // also for pass-gate with decoder | |
168 | ||
169 | ||
170 | ||
171 | ||
172 | ||
173 | // any PARAMS parms go into naming of macro | |
174 | ||
175 | module lsu_dcp_dp_mux_macro__dmux_32x__mux_pgpe__ports_2__width_64 ( | |
176 | din0, | |
177 | din1, | |
178 | sel0, | |
179 | dout); | |
180 | wire psel0_unused; | |
181 | wire psel1; | |
182 | ||
183 | input [63:0] din0; | |
184 | input [63:0] din1; | |
185 | input sel0; | |
186 | output [63:0] dout; | |
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | cl_dp1_penc2_8x c0_0 ( | |
193 | .sel0(sel0), | |
194 | .psel0(psel0_unused), | |
195 | .psel1(psel1) | |
196 | ); | |
197 | ||
198 | mux2e #(64) d0_0 ( | |
199 | .sel(psel1), | |
200 | .in0(din0[63:0]), | |
201 | .in1(din1[63:0]), | |
202 | .dout(dout[63:0]) | |
203 | ); | |
204 | ||
205 | ||
206 | ||
207 | ||
208 | ||
209 | ||
210 | ||
211 | ||
212 | ||
213 | ||
214 | ||
215 | ||
216 | ||
217 | endmodule | |
218 | ||
219 | ||
220 | // | |
221 | // parity macro (even parity) | |
222 | // | |
223 | // | |
224 | ||
225 | ||
226 | ||
227 | ||
228 | ||
229 | module lsu_dcp_dp_prty_macro__width_8 ( | |
230 | din, | |
231 | dout); | |
232 | input [7:0] din; | |
233 | output dout; | |
234 | ||
235 | ||
236 | ||
237 | ||
238 | ||
239 | ||
240 | ||
241 | prty #(8) m0_0 ( | |
242 | .in(din[7:0]), | |
243 | .out(dout) | |
244 | ); | |
245 | ||
246 | ||
247 | ||
248 | ||
249 | ||
250 | ||
251 | ||
252 | ||
253 | ||
254 | ||
255 | endmodule | |
256 | ||
257 | ||
258 | ||
259 | ||
260 | ||
261 | // | |
262 | // xor macro for ports = 2,3 | |
263 | // | |
264 | // | |
265 | ||
266 | ||
267 | ||
268 | ||
269 | ||
270 | module lsu_dcp_dp_xor_macro__stack_16l__width_16 ( | |
271 | din0, | |
272 | din1, | |
273 | dout); | |
274 | input [15:0] din0; | |
275 | input [15:0] din1; | |
276 | output [15:0] dout; | |
277 | ||
278 | ||
279 | ||
280 | ||
281 | ||
282 | xor2 #(16) d0_0 ( | |
283 | .in0(din0[15:0]), | |
284 | .in1(din1[15:0]), | |
285 | .out(dout[15:0]) | |
286 | ); | |
287 | ||
288 | ||
289 | ||
290 | ||
291 | ||
292 | ||
293 | ||
294 | ||
295 | endmodule | |
296 | ||
297 | ||
298 | ||
299 | ||
300 | ||
301 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
302 | // also for pass-gate with decoder | |
303 | ||
304 | ||
305 | ||
306 | ||
307 | ||
308 | // any PARAMS parms go into naming of macro | |
309 | ||
310 | module lsu_dcp_dp_mux_macro__dmux_32x__mux_pgpe__ports_2__stack_16l__width_16 ( | |
311 | din0, | |
312 | din1, | |
313 | sel0, | |
314 | dout); | |
315 | wire psel0_unused; | |
316 | wire psel1; | |
317 | ||
318 | input [15:0] din0; | |
319 | input [15:0] din1; | |
320 | input sel0; | |
321 | output [15:0] dout; | |
322 | ||
323 | ||
324 | ||
325 | ||
326 | ||
327 | cl_dp1_penc2_8x c0_0 ( | |
328 | .sel0(sel0), | |
329 | .psel0(psel0_unused), | |
330 | .psel1(psel1) | |
331 | ); | |
332 | ||
333 | mux2e #(16) d0_0 ( | |
334 | .sel(psel1), | |
335 | .in0(din0[15:0]), | |
336 | .in1(din1[15:0]), | |
337 | .dout(dout[15:0]) | |
338 | ); | |
339 | ||
340 | ||
341 | ||
342 | ||
343 | ||
344 | ||
345 | ||
346 | ||
347 | ||
348 | ||
349 | ||
350 | ||
351 | ||
352 | endmodule | |
353 |