Because you cannot use floating-point data types in applications targeted to an FPGA, you must convert any floating-point data types in your application to fixed-point before you can implement the application on an FPGA.
Before you convert the data types of the objects in your design, make sure that you have already created a copy of the code you want to convert and added it to the testbench. Refer to Adapting a Testbench for Fixed-Point Conversion for help creating a copy of the code you want to convert and setting up your testbench.
Complete the following tasks to convert the floating-point data types in your design to an accurate fixed-point representation:
-
Profile code to convert to fixed-point—Profile your design to gather and display a table of all convertible floating-point objects and data types in your design in preparation for converting your floating-point design to a fixed-point design.
-
Choose a fixed-point conversion strategy—When converting the floating-point data types in your design to fixed-point, you choose a conversion strategy that defines how LabVIEW generates initial data type suggestions.
-
Convert floating-point data types to fixed-point using suggestions from LabVIEW—When converting floating-point data types in your design to fixed-point, LabVIEW provides fixed-point data type suggestions based on your conversion strategy settings.
-
Refine converted fixed-point data types to meet your precision and resource requirements—When converting your floating-point data types to fixed-point for implementation on an FPGA, you may need to adjust the fixed-point data types to meet your application requirements.
Examples
Search LabVIEW for the following installed lessons:
-
Fixed-Point Conversion
-
Introduction to Float-to-Fixed Conversion
After the output of your fixed-point design meets both the precision and resource requirements of your application, you can begin to map out your application for use with hardware.