Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Genrating code for FPGA simulation

0 votes
93 views
I am trying to generate code for FPGA simulation. As mentioned in "help", I'm currently using minimal_example_demo -> boost model to generate code for FPGA simulation. I wanted to see how PLECS Coder generates code for FPGA simulation so I followed these steps:

1. Configured Electrical Model Settings on schematic to FPGA

2. Set Target on Coder window to RTBox 3.

3. Clicked on build to generated code

However, Coder still generates C code where as for FPGA implementation, we need HDL code. I'm finding it hard to understand how FPGA simulation works with C code. or am I missing something in this major update?

Note: I'm using PLECS 4.8.1 with TSP 3.0.1
asked Mar 20 by Shridhara Gangaraju (15 points)

1 Answer

0 votes
 
Best answer
Shridhara, that is the correct workflow to program the RT Box with the electrical model simulated on the FPGA.  When you actually program the RT Box you will see the FPGA step size appear in the RT Box's physical display as well as in the RT Box web interface.

Regarding the generated code, the PLECS Coder does not generate HDL code.  Rather the RT Box firmware has the solver for the circuit implemented on the FPGA.  The generated C Code configures and interacts with the static, pre-generated solver on the FPGA.
answered Mar 21 by Bryan Lieblick (1,909 points)
selected Mar 22 by Shridhara Gangaraju
Hi Bryan, thank you for replying!

Do you mind elaborating more on the pre-generated solver please?

Thank you!
The solver is Plexim's closed-source IP for electric circuit simulation and is not available to the user.
...