MATLAB Answers

The Max Frequency of the signals from MATLAB to FPGA in FPGA-in-the-loop?

6 views (last 30 days)
WENQIANG ZHANG on 11 Mar 2017
Edited: Tao Jia on 13 Mar 2017
Hello All, I am using MATLAB 2016b and Xilinx ZC702. I want to use MATLAB to send signals to control the LEDs of FPGA by FPGA-in-the-loop. After the FIL workflow, the System object is generated to be used in my MATLAB scripts and it works. However, I do not know the max Frequency of the signals can be. So could anyone can tell me the Max Frequency of the signals? Best regards.

Accepted Answer

Tao Jia
Tao Jia on 13 Mar 2017
Edited: Tao Jia on 13 Mar 2017
Yes, the data exchange rate between MATLAB and FPGA is about 1K samples/second to 5K samples/second for the JTAG communciation that you are using. There is a cost of sending data by performing operating system I/O and other stuff. This is not going to be fixed number since it involve many other random factors.
You might be able to do much better than the above number by generating vectors from dsp.source and pass that to the FIL object. In that case, the data rate would be roughly 1K vectors per second for relatively small vectors.
Hope this helps.

More Answers (1)

Tao Jia
Tao Jia on 13 Mar 2017
For FPGA-in-the-Loop, you can set the clock frequency of your design. This is done in the filWizard if you are using your own code, or in the HDL Workflow Advisor if you are generating HDL code using HDL Coder. The maximum clock frequency you can set is 200MHz.
Also, please note that FPGA-in-the-Loop is a closed-loop simulation tool. The data exchange rate between MATLAB and FPGA is different tan the clock frequency, as the former is typically much smaller.
Also, I'm curious how you use FIL to control the LEDs, as we do not expose any external interfaces for users to use.
  1 Comment
WENQIANG ZHANG on 13 Mar 2017
Thanks a lot! After done in filwzard, I add the LED constrains in Vivado and get a new bitsream. However, when I use the dsp.source to send the signals to System Object,the leds in the fpga show much slower frequency than that I set in the dsp.source. So could you tell me the max data exchange rate between MATLAB and FPGA?And does it mean that the signals to FPGA will delay and become more slower?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!