Representation of expressions, datatypes, and other related,
mutually recursive concepts.
SystemVerilog has a very rich expression language. For
- It has many kinds of literals, including integer literals that can
be sized and unsized, ``weird'' integers like 4'10xz, infinitely
extended integers like '0, reals, times, strings, etc. See vl-literal.
- It has a rich operand syntax that allows for scoping, indexing
into the module hierarchy and structures, and for many kinds of
bit/range selects into wires, arrays, etc. See vl-index.
- It has many familiar C-like operators (+, &, etc.) and
numerous extended C-like operators (===, !=?, >>>,
etc.) See vl-unary, vl-binary, and vl-qmark.
- It has certain casting and function call operators that allow for
the use of datatypes directly in expressions, which makes
expressions and datatypes mutually recursive concepts.
- It has several esoteric operators like inside and the
streaming operators, which have their own sub-syntax of sorts.
- It has nested attributes like (* foo, bar = 5 *) that can
be attached to almost any expression as annotations for tools. See
These expressions occur pretty much everywhere throughout a
SystemVerilog design—ports, parameters, assignments, instances,
statements, you name it. This complexity and frequency of usage makes
a good representation of expressions especially important.
A major differences between vl2014 and vl is that VL
uses a new, more mutually recursive, and more strongly typed
expression representation. See new-expression-representation
for some discussion about the motivation for this change.
Note that there are many useful functions for working with
expressions in mlib. See most especially expr-tools
which contains many basic functions.
- Representation of (* foo = 3, bar *) style attributes.
- Representation of a single SystemVerilog expression.
- Representation of a SystemVerilog variable datatype, e.g., logic
[7:0][3:0], string, mystruct_t [3:0], etc.
- Notes about the new expression representation in vl, and how
and why it diverges from the vl2014::expressions.
- Representation of the values to use for a module instance's
parameters (not ports).
- A single item in an event control list.
- Option type; vl-paramargs or nil.
- A list of vl-evatom-p objects.
- Representation of any named arguments of a function call.
- A list of vl-paramvalue-p objects.
- A list of vl-namedparamvalue-p objects.