mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-01 05:29:29 +00:00
Merge pull request #5389 from jix/sva_continue
verific: New `-sva-continue-on-error` import option
This commit is contained in:
commit
6a7372626a
7 changed files with 187 additions and 27 deletions
38
tests/verific/sva_continue_on_err.ys
Normal file
38
tests/verific/sva_continue_on_err.ys
Normal file
|
@ -0,0 +1,38 @@
|
|||
verific -sv <<EOF
|
||||
module top(input clk, input a, input b);
|
||||
|
||||
prop_supported: assert property (@(posedge clk) a ##1 b |=> b);
|
||||
prop_unsupported1: assert property (@(posedge clk) a ##1 b #=# b);
|
||||
prop_unsupported2: assert property (@(posedge clk) a ##1 @(posedge b) ##1 a);
|
||||
|
||||
sequence local_var_seq;
|
||||
logic v;
|
||||
(1, v = a) ##1 b ##1 (v == a);
|
||||
endsequence
|
||||
|
||||
prop_unsupported3: assert property (@(posedge clk) local_var_seq);
|
||||
|
||||
endmodule
|
||||
EOF
|
||||
|
||||
logger -expect warning "Mixed clocking is currently not supported" 1
|
||||
logger -expect warning "Verific SVA primitive sva_non_overlapped_followed_by .* is currently unsupported in this context" 1
|
||||
logger -expect warning "SVA sequences with local variable assignments are currently not supported" 1
|
||||
logger -expect warning "Encountered 3 items containing unsupported SVA" 1
|
||||
verific -import -sva-continue-on-err top
|
||||
logger -check-expected
|
||||
|
||||
select -assert-count 4 top/t:$assert
|
||||
select -assert-count 4 top/a:unsupported_sva top/prop_supported %% top/t:$assert %i
|
||||
|
||||
select -assert-count 3 top/a:unsupported_sva
|
||||
select -assert-count 3 top/a:unsupported_sva top/prop_unsupported* %i
|
||||
select -assert-count 1 top/a:unsupported_sva top/prop_unsupported1 %i
|
||||
select -assert-count 1 top/a:unsupported_sva top/prop_unsupported2 %i
|
||||
select -assert-count 1 top/a:unsupported_sva top/prop_unsupported3 %i
|
||||
select -assert-count 0 top/a:unsupported_sva top/prop_supported %i
|
||||
select -assert-count 1 top/prop_supported
|
||||
|
||||
logger -expect error "uses unsupported SVA constructs." 1
|
||||
hierarchy -smtcheck -top top
|
||||
logger -check-expected
|
31
tests/verific/sva_continue_on_err_explosion.ys
Normal file
31
tests/verific/sva_continue_on_err_explosion.ys
Normal file
|
@ -0,0 +1,31 @@
|
|||
verific -sv <<EOF
|
||||
module top(input clk, input a, input b);
|
||||
|
||||
prop_supported1: assert property (@(posedge clk) a ##1 b |=> b);
|
||||
|
||||
prop_exploding: assert property (@(posedge clk)
|
||||
((a [*7] ##1 b) [*11]) and
|
||||
((a [*11] ##1 b) [*7]) and
|
||||
((a [*13] ##1 b) [*5]) and
|
||||
((a [*5] ##1 b) [*13])
|
||||
);
|
||||
|
||||
prop_supported2: assert property (@(posedge clk) a [*5] ##1 b |=> b);
|
||||
|
||||
endmodule
|
||||
EOF
|
||||
|
||||
logger -expect warning "Stopping to prevent exponential design size explosion." 1
|
||||
verific -import -sva-continue-on-err top
|
||||
logger -check-expected
|
||||
|
||||
select -assert-count 3 top/t:$assert
|
||||
select -assert-count 1 top/a:unsupported_sva top/prop_exploding %% top/t:$assert %i
|
||||
|
||||
select -assert-count 0 top/a:unsupported_sva top/prop_supported1 %i
|
||||
select -assert-count 0 top/a:unsupported_sva top/prop_supported2 %i
|
||||
select -assert-count 2 top/prop_supported*
|
||||
|
||||
logger -expect error "uses unsupported SVA constructs." 1
|
||||
hierarchy -smtcheck -top top
|
||||
logger -check-expected
|
9
tests/verific/sva_no_continue_on_err.ys
Normal file
9
tests/verific/sva_no_continue_on_err.ys
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
verific -sv <<EOF
|
||||
module top(input clk, input a, input b);
|
||||
prop_unsupported: assert property (@(posedge clk) a ##1 @(posedge b) ##1 a);
|
||||
endmodule;
|
||||
EOF
|
||||
|
||||
logger -expect error "Mixed clocking is currently not supported" 1
|
||||
verific -import top
|
Loading…
Add table
Add a link
Reference in a new issue