Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Using the Linear Algebra Functions (FPGA Module)

LabVIEW 2013 FPGA Module Help

Edition Date: June 2013

Part Number: 371599J-01

»View Product Info

Use the Linear Algebra functions to perform vector and matrix calculations in high speed and high throughput FPGA applications, such as RF applications. You can configure the Linear Algebra functions to fit different throughput rates, matrix or vector sizes, and data types to meet timing and resource requirements.

Linear Algebra Behaviors

Consider the following behaviors when developing FPGA applications with the Linear Algebra functions:

  • Target support—All FPGA targets support the Linear Algebra functions.
  • Single-cycle Timed Loop support—LabVIEW supports the Linear Algebra functions only inside the single-cycle Timed Loop.
  • Four-wire handshaking protocol support—The Linear Algebra functions support handshaking signals.
  • Simulation support—The Linear Algebra functions support both desktop and full diagram simulation. However, they do not guarantee cycle-accurate behavior for desktop simulation when output valid is FALSE, as the function has not computed a result that downstream nodes can use. When output valid is FALSE, the function may return different results on an FPGA target than on a host computer. Data returned during the deassertion of output valid might be invalid and should be discarded.
  • Limited data type support—The Linear Algebra functions support only scalar and vector values of the fixed-point data type. Each function includes separate connector pane terminals for real and imaginary numbers.
  • Labeled input and output terminals—You can view encoding, word length, and integer word length of numeric terminals for each function in the Context Help window.

Related Information

Linear Algebra Functions

Scheduling Timing Using Handshaking Signals (FPGA Module)

Configuring the Linear Algebra Functions

To configure a Linear Algebra function, either double-click the function or right-click the function and select Configure. LabVIEW displays a configuration dialog box for the function. Use this dialog box to configure how the function executes and the results the function returns. To avoid unsupported fixed-point configurations that result in broken wires, such as unsupported word lengths or integer word lengths, use the configuration dialog box to set the encodings, word lengths, and integer word lengths of input terminals.

Configuring Function Appearance

You can display each Linear Algebra function in either expanded or contracted form. The expanded view displays the encoding, word length, and integer word length of each terminal. The contracted view saves space on the block diagram. To configure the appearance of a function, right-click that function and select Expanded View or Contracted View.

Caveats and Restrictions for Input and Output Terminals

The following list describes input and output terminal behavior of the Linear Algebra functions:

  • The Linear Algebra functions support only scalar and vector inputs of the fixed-point data type. Each function includes separate terminals for real and imaginary numbers.
  • The input terminals of the Linear Algebra Dot Product, Linear Algebra Matrix Transpose, and Linear Algebra Norm Square functions adapt to the data types as well as the input pattern you wire to the function. The input terminals of the Linear Algebra Matrix Multiply function adapt to the data types but not the input pattern wired to the function. Configure the input pattern of the Linear Algebra Matrix Multiply function using the Configure Linear Matrix Multiply dialog box.
  • The real and imaginary inputs of a Linear Algebra function must be of the same data type and input pattern, otherwise the data type or array size of the real data portion of the input terminal takes precedent.

Unsupported Configurations of Input Terminals

If you wire an unsupported fixed-point configuration to a terminal, LabVIEW breaks the wire and you cannot run the function. LabVIEW also might coerce the data type 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 this fixed-point configuration.

Avoiding Unsupported Input Configurations

You can avoid broken wires or coerced data types 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 to launch the configuration dialog box.
  3. Configure the encoding, word length, and integer word length of the input terminal(s) using the input section of the configuration dialog box. Depending on the function, LabVIEW dims certain options and restricts the values you can enter in other text boxes.
  4. Click the OK button.

Right-click the input terminal and select Create»Control or Create»Constant to create an input with a fixed-point configuration that the function supports.

Related Information

Numeric Data

Using the Fixed-Point Data Type (FPGA Module)

Overflow and Rounding of Output Terminals

For the Linear Algebra functions that include an Overflow mode configuration, if the range of an output terminal is not large enough to hold the theoretical computed value, overflow occurs. In this situation, the function either wraps or saturates, as specified in the Overflow mode pull-down in the configuration dialog box.

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 enable this option, 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. LabVIEW supports a maximum word length of 64 bits and a maximum integer word length of 1023 bits. If you place a checkmark in this checkbox and the output data type requires a word length that exceeds these maximum values, overflow and/or rounding errors might occur.

Related Information

Numeric Data

Using the Fixed-Point Data Type (FPGA Module)


 

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