A Generic PCI Based FPGA Coprocessor?
graveyhead asks: "Inspired by a recent Slashdot article, I came across this fantastic package from the fine students in the Configurable Computing Laboratory at BYU: JHDL, which is a set of open source FPGA CAD tools. I am writing a proposal for a prototype system and I have a requirement for a 32 or 64 bit PCI card compatible with JHDL. I do not require any IP cores (which Xilinx seems to want to sell me hundreds of 'em), since our project uses its own custom cores. Also, I will not be building additional hardware around the FPGA processor, so the package needs to be fully self-contained. I simply need the ability to use JHDL to program the FPGA device over PCI under Linux, execute my circuit with parameterized values, and return the result. I found these boards, but I'm not sure which is appropriate or compatible, or if there are better alternatives that I am not finding in a similar price range (up to USD2000). Preferably, I want a chip with lots (1-10M+) of programmable gates."
1-10 mil gates is a very large number.
Take a look at my MIPS on an FPGA. That used less than 100k vertex gates including MMU and other things youprobably dont need.
Also why PCI? Why not talk to it via serial/usb/network? And why not make your own? We made these for just over £100 ($150) each (plus virtex). having the board outside the PC allows you to have more freedom and external connections to do things like this. Also it allows you to write a simpler download software routine to program the thing (serial vs PCI).
Mouse powered Chips, Open source Processors and Lego
I believe video coprocessors tend to be quite specialised for video ops.
Even if they weren't, programming a maths coprocessor is very different from programming an FPGA, and the things you can do are very different.
An FPGA is a programmable logic circuit, and you can connect almost any kind of digital electronics to it. From flashing lights to memory to network interfaces to bus interfaces (like PCI and USB) to whatever else turns you on.
The experience of looking for this card got me to thinking:
Does anyone else remember back in the day, OrangeMicro used to sell a card, now discontinued :( for Macintoshes that put a fully working PC on a PCI card on your Mac. In fact, I think I still have that laying around here somewhere! You could switch between Windows95 and MacOS, both running in native hardware by hitting Command-Enter. It was very neat, like VirtualPC except in an actual Pentium instead of a virtual one.
Anyhow the inspiring part of the old OrangePC in this case is the multi-functional cable attached to the back. It was a truly monsterous wonder. One side was a huge hundreds-of-pins cable which plugged into the PCI card, and the other side split off into VGA video (which could pass-through the Mac signal, or interrupt it and output the PC signal), audio IO, 2 serial ports, a parallel port and a game port! It was truly an engineering masterpiece :)
So, why doesn't someone build a generic PCI device with such an awesome cable attached? It would give a whole new meaning to opencores.org. Software could be written that could drop in an arbitrary core and turn your card into any device that you desired that minute. Remember what Homer says: "Aww, I want it now!". With such a device, you could have it, or build it yourself right from your desktop if you were so inclined ;) For example, if the bass is rattling on my friends new album and we want to try cutting off frequencies below 10hz:
You could even do what OrangePC did and drop a whole processor/OS combination (or develop one) on the board and seamlessly switch between it and the host OS. If the card had multiple FPGAs, it could even drive multiple custom devices simultaneously.
Bye bye PCI hardware vendors (except ones to make the general purpose boards). Next, let's build an AGP8x version (with a stable on-board backup VGA core, just in case ;) and set our sights on NVidia and ATI! Now, any volunteers to build an open-source OpenGL accelerated VGA core? All it is is a couple of multipliers, right? ;)
The problem may be that no PCI/AGP vendor in their right minds would ever build such a thing, because it would replace all their products. Still, it's fun to dream about such a useful piece of hardware.
std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
The biggest problem with the idea of generic FPGA accelerators is sharing the resource in a multitasking environment.
Suppose you had a nice 10 million gate FPGA on your PCI bus. Now, if you program it to do one thing and one thing only, then there's no problem. So if that FPGA set up to be a hardware DiVX encoder and that's it, all is well.
But let's suppose that you fire up your video editor, and it wants the FPGA to be a DiVX encoder. Then you fire up SSH, and SSH wants the FPGA to be an encryption engine.
It is currently VERY hard to dynamically reprogram sections of an FPGA (some do support partial reprogramming while running, but not all). It is also very hard for the hardware compiler to merge tasks - you would have to re-generate the layout of the FPGA each time you added a function.
What we need is the equivilent of a malloc() call to allow a single large FPGA to be used by multiple applications at the same time (until you run out of gates).
Once that exists, then you will see vendors making generic FPGA accelerators.
Until then, FPGA boards will be the province of a very few people, and prices won't come down very much, I fear.
www.eFax.com are spammers
*tosses you a link* The FPGA-FAQ Development Boards List
Contains a BIG listing (updated at the end of last month) showing boards and prices when available. Also lets you know if it's a PCI board or whatever.
I really doubt you will need a million or more gates. What are you trying to do, physically model a barrel of quarters? Is your code going to be as complex as a late-model Pentium?
To start out with, a 600kgate SpartanIIE-ish chip will have lots of room and won't break the bank. A mega-gate Virtex, on the other hand, will eat into your budget requirements for the chip alone.
But check out that link and you'll probably find something.
...
These guys have an assortment of PCI cards with FPGAs and Linux drivers. I've worked with their boards for several years with success. Just don't forget cables when ordering.
I doubt you'll see anything like this is real systems. First off, the big bonus with FPGAs is that they can crunch a /lot/ of data very fast. They can also do a lot of parallel computations at once. Using one to communicate with a modem would (IMHO) be an almost criminal misuse of hardware.
A better alternative is to put algorithms or parts of them on a FPGA. Typically for simulations, intensive mathematical processes and similar. It's noteworthy that floating point is very expensive in hardware, so you probably want to stay away from algorithms which require that.
Doing place and route also take a lot of time (several hours/days on larger chips) so you'd probably want to define a couple of functions and place and route those together. (You could have several of the "bundles" pre-made. But only run one at a time.)
And regarding JIT, since the second CPU would be limited by the first there's not much benefit in doing that neither. You can just as well do what you do today, ie do the JITting as you start executing and then doing optimizations as the program runs.
CPUs are very fast today. So doing serial things which they excel at is not much use to put in a FPGA coprocessor.