FX3 data problems when requesting more data than what's in the circular DMA buffers | Cypress Semiconductor
FX3 data problems when requesting more data than what's in the circular DMA buffers
Hello I've been using a modified slave fifo configuration based on the AN65974 application note. A Xilinx development board is connected to the FX3 SuperSpeed Explorer Kit which is then connected to a PC. We've successfully used this set up to transfer a frame's worth of imaging data for a custom ultrasound system (128KB of data per frame). Recently we've upgraded the imaging system to double the pixel density. Now for each frame we need to send 256kB of data to the PC. This is where we've been having more interesting results. When requesting 256KB using xferdata() the first 128KB correspond to the second half of the previous frame, and the second half of the data corresponds to the first half of the current frame. I've run integrated logic analyzers (ILAs) on the FPGA to ensure that the data being written to the FX3 is in fact correct, so I am certain that the problem does not lie in the writing or reading of data from the FPGA. I should also state that once the frame data is sent to the FX3 chip, the memory is cleared and thus cannot be repeated on the next acquisition. A small fix that I've attempted to implement (with moderate success) was to request a frame and a half of data (384KB). I would throw away the first 128KB and subsequently plot the remaining 256KB. This method unfortunately is not ideal for obvious reasons, but I also seem to be losing a small amount of data using this method and it manifests into a imaging artifact propagating through each image. I've also tried performing 16 sequential xferdata() calls for 16KB of data which did not sort out the problem. I've also replicated this error on our previous platform requiring on 128KB worth of data by forcing the PC to request double the amount of data from the FPGA. Since the circular buffer inside the DMA has 8x16KB = 128KB, I'm suspicious that the root cause has to do with the manner of which we're requesting data from the FX3. We've kept it relatively simple using the xferdata() function.
I'm hoping someone can give me some insight as to why the FX3 chip seems to be storing the last 128KB of data that I've transferred on the previous xferdata() request. Some insight would be greatly appreciated. Thanks in advance.