Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: pku_pkd_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 pku_pkd_dp ( | |
36 | dec_valid_d, | |
37 | dec_decode_d, | |
38 | swl_cancel_pick_p, | |
39 | pku_flush_buffer0, | |
40 | pku_raw_pick_p, | |
41 | pku_base_pick_p, | |
42 | pku_pick_p); | |
43 | wire [3:0] cancel_pick_p_; | |
44 | wire [3:0] flush_buffer0_; | |
45 | wire valid_d_; | |
46 | wire decode_cancel; | |
47 | wire [3:0] qraw_pick_; | |
48 | wire [3:0] qraw_pick; | |
49 | wire [3:0] early0; | |
50 | wire [3:0] base_pick_p_; | |
51 | wire [3:0] final_pick_p_; | |
52 | ||
53 | ||
54 | input dec_valid_d; // inst is valid at decode for relevant TG | |
55 | input dec_decode_d; // decoded inst at decode for relevant TG | |
56 | input [3:0] swl_cancel_pick_p; // cancel pick for thread i | |
57 | input [3:0] pku_flush_buffer0; // flush oldest instruction for thread i | |
58 | input [3:0] pku_raw_pick_p; // raw_pick | |
59 | ||
60 | output [3:0] pku_base_pick_p; | |
61 | output [3:0] pku_pick_p; | |
62 | ||
63 | ||
64 | // assign pku_base_pick_p[3:0] = ~swl_cancel_pick_p[3:0] & pku_raw_pick_p[3:0] & ~pku_flush_buffer0[3:0]; | |
65 | ||
66 | // assign pku_pick_p[3:0] = ~swl_cancel_pick_p[3:0] & ~{4{dec_valid_d & ~dec_decode_d}} & pku_raw_pick_p[3:0] & ~pku_flush_buffer0[3:0]; | |
67 | ||
68 | pku_pkd_dp_inv_macro__dinv_12x__width_4 inv00 ( | |
69 | .din(swl_cancel_pick_p[3:0]), | |
70 | .dout(cancel_pick_p_[3:0]) | |
71 | ); | |
72 | ||
73 | pku_pkd_dp_inv_macro__dinv_8x__width_4 inv01 ( | |
74 | .din(pku_flush_buffer0[3:0]), | |
75 | .dout(flush_buffer0_[3:0]) | |
76 | ); | |
77 | ||
78 | pku_pkd_dp_inv_macro__dinv_6x__width_1 inv02 ( | |
79 | .din(dec_valid_d), | |
80 | .dout(valid_d_) | |
81 | ); | |
82 | ||
83 | pku_pkd_dp_nor_macro__dnor_8x__ports_2__width_1 nor02 ( | |
84 | .din0(dec_decode_d), | |
85 | .din1(valid_d_), | |
86 | .dout(decode_cancel) | |
87 | ); | |
88 | ||
89 | pku_pkd_dp_nand_macro__dnand_12x__ports_2__width_4 nand03 ( | |
90 | .din0(pku_raw_pick_p[3:0]), | |
91 | .din1(flush_buffer0_[3:0]), | |
92 | .dout(qraw_pick_[3:0]) | |
93 | ); | |
94 | ||
95 | pku_pkd_dp_inv_macro__dinv_8x__width_4 inv05 ( | |
96 | .din(qraw_pick_[3:0]), | |
97 | .dout(qraw_pick[3:0]) | |
98 | ); | |
99 | ||
100 | pku_pkd_dp_nor_macro__dnor_12x__ports_2__width_4 nor01 ( | |
101 | .din0({4{decode_cancel}}), | |
102 | .din1(qraw_pick_[3:0]), | |
103 | .dout(early0[3:0]) | |
104 | ); | |
105 | ||
106 | ||
107 | pku_pkd_dp_nand_macro__dnand_12x__ports_2__width_4 nand01 ( | |
108 | .din0(cancel_pick_p_[3:0]), | |
109 | .din1(qraw_pick[3:0]), | |
110 | .dout(base_pick_p_[3:0]) | |
111 | ); | |
112 | ||
113 | ||
114 | pku_pkd_dp_inv_macro__dinv_28x__width_4 inv03 ( | |
115 | .din(base_pick_p_[3:0]), | |
116 | .dout(pku_base_pick_p[3:0]) | |
117 | ); | |
118 | ||
119 | ||
120 | pku_pkd_dp_nand_macro__dnand_20x__ports_2__width_4 nand02 ( | |
121 | .din0(cancel_pick_p_[3:0]), | |
122 | .din1(early0[3:0]), | |
123 | .dout(final_pick_p_[3:0]) | |
124 | ); | |
125 | ||
126 | ||
127 | pku_pkd_dp_inv_macro__dinv_56x__width_4 inv04 ( | |
128 | .din(final_pick_p_[3:0]), | |
129 | .dout(pku_pick_p[3:0]) | |
130 | ); | |
131 | ||
132 | endmodule | |
133 | ||
134 | ||
135 | // | |
136 | // invert macro | |
137 | // | |
138 | // | |
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | module pku_pkd_dp_inv_macro__dinv_12x__width_4 ( | |
145 | din, | |
146 | dout); | |
147 | input [3:0] din; | |
148 | output [3:0] dout; | |
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | ||
155 | inv #(4) d0_0 ( | |
156 | .in(din[3:0]), | |
157 | .out(dout[3:0]) | |
158 | ); | |
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 | ||
166 | ||
167 | ||
168 | endmodule | |
169 | ||
170 | ||
171 | ||
172 | ||
173 | ||
174 | // | |
175 | // invert macro | |
176 | // | |
177 | // | |
178 | ||
179 | ||
180 | ||
181 | ||
182 | ||
183 | module pku_pkd_dp_inv_macro__dinv_8x__width_4 ( | |
184 | din, | |
185 | dout); | |
186 | input [3:0] din; | |
187 | output [3:0] dout; | |
188 | ||
189 | ||
190 | ||
191 | ||
192 | ||
193 | ||
194 | inv #(4) d0_0 ( | |
195 | .in(din[3:0]), | |
196 | .out(dout[3:0]) | |
197 | ); | |
198 | ||
199 | ||
200 | ||
201 | ||
202 | ||
203 | ||
204 | ||
205 | ||
206 | ||
207 | endmodule | |
208 | ||
209 | ||
210 | ||
211 | ||
212 | ||
213 | // | |
214 | // invert macro | |
215 | // | |
216 | // | |
217 | ||
218 | ||
219 | ||
220 | ||
221 | ||
222 | module pku_pkd_dp_inv_macro__dinv_6x__width_1 ( | |
223 | din, | |
224 | dout); | |
225 | input [0:0] din; | |
226 | output [0:0] dout; | |
227 | ||
228 | ||
229 | ||
230 | ||
231 | ||
232 | ||
233 | inv #(1) d0_0 ( | |
234 | .in(din[0:0]), | |
235 | .out(dout[0:0]) | |
236 | ); | |
237 | ||
238 | ||
239 | ||
240 | ||
241 | ||
242 | ||
243 | ||
244 | ||
245 | ||
246 | endmodule | |
247 | ||
248 | ||
249 | ||
250 | ||
251 | ||
252 | // | |
253 | // nor macro for ports = 2,3 | |
254 | // | |
255 | // | |
256 | ||
257 | ||
258 | ||
259 | ||
260 | ||
261 | module pku_pkd_dp_nor_macro__dnor_8x__ports_2__width_1 ( | |
262 | din0, | |
263 | din1, | |
264 | dout); | |
265 | input [0:0] din0; | |
266 | input [0:0] din1; | |
267 | output [0:0] dout; | |
268 | ||
269 | ||
270 | ||
271 | ||
272 | ||
273 | ||
274 | nor2 #(1) d0_0 ( | |
275 | .in0(din0[0:0]), | |
276 | .in1(din1[0:0]), | |
277 | .out(dout[0:0]) | |
278 | ); | |
279 | ||
280 | ||
281 | ||
282 | ||
283 | ||
284 | ||
285 | ||
286 | endmodule | |
287 | ||
288 | ||
289 | ||
290 | ||
291 | ||
292 | // | |
293 | // nand macro for ports = 2,3,4 | |
294 | // | |
295 | // | |
296 | ||
297 | ||
298 | ||
299 | ||
300 | ||
301 | module pku_pkd_dp_nand_macro__dnand_12x__ports_2__width_4 ( | |
302 | din0, | |
303 | din1, | |
304 | dout); | |
305 | input [3:0] din0; | |
306 | input [3:0] din1; | |
307 | output [3:0] dout; | |
308 | ||
309 | ||
310 | ||
311 | ||
312 | ||
313 | ||
314 | nand2 #(4) d0_0 ( | |
315 | .in0(din0[3:0]), | |
316 | .in1(din1[3:0]), | |
317 | .out(dout[3:0]) | |
318 | ); | |
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | ||
325 | ||
326 | ||
327 | ||
328 | endmodule | |
329 | ||
330 | ||
331 | ||
332 | ||
333 | ||
334 | // | |
335 | // nor macro for ports = 2,3 | |
336 | // | |
337 | // | |
338 | ||
339 | ||
340 | ||
341 | ||
342 | ||
343 | module pku_pkd_dp_nor_macro__dnor_12x__ports_2__width_4 ( | |
344 | din0, | |
345 | din1, | |
346 | dout); | |
347 | input [3:0] din0; | |
348 | input [3:0] din1; | |
349 | output [3:0] dout; | |
350 | ||
351 | ||
352 | ||
353 | ||
354 | ||
355 | ||
356 | nor2 #(4) d0_0 ( | |
357 | .in0(din0[3:0]), | |
358 | .in1(din1[3:0]), | |
359 | .out(dout[3:0]) | |
360 | ); | |
361 | ||
362 | ||
363 | ||
364 | ||
365 | ||
366 | ||
367 | ||
368 | endmodule | |
369 | ||
370 | ||
371 | ||
372 | ||
373 | ||
374 | // | |
375 | // invert macro | |
376 | // | |
377 | // | |
378 | ||
379 | ||
380 | ||
381 | ||
382 | ||
383 | module pku_pkd_dp_inv_macro__dinv_28x__width_4 ( | |
384 | din, | |
385 | dout); | |
386 | input [3:0] din; | |
387 | output [3:0] dout; | |
388 | ||
389 | ||
390 | ||
391 | ||
392 | ||
393 | ||
394 | inv #(4) d0_0 ( | |
395 | .in(din[3:0]), | |
396 | .out(dout[3:0]) | |
397 | ); | |
398 | ||
399 | ||
400 | ||
401 | ||
402 | ||
403 | ||
404 | ||
405 | ||
406 | ||
407 | endmodule | |
408 | ||
409 | ||
410 | ||
411 | ||
412 | ||
413 | // | |
414 | // nand macro for ports = 2,3,4 | |
415 | // | |
416 | // | |
417 | ||
418 | ||
419 | ||
420 | ||
421 | ||
422 | module pku_pkd_dp_nand_macro__dnand_20x__ports_2__width_4 ( | |
423 | din0, | |
424 | din1, | |
425 | dout); | |
426 | input [3:0] din0; | |
427 | input [3:0] din1; | |
428 | output [3:0] dout; | |
429 | ||
430 | ||
431 | ||
432 | ||
433 | ||
434 | ||
435 | nand2 #(4) d0_0 ( | |
436 | .in0(din0[3:0]), | |
437 | .in1(din1[3:0]), | |
438 | .out(dout[3:0]) | |
439 | ); | |
440 | ||
441 | ||
442 | ||
443 | ||
444 | ||
445 | ||
446 | ||
447 | ||
448 | ||
449 | endmodule | |
450 | ||
451 | ||
452 | ||
453 | ||
454 | ||
455 | // | |
456 | // invert macro | |
457 | // | |
458 | // | |
459 | ||
460 | ||
461 | ||
462 | ||
463 | ||
464 | module pku_pkd_dp_inv_macro__dinv_56x__width_4 ( | |
465 | din, | |
466 | dout); | |
467 | input [3:0] din; | |
468 | output [3:0] dout; | |
469 | ||
470 | ||
471 | ||
472 | ||
473 | ||
474 | ||
475 | inv #(4) d0_0 ( | |
476 | .in(din[3:0]), | |
477 | .out(dout[3:0]) | |
478 | ); | |
479 | ||
480 | ||
481 | ||
482 | ||
483 | ||
484 | ||
485 | ||
486 | ||
487 | ||
488 | endmodule | |
489 | ||
490 | ||
491 | ||
492 |