HDL Applications for the MATLAB Function Block

The MATLAB Function block contains a MATLAB® function in a model. The function's inputs and outputs are represented by 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, the HDL Coder™ software generates two main HDL code 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.

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 deinterleavers

  • Modulators and demodulators

  • Multipath channel models; impairment models

  • Timing recovery algorithms

  • Viterbi algorithm; Maximum Likelihood Sequence Estimation (MLSE)

  • Adaptive equalizer algorithms

Was this topic helpful?