DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 12/12/2022

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

15.4.55. Sqrt

The Sqrt block applies a numerical root operation to its input and produces the result. The mask parameter pop-up menu selects the required root function that you apply.
Table 248.  Functions for the Sqrt Block
Function Description
cbrt(x) Cube root.
recipsqrt(x) Reciprocal square root.
sqrt(x) Square root.
Table 249.  Parameters for Sqrt Block
Parameter Values Description
Function cbrt(x), recipsqrt(x), or sqrt(x) Selects the numerical root function.
Floating-point rounding Correct or Faithful Only for sqrt(x) function.
Advanced Options Blank or struct('method',256)

The sqrt(x) function with integer input and output has two semantics: floor semantics, floor(sqrt(x)), for a logic reduction on wider data types or the default round-to-nearest semantics. To select floor semantics, type struct('method',256).

Table 250.  Port Interface for the Sqrt Block
Signal Direction Type Description Vector Data Support Complex Data Support
x Input For, recipsqrt(x), or sqrt(x), any fixed- or floating-point 32-bit integer. For cbrt(x) floating-point input only. Operand Yes No
q Output Output type depends on input type. Result Yes No