data/full_repos/permissive/513467378/ATM.v
1: b'%Warning-WIDTH: data/full_repos/permissive/513467378/ATM.v:49: Operator ASSIGN expects 4 bits on the Assign RHS, but Assign RHS\'s VARREF \'i\' generates 32 bits.\n                                                             : ... In instance ATM.check_desaccount\n                index = i;\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 get_data(givena,sai,founded);

    input [15:0] givena;
    
    output [3:0] sai;
    reg [3:0] sai,index;
    output founded;
    reg founded,ow;
    
    reg [15:0] Accounts [0:14];

    initial begin
    Accounts[0] = 1456; 
    Accounts[1] = 2175; 
    Accounts[2] = 4532; 
    Accounts[3] = 2125; 
    Accounts[4] = 2178;
    Accounts[5] = 2647; 
    Accounts[6] = 1234; 
    Accounts[7] = 1478; 
    Accounts[8] = 6658; 
    Accounts[9] = 4125;
    Accounts[10] = 6125; 
    Accounts[11] = 4111; 
    Accounts[12] = 3425; 
    Accounts[13] = 4135; 
    Accounts[14] = 4115;  
    end


  integer i;
  always @(givena) begin
      sai = 4'b0000;
      index=0;
      ow=0;


      for(i = 0; i < 15; i = i+1) begin
            $display("for loop iterative index : %d",i);
            $display("given account number : %d",givena);
          if(givena == Accounts[i]) begin
                ow=1'b1;
                index = i;
                $display("Oh! it's founded at : %d",index);


          end    
      end
      sai=index;
      founded=ow;
    $display("finally founded at : %d",sai);
    $display("is founded? : %d",founded);
  end
    
endmodule
module get_data(givena,sai,founded);


    input [15:0] givena;
    
    output [3:0] sai;
    reg [3:0] sai,index;
    output founded;
    reg founded,ow;
    
    reg [15:0] Accounts [0:14];

    initial begin
    Accounts[0] = 1456; 
    Accounts[1] = 2175; 
    Accounts[2] = 4532; 
    Accounts[3] = 2125; 
    Accounts[4] = 2178;
    Accounts[5] = 2647; 
    Accounts[6] = 1234; 
    Accounts[7] = 1478; 
    Accounts[8] = 6658; 
    Accounts[9] = 4125;
    Accounts[10] = 6125; 
    Accounts[11] = 4111; 
    Accounts[12] = 3425; 
    Accounts[13] = 4135; 
    Accounts[14] = 4115;  
    end


  integer i;
  always @(givena) begin
      sai = 4'b0000;
      index=0;
      ow=0;


      for(i = 0; i < 15; i = i+1) begin
            $display("for loop iterative index : %d",i);
            $display("given account number : %d",givena);
          if(givena == Accounts[i]) begin
                ow=1'b1;
                index = i;
                $display("Oh! it's founded at : %d",index);


          end    
      end
      sai=index;
      founded=ow;
    $display("finally founded at : %d",sai);
    $display("is founded? : %d",founded);
  end
    
endmodule