CompressedOrderEntry<LogicType extends Logic> constructor

CompressedOrderEntry<LogicType extends Logic>({
  1. required LogicType metadata,
  2. required int maxUops,
  3. required int uopCountWidth,
  4. required int realDestCountWidth,
  5. String? name,
})

Creates grouped ordered metadata.

Implementation

CompressedOrderEntry({
  required LogicType metadata,
  required this.maxUops,
  required this.uopCountWidth,
  required this.realDestCountWidth,
  String? name,
}) : super([
        metadata,
        Logic(name: 'uopCount', width: uopCountWidth),
        Logic(name: 'completedMask', width: maxUops),
        Logic(name: 'exceptionMask', width: maxUops),
        Logic(name: 'flushMask', width: maxUops),
        Logic(name: 'realDestCount', width: realDestCountWidth),
      ], name: name ?? '${metadata.name}_compressed_entry') {
  if (maxUops < 1 || uopCountWidth < 1 || realDestCountWidth < 1) {
    throw ArgumentError('Compressed entry widths must be positive.');
  }
  if (uopCountWidth < max(1, (maxUops + 1).log2Ceil)) {
    throw ArgumentError('uopCountWidth must represent maxUops.');
  }
}