title: Use of $writememh in for loop
body: <p>Can we use $writememh in for loop? I am trying to write to a file from different memories alternatively. And I am getting a warning: <code>"Warning: More indices than needed"</code>.</p>
  
  <p>I have googled but nothing is written about this warning. Below is the sample code:    </p>
  
  <pre><code>reg [7:0] Mem_x[1023:0];
  reg [7:0] Mem_y[1023:0];
  reg [7:0] Mem_z[1023:0];
  reg [31:0] image[1023:0];
  
  initial
  begin
  
  #1000
  for (l = 0; l &lt; 25; l = l + 1)  
  
      @(posedge Clock)
       begin 
          $writememh ("writefile_out.hex",Mem_x[l]);  
          $writememh("writefile_out.hex",Mem_y[l]); 
          $writememh("writefile_out.hex",Mem_z[l]);
          $writememh("writefile_out.hex",image[l][7:0]); 
       end
  end
  </code></pre>