Borrar filtros
Borrar filtros

Training in programming FPGAs in Matlab/Simulink using examples: from simple to complex

19 visualizaciones (últimos 30 días)
Hi!
I'm a beginner and want to learn FPGA programming. I was very attracted by the possibility of interconnected work of Matlab/Simulink with codes for FPGAs, as well as the possibility of testing algorithms developed for FPGAs in Matlab/Simulink.
I have a certain idea in the spirit of: “We place the element/elements in Simulink, convert it into one of the languages VHDL/Verilog/etc., sew it into the FPGA or into the FPGA simulation program, debug and complete the project” or vice versa “We write the program on VHDL/Verilog, copy the code into Simulink, assemble the circuit, simulate".
I would like to try to do something on my own, but unfortunately there are several blind spots in my idea, namely: the sequence of the conversion process in Simulink; it is unclear how both a digital circuit and PID control can be embedded in an FPGA; is it possible to convert any block from Simulink into the FPGA code.
As the first two projects I would like to implement the following:
1. Simple asynchronous RS-trigger.
2. A simple PID-controller to control the output of an aperiodic link with a transfer function .
I'm asking for some advice on how to do this. I'll practice. I would be very grateful and grateful for your help in overcoming this milestone.

Respuesta aceptada

Tom Richter
Tom Richter el 2 de Mayo de 2024
Hi Andrew,
First, HDL Coder supports many blocks for generating VHDL, Verilog, and SystemVerilog code. You can find if a block is supported and what limitations exist by searching the block in the Documentation or selecting the help in the context menu of a block and then going to Extended Capabilities > HDL Code Generation (e.g.: Discrete PID Controller). You can also use blocks from the HDL Coder library. Most come from the Simulink library but you also find additional ones. Also Fixed-Point Designer comes with some blocks for HDL.
Second, you are limited to discrete systems. Continuous blocks like the PID Controller or Transfer Function block you show above are not supported. You need to discretize your system first.
Third, you should have a look to the following two sources:
Good luck with HDL Coder,
Tom
  1 comentario
Andrew Sol
Andrew Sol el 3 de Mayo de 2024
Thank you! Much is becoming clearer now, I will carefully study the links. Most of my questions have been answered directly or indirectly. The only thing left is to clarify whether the code from the FPGA can be imported into Simulink and to understand in what cases mathematics needs discretization.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by