aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ice40
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-28 18:44:57 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-28 18:46:53 -0700
commite301a3dadbc81a300443713cf7877ea24cc0b2b2 (patch)
treeda6a6d6a6cdd8e3f3cfb946d274f18b92daca0d1 /tests/ice40
parentdd42aa87b9b3bb041cbfe49079c6538f0a6d5646 (diff)
downloadyosys-e301a3dadbc81a300443713cf7877ea24cc0b2b2.tar.gz
yosys-e301a3dadbc81a300443713cf7877ea24cc0b2b2.tar.bz2
yosys-e301a3dadbc81a300443713cf7877ea24cc0b2b2.zip
Add SB_CARRY to ice40_opt test
Diffstat (limited to 'tests/ice40')
-rw-r--r--tests/ice40/ice40_opt.ys8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/ice40/ice40_opt.ys b/tests/ice40/ice40_opt.ys
index 18e0d2b8a..b17c69c91 100644
--- a/tests/ice40/ice40_opt.ys
+++ b/tests/ice40/ice40_opt.ys
@@ -1,5 +1,5 @@
read_verilog -icells -formal <<EOT
-module top(input CI, I0, output CO, O);
+module top(input CI, I0, output [1:0] CO, output O);
wire A = 1'b0, B = 1'b0;
\$__ICE40_CARRY_WRAPPER #(
// A[0]: 1010 1010 1010 1010
@@ -7,18 +7,20 @@ module top(input CI, I0, output CO, O);
// A[2]: 1111 0000 1111 0000
// A[3]: 1111 1111 0000 0000
.LUT(~16'b 0110_1001_1001_0110)
- ) fadd (
+ ) u0 (
.A(A),
.B(B),
.CI(CI),
.I0(I0),
.I3(CI),
- .CO(CO),
+ .CO(CO[0]),
.O(O)
);
+ SB_CARRY u1 (.I0(~A), .I1(~B), .CI(CI), .CO(CO[1]));
endmodule
EOT
equiv_opt -assert -map +/ice40/cells_map.v -map +/ice40/cells_sim.v ice40_opt
design -load postopt
+select -assert-count 1 t:*
select -assert-count 1 t:$lut