HDL Applications for the MATLAB Function Block
Structure of Generated HDL Code
The MATLAB Function block contains a MATLAB® function in a model. The inputs and outputs of the function are represented by the ports on the block, which allow you to interface your model to the function code. When you generate HDL code for a MATLAB Function block, HDL Coder™ generates two HDL files:
A file containing entity and architecture code that implement the actual algorithm or computations generated for the MATLAB Function block.
A file containing an entity definition and RTL architecture that provide a black box interface to the algorithmic code generated for the MATLAB Function block.
The structure of these code files is analogous to the structure of the model, in which a subsystem provides an interface between the root model and the function in the MATLAB Function block.
HDL Applications
The MATLAB Function block supports a subset of the MATLAB language that is well-suited to HDL implementation of various DSP and telecommunications algorithms, such as:
Sequence and pattern generators
Encoders and decoders
Interleavers and de-interleavers
Modulators and demodulators
Multipath channel models; impairment models
Timing recovery algorithms
Viterbi algorithm; Maximum Likelihood Sequence Estimation (MLSE)
Adaptive equalizer algorithms
You can also use the MATLAB Function block in a wide variety of
floating-point applications. Both single
and
double
types are supported. To learn more, see HDL Optimizations Across MATLAB Function Block Boundary Using MATLAB Datapath Architecture.
See Also
Check for MATLAB Function block settings