aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/arith_map.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-18 20:36:48 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-18 20:36:48 -0700
commit0157043b977e3b6715a6a568eb72aea247457eb0 (patch)
treedea7eb229e23424e4ed3226c9c4e27f565c6b233 /techlibs/ice40/arith_map.v
parent802470746c320676d61431d420e33d34c239da84 (diff)
parent9cb0456b6f9fa86240a747bab9780a28001b1a02 (diff)
downloadyosys-0157043b977e3b6715a6a568eb72aea247457eb0.tar.gz
yosys-0157043b977e3b6715a6a568eb72aea247457eb0.tar.bz2
yosys-0157043b977e3b6715a6a568eb72aea247457eb0.zip
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'techlibs/ice40/arith_map.v')
-rw-r--r--techlibs/ice40/arith_map.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/techlibs/ice40/arith_map.v b/techlibs/ice40/arith_map.v
index 4449fdc1b..fe83a8e38 100644
--- a/techlibs/ice40/arith_map.v
+++ b/techlibs/ice40/arith_map.v
@@ -44,6 +44,15 @@ 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 (
+ .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]),
@@ -63,6 +72,7 @@ module _80_ice40_alu (A, B, CI, BI, X, Y, CO);
.I3(C[i]),
.O(Y[i])
);
+`endif
end endgenerate
assign X = AA ^ BB;