Hi all,

Just wondering if anyone's found some tricks to speed up iram data
throughput, specifically with dma transfers.

My application is basically sending data (real time video) from the external
static ram interface over USB. The catch is the data buffer sizes of the
external data and the usb data need to be quite different so I've had to set
up a double buffering arrangement, where I'm using the DMA to copy from
external port to a large rolling buffer space in iram, and then on a
separate dma channel copying the (smaller) chunks of data from the large
buffer to my usb buffer/structs. The usb packets needs a header on each one,
so I can't just give the usb a pointer to a location in the main buffer
because it obviously won't have the header.

 

The system is technically working, but I'm running very low on memory bus
bandwidth. The main issue is coming from latency in the external interface,
I currently have it running with a MPMCStaticWaitRd0 of 1 and have a couple
of errors in transmission. The errors are completely gone if I up the WaitRd
to 2 but then the dma from buffer to usb is not keeping up.

 

The external ram interface is in 16 bit mode, and the write buffers (in
MPMCStaticConfig) are disabled, I'm using interface strictly read only and
enabling them slowed it down more.

Both dma channels are running in burst mode (16 byte chunks).

Clocks are all at csp default settings again, so mpmc, dma, ebi all at
90Mhz, core at 180Mhz.

I've tried SYS_REGS->eshctrl_sup4 = 0; to enable high speed performance mode
on EBI, but that doesn't really seem to help much, not that I expected it to
really.

 

I've also tried enabling instruction and data caches at start of main:

                // Set virtual address of MMU table

                cp15_set_vmmu_addr((void *) ISROM_MMU_TTB_BASE);

                cp15_set_mmu(1);

                cp15_set_icache(1);

                cp15_set_dcache(1);

But I didn't notice any difference in application speed, can anyone confirm
whether this is the correct way to enable the buffers? Although I guess
these are buffers for the cpu, so wouldn't affect the dma anyway.

 

Basically I'd really like to speed up the iram - iram dma transfer to allow
more bus bandwidth / time to devote to external ram - iram dma channel so I
can slow the mpmc WaitRd down a touch and still kepp up with the video
stream.

 

Cheers,

Andrew

 

_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to