This Operation comes directly from the instruction owner; the page does not rewrite its behavior.
34
5pure func E1M2X2NumericFormatDescriptor() => NumericFormatDescriptor6begin7 return NumericFormatDescriptor {8 available = TRUE, kind = NumericFormatKind_FixedBinary,9 carrier_bits = 8, lane_bits = 4, lanes_per_carrier = 2,10 sign_bits = 1, sign_bit = 3,11 exponent_bits_min = 1, exponent_bits_max = 1,12 fraction_bits_min = 2, fraction_bits_max = 2,13 exponent_bias_available = TRUE, exponent_bias = 1,14 required_low_zero_bits = 0, required_high_zero_bits = 0,15 has_zero = TRUE, has_signed_zero = TRUE, has_subnormal = FALSE,16 has_infinity = FALSE, has_quiet_nan = FALSE,17 has_signaling_nan = FALSE18 };19end;20
21pure func E1M2X2FiniteDecomposition(value: Word)22 => (boolean, boolean, Word, integer {-1074..1023})23begin24 let lane = value[3:0];25 let exponent = lane[2:2];26 let fraction = lane[1:0];27 if exponent == Zeros{1} then28 if fraction == Zeros{2} then29 return (TRUE, lane[3] == '1', Zeros{PTO_XLEN}, 0);30 else return (TRUE, lane[3] == '1',31 ZeroExtend{PTO_XLEN}(fraction), -2);32 end;33 else return (TRUE, lane[3] == '1',34 LSL(Zeros{PTO_XLEN} + 1, 2) +35 ZeroExtend{PTO_XLEN}(fraction), -2);36 end;37end;38pure func ClassifyE1M2X2(value: Word) => NumericValueClass39begin40 return NumericValueClassFromFiniteSign(value[3],41 value[2:0] == Zeros{3}, FALSE);42end;43
44pure func E1M2X2SignedZeroEncodings() => (Word, Word)45begin46 return (Zeros{PTO_XLEN}, Zeros{PTO_XLEN} + 0x8);47end;
View the complete ASL owner
1234
5pure func E1M2X2NumericFormatDescriptor() => NumericFormatDescriptor6begin7 return NumericFormatDescriptor {8 available = TRUE, kind = NumericFormatKind_FixedBinary,9 carrier_bits = 8, lane_bits = 4, lanes_per_carrier = 2,10 sign_bits = 1, sign_bit = 3,11 exponent_bits_min = 1, exponent_bits_max = 1,12 fraction_bits_min = 2, fraction_bits_max = 2,13 exponent_bias_available = TRUE, exponent_bias = 1,14 required_low_zero_bits = 0, required_high_zero_bits = 0,15 has_zero = TRUE, has_signed_zero = TRUE, has_subnormal = FALSE,16 has_infinity = FALSE, has_quiet_nan = FALSE,17 has_signaling_nan = FALSE18 };19end;20
21pure func E1M2X2FiniteDecomposition(value: Word)22 => (boolean, boolean, Word, integer {-1074..1023})23begin24 let lane = value[3:0];25 let exponent = lane[2:2];26 let fraction = lane[1:0];27 if exponent == Zeros{1} then28 if fraction == Zeros{2} then29 return (TRUE, lane[3] == '1', Zeros{PTO_XLEN}, 0);30 else return (TRUE, lane[3] == '1',31 ZeroExtend{PTO_XLEN}(fraction), -2);32 end;33 else return (TRUE, lane[3] == '1',34 LSL(Zeros{PTO_XLEN} + 1, 2) +35 ZeroExtend{PTO_XLEN}(fraction), -2);36 end;37end;38pure func ClassifyE1M2X2(value: Word) => NumericValueClass39begin40 return NumericValueClassFromFiniteSign(value[3],41 value[2:0] == Zeros{3}, FALSE);42end;43
44pure func E1M2X2SignedZeroEncodings() => (Word, Word)45begin46 return (Zeros{PTO_XLEN}, Zeros{PTO_XLEN} + 0x8);47end;4849