EmbeddedRelated.com
Forums

feeding a FIFO from PCI

Started by John Larkin April 12, 2008
John,

I might have missed something, but if you need a FIFO size of 8K x 48Bits
you'll get that into most reasonable sixed FPGAs these days (Cyclones or
Spartans). Otherwise hang a DRAM off it as rickman says.

If your data rate to the FPGA is only 1MByte/second you could almost get
away with one of the FTDI USB 1.1 interfaces  (FT245R gives an 8 bit
fifo output).

If this isn't sufficient there are a couple of easy to implement microcontrollers
about that give you a FIFO interface at USB 2.0 full speed data rates.

The host PC would need to do more of the work but if this is acceptable then
an embedded SBC seems like complete overkill?


Nial. 


Nial Stewart wrote:
> ... > If your data rate to the FPGA is only 1MByte/second you could almost get > away with one of the FTDI USB 1.1 interfaces (FT245R gives an 8 bit > fifo output).
If the data rate is only a 1-2 Mbytes/S it can be done in a single MPC5200, with some (64M, 128M?) DDRAM and a flash chip. The FIFOs are on chip, one of the serial ports can be set to do 16 or 32 MbpS; it will only have to be deserialized - some CPLD or whatever (6 x 74hct164....?). The entire BOM would be $50 to $100 for prototype quantities. With DPS running on it, net access over the 100 Mbps Ethernet port is there. Want a HDD, connect one to the 5200 ATA port. But this is me, the rest of the world seems to consider designs which do not rely on some intel/linux/MS monstrosity illegal nowadays. Dimiter P.S. a similar (doing apr. 1.8 Mbytes/S thing) is at http://tgi-sci.com/y2demo/ ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/ Original message: http://groups.google.com/group/comp.arch.embedded/msg/f06c1735c181b6cb?dmode=source
"Didi" <dp@tgi-sci.com> wrote in message 
news:e7faffe3-e733-4033-aa1a-abb07d42f36e@q10g2000prf.googlegroups.com...
> But this is me, the rest of the world seems to consider designs which > do not rely on some intel/linux/MS monstrosity illegal nowadays.
It's just that finding people to code on those platforms is easier and -- if you need the complexity of a GUI or full TCP/IP stack or USB host anyway, there's a huge amount of code, completely free, that you can leverage if you just "tow the company line" and use one of those "monostrosities." A couple bucks extra in hardware is a lot easier to get funded than a few more programmers and another year of development time, after all (especially when finding GOOD programmers is somewhat tricky these days!) I bet plenty of people ask why your software doesn't "look" like standard Windows, don't they?
Joel Koltner wrote:
> "Didi" <dp@tgi-sci.com> wrote in message > ... > > But this is me, the rest of the world seems to consider designs which > > do not rely on some intel/linux/MS monstrosity illegal nowadays. > > It's just that finding people to code on those platforms is easier and -- if > you need the complexity of a GUI or full TCP/IP stack > ....
you get that under DPS as well - with a lot of functionality as a bonus and with a few uS worstcase IRQ latency (try *that* on the wintel things). More, it fits it in a fraction of the flash space the wintelinux alternatives take.
> I bet plenty of people ask why your software doesn't "look" like standard > Windows, don't they?
Actually they typically think this is windows runing underneath on the first sight... As for programmers interfacing to this or that system the overhead is negligible if you will use DPS. For this particular application - moving data from a tcp connection into some fifoed hardware - the job to do on behalf of DPS can be explained in a message shorther than this one. So it is all about plain human nature - practiclly all people I know are too scared to make a step aside of the known path, it takes some threat to their existance to venture that. It does not matter how tempting those nice things under that tree look, danger may be lurking around if the place is so desolated.... :-). Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/ Original message: http://groups.google.com/group/comp.arch.embedded/msg/0a16cc12dffb1ba5?dmode=source
"Didi" <dp@tgi-sci.com> wrote in message 
news:fd9dc69f-eb74-45d8-820e-5d75b59b9a8e@p25g2000pri.googlegroups.com...
> you get that under DPS as well - with a lot of functionality as a > bonus and > with a few uS worstcase IRQ latency (try *that* on the wintel things).
Sure, it's just that for anyone with DPS experience (where's their web site, btw?) you'll probably find at least 100 people with Windows or Linux experience.
> Actually they typically think this is windows runing underneath on the > first > sight...
My first guess would have been DOS with an extender. :-)
> So it is all about plain human nature - practiclly all people I know > are > too scared to make a step aside of the known path, it takes some > threat to their existance to venture that.
With most people, yes, this is absolutely true. Businesses as an entity are the same way -- they'll keep using crappy tools that are well-known to them because the thought of changing to something else just looks too risky... and no one wants to be the fall guy if it turns out their evaluation of the alternatives were wrong. ---Joel
Joel Koltner wrote:
> ... > > you get that under DPS as well - with a lot of functionality as a > > bonus and > > with a few uS worstcase IRQ latency (try *that* on the wintel things). > > Sure, it's just that for anyone with DPS experience (where's their web site, > btw?) you'll probably find at least 100 people with Windows or Linux > experience.
DPS is less popular than that. It is all my work, my property etc. Comes on my products. I have been wanting to put a cheap product with it on the market but I just got a setback and may be unable to do it this year yet again.... Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/ Original message: http://groups.google.com/group/comp.arch.embedded/msg/6911f3aa16da2c35?dmode=source
Hi Didi,

"Didi" <dp@tgi-sci.com> wrote in message 
news:018c2551-78ca-4749-8d91-c5bbed3c41d7@1g2000prf.googlegroups.com...
> DPS is less popular than that. It is all my work, my property etc.
You wrote the TCP/IP stack from scratch? That's a lot of effort! Good work.
> Comes > on my products. I have been wanting to put a cheap product with it on > the market but I just got a setback and may be unable to do it this > year > yet again....
I hope you'll be able to do it eventually; I'm sure many people would be interested. ---Joel
Joel Koltner wrote:
> Hi Didi, > > .... > > DPS is less popular than that. It is all my work, my property etc. > > You wrote the TCP/IP stack from scratch? That's a lot of effort! Good work.
Thanks. It took me about 6 months to do (including the DNS and some high level clients), and is not such a great part of DPS (about 10%).
> > I hope you'll be able to do it eventually; I'm sure many people would be > interested.
So do I hope (hope, that is)! ... :-). I will eventually, it won't take that much - I know I'll do it, as for those interested I wish I knew a bit more.... :-). Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/ Original message: http://groups.google.com/group/comp.arch.embedded/msg/4ccece298795c6b8?dmode=source
In article <fd9dc69f-eb74-45d8-820e-
5d75b59b9a8e@p25g2000pri.googlegroups.com>, Didi says...
> It does not matter how tempting > those nice things under that tree look, danger may be lurking around > if the place is so desolated.... :-).
If the place is so desoloated it is dangerous. Such places are away from support. Also there is extra danger on first approach since the hazards are unfamiliar. I rather suspect many in this group prefer the hazards and beauties of the new, unfamiliar (and desolate) to the dangers of the crowds. If nothing else for the thrill of treading less travelled paths. Is the metaphor broken yet :) Robert ** Posted from http://www.teranews.com **
On Sat, 12 Apr 2008 09:38:30 -0700, John Larkin wrote:
[re "box that will control a scientific gadget" possibly using "an 
Intel-cpu SBC and a custom board" where "SBC would talk gigabit 
ethernet to the customer's system and PCI to our board." with SBC 
like http://us.kontron.com/index.php?id=226&cat=527&productid=1726

> Our board would have a PCI interface driving a biggish FIFO, say 8k deep > by 48 bits wide, inside an FPGA. [...] > OK, we finally get to a question: If we run some flavor of Linux on the > SBC, what's a good strategy for keeping the fifo loaded? Assuming that > we have the recipe for an entire experimental shot in program ram, some > tens of megabytes maybe, we could...
...
> 3. Best, if possible: set up a single DMA transfer to do the entire > shot. That involves a dma controller that understands that the target is > sometimes busy [...]
If the linux kernel is given a "mem=n" parameter at boot time, it will use only n bytes of memory, which leaves the balance of memory to be contiguously allocated later with "dmabuf = ioremap(...)" (see "Allocating the DMA Buffer" and "Do-it-yourself allocation" in Chap. 13 of Linux Device Drivers, by Rubini and Corbet; eg http://www.xml.com/ldd/chapter/book/ch13.html .) If high memory isn't usable by the DMA controller, you could build a kernel with your device driver using preallocated fixed buffers, rather than loading the driver as a module. User code can access the buffer as a memory-mapped file; see eg http://www.scs.ch/~frey/linux/memorymap.html for background, and see eg http://linux.die.net/man/2/mmap for notes on some flags that can lock the mapped pages in memory, make them private, map to fixed location, etc.
> 4. If it's a dual-core cpu, is it hard (under Linux) to assign one cpu > to just do the fifo transfers?
Root can use cpusets, described at http://lwn.net/Articles/127936/ to allocate cpu's and memory nodes, or can use system calls as described in http://linux.die.net/man/2/sched_setaffinity to control which cpu's given processes will run on.