MultiPoolCreditInterface<LogicType extends Logic> constructor

MultiPoolCreditInterface<LogicType extends Logic>(
  1. LogicType data, {
  2. required int poolCount,
})

Creates a multi-pool credit channel with the given payload shape.

Implementation

MultiPoolCreditInterface(this.data, {required this.poolCount})
    : super(portsFromProvider: [
        data,
        Logic.port('pool', _poolWidth(poolCount)),
        Logic.port('valid')
      ], portsFromConsumer: [
        Logic.port('creditReturn', poolCount)
      ]) {
  if (poolCount < 1) {
    throw ArgumentError.value(poolCount, 'poolCount', 'Must be positive.');
  }
}