Finding-by-name
Functions for looking up and reordering parsed objects by their
names.
These are low-level functions that allow you to find parsed
objects (e.g., variables, modules, parameters) by their names, or to use names
to rearrange lists of objects.
Note: these functions do not have any proper understanding of
scoping issues. If you just want to look up a name and see what it refers to,
you should not use these functions; see scopestack instead.
One way to do find elements by name is to naively scan through the list of
items and retrieve the first one that matches the name. Our simple lookup
functions just do this for various types of objects. For instance, we provide
functions to "find a portdecl with the following name in this list of
portdecls."
If many items are going to be looked up from the same list, as is often the
case, then a faster approach is to construct a fast alist that maps the item
names to the items themselves, and then use hons-get to do hash table
lookups. See fast-finding-by-name for functions related to constructing
fast alists binding names to items that can be used for this purpose.
Subtopics
- Fast-finding-by-name
- Utilities for building alists for doing fast-alist lookups.
- Vl-find-interfaceport
- Naive, O(n) lookup of a vl-interfaceport in a list by its name.
- Vl-find-portdecl
- Naive, O(n) lookup of a vl-portdecl in a list by its name.
- Vl-find-taskdecl
- Naive, O(n) lookup of a vl-taskdecl in a list by its name.
- Vl-find-paramdecl
- Naive, O(n) lookup of a vl-paramdecl in a list by its name.
- Vl-find-interface
- Naive, O(n) lookup of a vl-interface in a list by its name.
- Vl-find-gateinst
- Naive, O(n) lookup of a vl-gateinst in a list by its name.
- Vl-find-dpiimport
- Naive, O(n) lookup of a vl-dpiimport in a list by its name.
- Vl-find-vardecl
- Naive, O(n) lookup of a vl-vardecl in a list by its name.
- Vl-find-typedef
- Naive, O(n) lookup of a vl-typedef in a list by its name.
- Vl-find-program
- Naive, O(n) lookup of a vl-program in a list by its name.
- Vl-find-package
- Naive, O(n) lookup of a vl-package in a list by its name.
- Vl-find-module
- Naive, O(n) lookup of a vl-module in a list by its name.
- Vl-find-modport
- Naive, O(n) lookup of a vl-modport in a list by its name.
- Vl-find-modinst
- Naive, O(n) lookup of a vl-modinst in a list by its name.
- Vl-find-genelement
- Naive, O(n) lookup of a vl-genelement in a list by its name.
- Vl-find-fundecl
- Naive, O(n) lookup of a vl-fundecl in a list by its name.
- Vl-find-genvar
- Naive, O(n) lookup of a vl-genvar in a list by its name.
- Vl-find-config
- Naive, O(n) lookup of a vl-config in a list by its name.
- Vl-find-class
- Naive, O(n) lookup of a vl-class in a list by its name.
- Vl-find-udp
- Naive, O(n) lookup of a vl-udp in a list by its name.
- Vl-modalist
- Legacy. Build a fast alist mapping module names to modules.
- Vl-make-portdecl-alist
- Build a fast alist associating the name of each port declaration with
the whole vl-portdecl-p object.
- Vl-fast-find-module
- Legacy. vl-modalist-optimized version of vl-find-module.
- Vl-fast-find-portdecl
- Faster version of vl-find-portdecl, where the search is done
as an fast-alist lookup rather than as string search.