title: Removing Multi-driver nets
body: <p>I have a static array in verilog and I'm reading a value and trying to find the index of that value in the array. </p>
  
  <p>For this I've done </p>
  
  <pre><code>array[0:200] = {32h'14151,...};
  reg[8:0] val_idx = 511;
  reg[31:0] val; 
  generate begin: hash
  for(genvar i = 0 ; i &lt; 200; i = i + 1) begin: hash_loop
     always@ (posedge clk) begin
       case(value)
       array[i]:
         val_idx &lt;= i;
       endcase
     end  
  end
  end endgenerate
  </code></pre>
  
  <p>However when I try to synthesise it using Vivado I get <code>Multiple Driver Nets</code> 200 times and it bails. What is the correct way to do this? I'm new to verilog so apologies if the question is stupid. </p>