Hello, I am using trying to get a simple square root IP working in PYNQ.
This is the HLS Code for the IP:
include
include <hls_math.h>
void axi4_sqrt(float *in, float *out, int len)
{
#pragma HLS INTERFACE s_axilite port=return bundle=sqrt
#pragma HLS INTERFACE s_axilite port=len bundle=sqrt
#pragma HLS INTERFACE m_axi depth=50 port=out offset=slave bundle=output
#pragma HLS INTERFACE m_axi depth=50 port=in offset=slave bundle=input
#pragma HLS INTERFACE s_axilite port=in
#pragma HLS INTERFACE s_axilite port=outfloat buff[100];
memcpy(buff, (const float*) in, len * sizeof(float));
for(int i = 0; i < len; i++)
buff[i] = sqrt(buff[i]);
memcpy(out, (const float*) buff, len * sizeof(float));
}
And I have also attached my Vivado block design file. design_1.pdf (75.0 KB)
In PYNQ Jupyter Notebook, I am running the given code:
What am I doing wrong? My IP is not giving any output, the entire buffer is 0.
Please help. Thank you.