• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
          • Split
          • Selresolve
          • Weirdint-elim
          • Vl-delta
          • Replicate-insts
          • Rangeresolve
          • Propagate
          • Clean-selects
          • Clean-params
          • Blankargs
          • Inline-mods
          • Expr-simp
          • Trunc
          • Always-top
          • Gatesplit
          • Gate-elim
          • Expression-optimization
          • Elim-supplies
          • Wildelim
          • Drop-blankports
          • Clean-warnings
          • Addinstnames
          • Custom-transform-hooks
          • Annotate
            • Make-implicit-wires
            • Resolve-indexing
              • Vl-modulelist-resolve-indexing
              • Vl-expr-resolve-indexing-aux
              • Vl-maybe-delayoreventcontrol-resolve-indexing
              • Vl-plainarglist-resolve-indexing
              • Vl-namedarglist-resolve-indexing
              • Vl-modinstlist-resolve-indexing
              • Vl-initiallist-resolve-indexing
              • Vl-gateinstlist-resolve-indexing
              • Vl-fundecllist-resolve-indexing
              • Vl-repeateventcontrol-resolve-indexing
              • Vl-evatomlist-resolve-indexing
              • Vl-delayoreventcontrol-resolve-indexing
              • Vl-assignlist-resolve-indexing
              • Vl-alwayslist-resolve-indexing
              • Vl-portlist-resolve-indexing
              • Vl-exprlist-resolve-indexing
              • Vl-eventcontrol-resolve-indexing
              • Vl-delaycontrol-resolve-indexing
              • Vl-arguments-resolve-indexing
              • Vl-maybe-expr-resolve-indexing
              • Vl-plainarg-resolve-indexing
              • Vl-namedarg-resolve-indexing
              • Vl-gateinst-resolve-indexing
              • Vl-fundecl-resolve-indexing
              • Vl-assign-resolve-indexing
              • Vl-port-resolve-indexing
              • Vl-modinst-resolve-indexing
              • Vl-initial-resolve-indexing
              • Vl-evatom-resolve-indexing
              • Vl-always-resolve-indexing
              • Vl-expr-resolve-indexing
              • Vl-expr-is-bitselect-type
              • Vl-module-resolve-indexing
              • Vl-datatype-bitselect-p
              • Vl-design-resolve-indexing
            • Origexprs
            • Argresolve
            • Portdecl-sign
            • Designwires
            • Udp-elim
            • Vl-annotate-design
          • Latchcode
          • Elim-unused-vars
          • Problem-modules
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Annotate

Resolve-indexing

Resolve :vl-index operators that are applied to simple bitvectors into :vl-bitselect operators.

When our parser encounters a subexpression like foo[i], it does not know whether foo is an ordinary vector like wire [3:0] foo, an array like reg [63:0] foo [128:0];, or something more complicated like a reference into an array of instances or similar. To account for this, the parser just produces :vl-index operators whenever it sees a selection like foo[i]. Similarly when it encounters a range select such as foo[5:3] or foo[4+:6], it produces either a :vl-select-colon, :vl-select-pluscolon, or :vl-select-minuscolon operator; these could be simple partselects or they could be selecting a range of substructures.

In this transform, we convert these unresolved index operators into :vl-bitselect, :vl-partselect-colon, :vl-partselect-pluscolon, and :vl-partselect-minuscolon operations when we can tell that they can be treated as selects from a simple vector. This transform should typically be run very early in the transformation sequence, as later transforms often expect to find proper :vl-bitselect operators.

As we implement better array support, this transform remains useful for backward compatibility with other transforms that don't deal correctly with arrays and complex SystemVerilog datatypes. Generally, when a transform is written with arrays and complex datatypes in mind, it will treat the resolved and unresolved versions of these index operators equivalently. Otherwise, it will only deal with the resolved versions and should produce a warning if it comes across an unresolved operator.

Subtopics

Vl-modulelist-resolve-indexing
(vl-modulelist-resolve-indexing x ss) maps vl-module-resolve-indexing across a list.
Vl-expr-resolve-indexing-aux
Core routine for introducing :vl-array-index and :vl-bitselect operators throughout a vl-expr-p.
Vl-maybe-delayoreventcontrol-resolve-indexing
Resolve :vl-index operators throughout a vl-maybe-delayoreventcontrol-p.
Vl-plainarglist-resolve-indexing
Resolve :vl-index operators throughout a vl-plainarglist-p.
Vl-namedarglist-resolve-indexing
Resolve :vl-index operators throughout a vl-namedarglist-p.
Vl-modinstlist-resolve-indexing
Resolve :vl-index operators throughout a vl-modinstlist-p.
Vl-initiallist-resolve-indexing
Resolve :vl-index operators throughout a vl-initiallist-p.
Vl-gateinstlist-resolve-indexing
Resolve :vl-index operators throughout a vl-gateinstlist-p.
Vl-fundecllist-resolve-indexing
Resolve :vl-index operators throughout a vl-fundecllist-p.
Vl-repeateventcontrol-resolve-indexing
Resolve :vl-index operators throughout a vl-repeateventcontrol-p.
Vl-evatomlist-resolve-indexing
Resolve :vl-index operators throughout a vl-evatomlist-p.
Vl-delayoreventcontrol-resolve-indexing
Resolve :vl-index operators throughout a vl-delayoreventcontrol-p.
Vl-assignlist-resolve-indexing
Resolve :vl-index operators throughout a vl-assignlist-p.
Vl-alwayslist-resolve-indexing
Resolve :vl-index operators throughout a vl-alwayslist-p.
Vl-portlist-resolve-indexing
Resolve :vl-index operators throughout a vl-portlist-p.
Vl-exprlist-resolve-indexing
Resolve :vl-index operators throughout a vl-exprlist-p.
Vl-eventcontrol-resolve-indexing
Resolve :vl-index operators throughout a vl-eventcontrol-p.
Vl-delaycontrol-resolve-indexing
Resolve :vl-index operators throughout a vl-delaycontrol-p.
Vl-arguments-resolve-indexing
Resolve :vl-index operators throughout a vl-arguments-p.
Vl-maybe-expr-resolve-indexing
Resolve :vl-index operators throughout a vl-maybe-expr-p.
Vl-plainarg-resolve-indexing
Resolve :vl-index operators throughout a vl-plainarg-p.
Vl-namedarg-resolve-indexing
Resolve :vl-index operators throughout a vl-namedarg-p.
Vl-gateinst-resolve-indexing
Resolve :vl-index operators throughout a vl-gateinst-p.
Vl-fundecl-resolve-indexing
Resolve :vl-index operators throughout a vl-fundecl-p.
Vl-assign-resolve-indexing
Resolve :vl-index operators throughout a vl-assign-p.
Vl-port-resolve-indexing
Resolve :vl-index operators throughout a vl-port-p.
Vl-modinst-resolve-indexing
Resolve :vl-index operators throughout a vl-modinst-p.
Vl-initial-resolve-indexing
Resolve :vl-index operators throughout a vl-initial-p.
Vl-evatom-resolve-indexing
Resolve :vl-index operators throughout a vl-evatom-p.
Vl-always-resolve-indexing
Resolve :vl-index operators throughout a vl-always-p.
Vl-expr-resolve-indexing
Resolve :vl-index operators throughout a vl-expr-p.
Vl-expr-is-bitselect-type
Checks whether an expression is of a bitselectable type.
Vl-module-resolve-indexing
Vl-datatype-bitselect-p
Recognize a datatype for which an indexing operator is a bitselect/partselect.
Vl-design-resolve-indexing