readData method

LogicValue readData(
  1. LogicValue addr
)

Aligns the address with alignAddress, then returns either the getData result in storage or else onInvalidRead's result.

Implementation

LogicValue readData(LogicValue addr) {
  final alignedAddr = alignAddress(addr);
  return getData(alignedAddr) ?? onInvalidRead(alignedAddr, dataWidth);
}