Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
Need Forum Guidance? Click here

Search our FPGA Knowledge Articles here.
19348 Discussions

Transfer data from FPGA to CPU on a Cyclone SoC

Kimon
Beginner
453 Views

Hey guys,

I'm looking to do something that should have been simple but somehow isn't.

I have a Cyclone SoC where I'm looking to get some data I've colleced from an ADC and processed to the CPU. To that end, I've instantiated an On-Chip Memory block with 2 slave ports in the Platform designer portion of the design. I connect one slave to the HPS and the other one I export and connect to my RTL module. My problem is I can't get data from the RTL to the software on the CPU. I can use the software to write and read back the OCM and that looks fine. I can also use a modified RTL to write into and read back data from the OCM from the RTL and that also works fine.

But when I write data from the RTL into the OCM and then read the OCM from the software running on the CPU, the data isn't anywhere to be found.

Is it something silly I'm missing? Is there any other simple way of doing this? The data quantity is small and the CPU isn't doing anything else anyhow, so use of a DMA isn't justified.

0 Kudos
4 Replies
EBERLAZARE_I_Intel
107 Views

Hi,

 

It is possible but not a good practice to read and write on the On-Chip Memory since the size is very small.

 

You could try the FPGA-to-HPS Bridges for Cyclone V SoC design example here with prebuilt FPGA config file ready:

https://www.intel.com/content/www/us/en/programmable/support/support-resources/design-examples/soc/f...

 

The examples are at the bottom of the page.

EBERLAZARE_I_Intel
107 Views

Hi,

 

I apologize that I may have been confused with your question, you are attempting to write and read back data from the Ochip memory of the HPS side?

 

Is it possible for you to share your design, maybe I could take a look.

Kimon
Beginner
107 Views

Hi there,

No worries! Here's a link to my project:

 

https://www.dropbox.com/s/k8bgizrdf20aaf4/de0_nano_soc.tar.gz?dl=0

 

You can also find a version of the SW I'm using under ./sw/src

 

Let me know if you need any additional information.

EBERLAZARE_I_Intel
107 Views

Hi,

 

Just to let you know I am still working with this issue.

 

 

Reply