Converts named argument lists into plain argument lists, and
annotates each plain argument with its direction.
We prefer to use plain (or positional) argument lists as our
internal representation for module and gate instances.
We have little choice but to support plain argument lists internally,
because the are the only way to instantiate gates and are also the only way to
instantiate modules with ports like foo[3:0] without external names. But
it is basically straightforward to eliminate all named argument lists by
replacing them with their plain equivalents, reducing the number of syntactic
constructs that later transformations need to deal with.
In this transformation, we simplify module instances as follows:
- We try to expand out any SystemVerilog .*-style port connections,
- We try to get rid of all the named argument lists by replacing them with
plain argument lists; see vl-convert-namedargs,
- We try to annotate each vl-plainarg-p with its dir and
portname fields, so that the direction and name of many ports will be
available for use in error messages; see vl-annotate-plainargs,
- We check that each module instance has the proper arity, and
- We check that any "blank" ports are connected only to blank arguments,
and vice-versa; see vl-check-blankargs.
We also simplify gate instances as follows:
- We check that the arity of each gate instance is acceptable and annotate
each vl-plainarg-p with its dir field; see vl-gateinst-dirassign, and
- We check that no "blank" arguments are given to gates, and issue a
warning if such a connection is made. This is actually also done by vl-gateinst-dirassign, just because it is convenient.
- Coerce arguments into plain (positional) style.
- Sanity check and normalize interface port arguments by dropping
hierarchical modinst name components, e.g., transform mypipe.producer to
- (vl-interfacelist-argresolve x ss) maps vl-interface-argresolve across a list.
- (vl-modulelist-argresolve x ss) maps vl-module-argresolve across a list.
- Apply the argresolve transformation to some arguments.
- Arity-checks a gate instance and annotates its arguments with their
- Warn about expressions connected to blank ports and for blanks
connected to non-blank, non-output ports.
- Annotates a plain argument list with port names and directions.
- Resolve arguments in a vl-modinst-p, if the flag is true.
- Resolve arguments in a vl-modinst-p.
- Resolve arguments in a vl-modinstlist-p.
- Projects vl-gateinst-dirassign across a list of vl-gateinst-ps.
- Apply the argresolve transformation to a vl-interface-p.
- Apply the argresolve transformation to a vl-module-p.
- Extend an alist by binding the names of vl-namedargs to their definitions.
- Build a fast alist associating the name of each port declaration with
the whole vl-namedarg-p object.
- Top-level argresolve transform.
- Faster version of vl-find-namedarg, where the search is done
as an fast-alist lookup rather than as string search.
- An alist mapping stringp to vl-namedarg-p.