Using fixed FPGA capacity for a variable number of Simulink signal channels

20 views (last 30 days)
In Simulink, I am modelling a MIMO system. One section involves a large set of impulse responses : P inputs, Q outputs, and all possible (P -> Q pair) impulse responses are known. Normally, I could simply implement P x Q FIR blocks, combine their outputs appropriately and everything would be fine.
However, there are two complications :
  1. I need to run the model, then modify P and/or Q, then run the model again. Multiple times, changing P and/or Q each time. And the process of successively running multiple experiments needs to be automated.
  2. The model will ultimately run on an outboard FPGA-based device (Speedgoat / dSpace / etc) with limited processing capacity. It is therefore important to avoid unnecessary calculations. Otherwise I could simply implement the maximum number of channels, and fill some of them with zeros if they are not being used during a particular experiment.
I do not know how to deal with both of these problems at once, and have not managed to find any clues online.
A similar problem occurs elsewhere in the same model, with vector-array addition blocks in which the numbers of inputs and outputs need to be variable.
Thank you for any advice !

Answers (2)

Sahas
Sahas about 3 hours ago
As per my understanding, you want to model a MIMO system in Simulink with dynamically changing inputs P and Q automate the process of conducting multiple simulations. Ultimately, this model will run on an FPGA-device with limited processing capacity.
The steps and MathWorks documentation links provided below will help you get started with the task at hand:
  • I would suggest to parameterize P and Q and define them as variables to allow dynamic adjustments in successive experiments.
  • Use "MATLAB Function blocks" for changing the values of P and Q in between experiments as required. Alternatively, use PreLoadFcn or InitFcn model callbacks for the same.
  • For automating the experiments, develop a MATLAB script for automatically setting model parameters, running simulations and handling outputs. Use MATLAB's sim and set_param functions to control Simulink model from MATLAB editor.
  • For optimizing the code, use conditional execution subsystems such as "Enabled Subsystems", "Switch Blocks" to route signals and minimize unnecessary calculations.
  • To deploy the model on an FPGA device, use HDL Coder Workflow Advisor.
Hope this is beneficial!

Kiran Kintali
Kiran Kintali about 20 hours ago
Have you considered tunable parameter usage in HDL Coder?
Please do not hesitate to reach to tech support for the limited processing capablity question.

Categories

Find more on FPGA, ASIC, and SoC Development in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!