-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpx_dp2.v
377 lines (321 loc) · 14.7 KB
/
cpx_dp2.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
// ========== Copyright Header Begin ==========================================
//
// OpenSPARC T1 Processor File: cpx_dp2.v
// Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
//
// The above named program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License version 2 as published by the Free Software Foundation.
//
// The above named program is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this work; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
// ========== Copyright Header End ============================================
////////////////////////////////////////////////////////////////////////
/*
// Description: datapath portion of CPX
*/
////////////////////////////////////////////////////////////////////////
// Global header file includes
////////////////////////////////////////////////////////////////////////
`include "sys.h" // system level definition file which contains the
// time scale definition
`include "iop.h"
////////////////////////////////////////////////////////////////////////
// Local header file includes / local defines
////////////////////////////////////////////////////////////////////////
module cpx_dp2(/*AUTOARG*/
// Outputs
scan_out, cpx_spc2_data_cx_l,
// Inputs
shiftenable, scan_in, rclk, arbcp2_cpxdp_shift_cx,
arbcp2_cpxdp_qsel1_ca, arbcp2_cpxdp_qsel0_ca,
arbcp2_cpxdp_q0_hold_ca, arbcp2_cpxdp_grant_ca,
scache0_cpx_data_ca, scache1_cpx_data_ca, scache2_cpx_data_ca,
scache3_cpx_data_ca, io_cpx_data_ca, fp_cpx_data_ca
);
/*AUTOOUTPUT*/
// Beginning of automatic outputs (from unused autoinst outputs)
output [7:0] scan_out; // From mac0 of cpx_dp_maca_r.v, ...
// End of automatics
output [`CPX_WIDTH-1:0] cpx_spc2_data_cx_l;
/*AUTOINPUT*/
// Beginning of automatic inputs (from unused autoinst inputs)
input [5:0] arbcp2_cpxdp_grant_ca; // To mac0 of cpx_dp_maca_r.v, ...
input [5:0] arbcp2_cpxdp_q0_hold_ca;// To mac0 of cpx_dp_maca_r.v, ...
input [5:0] arbcp2_cpxdp_qsel0_ca; // To mac0 of cpx_dp_maca_r.v, ...
input [5:0] arbcp2_cpxdp_qsel1_ca; // To mac0 of cpx_dp_maca_r.v, ...
input [5:0] arbcp2_cpxdp_shift_cx; // To mac0 of cpx_dp_maca_r.v, ...
input rclk; // To mac0 of cpx_dp_maca_r.v, ...
input [7:0] scan_in; // To mac0 of cpx_dp_maca_r.v, ...
input shiftenable; // To mac7 of cpx_dp_maca_l.v
// End of automatics
input [`CPX_WIDTH-1:0] scache0_cpx_data_ca;
input [`CPX_WIDTH-1:0] scache1_cpx_data_ca;
input [`CPX_WIDTH-1:0] scache2_cpx_data_ca;
input [`CPX_WIDTH-1:0] scache3_cpx_data_ca;
input [`CPX_WIDTH-1:0] io_cpx_data_ca;
input [`CPX_WIDTH-1:0] fp_cpx_data_ca;
/*AUTOWIRE*/
// Beginning of automatic wires (for undeclared instantiated-module outputs)
wire [149:0] cpx_col0_data_cx_l; // From mac0 of cpx_dp_maca_r.v
wire [149:0] cpx_col3_data_cx_l; // From mac3 of cpx_dp_macb_l.v
wire [149:0] cpx_col4_data_cx_l; // From mac4 of cpx_dp_macb_l.v
wire [149:0] cpx_col6_data_cx_l; // From mac6 of cpx_dp_macb_l.v
wire [149:0] cpx_col7_data_cx_l; // From mac7 of cpx_dp_maca_l.v
wire [7:1] shiftenable_buf; // From mac1 of cpx_dp_macc_r.v, ...
// End of automatics
wire [4:0] unused;
wire tied_hi, tied_low;
assign tied_low = 1'b0;
assign tied_hi = 1'b1;
/* assign cpx_spc_data_cx_l[149:0] =(cpx_dest0_data_cx_l[149:0] |
cpx_dest1_data_cx_l[149:0] |
cpx_dest2_data_cx_l[149:0] |
cpx_dest3_data_cx_l[149:0] |
cpx_dest4_data_cx_l[149:0] |
cpx_dest5_data_cx_l[149:0]);
*/
/*
// DATAPATH ORGANISATION(cpx_dp2)
NEW:
to sparc2 cx2 flops
^
|
mac0 -> macc ->---> <- mac3 <- mac4 <----- <- mac6 <- mac7
a cr bl bl bl a
^ ^ ^ ^ ^ ^
| | | | | |
sctag0 sctag1 io sctag2 sctag3 fp
OLD:
to sparc2 cx2 flops
^
|
mac0 -> mac1 ->mac2 <- mac3 <- mac4 <----- <- mac6 <- mac7
a b c b b b a
^ ^ ^ ^ ^ ^
| | | | | |
sctag0 fp sctag1 sctag2 io sctag3
*/
/*
cpx_dp_maca_r AUTO_TEMPLATE(
// Outputs
.data_out_cx_l (cpx_col@_data_cx_l[149:0]),
.shiftenable_buf (),
// Inputs
.src_cpx_data_ca({5'b00000,scache@_cpx_data_ca[`CPX_WIDTH-1:0]}),
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[@]),
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[@]),
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[@]),
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[@]),
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[@]),
.clk (clk),
//.tmb_l (tmb_l),
.scan_in (scan_in[@]),
.scan_out (scan_out[@]),
.shiftenable (shiftenable_buf[@"(+ @ 1)"]));
*/
cpx_dp_maca_r mac0(/*AUTOINST*/
// Outputs
.data_out_cx_l (cpx_col0_data_cx_l[149:0]), // Templated
.scan_out (scan_out[0]), // Templated
.shiftenable_buf (), // Templated
// Inputs
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[0]), // Templated
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[0]), // Templated
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[0]), // Templated
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[0]), // Templated
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[0]), // Templated
.src_cpx_data_ca ({5'b00000,scache0_cpx_data_ca[`CPX_WIDTH-1:0]}), // Templated
.rclk (rclk),
.scan_in (scan_in[0]), // Templated
.shiftenable (shiftenable_buf[1])); // Templated
/*
cpx_dp_macc_r AUTO_TEMPLATE(
// Outputs
.data_out_cx_l ({unused[4:0],cpx_spc@"(+ @ 1)"_data_cx_l[`CPX_WIDTH-1:0]}),
.shiftenable_buf (shiftenable_buf[@]),
// .data_out_cx_l (cpx_col@_data_cx_l[149:0]),
// Inputs
.src_cpx_data_ca({5'b00000,scache@_cpx_data_ca[`CPX_WIDTH-1:0]}),
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[@]),
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[@]),
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[@]),
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[@]),
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[@]),
.data_crit_cx_l(cpx_col@"(+ @ 2)"_data_cx_l[149:0]),
.data_ncrit_cx_l(cpx_col@"(- @ 1)"_data_cx_l[149:0]),
.clk (clk),
//.tmb_l (tmb_l),
.scan_in (scan_in[@]),
.scan_out (scan_out[@]),
.shiftenable (shiftenable_buf[@"(+ @ 2)"]));
*/
cpx_dp_macc_r mac1(/*AUTOINST*/
// Outputs
.data_out_cx_l ({unused[4:0],cpx_spc2_data_cx_l[`CPX_WIDTH-1:0]}), // Templated
.scan_out (scan_out[1]), // Templated
.shiftenable_buf (shiftenable_buf[1]), // Templated
// Inputs
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[1]), // Templated
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[1]), // Templated
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[1]), // Templated
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[1]), // Templated
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[1]), // Templated
.src_cpx_data_ca ({5'b00000,scache1_cpx_data_ca[`CPX_WIDTH-1:0]}), // Templated
.data_crit_cx_l (cpx_col3_data_cx_l[149:0]), // Templated
.data_ncrit_cx_l (cpx_col0_data_cx_l[149:0]), // Templated
.rclk (rclk),
.scan_in (scan_in[1]), // Templated
.shiftenable (shiftenable_buf[3])); // Templated
/*
cpx_dp_macb_l AUTO_TEMPLATE(
// Outputs
.data_out_cx_l (cpx_col@_data_cx_l[149:0]),
.shiftenable_buf (shiftenable_buf[@]),
// Inputs
.src_cpx_data_ca({5'b00000,io_cpx_data_ca[`CPX_WIDTH-1:0]}),
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[@"(+ @ 1)"]),
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[@"(+ @ 1)"]),
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[@"(+ @ 1)"]),
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[@"(+ @ 1)"]),
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[@"(+ @ 1)"]),
.data_prev_cx_l(cpx_col@"(+ @ 1)"_data_cx_l[149:0]),
.clk (clk),
//.tmb_l (tmb_l),
.scan_in (scan_in[@]),
.scan_out (scan_out[@]),
.shiftenable (shiftenable_buf[@"(+ @ 1)"]));
*/
cpx_dp_macb_l mac3(/*AUTOINST*/
// Outputs
.data_out_cx_l (cpx_col3_data_cx_l[149:0]), // Templated
.scan_out (scan_out[3]), // Templated
.shiftenable_buf (shiftenable_buf[3]), // Templated
// Inputs
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[4]), // Templated
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[4]), // Templated
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[4]), // Templated
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[4]), // Templated
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[4]), // Templated
.src_cpx_data_ca ({5'b00000,io_cpx_data_ca[`CPX_WIDTH-1:0]}), // Templated
.data_prev_cx_l (cpx_col4_data_cx_l[149:0]), // Templated
.rclk (rclk),
.scan_in (scan_in[3]), // Templated
.shiftenable (shiftenable_buf[4])); // Templated
/*
cpx_dp_macb_l AUTO_TEMPLATE(
// Outputs
.data_out_cx_l (cpx_col@_data_cx_l[149:0]),
.shiftenable_buf (shiftenable_buf[@]),
// Inputs
.src_cpx_data_ca({5'b00000,scache@"(- @ 2)"_cpx_data_ca[`CPX_WIDTH-1:0]}),
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[@"(- @ 2)"]),
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[@"(- @ 2)"]),
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[@"(- @ 2)"]),
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[@"(- @ 2)"]),
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[@"(- @ 2)"]),
.data_prev_cx_l(cpx_col@"(+ @ 2)"_data_cx_l[149:0]),
.clk (clk),
//.tmb_l (tmb_l),
.scan_in (scan_in[@]),
.scan_out (scan_out[@]),
.shiftenable (shiftenable_buf[@"(+ @ 2)"]));
*/
cpx_dp_macb_l mac4(/*AUTOINST*/
// Outputs
.data_out_cx_l (cpx_col4_data_cx_l[149:0]), // Templated
.scan_out (scan_out[4]), // Templated
.shiftenable_buf (shiftenable_buf[4]), // Templated
// Inputs
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[2]), // Templated
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[2]), // Templated
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[2]), // Templated
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[2]), // Templated
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[2]), // Templated
.src_cpx_data_ca ({5'b00000,scache2_cpx_data_ca[`CPX_WIDTH-1:0]}), // Templated
.data_prev_cx_l (cpx_col6_data_cx_l[149:0]), // Templated
.rclk (rclk),
.scan_in (scan_in[4]), // Templated
.shiftenable (shiftenable_buf[6])); // Templated
/*
cpx_dp_macb_l AUTO_TEMPLATE(
// Outputs
.data_out_cx_l (cpx_col@_data_cx_l[149:0]),
.shiftenable_buf (shiftenable_buf[@]),
// Inputs
.src_cpx_data_ca({5'b00000,scache@"(- @ 3)"_cpx_data_ca[`CPX_WIDTH-1:0]}),
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[@"(- @ 3)"]),
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[@"(- @ 3)"]),
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[@"(- @ 3)"]),
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[@"(- @ 3)"]),
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[@"(- @ 3)"]),
.data_prev_cx_l(cpx_col@"(+ @ 1)"_data_cx_l[149:0]),
.clk (clk),
//.tmb_l (tmb_l),
.scan_in (scan_in[@]),
.scan_out (scan_out[@]),
.shiftenable (shiftenable_buf[@"(+ @ 1)"]));
*/
cpx_dp_macb_l mac6(/*AUTOINST*/
// Outputs
.data_out_cx_l (cpx_col6_data_cx_l[149:0]), // Templated
.scan_out (scan_out[6]), // Templated
.shiftenable_buf (shiftenable_buf[6]), // Templated
// Inputs
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[3]), // Templated
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[3]), // Templated
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[3]), // Templated
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[3]), // Templated
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[3]), // Templated
.src_cpx_data_ca ({5'b00000,scache3_cpx_data_ca[`CPX_WIDTH-1:0]}), // Templated
.data_prev_cx_l (cpx_col7_data_cx_l[149:0]), // Templated
.rclk (rclk),
.scan_in (scan_in[6]), // Templated
.shiftenable (shiftenable_buf[7])); // Templated
/*
cpx_dp_maca_l AUTO_TEMPLATE(
// Outputs
.data_out_cx_l (cpx_col@_data_cx_l[149:0]),
.shiftenable_buf (shiftenable_buf[@]),
// Inputs
.src_cpx_data_ca({5'b00000,fp_cpx_data_ca[`CPX_WIDTH-1:0]}),
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[@"(- @ 2)"]),
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[@"(- @ 2)"]),
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[@"(- @ 2)"]),
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[@"(- @ 2)"]),
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[@"(- @ 2)"]),
.clk (clk),
//.tmb_l (tmb_l),
.scan_in (scan_in[@]),
.scan_out (scan_out[@]),
.shiftenable (shiftenable));
*/
cpx_dp_maca_l mac7(/*AUTOINST*/
// Outputs
.data_out_cx_l (cpx_col7_data_cx_l[149:0]), // Templated
.scan_out (scan_out[7]), // Templated
.shiftenable_buf (shiftenable_buf[7]), // Templated
// Inputs
.arb_cpxdp_qsel1_ca(arbcp2_cpxdp_qsel1_ca[5]), // Templated
.arb_cpxdp_qsel0_ca(arbcp2_cpxdp_qsel0_ca[5]), // Templated
.arb_cpxdp_grant_ca(arbcp2_cpxdp_grant_ca[5]), // Templated
.arb_cpxdp_shift_cx(arbcp2_cpxdp_shift_cx[5]), // Templated
.arb_cpxdp_q0_hold_ca(arbcp2_cpxdp_q0_hold_ca[5]), // Templated
.src_cpx_data_ca ({5'b00000,fp_cpx_data_ca[`CPX_WIDTH-1:0]}), // Templated
.rclk (rclk),
.scan_in (scan_in[7]), // Templated
.shiftenable (shiftenable)); // Templated
// Code start here
//
// Local Variables:
// verilog-library-directories:("." "../../../../../common/rtl")
// End:
endmodule