Tuesday, March 22, 2016

Techy Tuesday - Learning FPGA Design is Getting Easier

This is definitely advanced level hobbyist stuff.

But first, I note that Andy Grove, the former CEO of Intel and one of the titans of the explosive growth years for semiconductors, passed away yesterday.  Andy was 79.  The cause of death has not been disclosed.  Andy was open about his prostate cancer in the mid-90s, and was known to have had Parkinson's disease.  I used to think Parkinson's wasn't that bad to go through anymore, since the advent of treatment with L-Dopa, but a friend is going through this and changed my mind.  It's hell.  

Back to FPGAs.  What's an FPGA?  It's a Field Programmable Gate Array, and if that's not helpful, I can refer you to my Digital Design Primer, part II from May '14.  An FPGA allows a designer to replace a lot of discrete parts with one that they can configure as they want.  It takes digital design from slinging lots of parts on a printed wiring board to designing a single piece of silicon that does the same thing.  This reduces parts cost, assembly cost, allows the products to get smaller, and other benefits that folks keep paying for in their electronics.  As I say in that post, the world is full of cheap consumer devices like your GPS or cycling computer or dive computer or heart rate monitor.  That monitor is sold with a transmitter you wear, together for just over $100.  How do they make them so cheaply that they can be manufactured, put in a package and shipped halfway around the world for that price?  No, it's not by going to China (at least, not exclusively).  Designing for low cost is done by the design group, not by taking any old design and finding cheap labor to build it.

All of these improvements are things that Makers also want, though, and the barrier to hobbyists getting started working in FPGAs has always been that it's expensive and rather arcane knowledge.  FPGAs are designed by programming the logic in a computer language.  Once the code works in simulations on the computer, the piece of silicon can be programmed to do the functions that were desired, and it can be tested.  Say you have a Raspberry Pi or an Arduino and you have something you want to do that it can't do by itself.  Perhaps you just need a way to combine different outputs from the computer, or from a couple of computers, and treat them in special ways: "if this line goes high, and that one is low, I want it to do A, but if they're both high I want it to do B and if they're both low I want it to do C".  Maybe you can do that with a few combinational logic circuits.  Perhaps it's more involved.

As first reported in that May '14 piece, the FPGA makers are working to make the parts more accessible and easier to work with.  Design News reports this week on the trend of costs coming down and development getting easier.
“We’re seeing professional engineers -- graduates with master’s degrees and four or five years experience in industry,” Mark Jensen, corporate software strategy and marketing director for Xilinx, Inc., told Design News. “They call themselves Pro Makers. And they see that they can use FPGAs to build programmable robots and drones, then get crowd source funding, and create their own grassroots businesses out of it.”

The result is an odd convergence: a new class of makers, maybe not formally educated in FPGA programming, but smart enough to apply the new breed of simpler development kits in ways that no one has up to now. Some of the new makers are night owls, breathing life into their ideas when they return from their nine-to-five engineering jobs. Others are students – electrical and mechanical engineers alike – learning the technology while they complete a senior project or master’s thesis. They’re building an unusual assortment of mechanized devices – from self-balancing bicycles to robots that run like cheetahs – and they’re using FPGAs for intelligence.
Using FPGAs for intelligence?  Yes.  A microprocessor, after all, is a digital circuit.  The FPGA vendors include code libraries in their development kits, and a processor doesn't take up too much of a capable FPGA.  (There are big, expensive FPGAs and smaller ones, for smaller tasks).  The barriers to use have kept professionals from using FPGAs, too.  The parts had a reputation for being too "finicky".  The industry is moving to improve this (and sell more parts, duh!)
Now, however, that’s beginning to change, thanks to a proliferation of easier-to-use products that offer substantially lower costs. Krtkl, Inc., for example, now offers a crowdfunded FPGA-based board called snickerdoodle, which also features an ARM Cortex-A9 processor, Wi-Fi and Bluetooth, starting at $55. Similarly, Enclustra GmbH markets its low-cost Qoobik, which features a Xilinx Zynq-7000 FPGA. Meanwhile, Trenz Electronic markets its ZynqBerry board that features a Zynq-7010 FPGA in a Raspberry Pi form factor. Other maker-type FPGA boards include MYIR Tech Ltd.’s Z-Turn , V3 Technology, Ltd.’s SNOWLeo and Diligent Inc.’s Arty Board. A growing number of those maker-targeted boards can be purchased for less than $100.

Such products represent a dramatic departure from the status quo. Traditionally FPGA-based system-on-module (so-called SOM) boards targeted at the industrial world were offered at prices ranging from $200 to $500 and up. Moreover, they were intended for a different class of user – one who may have had years of experience dealing with FPGAs.
You will recall that I mentioned FPGAs are configured for their use by writing software.  That means these development boards, at $100 or more, aren't even very good paperweights without the software (trust me, I've just spent 20 years designing entire radios that aren't good paperweights without the software).  They're giving away the development software.  For example, if you buy the Z-Turn board mentioned there, the software is linked just below the pictures. 
“The barrier for the maker community has been that a lot of FPGAs require specialized software, specialized hardware, specialized tooling and a knowledge of how to work with them,” Henrik Flodell, senior marketing manager for development tools at Atmel Corp., which markets a wide range of Arduino development boards for makers. “The reason they’re finally starting to proliferate in that market is that some of the barriers are now low enough for people to start playing with them.”

Atmel is meeting the needs of the community with ATF15XX-DK3-U , a development/programmer kit that supports the company’s ATF15XX family of complex logic devices (CPLDs), which are similar to FPGAs. The company also offers a free software tool called WINCUPL, aimed at helping designers get up to speed with its CPLDs.
(The Z-Turn board)

On the one hand, this is great for the hobbyist, and home projects.  It's great for the "midnight engineer" who gets home from work at Big Company and designs the Next Big Thing on the dinner table, then starts their own business.  On the other hand, it's just great business practice for the companies.  By getting products into the hands of the younger and less experienced engineers, they're getting them familiar with the products.  Like most people, when engineers are familiar with something that works, they're likely to buy one again when another project creates the need.  This is standard marketing for the most of the design software companies: they'll offer student versions of their software at very low prices, and push to get it used in the classrooms. When those students are working for a living, they'll tend to use or advocate for the software they're familiar with.  It's called a "trickle up" effect.


7 comments:

  1. You need a development board, the pins are too small to solder or maybe even see. With designer software given away it doesn't seem like a bad deal to try the experiment. I found a guy on the web who had built a PDP-10 mainframe on a FPGA with what sounded like his own tools (David Conroy I think).

    ReplyDelete
  2. I use FPGAs in almost every system I design, and the dev boards are definitely becoming cheap and easily accessible. The BeMicro series from Altera is also worth looking at - decent power in a cheap and small form factor. The Max10 is also a part that a lot of makers should be interested in. It has the capabilities of a small FPGA, but also includes a decent A/D converter and is available in packages that are easy to hand-solder. We use BGA packaging for our real projects, and while BGAs can be installed with a hot air tool, it's a lot easier if you can avoid them for hobby work.

    ReplyDelete
    Replies
    1. Thanks for that additional information. I didn't talk about BGAs and other details about building stuff, but it just doesn't get any more important than not being able to build your prototype! (And to be honest, even companies really good at manufacturing like Major Avionics Corporation took a while to get good at them. It took extra hassle to use them on new products.)

      About 10 years ago, I worked on a big program where the digital team used a very high end FPGA. I think they were $5000 in the quantity we bought. I don't recall the number of balls, but I want to say 480. One ball soldering incorrectly could scrap a board.

      Delete
  3. Alas for us old time analog types. I can bounce an electron or 3 on the head of a pin, I can explain the intricacies of Thomson vs Butterworth as well as the differences in Chebyshev I vs II filters, I can build ADCs, stepped-frequency radar, and delta-sigma modulators ... but I've just not been able to wrap my head around binary design - in spite of experience going back to WATFOR/WATFIV FORTRAN, K&R 1st ed, and one time experience as an "expert" configuring LSI/PDP-11 systems.

    An extreme weakness in my knowledge base.

    Oh, well. Now, where's my heater transformer? ...

    Q

    ReplyDelete
  4. Had to upgrade some switches for compliance last week.
    Not touched a switch since school.
    Learning curve.
    Fun.

    ReplyDelete
  5. Replies
    1. From what I hear, VHDL, although that could be a Glock vs. 1911 question with True Believers on each side!

      Delete