src/memory/mappers/sxrom.cc
/*
 * Creates an 8-bit bitmask that can select the provided number of elements.
 */
Creates an 8-bit bitmask that can select the provided number of elements.
Creates an 8 - bit bitmask that can select the provided number of elements .
DataWord Sxrom::CreateMask(DataWord items) {
  DataWord msb = MsbWord(items);
  if ((msb != 0) && (msb == items)) {
    return msb - 1U;
  } else if (msb != 0) {
    return (msb << 1U) - 1U;
  } else {
    return 0U;
  }
}
DataWord Sxrom :: CreateMask ( DataWord items ) { DataWord msb = MsbWord ( items ) ; if ( ( msb != 0 ) && ( msb == items ) ) { return msb - 1U ; } else if ( msb != 0 ) { return ( msb << 1U ) - 1U ; } else { return 0U ; } }
Creates an 8-bit bitmask that can select the provided number of elements.
Creates an 8 - bit bitmask that can select the provided number of elements .