writeData method

void writeData(
  1. LogicValue addr,
  2. LogicValue data
)

Performs some validation on a write, aligns the address with alignAddress, and then calls setData.

Implementation

void writeData(LogicValue addr, LogicValue data) {
  if (!addr.isValid) {
    if (!isEmpty) {
      invalidWrite();
    }

    return;
  }

  setData(alignAddress(addr), data);
}