title: Using multiple genvar in Verilog loop
body: <p>Is It possible using different "genvar" in a loop? Is there an alternative mode to realize it?</p>
  
  <p>I try with this example:</p>
  
  <pre><code>genvar i;
  genvar j;
  genvar k;
  
  generate 
      k=0;
      for (i = 0; i &lt; N; i = i + 1) 
      begin: firstfor
              for (j = 0; j &lt; N; j = j + 1)
              begin: secondfor
                  if(j&gt;i) 
                  begin 
                      assign a[i+j*N] = in[i] &amp;&amp; p[k];
                      k=k+1;      
                  end
              end
      end 
  endgenerate
  </code></pre>
  
  <p>And when I run "Check Syntax" display this error:</p>
  
  <pre><code>Syntax error near "=". (k=k+1)
  </code></pre>