Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: fgu_fic_ctl.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 fgu_fic_ctl ( | |
36 | fpf_rs2_cmp_din_fx1, | |
37 | fpf_ma_sum_fx4, | |
38 | fpf_man_se_byte_fx3_b38_32, | |
39 | fpf_man_se_byte_fx3_b6_0, | |
40 | fic_norm_eadj_fx5, | |
41 | fic_i2f_align_sel_fx2, | |
42 | fpe_align_sel_fx2, | |
43 | fic_i2f_eadj_fx2, | |
44 | fpc_lzd_override_fx4, | |
45 | fpc_sp_source_fx3, | |
46 | fic_mulscc_iccz_fx4, | |
47 | fic_mulscc_xccz_fx4, | |
48 | fic_convert_sticky_fx4, | |
49 | fic_fxtod_sticky_fx4, | |
50 | fic_ftoi_nx_fx4, | |
51 | fic_ftox_nx_fx4, | |
52 | fic_bzf31msb_fx2, | |
53 | fic_bzf32lsb_fx2, | |
54 | fic_bof22msb_fx2, | |
55 | main_clken, | |
56 | l2clk, | |
57 | scan_in, | |
58 | tcu_pce_ov, | |
59 | spc_aclk, | |
60 | spc_bclk, | |
61 | tcu_scan_en, | |
62 | scan_out); | |
63 | wire pce_ov; | |
64 | wire stop; | |
65 | wire siclk; | |
66 | wire soclk; | |
67 | wire se; | |
68 | wire l1clk_pm1; | |
69 | wire spares_scanin; | |
70 | wire spares_scanout; | |
71 | wire bzf31msb_fx1; | |
72 | wire bzf32lsb_fx1; | |
73 | wire bof22msb_fx1; | |
74 | wire [7:2] dpint_nx_byte_fx1; | |
75 | wire [7:6] spint_nx_byte_fx1; | |
76 | wire [63:1] dini; | |
77 | wire [6:0] ibyte_sel; | |
78 | wire ib0_nor_76; | |
79 | wire ib0_nor_54; | |
80 | wire ib0_zeroh_l; | |
81 | wire [1:0] ib0_cnth; | |
82 | wire [1:0] ib0_cntl; | |
83 | wire [2:0] eadj_ibyte0; | |
84 | wire ib1_nor_76; | |
85 | wire ib1_nor_54; | |
86 | wire ib1_zeroh_l; | |
87 | wire [1:0] ib1_cnth; | |
88 | wire [1:0] ib1_cntl; | |
89 | wire [2:0] eadj_ibyte1; | |
90 | wire ib2_nor_76; | |
91 | wire ib2_nor_54; | |
92 | wire ib2_zeroh_l; | |
93 | wire [1:0] ib2_cnth; | |
94 | wire [1:0] ib2_cntl; | |
95 | wire [2:0] eadj_ibyte2; | |
96 | wire ib3_nor_76; | |
97 | wire ib3_nor_54; | |
98 | wire ib3_zeroh_l; | |
99 | wire [1:0] ib3_cnth; | |
100 | wire [1:0] ib3_cntl; | |
101 | wire [2:0] eadj_ibyte3; | |
102 | wire ib4_nor_76; | |
103 | wire ib4_nor_54; | |
104 | wire ib4_zeroh_l; | |
105 | wire [1:0] ib4_cnth; | |
106 | wire [1:0] ib4_cntl; | |
107 | wire [2:0] eadj_ibyte4; | |
108 | wire ib5_nor_76; | |
109 | wire ib5_nor_54; | |
110 | wire ib5_zeroh_l; | |
111 | wire [1:0] ib5_cnth; | |
112 | wire [1:0] ib5_cntl; | |
113 | wire [2:0] eadj_ibyte5; | |
114 | wire ib6_nor_76; | |
115 | wire ib6_nor_54; | |
116 | wire ib6_zeroh_l; | |
117 | wire [1:0] ib6_cnth; | |
118 | wire [1:0] ib6_cntl; | |
119 | wire [2:0] eadj_ibyte6; | |
120 | wire ib7_nor_76; | |
121 | wire ib7_nor_54; | |
122 | wire ib7_zeroh_l; | |
123 | wire [1:0] ib7_cnth; | |
124 | wire [1:0] ib7_cntl; | |
125 | wire [2:0] eadj_ibyte7; | |
126 | wire [7:0] i2f_eadj_sel_fx1; | |
127 | wire fx2_00_scanin; | |
128 | wire fx2_00_scanout; | |
129 | wire [7:2] dpint_nx_byte_fx2; | |
130 | wire [7:6] spint_nx_byte_fx2; | |
131 | wire [7:0] i2f_eadj_sel_fx2; | |
132 | wire [2:0] eadj_ibyte0_fx2; | |
133 | wire [2:0] eadj_ibyte1_fx2; | |
134 | wire [2:0] eadj_ibyte2_fx2; | |
135 | wire [2:0] eadj_ibyte3_fx2; | |
136 | wire [2:0] eadj_ibyte4_fx2; | |
137 | wire [2:0] eadj_ibyte5_fx2; | |
138 | wire [2:0] eadj_ibyte6_fx2; | |
139 | wire [2:0] eadj_ibyte7_fx2; | |
140 | wire fx3_00_scanin; | |
141 | wire fx3_00_scanout; | |
142 | wire [5:0] align_sel_fx3; | |
143 | wire [7:2] dpint_nx_byte_fx3; | |
144 | wire [7:6] spint_nx_byte_fx3; | |
145 | wire fstoi_nx_byte_fx3; | |
146 | wire fstox_nx_byte_fx3; | |
147 | wire fdtoi_nx_byte_fx3; | |
148 | wire fdtox_nx_byte_fx3; | |
149 | wire ftox_nx_bit_fx3; | |
150 | wire ftoi_nx_bit_fx3; | |
151 | wire ftoi_nx_fx3; | |
152 | wire ftox_nx_fx3; | |
153 | wire fx4_00_scanin; | |
154 | wire fx4_00_scanout; | |
155 | wire [63:11] dina; | |
156 | wire shift_00; | |
157 | wire [6:0] nbyte_sel; | |
158 | wire ab0_nor_76; | |
159 | wire ab0_nor_54; | |
160 | wire ab0_zeroh_l; | |
161 | wire [1:0] ab0_cnth; | |
162 | wire [1:0] ab0_cntl; | |
163 | wire [2:0] eadj_nbyte0; | |
164 | wire ab1_nor_76; | |
165 | wire ab1_nor_54; | |
166 | wire ab1_zeroh_l; | |
167 | wire [1:0] ab1_cnth; | |
168 | wire [1:0] ab1_cntl; | |
169 | wire [2:0] eadj_nbyte1; | |
170 | wire ab2_nor_76; | |
171 | wire ab2_nor_54; | |
172 | wire ab2_zeroh_l; | |
173 | wire [1:0] ab2_cnth; | |
174 | wire [1:0] ab2_cntl; | |
175 | wire [2:0] eadj_nbyte2; | |
176 | wire ab3_nor_76; | |
177 | wire ab3_nor_54; | |
178 | wire ab3_zeroh_l; | |
179 | wire [1:0] ab3_cnth; | |
180 | wire [1:0] ab3_cntl; | |
181 | wire [2:0] eadj_nbyte3; | |
182 | wire ab4_nor_76; | |
183 | wire ab4_nor_54; | |
184 | wire ab4_zeroh_l; | |
185 | wire [1:0] ab4_cnth; | |
186 | wire [1:0] ab4_cntl; | |
187 | wire [2:0] eadj_nbyte4; | |
188 | wire ab5_nor_76; | |
189 | wire ab5_nor_54; | |
190 | wire ab5_zeroh_l; | |
191 | wire [1:0] ab5_cnth; | |
192 | wire [1:0] ab5_cntl; | |
193 | wire [2:0] eadj_nbyte5; | |
194 | wire ab6_nor_76; | |
195 | wire ab6_nor_54; | |
196 | wire ab6_zeroh_l; | |
197 | wire [1:0] ab6_cnth; | |
198 | wire [0:0] ab6_cntl; | |
199 | wire [2:0] eadj_nbyte6; | |
200 | wire [5:0] norm_eadj_fx4; | |
201 | wire fx5_00_scanin; | |
202 | wire fx5_00_scanout; | |
203 | ||
204 | ||
205 | ||
206 | // ---------------------------------------------------------------------------- | |
207 | // Interface with FPF | |
208 | // ---------------------------------------------------------------------------- | |
209 | ||
210 | input [63:0] fpf_rs2_cmp_din_fx1; // rt. justified rs2 for FiTO(s,d) | |
211 | input [63:0] fpf_ma_sum_fx4; | |
212 | input [38:32] fpf_man_se_byte_fx3_b38_32; | |
213 | input [6:0] fpf_man_se_byte_fx3_b6_0; | |
214 | output [5:0] fic_norm_eadj_fx5; | |
215 | output [5:0] fic_i2f_align_sel_fx2; | |
216 | ||
217 | // ---------------------------------------------------------------------------- | |
218 | // Interface with FPE | |
219 | // ---------------------------------------------------------------------------- | |
220 | ||
221 | input [5:0] fpe_align_sel_fx2; | |
222 | output [5:0] fic_i2f_eadj_fx2; | |
223 | ||
224 | // ---------------------------------------------------------------------------- | |
225 | // Interface with FPC | |
226 | // ---------------------------------------------------------------------------- | |
227 | ||
228 | input fpc_lzd_override_fx4; | |
229 | input fpc_sp_source_fx3; | |
230 | output fic_mulscc_iccz_fx4; | |
231 | output fic_mulscc_xccz_fx4; | |
232 | output fic_convert_sticky_fx4; // sticky for FxTOs, FiTOs, FdTOs | |
233 | output fic_fxtod_sticky_fx4; // sticky for FxTOd | |
234 | output fic_ftoi_nx_fx4; // inexact for FsTOi, FdTOi | |
235 | output fic_ftox_nx_fx4; // inexact for FsTOx, FdTOx | |
236 | output fic_bzf31msb_fx2; // rs2 frac 31 MSBs all zeros | |
237 | output fic_bzf32lsb_fx2; // rs2 frac 32 LSBs all zeros | |
238 | output fic_bof22msb_fx2; // rs2 frac 22 MSBs all ones | |
239 | ||
240 | // ---------------------------------------------------------------------------- | |
241 | // Interface with FAC | |
242 | // ---------------------------------------------------------------------------- | |
243 | ||
244 | input main_clken; // main clken | |
245 | ||
246 | // ---------------------------------------------------------------------------- | |
247 | // Global Signals | |
248 | // ---------------------------------------------------------------------------- | |
249 | ||
250 | input l2clk; // clock input | |
251 | input scan_in; | |
252 | input tcu_pce_ov; // scan signals | |
253 | input spc_aclk; | |
254 | input spc_bclk; | |
255 | input tcu_scan_en; | |
256 | output scan_out; | |
257 | ||
258 | // scan renames | |
259 | assign pce_ov = tcu_pce_ov; | |
260 | assign stop = 1'b0; | |
261 | assign siclk = spc_aclk; | |
262 | assign soclk = spc_bclk; | |
263 | assign se = tcu_scan_en; | |
264 | // end scan | |
265 | ||
266 | ||
267 | fgu_fic_ctl_l1clkhdr_ctl_macro clkgen_main ( | |
268 | .l2clk(l2clk), | |
269 | .l1en (main_clken), | |
270 | .l1clk(l1clk_pm1), | |
271 | .pce_ov(pce_ov), | |
272 | .stop(stop), | |
273 | .se(se) | |
274 | ); | |
275 | ||
276 | fgu_fic_ctl_spare_ctl_macro__num_2 spares ( // spares: 13 gates + 1 flop for each "num" | |
277 | .scan_in(spares_scanin), | |
278 | .scan_out(spares_scanout), | |
279 | .l1clk(l1clk_pm1), | |
280 | .siclk(siclk), | |
281 | .soclk(soclk) | |
282 | ); | |
283 | ||
284 | ||
285 | // ---------------------------------------------------------------------------- | |
286 | // FX1 stage | |
287 | // ---------------------------------------------------------------------------- | |
288 | ||
289 | // required for FdTOi large_maxint_result calculation | |
290 | assign bzf31msb_fx1 = ~(|fpf_rs2_cmp_din_fx1[51:21]); // frac 31 MSBs all zeros | |
291 | ||
292 | // required for FiTO(s,d) zero_src_result calculation | |
293 | // fpf_rs2_cmp_din_fx1 is rt. justified for FiTO(s,d) | |
294 | // fpf_bzf_fx1 doesn't work for FiTO(s,d) zero detection because 32 LSBs are unknown | |
295 | assign bzf32lsb_fx1 = ~(|fpf_rs2_cmp_din_fx1[31:0]); // int32 all zeros | |
296 | ||
297 | // required for FdTOs denorm round to norm detection | |
298 | assign bof22msb_fx1 = &fpf_rs2_cmp_din_fx1[51:30]; // frac 22 MSBs all ones | |
299 | ||
300 | // ------------------------------------ | |
301 | // F(s,d)TO(i,x) inexact detection (byte) | |
302 | // ------------------------------------ | |
303 | ||
304 | assign dpint_nx_byte_fx1[7] = |fpf_rs2_cmp_din_fx1[44:37]; | |
305 | assign dpint_nx_byte_fx1[6] = |fpf_rs2_cmp_din_fx1[36:29]; | |
306 | assign dpint_nx_byte_fx1[5] = |fpf_rs2_cmp_din_fx1[28:21]; | |
307 | assign dpint_nx_byte_fx1[4] = |fpf_rs2_cmp_din_fx1[20:13]; | |
308 | assign dpint_nx_byte_fx1[3] = |fpf_rs2_cmp_din_fx1[12:5]; | |
309 | assign dpint_nx_byte_fx1[2] = |fpf_rs2_cmp_din_fx1[4:0]; | |
310 | ||
311 | assign spint_nx_byte_fx1[7] = |fpf_rs2_cmp_din_fx1[47:40]; | |
312 | assign spint_nx_byte_fx1[6] = |fpf_rs2_cmp_din_fx1[39:32]; | |
313 | ||
314 | // ------------------------------------ | |
315 | // i2f LZD "XOR function" | |
316 | // Convert negative signed integer source | |
317 | // to sign-magnitude value | |
318 | // ------------------------------------ | |
319 | ||
320 | assign dini[63:1] = fpf_rs2_cmp_din_fx1[63:1] ^ {63{fpf_rs2_cmp_din_fx1[63]}}; | |
321 | ||
322 | // ------------------------------------ | |
323 | // i2f LZD Byte selects (not priority encoded) | |
324 | // ------------------------------------ | |
325 | ||
326 | assign ibyte_sel[0] = |dini[63:56]; // shift 00-bits | |
327 | assign ibyte_sel[1] = |dini[55:48]; // shift 08-bits | |
328 | assign ibyte_sel[2] = |dini[47:40]; // shift 16-bits | |
329 | assign ibyte_sel[3] = |dini[39:32]; // shift 24-bits | |
330 | assign ibyte_sel[4] = |dini[31:24]; // shift 32-bits | |
331 | assign ibyte_sel[5] = |dini[23:16]; // shift 40-bits | |
332 | assign ibyte_sel[6] = |dini[15:8]; // shift 48-bits | |
333 | ||
334 | // ------------------------------------ | |
335 | // i2f LZD Eadj[2:0] | |
336 | // | |
337 | // - count leading zeros in a given byte | |
338 | // and encode into a 3-bit value (Eadj[2:0]) | |
339 | // | |
340 | // Bit shift: [4] [2] [1] | |
341 | // Eadj bit: [2] [1] [0] | |
342 | // --------------------------- | |
343 | // 0 0 0 | |
344 | // 0 0 1 | |
345 | // 0 1 0 | |
346 | // 0 1 1 | |
347 | // 1 0 0 | |
348 | // 1 0 1 | |
349 | // 1 1 0 | |
350 | // 1 1 1 | |
351 | // | |
352 | // din[7:0] | Eadj[2:0] | |
353 | // -----------------|------------ | |
354 | // 1 x x x x x x x | 0 0 0 | |
355 | // 0 1 x x x x x x | 0 0 1 | |
356 | // 0 0 1 x x x x x | 0 1 0 | |
357 | // 0 0 0 1 x x x x | 0 1 1 | |
358 | // 0 0 0 0 1 x x x | 1 0 0 | |
359 | // 0 0 0 0 0 1 x x | 1 0 1 | |
360 | // 0 0 0 0 0 0 1 x | 1 1 0 | |
361 | // 0 0 0 0 0 0 0 x | 1 1 1 | |
362 | // | |
363 | // Note: force Eadj[2:0] to 3'b111 | |
364 | // if din[7:1]==7'b0000000 (i.e. assume din[0]==1'b1) | |
365 | // This has already been done for byte0-byte7 below. | |
366 | // | |
367 | // ------------------------------------ | |
368 | ||
369 | // ---------------------------------------------------------------------------- | |
370 | // i2f LZD dini byte0 => dini[63:56] | |
371 | // assume dini[56] == 1'b1 | |
372 | // ---------------------------------------------------------------------------- | |
373 | ||
374 | assign ib0_nor_76 = ~(dini[63] | dini[62]); | |
375 | assign ib0_nor_54 = ~(dini[61] | dini[60]); | |
376 | ||
377 | assign ib0_zeroh_l = ~(ib0_nor_76 & ib0_nor_54); | |
378 | ||
379 | assign ib0_cnth[0] = (~dini[63] & dini[62] ) | | |
380 | (~dini[63] & ~dini[61] & dini[60]) ; | |
381 | assign ib0_cnth[1] = (~dini[63] & ~dini[62] & dini[61] ) | | |
382 | (~dini[63] & ~dini[62] & dini[60]) ; | |
383 | assign ib0_cntl[0] = (~dini[59] & dini[58] ) | | |
384 | (~dini[59] & ~dini[57] ) ; | |
385 | assign ib0_cntl[1] = (~dini[59] & ~dini[58] & dini[57] ) | | |
386 | (~dini[59] & ~dini[58] ) ; | |
387 | ||
388 | assign eadj_ibyte0[0] = ( ib0_zeroh_l & ib0_cnth[0]) | | |
389 | (~ib0_zeroh_l & ib0_cntl[0]) ; | |
390 | assign eadj_ibyte0[1] = ( ib0_zeroh_l & ib0_cnth[1]) | | |
391 | (~ib0_zeroh_l & ib0_cntl[1]) ; | |
392 | assign eadj_ibyte0[2] = ~ib0_zeroh_l ; | |
393 | ||
394 | // ---------------------------------------------------------------------------- | |
395 | // i2f LZD dini byte1 => dini[55:48] | |
396 | // assume dini[48] == 1'b1 | |
397 | // ---------------------------------------------------------------------------- | |
398 | ||
399 | assign ib1_nor_76 = ~(dini[55] | dini[54]); | |
400 | assign ib1_nor_54 = ~(dini[53] | dini[52]); | |
401 | ||
402 | assign ib1_zeroh_l = ~(ib1_nor_76 & ib1_nor_54); | |
403 | ||
404 | assign ib1_cnth[0] = (~dini[55] & dini[54] ) | | |
405 | (~dini[55] & ~dini[53] & dini[52]) ; | |
406 | assign ib1_cnth[1] = (~dini[55] & ~dini[54] & dini[53] ) | | |
407 | (~dini[55] & ~dini[54] & dini[52]) ; | |
408 | assign ib1_cntl[0] = (~dini[51] & dini[50] ) | | |
409 | (~dini[51] & ~dini[49] ) ; | |
410 | assign ib1_cntl[1] = (~dini[51] & ~dini[50] & dini[49] ) | | |
411 | (~dini[51] & ~dini[50] ) ; | |
412 | ||
413 | assign eadj_ibyte1[0] = ( ib1_zeroh_l & ib1_cnth[0]) | | |
414 | (~ib1_zeroh_l & ib1_cntl[0]) ; | |
415 | assign eadj_ibyte1[1] = ( ib1_zeroh_l & ib1_cnth[1]) | | |
416 | (~ib1_zeroh_l & ib1_cntl[1]) ; | |
417 | assign eadj_ibyte1[2] = ~ib1_zeroh_l ; | |
418 | ||
419 | // ---------------------------------------------------------------------------- | |
420 | // i2f LZD dini byte2 => dini[47:40] | |
421 | // assume dini[40] == 1'b1 | |
422 | // ---------------------------------------------------------------------------- | |
423 | ||
424 | assign ib2_nor_76 = ~(dini[47] | dini[46]); | |
425 | assign ib2_nor_54 = ~(dini[45] | dini[44]); | |
426 | ||
427 | assign ib2_zeroh_l = ~(ib2_nor_76 & ib2_nor_54); | |
428 | ||
429 | assign ib2_cnth[0] = (~dini[47] & dini[46] ) | | |
430 | (~dini[47] & ~dini[45] & dini[44]) ; | |
431 | assign ib2_cnth[1] = (~dini[47] & ~dini[46] & dini[45] ) | | |
432 | (~dini[47] & ~dini[46] & dini[44]) ; | |
433 | assign ib2_cntl[0] = (~dini[43] & dini[42] ) | | |
434 | (~dini[43] & ~dini[41] ) ; | |
435 | assign ib2_cntl[1] = (~dini[43] & ~dini[42] & dini[41] ) | | |
436 | (~dini[43] & ~dini[42] ) ; | |
437 | ||
438 | assign eadj_ibyte2[0] = ( ib2_zeroh_l & ib2_cnth[0]) | | |
439 | (~ib2_zeroh_l & ib2_cntl[0]) ; | |
440 | assign eadj_ibyte2[1] = ( ib2_zeroh_l & ib2_cnth[1]) | | |
441 | (~ib2_zeroh_l & ib2_cntl[1]) ; | |
442 | assign eadj_ibyte2[2] = ~ib2_zeroh_l ; | |
443 | ||
444 | // ---------------------------------------------------------------------------- | |
445 | // i2f LZD dini byte3 => dini[39:32] | |
446 | // assume dini[32] == 1'b1 | |
447 | // ---------------------------------------------------------------------------- | |
448 | ||
449 | assign ib3_nor_76 = ~(dini[39] | dini[38]); | |
450 | assign ib3_nor_54 = ~(dini[37] | dini[36]); | |
451 | ||
452 | assign ib3_zeroh_l = ~(ib3_nor_76 & ib3_nor_54); | |
453 | ||
454 | assign ib3_cnth[0] = (~dini[39] & dini[38] ) | | |
455 | (~dini[39] & ~dini[37] & dini[36]) ; | |
456 | assign ib3_cnth[1] = (~dini[39] & ~dini[38] & dini[37] ) | | |
457 | (~dini[39] & ~dini[38] & dini[36]) ; | |
458 | assign ib3_cntl[0] = (~dini[35] & dini[34] ) | | |
459 | (~dini[35] & ~dini[33] ) ; | |
460 | assign ib3_cntl[1] = (~dini[35] & ~dini[34] & dini[33] ) | | |
461 | (~dini[35] & ~dini[34] ) ; | |
462 | ||
463 | assign eadj_ibyte3[0] = ( ib3_zeroh_l & ib3_cnth[0]) | | |
464 | (~ib3_zeroh_l & ib3_cntl[0]) ; | |
465 | assign eadj_ibyte3[1] = ( ib3_zeroh_l & ib3_cnth[1]) | | |
466 | (~ib3_zeroh_l & ib3_cntl[1]) ; | |
467 | assign eadj_ibyte3[2] = ~ib3_zeroh_l ; | |
468 | ||
469 | // ---------------------------------------------------------------------------- | |
470 | // i2f LZD dini byte4 => dini[31:24] | |
471 | // assume dini[24] == 1'b1 | |
472 | // ---------------------------------------------------------------------------- | |
473 | ||
474 | assign ib4_nor_76 = ~(dini[31] | dini[30]); | |
475 | assign ib4_nor_54 = ~(dini[29] | dini[28]); | |
476 | ||
477 | assign ib4_zeroh_l = ~(ib4_nor_76 & ib4_nor_54); | |
478 | ||
479 | assign ib4_cnth[0] = (~dini[31] & dini[30] ) | | |
480 | (~dini[31] & ~dini[29] & dini[28]) ; | |
481 | assign ib4_cnth[1] = (~dini[31] & ~dini[30] & dini[29] ) | | |
482 | (~dini[31] & ~dini[30] & dini[28]) ; | |
483 | assign ib4_cntl[0] = (~dini[27] & dini[26] ) | | |
484 | (~dini[27] & ~dini[25] ) ; | |
485 | assign ib4_cntl[1] = (~dini[27] & ~dini[26] & dini[25] ) | | |
486 | (~dini[27] & ~dini[26] ) ; | |
487 | ||
488 | assign eadj_ibyte4[0] = ( ib4_zeroh_l & ib4_cnth[0]) | | |
489 | (~ib4_zeroh_l & ib4_cntl[0]) ; | |
490 | assign eadj_ibyte4[1] = ( ib4_zeroh_l & ib4_cnth[1]) | | |
491 | (~ib4_zeroh_l & ib4_cntl[1]) ; | |
492 | assign eadj_ibyte4[2] = ~ib4_zeroh_l ; | |
493 | ||
494 | // ---------------------------------------------------------------------------- | |
495 | // i2f LZD dini byte5 => dini[23:16] | |
496 | // assume dini[16] == 1'b1 | |
497 | // ---------------------------------------------------------------------------- | |
498 | ||
499 | assign ib5_nor_76 = ~(dini[23] | dini[22]); | |
500 | assign ib5_nor_54 = ~(dini[21] | dini[20]); | |
501 | ||
502 | assign ib5_zeroh_l = ~(ib5_nor_76 & ib5_nor_54); | |
503 | ||
504 | assign ib5_cnth[0] = (~dini[23] & dini[22] ) | | |
505 | (~dini[23] & ~dini[21] & dini[20]) ; | |
506 | assign ib5_cnth[1] = (~dini[23] & ~dini[22] & dini[21] ) | | |
507 | (~dini[23] & ~dini[22] & dini[20]) ; | |
508 | assign ib5_cntl[0] = (~dini[19] & dini[18] ) | | |
509 | (~dini[19] & ~dini[17] ) ; | |
510 | assign ib5_cntl[1] = (~dini[19] & ~dini[18] & dini[17] ) | | |
511 | (~dini[19] & ~dini[18] ) ; | |
512 | ||
513 | assign eadj_ibyte5[0] = ( ib5_zeroh_l & ib5_cnth[0]) | | |
514 | (~ib5_zeroh_l & ib5_cntl[0]) ; | |
515 | assign eadj_ibyte5[1] = ( ib5_zeroh_l & ib5_cnth[1]) | | |
516 | (~ib5_zeroh_l & ib5_cntl[1]) ; | |
517 | assign eadj_ibyte5[2] = ~ib5_zeroh_l ; | |
518 | ||
519 | // ---------------------------------------------------------------------------- | |
520 | // i2f LZD dini byte6 => dini[15:08] | |
521 | // assume dini[08] == 1'b1 | |
522 | // ---------------------------------------------------------------------------- | |
523 | ||
524 | assign ib6_nor_76 = ~(dini[15] | dini[14]); | |
525 | assign ib6_nor_54 = ~(dini[13] | dini[12]); | |
526 | ||
527 | assign ib6_zeroh_l = ~(ib6_nor_76 & ib6_nor_54); | |
528 | ||
529 | assign ib6_cnth[0] = (~dini[15] & dini[14] ) | | |
530 | (~dini[15] & ~dini[13] & dini[12]) ; | |
531 | assign ib6_cnth[1] = (~dini[15] & ~dini[14] & dini[13] ) | | |
532 | (~dini[15] & ~dini[14] & dini[12]) ; | |
533 | assign ib6_cntl[0] = (~dini[11] & dini[10] ) | | |
534 | (~dini[11] & ~dini[9] ) ; | |
535 | assign ib6_cntl[1] = (~dini[11] & ~dini[10] & dini[9] ) | | |
536 | (~dini[11] & ~dini[10] ) ; | |
537 | ||
538 | assign eadj_ibyte6[0] = ( ib6_zeroh_l & ib6_cnth[0]) | | |
539 | (~ib6_zeroh_l & ib6_cntl[0]) ; | |
540 | assign eadj_ibyte6[1] = ( ib6_zeroh_l & ib6_cnth[1]) | | |
541 | (~ib6_zeroh_l & ib6_cntl[1]) ; | |
542 | assign eadj_ibyte6[2] = ~ib6_zeroh_l ; | |
543 | ||
544 | // ---------------------------------------------------------------------------- | |
545 | // i2f LZD dini byte7 => dini[07:00] | |
546 | // assume dini[0] == 1'b1 | |
547 | // ---------------------------------------------------------------------------- | |
548 | ||
549 | assign ib7_nor_76 = ~(dini[7] | dini[6]); | |
550 | assign ib7_nor_54 = ~(dini[5] | dini[4]); | |
551 | ||
552 | assign ib7_zeroh_l = ~(ib7_nor_76 & ib7_nor_54); | |
553 | ||
554 | assign ib7_cnth[0] = (~dini[7] & dini[6] ) | | |
555 | (~dini[7] & ~dini[5] & dini[4]) ; | |
556 | assign ib7_cnth[1] = (~dini[7] & ~dini[6] & dini[5] ) | | |
557 | (~dini[7] & ~dini[6] & dini[4]) ; | |
558 | assign ib7_cntl[0] = (~dini[3] & dini[2] ) | | |
559 | (~dini[3] & ~dini[1] ) ; | |
560 | assign ib7_cntl[1] = (~dini[3] & ~dini[2] & dini[1] ) | | |
561 | (~dini[3] & ~dini[2] ) ; | |
562 | ||
563 | assign eadj_ibyte7[0] = ( ib7_zeroh_l & ib7_cnth[0]) | | |
564 | (~ib7_zeroh_l & ib7_cntl[0]) ; | |
565 | assign eadj_ibyte7[1] = ( ib7_zeroh_l & ib7_cnth[1]) | | |
566 | (~ib7_zeroh_l & ib7_cntl[1]) ; | |
567 | assign eadj_ibyte7[2] = ~ib7_zeroh_l ; | |
568 | ||
569 | // ---------------------------------------------------------------------------- | |
570 | // i2f LZD Eadj[5:0] mux selects | |
571 | // ---------------------------------------------------------------------------- | |
572 | ||
573 | assign i2f_eadj_sel_fx1[0] = ibyte_sel[0]; | |
574 | assign i2f_eadj_sel_fx1[1] = ~( ibyte_sel[0] ) & ibyte_sel[1]; | |
575 | assign i2f_eadj_sel_fx1[2] = ~(|ibyte_sel[1:0]) & ibyte_sel[2]; | |
576 | assign i2f_eadj_sel_fx1[3] = ~(|ibyte_sel[2:0]) & ibyte_sel[3]; | |
577 | assign i2f_eadj_sel_fx1[4] = ~(|ibyte_sel[3:0]) & ibyte_sel[4]; | |
578 | assign i2f_eadj_sel_fx1[5] = ~(|ibyte_sel[4:0]) & ibyte_sel[5]; | |
579 | assign i2f_eadj_sel_fx1[6] = ~(|ibyte_sel[5:0]) & ibyte_sel[6]; | |
580 | assign i2f_eadj_sel_fx1[7] = ~(|ibyte_sel[6:0]); | |
581 | ||
582 | ||
583 | // ---------------------------------------------------------------------------- | |
584 | // FX2 stage | |
585 | // ---------------------------------------------------------------------------- | |
586 | ||
587 | fgu_fic_ctl_msff_ctl_macro__width_43 fx2_00 ( | |
588 | .scan_in(fx2_00_scanin), | |
589 | .scan_out(fx2_00_scanout), | |
590 | .l1clk(l1clk_pm1), | |
591 | .din ({ bzf31msb_fx1, | |
592 | bzf32lsb_fx1, | |
593 | bof22msb_fx1, | |
594 | dpint_nx_byte_fx1[7:2], | |
595 | spint_nx_byte_fx1[7:6], | |
596 | i2f_eadj_sel_fx1[7:0], | |
597 | eadj_ibyte0[2:0], | |
598 | eadj_ibyte1[2:0], | |
599 | eadj_ibyte2[2:0], | |
600 | eadj_ibyte3[2:0], | |
601 | eadj_ibyte4[2:0], | |
602 | eadj_ibyte5[2:0], | |
603 | eadj_ibyte6[2:0], | |
604 | eadj_ibyte7[2:0]}), | |
605 | .dout({fic_bzf31msb_fx2, | |
606 | fic_bzf32lsb_fx2, | |
607 | fic_bof22msb_fx2, | |
608 | dpint_nx_byte_fx2[7:2], | |
609 | spint_nx_byte_fx2[7:6], | |
610 | i2f_eadj_sel_fx2[7:0], | |
611 | eadj_ibyte0_fx2[2:0], | |
612 | eadj_ibyte1_fx2[2:0], | |
613 | eadj_ibyte2_fx2[2:0], | |
614 | eadj_ibyte3_fx2[2:0], | |
615 | eadj_ibyte4_fx2[2:0], | |
616 | eadj_ibyte5_fx2[2:0], | |
617 | eadj_ibyte6_fx2[2:0], | |
618 | eadj_ibyte7_fx2[2:0]}), | |
619 | .siclk(siclk), | |
620 | .soclk(soclk) | |
621 | ); | |
622 | ||
623 | // ---------------------------------------------------------------------------- | |
624 | // i2f LZD Eadj[5:0] mux | |
625 | // ---------------------------------------------------------------------------- | |
626 | ||
627 | assign fic_i2f_eadj_fx2[5:0] = | |
628 | ({6{i2f_eadj_sel_fx2[0]}} & ({3'b000, eadj_ibyte0_fx2[2:0]})) | | |
629 | ({6{i2f_eadj_sel_fx2[1]}} & ({3'b001, eadj_ibyte1_fx2[2:0]})) | | |
630 | ({6{i2f_eadj_sel_fx2[2]}} & ({3'b010, eadj_ibyte2_fx2[2:0]})) | | |
631 | ({6{i2f_eadj_sel_fx2[3]}} & ({3'b011, eadj_ibyte3_fx2[2:0]})) | | |
632 | ({6{i2f_eadj_sel_fx2[4]}} & ({3'b100, eadj_ibyte4_fx2[2:0]})) | | |
633 | ({6{i2f_eadj_sel_fx2[5]}} & ({3'b101, eadj_ibyte5_fx2[2:0]})) | | |
634 | ({6{i2f_eadj_sel_fx2[6]}} & ({3'b110, eadj_ibyte6_fx2[2:0]})) | | |
635 | ({6{i2f_eadj_sel_fx2[7]}} & ({3'b111, eadj_ibyte7_fx2[2:0]})) ; | |
636 | ||
637 | assign fic_i2f_align_sel_fx2[5:0] = | |
638 | (~fic_i2f_eadj_fx2[5:0]) + 6'b000001; // 2's comp | |
639 | ||
640 | ||
641 | // ---------------------------------------------------------------------------- | |
642 | // FX3 stage | |
643 | // ---------------------------------------------------------------------------- | |
644 | ||
645 | fgu_fic_ctl_msff_ctl_macro__width_14 fx3_00 ( | |
646 | .scan_in(fx3_00_scanin), | |
647 | .scan_out(fx3_00_scanout), | |
648 | .l1clk(l1clk_pm1), | |
649 | .din ({fpe_align_sel_fx2[5:0], dpint_nx_byte_fx2[7:2], spint_nx_byte_fx2[7:6]}), | |
650 | .dout({ align_sel_fx3[5:0], dpint_nx_byte_fx3[7:2], spint_nx_byte_fx3[7:6]}), | |
651 | .siclk(siclk), | |
652 | .soclk(soclk) | |
653 | ); | |
654 | ||
655 | // ------------------------------------ | |
656 | // F(s,d)TO(i,x) inexact detection | |
657 | // | |
658 | // ----------------------------------- | |
659 | // FsTOi | 32 | 32 | | |
660 | // ----------------------------------- | |
661 | // ------------ | |
662 | // | 24 | | |
663 | // ------------ | |
664 | // 4 3 2 <= byte shift | |
665 | // | |
666 | // ----------------------------------- | |
667 | // FsTOx | 64 | | |
668 | // ----------------------------------- | |
669 | // ------------ | |
670 | // | 24 | | |
671 | // ------------ | |
672 | // 8 7 6 <= byte shift | |
673 | // | |
674 | // ----------------------------------- | |
675 | // FdTOi | 32 | 32 | | |
676 | // ----------------------------------- | |
677 | // -------------------------- | |
678 | // | 53 | | |
679 | // -------------------------- | |
680 | // 4 3 2 1 ---Any-- <= byte shift | |
681 | // | |
682 | // ----------------------------------- | |
683 | // FdTOx | 64 | | |
684 | // ----------------------------------- | |
685 | // -------------------------- | |
686 | // | 53 | | |
687 | // -------------------------- | |
688 | // 8 7 6 5 4 3 2 <= byte shift | |
689 | // | |
690 | // ------------------------------------ | |
691 | ||
692 | assign fstoi_nx_byte_fx3 = | |
693 | ((align_sel_fx3[4:3] == 2'd3) & (|spint_nx_byte_fx3[7:6])) | | |
694 | ((align_sel_fx3[4:3] == 2'd2) & ( spint_nx_byte_fx3[6] )) ; | |
695 | ||
696 | assign fstox_nx_byte_fx3 = | |
697 | ((align_sel_fx3[5:3] == 3'd7) & (|spint_nx_byte_fx3[7:6])) | | |
698 | ((align_sel_fx3[5:3] == 3'd6) & ( spint_nx_byte_fx3[6] )) ; | |
699 | ||
700 | assign fdtoi_nx_byte_fx3 = | |
701 | ((align_sel_fx3[5:3] == 3'd3) & (|dpint_nx_byte_fx3[7:5])) | | |
702 | ((align_sel_fx3[5:3] == 3'd2) & (|dpint_nx_byte_fx3[6:5])) | | |
703 | ((align_sel_fx3[5:3] == 3'd1) & ( dpint_nx_byte_fx3[5] )) | | |
704 | ( (|dpint_nx_byte_fx3[4:2])) ; | |
705 | ||
706 | assign fdtox_nx_byte_fx3 = | |
707 | ((align_sel_fx3[5:3] == 3'd7) & (|dpint_nx_byte_fx3[7:2])) | | |
708 | ((align_sel_fx3[5:3] == 3'd6) & (|dpint_nx_byte_fx3[6:2])) | | |
709 | ((align_sel_fx3[5:3] == 3'd5) & (|dpint_nx_byte_fx3[5:2])) | | |
710 | ((align_sel_fx3[5:3] == 3'd4) & (|dpint_nx_byte_fx3[4:2])) | | |
711 | ((align_sel_fx3[5:3] == 3'd3) & (|dpint_nx_byte_fx3[3:2])) | | |
712 | ((align_sel_fx3[5:3] == 3'd2) & ( dpint_nx_byte_fx3[2] )) ; | |
713 | ||
714 | assign ftox_nx_bit_fx3 = | |
715 | ((align_sel_fx3[2:0] == 3'd7) & (|fpf_man_se_byte_fx3_b6_0[6:0])) | | |
716 | ((align_sel_fx3[2:0] == 3'd6) & (|fpf_man_se_byte_fx3_b6_0[5:0])) | | |
717 | ((align_sel_fx3[2:0] == 3'd5) & (|fpf_man_se_byte_fx3_b6_0[4:0])) | | |
718 | ((align_sel_fx3[2:0] == 3'd4) & (|fpf_man_se_byte_fx3_b6_0[3:0])) | | |
719 | ((align_sel_fx3[2:0] == 3'd3) & (|fpf_man_se_byte_fx3_b6_0[2:0])) | | |
720 | ((align_sel_fx3[2:0] == 3'd2) & (|fpf_man_se_byte_fx3_b6_0[1:0])) | | |
721 | ((align_sel_fx3[2:0] == 3'd1) & ( fpf_man_se_byte_fx3_b6_0[0] )) ; | |
722 | ||
723 | assign ftoi_nx_bit_fx3 = | |
724 | ((align_sel_fx3[2:0] == 3'd7) & (|fpf_man_se_byte_fx3_b38_32[38:32])) | | |
725 | ((align_sel_fx3[2:0] == 3'd6) & (|fpf_man_se_byte_fx3_b38_32[37:32])) | | |
726 | ((align_sel_fx3[2:0] == 3'd5) & (|fpf_man_se_byte_fx3_b38_32[36:32])) | | |
727 | ((align_sel_fx3[2:0] == 3'd4) & (|fpf_man_se_byte_fx3_b38_32[35:32])) | | |
728 | ((align_sel_fx3[2:0] == 3'd3) & (|fpf_man_se_byte_fx3_b38_32[34:32])) | | |
729 | ((align_sel_fx3[2:0] == 3'd2) & (|fpf_man_se_byte_fx3_b38_32[33:32])) | | |
730 | ((align_sel_fx3[2:0] == 3'd1) & ( fpf_man_se_byte_fx3_b38_32[32] )) ; | |
731 | ||
732 | assign ftoi_nx_fx3 = | |
733 | ftoi_nx_bit_fx3 | | |
734 | (fstoi_nx_byte_fx3 & fpc_sp_source_fx3) | | |
735 | (fdtoi_nx_byte_fx3 & ~fpc_sp_source_fx3) ; | |
736 | ||
737 | assign ftox_nx_fx3 = | |
738 | ftox_nx_bit_fx3 | | |
739 | (fstox_nx_byte_fx3 & fpc_sp_source_fx3) | | |
740 | (fdtox_nx_byte_fx3 & ~fpc_sp_source_fx3) ; | |
741 | ||
742 | ||
743 | // ---------------------------------------------------------------------------- | |
744 | // FX4 stage | |
745 | // ---------------------------------------------------------------------------- | |
746 | ||
747 | fgu_fic_ctl_msff_ctl_macro__width_2 fx4_00 ( | |
748 | .scan_in(fx4_00_scanin), | |
749 | .scan_out(fx4_00_scanout), | |
750 | .l1clk(l1clk_pm1), | |
751 | .din ({ ftoi_nx_fx3, ftox_nx_fx3}), | |
752 | .dout({fic_ftoi_nx_fx4, fic_ftox_nx_fx4}), | |
753 | .siclk(siclk), | |
754 | .soclk(soclk) | |
755 | ); | |
756 | ||
757 | assign fic_mulscc_iccz_fx4 = (fpf_ma_sum_fx4[31:0] == 32'b0); | |
758 | assign fic_mulscc_xccz_fx4 = ~fpf_ma_sum_fx4[32] & fic_mulscc_iccz_fx4; | |
759 | ||
760 | // ------------------------------------ | |
761 | // i2f and FdTOs sticky calculation | |
762 | // | |
763 | // ----------------------------------- | |
764 | // FxTOs | 64 | | |
765 | // ----------------------------------- | |
766 | // ------------ G | |
767 | // | 24 | 7 | 32 | | |
768 | // ------------ | |
769 | // | |
770 | // ----------------------------------- | |
771 | // FxTOd | 64 | | |
772 | // ----------------------------------- | |
773 | // -------------------------- G | |
774 | // | 53 | 7 | 3 | | |
775 | // -------------------------- | |
776 | // | |
777 | // ----------------------------------- | |
778 | // FiTOs | 32 | 32 | | |
779 | // ----------------------------------- | |
780 | // ------------ G | |
781 | // | 24 | 7 | 32 | | |
782 | // ------------ | |
783 | // | |
784 | // FiTOd never rounds (exact) | |
785 | // | |
786 | // i2f notes: | |
787 | // - logically, LSB,G,X should be post-2comp for neg integers | |
788 | // - X is equiv if calculated pre or post-2comp (post-2comp is used in | |
789 | // this design for simplicity) | |
790 | // - The 2comp +1 function can't result in clearing all G,X bits and | |
791 | // blocking Rinc unless the post-2comp was b'00...00 in that region. | |
792 | // However, in that case a +1 was propagated to the LSB as if an Rinc | |
793 | // had taken place. Thus, effectively, a 2comp +1 can't block an Rinc, | |
794 | // and LSB,G need only reflect the 2comp invert function, not the | |
795 | // 2comp +1 function. | |
796 | // | |
797 | // FdTOs notes: | |
798 | // - the dp input (rs2) is always normalized | |
799 | // - the dp mantissa resides in bits 63:11 | |
800 | // ------------------------------------ | |
801 | ||
802 | assign fic_convert_sticky_fx4 = |fpf_ma_sum_fx4[38:0]; // FxTOs, FiTOs, FdTOs | |
803 | assign fic_fxtod_sticky_fx4 = |fpf_ma_sum_fx4[9:0]; // FxTOd | |
804 | ||
805 | // ---------------------------------------------------------------------------- | |
806 | // Normalizer LZD | |
807 | // | |
808 | // data input format: | |
809 | // | |
810 | // 63 32 31 8 | |
811 | // ------------------- -------------- | |
812 | // | 32-bits | | 24-bits | | |
813 | // ------------------- -------------- | |
814 | // Byte: 0 1 2 3 4 5 6 | |
815 | // | |
816 | // | |
817 | // LSB pos. G pos. | |
818 | // -------- ------ | |
819 | // DP 11 10 | |
820 | // SP 40 39 | |
821 | // | |
822 | // ---------------------------------------------------------------------------- | |
823 | ||
824 | assign dina[63:11] = fpf_ma_sum_fx4[63:11]; | |
825 | ||
826 | // ------------------------------------ | |
827 | // LZD override by setting dina bit 63 to | |
828 | // force a Norm shift of 0-bits | |
829 | // | |
830 | // Override cases: | |
831 | // - multiply (covered by ~logical_sub) | |
832 | // - div/sqrt (covered by ~logical_sub) | |
833 | // - 1X.XX (covered by ~logical_sub) | |
834 | // - 00.1X | |
835 | // Note: | |
836 | // - 1X.XX due to Rcout is unknown in fx4 | |
837 | // - 1X.XX not possible if logical_subtract | |
838 | // - 00.1X is shifted 1-bit by the main adder output format mux | |
839 | // ------------------------------------ | |
840 | ||
841 | assign shift_00 = | |
842 | fpc_lzd_override_fx4 | // mul | div | sqrt | 1X.XX | |
843 | (dina[63:62] == 2'b01); // 00.1X | |
844 | ||
845 | // ------------------------------------ | |
846 | // Norm LZD Byte selects (not priority encoded) | |
847 | // ------------------------------------ | |
848 | ||
849 | assign nbyte_sel[0] = shift_00; // force eadj=0 | |
850 | assign nbyte_sel[1] = |dina[63:56]; // shift 00-bits | |
851 | assign nbyte_sel[2] = |dina[55:48]; // shift 08-bits | |
852 | assign nbyte_sel[3] = |dina[47:40]; // shift 16-bits | |
853 | assign nbyte_sel[4] = |dina[39:32]; // shift 24-bits | |
854 | assign nbyte_sel[5] = |dina[31:24]; // shift 32-bits | |
855 | assign nbyte_sel[6] = |dina[23:16]; // shift 40-bits | |
856 | ||
857 | // ------------------------------------ | |
858 | // Norm LZD Eadj[2:0] | |
859 | // | |
860 | // - count leading zeros in a given byte | |
861 | // and encode into a 3-bit value (Eadj[2:0]) | |
862 | // | |
863 | // Bit shift: [4] [2] [1] | |
864 | // Eadj bit: [2] [1] [0] | |
865 | // --------------------------- | |
866 | // 0 0 0 | |
867 | // 0 0 1 | |
868 | // 0 1 0 | |
869 | // 0 1 1 | |
870 | // 1 0 0 | |
871 | // 1 0 1 | |
872 | // 1 1 0 | |
873 | // 1 1 1 | |
874 | // | |
875 | // din[7:0] | Eadj[2:0] | |
876 | // -----------------|------------ | |
877 | // 1 x x x x x x x | 0 0 0 | |
878 | // 0 1 x x x x x x | 0 0 1 | |
879 | // 0 0 1 x x x x x | 0 1 0 | |
880 | // 0 0 0 1 x x x x | 0 1 1 | |
881 | // 0 0 0 0 1 x x x | 1 0 0 | |
882 | // 0 0 0 0 0 1 x x | 1 0 1 | |
883 | // 0 0 0 0 0 0 1 x | 1 1 0 | |
884 | // 0 0 0 0 0 0 0 x | 1 1 1 | |
885 | // | |
886 | // Note: force Eadj[2:0] to 3'b111 | |
887 | // if din[7:1]==7'b0000000 (i.e. assume din[0]==1'b1) | |
888 | // This has already been done for byte0-byte6 below. | |
889 | // Also, for DP operation, din[10] is assumed to be | |
890 | // 1'b1 since bit 10 (the DP G pos.) isn't the LSB | |
891 | // position of byte6. | |
892 | // | |
893 | // ------------------------------------ | |
894 | ||
895 | // ---------------------------------------------------------------------------- | |
896 | // Norm LZD dina byte0 => dina[63:56] | |
897 | // assume dina[56] == 1'b1 | |
898 | // ---------------------------------------------------------------------------- | |
899 | ||
900 | assign ab0_nor_76 = ~(dina[63] | dina[62]); | |
901 | assign ab0_nor_54 = ~(dina[61] | dina[60]); | |
902 | ||
903 | assign ab0_zeroh_l = ~(ab0_nor_76 & ab0_nor_54); | |
904 | ||
905 | assign ab0_cnth[0] = (~dina[63] & dina[62] ) | | |
906 | (~dina[63] & ~dina[61] & dina[60]) ; | |
907 | assign ab0_cnth[1] = (~dina[63] & ~dina[62] & dina[61] ) | | |
908 | (~dina[63] & ~dina[62] & dina[60]) ; | |
909 | assign ab0_cntl[0] = (~dina[59] & dina[58] ) | | |
910 | (~dina[59] & ~dina[57] ) ; | |
911 | assign ab0_cntl[1] = (~dina[59] & ~dina[58] & dina[57] ) | | |
912 | (~dina[59] & ~dina[58] ) ; | |
913 | ||
914 | assign eadj_nbyte0[0] = ( ab0_zeroh_l & ab0_cnth[0]) | | |
915 | (~ab0_zeroh_l & ab0_cntl[0]) ; | |
916 | assign eadj_nbyte0[1] = ( ab0_zeroh_l & ab0_cnth[1]) | | |
917 | (~ab0_zeroh_l & ab0_cntl[1]) ; | |
918 | assign eadj_nbyte0[2] = ~ab0_zeroh_l ; | |
919 | ||
920 | // ---------------------------------------------------------------------------- | |
921 | // Norm LZD dina byte1 => dina[55:48] | |
922 | // assume dina[48] == 1'b1 | |
923 | // ---------------------------------------------------------------------------- | |
924 | ||
925 | assign ab1_nor_76 = ~(dina[55] | dina[54]); | |
926 | assign ab1_nor_54 = ~(dina[53] | dina[52]); | |
927 | ||
928 | assign ab1_zeroh_l = ~(ab1_nor_76 & ab1_nor_54); | |
929 | ||
930 | assign ab1_cnth[0] = (~dina[55] & dina[54] ) | | |
931 | (~dina[55] & ~dina[53] & dina[52]) ; | |
932 | assign ab1_cnth[1] = (~dina[55] & ~dina[54] & dina[53] ) | | |
933 | (~dina[55] & ~dina[54] & dina[52]) ; | |
934 | assign ab1_cntl[0] = (~dina[51] & dina[50] ) | | |
935 | (~dina[51] & ~dina[49] ) ; | |
936 | assign ab1_cntl[1] = (~dina[51] & ~dina[50] & dina[49] ) | | |
937 | (~dina[51] & ~dina[50] ) ; | |
938 | ||
939 | assign eadj_nbyte1[0] = ( ab1_zeroh_l & ab1_cnth[0]) | | |
940 | (~ab1_zeroh_l & ab1_cntl[0]) ; | |
941 | assign eadj_nbyte1[1] = ( ab1_zeroh_l & ab1_cnth[1]) | | |
942 | (~ab1_zeroh_l & ab1_cntl[1]) ; | |
943 | assign eadj_nbyte1[2] = ~ab1_zeroh_l ; | |
944 | ||
945 | // ---------------------------------------------------------------------------- | |
946 | // Norm LZD dina byte2 => dina[47:40] | |
947 | // assume dina[40] == 1'b1 | |
948 | // ---------------------------------------------------------------------------- | |
949 | ||
950 | assign ab2_nor_76 = ~(dina[47] | dina[46]); | |
951 | assign ab2_nor_54 = ~(dina[45] | dina[44]); | |
952 | ||
953 | assign ab2_zeroh_l = ~(ab2_nor_76 & ab2_nor_54); | |
954 | ||
955 | assign ab2_cnth[0] = (~dina[47] & dina[46] ) | | |
956 | (~dina[47] & ~dina[45] & dina[44]) ; | |
957 | assign ab2_cnth[1] = (~dina[47] & ~dina[46] & dina[45] ) | | |
958 | (~dina[47] & ~dina[46] & dina[44]) ; | |
959 | assign ab2_cntl[0] = (~dina[43] & dina[42] ) | | |
960 | (~dina[43] & ~dina[41] ) ; | |
961 | assign ab2_cntl[1] = (~dina[43] & ~dina[42] & dina[41] ) | | |
962 | (~dina[43] & ~dina[42] ) ; | |
963 | ||
964 | assign eadj_nbyte2[0] = ( ab2_zeroh_l & ab2_cnth[0]) | | |
965 | (~ab2_zeroh_l & ab2_cntl[0]) ; | |
966 | assign eadj_nbyte2[1] = ( ab2_zeroh_l & ab2_cnth[1]) | | |
967 | (~ab2_zeroh_l & ab2_cntl[1]) ; | |
968 | assign eadj_nbyte2[2] = ~ab2_zeroh_l ; | |
969 | ||
970 | // ---------------------------------------------------------------------------- | |
971 | // Norm LZD dina byte3 => dina[39:32] | |
972 | // assume dina[32] == 1'b1 | |
973 | // ---------------------------------------------------------------------------- | |
974 | ||
975 | assign ab3_nor_76 = ~(dina[39] | dina[38]); | |
976 | assign ab3_nor_54 = ~(dina[37] | dina[36]); | |
977 | ||
978 | assign ab3_zeroh_l = ~(ab3_nor_76 & ab3_nor_54); | |
979 | ||
980 | assign ab3_cnth[0] = (~dina[39] & dina[38] ) | | |
981 | (~dina[39] & ~dina[37] & dina[36]) ; | |
982 | assign ab3_cnth[1] = (~dina[39] & ~dina[38] & dina[37] ) | | |
983 | (~dina[39] & ~dina[38] & dina[36]) ; | |
984 | assign ab3_cntl[0] = (~dina[35] & dina[34] ) | | |
985 | (~dina[35] & ~dina[33] ) ; | |
986 | assign ab3_cntl[1] = (~dina[35] & ~dina[34] & dina[33] ) | | |
987 | (~dina[35] & ~dina[34] ) ; | |
988 | ||
989 | assign eadj_nbyte3[0] = ( ab3_zeroh_l & ab3_cnth[0]) | | |
990 | (~ab3_zeroh_l & ab3_cntl[0]) ; | |
991 | assign eadj_nbyte3[1] = ( ab3_zeroh_l & ab3_cnth[1]) | | |
992 | (~ab3_zeroh_l & ab3_cntl[1]) ; | |
993 | assign eadj_nbyte3[2] = ~ab3_zeroh_l ; | |
994 | ||
995 | // ---------------------------------------------------------------------------- | |
996 | // Norm LZD dina byte4 => dina[31:24] | |
997 | // assume dina[24] == 1'b1 | |
998 | // ---------------------------------------------------------------------------- | |
999 | ||
1000 | assign ab4_nor_76 = ~(dina[31] | dina[30]); | |
1001 | assign ab4_nor_54 = ~(dina[29] | dina[28]); | |
1002 | ||
1003 | assign ab4_zeroh_l = ~(ab4_nor_76 & ab4_nor_54); | |
1004 | ||
1005 | assign ab4_cnth[0] = (~dina[31] & dina[30] ) | | |
1006 | (~dina[31] & ~dina[29] & dina[28]) ; | |
1007 | assign ab4_cnth[1] = (~dina[31] & ~dina[30] & dina[29] ) | | |
1008 | (~dina[31] & ~dina[30] & dina[28]) ; | |
1009 | assign ab4_cntl[0] = (~dina[27] & dina[26] ) | | |
1010 | (~dina[27] & ~dina[25] ) ; | |
1011 | assign ab4_cntl[1] = (~dina[27] & ~dina[26] & dina[25] ) | | |
1012 | (~dina[27] & ~dina[26] ) ; | |
1013 | ||
1014 | assign eadj_nbyte4[0] = ( ab4_zeroh_l & ab4_cnth[0]) | | |
1015 | (~ab4_zeroh_l & ab4_cntl[0]) ; | |
1016 | assign eadj_nbyte4[1] = ( ab4_zeroh_l & ab4_cnth[1]) | | |
1017 | (~ab4_zeroh_l & ab4_cntl[1]) ; | |
1018 | assign eadj_nbyte4[2] = ~ab4_zeroh_l ; | |
1019 | ||
1020 | // ---------------------------------------------------------------------------- | |
1021 | // Norm LZD dina byte5 => dina[23:16] | |
1022 | // assume dina[16] == 1'b1 | |
1023 | // ---------------------------------------------------------------------------- | |
1024 | ||
1025 | assign ab5_nor_76 = ~(dina[23] | dina[22]); | |
1026 | assign ab5_nor_54 = ~(dina[21] | dina[20]); | |
1027 | ||
1028 | assign ab5_zeroh_l = ~(ab5_nor_76 & ab5_nor_54); | |
1029 | ||
1030 | assign ab5_cnth[0] = (~dina[23] & dina[22] ) | | |
1031 | (~dina[23] & ~dina[21] & dina[20]) ; | |
1032 | assign ab5_cnth[1] = (~dina[23] & ~dina[22] & dina[21] ) | | |
1033 | (~dina[23] & ~dina[22] & dina[20]) ; | |
1034 | assign ab5_cntl[0] = (~dina[19] & dina[18] ) | | |
1035 | (~dina[19] & ~dina[17] ) ; | |
1036 | assign ab5_cntl[1] = (~dina[19] & ~dina[18] & dina[17] ) | | |
1037 | (~dina[19] & ~dina[18] ) ; | |
1038 | ||
1039 | assign eadj_nbyte5[0] = ( ab5_zeroh_l & ab5_cnth[0]) | | |
1040 | (~ab5_zeroh_l & ab5_cntl[0]) ; | |
1041 | assign eadj_nbyte5[1] = ( ab5_zeroh_l & ab5_cnth[1]) | | |
1042 | (~ab5_zeroh_l & ab5_cntl[1]) ; | |
1043 | assign eadj_nbyte5[2] = ~ab5_zeroh_l ; | |
1044 | ||
1045 | // ---------------------------------------------------------------------------- | |
1046 | // Norm LZD dina byte6 => dina[15:08] | |
1047 | // assume dina[10] == 1'b1 | |
1048 | // assume dina[9:8] == 2'b00 | |
1049 | // ---------------------------------------------------------------------------- | |
1050 | ||
1051 | assign ab6_nor_76 = ~(dina[15] | dina[14]); | |
1052 | assign ab6_nor_54 = ~(dina[13] | dina[12]); | |
1053 | ||
1054 | assign ab6_zeroh_l = ~(ab6_nor_76 & ab6_nor_54); | |
1055 | ||
1056 | assign ab6_cnth[0] = (~dina[15] & dina[14] ) | | |
1057 | (~dina[15] & ~dina[13] & dina[12]) ; | |
1058 | assign ab6_cnth[1] = (~dina[15] & ~dina[14] & dina[13] ) | | |
1059 | (~dina[15] & ~dina[14] & dina[12]) ; | |
1060 | assign ab6_cntl[0] = (~dina[11] ) ; | |
1061 | ||
1062 | assign eadj_nbyte6[0] = ( ab6_zeroh_l & ab6_cnth[0]) | | |
1063 | (~ab6_zeroh_l & ab6_cntl[0]) ; | |
1064 | assign eadj_nbyte6[1] = ( ab6_zeroh_l & ab6_cnth[1]) ; | |
1065 | assign eadj_nbyte6[2] = ~ab6_zeroh_l ; | |
1066 | ||
1067 | // ---------------------------------------------------------------------------- | |
1068 | // Norm LZD Eadj[5:0] mux | |
1069 | // ---------------------------------------------------------------------------- | |
1070 | ||
1071 | assign norm_eadj_fx4[5:0] = | |
1072 | //({6{( nbyte_sel[0])}} & ({3'b000, 3'b000 })) | | |
1073 | ({6{(~( nbyte_sel[0] ) & nbyte_sel[1])}} & ({3'b000, eadj_nbyte0[2:0]})) | | |
1074 | ({6{(~(|nbyte_sel[1:0]) & nbyte_sel[2])}} & ({3'b001, eadj_nbyte1[2:0]})) | | |
1075 | ({6{(~(|nbyte_sel[2:0]) & nbyte_sel[3])}} & ({3'b010, eadj_nbyte2[2:0]})) | | |
1076 | ({6{(~(|nbyte_sel[3:0]) & nbyte_sel[4])}} & ({3'b011, eadj_nbyte3[2:0]})) | | |
1077 | ({6{(~(|nbyte_sel[4:0]) & nbyte_sel[5])}} & ({3'b100, eadj_nbyte4[2:0]})) | | |
1078 | ({6{(~(|nbyte_sel[5:0]) & nbyte_sel[6])}} & ({3'b101, eadj_nbyte5[2:0]})) | | |
1079 | ({6{(~(|nbyte_sel[6:0]) )}} & ({3'b110, eadj_nbyte6[2:0]})) ; | |
1080 | ||
1081 | ||
1082 | // ---------------------------------------------------------------------------- | |
1083 | // FX5 stage | |
1084 | // ---------------------------------------------------------------------------- | |
1085 | ||
1086 | fgu_fic_ctl_msff_ctl_macro__width_6 fx5_00 ( | |
1087 | .scan_in(fx5_00_scanin), | |
1088 | .scan_out(fx5_00_scanout), | |
1089 | .l1clk(l1clk_pm1), | |
1090 | .din ( norm_eadj_fx4[5:0]), | |
1091 | .dout(fic_norm_eadj_fx5[5:0]), | |
1092 | .siclk(siclk), | |
1093 | .soclk(soclk) | |
1094 | ); | |
1095 | ||
1096 | ||
1097 | supply0 vss; | |
1098 | supply1 vdd; | |
1099 | // fixscan start: | |
1100 | assign spares_scanin = scan_in ; | |
1101 | assign fx2_00_scanin = spares_scanout ; | |
1102 | assign fx3_00_scanin = fx2_00_scanout ; | |
1103 | assign fx4_00_scanin = fx3_00_scanout ; | |
1104 | assign fx5_00_scanin = fx4_00_scanout ; | |
1105 | assign scan_out = fx5_00_scanout ; | |
1106 | // fixscan end: | |
1107 | endmodule // fgu_fic_ctl | |
1108 | ||
1109 | ||
1110 | ||
1111 | ||
1112 | ||
1113 | ||
1114 | // any PARAMS parms go into naming of macro | |
1115 | ||
1116 | module fgu_fic_ctl_l1clkhdr_ctl_macro ( | |
1117 | l2clk, | |
1118 | l1en, | |
1119 | pce_ov, | |
1120 | stop, | |
1121 | se, | |
1122 | l1clk); | |
1123 | ||
1124 | ||
1125 | input l2clk; | |
1126 | input l1en; | |
1127 | input pce_ov; | |
1128 | input stop; | |
1129 | input se; | |
1130 | output l1clk; | |
1131 | ||
1132 | ||
1133 | ||
1134 | ||
1135 | ||
1136 | cl_sc1_l1hdr_8x c_0 ( | |
1137 | ||
1138 | ||
1139 | .l2clk(l2clk), | |
1140 | .pce(l1en), | |
1141 | .l1clk(l1clk), | |
1142 | .se(se), | |
1143 | .pce_ov(pce_ov), | |
1144 | .stop(stop) | |
1145 | ); | |
1146 | ||
1147 | ||
1148 | ||
1149 | endmodule | |
1150 | ||
1151 | ||
1152 | ||
1153 | ||
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | ||
1159 | // Description: Spare gate macro for control blocks | |
1160 | // | |
1161 | // Param num controls the number of times the macro is added | |
1162 | // flops=0 can be used to use only combination spare logic | |
1163 | ||
1164 | ||
1165 | module fgu_fic_ctl_spare_ctl_macro__num_2 ( | |
1166 | l1clk, | |
1167 | scan_in, | |
1168 | siclk, | |
1169 | soclk, | |
1170 | scan_out); | |
1171 | wire si_0; | |
1172 | wire so_0; | |
1173 | wire spare0_flop_unused; | |
1174 | wire spare0_buf_32x_unused; | |
1175 | wire spare0_nand3_8x_unused; | |
1176 | wire spare0_inv_8x_unused; | |
1177 | wire spare0_aoi22_4x_unused; | |
1178 | wire spare0_buf_8x_unused; | |
1179 | wire spare0_oai22_4x_unused; | |
1180 | wire spare0_inv_16x_unused; | |
1181 | wire spare0_nand2_16x_unused; | |
1182 | wire spare0_nor3_4x_unused; | |
1183 | wire spare0_nand2_8x_unused; | |
1184 | wire spare0_buf_16x_unused; | |
1185 | wire spare0_nor2_16x_unused; | |
1186 | wire spare0_inv_32x_unused; | |
1187 | wire si_1; | |
1188 | wire so_1; | |
1189 | wire spare1_flop_unused; | |
1190 | wire spare1_buf_32x_unused; | |
1191 | wire spare1_nand3_8x_unused; | |
1192 | wire spare1_inv_8x_unused; | |
1193 | wire spare1_aoi22_4x_unused; | |
1194 | wire spare1_buf_8x_unused; | |
1195 | wire spare1_oai22_4x_unused; | |
1196 | wire spare1_inv_16x_unused; | |
1197 | wire spare1_nand2_16x_unused; | |
1198 | wire spare1_nor3_4x_unused; | |
1199 | wire spare1_nand2_8x_unused; | |
1200 | wire spare1_buf_16x_unused; | |
1201 | wire spare1_nor2_16x_unused; | |
1202 | wire spare1_inv_32x_unused; | |
1203 | ||
1204 | ||
1205 | input l1clk; | |
1206 | input scan_in; | |
1207 | input siclk; | |
1208 | input soclk; | |
1209 | output scan_out; | |
1210 | ||
1211 | cl_sc1_msff_8x spare0_flop (.l1clk(l1clk), | |
1212 | .siclk(siclk), | |
1213 | .soclk(soclk), | |
1214 | .si(si_0), | |
1215 | .so(so_0), | |
1216 | .d(1'b0), | |
1217 | .q(spare0_flop_unused)); | |
1218 | assign si_0 = scan_in; | |
1219 | ||
1220 | cl_u1_buf_32x spare0_buf_32x (.in(1'b1), | |
1221 | .out(spare0_buf_32x_unused)); | |
1222 | cl_u1_nand3_8x spare0_nand3_8x (.in0(1'b1), | |
1223 | .in1(1'b1), | |
1224 | .in2(1'b1), | |
1225 | .out(spare0_nand3_8x_unused)); | |
1226 | cl_u1_inv_8x spare0_inv_8x (.in(1'b1), | |
1227 | .out(spare0_inv_8x_unused)); | |
1228 | cl_u1_aoi22_4x spare0_aoi22_4x (.in00(1'b1), | |
1229 | .in01(1'b1), | |
1230 | .in10(1'b1), | |
1231 | .in11(1'b1), | |
1232 | .out(spare0_aoi22_4x_unused)); | |
1233 | cl_u1_buf_8x spare0_buf_8x (.in(1'b1), | |
1234 | .out(spare0_buf_8x_unused)); | |
1235 | cl_u1_oai22_4x spare0_oai22_4x (.in00(1'b1), | |
1236 | .in01(1'b1), | |
1237 | .in10(1'b1), | |
1238 | .in11(1'b1), | |
1239 | .out(spare0_oai22_4x_unused)); | |
1240 | cl_u1_inv_16x spare0_inv_16x (.in(1'b1), | |
1241 | .out(spare0_inv_16x_unused)); | |
1242 | cl_u1_nand2_16x spare0_nand2_16x (.in0(1'b1), | |
1243 | .in1(1'b1), | |
1244 | .out(spare0_nand2_16x_unused)); | |
1245 | cl_u1_nor3_4x spare0_nor3_4x (.in0(1'b0), | |
1246 | .in1(1'b0), | |
1247 | .in2(1'b0), | |
1248 | .out(spare0_nor3_4x_unused)); | |
1249 | cl_u1_nand2_8x spare0_nand2_8x (.in0(1'b1), | |
1250 | .in1(1'b1), | |
1251 | .out(spare0_nand2_8x_unused)); | |
1252 | cl_u1_buf_16x spare0_buf_16x (.in(1'b1), | |
1253 | .out(spare0_buf_16x_unused)); | |
1254 | cl_u1_nor2_16x spare0_nor2_16x (.in0(1'b0), | |
1255 | .in1(1'b0), | |
1256 | .out(spare0_nor2_16x_unused)); | |
1257 | cl_u1_inv_32x spare0_inv_32x (.in(1'b1), | |
1258 | .out(spare0_inv_32x_unused)); | |
1259 | ||
1260 | cl_sc1_msff_8x spare1_flop (.l1clk(l1clk), | |
1261 | .siclk(siclk), | |
1262 | .soclk(soclk), | |
1263 | .si(si_1), | |
1264 | .so(so_1), | |
1265 | .d(1'b0), | |
1266 | .q(spare1_flop_unused)); | |
1267 | assign si_1 = so_0; | |
1268 | ||
1269 | cl_u1_buf_32x spare1_buf_32x (.in(1'b1), | |
1270 | .out(spare1_buf_32x_unused)); | |
1271 | cl_u1_nand3_8x spare1_nand3_8x (.in0(1'b1), | |
1272 | .in1(1'b1), | |
1273 | .in2(1'b1), | |
1274 | .out(spare1_nand3_8x_unused)); | |
1275 | cl_u1_inv_8x spare1_inv_8x (.in(1'b1), | |
1276 | .out(spare1_inv_8x_unused)); | |
1277 | cl_u1_aoi22_4x spare1_aoi22_4x (.in00(1'b1), | |
1278 | .in01(1'b1), | |
1279 | .in10(1'b1), | |
1280 | .in11(1'b1), | |
1281 | .out(spare1_aoi22_4x_unused)); | |
1282 | cl_u1_buf_8x spare1_buf_8x (.in(1'b1), | |
1283 | .out(spare1_buf_8x_unused)); | |
1284 | cl_u1_oai22_4x spare1_oai22_4x (.in00(1'b1), | |
1285 | .in01(1'b1), | |
1286 | .in10(1'b1), | |
1287 | .in11(1'b1), | |
1288 | .out(spare1_oai22_4x_unused)); | |
1289 | cl_u1_inv_16x spare1_inv_16x (.in(1'b1), | |
1290 | .out(spare1_inv_16x_unused)); | |
1291 | cl_u1_nand2_16x spare1_nand2_16x (.in0(1'b1), | |
1292 | .in1(1'b1), | |
1293 | .out(spare1_nand2_16x_unused)); | |
1294 | cl_u1_nor3_4x spare1_nor3_4x (.in0(1'b0), | |
1295 | .in1(1'b0), | |
1296 | .in2(1'b0), | |
1297 | .out(spare1_nor3_4x_unused)); | |
1298 | cl_u1_nand2_8x spare1_nand2_8x (.in0(1'b1), | |
1299 | .in1(1'b1), | |
1300 | .out(spare1_nand2_8x_unused)); | |
1301 | cl_u1_buf_16x spare1_buf_16x (.in(1'b1), | |
1302 | .out(spare1_buf_16x_unused)); | |
1303 | cl_u1_nor2_16x spare1_nor2_16x (.in0(1'b0), | |
1304 | .in1(1'b0), | |
1305 | .out(spare1_nor2_16x_unused)); | |
1306 | cl_u1_inv_32x spare1_inv_32x (.in(1'b1), | |
1307 | .out(spare1_inv_32x_unused)); | |
1308 | assign scan_out = so_1; | |
1309 | ||
1310 | ||
1311 | ||
1312 | endmodule | |
1313 | ||
1314 | ||
1315 | ||
1316 | ||
1317 | ||
1318 | ||
1319 | // any PARAMS parms go into naming of macro | |
1320 | ||
1321 | module fgu_fic_ctl_msff_ctl_macro__width_43 ( | |
1322 | din, | |
1323 | l1clk, | |
1324 | scan_in, | |
1325 | siclk, | |
1326 | soclk, | |
1327 | dout, | |
1328 | scan_out); | |
1329 | wire [42:0] fdin; | |
1330 | wire [41:0] so; | |
1331 | ||
1332 | input [42:0] din; | |
1333 | input l1clk; | |
1334 | input scan_in; | |
1335 | ||
1336 | ||
1337 | input siclk; | |
1338 | input soclk; | |
1339 | ||
1340 | output [42:0] dout; | |
1341 | output scan_out; | |
1342 | assign fdin[42:0] = din[42:0]; | |
1343 | ||
1344 | ||
1345 | ||
1346 | ||
1347 | ||
1348 | ||
1349 | dff #(43) d0_0 ( | |
1350 | .l1clk(l1clk), | |
1351 | .siclk(siclk), | |
1352 | .soclk(soclk), | |
1353 | .d(fdin[42:0]), | |
1354 | .si({scan_in,so[41:0]}), | |
1355 | .so({so[41:0],scan_out}), | |
1356 | .q(dout[42:0]) | |
1357 | ); | |
1358 | ||
1359 | ||
1360 | ||
1361 | ||
1362 | ||
1363 | ||
1364 | ||
1365 | ||
1366 | ||
1367 | ||
1368 | ||
1369 | ||
1370 | endmodule | |
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | // any PARAMS parms go into naming of macro | |
1385 | ||
1386 | module fgu_fic_ctl_msff_ctl_macro__width_14 ( | |
1387 | din, | |
1388 | l1clk, | |
1389 | scan_in, | |
1390 | siclk, | |
1391 | soclk, | |
1392 | dout, | |
1393 | scan_out); | |
1394 | wire [13:0] fdin; | |
1395 | wire [12:0] so; | |
1396 | ||
1397 | input [13:0] din; | |
1398 | input l1clk; | |
1399 | input scan_in; | |
1400 | ||
1401 | ||
1402 | input siclk; | |
1403 | input soclk; | |
1404 | ||
1405 | output [13:0] dout; | |
1406 | output scan_out; | |
1407 | assign fdin[13:0] = din[13:0]; | |
1408 | ||
1409 | ||
1410 | ||
1411 | ||
1412 | ||
1413 | ||
1414 | dff #(14) d0_0 ( | |
1415 | .l1clk(l1clk), | |
1416 | .siclk(siclk), | |
1417 | .soclk(soclk), | |
1418 | .d(fdin[13:0]), | |
1419 | .si({scan_in,so[12:0]}), | |
1420 | .so({so[12:0],scan_out}), | |
1421 | .q(dout[13:0]) | |
1422 | ); | |
1423 | ||
1424 | ||
1425 | ||
1426 | ||
1427 | ||
1428 | ||
1429 | ||
1430 | ||
1431 | ||
1432 | ||
1433 | ||
1434 | ||
1435 | endmodule | |
1436 | ||
1437 | ||
1438 | ||
1439 | ||
1440 | ||
1441 | ||
1442 | ||
1443 | ||
1444 | ||
1445 | ||
1446 | ||
1447 | ||
1448 | ||
1449 | // any PARAMS parms go into naming of macro | |
1450 | ||
1451 | module fgu_fic_ctl_msff_ctl_macro__width_2 ( | |
1452 | din, | |
1453 | l1clk, | |
1454 | scan_in, | |
1455 | siclk, | |
1456 | soclk, | |
1457 | dout, | |
1458 | scan_out); | |
1459 | wire [1:0] fdin; | |
1460 | wire [0:0] so; | |
1461 | ||
1462 | input [1:0] din; | |
1463 | input l1clk; | |
1464 | input scan_in; | |
1465 | ||
1466 | ||
1467 | input siclk; | |
1468 | input soclk; | |
1469 | ||
1470 | output [1:0] dout; | |
1471 | output scan_out; | |
1472 | assign fdin[1:0] = din[1:0]; | |
1473 | ||
1474 | ||
1475 | ||
1476 | ||
1477 | ||
1478 | ||
1479 | dff #(2) d0_0 ( | |
1480 | .l1clk(l1clk), | |
1481 | .siclk(siclk), | |
1482 | .soclk(soclk), | |
1483 | .d(fdin[1:0]), | |
1484 | .si({scan_in,so[0:0]}), | |
1485 | .so({so[0:0],scan_out}), | |
1486 | .q(dout[1:0]) | |
1487 | ); | |
1488 | ||
1489 | ||
1490 | ||
1491 | ||
1492 | ||
1493 | ||
1494 | ||
1495 | ||
1496 | ||
1497 | ||
1498 | ||
1499 | ||
1500 | endmodule | |
1501 | ||
1502 | ||
1503 | ||
1504 | ||
1505 | ||
1506 | ||
1507 | ||
1508 | ||
1509 | ||
1510 | ||
1511 | ||
1512 | ||
1513 | ||
1514 | // any PARAMS parms go into naming of macro | |
1515 | ||
1516 | module fgu_fic_ctl_msff_ctl_macro__width_6 ( | |
1517 | din, | |
1518 | l1clk, | |
1519 | scan_in, | |
1520 | siclk, | |
1521 | soclk, | |
1522 | dout, | |
1523 | scan_out); | |
1524 | wire [5:0] fdin; | |
1525 | wire [4:0] so; | |
1526 | ||
1527 | input [5:0] din; | |
1528 | input l1clk; | |
1529 | input scan_in; | |
1530 | ||
1531 | ||
1532 | input siclk; | |
1533 | input soclk; | |
1534 | ||
1535 | output [5:0] dout; | |
1536 | output scan_out; | |
1537 | assign fdin[5:0] = din[5:0]; | |
1538 | ||
1539 | ||
1540 | ||
1541 | ||
1542 | ||
1543 | ||
1544 | dff #(6) d0_0 ( | |
1545 | .l1clk(l1clk), | |
1546 | .siclk(siclk), | |
1547 | .soclk(soclk), | |
1548 | .d(fdin[5:0]), | |
1549 | .si({scan_in,so[4:0]}), | |
1550 | .so({so[4:0],scan_out}), | |
1551 | .q(dout[5:0]) | |
1552 | ); | |
1553 | ||
1554 | ||
1555 | ||
1556 | ||
1557 | ||
1558 | ||
1559 | ||
1560 | ||
1561 | ||
1562 | ||
1563 | ||
1564 | ||
1565 | endmodule | |
1566 | ||
1567 | ||
1568 | ||
1569 | ||
1570 | ||
1571 | ||
1572 | ||
1573 |