InferredSramDescription constructor

InferredSramDescription({
  1. required int dataWidth,
  2. required int entryCount,
  3. int? addrWidth,
  4. @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.');
  }
}