# RF data convertor not working

**URL:** <https://discuss.pynq.io/t/rf-data-convertor-not-working/6468>\
**Category:** Support\
**Created:** [December 20, 2023, 3:35pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468 "2023-12-20T15:35:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahde78](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@ahde78](https://discuss.pynq.io/u/ahde78)\
**Post date:** [December 20, 2023, 3:35pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/1 "2023-12-20T15:35:05Z")

</div>

Hi,

I am using RFSoC 4\*2. I have implemented an example, which is based on the ’ base’ overlay, to generate a signal with DAC. Then the signal is read by the ADC and written in the memory using AXI DMA.

 ![Screenshot 2023-12-20 160947](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/0/0f720b63601338f703c75428ee867197b626b0de.png)

However, I have some problems listed below:  
1- when I read the values in the memory for the first time, all of them are zero. When I want to read for the second time, I get the following error:  
`RuntimeError: DMA channel not idle`

I am using the following code to read the data:

```auto
> data_size = 1000
> dma_recv_im = ol.axi_dma_im.recvchannel
> dma_recv_re = ol.axi_dma_re.recvchannel
> output_buffer_re = allocate(shape=(data_size,), dtype=np.uint64)
> output_buffer_im = allocate(shape=(data_size,), dtype=np.uint64)
> 
> #for i in range(10):
> # print('0x' + format(output_buffer_re[i], '02x'))
> print("real:")
> dma_recv_re.transfer(output_buffer_re)
> for i in range(10):
> print('0x' + format(output_buffer_re[i], '02x'))
>     
> #for i in range(10):
> # print('0x' + format(output_buffer_re[i], '02x'))
> print("imag:")
> dma_recv_im.transfer(output_buffer_im)
> for i in range(10):
> print('0x' + format(output_buffer_im[i], '02x'))

```

I have enabled the TLAST signal of AXI4-Stream Clock Convertor.

2- I also tried to read the DAC signal using an oscilloscope, but apparently, it does not generate any signal.

Considering these two problems, I think the RFDC block is not working at all. Because of that the memory is also always empty and getting the error that DMA is not idle.

Any help to solve the problem is appreciated.

Thanks in advance,  
Alireza

---

<div class="post-metadata">

**Author:** ![joshgoldsmith](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/joshgoldsmith/32/5347_2.png) [@joshgoldsmith](https://discuss.pynq.io/u/joshgoldsmith)\
**Post date:** [December 20, 2023, 4:02pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/2 "2023-12-20T16:02:37Z")

</div>

Hi Alireza,

This is usually a problem with the tlast signal on the DMA. Although you said you have implemented it, I would recommend attaching an ILA to the S\_AXIS\_S2MM line on the DMA and checking the tlast signal is triggering on the correct clock cycle.

Also, I would consider concatenating your I and Q signals and using a single DMA. This way you can guarantee the complex data you are receiving is from the same clock cycle. You can separate the concatenated signal into two separate I/Q streams again in the PS.

Josh

---

<div class="post-metadata">

**Author:** ![ahde78](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@ahde78](https://discuss.pynq.io/u/ahde78)\
**Post date:** [December 21, 2023, 8:24am UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/3 "2023-12-21T08:24:32Z")

</div>

Hi Josh,

Thanks for your answer. Don’t you think the problem is with the rfdc block itself? As DAC is not also generating signal.

Alireza

---

<div class="post-metadata">

**Author:** ![joshgoldsmith](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/joshgoldsmith/32/5347_2.png) [@joshgoldsmith](https://discuss.pynq.io/u/joshgoldsmith)\
**Post date:** [December 21, 2023, 2:02pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/4 "2023-12-21T14:02:01Z")

</div>

Hi Alireza,

I’m not able to tell that from the diagram you posted but, even with no direct input, you should still be able to read samples from the ADC. My guess is that there is a problem with your tlast signal on the DMAs.

Thanks,

Josh

---

<div class="post-metadata">

**Author:** ![ahde78](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@ahde78](https://discuss.pynq.io/u/ahde78)\
**Post date:** [December 21, 2023, 2:34pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/5 "2023-12-21T14:34:10Z")

</div>

Hey Josh,

Thanks for your answer. I am new to the RFSoC boards. I searched about how I can use the ILA to debug and check the tlast signal. A tutorial for debugging is provided [here](https://discuss.pynq.io/t/using-ila-to-debug-ip/2855), which connects the board via USB cable to a PC and debugs the design in Vivado.

I was wondering if this is the approach that I can debug my design. If yes, I connected the board to a PC (windows 11) but it’s not recognized.

Thanks in advance,  
Alireza

---

<div class="post-metadata">

**Author:** ![joshgoldsmith](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/joshgoldsmith/32/5347_2.png) [@joshgoldsmith](https://discuss.pynq.io/u/joshgoldsmith)\
**Post date:** [December 21, 2023, 2:52pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/6 "2023-12-21T14:52:35Z")

</div>

Do you have the cable drivers installed? You can read this article about how to install them on Windows [here](https://support.xilinx.com/s/article/1013230?language=en_US).

---

<div class="post-metadata">

**Author:** ![ahde78](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@ahde78](https://discuss.pynq.io/u/ahde78)\
**Post date:** [December 21, 2023, 3:47pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/7 "2023-12-21T15:47:24Z")

</div>

I have connected the board directly to a PC via the USB port on the board. This article is about how to install Cable Drivers for Xilinx Platform Cable USB II. Should I follow the same steps as I have connected the board directly?

Thanks,  
Alireza

---

<div class="post-metadata">

**Author:** ![joshgoldsmith](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/joshgoldsmith/32/5347_2.png) [@joshgoldsmith](https://discuss.pynq.io/u/joshgoldsmith)\
**Post date:** [December 21, 2023, 4:10pm UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/8 "2023-12-21T16:10:14Z")

</div>

Apologies Alireza, I posted the wrong link.

There are cable drivers within the Vivado install you can use. I can’t remember the exact filepath on Windows, but on Linux its within `Vivado/<version>/data/xicom/cable_drivers`. Maybe that will help.

Josh

---

<div class="post-metadata">

**Author:** ![ahde78](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@ahde78](https://discuss.pynq.io/u/ahde78)\
**Post date:** [December 22, 2023, 9:57am UTC](https://discuss.pynq.io/t/rf-data-convertor-not-working/6468/9 "2023-12-22T09:57:02Z")

</div>

Hi Josh,

I installed the driver, but it did not work. I created a new topic [here](https://discuss.pynq.io/t/usb-device-not-recognized-rfsoc-4-2/6479) for this problem.

Thanks,  
Alireza
