Skip to content

KNOWNBUG test for part select expression with non-constant index #1076

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
Apr 22, 2025
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
9 changes: 9 additions & 0 deletions regression/verilog/synthesis/part_select2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KNOWNBUG
part_select2.sv

^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
The non constant index for the part select assignment is not supported.
14 changes: 14 additions & 0 deletions regression/verilog/synthesis/part_select2.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module main(input clk, input [3:0] index);

reg [31:0] t;

always_ff @(posedge clk) begin
// The LHS of the part select does not have to be constant.
t[index*2 +: 2] = 'b01;

// should pass
assert(t[index*2] == 1);
assert(t[index*2+1] == 0);
end

endmodule
Loading