CacheTransactionEviction<T extends Logic, M extends Logic, C extends Logic> constructor
Creates an eviction schema.
addressWidth is the deprecated former name of addrWidth.
Implementation
CacheTransactionEviction({
required int tokenWidth,
required T dataSchema,
required M lineMetadataSchema,
required C contextSchema,
int? addrWidth,
int causeWidth = 1,
String name = 'cache_eviction',
@Deprecated('Use addrWidth instead.') int? addressWidth,
}) : super([
Logic(name: 'token', width: tokenWidth),
Logic(name: 'cause', width: causeWidth),
Logic(
name: 'address',
width: resolveAddrWidth(addrWidth, addressWidth)),
cloneTypedPayload(dataSchema, name: 'data'),
cloneTypedPayload(lineMetadataSchema, name: 'lineMetadata'),
cloneTypedPayload(contextSchema, name: 'requestContext'),
], name: name) {
if (resolveAddrWidth(addrWidth, addressWidth) < 1 ||
tokenWidth < 1 ||
causeWidth < 1) {
throw ArgumentError('Invalid cache eviction geometry.');
}
}