Jump to content
  • 0

How to exchange data between PL and PS?


lowena

Question

I have an Arty Z7-20 and I'm trying to figure out how to get arbitrary data from HDL in the PL to the PS, to be printed over USB UART. I've followed this tutorial and I understand how to connect GPIO to the PS and to print to a serial terminal, but I can't figure out how to send data from the PL to the PS.

Say I want to implement a simple CPU in the PL, that I can interact with through a serial terminal. How could I send, for example, the output of a program (like printing "hello world") run on the CPU in PL to the PS to then be output to a serial terminal, and vice versa (typing in the serial terminal to send data to the CPU in the PL)?

I want to do o this because I am interested in architectures, compilers, emulators and the like and would like to learn FPGAs by eventually implementing a CPU on the FPGA side. I've been stuck for so long by the USB UART being accessible only through the PS. I essentially just need a bridge on the PS to exchange data from the PL to the PC's serial terminal.

Thank you to anyone that can help!

Link to comment
Share on other sites

Recommended Posts

  • 0
On 12/20/2020 at 2:03 AM, lowena said:

I have an Arty Z7-20 and I'm trying to figure out how to get arbitrary data from HDL in the PL to the PS

I've been for two years in the same exact situation as you were. I checked some custom IPs tutorials to learn how to communicate with the AXI bus, and with the Vivado integrated tool turns out to be pretty easy.

I've created a tutorial showing an example of the exact same thing you wanted: PS-PL USART data exchange. Check it on my GitHub.

I hope that it will help other people, and I'm open to accept PR of code improvements from people more experienced that I am.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...