Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Configuring Input and Output Terminals of the High Throughput Math Functions (FPGA Module)

LabVIEW 2011 FPGA Module Help

Edition Date: June 2011

Part Number: 371599G-01

»View Product Info

The value ranges of High Throughput Math function input and output terminals depend on the encoding, word length, and integer word length of the terminal. If a terminal is signed, the value range is [–2^( iwl–1), 2^(iwl–1)–2^(–wl+iwl)], where:

  • wl is the word length
  • iwl is the integer word length

If a terminal is unsigned, the value range is: [0, 2^ iwl –2^(–wl + iwl )].

For example, if wl = 16, iwl = 1, and the terminal is signed, the value range is [–2^(1–1), 2^(1–1)–2^(–16+1)], or [–1, 0.999969482421875]. If this terminal is unsigned, the value range is [0, 1.999969482421875].

Unsupported Fixed-Point Configurations of Input Terminals

The fixed-point configuration of a terminal refers to the encoding, word length, and integer word length of that terminal. The input terminals of some functions, such as the High Throughput Add function, support all fixed-point configurations that LabVIEW supports. The input terminals of other functions, such as the High Throughput Exponential function, limit the supported fixed-point configurations. Refer to the help topic of a particular function for information about fixed-point configurations that the function supports. Access this topic by right-clicking a function and selecting Help from the shortcut menu.

Note  Because the encoding, word length, and integer word length determine the value range of a terminal, the value range also is a factor in determining supported fixed-point configurations.

The following list shows the possible limitations an input terminal might have.

  • Unsupported encoding—For example, the High Throughput Square Root function does not support a signed data type.
  • Unsupported word length and/or integer word length—For example, if you wire data to the High Throughput Hyperbolic Sine & Cosine function and the encoding of that data type is signed, the function does not support an integer word length greater than 1 bit.
  • Unsupported value range—For example, if you wire data to the High Throughput Natural Logarithm function, the function does not support a value outside the range [1/e, 1).

In some cases, if you wire an unsupported configuration to a terminal, LabVIEW alerts you by breaking the wire. You cannot run the function. In other cases, LabVIEW coerces the wire to a supported configuration. You can run the function, but this coercion might cause the function to behave unexpectedly. If the wire is not broken and does not have a coercion dot, the input terminal supports that fixed-point configuration.

Avoiding Unsupported Fixed-Point Configurations

You can avoid broken or coerced wires on input terminals by using the configuration dialog box to specify the fixed-point configuration for a particular input terminal. Complete the following steps to configure a terminal in this way.

  1. Add the function to the block diagram.
  2. Double-click the function. LabVIEW launches the configuration dialog box.
  3. Use the Fixed-Point Configuration section to configure the data type of the terminal. Depending on the function, LabVIEW dims certain options and restricts the values you can enter in other text boxes. If you can specify a particular fixed-point configuration by using the configuration dialog box, the function supports that configuration.
  4. Click the OK button to save changes and close the dialog box.

After you complete these steps, you can right-click the input terminal and select Create»Control or Create»Constant. The control or constant you create has a fixed-point configuration that the function supports.

Overflow and Rounding of Output Terminals

If the range of an output terminal is not large enough to hold the theoretical computed value, overflow occurs. In this situation, the function behaves according to the option you specify in the Overflow mode pull-down list in the configuration dialog box. You also can specify whether the function displays a Boolean operation overflow output terminal on the block diagram. You can use the value of this terminal to control how a VI behaves if overflow occurs.

Note  Overflow also occurs if the High Throughput Divide or High Throughput Reciprocal function attempts to divide by zero.

In many situations, you can avoid overflow by placing a checkmark in the Adapt to source checkbox in the configuration dialog box of the function. If you place a checkmark in this checkbox, LabVIEW attempts to adjust the width and range of the output data type such that neither overflow nor rounding occurs. However, this adjustment is not possible in all situations. For example, if a function involves division, rounding always occurs. Also, some functions do not have this checkbox.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit