Representation for constant integer literals with any X or Z bits,
This is a product type, introduced by deftagsum in support of vl-value.
- bits — vl-bitlist
- An MSB-first list of the four-valued Verilog bits making up
this constant's value; see vl-bit-p.
- origsign — vl-exprsign-p
- Subtle; generally should not be used; see below.
- wasunsized — booleanp
- Did this constant have an explicit size?
The following invariant is enforced on the fields:
Weird integers are produced by source code constructs like
1'bz, 3'b0X1, and so on.
Weirdints are mostly like vl-constints except that instead
of having a natural number value they have bits, a list of
four-valued vl-bits, which are always represented in MSB-first
The origsign and wasunsized fields are analogous to
those from a vl-constint; see the discussion there for
Unlike a constint, a weirdint has no origwidth. Instead, its
original width is implicitly just the length of its bits. When our
lexer encounters a weirdint like 5'b1x, it automatically
extends it to the desired width; see for instance vl-correct-bitlist. Note that, as with constints, you usually
should not be looking at this length or at the origsign
field, because these original values are not necessarily the correct
post-sizing sizes and signedness.
Like constinsts, all weirdints are automatically constructed with
hons. This may not be worthwhile since there are probably
usually not too many weirdints, but by the same reasoning it
shouldn't be too harmful.
- Fixing function for non-empty vl-bitlists.
- Get the bits field from a vl-weirdint.
- Basic constructor macro for vl-weirdint structures.
- Get the wasunsized field from a vl-weirdint.
- Get the origsign field from a vl-weirdint.
- Representation of a single Verilog bit (0, 1, X, or Z).
- Modifying constructor for vl-weirdint structures.