How can I use the force with array in verilog?
<p>I'd like to force some bunch of signals by derived multiple instances in verilog as below.</p>
<pre><code>integer ii;

    initial begin
        for (ii=0; ii&lt;19; ii=ii+1) begin                                                                        
         force sydnney.top.vx1.mpg.jpg[ii].trig.be[3]                = 1'b1;
        end 
    end
</code></pre>
<p>But, I've got the below error :</p>
<pre><code>Illegal operand for constant expression [4(IEEE)].
</code></pre>
<p>Is that impossible way to using like that?</p>
<h1>update</h1>
<p>I've got some error when I use as below,</p>
<pre><code>         generate                                                                            
          wire val;                                                                    
          genvar xidx;                                                                       
          for(val=0; val&lt;3; val=val+1) begin : force_be3y_loop                               
          #10                                                                                
          for(xidx=0; xidx&lt;3; xidx=xidx+1) begin : force_be3x_loop                           
         initial force top.comp.img.tc[xidx].t1c.b2tc  = val;      
         initial force top.comp.img.tc[xidx].t1c.b2tc[23] = val;   
         initial force top.comp.img.tc[xidx].t1c.b2tc[22] = val;   
         initial force top.comp.img.tc[xidx].t1c.b2tc[21] = val;  
         initial force top.comp.img.tc[xidx].t1c.b2tc[20] = val;   
    end

end
endgenerate
</code></pre>
<p>error message :</p>
<pre><code> Expecting the keyword 'end' [12.1.3(IEEE 2001)].
An 'endgenerate' is expected [12.1.3(IEEE 2001)].
 expecting the keyword 'endmodule' [12.1(IEEE)].
An 'endgenerate' is expected [12.1.3(IEEE 2001)].
</code></pre>
<p>Do I make something wrong?</p>
<h1>update2</h1>
<p>the original concept of mine is the below,</p>
<p>integer ii;</p>
<pre><code>initial begin
    for (bb=0; bb&lt;3; bb=bb+1) begin                                                                        
     #10
     for (ii=0; ii&lt;19; ii=ii+1) begin                                                                        
      force sydnney.top.vx1.mpg.jpg[ii].trig.be[3]                = bb;
      ...
     end 
end
</code></pre>
<p>but that is not work with</p>
<blockquote>
<p>Illegal operand for constant expression [4(IEEE)] error message.</p>
</blockquote>
<p>So I'm looking for solution.</p>