Vl-plainarg
Representation of a single argument in a plain argument list.
This is a product type introduced by defprod.
Fields
- expr — vl-maybe-expr
- Expression being connected to the port. In programming languages
parlance, this is the actual. Note that this may be
nil because Verilog allows expressions to be "blank", in
which case they represent an unconnected wire.
- portname — maybe-string
- Not part of the Verilog syntax. This may indicate the
name of the port (i.e., the formal) that this expression
is connected to; see below.
- dir — vl-maybe-direction
- Not part of the Verilog syntax. This may indicate the
direction of this port; see below.
- atts — vl-atts
- Any attributes associated with this argument.
There are two kinds of argument lists for module instantiations,
which we call plain and named arguments.
modname instname ( 1, 2, 3 ); <-- "plain" arguments
modname instname ( .a(1), .b(2), .c(3) ); <-- "named" arguments
A vl-plainarg-p represents a single argument in a plain argument
list.
The dir is initially nil but may get filled in by the argresolve transformation to indicate whether this port for this argument is
an input, output, or inout for the module or gate being instantiated. After
argresolve, all well-formed gate instances will have their
direction information computed and so you may rely upon the dir field for
gate instances. HOWEVER, for module instances the direction of a
port may not be apparent; see vl-port-direction for details. So even
after argresolve some arguments to module instances may not have a
dir annotation, and you should generally not rely on the dir field
for module instances.
The portname is similar. The argresolve transformation may
sometimes be able to fill in the name of the port, but this is meant only as a
convenience for error message generation. This field should never be
used for anything that is semantically important. No argument to a gate
instance will ever have a portname. Also, since not every vl-port-p has
a name, some arguments to module instances may also not be given
portnames.
Subtopics
- Vl-plainarg-p
- Recognizer for vl-plainarg structures.
- Vl-plainarg-fix
- Fixing function for vl-plainarg structures.
- Vl-plainarg-equiv
- Basic equivalence relation for vl-plainarg structures.
- Make-vl-plainarg
- Basic constructor macro for vl-plainarg structures.
- Vl-plainarg->portname
- Get the portname field from a vl-plainarg.
- Vl-plainarg->expr
- Get the expr field from a vl-plainarg.
- Vl-plainarg->dir
- Get the dir field from a vl-plainarg.
- Change-vl-plainarg
- Modifying constructor for vl-plainarg structures.
- Vl-plainarg->atts
- Get the atts field from a vl-plainarg.