Merge pull request #1900 from Xiretza/suppress-makefile-echo
[yosys.git] / techlibs / ice40 / abc9_model.v
1 (* abc9_box, lib_whitebox *)
2 module \$__ICE40_CARRY_WRAPPER (
3 (* abc9_carry *)
4 output CO,
5 output O,
6 input A, B,
7 (* abc9_carry *)
8 input CI,
9 input I0, I3
10 );
11 parameter LUT = 0;
12 parameter I3_IS_CI = 0;
13 wire I3_OR_CI = I3_IS_CI ? CI : I3;
14 SB_CARRY carry (
15 .I0(A),
16 .I1(B),
17 .CI(CI),
18 .CO(CO)
19 );
20 SB_LUT4 #(
21 .LUT_INIT(LUT)
22 ) adder (
23 .I0(I0),
24 .I1(A),
25 .I2(B),
26 .I3(I3_OR_CI),
27 .O(O)
28 );
29 `ifdef ICE40_HX
30 specify
31 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L79
32 (CI => CO) = (126, 105);
33 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L80
34 (I0 => O) = (449, 386);
35 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L82
36 (A => CO) = (259, 245);
37 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L83
38 (A => O) = (400, 379);
39 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L85
40 (B => CO) = (231, 133);
41 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L86
42 (B => O) = (379, 351);
43 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_hx1k.txt#L88
44 (I3 => O) = (316, 288);
45 (CI => O) = (316, 288);
46 endspecify
47 `endif
48 `ifdef ICE40_LP
49 specify
50 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L79
51 (CI => CO) = (186, 155);
52 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L80
53 (I0 => O) = (662, 569);
54 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L82
55 (A => CO) = (382, 362);
56 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L83
57 (A => O) = (589, 558);
58 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L85
59 (B => CO) = (341, 196);
60 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L86
61 (B => O) = (558, 517);
62 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_lp1k.txt#L88
63 (I3 => O) = (465, 423);
64 (CI => O) = (465, 423);
65 endspecify
66 `endif
67 `ifdef ICE40_U
68 specify
69 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L91
70 (CI => CO) = (278, 278);
71 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L92
72 (I0 => O) = (1245, 1285);
73 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L94
74 (A => CO) = (675, 662);
75 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L95
76 (A => O) = (1179, 1232);
77 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L97
78 (B => CO) = (609, 358);
79 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L98
80 (B => O) = (1179, 1205);
81 // https://github.com/cliffordwolf/icestorm/blob/be0bca0230d6fe1102e0a360b953fbb0d273a39f/icefuzz/timings_up5k.txt#L100
82 (I3 => O) = (861, 874);
83 (CI => O) = (861, 874);
84 endspecify
85 `endif
86 endmodule