data/full_repos/permissive/169258653/pipeline/MIPS_pipeline_32bit/MIPS_pipeline_32bit.srcs/sources_1/new/imem.v
1: b'%Warning-WIDTH: data/full_repos/permissive/169258653/pipeline/MIPS_pipeline_32bit/MIPS_pipeline_32bit.srcs/sources_1/new/imem.v:35: Bit extraction of array[127:0] requires 7 bit index, not 6 bits.\n                                                                                                                                  : ... In instance imem\n    assign instr=RAM[adr];\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 imem(
    input [5:0] adr,
    output [31:0] instr,
    input [6:0] SW,
    output reg [31:0] t
    );
    
    reg [31:0] RAM[127:0];
    
    initial
    $readmemh("C:/Users/ECHOES/Desktop/pipeline_pj/MIPS_pipeline_32bit/MIPS_pipeline_32bit.srcs/test_files/loop.dat",RAM);
    
    assign instr=RAM[adr];
    
    always@(*)
        t<=RAM[SW];
    
endmodule
module imem(
    input [5:0] adr,
    output [31:0] instr,
    input [6:0] SW,
    output reg [31:0] t
    );

    
    reg [31:0] RAM[127:0];
    
    initial
    $readmemh("C:/Users/ECHOES/Desktop/pipeline_pj/MIPS_pipeline_32bit/MIPS_pipeline_32bit.srcs/test_files/loop.dat",RAM);
    
    assign instr=RAM[adr];
    
    always@(*)
        t<=RAM[SW];
    
endmodule