44
\$\begingroup\$

How cheap do FPGAs get? I know they're more expensive than microprocessors of comparable capability, but I wonder if there exist FPGAs that could contain a Microblaze soft core running Linux, while leaving gates available for implementing DSP functionality (media codecs, for example) at a cost competitive with, say, a Cortex A8 ($20-30 in qty. ~100).

(Apologies if my terminology is non-idiomatic i.e. wrong. Please comment with corrections, or edit directly.)

\$\endgroup\$

closed as off-topic by Ricardo, Daniel Grillo, PeterJ, Nick Alexeev Aug 3 '15 at 5:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

11 Answers 11

23
\$\begingroup\$

I recently attended an online conference on FPGA's with the keynote being "Should your next processor be an FPGA."

The FPGA basically makes sense in any application that requires highly parallelizable work streams, an example being used was analyzing Full HD images to find pedestrians for instance.

The thing you have to remember is that you have to initialize your FPGA every time it powers up, I think the FPGA's Xilinx is coming with (which have an on-chip ARM core) are a good option, but probably expensive. Looking into the Actel ones with on-chip flash may be useful too.

As for performance, the company BDTI did a benchmark in highly parallel computations where they saw about 40x performance gain switching to an FPGA. The interesting thing is that they compared chips with similar costs (23$ vs 28$ I believe).

Here are the links that might interest you:

Pocket guide to processor selection

FPGA Conference Archives (Free registration, but only available for about 6 months after this answer)

You cannot really compare performance of FPGA based systems based on MIPS or Mhz stats. The way an FPGA is used to process certain tasks is simply too different from a Microcontroller. The design of firmware for an FPGA is something you have to do using VHDL for instance, which is akin to Assembly. A register transfer level (RTL) of abstraction. Some environments are being produced to provide more abstraction, but these are still often vendor specific. Wikipedia has a decent overview of languages available to program FPGA code:

Wikipedia: Programming FPGA

Wikipedia: Digital Circuit Design

If you have money to burn you can use the LabView systems to build FPGA based real time measurement systems for instance. These devices needed for this are in a completely different pricerange (1500$ and up), but open up te FPGA design to a much broader audience with graphic programming.

More and more vendors are providing boards which combine microcontrollers such as an ARM chip with an FPGA to provide specific additional features and parallel processing power. An example of such products can be found here: EmbeddedARM: FPGA series

\$\endgroup\$
23
\$\begingroup\$

How cheap do FPGAs get? According to Newark, the cheapest FPGAs are around $10 (the lowest-end Altera Cyclone and lowest-end Xilinx Spartan). They might have enough capacity to run a simple 8-bit CPU.

As you might expect, even simple (i.e., without a MMU) 32-bit CPUs require about 4 times the FPGA resources of an 8 bit CPU. FPGAs with barely enough resources to run such a simple 32-bit CPU cost around $14. My understanding is that uCLinux has been ported to some of these FPGA soft CPUs (such as the NIOS II/e) -- you might find uClinux adequate for your purposes.

Full-fledged Linux requires a CPU with a MMU (such as the NIOS II/f). A 32-bit CPU with a MMU requires about 4 times the FPGA resources of a 32-bit CPU without a MMU -- the reasons for this are not so obvious.

As far as I can tell from the Xilinx Microblaze page, the Microblaze soft CPU only runs on Xilinx FPGAs.

Linux has already been ported to several other soft CPUs. If you want to run Linux on some other company's FPGAs, you might want to look at the Linux ports listed at "Soft CPU Cores for FPGA".

Several of these soft CPUs -- including a MMU -- will fit on a Xilinx Spartan XC3S400A ( $17 from Avnet ).

I've heard that some 32-bit soft CPUs -- including a MMU -- are pretty easy to set up as "dual core" on a $20 FPGA chip. Those that follow "Jan's Razor" might attempt to squeeze in a dozen or so 8-bit CPUs on the same chip instead.

\$\endgroup\$
  • 1
    \$\begingroup\$ There are open source Microblaze implementations (like aeMB -- opencores.org/project,aemb) that should port to other (non-Xilinx) FPGAs. \$\endgroup\$ – mrkj Jun 24 '10 at 15:45
  • \$\begingroup\$ (shameless plug) the AEMB is known to run uC/OS-II in Altera FPGAs too -- aeste.my/node/7 \$\endgroup\$ – sybreon Dec 2 '10 at 1:31
11
\$\begingroup\$

Generally FPGA will cost a lot more than the same device implemented in silicon, because there's a lot of overhead due to the reconfigurability. So no, you wont find a FPGA for $20-30 that has the same power as an ARM CPU that's $20-30. Now, you may find a FPGA for $20-30 that can perform specific tasks much faster than that $20-30 ARM, but it wont be able to beat it in general computing tasks.

This is why it's common to see people sticking a microcontroller and a FPGA on the same board. ARM and PPC are the two most commonly combined with a FPGA.

\$\endgroup\$
  • 4
    \$\begingroup\$ I understand that I won't find an FPGA that beats a micro on cost and performance, but it seems like there might exist an FPGA that beats the cost of micro + FPGA, while providing similar performance, all in one chip. Does that make sense? \$\endgroup\$ – pingswept May 14 '10 at 18:55
10
\$\begingroup\$

When purchasing an FPGA, do not forget to factor in the cost of the Flash memory that holds the FPGA program. That's easy to forget.

As a PCB designer, FPGAs are a million times easier to lay out, because you can rearrange the pinout however you want even after the board is made. There are potential cost savings associated with the fewer layers needed to route an FPGA.

To the others who poo-poo FPGA vs. CPU performance, I agree to a certain extent. An actual processor will be faster at doing actual processor-y things than an FPGA that's programmed to act like a processor.

That's not really fair to an FPGA, though. CPUs are "time-limited"; if you want to do more work, you need more time, or a faster processor. FPGAs are usually "area-limited"; if you want to do more work, you need a bigger FPGA.

For instance, let's say you make a spectral analyzer that handles a mono audio signal. Let's say it takes 70% of CPU time, and you're already as fast as the CPU can go. You can't add stereo support, because the CPU just isn't fast enough to do the second channel before it must handle the first channel again. But if you're using 70% of the FPGA, you can just buy a bigger FPGA and drop the second channel in. It doesn't need to go faster.

Now, if you ported the problem into the Digital Design domain, using Finite State Machines and Datapaths instead of a CPU, I would bet dollars to pesos that the FPGA will crush the CPU, at the expense of increasing complexity in the design.

\$\endgroup\$
  • 1
    \$\begingroup\$ There are also flash-based FPGAs (ACTEL) and some SRAM-based ones with built-in flash (Xilinx Spartan3AN, LatticeXP). \$\endgroup\$ – sybreon Dec 2 '10 at 1:37
  • \$\begingroup\$ You can also just buy a faster CPU and drop the second channel in. Not a good comparison. \$\endgroup\$ – immibis Jun 14 '17 at 9:46
  • \$\begingroup\$ @immibis What you're saying is actually the same as ajs410's point : an FPGA doesn't need to be faster, it needs to be bigger. If you want to go with CPUs, what you can do is bring a second CPU, as long as the nature of the processing is parallelisable. \$\endgroup\$ – Johan Boulé Jul 20 '17 at 20:54
7
\$\begingroup\$

Xilinx has recently done a deal with ARM, which will enable them to put ARM cores on FPGAs. Unfortunately, they will only be available for the top-of-the-range Virtex devices.

\$\endgroup\$
  • 3
    \$\begingroup\$ Very interesting. \$\endgroup\$ – pingswept May 14 '10 at 18:57
  • 2
    \$\begingroup\$ I think you're mistaken about the ARM cores only appearing in Virtex devices. The press release doesn't say as much, and I don't think you can infer that from the fact that PPC cores only appear in V2P, V4FX, and V5FXT parts. Xilinx's website mentions the devices being optimized for "performance, cost, and power" (see xilinx.com/technology/roadmap/processing-platform.htm); you'll notice cost is never an optimization vector for the Virtex series. \$\endgroup\$ – mrkj Jun 24 '10 at 15:41
  • 1
    \$\begingroup\$ Also, ARM is never mentioned in the 7-series FPGAs announcement (xilinx.com/technology/roadmap/7-series-fpgas.htm), and there's no V6 or V7 part with a PPC. My take on all this is that they're moving away from embedded processors in the high-performance parts. \$\endgroup\$ – mrkj Jun 24 '10 at 15:43
  • 3
    \$\begingroup\$ I guess the result of this deal is the Zynq? \$\endgroup\$ – Janus Troelsen Apr 18 '13 at 21:26
4
\$\begingroup\$

FPGA pricing is odd - once you get talking to a franchised disti you find that prices quoted at Digikey, Mouser etc. can be several times higher than what they can be got for. Cheapest I'm aware of is Lattice EC1 in QFP100 for a little under GBP3 in tray qtys. Add GBP0.40 or so for an SPI flash memory.

Putting CPUs in FPGA fabric is generally not good value in terms of silicon cost, but other factors like tight coupling between CPU and FPGA, and reduced number of packages may alter the optimum tradeoff against using a seperate CPU.

\$\endgroup\$
  • 2
    \$\begingroup\$ Extremely good point. See also this post [element14.com/community/thread/2434] from a Farnell employee suggesting that Altera Cyclone IV chips are available for as little as $3, while Farnell's cheapest quoted price on their web page for them is closer to $20. Now, clearly most people aren't going to be buying in quantities of 250,000, but those distributors presumably are, and they may be willing to trade for somewhat less than a 566% markup... \$\endgroup\$ – Jules May 30 '13 at 3:11
3
\$\begingroup\$

My best guess so far is something like a Xilinx XC3S400A, which costs around $16, but I'm not sure that it could handle a MicroBlaze.

\$\endgroup\$
  • 3
    \$\begingroup\$ From a quick look online, a microblaze core would use about half of the logic cells in a XC3S400A. In addition, the Cortex A8 would run at 600MHz - 800MHz, whereas microblaze on the FPGA would run at 200MHz - 300MHz. \$\endgroup\$ – davr May 14 '10 at 18:03
  • \$\begingroup\$ So it would be ~3x slower (assuming your system is processor-bound), but comparable cost, while leaving excess gates for something else. \$\endgroup\$ – pingswept May 14 '10 at 18:56
  • 1
    \$\begingroup\$ That's just comparing frequency, the most basic way of comparing actual processing speed. I don't have enough knowledge about it, but it's possible for example that at the same clock speed, an ARM is twice as fast as a Microblaze \$\endgroup\$ – davr May 14 '10 at 22:00
  • 1
    \$\begingroup\$ Yeah, fair enough. A first approximation, I guess. \$\endgroup\$ – pingswept May 14 '10 at 22:38
3
\$\begingroup\$

It depends a lot on your application. The ideal application here would consist of a tiny control part (which fits on a microblaze/NIOS) but a computational part that can benefit from the huge parallelism of custom hardware. In these cases, even a modest-sized FPGA (Spartan or equivalent) can easily outperform any general-purpose CPU. But that's best-case (although very much achievable in a lot of real-world apps), if your app does have a significant control part or doesn't easily map to hardware, spending your money on fixed hardware (i.e. an ARM) is probably better.

\$\endgroup\$
3
\$\begingroup\$

If you need a board rather than just the chip, here are two recent options from 2013:

\$\endgroup\$
0
\$\begingroup\$

Since many Altera's current CPLDs are FPGAs with built-in configuration memory, you can get them for http://www.altera.com/products/devices/cpld/max2/mx2-index.jsp

\$\endgroup\$
0
\$\begingroup\$

first of all you want to run linux on a core. How about running it on an ARM like some other suggestions in this thread. MCU are good at running OS but it gets kind of wasteful of FPGA resource building an MCU. MCUs can fit into a much smaller silicon area when custom designed for that and can thus be produced more cheaply. Then there are other explanations about FPGAs being really good at parallel processing -kind of true although logic operations don't feel like processing exactly. Like you point out powerful FPGAs get expensive, and indeed power hungry. So a low cost platform that can run linux and DSP needing the benefits of parallelism for fast IO etc. Take a look at XMOS parallel processor

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.