Vl-range
Representation of ranges on wire declarations, instance array
declarations, and so forth.
This is a product type introduced by defprod.
Fields
- msb — vl-expr
- lsb — vl-expr
Ranges are discussed in Section 7.1.5.
Ranges in declarations and array instances look like [msb:lsb], but do
not confuse them with part-select expressions which have the same syntax.
The expressions in the msb and lsb positions are expected to
resolve to constants. Note that the parser does not try to simplify these
expressions, but some simplification is performed in transformations such as
rangeresolve and unparameterization.
Even after the expressions have become constants, the Verilog-2005 standard
does not require msb to be greater than lsb, and neither index is
required to be zero. In fact, even negative indicies seem to be permitted,
which is quite amazing and strange.
While we do not impose any restrictions in vl-range-p itself, some
transformations expect the indices to be resolved to integers. However, we now
try to support the use of both ascending and descending ranges.
Subtopics
- Vl-range-p
- Recognizer for vl-range structures.
- Vl-range-fix
- Fixing function for vl-range structures.
- Vl-range-equiv
- Basic equivalence relation for vl-range structures.
- Make-vl-range
- Basic constructor macro for vl-range structures.
- Vl-range->msb
- Get the msb field from a vl-range.
- Vl-range->lsb
- Get the lsb field from a vl-range.
- Change-vl-range
- Modifying constructor for vl-range structures.