Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎10-11-2017

DMA SimpleTransfer() and Redundant Memory Writes

I have a custom IP that takes a 32-bit number from the PL and writes it to DDR. The problem I am having is that when I loop a function including the below code, the initial 32-bit value that is accepted gets immediately written over and over again in the memory. So, if I write 0xFFFFFFFF and tell the program to loop 4 times, it does not wait for the 2nd-4th inputs, it immediately fills all 128 bits with 1s. I have tried to flush and invalidate the data ranges in multiple locations with no effect. I'm sure it is something obvious that I am missing. Any help?


		//Initiates transfer from receiver IP to DDR

		Status = XAxiDma_SimpleTransfer(&AxiDma,(UINTPTR) RxBufferPtr + Spacing,

		if (Status != XST_SUCCESS) {
			return XST_FAILURE;

		xil_printf("Receive Setup Complete.\r\n");

		//Waits for 32-bit transfer to complete

		while (XAxiDma_Busy(&AxiDma,XAXIDMA_DEVICE_TO_DMA)){

0 Kudos
1 Reply
Registered: ‎10-11-2017

I'll also add that this is a bare metal system and I am asserting TLAST at the end of every 32nd bit. Putting TLAST at other locations seems to just make the system hang.


If I rerun the program without reprogramming the FPGA between runs, the system executes with whatever input I provided on the earlier run. So, if I give it 0xFFFFFFFF on one run and see it write multiple times and then exit, if I rerun the program it immediately sets the input to all 1s again without waiting for input from the custom IP.

0 Kudos