Table Of Contents

High Throughput Square Root (Clock-Driven Logic)

Last Modified: August 7, 2018

Computes the square root of a specified value (x).

connector_pane_image
datatype_icon

x

An input to this operation. x must be unsigned. This input supports only scalar values of the fixed-point data type.

datatype_icon

input valid

Boolean value that specifies whether the next data point is valid and can be processed.

Wire output valid of an upstream node to this input to transfer data from the upstream node to this node.

True The data point is valid and can be processed.
False The data point is not valid.
datatype_icon

ready for output

Boolean value that specifies whether downstream nodes are ready for this node to return a new value.

Use Feedback Node to wire ready for input of a downstream node to ready for output of the current node. If this input is False during a given cycle, output valid returns False during that cycle.

True The downstream node is ready for the next data point.
False The downstream node is not ready for the next data point.

Default: False

datatype_icon

operation overflow

A Boolean that indicates whether the theoretical computed value exceeds the valid range of the output data type.

TRUE The theoretical computed value exceeds the valid range of the output data type.
FALSE The theoretical computed value does not exceed the valid range of the output data type.
datatype_icon

sqrt(x)

Square root of x.

datatype_icon

output valid

Boolean value that indicates whether this node computes a result that downstream nodes can use.

Wire this output to input valid of a downstream node to transfer data from the node to the downstream node.

True Downstream nodes can use the result this node computes.
False This node returns an undefined value that downstream nodes cannot use.
spd-note-note
Note  

This node may return different undefined values when executed in simulation mode versus when executed on hardware.

datatype_icon

ready for input

Boolean value that indicates whether this node is ready to accept new input data.

Use Feedback Node to wire this output to ready for output of an upstream node.

True The node is ready to accept new input data.
False The node is not ready to accept new input data.
spd-note-note
Note  

If this output returns False during a given cycle, this node discards any data that other nodes send to this node during the following cycle. This node discards the data even if input valid is True during the following cycle.

Avoiding Overflow in sqrt(x)

If you leave Auto Adapt enabled for this node, overflow still can occur in the sqrt(x) output if all of the following conditions are true:

  • The Rounding pull-down menu in the Item tab specifies Round Half Up or Round Half to Even.
  • The integer word length of x is an even number.
  • The following relationship is true:
    fwl sqrt < log 2 ( 2 iwl x 2 2 iwl x 2 f w l x )
    where fwl refers to the fractional word length of an input and iwl refers to the integer word length of an input.

Complete the following steps to avoid overflow:

  1. Select this node on the diagram.
  2. Disable Auto Adapt for the Precision option on the Item tab.
  3. Configure the Precision, Overflow, and Rounding for the node.

After you complete these steps, High Throughput Square Root no longer adjusts the fixed-point configuration of sqrt(x) automatically. If you change the fixed-point configuration of the x input and still want to avoid overflow, re-enable Auto Adapt. Then, complete the same steps to specify an exact integer word length and ensure that no overflow occurs.

Where This Node Can Run:

Desktop OS: none

FPGA: All devices

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics