FlagA and watermark FlagB problem w/multiDMAChannel

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have just started implementing a multiDMAChannel with 2 producers(Pport0, Pport1) and 1 consumer (Socket3).

   

FPGA transfers data at 100MHz over a 32bit bus to the FX3. I am able to transfer at 309MB/s for a few seconds before the throughput starts decreasing until it eventually starts getting failures. The oscilloscopes shows flagA going low  for a period of ~10ns and flagB goes low for ~50ns (flagB has a watermark value of 4) after changing addresses. As throughput drops flags A &  B stay LOW for a longer time up to 180us! What could be causing this issue?  

   

FX3 is set up as follows: DMA Buffers = 3, DMA Buffer Size = 32KB, pkt size = 1024, Burst Length = 16 

   

 

   

    dmaCfg.size  = CY_FX_IMG_STREAM_BUF_SIZE;

   

    dmaCfg.count = CY_FX_SLFIFO_DMA_BUF_COUNT;

   

    dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;

   

    dmaCfg.prodHeader = 0;

   

    dmaCfg.prodFooter = 0;

   

    dmaCfg.consHeader = 0;

   

    dmaCfg.prodAvailCount = 0;

   

    //dmaCfg.prodSckId = CY_FX_PRODUCER_PPORT_SOCKET;

   

    dmaCfg.validSckCount = 2;

   

    dmaCfg.prodSckId [0] = CY_FX_PRODUCER_PPORT_SOCKET_0;

   

    dmaCfg.prodSckId [1] = CY_FX_PRODUCER_PPORT_SOCKET_1;

   

    dmaCfg.consSckId [0] = CY_FX_CONSUMER_USB_SOCKET;

   

    apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleSlFifoPtoU, CY_U3P_DMA_TYPE_AUTO_MANY_TO_ONE , &dmaCfg);

   

    if (apiRetStatus != CY_U3P_SUCCESS)

   

    {

   

        CyU3PDebugPrint (4, "CyU3PDmaChannelCreate failed, Error code = %d\r\n", apiRetStatus);

   

        CyFxAppErrorHandler(apiRetStatus);

   

    }

0 Likes
4 Replies
Anonymous
Not applicable

Hi,

   

I would like to know what Flag A is representing in your application.

   

Are you monitoring the thread ready flags for both TH0 and TH1 before FPGA starts writing data to FX3 sockets.

   

Please let me know.

   

Thanks,

   

Sai Krishna.

0 Likes
Anonymous
Not applicable

The default is TH0 so FPGA address lines are "00" at initialization. FPGA waits for current thread flagA to go high and FPGA buffer to fill before outputting to the FX3. 

0 Likes
Anonymous
Not applicable

Hi,

   

That is fine.

   

I am assuming that you are using streamer application to measure the throughput numbers.

   

On streamer application, keep "Pakets per Xfer" to 128 and "Xfers to Queue" to 16 or 32. Please measure the throughput numbers with these settings on the streamer application. Let me know if you are still seeing the same behavior.

   

Thanks,

   

Sai Krishna.

0 Likes
Anonymous
Not applicable

 Correct I'm using the streamer application. When I start USB streamer the throughput goes up to 207MB/s for a split sencond before settingling at aprox 170MB/s. After a few seconds all I get are failures and the only way to restart the USB streamer with no error is to reset the device.

0 Likes