data/full_repos/permissive/474721296/mem/mem.v
1: b'%Error: data/full_repos/permissive/474721296/mem/mem.v:21: Define or directive not defined: \'`MEMFILE\'\n  memfile = $fopen(`MEMFILE, "r");\n                   ^~~~~~~~\n%Error: data/full_repos/permissive/474721296/mem/mem.v:21: syntax error, unexpected \',\', expecting TYPE-IDENTIFIER\n  memfile = $fopen(`MEMFILE, "r");\n                           ^\n%Error: Exiting due to 2 error(s)\n'
module mem(
		input clock,
		input write,
		input[7:0] address,
		input[7:0] in_bus,
		output[7:0] out_bus
	);

	wire[7:0] in_bus;
	reg[7:0] out_bus;

	reg[7:0] memory[255:0];

	integer memfile, read;
	initial begin
		memfile = $fopen(`MEMFILE, "r");
		read = $fread(memory, memfile);
		$fclose(memfile);
	end

	always @(posedge clock) begin
		if (write)
			memory[address] <= in_bus;
		out_bus <= memory[address];
	end
endmodule
module mem(
		input clock,
		input write,
		input[7:0] address,
		input[7:0] in_bus,
		output[7:0] out_bus
	);


	wire[7:0] in_bus;
	reg[7:0] out_bus;

	reg[7:0] memory[255:0];

	integer memfile, read;
	initial begin
		memfile = $fopen(`MEMFILE, "r");
		read = $fread(memory, memfile);
		$fclose(memfile);
	end

	always @(posedge clock) begin
		if (write)
			memory[address] <= in_bus;
		out_bus <= memory[address];
	end
endmodule