Skip to content

Commit 810be55

Browse files
authored
Merge pull request #1076 from diffblue/part_select2
KNOWNBUG test for part select expression with non-constant index
2 parents 7cfbb43 + eae358e commit 810be55

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
KNOWNBUG
2+
part_select2.sv
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
--
9+
The non constant index for the part select assignment is not supported.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module main(input clk, input [3:0] index);
2+
3+
reg [31:0] t;
4+
5+
always_ff @(posedge clk) begin
6+
// The LHS of the part select does not have to be constant.
7+
t[index*2 +: 2] = 'b01;
8+
9+
// should pass
10+
assert(t[index*2] == 1);
11+
assert(t[index*2+1] == 0);
12+
end
13+
14+
endmodule

0 commit comments

Comments
 (0)