Skip to content

Verilog: add a KNOWNBUG test for a for loop over a register #241

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
Dec 4, 2023
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
7 changes: 7 additions & 0 deletions regression/verilog/for/for_with_reg.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
KNOWNBUG
for_with_reg.v
--bound 0
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
14 changes: 14 additions & 0 deletions regression/verilog/for/for_with_reg.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module main(input [7:0] data);

reg [31:0] counter;
reg is_zero;

always @data begin
is_zero = 1;
for(counter = 0; counter < 8; counter = counter + 1)
is_zero = is_zero && (data[counter] == 0);
end

always assert a1: is_zero == (data == 0);

endmodule