aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/abc9_model.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-10-04 16:58:55 -0700
committerEddie Hung <eddie@fpgeh.com>2019-10-04 16:58:55 -0700
commit7a45cd58566310f623bd567a393beb8a734ebf60 (patch)
tree3f97ec0e46c9f01db76e3f239140ce828b14b453 /techlibs/ice40/abc9_model.v
parent549d6ea467bddba24cc0ee43597b5ab62eb476e7 (diff)
parentaae2b9fd9c8dc915fadacc24962436dd7aedff36 (diff)
downloadyosys-7a45cd58566310f623bd567a393beb8a734ebf60.tar.gz
yosys-7a45cd58566310f623bd567a393beb8a734ebf60.tar.bz2
yosys-7a45cd58566310f623bd567a393beb8a734ebf60.zip
Merge remote-tracking branch 'origin/eddie/abc_to_abc9' into xaig_dff
Diffstat (limited to 'techlibs/ice40/abc9_model.v')
-rw-r--r--techlibs/ice40/abc9_model.v27
1 files changed, 27 insertions, 0 deletions
diff --git a/techlibs/ice40/abc9_model.v b/techlibs/ice40/abc9_model.v
new file mode 100644
index 000000000..26cf6cc22
--- /dev/null
+++ b/techlibs/ice40/abc9_model.v
@@ -0,0 +1,27 @@
+(* abc9_box_id = 1, lib_whitebox *)
+module \$__ICE40_CARRY_WRAPPER (
+ (* abc9_carry *)
+ output CO,
+ output O,
+ input A, B,
+ (* abc9_carry *)
+ input CI,
+ input I0, I3
+);
+ parameter LUT = 0;
+ SB_CARRY carry (
+ .I0(A),
+ .I1(B),
+ .CI(CI),
+ .CO(CO)
+ );
+ SB_LUT4 #(
+ .LUT_INIT(LUT)
+ ) adder (
+ .I0(I0),
+ .I1(A),
+ .I2(B),
+ .I3(I3),
+ .O(O)
+ );
+endmodule