mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-03 16:39:06 +02:00
support const declarations of alias types
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
module top;
|
||||
typedef struct packed { integer y, z; } T;
|
||||
// TODO iverilog doesn't allow references to variables in initializers
|
||||
// if (1) begin : blk
|
||||
// integer a = 11;
|
||||
// integer b = 12;
|
||||
const integer w = 11;
|
||||
const T x = '{ y: 11, z: 12 };
|
||||
initial $display("%b %b %b %b", w, x, x.y, x.z);
|
||||
endmodule
|
||||
@@ -0,0 +1,5 @@
|
||||
module top;
|
||||
integer w = 11;
|
||||
wire [63:0] x = { 32'd11, 32'd12 };
|
||||
initial $display("%b %b %b %b", w, x, x[32+:32], x[0+:32]);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user