Hi there,
I’m having some trouble with an HLS IP core that uses an AXI4 master port to access DRAM. It works properly - it modifies memory as expected when run for the first time. However, if I run it a second time, ap_start just stays high and the IP execution never completes. The only way I can unlock it is by reconfiguring the FPGA again.
The HLS code was extracted from GitHub - Xilinx/Vitis-HLS-Introductory-Examples and is as follows:
#include <stdio.h>
#include <string.h>
void example100(volatile int *a){
#pragma HLS INTERFACE m_axi port=a depth=50
int i;
int buff[50];
//memcpy creates a burst access to memory
//multiple calls of memcpy cannot be pipelined and will be scheduled sequentially
//memcpy requires a local buffer to store the results of the memory transaction
memcpy(buff,(const int*)a,50*sizeof(int));
for(i=0; i < 50; i++){
buff[i] = buff[i] + 100;
}
memcpy((int *)a,buff,50*sizeof(int));
}
The design is straighforward:
Please ignore the ILA core. The behaviour is exactly the same without this core. I’ve just been inspecting AXI transactions to see if I could find something odd but I didn’t.
Thank you.
Edit:
There is another anomaly in the behaviour of the HLS block: ap_done stays high just after the first run completes. It should stay high just for a clock cycle. I guess that’s the problem. Any clue why this is happening?