Skip to content

Tests for ##[*] and ##[+] with LHS #1237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions regression/verilog/SVA/cycle_delay_plus4.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
cycle_delay_plus4.sv
--bound 10
^\[main\.p0\] main\.x == 0 ##\[\+\] main\.x == 1: PROVED up to bound 10$
^\[main\.p1\] main\.x == 0 ##\[\+\] main\.x == 2: PROVED up to bound 10$
^\[main\.p2\] main\.x == 1 ##\[\+\] main\.x == 1: REFUTED$
^\[main\.p3\] main\.x == 0 ##\[\+\] main\.x == 6: PROVED up to bound 10$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
22 changes: 22 additions & 0 deletions regression/verilog/SVA/cycle_delay_plus4.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module main;

reg [31:0] x;
wire clk;

initial x=0;

always @(posedge clk)
if(x < 5)
x<=x+1;

// Should pass
initial p0: assert property (x==0 ##[+] x==1);
initial p1: assert property (x==0 ##[+] x==2);

// Should fail
initial p2: assert property (x==1 ##[+] x==1);

// Shoud pass, owing to weak sequence semantics
initial p3: assert property (x==0 ##[+] x==6);

endmodule
13 changes: 13 additions & 0 deletions regression/verilog/SVA/cycle_delay_star4.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CORE
cycle_delay_star4.sv
--bound 10
^\[main\.p0\] main\.x == 0 ##\[\*\] main\.x == 0: PROVED up to bound 10$
^\[main\.p1\] main\.x == 0 ##\[\*\] main\.x == 1: PROVED up to bound 10$
^\[main\.p2\] main\.x == 0 ##\[\*\] main\.x == 2: PROVED up to bound 10$
^\[main\.p3\] main\.x == 1 ##\[\*\] main\.x == 1: REFUTED$
^\[main\.p4\] main\.x == 0 ##\[\*\] main\.x == 6: PROVED up to bound 10$
^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
--
23 changes: 23 additions & 0 deletions regression/verilog/SVA/cycle_delay_star4.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module main;

reg [31:0] x;
wire clk;

initial x=0;

always @(posedge clk)
if(x < 5)
x<=x+1;

// Should pass
initial p0: assert property (x==0 ##[*] x==0);
initial p1: assert property (x==0 ##[*] x==1);
initial p2: assert property (x==0 ##[*] x==2);

// Should fail
initial p3: assert property (x==1 ##[*] x==1);

// Shoud pass, owing to weak sequence semantics
initial p4: assert property (x==0 ##[*] x==6);

endmodule
Loading