aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/cells_map.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-16 08:52:14 -0700
committerGitHub <noreply@github.com>2019-07-16 08:52:14 -0700
commitba8ccbdea88fe432187e2481a8525cc1c53b4cf4 (patch)
treece3c29d03229cfb18392f2ddc835ce66056aeee4 /techlibs/ice40/cells_map.v
parenta1a04ea79c4d006baa7204ba5ca77870f45aa633 (diff)
parent5fb27c071bb072644dbb38cf8a516628c2afe15b (diff)
downloadyosys-ba8ccbdea88fe432187e2481a8525cc1c53b4cf4.tar.gz
yosys-ba8ccbdea88fe432187e2481a8525cc1c53b4cf4.tar.bz2
yosys-ba8ccbdea88fe432187e2481a8525cc1c53b4cf4.zip
Merge pull request #1186 from YosysHQ/eddie/abc9_ice40_fix
abc9/ice40: encapsulate SB_CARRY+SB_LUT4 into one box
Diffstat (limited to 'techlibs/ice40/cells_map.v')
-rw-r--r--techlibs/ice40/cells_map.v24
1 files changed, 24 insertions, 0 deletions
diff --git a/techlibs/ice40/cells_map.v b/techlibs/ice40/cells_map.v
index 759549e30..b4b831165 100644
--- a/techlibs/ice40/cells_map.v
+++ b/techlibs/ice40/cells_map.v
@@ -61,3 +61,27 @@ module \$lut (A, Y);
endgenerate
endmodule
`endif
+
+`ifdef _ABC
+module \$__ICE40_FULL_ADDER (output CO, O, input A, B, CI);
+ SB_CARRY carry (
+ .I0(A),
+ .I1(B),
+ .CI(CI),
+ .CO(CO)
+ );
+ 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(A),
+ .I2(B),
+ .I3(CI),
+ .O(O)
+ );
+endmodule
+`endif