CacheModelBackingStore constructor

CacheModelBackingStore({
  1. required int dataWidth,
  2. required int metadataWidth,
  3. int? addrWidth,
  4. @Deprecated('Use addrWidth instead.') int? addressWidth,
})

Creates an empty backing store.

addressWidth is the deprecated former name of addrWidth.

Implementation

CacheModelBackingStore({
  required this.dataWidth,
  required this.metadataWidth,
  int? addrWidth,
  @Deprecated('Use addrWidth instead.') int? addressWidth,
}) : addrWidth = resolveAddrWidth(addrWidth, addressWidth) {
  if (this.addrWidth < 1 || dataWidth < 1 || metadataWidth < 1) {
    throw ArgumentError('Backing-store widths must be positive.');
  }
  _storage = SparseMemoryStorage(
      addrWidth: this.addrWidth, dataWidth: dataWidth + metadataWidth);
}