ByteMaskedStore constructor

ByteMaskedStore({
  1. required int addressWidth,
  2. required int dataWidth,
  3. String? name,
})

Creates a byte-masked store forwarding candidate.

Implementation

ByteMaskedStore({
  required this.addressWidth,
  required this.dataWidth,
  String? name,
}) : super([
        Logic(name: 'address', width: addressWidth),
        Logic(name: 'data', width: dataWidth),
        Logic(name: 'byteEnable', width: dataWidth ~/ 8),
        Logic(name: 'valid'),
      ], name: name ?? 'byte_masked_store') {
  _requirePositive(addressWidth, 'addressWidth');
  _requirePositive(dataWidth, 'dataWidth');
  if (dataWidth % 8 != 0) {
    throw ArgumentError.value(
      dataWidth,
      'dataWidth',
      'Must contain a whole number of bytes.',
    );
  }
}