write method

void write(
  1. BigInt address, {
  2. required LogicValue data,
  3. required LogicValue metadata,
})

Writes a complete block and its metadata.

Implementation

void write(BigInt address,
    {required LogicValue data, required LogicValue metadata}) {
  final target = _address(address);
  if (data.width != dataWidth || metadata.width != metadataWidth) {
    throw ArgumentError('Backing-store block widths do not match.');
  }
  _storage.setData(target, _pack((data: data, metadata: metadata)));
}