ReservationStationEntry<OperationType extends Logic, OperandType extends Logic> constructor

ReservationStationEntry<OperationType extends Logic, OperandType extends Logic>(
  1. OperationType operation, {
  2. required List<DependencyOperand<OperandType>> operands,
  3. required int tagWidth,
  4. required int ageWidth,
  5. String? name,
})

Creates a reservation-station entry.

Implementation

ReservationStationEntry(
  OperationType operation, {
  required List<DependencyOperand<OperandType>> operands,
  required this.tagWidth,
  required this.ageWidth,
  String? name,
})  : operandCount = operands.length,
      super([
        operation,
        ...operands,
        Logic(name: 'destinationTag', width: tagWidth),
        Logic(name: 'destinationValid'),
        Logic(name: 'age', width: ageWidth),
      ], name: name ?? '${operation.name}_reservation_station_entry') {
  _validatePositiveWidth(tagWidth, 'tagWidth');
  _validatePositiveWidth(ageWidth, 'ageWidth');
  if (operands.any((operand) => operand.tagWidth != tagWidth)) {
    throw ArgumentError(
        'Every dependency operand must use the destination tag width.');
  }
}