J
John Adair
Guest
The key here is what latency you can withstand and what size you need. For relatively small requires the internal SRAM of FPGAs like Spartan or Cyclone is fairly fast and cost effective solution. Fot bigger sizes and if you can accept a little more latency FPGA + SRAM/SDRAM/DDR3 is a good solution. We get a lot of people using our Craignell2 -40/48 parts for this as we 256 Mb of SDRAM paired with a Spartan-3A. The 48 pin part allows a FIFO with 16 bit data bus input and with up to 7 control signals and the mirror of that on the output. The 40 pin can still do 16 bit data in/out but you can only support 3 controls signals.
To reduce latency a hybrid structure can be used for a FIFO. This is much more complex but gives the bigger size without losing too much performance on latency. Basically to do this you have an input SRAM in the FPGA and on the way out an output SRAM. Those give the I/O speed. As appropriate blocks of data are moved in/out of the SDRAM in a background operation. Filling(output) or emptying(input) SRAM elements of the FIFO.
One of the nice things you can do in this sort of FIFO that standard parts can't usually do is differing interface sizes. So you might have an 8 bit write with a 32 bit read.
John Adair
Enterpoint Ltd.
On Tuesday, 8 July 2014 15:43:32 UTC+1, Stef wrote:
To reduce latency a hybrid structure can be used for a FIFO. This is much more complex but gives the bigger size without losing too much performance on latency. Basically to do this you have an input SRAM in the FPGA and on the way out an output SRAM. Those give the I/O speed. As appropriate blocks of data are moved in/out of the SDRAM in a background operation. Filling(output) or emptying(input) SRAM elements of the FIFO.
One of the nice things you can do in this sort of FIFO that standard parts can't usually do is differing interface sizes. So you might have an 8 bit write with a 32 bit read.
John Adair
Enterpoint Ltd.
On Tuesday, 8 July 2014 15:43:32 UTC+1, Stef wrote:
To interface a fast sampling ADC to a CPU I'm considering to use a fifo
or dual ported ram and a small controlling CPLD. Cypress has a nice
offering of fifos and dp-rams, but looking at the prices of 512kb
density parts I got a bit of a shock: $75 for the fifo and $45 for the
dp-ram. That's in single quantity, but they don't go down fast either:
$30/1000+ for the dp-ram. :-(
(prices from cypress website)
For less money, you can have a Xilinx spartan-6 (XC6SLX9-2TQG144C $20/1+
$14/1000+) with 512kB of Block ram. And you get your controlling 'CPLD'
for free. OK you still need a config memory.
(prices from avnet website)
Can you just connect one side of the block ram to IO pins and read that
from a CPU as if it where a dp-ram? Other side interface would even be
simpler as you can keep it internal.
Am I missing something here or is it really that simple?
(And yes, I do realize I have to program the FPGA to perform the
required function ;-) )
Sample rate is not extremely high (10MSPS), but too fast for the CPU to
read on interrupts directly. There may be other options, still
investigating.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
One man's constant is another man's variable.
-- A.J. Perlis