Vl-weirdint
Representation for constant integer literals with X or Z bits.
This is a product type introduced by defprod.
Fields
- origwidth — posp
- Subtle; generally should not be used; see below.
- bits — vl-bitlist
- An MSB-first list of the four-valued Verilog bits making up
this constant's value; see vl-bit-p.
- origtype — vl-exprtype-p
- Subtle; generally should not be used; see below.
- wasunsized — booleanp
- Did this constant have an explicit size?
Additional Requirements
The following invariant is enforced on the fields:
(equal (len bits) origwidth)
Weird integers are produced by source code constructs like
1'bz, 3'b0X1, and so on.
The origwidth, origtype, and wasunsized fields are analogous
to those from vl-constint-p; see the discussion there for details. But
unlike a constint, a weirdint does not have a natural-number value.
Instead it has a list of four-valued bits that may include X and Z
values.
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.
Subtopics
- Vl-weirdint-fix
- Fixing function for vl-weirdint structures.
- Vl-weirdint-p
- Recognizer for vl-weirdint structures.
- Vl-weirdint-equiv
- Basic equivalence relation for vl-weirdint structures.
- Make-vl-weirdint
- Basic constructor macro for vl-weirdint structures.
- Vl-weirdint->origtype
- Get the origtype field from a vl-weirdint.
- Vl-weirdint->bits
- Get the bits field from a vl-weirdint.
- Vl-weirdint->wasunsized
- Get the wasunsized field from a vl-weirdint.
- Vl-weirdint->origwidth
- Get the origwidth field from a vl-weirdint.
- Change-vl-weirdint
- Modifying constructor for vl-weirdint structures.