CacheModelBackingStore constructor
- required int dataWidth,
- required int metadataWidth,
- int? addrWidth,
- @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);
}