aboutsummaryrefslogtreecommitdiffstats
path: root/tests/svtypes/typedef_memory_2.sv
blob: 6d65131db21b01372076e053c3df0805705b73f5 (plain)
1
2
3
4
5
6
7
8
9
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