aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/arith_map.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-18 15:45:25 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-18 15:45:25 -0700
commit42e40dbd0a513d430ff0a463f9a80dedfbbf51f5 (patch)
tree5cf69498d43b8d225e28cf5562f91c3a4a94f814 /techlibs/ice40/arith_map.v
parent09411dd996f75dbce22a6f6979b7d61b0dae24f7 (diff)
parente66e8fb59d8443c8d55c1185d6b2ce889a35357d (diff)
downloadyosys-42e40dbd0a513d430ff0a463f9a80dedfbbf51f5.tar.gz
yosys-42e40dbd0a513d430ff0a463f9a80dedfbbf51f5.tar.bz2
yosys-42e40dbd0a513d430ff0a463f9a80dedfbbf51f5.zip
Merge remote-tracking branch 'origin/master' into ice40dsp
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;