ofInt static method
Converts int
value
to a valid LogicValue with width
number
of bits.
width
must be greater than or equal to 0.
Implementation
static LogicValue ofInt(int value, int width) => width > INT_BITS
? _bigLogicValueOrFilled(
BigInt.from(value).toUnsigned(INT_BITS), BigInt.zero, width)
: _smallLogicValueOrFilled(value, 0, width);