aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJannis Harder <me@jix.one>2023-02-14 17:46:31 +0100
committerGitHub <noreply@github.com>2023-02-14 17:46:31 +0100
commitec947036191bce7ef020c240fbdb8d6fdcf572b6 (patch)
tree5cffe4f8a53459a0f617a33ba4839c67860c585b /tests
parent85f611fb23ea6f10505299a2f2329e2efedd1dbc (diff)
parentb636af9751993bd35f02f56e68e63a4ef715aa4e (diff)
downloadyosys-ec947036191bce7ef020c240fbdb8d6fdcf572b6.tar.gz
yosys-ec947036191bce7ef020c240fbdb8d6fdcf572b6.tar.bz2
yosys-ec947036191bce7ef020c240fbdb8d6fdcf572b6.zip
Merge pull request #2995 from georgerennie/cover_precond
chformal: Add -coverenable option
Diffstat (limited to 'tests')
-rw-r--r--tests/various/chformal_coverenable.ys25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/various/chformal_coverenable.ys b/tests/various/chformal_coverenable.ys
new file mode 100644
index 000000000..52b3ee6bf
--- /dev/null
+++ b/tests/various/chformal_coverenable.ys
@@ -0,0 +1,25 @@
+read_verilog -formal <<EOT
+module top(input a, b, c, d);
+
+ always @* begin
+ if (a) assert (b == c);
+ if (!a) assert (b != c);
+ if (b) assume (c);
+ if (c) cover (d);
+ end
+
+endmodule
+EOT
+
+prep -top top
+
+select -assert-count 1 t:$cover
+
+chformal -cover -coverenable
+select -assert-count 2 t:$cover
+
+chformal -assert -coverenable
+select -assert-count 4 t:$cover
+
+chformal -assume -coverenable
+select -assert-count 5 t:$cover