• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vl
        • Syntax
          • Vl-module
          • Vl-vardecl
          • Vl-fundecl
          • Vl-interface
          • Vl-design
          • Vl-assign
          • Vl-modinst
          • Vl-gateinst
          • Vl-taskdecl
          • Vl-portdecl
          • Vl-commentmap
          • Vl-dpiimport
          • Vl-ansi-portdecl
            • Vl-ansi-portdecl-fix
            • Vl-ansi-portdecl-p
            • Make-vl-ansi-portdecl
            • Vl-ansi-portdecl-equiv
            • Change-vl-ansi-portdecl
            • Vl-ansi-portdecl->signedness
            • Vl-ansi-portdecl->nettype
            • Vl-ansi-portdecl->udims
            • Vl-ansi-portdecl->typename
            • Vl-ansi-portdecl->type
            • Vl-ansi-portdecl->pdims
            • Vl-ansi-portdecl->modport
            • Vl-ansi-portdecl->dir
            • Vl-ansi-portdecl->varp
            • Vl-ansi-portdecl->name
            • Vl-ansi-portdecl->loc
            • Vl-ansi-portdecl->atts
          • Vl-package
          • Vl-paramdecl
          • Vl-dpiexport
          • Vl-plainarglist->exprs
          • Vl-class
          • Vl-taskdecllist->names
          • Vl-sort-blockitems-aux
          • Vl-fundecllist->names
          • Expressions-and-datatypes
          • Vl-udp
          • Vl-port
          • Vl-genelement
          • Vl-clkdecl
          • Vl-parse-temps
          • Vl-bind
          • Vl-namedarg
          • Vl-exprdist
          • Vl-clkassign
          • Vl-range
          • Vl-propport
          • Vl-typedef
          • Vl-gatedelay
          • Vl-dimension
          • Vl-sequence
          • Vl-clkskew
          • Vl-program
          • Vl-gatestrength
          • Vl-property
          • Vl-config
          • Vl-always
          • Vl-import
          • Vl-repeateventcontrol
          • Vl-timeliteral
          • Vl-initial
          • Vl-eventcontrol
          • Vl-udpsymbol-p
          • Vl-final
          • Vl-maybe-clkskew
          • Vl-alias
          • Vl-maybe-nettypename
          • Vl-maybe-gatedelay
          • Vl-letdecl
          • Vl-direction-p
          • Vl-modelement
          • Vl-maybe-timeprecisiondecl
          • Vl-maybe-scopeid
          • Vl-maybe-gatestrength
          • Vl-maybe-direction
          • Vl-maybe-delayoreventcontrol
          • Vl-gclkdecl
          • Vl-fwdtypedef
          • Vl-maybe-udpsymbol-p
          • Vl-maybe-timeunitdecl
          • Vl-maybe-timeliteral
          • Vl-maybe-parse-temps
          • Vl-maybe-cstrength
          • Vl-arguments
          • Vl-maybe-module
          • Vl-maybe-design
          • Vl-covergroup
          • Vl-udpline
          • Vl-timeunitdecl
          • Vl-genvar
          • Vl-defaultdisable
          • Vl-context1
          • Vl-timeprecisiondecl
          • Vl-sort-blockitems
          • Vl-elabtask
          • Vl-udpedge
          • Vl-delaycontrol
          • Vl-context
          • Vl-modelement->loc
          • Vl-ctxelement
          • Vl-ctxelement->loc
          • Statements
          • Vl-interface->ifports
          • Vl-blockitem
          • Vl-vardecllist
          • Vl-module->ifports
          • Vl-lifetime-p
          • Vl-syntaxversion
          • Vl-nettypename-p
          • Vl-paramdecllist
          • Vl-modelementlist->genelements
          • Vl-importlist
          • Vl-gatetype-p
          • Vl-typedeflist
          • Vl-genelement->loc
          • Vl-cstrength-p
          • Vl-port->name
          • Vl-elabtask->loc
          • Vl-delayoreventcontrol
          • Vl-udpentry-p
          • Vl-portdecllist
          • Vl-port->loc
          • Property-expressions
          • Vl-taskdecllist
          • Vl-fundecllist
          • Vl-sequencelist
          • Vl-propertylist
          • Vl-portlist
          • Vl-dpiimportlist
          • Vl-dpiexportlist
          • Vl-classlist
          • Vl-arguments->args
          • Vl-alwaystype-p
          • Vl-modinstlist
          • Vl-importpart-p
          • Vl-importpart-fix
          • Vl-blockstmt-p
          • Vl-bindlist
          • Vl-initiallist
          • Vl-genvarlist
          • Vl-gclkdecllist
          • Vl-finallist
          • Vl-elabtasklist
          • Vl-defaultdisablelist
          • Vl-clkdecllist
          • Vl-cassertionlist
          • Vl-assignlist
          • Vl-assertionlist
          • Vl-alwayslist
          • Vl-aliaslist
          • Vl-udptable
          • Vl-udplist
          • Vl-udpentrylist
          • Vl-propportlist
          • Vl-programlist
          • Vl-packagelist
          • Vl-namedarglist
          • Vl-modulelist
          • Vl-modportlist
          • Vl-modport-portlist
          • Vl-letdecllist
          • Vl-interfacelist
          • Vl-gateinstlist
          • Vl-fwdtypedeflist
          • Vl-covergrouplist
          • Vl-configlist
          • Vl-clkassignlist
          • Vl-casekey-p
          • Vl-blockitemlist
          • Vl-ansi-portdecllist
          • Vl-regularportlist
          • Vl-paramdecllist-list
          • Vl-modelementlist
          • Vl-interfaceportlist
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Testing-utilities
    • Math
  • Syntax

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.