data/full_repos/permissive/45825386/ahb_to_ssram/sim/sync_ram_wf.v
1: b'%Warning-WIDTH: data/full_repos/permissive/45825386/ahb_to_ssram/sim/sync_ram_wf.v:59: Bit extraction of array[2047:0] requires 11 bit index, not 10 bits.\n                                                                                     : ... In instance sync_ram_wf\n                  RAM[addr] <= din;\n                     ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/45825386/ahb_to_ssram/sim/sync_ram_wf.v:63: Bit extraction of array[2047:0] requires 11 bit index, not 10 bits.\n                                                                                     : ... In instance sync_ram_wf\n               dout <= RAM[addr];\n                          ^\n%Error: Exiting due to 2 warning(s)\n'
module sync_ram_wf (

   dout,

   clk, we, en, addr, din
   );

   parameter WORD_WIDTH = 16;
   parameter ADDR_WIDTH = 10;


   input clk;
   input we;
   input en;
   input [9:0] addr;
   input [WORD_WIDTH-1:0] din;
   output [WORD_WIDTH-1:0] dout;
   reg [WORD_WIDTH-1:0]    RAM [(2<<ADDR_WIDTH)-1:0];
   reg [WORD_WIDTH-1:0]    dout;

   always @(posedge clk)
     begin
        if (en)
          begin
             if (we)
               begin
                  RAM[addr] <= din;
                  dout <= din;
               end
             else begin
               dout <= RAM[addr];

             end
          end
     end
endmodule
module sync_ram_wf (

   dout,

   clk, we, en, addr, din
   );


   parameter WORD_WIDTH = 16;
   parameter ADDR_WIDTH = 10;


   input clk;
   input we;
   input en;
   input [9:0] addr;
   input [WORD_WIDTH-1:0] din;
   output [WORD_WIDTH-1:0] dout;
   reg [WORD_WIDTH-1:0]    RAM [(2<<ADDR_WIDTH)-1:0];
   reg [WORD_WIDTH-1:0]    dout;

   always @(posedge clk)
     begin
        if (en)
          begin
             if (we)
               begin
                  RAM[addr] <= din;
                  dout <= din;
               end
             else begin
               dout <= RAM[addr];

             end
          end
     end
endmodule