Skip to content
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

Strengthen ring_buffer induction test #809

Merged
merged 1 commit into from
Nov 13, 2024
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
10 changes: 10 additions & 0 deletions regression/ebmc/k-induction/ring_buffer.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
ring_buffer.sv
--k-induction
^\[ring_buffer\.assume\.1\] always \(ring_buffer\.empty \|-> !ring_buffer\.read\): ASSUMED$
^\[ring_buffer\.assume\.2\] always \(ring_buffer\.full \|-> !ring_buffer\.write\): ASSUMED$
^\[ring_buffer\.p0\] always \(ring_buffer\.writeptr - ring_buffer\.readptr & 15\) == ring_buffer\.count\[3:0\]: PROVED$
^\[ring_buffer\.p1\] always ring_buffer\.count <= 16: PROVED$
^\[ring_buffer\.p2\] always ring_buffer.count != 17: INCONCLUSIVE$
^EXIT=10$
^SIGNAL=0$
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ module ring_buffer(input clk, input read, input write);

end

wire full=count==15;
wire full=count==16;
wire empty=count==0;

assume property (empty |-> !read);
assume property (full |-> !write);

assert property (((writeptr-readptr)&'b1111)==count);
p0: assert property (((writeptr-readptr)&'b1111)==count[3:0]);
p1: assert property (count <= 16);
p2: assert property (count != 17);

endmodule

8 changes: 0 additions & 8 deletions regression/ebmc/ring_buffer_induction/test.desc

This file was deleted.

Loading