Skip to content

Structure View

The Structure tool window (⌘7 / Alt+7) and the File Structure popup (⌘F12 / Ctrl+F12) show the declarations of the current file as a tree:

Under Shown
The file modules, interfaces, programs, packages, classes, interface classes, checkers, user-defined primitives, functions and tasks
A module, interface or program parameters, ports, nets, variables, typedefs, instances (also gate instances such as and g1 (…)), functions, tasks, modports, clocking blocks, properties, sequences, covergroups, checkers, classes, generate blocks (by their label)
A package parameters, typedefs, variables, functions, tasks, classes, checkers
A class properties, constraints, covergroups, the constructor new and methods (also as extern prototypes), typedefs, parameters, nested classes
A generate block its declarations (a block without a label adds them to the enclosing module)

Each entry shows its kind (port, net, task, …). Local variables of functions, tasks and procedural blocks are not listed, and neither are the ports and items of a checker or primitive (the checker or primitive itself is listed). Click an entry, or pick it in the popup, to jump to its name. The tree can be sorted alphabetically, and with Autoscroll from Source the entry around the caret is selected — the method whose body you are in, the module, the declaration under the caret. The tree follows your edits.

  • Only declarations in the active branch of an `ifdef are listed (see Conditional compilation).
  • The body of an out-of-block method (function void C::f(); … endfunction) has no entry of its own; its prototype in the class is listed. With the caret in such a body, Autoscroll from Source selects the enclosing package (or nothing at file level), not the prototype.
  1. Open uvm/my_pkg.sv from the sample project and press ⌘F12 (Ctrl+F12).
  2. The popup shows my_pkg with its classes. Under my_driver you see vif, new, build_phase and run_phase; under my_item, the constraint c_addr.
  3. Type run and press Enter. The caret jumps to run_phase.