fix type propagation of struct fields bit accesses

This commit is contained in:
Zachary Snow
2020-02-20 00:19:14 -05:00
parent 470fa01eb2
commit a415d9eb3d
4 changed files with 66 additions and 1 deletions
+9
View File
@@ -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