aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sva
diff options
context:
space:
mode:
authorJannis Harder <me@jix.one>2022-05-09 16:07:39 +0200
committerGitHub <noreply@github.com>2022-05-09 16:07:39 +0200
commit5ca2ee0c3114464c91743b73efd7c4c4f15fb0dd (patch)
treefa7a31d02a6de07779a4f7b7934fb662c5efc06d /tests/sva
parentd562bfd165b3c107abf717d2661c44aa2b7740fb (diff)
parent96f64f4788ca64adde55421a6abadefd182d9a1a (diff)
downloadyosys-5ca2ee0c3114464c91743b73efd7c4c4f15fb0dd.tar.gz
yosys-5ca2ee0c3114464c91743b73efd7c4c4f15fb0dd.tar.bz2
yosys-5ca2ee0c3114464c91743b73efd7c4c4f15fb0dd.zip
Merge pull request #3297 from jix/sva_nested_clk_else
verific: Fix conditions of SVAs with explicit clocks within procedures
Diffstat (limited to 'tests/sva')
-rw-r--r--tests/sva/nested_clk_else.sv11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/sva/nested_clk_else.sv b/tests/sva/nested_clk_else.sv
new file mode 100644
index 000000000..4421cb36a
--- /dev/null
+++ b/tests/sva/nested_clk_else.sv
@@ -0,0 +1,11 @@
+module top (input clk, a, b);
+ always @(posedge clk) begin
+ if (a);
+ else assume property (@(posedge clk) b);
+ end
+
+`ifndef FAIL
+ assume property (@(posedge clk) !a);
+`endif
+ assert property (@(posedge clk) b);
+endmodule