data/full_repos/permissive/210844779/lab4/4.3.1/mem.v
1: b'%Warning-WIDTH: data/full_repos/permissive/210844779/lab4/4.3.1/mem.v:11: Bit extraction of array[3:0] requires 2 bit index, not 4 bits.\n                                                                        : ... In instance mem\n    memry[addr]=d;\n         ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/210844779/lab4/4.3.1/mem.v:13: Bit extraction of array[3:0] requires 2 bit index, not 4 bits.\n                                                                        : ... In instance mem\n    q<=memry[addr];\n            ^\n%Error: Exiting due to 2 warning(s)\n'
module mem(d,clk,addr,we,q);
  input [3:0]d,addr;
  input clk,we;
  output reg [3:0]q;
  
  reg [3:0]memry[3:0];
  
  always@(posedge clk)
  begin
    if (we)
    memry[addr]=d;
  else
    q<=memry[addr];
  end
  
endmodule
module mem(d,clk,addr,we,q);

  input [3:0]d,addr;
  input clk,we;
  output reg [3:0]q;
  
  reg [3:0]memry[3:0];
  
  always@(posedge clk)
  begin
    if (we)
    memry[addr]=d;
  else
    q<=memry[addr];
  end
  
endmodule