Added ice40 test_arith
authorClifford Wolf <clifford@clifford.at>
Sat, 18 Apr 2015 07:33:34 +0000 (09:33 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 18 Apr 2015 07:33:34 +0000 (09:33 +0200)
techlibs/ice40/tests/test_arith.v [new file with mode: 0644]
techlibs/ice40/tests/test_arith.ys [new file with mode: 0644]

diff --git a/techlibs/ice40/tests/test_arith.v b/techlibs/ice40/tests/test_arith.v
new file mode 100644 (file)
index 0000000..77f79b9
--- /dev/null
@@ -0,0 +1,3 @@
+module test(input [4:0] a, b, c, output [4:0] y);
+       assign y = ((a+b) ^ (a-c)) - ((a*b) + (a*c) - (b*c));
+endmodule
diff --git a/techlibs/ice40/tests/test_arith.ys b/techlibs/ice40/tests/test_arith.ys
new file mode 100644 (file)
index 0000000..160c767
--- /dev/null
@@ -0,0 +1,10 @@
+read_verilog test_arith.v
+synth_ice40
+techmap -map ../cells_sim.v
+rename test gate
+
+read_verilog test_arith.v
+rename test gold
+
+miter -equiv -flatten -make_outputs gold gate miter
+sat -verify -prove trigger 0 -show-ports miter