User guide
2-27
Modeling Your Design
Obtaining Scope Information
VCS has custom format specifications (IEEE Std 1364-2001 does not
define these) for displaying scope information. It also has system
functions for returning information about the current scope.
Scope Format Specifications
The IEEE Std 1364-2001 describes the %m format specification for
system tasks for displaying information such as $write and
$display. The %m specification tells VCS to display the hierarchical
name of the module instance that contains the system task. If the
system task is in a scope lower than a module instance, it tells VCS
to do the following:
• In named begin-end or fork-join blocks, it adds the block name to
the hierarchical name.
• In user-defined tasks or functions, it considers the hierarchical
name of the task declaration or function definition as the
hierarchical name of the module instance.
VCS has the following additional format specifications for displaying
scope information:
%i
Specifies the same as %m with the following difference: when in a
user-defined task or function, the hierarchical name is the
hierarchical name of the instance or named block containing the
task enabling statement or function call, not the hierarchical name
of the task or function declaration.
If the task enabling statement is in another user-defined task, the
hierarchical name is the hierarchical name of the instance or