aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/cells_sim.v
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-08-30 13:57:15 +0100
committerDavid Shah <dave@ds0.me>2019-08-30 13:57:15 +0100
commit6919c0f9b010c94a0a1a31cd788301e78a1bcbfb (patch)
tree4780799b6c1dc1d150b80aa142e6c53e06760cb3 /techlibs/ice40/cells_sim.v
parentedff79a25a802e5b1816608b48e3ac335ad87147 (diff)
parent694e30a35426b9582a1f2db730528d4d34305795 (diff)
downloadyosys-6919c0f9b010c94a0a1a31cd788301e78a1bcbfb.tar.gz
yosys-6919c0f9b010c94a0a1a31cd788301e78a1bcbfb.tar.bz2
yosys-6919c0f9b010c94a0a1a31cd788301e78a1bcbfb.zip
Merge branch 'master' into xc7dsp
Diffstat (limited to 'techlibs/ice40/cells_sim.v')
-rw-r--r--techlibs/ice40/cells_sim.v23
1 files changed, 14 insertions, 9 deletions
diff --git a/techlibs/ice40/cells_sim.v b/techlibs/ice40/cells_sim.v
index 2205be27d..2a7487f6b 100644
--- a/techlibs/ice40/cells_sim.v
+++ b/techlibs/ice40/cells_sim.v
@@ -141,8 +141,17 @@ module SB_CARRY (output CO, input I0, I1, CI);
assign CO = (I0 && I1) || ((I0 || I1) && CI);
endmodule
-(* abc_box_id = 1, abc_carry="CI,CO", lib_whitebox *)
-module \$__ICE40_FULL_ADDER (output CO, O, input A, B, CI);
+(* abc_box_id = 1, lib_whitebox *)
+module \$__ICE40_CARRY_WRAPPER (
+ (* abc_carry *)
+ output CO,
+ output O,
+ input A, B,
+ (* abc_carry *)
+ input CI,
+ input I0, I3
+);
+ parameter LUT = 0;
SB_CARRY carry (
.I0(A),
.I1(B),
@@ -150,16 +159,12 @@ module \$__ICE40_FULL_ADDER (output CO, O, input A, B, 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)
+ .LUT_INIT(LUT)
) adder (
- .I0(1'b0),
+ .I0(I0),
.I1(A),
.I2(B),
- .I3(CI),
+ .I3(I3),
.O(O)
);
endmodule