# How can send a command from PS to PL?

**URL:** https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909
**Category:** Support
**Created:** [April 11, 2024, 1:03pm UTC](https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909 "2024-04-11T13:03:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sahoora](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/sahoora/32/5796_2.png) [@Sahoora](https://discuss.pynq.io/u/Sahoora)
#### Post date: [April 11, 2024, 1:03pm UTC](https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909/1 "2024-04-11T13:03:20Z")

</div>

Hello,

I’m very new to FPGA design, and it’s my first attempt at deploying a design on an FPGA. Currently, I’m working with a PYNQ Z2 board. I’ve developed a simple RISC-V processor using HLS and exported it as an IP block.

Now, I instantiate this IP block on the Vivado IP integrator. My objective is to control this IP block using the PS. According to the documentation, the PYNQ Z2 board is equipped with a Cortex A9 processor within the PS.

My goal is to send commands from the Cortex A9 to my IP block (RISC-V processor), which will then execute instructions based on these commands. Does anyone have any insights or suggestions on how I can achieve this?

Thank you.

---

<div class="post-metadata">

### Author: ![ejon](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@ejon](https://discuss.pynq.io/u/ejon)
#### Post date: [April 17, 2024, 10:37pm UTC](https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909/2 "2024-04-17T22:37:21Z")

</div>

The easiest way to communicate between the PS and the PL is with the GPIO AXI IP. There are some examples in this lab I’m attaching.  
[Lab 8 - Digital Oscilloscope.pdf](https://discuss.pynq.io/uploads/short-url/j6pS7b838iYPz6y4ddJKQ6WtgdX.pdf) (1.4 MB)

---

<div class="post-metadata">

### Author: ![lil\_yeongji](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lil\_yeongji](https://discuss.pynq.io/u/lil_yeongji)
#### Post date: [April 24, 2024, 1:35pm UTC](https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909/3 "2024-04-24T13:35:56Z")

</div>

Your example is very interesting. Can you upload the mem\_control.v file?

---

<div class="post-metadata">

### Author: ![ejon](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@ejon](https://discuss.pynq.io/u/ejon)
#### Post date: [April 30, 2024, 10:51pm UTC](https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909/4 "2024-04-30T22:51:21Z")

</div>

Sorry for the delay. Here is the file.  
[mem\_control.v](https://discuss.pynq.io/uploads/short-url/R4jcHpwGdNYu7pzn1KWtSvPeOq.v) (5.0 KB)

---

<div class="post-metadata">

### Author: ![ejon](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@ejon](https://discuss.pynq.io/u/ejon)
#### Post date: [May 1, 2024, 5:05pm UTC](https://discuss.pynq.io/t/how-can-send-a-command-from-ps-to-pl/6909/5 "2024-05-01T17:05:00Z")

</div>

BTW, here’s the notebook, .bit, and .hwh files for the overlay.  
[lab\_8.bit](https://discuss.pynq.io/uploads/short-url/cO7FGyf33jDGXCPBnafnCuMBsxi.bit) (3.9 MB)  
[lab\_8.hwh](https://discuss.pynq.io/uploads/short-url/l6uZqwstLGDT1xNvt3uquHAi82.hwh) (385.1 KB)  
[lab8\_9.ipynb](https://discuss.pynq.io/uploads/short-url/fVyk370hbFipHa0I3nUhi7k3nqA.ipynb) (261.0 KB)
