Main Content

Simulink Blocks Supported by Using Native Floating Point

HDL Coder™ native floating point can generate target-independent HDL code from your floating-point design. You can synthesize your floating-point design on any generic FPGA or ASIC. Floating-point designs have better precision, higher dynamic range, and a shorter development cycle than fixed-point designs. If your design has complex math and trigonometric operations, use native floating-point technology.

HDL Coder supports several Simulink® blocks, including math and trigonometric blocks by using native floating-point technology.

HDL Floating Point Operations Library

In the HDL Floating Point Operations library, HDL Coder supports blocks that have single and double data types in the Native Floating Point mode. For certain blocks, such as Discrete-Time Integrator and Discrete PID Controller, use zero latency strategy.

When you use half types, these blocks are supported in Native Floating Point mode.

Supported Simulink Blocks in Math Operations Library

In the Math Operations library, these blocks are supported for HDL code generation:

Block NameSupported by Half Data TypesSupported by Single Data TypesSupported by Double Data types Complex Data SupportRemarks
AbsNoYesYesYesNot Applicable
AddYesYesYesYesNot applicable
AssignmentNoYesYesYesNot applicable
BiasNoYesYesYesNot applicable
Complex to Real-ImagNoYesYesYesNot applicable
DivideYesYesYesNoNot applicable
Dot ProductYesYesYesNoNot applicable
GainYesYesYesYesNot applicable
MinMaxNoYesYesNoNot applicable
Multiply-AddYesYesYesYesNot applicable
ProductYesYesYesYesIf you configure the block to perform matrix multiplication by setting the Multiplication block parameter to Matrix(*), the DotProductStrategy must be set to Fully Parallel.
Product of ElementsYesYesYesYesNot applicable
Real-Imag to ComplexNoYesYesNoNot applicable
Reciprocal SqrtNoYesYesNoNot applicable
ReshapeYesYesYesYesNot applicable
SqrtNoYesYesNoNot applicable
SubtractYesYesYesYesNot applicable
SumYesYesYesYesNot applicable
Sum of ElementsYesYesYesYesNot applicable
Trigonometric FunctionNoYesNoNoNot applicable
Unary MinusYesYesYesYesNot applicable
Vector Concatenate, Matrix ConcatenateYesYesYesYesNot applicable

Supported Functions in Math Function Block

In the Math Function block, these functions are supported for HDL code generation:

Math FunctionsSupported Floating-Point DatatypesComplex Data Support
HalfSingleDouble
exp NoYesNoNo
log NoYesYesNo
10^u NoYesNoNo
log10 NoYesNoNo
magnitude^2 NoYesYesYes
square NoYesNoYes
pow NoYesNoNo
conj NoYesNoYes
reciprocal YesYesYesNo
hypot NoYesNoNo
rem NoYesNoNo
mod NoYesNoNo
transpose YesYesYesYes
hermitian NoYesNoYes

Supported Simulink Blocks in Other Libraries

The table shows the list of supported blocks for HDL code generation in other HDL Coder block libraries.

Block LibrarySupported by Half Data TypesSupported by Single Data TypesSupported by Double Data Types

Discrete

The supported blocks include the set of delay blocks including the synchronous blocks, and Integer Delay, and Tapped Delay.

The supported blocks include:

  • Zero Order Hold

  • Set of delay blocks including the synchronous blocks, and Integer Delay, and Tapped Delay.

The supported blocks include:

  • Zero Order Hold

  • Set of delay blocks including the synchronous blocks, and Integer Delay, and Tapped Delay.

HDL Operations

Blocks in this library are not supported.

All blocks are supported.

All blocks are supported.

HDL RAMs

Blocks in this library are not supported.

All blocks are supported.

All blocks are supported.

HDL Subsystems

All blocks are supported.

All blocks are supported.

All blocks are supported.

Logic and Bit Operations

Supported blocks include:

  • Compare to Constant

  • Relational Operator

  • Logical Operator

  • Detect Change

  • Detect Increase

  • Detect Decrease

All blocks are supported.

All blocks are supported.

Lookup Tables

Blocks in this library are not supported.

All blocks are supported.

All blocks are supported.

Model Verification

Blocks in this library are not supported.

All blocks are supported.

All blocks are supported.

Model-Wide Utilities

Blocks in this library are not supported.

All blocks are supported.

All blocks are supported.

Ports & Subsystems

Enable, reset, input, and output ports, model references, and subsystem blocks are supported.

Enable, reset, input, and output ports, model references, and subsystem blocks are supported.

Enable, reset, input, and output ports, model references, and subsystem blocks are supported.

Signal Attributes

Supported blocks include:

  • Data Type Conversion

  • Data Type Duplicate

  • Rate Transition

  • Signal Specification

  • Signal Conversion

  • Bus to Vector

  • Probe

All blocks are supported.

All blocks are supported.

Signal Routing

All blocks are supported.

All blocks are supported.

All blocks are supported.

Sources

The supported blocks include Inport, Constant, and Ground blocks.

The supported blocks include Inport, Constant, and Ground blocks.

The supported blocks include Inport, Constant, and Ground blocks.

Sinks

All blocks are supported.

All blocks are supported.

All blocks are supported.

User-Defined Functions

MATLAB Function blocks are supported.

MATLAB Function blocks are supported.

MATLAB Function blocks are supported.

Simulink Block Restrictions

In native floating-point mode, the code generator does not support these blocks or block architectures:

  • Biquad Filter.

  • Sum of Elements with complex input types.

  • MATLAB System blocks.

  • Dot Product in complex mode with Architecture as Tree or Linear.

  • Discrete FIR Filter with Architecture other than Fully Parallel.

  • Dead Zone and Dead Zone Dynamic.

  • Polar to Cartesian.

  • For the Data Type Conversion block:

    • Stored Integer (SI) mode for Input and output to have equal setting is not supported.

    • The Saturate on integer overflow check box must be left cleared.

See Also

Modeling Guidelines

Functions

Related Examples

More About