Training in programming FPGAs in Matlab/Simulink using examples: from simple to complex
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Andrew Sol
am 1 Mai 2024
Kommentiert: Andrew Sol
am 3 Mai 2024
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.
0 Kommentare
Akzeptierte Antwort
Tom Richter
am 2 Mai 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
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!