1

How can $deposit be used when the path includes the index from the generate loop. When I try:

for(int idx=0; idx<`NUM_OF_ENGIES; idx++)
   $deposit(i_engines_array.engines_loop[i].engine_top.soft_reset_n, 1'b0);

I get the error:

Error-[STASKEC_IFAIDT] Illegal argument to $deposit task

  The first argument passed to $deposit task: path is illegal.
  Please pass net/reg/bitselect type to $deposit task and recompile.
toolic
  • 57,801
  • 17
  • 75
  • 117
Meir
  • 287
  • 1
  • 4
  • 15

1 Answers1

3

You need to name the generate block and then you can index it. See section 24.7 of the standard. For example:

genvar idx;
for(idx=0; idx<4; idx) begin : engine_loop
  engine engine_top();
end

initial begin
  $deposit(engine_loop[2].engine_top.soft_reset_n, 1'b0);
end
nguthrie
  • 2,615
  • 6
  • 26
  • 43