Main Content

Vendor Specific Floating Point Library

Select vendor-specific floating-point library

Since R2023a

Model Configuration Pane: Floating Point


Select a vendor-specific floating-point library in your design, based on the setting of the Synthesis Tool parameter and use the library in combination with a native floating-point (NFP) library. Using a NFP and vendor-specific floating point library together in a mixed design more efficiently uses resources on the FPGA, such as hardened DSP floating point adder or multiplier primitives, which allows you to fit a bigger design into the FPGA fabric.


To specify this parameter, set the Synthesis Tool parameter to your target tool and select Use Floating Point. The options for Vendor Specific Floating Point Library depend on the synthesis tool you select.



Default: None

The options are:


Use only the native floating-point mode to target ASIC devices or generate vendor-independent code that you can use on different FPGA or SoC devices.


Specify Altera® Megafunctions (ALTERA FP FUNCTIONS) as the floating-point target library. You can provide the IP target frequency.


Specify Altera Megafunctions (ALTFP) as the floating-point target library. You can provide the objective and latency strategy for the IP.


Specify Xilinx® LogiCORE® as the floating-point target library. You can provide the objective and latency strategy for the IP.


To set the vendor-specific floating-point library:

  1. Use the hdlcoder.createFloatingPointTargetConfig function to create a floating-point IP configuration object, hdlcoder.FloatingPointTargetConfig, for the floating-point library. For example, to create a mixed-mode floating-point target configuration with the native floating point library and the ALTERA FP FUNCTIONS library as the vendor-specific floating point library, use this command:

    fpconfig = hdlcoder.createFloatingPointTargetConfig("NativeFloatingPoint",...
       VendorFloatingPointLibrary = "AlteraFPFunctions");

  2. Set the floating-point target configuration on the model and generate HDL code. For example, to set the configuration on the sfir_single model and generate HDL code for the symmetric_fir subsystem, enter:

    hdlset_param("sfir_single", FloatingPointTargetConfiguration = fpconfig);

To get the floating point target configuration object from the model, enter:

fpconfig = hdlget_param("sfir_single", 'FloatingPointTargetConfiguration')

Recommended Settings

No recommended settings.

Programmatic Use

Parameter: VendorFloatingPointLibrary property of hdlcoder.FloatingPointTargetConfig object
Type: character vector
Default: 'None'

Version History

Introduced in R2023a