Vl-exprdist
Representation of expr dist { ... } constructs.
This is a product type introduced by defprod.
Fields
- expr — vl-expr
- The left-hand side expression, which per SystemVerilog-2012 Section
18.5.4 should involve at least one rand variable.
- dist — vl-distlist
- The desired ranges of values and probability distribution. May be
nil in case of a plain expression without any dist
part.
Very confusingly, the dist operator is mentioned in the
SystemVerilog-2012 precedence table (Table 11-2, Page 221). This doesn't
make any sense because per the grammar rules it only occurs within
expression_or_dist ::= expression [ 'dist' { dist_list } ]
And these expression_or_dist things definitely do not occur within
other expressions. After some investigation, I believe this inclusion in
the table is simply misleading and that the right way to treat dist is
as a separate construct rather than as a real operator. See also the file
vl/parser/tests/distprec.sv for related notes and experiments.
Subtopics
- Vl-distitem
- Representation of weighted distribution information.
- Vl-exprdist-fix
- Fixing function for vl-exprdist structures.
- Vl-maybe-exprdist
- Option type; vl-exprdist or nil.
- Vl-exprdist-p
- Recognizer for vl-exprdist structures.
- Vl-exprdist-equiv
- Basic equivalence relation for vl-exprdist structures.
- Vl-distweighttype-p
- Representation of the := or :/ weight operators.
- Make-vl-exprdist
- Basic constructor macro for vl-exprdist structures.
- Vl-exprdist->expr
- Get the expr field from a vl-exprdist.
- Vl-exprdist->dist
- Get the dist field from a vl-exprdist.
- Change-vl-exprdist
- Modifying constructor for vl-exprdist structures.
- Vl-exprdistlist
- A list of vl-exprdist-p objects.
- Vl-distlist
- A list of vl-distitem-p objects.