mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-05 01:03:02 +02:00
fix type propagation of struct fields bit accesses
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
module Example(data, p1, p2, out_x, out_y);
|
||||
input wire [31:0] data;
|
||||
input wire p1, p2;
|
||||
output wire [3:0] out_x;
|
||||
output wire [3:0] out_y;
|
||||
|
||||
assign out_x = p2 ? data[p1 * 8 + 20 +:4] : data[p1 * 8 + 16 +:4];
|
||||
assign out_y = p2 ? data[p1 * 8 + 4 +:4] : data[p1 * 8 + 0 +:4];
|
||||
endmodule
|
||||
Reference in New Issue
Block a user