Skip to content

Commit 8430840

Browse files
committed
Verilog: test for assignment to indexed part select
This adds a test for an assignment to an indexed part select with constant indices.
1 parent f3569b9 commit 8430840

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
indexed-part-select5.sv
3+
--bound 0
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
--
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module main(input my_input);
2+
3+
bit [7:0] some_wire;
4+
5+
always @my_input begin
6+
some_wire[0 +: 2] = 'b01;
7+
some_wire[2 +: 2] = 'b01;
8+
some_wire[4 +: 2] = 'b01;
9+
some_wire[6 +: 2] = 'b01;
10+
end
11+
12+
p0: assert final (some_wire == 'b01_01_01_01);
13+
14+
endmodule

0 commit comments

Comments
 (0)