# Pastebin 0599yYSp reg [W-1:0] mem[0:N-1]; always @(posedge clk) begin if(wen) mem[addr] <= wdata; rdata <= mem[addr]; end