Showing posts sorted by date for query fpga. Sort by relevance Show all posts
Showing posts sorted by date for query fpga. Sort by relevance Show all posts

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.


Saturday, January 16, 2016

The Internet of Things Isn't Just About Bad Security

The problem isn't just that the software has gaping security holes, it's that software driven everything appears to be a recipe for disaster.

EE Times reports this week that Consumers are feeling the peril of all the connectivity.  There's a "smart thermostat" for air conditioners called the Nest (which I mentioned here).  It offers convenience features such as the ability to set the temperature from elsewhere.  Your first thought is probably a widespread hacking, but in this case, that isn't the "uh oh".
Earlier this month, Nest’s smart thermostat reportedly stopped working, leaving many users frustrated and their homes freezing cold.

Users took their problem to social media, blaming a mysterious software bug that drained Nest’s battery, and complaining that the thermostat can’t connect to the Internet.
Later, company officials explained that during a December software update which was pushed onto the customers' thermostats, they introduced a bug that didn't show up until January.
Richard Doherty, research director of Envisioneering Group, called the Nest fiasco “the worst possible consumer experience imaginable.” All the more egregious is that most of the time “customers do NOT know of the update; or even the purpose of the ‘fix’ it was supposed to deliver,” he added.
You're not the only people getting concerned about this.  Apparently, that concern is getting pretty widespread.
Take a look at the 2016 Accenture Digital Consumer Survey in which 28,000 consumers in 28 countries were polled on their use of consumer technology.  One result that jumps out is that consumers’ “security and privacy” concerns over IoT devices are much more prominent, compared to 12 months ago, John Curran, managing director of Accenture, told us. 
...
An even bigger surprise is how many consumers said they are going out of their way “to quit or terminate an IoT device or services until they are assured of safety,” explained Curran. “It’s not a majority, but close to 20 percent of people told us that. It’s a big number.”
...
Curran said, “the most sobering view of where we are today is captured by a sharp drop of the purchase intent of smartphones among Chinese respondents.” Globally, the purchase intent for smartphones is declining. Only 48% of consumers plan to buy a smartphone in the next 12 months. The drop is sharpest in China, down from 82 percent last year to 61 percent this year.
I think this maturation of the IoT market is like the quote from the CEO of Big Ass Fans I used back on January 7th:
 "[The connected home] [or in this case IoT - SiG] is in the very early stages," Smith says, "and when people ask why hasn't this caught on, well, what the hell is there to catch on? There's nothing there. I mean, taking something off of the wall and putting it on your telephone...it's a conceit to imagine that that's anything interesting or important. You aren't doing jack is what it comes down to." 
A running joke in the electronics hardware business is that software is going to cause the end of the world.  The way the software business is run is so fundamentally different from the way that hardware works that most of us are perpetually astounded.  Can you imagine buying a car where many features just don't work right, and the companies have you return to the dealer to install new hardware?  I suspect that would raise a pretty loud howl from their owners.  How is that different from a software patch to fix something that doesn't work properly?  Now imagine you don't take the car to the dealer, but someone comes to your car in the middle of the night, installs the new hardware, and the car won't work the next morning.  That's what Nest did. 

In the aviation business, commercial or military, software is deadly serious and the emphasis on the way software is created is unlike anything you'll find in a place like Nest.  In the commercial world I just came from, the industry specifications essentially require that every single line of code can be shown to come from a system level requirement; that every single line of code be inspected, tested and verified to work as intended.  The verification has to be done by someone independent from the software engineers.  That reduces, but doesn't eliminate, the chance the system won't work as intended.  The military and commercial aviation markets are so tough on software that the old cliche' of "fix it in software" has turned into "fix it in hardware".  The equivalent rigor for hardware is mostly aimed at complex digital components, such as FPGAs, ASICs, CPLDs and other hardware that's largely created by writing software.
 
Software issues have killed people already.  The Nest probably didn't kill anyone, but may have allowed some pipes to freeze and flooded some houses.
(found here, but the image is from Cisco, whose version is much more involved and interesting)


Tuesday, May 13, 2014

Techy Tuesday - Digital Design Primer - Part II

There have been some unfortunate delays since Part I due to things popping up around the house that just had to be done, and sucking up all the time I'd use to write this.  So let's just dive in, shall we?

I wrote a lot about combining signals with logic; the area called combinatorial logic.  How is this used?  When an electronic system is being developed, the subsystems and lower level assemblies pass a lot of information back and forth between themselves.  These things are undoubtedly hard for someone who has never built electronics to envision, but the individual signals might be commands to do something, or time signals that say it's time (or it isn't) for an event to happen.  If you're operating a handheld transceiver, for example, you will press a "Push to Talk" button and that signal will often need to do many things.  It may turn on an audio amplifier at the microphone, turn on voltages that power the transmitter, turn off the receiver (or just mute its audio), and other things.  It may be combined with other signals; for example, the radio may tune a wide spectrum but only be authorized to transmit in ham bands.  "Something, somewhere" in the radio says transmission is authorized, and the signals go through an AND gate.  That's the equivalent of saying "If PTT is pressed, AND I can use this frequency, then I transmit". 

In the days of lots of discrete logic, designers would map out the logic required to implement functions.  Some of it was done with graphical design techniques, Karnaugh or K Maps; some of it was done by hand (experience).  Compared to today's consumer products, these were big and bulky circuits.  Miniaturization of packages and more integration helps, but not as much as you might think; the more signals going in and out of the logic portion of the design, the more pins you need and connections limit the size far more than the logic. 

The world, though, is full of cheap consumer devices like your GPS or cycling computer or dive computer or heart rate monitor (pictured).  This 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).
 
They do it by turning everything in this package into a the smallest number of parts possible, replacing the many individual counters and other components with a custom ASIC - Application Specific Integrated Circuit.  Similarly, the display is a custom Liquid Crystal Display -LCD.  Together in an injection molded plastic case, they can be popped off the assembly line with the least effort and cost.  Designing for low cost is done in the design group, not by taking any approach and finding cheap labor to build it.

Design is all about trades, and the trade here is that developing ASICs is expensive.  The last time I was around a project that wanted to develop one, the first batch of parts was a quarter million dollars, and I'll bet it's not significantly cheaper today.  If your parts don't work, you pretty much have thrown that $250k out.

While you can't make an ASIC, you can get most of the way there with a Field Programmable Gate Array, an FPGA.  An FPGA allows the user to minimize the number of digital gates and parts in your design, which minimizes the size - and usually the power consumed, too.  It's programmed on power-up by a small programmable memory, and may be reprogrammed over and over.  Long the domain of the digital design wizards, they are coming onto the hobby market with the emphasis of learning how to design the FPGA.  This isn't done with any of those old techniques, like the Karnaugh  map; it's done by programming what you want the FPGA to do in a high level language that looks like Pascal.  Why Pascal?  It's sort of the default software training language these days; most enginerds get exposed to it in school.  It also bears a strong resemblance to a language called ADA that the DOD uses.   

Check out The Gadget Factory and Papilio - a board for experimenting with programming your own FPGA.  They have a page full of free downloads to help you learn the programming language, called VHDL, an acronym of acronyms if you listen to that Wikipedia page that says it stands for VHSIC Hardware Description Language (VHSIC was military acronym or program; it stands for Very High Speed Integrated Circuit) .  Adafruit features the Mojo FPGA Development Board also intended for learning FPGA programming.  I expect more of these systems to start showing up.  While top end FPGAs can be very expensive, there are many which can be used in small group designs.  

Make no mistake: this isn't beginners' stuff.  But the tools are out there, the open source community is out there and the potential rewards are great, even for small patriot groups. 


Friday, May 17, 2013

Tab Clearing

A little lighter than the last post.

Are you into comics or comic-themed movies like Iron Man 3, the Avengers, Superman?  (We went to see Iron Man 3 last weekend and thought it was a lot of fun).  An excellent resource is Bleeding Cool. Loaded with great art, along with news on all those movies or shows and even graphic novels (paper?  how quaint...)  I didn't know there's apparently going to be a TV universe from Marvel this fall, a new show called Agents of S.H.I.E.L.D.  Trailer here

And speaking of comics, or cartoons, this one sure seemed to summarize how well our leaders in Washington take responsibility when things aren't going so well.

Gary Varvel on Townhall.com

Ever wanted to really know how a GPS receiver works?  I mean at the deepest levels?  A friend sent me this link to a home made GPS receiver project.  A little homebrew radio section, a Raspberry Pi single board computer, a Spartan 3 FPGA evaluation kit and a whole lot of experimenting.  In a time when most people have a GPS on their phone, you might wonder why anyone would want to do this.  Clearly, you don't know about The Knack.