This Operation comes directly from the instruction owner; the page does not rewrite its behavior.
34
5pure func E8M0NumericFormatDescriptor() => NumericFormatDescriptor6begin7 return NumericFormatDescriptor {8 available = TRUE, kind = NumericFormatKind_E8M0,9 carrier_bits = 8, lane_bits = 8, lanes_per_carrier = 1,10 sign_bits = 0, sign_bit = 0,11 exponent_bits_min = 8, exponent_bits_max = 8,12 fraction_bits_min = 0, fraction_bits_max = 0,13 exponent_bias_available = TRUE, exponent_bias = 127,14 required_low_zero_bits = 0, required_high_zero_bits = 0,15 has_zero = FALSE, has_signed_zero = FALSE, has_subnormal = FALSE,16 has_infinity = FALSE, has_quiet_nan = TRUE,17 has_signaling_nan = FALSE18 };19end;20
21pure func E8M0FiniteDecomposition(value: bits(8))22 => (boolean, boolean, Word, integer {-1074..1023})23begin24 if value == Ones{8} then25 return (FALSE, FALSE, Zeros{PTO_XLEN}, 0);26 else return (TRUE, FALSE, Zeros{PTO_XLEN} + 1,27 (UInt(value) - 127) as integer {-1074..1023});28 end;29end;30
31pure func HardwareNumericScaleBlockElements() => integer {32}32begin33 return 32;34end;35pure func ClassifyE8M0(value: bits(8)) => NumericValueClass36begin37 if value == Ones{8} then return NumericValue_QuietNaN;38 else return NumericValue_PositiveNormal;39 end;40end;41
42pure func E8M0CanonicalNaN() => Word43begin44 return Zeros{PTO_XLEN} + 0xff;45end;
View the complete ASL owner
1234
5pure func E8M0NumericFormatDescriptor() => NumericFormatDescriptor6begin7 return NumericFormatDescriptor {8 available = TRUE, kind = NumericFormatKind_E8M0,9 carrier_bits = 8, lane_bits = 8, lanes_per_carrier = 1,10 sign_bits = 0, sign_bit = 0,11 exponent_bits_min = 8, exponent_bits_max = 8,12 fraction_bits_min = 0, fraction_bits_max = 0,13 exponent_bias_available = TRUE, exponent_bias = 127,14 required_low_zero_bits = 0, required_high_zero_bits = 0,15 has_zero = FALSE, has_signed_zero = FALSE, has_subnormal = FALSE,16 has_infinity = FALSE, has_quiet_nan = TRUE,17 has_signaling_nan = FALSE18 };19end;20
21pure func E8M0FiniteDecomposition(value: bits(8))22 => (boolean, boolean, Word, integer {-1074..1023})23begin24 if value == Ones{8} then25 return (FALSE, FALSE, Zeros{PTO_XLEN}, 0);26 else return (TRUE, FALSE, Zeros{PTO_XLEN} + 1,27 (UInt(value) - 127) as integer {-1074..1023});28 end;29end;30
31pure func HardwareNumericScaleBlockElements() => integer {32}32begin33 return 32;34end;35pure func ClassifyE8M0(value: bits(8)) => NumericValueClass36begin37 if value == Ones{8} then return NumericValue_QuietNaN;38 else return NumericValue_PositiveNormal;39 end;40end;41
42pure func E8M0CanonicalNaN() => Word43begin44 return Zeros{PTO_XLEN} + 0xff;45end;4647