Error : DMA channel not idle

Hi I am using a PYNQ Z2 board to just implement cnn for that i need to pass the image data as array through dma,
Here in this implementation I am just checking the axi stream functionality by just passing the input stream to the output but I am not able to send the data from the notebook, the DMA channel is not being idle at the initial run itself.
I have tried using fifo connection between dma and the ip block but also the same result.

here is the VITIS HLS code of the ip generated. The simulation worked well in the vitis, functionality was ok with the vitis module.

#include <hls_stream.h>
#include <ap_axi_sdata.h>

#define DATA_WIDTH 8
#define USER_WIDTH 2
#define ID_WIDTH 5
#define DEST_WIDTH 6

typedef ap_axis<DATA_WIDTH, USER_WIDTH, ID_WIDTH, DEST_WIDTH> axis_t;

void axis_buffer(hls::stream<axis_t>& input_stream, hls::stream<axis_t>& output_stream) {
#pragma HLS INTERFACE mode=s_axilite bundle=CTRL_BUS port=return
#pragma HLS INTERFACE mode=axis port=output_stream
#pragma HLS INTERFACE mode=axis port=input_stream

    axis_t valin;
    axis_t valout;
    unsigned char ch = 2;
    for(int i=0;i<256;i++){
	#pragma HLS PIPELINE
    // Read from input stream
    valin = input_stream.read();

    // Process data (simple pass-through in this case)
    valout.data = valin.data + 2; // Example processing: increment data by 1

    valout.keep = valin.keep;
        valout.strb = valin.strb;
        valout.user = valin.user;
        valout.last = valin.last;
        valout.id = valin.id;

    // Write to output stream
    output_stream.write(valout);
    }

}

design_1.pdf (64.7 KB)
axis_buffer_ntbk - Jupyter Notebook.pdf (130.6 KB)

You say your problem is that the DMA channel is not being idle. Do you say that because in your notebook, overlay.axi_dma_0.sendchannel.idle is “False” (or dma.sendchannel.idle)?

Did you try to first send your data via dma.sendchannel.transfer(in_buff) before verifying dma.sendchannel.idle?

Sincerely

overlay.axi_dma_0.sendchannel.idle is “False” Yes it is giving false, and also when I tried to run this dma.sendchannel.transfer(in_buff) It is giving the runtime error that DMA channel is not idle

Did you try to first send your data via dma.sendchannel.transfer(in_buff) before verifying dma.sendchannel.idle? No without sending any data i first verified whether dma channel is idle to work with new data

Hi @Rohith_Brahmarouthu,

Welcome to the PYNQ community.

How is your DMA IP configured? you’re trying to work with buffers with 8-bit elements, and the default configuration for the DMA is 32-bit data path.

Mario