FixedPoint constructor

FixedPoint({
  1. required bool signed,
  2. required int m,
  3. required int n,
  4. String? name,
  5. Naming? naming,
})

Constructs a FixedPoint signal.

Implementation

FixedPoint(
    {required this.signed,
    required this.m,
    required this.n,
    super.name,
    super.naming})
    : super(width: _fixedPointWidth(signed, m, n)) {
  if ((m < 0) | (n < 0)) {
    throw RohdHclException('m and n must be non-negative');
  }
  if (max(m, n) == 0) {
    throw RohdHclException('either m or n must be greater than zero');
  }
}