Skip to content

Commit fe49803

Browse files
authored
Merge pull request #241 from diffblue/for_with_reg
Verilog: add a KNOWNBUG test for a for loop over a register
2 parents 214fc99 + 92c8150 commit fe49803

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
KNOWNBUG
2+
for_with_reg.v
3+
--bound 0
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring

regression/verilog/for/for_with_reg.v

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module main(input [7:0] data);
2+
3+
reg [31:0] counter;
4+
reg is_zero;
5+
6+
always @data begin
7+
is_zero = 1;
8+
for(counter = 0; counter < 8; counter = counter + 1)
9+
is_zero = is_zero && (data[counter] == 0);
10+
end
11+
12+
always assert a1: is_zero == (data == 0);
13+
14+
endmodule

0 commit comments

Comments
 (0)