operator >> method

Logic operator >>(
  1. dynamic other
)

Arithmetic right-shift.

The upper-most bits of the result will be equal to the upper-most bit of the original signal.

If isNet and other is constant, then the result will also be a net.

Implementation

Logic operator >>(dynamic other) {
  if (isNet) {
    // many SV simulators don't support shifting of nets, so default this
    final shamt = _constShiftAmount(other);
    if (shamt != null) {
      return [
        this[-1].replicate(shamt),
        getRange(shamt),
      ].swizzle();
    }
  }

  return ARShift(this, other).out;
}