Vl-ansi-portdecl
Temporary representation for port declarations.
This is a product type introduced by defprod.
Fields
- name — stringp
- Name of the port
- loc — vl-location
- dir — vl-maybe-direction
- Direction, if an explicit keyword was present.
- typename — maybe-string
- The name of the type, if it was just a simple ID, or the name of
the interface, to be determined.
- type — vl-maybe-datatype
- The datatype, if it was explicit
- pdims — vl-dimensionlist
- Dimensions, if given and no explicit datatype
- udims — vl-dimensionlist
- Dimensions from after the name
- nettype — vl-maybe-nettypename
- Nettype, if present
- varp — booleanp
- Indicates whether the var keyword was present.
- modport — maybe-string
- Modport of the interface, if specified
- signedness — vl-maybe-exprsign
- The signedness, if given, and if there is no explicit datatype)
- atts — vl-atts
Some constraints on the presence/absence of some of these fields:
- typename should imply no type, signedness, or pdims
- type should imply no signedness or pdims.
- modport should imply typename and not varp, dir, or nettype
The reason we have these: Parsing ports is fairly ambiguous and there's a
lot that needs to be fleshed out after we have a fuller picture of the design.
The worst ambiguity is that there's no syntactic difference in an ANSI portlist
between an interfaceport of interface foo, and a regular port of type foo (if
it doesn't have an explicit direction, nettype, or var keyword). The only
way to resolve these is to determine whether the interface/type name actually
refers to an interface or a type.
Another issue, with non-ANSI ports, is that a port declaration may have a
corresponding net/variable declaration that contains different information
about its type and nettype. We resolve this later as well, cross-propagating
the type information between the variable and port declarations.
Subtopics
- Vl-ansi-portdecl-fix
- Fixing function for vl-ansi-portdecl structures.
- Vl-ansi-portdecl-p
- Recognizer for vl-ansi-portdecl structures.
- Make-vl-ansi-portdecl
- Basic constructor macro for vl-ansi-portdecl structures.
- Vl-ansi-portdecl-equiv
- Basic equivalence relation for vl-ansi-portdecl structures.
- Change-vl-ansi-portdecl
- Modifying constructor for vl-ansi-portdecl structures.
- Vl-ansi-portdecl->signedness
- Get the signedness field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->nettype
- Get the nettype field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->udims
- Get the udims field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->typename
- Get the typename field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->type
- Get the type field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->pdims
- Get the pdims field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->modport
- Get the modport field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->dir
- Get the dir field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->varp
- Get the varp field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->name
- Get the name field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->loc
- Get the loc field from a vl-ansi-portdecl.
- Vl-ansi-portdecl->atts
- Get the atts field from a vl-ansi-portdecl.