populate method

FxvType populate({
  1. required LogicValue integer,
  2. required LogicValue fraction,
})

Populates the FixedPointValue with the given integer and fraction, then performs additional validation.

Implementation

FxvType populate(
    {required LogicValue integer, required LogicValue fraction}) {
  if (_hasPopulated) {
    throw RohdHclException('FixedPointPopulator: already populated');
  }
  _hasPopulated = true;

  return _unpopulated
    ..integer = integer
    ..fraction = fraction;
}