Representation of Verilog port declarations.
This is a product type introduced by defprod.
- name — stringp
- An ordinary string that should agree with some identifier used in
the "internal" wiring expressions from some port(s) in the
- dir — vl-direction-p
- Says whether this port is an input, output, or bidirectional
- nettype — vl-maybe-nettypename
- type — vl-datatype
- The type and size information for this port. Warning: per
Verilog-2005 page 175, port declarations and net/reg declarations
must be checked against one another: if either declaration
includes the signed keyword, then both are to be considered
signed. The loader DOES NOT do this cross-referencing
automatically; instead the portdecl-sign transformation
needs to be run. See also vl-portdecl-and-moduleitem-compatible-p which is part of our
notion of reasonable modules.
- atts — vl-atts
- Any attributes associated with this declaration.
- loc — vl-location
- Where the port was declared in the source code.
See vl-port for related background. Port declarations,
described in Section 12.3.3 of the Verilog-2005 standard, ascribe certain
properties (direction, signedness, size, and so on) to the ports of a module.
Here is an example:
module m(a, b) ;
input [3:0] a ; // <--- port declaration
Although Verilog allows multiple ports to be declared simultaneously, i.e.,
input w1, w2;, our parser splits these merged declarations to create
separate vl-portdecl-p objects for each port. Because of this, every
vl-portdecl-p has only a single name.
Most of the time, e.g., for a in module m above, the resulting
vl-module will have:
- A vl-port for a,
- A corresponding vl-portdecl that has the direction/type information, and
- A corresponding vl-vardecl that looks like an ordinary variable.
The exceptions to this are:
- Interface ports have no corresponding port/vardecl.
- The ports/portdecls do not necessarily line up when complex ports are used,
see vl-port for details.
- Recognizer for vl-portdecl structures.
- Fixing function for vl-portdecl structures.
- Basic equivalence relation for vl-portdecl structures.
- Basic constructor macro for vl-portdecl structures.
- Modifying constructor for vl-portdecl structures.
- Get the nettype field from a vl-portdecl.
- Get the name field from a vl-portdecl.
- Get the type field from a vl-portdecl.
- Get the loc field from a vl-portdecl.
- Get the dir field from a vl-portdecl.
- Get the atts field from a vl-portdecl.