aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/arith_map.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-20 20:18:17 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-20 20:18:17 -0700
commitb7a48e3e0f49f09e12a2b394b62256a87c398dbc (patch)
tree9667249b7e1ab86c264f44d0a2f03b326e2763fa /techlibs/ice40/arith_map.v
parentc320abc3f490b09b21804581c2b386c30d186a1e (diff)
parent33960dd3d84b628f6e5de45c112368dc80626457 (diff)
downloadyosys-b7a48e3e0f49f09e12a2b394b62256a87c398dbc.tar.gz
yosys-b7a48e3e0f49f09e12a2b394b62256a87c398dbc.tar.bz2
yosys-b7a48e3e0f49f09e12a2b394b62256a87c398dbc.zip
Merge remote-tracking branch 'origin/master' into xc7dsp
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;