data/full_repos/permissive/177039499/memory/data-mem.v
1: b'%Warning-WIDTH: data/full_repos/permissive/177039499/memory/data-mem.v:25: Bit extraction of array[1023:0] requires 10 bit index, not 16 bits.\n                                                                         : ... In instance dataMem\n   memory[address[17:2]] <= write_data[31:0];\n         ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Error: Exiting due to 1 warning(s)\n'
module dataMem(
    input  wire        clk,
    input  wire        reset,
    input  wire        mem_write,
    input  wire [31:0] address,
    input  wire [31:0] write_data,
    output wire [31:0] read_data
);

    reg	[31:0] memory [1023:0];

	assign read_data = memory[address[11:2]];

    always @(posedge clk) begin
        if (reset)
            $readmemh("memory/data.txt",memory);
    end

    always @(negedge clk) begin
        if (mem_write)
			memory[address[17:2]] <= write_data[31:0];
	end
    
endmodule
module dataMem(
    input  wire        clk,
    input  wire        reset,
    input  wire        mem_write,
    input  wire [31:0] address,
    input  wire [31:0] write_data,
    output wire [31:0] read_data
);


    reg	[31:0] memory [1023:0];

	assign read_data = memory[address[11:2]];

    always @(posedge clk) begin
        if (reset)
            $readmemh("memory/data.txt",memory);
    end

    always @(negedge clk) begin
        if (mem_write)
			memory[address[17:2]] <= write_data[31:0];
	end
    
endmodule