# Building a daq from RFSoC 4x2?

**URL:** <https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584>\
**Category:** Support\
**Created:** [May 15, 2023, 4:10pm UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584 "2023-05-15T16:10:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeckjia](https://avatars.discourse-cdn.com/v4/letter/z/0ea827/32.png) [@zeckjia](https://discuss.pynq.io/u/zeckjia)\
**Post date:** [May 15, 2023, 4:10pm UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/1 "2023-05-15T16:10:13Z")

</div>

Hello,

I’m trying to build a daq from RFSoC 4x2. I have read and gone through a lot of tutorials on this Forum (and thank you for your effort in supporting this community!!).

Here is information of the PYNQ and board I’m using:  
PYNQ version: 2.7.0  
Board: RFSoC 4x2

My current strategy is streaming data from ADC to PS DRAM using DMA, then transfer data from PS DRAM to my computer via either PS ethernet or USB 3.0 ports. I have built the hardware design (bitstream, Tcl, and hwh files are attached in “daq.zip”). I have copied the bit, tcl, and hwh files to the board. But I’m a little confused in how to use iPython Notebook to stream data. Did I miss some steps after building the hardware? Could you please give me some advice on what I could do for next step? Or Are there any tutorials I may have missed within this forum?

Thank you in advance for your help!

Regards,  
zeckjia

[daq.zip](https://discuss.pynq.io/uploads/short-url/30NGlX3kqeyeA2b6GbNQwVCTAaX.zip) (542.1 KB)

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [May 16, 2023, 7:47am UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/2 "2023-05-16T07:47:55Z")

</div>

Hi @zeckjia,

In the Learn section there are a few tutorials.

I recommend you check out these two to create designs that use DMA (note that they have multiple parts)

> [@Tutorial: PYNQ DMA (Part 1: Hardware design)](https://discuss.pynq.io/t/tutorial-pynq-dma-part-1-hardware-design/3133):
>
> PYNQ DMA tutorial (Part 1: Hardware design) This tutorial will show you how to use the Xilinx AXI DMA with PYNQ. It will cover adding the AXI DMA to a new Vivado hardware design and show how the DMA can be controlled from PYNQ. This tutorial is based on the v2.6 PYNQ image and will use Vivado 2020.1. If you are using a different PYNQ version you should be able to follow the same steps in this tutorial, but you should make sure you are using the supported version of Vivado for that PYNQ release. …

> [@Tutorial: using a HLS stream IP with DMA (Part 1: HLS design)](https://discuss.pynq.io/t/tutorial-using-a-hls-stream-ip-with-dma-part-1-hls-design/3344):
>
> Tutorial: using a HLS stream IP with DMA tutorial (Part 1: HLS design) In a [previous tutorial](https://discuss.pynq.io/t/tutorial-pynq-dma-part-1-hardware-design/3133) I showed how to use the AXI DMA to stream data between memory to AXI stream interfaces. The DMA tutorial used an AXI stream FIFO to do a loopback test to show how to use the DMA. This tutorial will show how to create and add a HLS IP with an AXI input stream, and AXI output stream. This tutorial will be split into two parts. This part 1 shows how to build the HLS IP, [part 2](https://discuss.pynq.io/t/tutorial-using-a-hls-stream-ip-with-dma-tutorial-part-2-vivado-design/3345) shows how to build the Vivad…

Mario

---

<div class="post-metadata">

**Author:** ![zeckjia](https://avatars.discourse-cdn.com/v4/letter/z/0ea827/32.png) [@zeckjia](https://discuss.pynq.io/u/zeckjia)\
**Post date:** [May 16, 2023, 4:00pm UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/3 "2023-05-16T16:00:49Z")

</div>

Hi Mario,

Thanks for your reply! Indeed I followed the two tutorials you posted to build my design (and thank you for confirming that I followed the right path!). But I’m not currently using any self-built HLS streaming IP. Major IPs I used include Zync US+ RF Data Converter, AXI DMA, and of course Zync US+ MPSoC.

To be clear, I’m not sure if I need to write divers for my overlay if I don’t have any self-built HLS streaming IP. Could you please help me clarify this? It may be easier for you to see my overlay if I include the block design here:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/4/4c8d70a0902320fb99e343613b2752f0e0da8553.png)

Besides, bitstream, Tcl, and hwh files can be found in “daq.zip” in my original post. Thank you so much for your help!

zeckjia

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [May 17, 2023, 7:51am UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/4 "2023-05-17T07:51:17Z")

</div>

Hi @zeckjia,

I don’t fully understand what you’re asking.

The posts I shared include the Python code to use the DMA module to bring data into the PS. You don’t need to write a driver unless you want to add functionality that doesn’t exist in the default driver.

Have you written any code to bring in the data via the DMA?

Mario

---

<div class="post-metadata">

**Author:** ![zeckjia](https://avatars.discourse-cdn.com/v4/letter/z/0ea827/32.png) [@zeckjia](https://discuss.pynq.io/u/zeckjia)\
**Post date:** [May 17, 2023, 2:17pm UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/5 "2023-05-17T14:17:30Z")

</div>

Hi Mario,

Thanks for your reply! I think I understand how to use DMA to bring data into the PS. But I don’t know how to read the data from the outside world into PL using the RF Data Converter module.

If you see my block design above, I have an RFDC module (only one ADC enabled) connected to DMA via an FIFO. Basically, I don’t know how to control this RFDC module in PYNQ. Could you please give me some help on this? Thanks!

zeckjia

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [May 17, 2023, 2:22pm UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/6 "2023-05-17T14:22:13Z")

</div>

Hi @zeckjia,

I may suggest you review the [Software Define Radio with Zynq UntraScale+ RFSoC book](https://www.rfsocbook.com/), you will find this information there.

You can also refer to the IP user guide.

Mario

---

<div class="post-metadata">

**Author:** ![zeckjia](https://avatars.discourse-cdn.com/v4/letter/z/0ea827/32.png) [@zeckjia](https://discuss.pynq.io/u/zeckjia)\
**Post date:** [May 17, 2023, 2:35pm UTC](https://discuss.pynq.io/t/building-a-daq-from-rfsoc-4x2/5584/7 "2023-05-17T14:35:11Z")

</div>

Thanks, Mario! I will look into the book and the IP user guide!
