data/full_repos/permissive/194847941/demo/12_game/sources/rtl/mcu/rom.v
1: b'%Warning-WIDTH: data/full_repos/permissive/194847941/demo/12_game/sources/rtl/mcu/rom.v:52: Bit extraction of array[32767:0] requires 15 bit index, not 24 bits.\n                                                                                          : ... In instance rom\n        rom_reg[rom_waddr] <= rom_wdata;\n               ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/194847941/demo/12_game/sources/rtl/mcu/rom.v:59: Bit extraction of array[32767:0] requires 15 bit index, not 24 bits.\n                                                                                          : ... In instance rom\n        rom_rdata <= rom_reg[rom_raddr];\n                            ^\n%Error: Exiting due to 2 warning(s)\n'
module rom
#(
  parameter Len = 32768
)
(
    input   wire		clk,
    

    input   wire		rom_wen,
    input   wire [23:0]	rom_waddr,
    input   wire [7:0]	rom_wdata,
    

    input   wire		rom_ren,
    input   wire [23:0]	rom_raddr,
    output  reg	 [7:0]	rom_rdata
);

reg [7:0] rom_reg [0:Len-1];


initial
begin
    $readmemh("./sources/rtl/mcu/rom.o",rom_reg);
end


always@(posedge clk)
begin
    if(rom_wen)
        rom_reg[rom_waddr] <= rom_wdata;
end


always@(posedge clk)
begin
    if(rom_ren)
        rom_rdata <= rom_reg[rom_raddr];
end

endmodule
module rom
#(
  parameter Len = 32768
)
(
    input   wire		clk,
    

    input   wire		rom_wen,
    input   wire [23:0]	rom_waddr,
    input   wire [7:0]	rom_wdata,
    

    input   wire		rom_ren,
    input   wire [23:0]	rom_raddr,
    output  reg	 [7:0]	rom_rdata
);


reg [7:0] rom_reg [0:Len-1];


initial
begin
    $readmemh("./sources/rtl/mcu/rom.o",rom_reg);
end


always@(posedge clk)
begin
    if(rom_wen)
        rom_reg[rom_waddr] <= rom_wdata;
end


always@(posedge clk)
begin
    if(rom_ren)
        rom_rdata <= rom_reg[rom_raddr];
end

endmodule