aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJannis Harder <me@jix.one>2023-02-14 17:15:55 +0100
committerGitHub <noreply@github.com>2023-02-14 17:15:55 +0100
commit85f611fb23ea6f10505299a2f2329e2efedd1dbc (patch)
tree23f9e752033dc542dc6583cf9e45b81028c0313d /tests
parentf37073050b5628aaf6b95f41068f84bc2fc3722e (diff)
parentfbf5d89587decd2886d501d8c6e1cde076a5476f (diff)
downloadyosys-85f611fb23ea6f10505299a2f2329e2efedd1dbc.tar.gz
yosys-85f611fb23ea6f10505299a2f2329e2efedd1dbc.tar.bz2
yosys-85f611fb23ea6f10505299a2f2329e2efedd1dbc.zip
Merge pull request #3126 from georgerennie/equiv_make_assertions
equiv_make: Add -make_assert option
Diffstat (limited to 'tests')
-rw-r--r--tests/various/equiv_make_make_assert.ys32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/various/equiv_make_make_assert.ys b/tests/various/equiv_make_make_assert.ys
new file mode 100644
index 000000000..1c2efa723
--- /dev/null
+++ b/tests/various/equiv_make_make_assert.ys
@@ -0,0 +1,32 @@
+read_verilog <<EOT
+module gold(
+ input wire [7:0] a,
+ input wire [7:0] b,
+ output wire [7:0] c
+);
+
+wire [7:0] b_neg;
+assign b_neg = -b;
+assign c = a + b_neg;
+endmodule
+
+module gate(
+ input wire [7:0] a,
+ input wire [7:0] b,
+ output wire [7:0] c
+);
+
+wire [7:0] b_neg;
+assign b_neg = ~b + 1;
+assign c = a + b_neg;
+endmodule
+
+EOT
+
+equiv_make -make_assert gold gate miter
+
+select -assert-count 0 t:$equiv
+select -assert-count 2 t:$assert
+
+prep -top miter
+sat -prove-asserts -verify