Looking for suggestions to write from IP in PL to external storage

Hi all!

This is my first post ever on a forum, so hopefully, I am as clear as it is needed.

I am using the ZCU104 board with PYNQ to communicate with an ASIC I developed for testing purposes. To do so, I am building my own overlay with Vivado IP integrator and PYNQ libraries. Eventually, the whole system will be used by scientists with no hardware background, so the PYNQ interface seems extremely wells suited.

The chip produces a stream of data transferred to the PL in the ZCU104 through a custom serial interface. An IP block in the PL deserializes the data and then needs to transfer it to an external storage device. The storage device needs to be relatively large to store all the data (i.e. 64 GB or larger). The stream data rate is variable (it is the output of an event-based compression core), but it is never faster than 10 MB/s.

What is the most straightforward way to write from PL to external storage with >64 GB space at >10 MB/s? Should I use the SATA m.2 SSD peripheral, an USB connection to a computer, an ETHERNET connection to a computer, or something else? Ideally, I would like to use a simple IP in the Vivado IP integrator, or an existing example. This seems a common enough situation, so hopefully there is something already out there.

Thanks for any tips you might have. And sorry for the long post, I was trying to be as clear as possible.

1 Like

The easiest thing is probably to use an mSATA SSD - I have one of these installed in my ZCU104 and can push about 300 MB/s write speed through it.

The mSATA is attached to the PS which has the advantage of not needing any Vivado IP and it will appear as /dev/sda in PYNQ Linux with no extra steps required.

You’ll need to write a program to pull data from the PL to the PS but at the data rates you’re talking about you shouldn’t run into any problems using a DMA Engine and PYNQ. Doing this in software also means that you can arrange the data in a format suitable for copying off the device or performing additional processing.

Peter

1 Like

Thanks for your quick reply. I found an SSD and already formatted and mounted it, so I can access it from terminal.

A quick follow up question: do you get 300 MB/s write speed when writing from a jupyter notebook? Or do you have to write a C program to get those speeds?

Thanks!

Dante

That was from a command-line dd test. I’ve not profiled Jupyter directly but if you’re using numpy to handle your data its IO routines are written in C so you should get similar performance.

Peter

1 Like

That makes sense. Thanks, I will try today and see how it goes.

Dante