[sv-bc] $unit question

From: Andy Tsay <andytsay@yahoo.com>
Date: Thu Jul 01 2004 - 14:45:50 PDT

Hi,

Please help to clarify if $unit::<module_name> is NOT allowed.
The LRM treats $unit as a package_scope, so I think it is illegal
to say $unit::<module_name>.

For example,
module m1(output oo, input ii);
  assign oo = ~ii;
endmodule
module top(output o1, o2, input ii);
  module m1(output oo, input ii);
    assign oo = ii;
  endmodule
m1 u0(o1, ii); // use the local nested m1 <-- OK
$unit::m1 u1(o2, ii); // try to use the outside m1 <-- ERROR
endmodule

Thanks,
Andy Tsay
Received on Thu Jul 1 14:45:52 2004

This archive was generated by hypermail 2.1.8 : Thu Jul 01 2004 - 14:46:09 PDT