User guide
2-28
Modeling Your Design
named block containing the task enabling statement for this other
user-defined task.
If the function call is in another user-defined function, the
hierarchical name is the hierarchical name of the instance or
named block containing the function call for this other
user-defined function.
If the function call is in a user-defined task, the hierarchical name
is the hierarchical name of the instance or named block containing
the task enabling statement for this user-defined task.
%-i
Specifies that the hierarchical name is always of a module
instance, not a named block or user-defined task or function. If
the system task (such as $write and $display) is in:
- A named block — the hierarchical name is that of the module
instance that contains the named block
- A user-defined task or function — the hierarchical name is that
of the module instance containing the task enabling statement
or function call
Note:
The %i and %-i format specifications are not supported with the
$monitor system task.
The following commented code example shows what these format
specifications do:
module top;
reg r1;
task my_task;
input taskin;
begin
$display("%m"); // displays "top.my_task"
$display("%i"); // displays "top.d1.named"