• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
          • Unparameterization
          • Elaborate
          • Addnames
          • Annotate
            • Increment-elim
            • Make-implicit-wires
            • Basic-bind-elim
            • Argresolve
              • Vl-convert-namedargs
              • Vl-unhierarchicalize-interfaceport
              • Vl-interfacelist-argresolve
              • Vl-modulelist-argresolve
              • Vl-gateinst-dirassign
              • Vl-arguments-argresolve
              • Vl-unhierarchicalize-interfaceports
              • Vl-check-blankargs
              • Vl-annotate-plainargs
              • Vl-modinst-maybe-argresolve
              • Vl-modinst-argresolve
              • Vl-modinstlist-argresolve
              • Vl-gateinstlist-dirassign
              • Vl-interface-argresolve
              • Vl-module-argresolve
              • Vl-namedarglist-alist
              • Vl-make-namedarg-alist
              • Vl-design-argresolve
              • Vl-fast-find-namedarg
              • Vl-namedarg-alist
              • Vl-scopeitem-modport-p
              • Vl-scopeitem-modinst-p
              • Vl-scopeitem-interfaceport-p
              • Vl-port-interface-p
            • Basicsanity
            • Portdecl-sign
            • Enum-names
            • Port-resolve
            • Udp-elim
            • Vl-annotate-design
            • Vl-annotate-module
          • Clean-warnings
          • Eliminitial
          • Custom-transform-hooks
          • Problem-modules
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Annotate

Argresolve

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.

Subtopics

Vl-convert-namedargs
Coerce arguments into plain (positional) style.
Vl-unhierarchicalize-interfaceport
Sanity check and normalize interface port arguments by dropping hierarchical modinst name components, e.g., transform mypipe.producer to just mypipe.
Vl-interfacelist-argresolve
(vl-interfacelist-argresolve x ss) maps vl-interface-argresolve across a list.
Vl-modulelist-argresolve
(vl-modulelist-argresolve x ss) maps vl-module-argresolve across a list.
Vl-gateinst-dirassign
Arity-checks a gate instance and annotates its arguments with their directions.
Vl-arguments-argresolve
Apply the argresolve transformation to some arguments.
Vl-unhierarchicalize-interfaceports
Vl-check-blankargs
Warn about expressions connected to blank ports and for blanks connected to non-blank, non-output ports.
Vl-annotate-plainargs
Annotates a plain argument list with port names and directions.
Vl-modinst-maybe-argresolve
Resolve arguments in a vl-modinst-p, if the flag is true.
Vl-modinst-argresolve
Resolve arguments in a vl-modinst-p.
Vl-modinstlist-argresolve
Resolve arguments in a vl-modinstlist-p.
Vl-gateinstlist-dirassign
Projects vl-gateinst-dirassign across a list of vl-gateinst-ps.
Vl-interface-argresolve
Apply the argresolve transformation to a vl-interface-p.
Vl-module-argresolve
Apply the argresolve transformation to a vl-module-p.
Vl-namedarglist-alist
Extend an alist by binding the names of vl-namedargs to their definitions.
Vl-make-namedarg-alist
Build a fast alist associating the name of each port declaration with the whole vl-namedarg-p object.
Vl-design-argresolve
Top-level argresolve transform.
Vl-fast-find-namedarg
Faster version of vl-find-namedarg, where the search is done as an fast-alist lookup rather than as string search.
Vl-namedarg-alist
An alist mapping stringp to vl-namedarg-p.
Vl-scopeitem-modport-p
Vl-scopeitem-modinst-p
Vl-scopeitem-interfaceport-p
Vl-port-interface-p