Deciding Which Data Type to Use in FPGA Designs (FPGA Module)

LabVIEW 2018 FPGA Module Help


Edition Date: March 2018
Part Number: 371599P-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 FPGA Module Help
LabVIEW 2017 FPGA Module Help
LabVIEW 2018 FPGA Module Help
LabVIEW 2019 FPGA Module Help
LabVIEW 2020 FPGA Module Help

The following table describes the implications of using the integer, fixed-point, and single-precision floating-point data types for specific use cases. Use this table to help you decide which data type best suits your FPGA application.

Use Case Data Type Data Precision FPGA Resource Use Latency
You need to choose between calibrated fixed-point or uncalibrated integer I/O node outputs. Integer Proportional to word length. Higher dynamic range requires longer word lengths. Proportional to word length. Proportional to clock rate.
Your designs include data packing of multiple integers into a 32- or 64-bit word.
Your designs require bit manipulations, such as masking or inverting.
Your designs require resource-efficient arithmetic. Fixed-point
You need to acquire analog I/O from a cRIO chassis.
You need to use High Throughput Math functions.
You need to represent very large and very small numbers in the same data path, such as with accumulators. Single-precision floating-point 24-bit precision is maintained even for high dynamic range data paths. Significantly higher than fixed-point, especially for functions like Add, Subtract, and Multiply. Requires more clock cycles to compute than operations using the fixed-point or integer data types.
You need to rapidly prototype. Use single-precision floating-point to get functional hardware designs quickly. Convert to fixed-point as necessary to optimize FPGA performance or resource usage.

Related Information

Using the Single-Precision Floating-Point Data Type

Using the Fixed-Point Data Type

Using the Integer Data Type

WAS THIS ARTICLE HELPFUL?

Not Helpful