mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-07 19:56:44 +02:00
fix double multipack conversion of Exprs in LHSs
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
module top;
|
||||
logic [3:0][7:0] arr;
|
||||
logic [3:0][1:0] idx;
|
||||
assign idx = { 2'b01, 2'b11, 2'b00, 2'b10 };
|
||||
initial begin
|
||||
arr[idx[0]] = 8'hDE;
|
||||
arr[idx[1]] = 8'hAD;
|
||||
arr[idx[2]] = 8'hBE;
|
||||
arr[idx[3]] = 8'hEF;
|
||||
$display("%h", arr);
|
||||
end
|
||||
endmodule
|
||||
@@ -0,0 +1,12 @@
|
||||
module top;
|
||||
reg [31:0] arr;
|
||||
wire [7:0] idx;
|
||||
assign idx = { 2'b01, 2'b11, 2'b00, 2'b10 };
|
||||
initial begin
|
||||
arr[idx[0 * 2 +: 2] * 8 +: 8] = 8'hDE;
|
||||
arr[idx[1 * 2 +: 2] * 8 +: 8] = 8'hAD;
|
||||
arr[idx[2 * 2 +: 2] * 8 +: 8] = 8'hBE;
|
||||
arr[idx[3 * 2 +: 2] * 8 +: 8] = 8'hEF;
|
||||
$display("%h", arr);
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user