aboutsummaryrefslogtreecommitdiffstats
path: root/tests/svtypes/typedef_memory.sv
blob: 577e484adaf1875953ad7192ca2484731aae8a4e (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] ram16x4_t[0:15];

	(ram16x4_t) mem;

	always @(posedge clk) begin
		if (wen) mem[addr] <= wdata;
		rdata <= mem[addr];
	end
endmodule