InferredSramDescription constructor
- required int dataWidth,
- required int entryCount,
- int? addrWidth,
- @Deprecated('Use addrWidth instead.') int? addressWidth,
Creates a validated SRAM description.
addressWidth is the deprecated former name of addrWidth.
Implementation
InferredSramDescription({
required this.dataWidth,
required this.entryCount,
int? addrWidth,
@Deprecated('Use addrWidth instead.') int? addressWidth,
}) : addrWidth = resolveAddrWidth(addrWidth, addressWidth) {
if (this.addrWidth < 1 ||
dataWidth < 1 ||
entryCount < 1 ||
BigInt.from(entryCount) > (BigInt.one << this.addrWidth)) {
throw ArgumentError('Invalid SRAM geometry.');
}
}