Intel® Stratix® 10 Variable Precision DSP Blocks User Guide

ID 683832
Date 8/13/2021
Public
Document Table of Contents

2.11. Exception Handling for Floating-Point Arithmetic

The Intel® Stratix® 10 floating-point arithmetic supports exception handling for the multiplier and adder blocks.

Table 9.  Supported Exception Flags
Exception Flags Width Description
Multiplication
mult_overflow 1

This signal indicates if the multiplier result is a larger value compared to the maximum presentable value.

1: If the multiplier result is a larger value compared to the maximum representable value and the result is cast to infinity.

0: If the multiplier result is not larger than the maximum presentable value.

This signal is not available in Adder or Subtract Mode.

mult_underflow 1

This signal indicates if the multiplier result is a smaller value compared to the minimum presentable value.

1: If the multiplier result is a smaller value compared to the minimum representable value and the result is flushed to zero.

0: If the multiplier result is a larger than the minimum representable value.

This signal is not available in Adder or Subtract Mode.

mult_inexact 1

This signal indicates if the multiplier result is an exact representation.

1: If the multiplier result is:
  • a rounded value
  • a smaller value compared to the minimum representable value or
  • a larger value compared to the maximum representable value.

0: If the multiplier result does not meet any of the criteria above.

This signal is not available in Adder or Subtract Mode.

mult_invalid 1

This signal indicates if the multiplier operation is ill-defined and produces an invalid result.

1: If the multiplier result is invalid and cast to qNaN.

0: If the multiplier result is not an invalid number.

This signal is not available in Adder or Subtract Mode.

Addition
adder_overflow 1

This signal indicates if the adder result is a larger value compared to the maximum representable value.

1: If the adder result is a larger value compared to the maximum presentable value and the result is cast to infinity.

0: If the adder result is not larger than the maximum presentable value.

This signal is not available in Multiplication Mode.

adder_underflow 1

This signal indicates if the adder result is a smaller value compared to the minimum presentable value.

1: If the adder result is a smaller value compared to the minimum representable value and the result is flushed to zero.

0: If the adder result is a larger than the minimum representable value.

This signal is not available in Multiplication Mode.

adder_inexact 1

This signal indicates if the adder result is an exact representation.

1: If the adder result is:
  • a rounded value
  • a smaller value compared to the minimum representable value or
  • a larger value compared to the maximum representable value.

0: If the adder result does not meet any of the criteria above.

This signal is not available in Multiplication Mode.

adder_invalid 1

This signal indicates if the adder operation is ill-defined and produces an invalid result.

1: If the adder result is invalid and cast to qNaN.

0: If the adder result is not an invalid number.

This signal is not available in Multiplication Mode.

Table 10.  Multiplier Exception Handling Possible Results
Input A Input B Result 4

Flags

Overflow/Underflow/Inexact/Invalid

Normalized Normalized Normalized value 0/0/0/0
Normalized (rounded) value 0/0/1/0
Positive/negative infinity value 1/0/1/0
Subnormal (denormal) value 0/1/1/0
0 or Subnormal (denormal) Normalized 0 value 0/0/0/0
Positive/negative infinity Normalized Positive/negative infinity value 0/0/0/0
Quiet Not A Number (qNaN) Normalized qNaN value 0/0/0/0
0 or Subnormal (denormal) 0 or Subnormal (denormal) 0 value 0/0/0/0
Positive/negative infinity 0 or Subnormal (denormal) qNaN value 0/0/0/1
Quiet Not A Number (qNaN) 0 or Subnormal (denormal) qNaN value 0/0/0/0
Positive/negative infinity Positive/negative Infinity Positive/negative infinity value 0/0/0/0
Quiet Not A Number (qNaN) Positive/negative Infinity qNaN value 0/0/0/0
Quiet Not A Number (qNaN) Quiet Not A Number (qNaN) qNaN value 0/0/0/0
Table 11.  Adder Exception Handling Possible Results
Input A Input B Result : 4

Flags

Overflow/Underflow/Inexact/Invalid

Normalized Normalized Normalized value 0/0/0/0
Normalized (rounded) value 0/0/1/0
Positive/negative infinity value 1/0/1/0
0 value

Sign bit = 0

0/0/0/0
Subnormal (denormal) value

The sign is preserved

0/1/1/0
0 or Subnormal (denormal) Normalized Input b 0/0/0/0
Positive/negative infinity Normalized Positive/negative infinity value 0/0/0/0
Quiet Not A Number (qNaN) Normalized qNaN value 0/0/0/0
0 or Subnormal (denormal) 0 or Subnormal (denormal) 0 value

For (-0 + (-0)) equation, sign bit = 1. For any other equation, sign bit = 0.

0/0/0/0
Positive/negative infinity 0 or Subnormal (denormal) Positive/negative infinity value 0/0/0/0
Quiet Not A Number (qNaN) 0 or Subnormal (denormal) qNaN value 0/0/0/0
Positive/negative infinity Positive/negative infinity

qNaN value for invalid cases

Positive/negative infinity value for valid cases

0/0/0/1 for invalid cases

0/0/0/0 for valid cases

Valid cases are:
  • Positive infinity value + positive infinity value
  • Negative infinity value + negative infinity value
  • Negative infinity value - positive infinity value
  • Positive infinity value - negative infinity value
Quiet Not A Number (qNaN) Positive/negative infinity qNaN value 0/0/0/0
Quiet Not A Number (qNaN) Quiet Not A Number (qNaN) qNaN value 0/0/0/0
4 Output exception flags. These flags do not change if exceptions are at input value.