[sv-bc] Functions in nested modules (19.6)

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Mon Feb 27 2006 - 22:34:58 PST
Which version of "f" does "down_inst" call in the skeleton below?

module container;

  function f; ... endfunction

  module up_m; ...
       function f; ... endfunction
       down_m down_inst(...);
  endmodule

  module down_m; ...
       ... f(...) ...
  endmodule

endmodule

As I understand it, the function/task names are not resolved until after
the design has been elaborated, at which time they are resolved by
looking first in the calling instance, then in its parent and so on.

So when I resolve the name "f" in "down_inst", should I find the version
that "down_m" sees in its lexical scope or the version that the parent
of "down_inst" sees in its lexical scope?

-- Brad
 
 
Received on Mon Feb 27 22:35:21 2006

This archive was generated by hypermail 2.1.8 : Mon Feb 27 2006 - 22:36:35 PST