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.
Limitations
Section titled “Limitations”- Only declarations in the active branch of an
`ifdefare 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.
Try it
Section titled “Try it”- Open
uvm/my_pkg.svfrom the sample project and press ⌘F12 (Ctrl+F12). - The popup shows
my_pkgwith its classes. Undermy_driveryou seevif,new,build_phaseandrun_phase; undermy_item, the constraintc_addr. - Type
runand press Enter. The caret jumps torun_phase.