diff options
Diffstat (limited to 'tests/svtypes/typedef_memory_2.sv')
-rw-r--r-- | tests/svtypes/typedef_memory_2.sv | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/svtypes/typedef_memory_2.sv b/tests/svtypes/typedef_memory_2.sv new file mode 100644 index 000000000..1e8abb155 --- /dev/null +++ b/tests/svtypes/typedef_memory_2.sv @@ -0,0 +1,10 @@ +module top(input [3:0] addr, wdata, input clk, wen, output reg [3:0] rdata); + typedef logic [3:0] nibble; + + nibble mem[0:15]; + + always @(posedge clk) begin + if (wen) mem[addr] <= wdata; + rdata <= mem[addr]; + end +endmodule
\ No newline at end of file |