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)