HDL Coder Support for FPGA Floating-Point Library Mapping
In the HDL Coder™ block library, a subset of Simulink® blocks support floating-point library mapping. The subset includes:
Blocks that perform basic math operations such as addition, multiplication, and complex trigonometric sine and cosine functions. These blocks map to one or more floating-point IP units on the target FPGA device.
Discrete blocks, blocks that perform signal routing, and blocks that perform math operations such as matrix concatenation. These blocks need not map to a floating-point IP unit on the target FPGA device.
Supported Blocks That Map to FPGA Floating-Point Target IP
The following table summarizes the Simulink blocks that can map to FPGA floating-point IP cores.
When mapping to floating-point IP cores, some blocks have mode restrictions.
Note
Some blocks do not map to a floating-point IP core in the third-party hardware. For example, the Abs block maps to an Altera® target IP core but not to a Xilinx® target IP core.
Block | Altera Megafunction IP (ALTFP and ALTERA FP Functions) | Xilinx LogiCORE IP | AMD® Floating Point Library IP | Remarks and Limitations |
---|---|---|---|---|
Abs | ✓ | — | ||
Add | ✓ | ✓ | ✓ | — |
Bias | ✓ | ✓ | — | |
Compare To Constant | ✓ | ✓ | — | |
Compare To Zero | ✓ | ✓ | — | |
Data Type Conversion | ✓ | ✓ |
| |
Decrement Real World | ✓ | ✓ | — | |
Discrete FIR Filter | ✓ | ✓ | — | |
Discrete Transfer Fcn | ✓ | ✓ | — | |
Discrete-Time Integrator | ✓ | ✓ | — | |
Divide | ✓ | ✓ | — | |
Dot Product | ✓ | ✓ | ||
Gain | ✓ | ✓ | ✓ | — |
Math Function | ✓ |
| ||
MinMax | ✓ | ✓ | — | |
Multiply-Add | ✓ | ✓ | — | |
Product | ✓ | ✓ | ✓ |
|
Product of Elements | ✓ | ✓ |
| |
Reciprocal Sqrt | ✓ | — | ||
Relational Operator | ✓ | ✓ | — | |
Sqrt | ✓ | ✓ | — | |
Subtract | ✓ | ✓ | ✓ | — |
Sum | ✓ | ✓ | ✓ |
|
Sum of Elements | ✓ | ✓ |
| |
Trigonometric Function | ✓ |
| ||
Unary Minus | ✓ | ✓ | — |
Supported Blocks That Do Not Need to Map to FPGA Floating-Point Target IP
Following are the Simulink blocks that generate HDL code but need not map to an FPGA floating-point IP core.
Downsample (DSP System Toolbox)
Switch block with control input other than
u2 ~= 0
.Upsample (DSP System Toolbox)
Limitations for FPGA Floating-Point Library Mapping
Complex data types are not supported.
The streaming optimization is not supported with floating-point library mapping.
The resource sharing optimization is not supported with Unary Minus and Abs blocks.
For IP Core Generation, and Simulink Real-Time™ FPGA I/O workflows, your DUT ports cannot use floating-point data types.