aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/arith_map.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-18 21:29:15 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-18 21:29:15 -0700
commite34f2de55d9d1ec8cbdd9c1f3e27af678f0fc2df (patch)
tree74c0b3ba63fdd678fcfc839dd6d0d39d43cef365 /techlibs/ice40/arith_map.v
parentf5170a7eda6fddaf482896a2ad67da4bb3131d7b (diff)
parent98a54353b7d893752d856b3726853d4921c6aa1f (diff)
downloadyosys-e34f2de55d9d1ec8cbdd9c1f3e27af678f0fc2df.tar.gz
yosys-e34f2de55d9d1ec8cbdd9c1f3e27af678f0fc2df.tar.bz2
yosys-e34f2de55d9d1ec8cbdd9c1f3e27af678f0fc2df.zip
Merge remote-tracking branch 'origin/master' into clifford/testfast
Diffstat (limited to 'techlibs/ice40/arith_map.v')
-rw-r--r--techlibs/ice40/arith_map.v30
1 files changed, 8 insertions, 22 deletions
diff --git a/techlibs/ice40/arith_map.v b/techlibs/ice40/arith_map.v
index fe83a8e38..26b24db9e 100644
--- a/techlibs/ice40/arith_map.v
+++ b/techlibs/ice40/arith_map.v
@@ -44,35 +44,21 @@ module _80_ice40_alu (A, B, CI, BI, X, Y, CO);
genvar i;
generate for (i = 0; i < Y_WIDTH; i = i + 1) begin:slice
-`ifdef _ABC
- \$__ICE40_FULL_ADDER carry (
+ \$__ICE40_CARRY_WRAPPER #(
+ // A[0]: 1010 1010 1010 1010
+ // A[1]: 1100 1100 1100 1100
+ // A[2]: 1111 0000 1111 0000
+ // A[3]: 1111 1111 0000 0000
+ .LUT(16'b 0110_1001_1001_0110)
+ ) fadd (
.A(AA[i]),
.B(BB[i]),
.CI(C[i]),
- .CO(CO[i]),
- .O(Y[i])
- );
-`else
- SB_CARRY carry (
- .I0(AA[i]),
- .I1(BB[i]),
- .CI(C[i]),
- .CO(CO[i])
- );
- SB_LUT4 #(
- // I0: 1010 1010 1010 1010
- // I1: 1100 1100 1100 1100
- // I2: 1111 0000 1111 0000
- // I3: 1111 1111 0000 0000
- .LUT_INIT(16'b 0110_1001_1001_0110)
- ) adder (
.I0(1'b0),
- .I1(AA[i]),
- .I2(BB[i]),
.I3(C[i]),
+ .CO(CO[i]),
.O(Y[i])
);
-`endif
end endgenerate
assign X = AA ^ BB;