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