validateMask method

void validateMask(
  1. Logic mask
)

Validates a partial-write request for this layout.

Implementation

void validateMask(Logic mask) {
  if (!acceptsMask(mask)) {
    throw RohdHclException(
        'Protected memory mask width must equal laneCount=$laneCount.');
  }
  if (partialWritePolicy == ProtectedPartialWritePolicy.none &&
      mask.width != 1) {
    throw RohdHclException(
        'An unprotected layout cannot use a multi-lane protection mask.');
  }
}