Skip to content

Commit 7cfbb43

Browse files
authored
Merge pull request #1077 from diffblue/rf
KNOWNBUG test for assignment to packed array with non-zero starting index
2 parents aac75f1 + 5806a49 commit 7cfbb43

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
KNOWNBUG
2+
rf1.sv
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
--
9+
Results in an assertion violation.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
`define W 8
2+
`define R 32
3+
4+
module rf(input clk, input [`W-1:0] data_in, input [`R-1:0] write_enable);
5+
6+
// index 0 is not used
7+
reg [`W*`R-1:`W] registers;
8+
9+
always_ff @(posedge clk) begin
10+
integer r;
11+
for(r=1; r<`R; r++)
12+
if(write_enable[r])
13+
registers[r*`W+:`W] = data_in;
14+
end
15+
16+
always assert property (0);
17+
18+
endmodule

0 commit comments

Comments
 (0)