data/full_repos/permissive/169258653/components/dmem/dmem.srcs/sources_1/new/dmem.v
1: b'%Warning-WIDTH: data/full_repos/permissive/169258653/components/dmem/dmem.srcs/sources_1/new/dmem.v:33: Bit extraction of array[255:0] requires 8 bit index, not 30 bits.\n                                                                                                      : ... In instance dmem\n    assign readdata=RAM[addr[31:2]];\n                       ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/169258653/components/dmem/dmem.srcs/sources_1/new/dmem.v:38: Bit extraction of array[255:0] requires 8 bit index, not 30 bits.\n                                                                                                      : ... In instance dmem\n        RAM[addr[31:2]]<=writedata;\n           ^\n%Error: Exiting due to 2 warning(s)\n'
module dmem(
    input clk,
    input memwrite,
    input [31:0] addr,writedata,
    output [31:0] readdata
    );
    
    reg [31:0] RAM[255:0];
    

    assign readdata=RAM[addr[31:2]];
    

    always@(posedge clk)
    if(memwrite)
        RAM[addr[31:2]]<=writedata;
    
endmodule
module dmem(
    input clk,
    input memwrite,
    input [31:0] addr,writedata,
    output [31:0] readdata
    );

    
    reg [31:0] RAM[255:0];
    

    assign readdata=RAM[addr[31:2]];
    

    always@(posedge clk)
    if(memwrite)
        RAM[addr[31:2]]<=writedata;
    
endmodule