Electronic – AM335x FPGA Memory Integration

armaudiofpgatexas instruments

I'm currently designing a digital mixing console. We have a somewhat large number of ADCs and DACs (more than the multi channel audio serial port on the processor can handle). We decided the solution for this was to use an FPGA to interface with the data converters and let the processor access the data through the RAM in the FPGA. We have not yet picked out a FPGA.

From what I have read we can configure the FPGA RAM as being a NOR non-multiplexed 16-bit device through the GPMC. Is this correct?
And my other question is it would probably be too slow to keep the data in RAM of the FPGA so would it be possible to set up a DMA transfer from the FPGA RAM to other memory in the processor that is easier and faster to access? Or would we need to use a PRU to copy the data?

Best Answer

I will make some assumptions: since this is mixing audio, you will want to sequentially read all of the ADCs at some fixed synchronous rate (like 96kHz), and sequentially write all of the DACs at the same rate. I think the PRU will be the easiest way to implement a fast data-pipe to/from an FPGA.

There are two PRU processors in a AM335x Sitara processor, and each has 32 input pins and 32 output pins. Since you would probably need some control signals and are likely using 24-bit codecs, that should work out nicely. You could dedicate one PRU to receive data and the other to send data. With tight C code, I estimate that you could get at least 10 samples per microsecond in each direction (30 megabytes/second), and more with assembly language.

I have put multiple I2S audio interfaces into an FPGA, and it's not that hard. As you said, the codecs could move data to/from FPGA sram, and after each codec cycle (every 10.417 microseconds at 96kHz) the PRUs could read/write the data as a contiguous block. A simple sequencer in the FPGA could respond to strobes from the PRU to walk through the block of data. In the Sitara, a Linux process can allocate a block of memory to share with the PRU. I've put C structures and arrays into shared ARM/PRU memory to allow the Linux process and the PRU to share data as C variables.

Hope that helps.