MemoryStorage constructor

MemoryStorage({
  1. required int addrWidth,
  2. required int dataWidth,
  3. void onInvalidWrite()? = _defaultOnInvalidWrite,
  4. LogicValue onInvalidRead(
    1. LogicValue addr,
    2. int dataWidth
    )?,
  5. LogicValue alignAddress(
    1. LogicValue addr
    )?,
})

Constrcuts a MemoryStorage with specified addrWidth and dataWidth.

Implementation

MemoryStorage({
  required this.addrWidth,
  required this.dataWidth,
  void Function()? onInvalidWrite = _defaultOnInvalidWrite,
  LogicValue Function(LogicValue addr, int dataWidth)? onInvalidRead,
  LogicValue Function(LogicValue addr)? alignAddress,
})  : onInvalidWrite = onInvalidWrite ?? _defaultOnInvalidWrite,
      onInvalidRead = onInvalidRead ?? _defaultOnInvalidRead,
      alignAddress = alignAddress ?? _defaultAlignAddress;