fix package resolution of nested typedefs (resolves #11)

This commit is contained in:
Zachary Snow
2019-08-27 21:32:03 -04:00
parent 737791aebd
commit fabdc08493
5 changed files with 32 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
package foo_pkg;
typedef struct packed {
logic [7:0] rsvd;
logic [7:0] parity;
} user_t;
typedef struct packed {
logic valid;
user_t user;
} inp_t;
typedef struct packed {
logic valid;
logic opcode;
} out_t;
endpackage
module top (
input foo_pkg::inp_t dat_i,
output foo_pkg::out_t dat_o
);
endmodule
+4
View File
@@ -0,0 +1,4 @@
module top (dat_i, dat_o);
input wire [16:0] dat_i;
output wire [1:0] dat_o;
endmodule