data/full_repos/permissive/162646941/src/mem_ex2.v
[Errno 2] No such file or directory: 'preprocess.output'
data/verilator_xmls/fe92c02a-492f-407c-a7d8-54a3f7a3ca83.xml
module mem_ex2(clk,wr_en,data,rd_addr,wr_addr,mem_out);

	input clk,wr_en;
	input [15:0] data;
	input [2:0] rd_addr,wr_addr;
	output reg [15:0] mem_out;

	reg [15:0] mem [0:7];

	always @ (posedge clk)
	begin
	if(wr_en) begin
	mem[wr_addr] <= data;
		end
		mem_out <= mem[rd_addr];
	end

endmodule
module mem_ex2(clk,wr_en,data,rd_addr,wr_addr,mem_out);


	input clk,wr_en;
	input [15:0] data;
	input [2:0] rd_addr,wr_addr;
	output reg [15:0] mem_out;

	reg [15:0] mem [0:7];

	always @ (posedge clk)
	begin
	if(wr_en) begin
	mem[wr_addr] <= data;
		end
		mem_out <= mem[rd_addr];
	end

endmodule