CreditFlowControl constructor
Views existing credit-control signals.
Implementation
CreditFlowControl({
required this.valid,
required this.creditReturn,
this.pool,
}) {
if (valid.width != 1 ||
poolCount < 1 ||
(poolCount > 1 && pool == null) ||
(pool != null && pool!.width < poolCount.log2Ceil)) {
throw ArgumentError(
'Credit flow requires a one-bit valid and a selector wide enough '
'for every returned-credit pool.');
}
}