MemoryPortGeometry constructor

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

Creates validated port geometry.

addressWidth is the deprecated former name of addrWidth.

Implementation

MemoryPortGeometry({
  required this.dataWidth,
  int? addrWidth,
  @Deprecated('Use addrWidth instead.') int? addressWidth,
}) : addrWidth = resolveAddrWidth(addrWidth, addressWidth) {
  if (this.addrWidth <= 0 || dataWidth <= 0) {
    throw ArgumentError('Address and data widths must be positive.');
  }
}