Author Topic: EEVblog #496 - What Is An FPGA?  (Read 87755 times)

0 Members and 1 Guest are viewing this topic.

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
EEVblog #496 - What Is An FPGA?
« on: July 19, 2013, 11:32:13 pm »
What is an FPGA, and how does it compare to a microcontroller?
A basic introduction to what Field Programmable Gate Arrays are and how they work, and the advantages and disadvantages.
FPGA Stuff in Dave's Amazon store: http://bit.ly/1ayoNiV

« Last Edit: July 20, 2013, 02:29:45 am by EEVblog »
 

Offline synapsis

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
    • Blackcow
Re: EEVblog #496 - What Is An FPGA?
« Reply #1 on: July 19, 2013, 11:34:00 pm »
Excellent! Just what I was hoping to see! And just in time for dinner...

Thanks Dave.
 

Online xrunner

  • Super Contributor
  • ***
  • Posts: 7714
  • Country: us
  • hp>Agilent>Keysight>???
Re: EEVblog #496 - What Is An FPGA?
« Reply #2 on: July 19, 2013, 11:42:47 pm »
Excellent! Just what I was hoping to see! And just in time for dinner...

Thanks Dave.

Agreed. I will view this tonight!  :-+
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline JoannaK

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: fi
    • Diytao making blog
Re: EEVblog #496 - What Is An FPGA?
« Reply #3 on: July 20, 2013, 12:46:42 am »
Nice video.. Like the ending  ;)

More seriously.. Yeah, FPGA.s are darn complex and versatile beasts. Have done *some* tinkering but I know I don't really know a **** about them.

Funny thing about fpga:s is that if you mess the code part, you may burn the chip. There's simply not enough cooling (normally at least) to allow all the lines/registers to toggle at  max clock speed 100% time.

What I like most is, when they combine FPGA:s with genetic evolutionary programming.  :-/O
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: EEVblog #496 - What Is An FPGA?
« Reply #4 on: July 20, 2013, 02:45:07 am »
Nobody mention the spelling mistake at the top of the whiteboard!   >:D

It reminds me of the lift in the electronic engineering building at Leeds Uni, there's a big red button on the panel that says EMERERGENCY. Glancing at it, you know it is wrong somehow, but your brain won't say what's actually wrong.


Offline CrosseyeJack

  • Contributor
  • Posts: 25
  • Country: gb
Re: EEVblog #496 - What Is An FPGA?
« Reply #5 on: July 20, 2013, 03:38:07 am »
What would you guys suggest for a noob when it comes to fpga's too just learn the basics with? A brief history, I'm used to building my own circuits, using pics/atmels in a breadboard for prototyping my own circuits and then designing and moving my projects onto their own PCBs around the micro controller. So I'm not scared to break out the soldering iron.

Its not that micro controllers are no longer cutting it for me (for what I do they are more then enough right now) I'm happy with CCS C and PIC micros with my current projects, But fpga's are something I want to dip my toe (even my recent broken toe) into at some point so I'm looking for an affordable piece of kit I can use to learn with. I don't mind building something (my first ardunio was just a atmega on a breadboard) but if I can get an affordable dev kit I have no problems in doing so just as long as I can break it out and its not going to be a right royal pain in the arse converting it into its own pcb when I want to move it onto its own standalone project.

Its my first post on the board so be gentle. I would love some feedback in pointing me in the right direction in getting started with FPGA's.

Many thanks in advance.
Dan.
« Last Edit: July 20, 2013, 03:42:07 am by CrosseyeJack »
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
Re: EEVblog #496 - What Is An FPGA?
« Reply #6 on: July 20, 2013, 03:44:09 am »
What would you guys suggest for a noob when it comes to fpga's too just learn the basics with?

The Papilio and DE0 Nano are two dev boards under $100, Xilinx and Altera respectively.
http://papilio.cc/
http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=593
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: EEVblog #496 - What Is An FPGA?
« Reply #7 on: July 20, 2013, 04:12:59 am »
Some pointers for people who want to start with FPGAs:
1. Simulators are extremely accurate in "post place and route" mode, enough to develop the entire project without programming a chip even once. So the only real reason to buy a board is to have that cool feeling when the first LED blinks on a real hardware.
2. There is an open-source simulator called iverilog (for Verilog only, obviously). It works on Win/MAC/Linux, really fast and easy to use. The benefit of using it on the initial stages is that it is possible to use your favorite IDE and not an IDE from the chip vendor, which are sort of slow and not all that great.
Alex
 

Offline CrosseyeJack

  • Contributor
  • Posts: 25
  • Country: gb
Re: EEVblog #496 - What Is An FPGA?
« Reply #8 on: July 20, 2013, 04:29:24 am »
Thanks Dave. Looking at them I'm tempted to just get both.

While I'm more of a "lock me in a room, throw me in at the deep end and don't come out until I have at lease a hello world running" kind of guy. I do like the idea of the fall back option of the Arduino compatible Soft Processor on the Papilio. At least I would be at least to get something running on the thing :-P though I don't want to fall into the trap of just using it as an Arduino. I'll have to flip a coin to see what to get, but at the cost of each its hard not to just get both. Though I do feel myself drawn towards the Xilinx system.

ataradov as for the simulator. It sounds like a good plan even if its just to see if I will put the time into it. But I've always been a physical person when it comes to electronics every since I got a 200-1 kit from Tandy http://www.amazon.co.uk/200-1-Electronic-Project-Lab/dp/B000LRCD6Q as a Christmas gift and ended up creating a short circuit and burning a bigger hole on the 9v spring (oh that brings back memories). So the buzz from getting an led flash goes deep :-)

Thanks all. Looks like I will be ordering at least one new "toy" in the next few days :-)
 

Offline 99tito99

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #9 on: July 20, 2013, 04:38:45 am »
Some of the old players may find it “blablabla” but, speaking as a new player I thought it was a good intro, but what the hell do I know I’m just a newbie.  Look forward to another video or two. Cheers
 

Offline Odysseus

  • Regular Contributor
  • *
  • Posts: 148
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #10 on: July 20, 2013, 05:28:21 am »
One of the common practical uses of FPGAs in the industry is to emulate digital hardware that will eventually be sent off to be taped out and turned into an actual chip, especially when it needs to interface with complicated analog hardware, either externally or on the same silicon die, that is difficult to simulate accurately in tandem, with all the non-ideal, second-order effects common to any analog design.

The great thing that after the HDL is written once to be tested in simulation on a computer and in emulation on an FPGA, then the exact same HDL code is used to design the final hardware.  The HDL code also gets used again when your chips come back from the fab and you need to debug it's internal operation. 

And it gets really crazy when you're developing a device with an embedded micro-controller, many times with specialized DSP functionality.  Before going to tapeout, during simulation and emulation, you can watch how every instruction you program affects every single bit inside your  processor, which itself was just previously programmed in HDL and can still be adjusted.  It's programming on a whole other level.

And after that you get to program a compiler...
« Last Edit: July 20, 2013, 05:32:07 am by Odysseus »
 

Offline John Coloccia

  • Super Contributor
  • ***
  • Posts: 1217
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #11 on: July 20, 2013, 05:39:07 am »
I spent some time working with Xilinx FPGAs configured with a "soft core" and surrounding circuitry.  This combination has more power and flexibility than you could imagine if you've never done such a thing.  You can concentrate on getting the inputs and outputs correct with the basic design, and then work out the details of your control architecture later.  This is the future of embedded engineering, if it's not already the present.  It's what software engineers have been talking about for decades when they talk about "abstraction", but implemented at the hardware layer too.

So you can do things like decide, more or less in the FPGA design, how you're going to divvy up things like control loops, stepper algorithms, comm channels, etc etc.  All you have to do at the board level is make sure that the signals coming in and out of the FPGA are electrically compatible with your needs, and some time later you can decide on the actual implementation details.  It completely blurs the traditional boundaries of software and hardware.
« Last Edit: July 20, 2013, 05:41:01 am by John Coloccia »
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2187
  • Country: au
Re: EEVblog #496 - What Is An FPGA?
« Reply #12 on: July 20, 2013, 06:08:54 am »
It's interesting that only the surface has been scratched in this video in regards to FPGA's in that it would take another hour long video to just scratch the surface of a given HDL

If you have any programming background it's difficult at first to get your head around the "parallelism" of HDL and then deciding between behavioural and structural programming. Not to mention which language to take up, Verilog or HDL.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
Re: EEVblog #496 - What Is An FPGA?
« Reply #13 on: July 20, 2013, 06:13:14 am »
This is the future of embedded engineering, if it's not already the present. 

Tell that to Altium, who bet the entire company on the future of FPGA's. They were wrong, and failed miserably.
Even the FPGA vendors have admitted soft functions aren't the universal holy grail everyone was predicting. They are integrating more and more hard functions and processors within FPGA's.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11769
  • Country: us
    • Personal site
Re: EEVblog #496 - What Is An FPGA?
« Reply #14 on: July 20, 2013, 06:18:39 am »
And as for not thinking which pin goes where - recently more and more microcontrollers include very advanced pin routing facilities.

I think Xmega E5 has some sort of FPGA-like level of glue logic between the core and pins. I have not looked how advanced it is.

Most Cortex MCUs can map peripherals to different pins.

You still need to think when designing stuff.
Alex
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
Re: EEVblog #496 - What Is An FPGA?
« Reply #15 on: July 20, 2013, 06:22:55 am »
And as for not thinking which pin goes where - recently more and more microcontrollers include very advanced pin routing facilities.

The Microchip 24F series have had that for a long time. It's not completely flexible, but still very useful

Quote
You still need to think when designing stuff.

Yes, even with FPGA's.
 

Offline John Coloccia

  • Super Contributor
  • ***
  • Posts: 1217
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #16 on: July 20, 2013, 06:57:21 am »
This is the future of embedded engineering, if it's not already the present. 

Tell that to Altium, who bet the entire company on the future of FPGA's. They were wrong, and failed miserably.
Even the FPGA vendors have admitted soft functions aren't the universal holy grail everyone was predicting. They are integrating more and more hard functions and processors within FPGA's.

I'm not sure what you mean.  The point of having an FPGA is the ability to create the hard functions you need on the fly.  That's not to say that there isn't merit in having some dedicated, optimized circuitry to do certain operations, but that's just a refinement of the basic concept.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1195
  • Country: ca
    • VE7XEN Blog
Re: EEVblog #496 - What Is An FPGA?
« Reply #17 on: July 20, 2013, 07:31:38 am »
I'm not sure what you mean.  The point of having an FPGA is the ability to create the hard functions you need on the fly.  That's not to say that there isn't merit in having some dedicated, optimized circuitry to do certain operations, but that's just a refinement of the basic concept.
I think the point is that a great many designs were using the same blocks, which is not cost effective. You waste a couple 1000s of logic blocks on a softcore, but especially at the low end, what you're paying for those blocks is not competitive with an external mcu by a long shot. You get the flexibility of internal interfacing, but it's expensive and you're probably not going to do that unless you need a special interface for tight timing or whatever, instead you inflate your BOM and board size and add a micro, or add 50% to the parts cost,

Putting more 'common' hard peripherals, much the same way as microcontrollers have a variety of peripheral complements, uses the expensive die space more effectively, and thus drives the cost down for things many customers are going to need anyway, and would otherwise use lots of expensive configurable logic on. Fast SERDES and the like probably aren't doable at all with the configurable logic. Makes sense to me, it's just optimizing the die usage versus what customers need. Given the complexity of even a simple FPGA, throwing a simple CPU core on there is probably not costing much, and you can help the designer eliminate an external uC or use a smaller and cheaper FPGA, while having better interface options. That sounds like an easy design win.

I doubt 'pure' FPGAs are going anywhere, but adding some more onboard capability seems like a fairly obvious evolution. If lots of users are including a small microcontroller (soft or external) in their designs, why not throw one right on the die that will satisfy most of them and save them money and time.
« Last Edit: July 20, 2013, 07:37:03 am by ve7xen »
73 de VE7XEN
He/Him
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: EEVblog #496 - What Is An FPGA?
« Reply #18 on: July 20, 2013, 07:52:00 am »
I'm not sure what you mean.  The point of having an FPGA is the ability to create the hard functions you need on the fly.

You missed a lot of things. Lets take just one. Let me say it in a simplified way:

FPGAs are difficult, while the average programmer is stupid.

You have at one hand a need for more and more embedded programming work (e.g. for the *cough* internet *cough* of *cough* things *cough*). And on the other hand you have a proliferation of barely capable programmers. So you need tools, concepts, systems, programming languages, etc. that don't ask too much from these programmers. At least if you want to get some kind of mediocre output at all at affordable cost.

FPGAs don't fit the bill for these people. And these people are the majority of what you get these days. They need guidance, not the flexibility to create functions on the fly. They need simple tools, not the mess FPGA vendors provide as their tool chains(1). They need simple concepts and dumbed-down programming languages. Do I like the proliferation of stupidy in the business? No, but that's the way it is.

FPGA as the future of embedded engineering? Nop, won't happen because of a lack of embedded engineers capable of handling them.

--
(1) Guess why these tools are such crap? Because the vendors don't and can't invest in really skilled programmers and engineers capable of designing and writing good software.
« Last Edit: July 20, 2013, 07:54:56 am by Bored@Work »
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline elektronicks

  • Contributor
  • !
  • Posts: 18
Re: EEVblog #496 - What Is An FPGA?
« Reply #19 on: July 20, 2013, 09:16:34 am »
"technical life gives birth to monsters" was one of the quates i remembered.

fpga is an example of this monstruosity. why embeding, why making it faster ? how long do you think integrating, embeding until you reach to the final usable limit of the cosmos / universe / this space - temporal dimension and give up in front of infinity  ?

assholes from IBM thought ohhh.. let's make an atomic memory, each atom holding one bit - and then hires somebody to "produce" or "edit" videos like this guy going around on how science and technology will make the human life better.

beeing all relative -  faster and slower, bigger and smaller, discrete or integrated only means control over others is beeing passed from one group of people to another for a short period of time while they are dreaming about their accoumplishments in the field.

dave playing the violin in a certain group: new modern independent high tech cutting edge online job ...with a highly stage managed and controlled smile to fit the motto: "entusiastic and passionate"

ogh.. o by the way: we can't care less about how video editing takes place. it all sucks because of the above mentioned points.

that puts the fpga into perspective.. and you imagine: there are some tousands, maybe hundred of tousands of engineers going to a 8 hour job thinking how the fuck we will integrate the clock because their slave masters told them to do it, otherwise they will have theirs asses kicked out.

fuck electronics man.. it is all a fucking big sickness. since humans discovered semi-conductivity, the porn started.

« Last Edit: July 20, 2013, 09:23:09 am by elektronicks »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13996
  • Country: gb
    • Mike's Electric Stuff
Re: EEVblog #496 - What Is An FPGA?
« Reply #20 on: July 20, 2013, 09:27:08 am »
I'm not sure what you mean.  The point of having an FPGA is the ability to create the hard functions you need on the fly.

You missed a lot of things. Lets take just one. Let me say it in a simplified way:

FPGAs are difficult, while the average programmer is stupid.
..and the mistake people often make is not understanding that FPGAs are NOT about programming. HDLs are NOT programming languages.
You need to approach it with the mindset of a hardware designer. An experienced hardware designer with minimal software knowledge would be way better placed to get into FPGAs than even a good software person with minimal hardware knowledge.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline KedasProbe

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: be
Re: EEVblog #496 - What Is An FPGA?
« Reply #21 on: July 20, 2013, 09:54:38 am »
Maybe next time you can cover the difference with CPLD (although maybe you should have started with it :) )
Not everything that counts can be measured. Not everything that can be measured counts.
[W. Bruce Cameron]
 

Offline John Coloccia

  • Super Contributor
  • ***
  • Posts: 1217
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #22 on: July 20, 2013, 10:47:49 am »
I'm not sure what you mean.  The point of having an FPGA is the ability to create the hard functions you need on the fly.

You missed a lot of things. Lets take just one. Let me say it in a simplified way:

FPGAs are difficult, while the average programmer is stupid.

You have at one hand a need for more and more embedded programming work (e.g. for the *cough* internet *cough* of *cough* things *cough*). And on the other hand you have a proliferation of barely capable programmers. So you need tools, concepts, systems, programming languages, etc. that don't ask too much from these programmers. At least if you want to get some kind of mediocre output at all at affordable cost.

FPGAs don't fit the bill for these people. And these people are the majority of what you get these days. They need guidance, not the flexibility to create functions on the fly. They need simple tools, not the mess FPGA vendors provide as their tool chains(1). They need simple concepts and dumbed-down programming languages. Do I like the proliferation of stupidy in the business? No, but that's the way it is.

FPGA as the future of embedded engineering? Nop, won't happen because of a lack of embedded engineers capable of handling them.

--
(1) Guess why these tools are such crap? Because the vendors don't and can't invest in really skilled programmers and engineers capable of designing and writing good software.

Any EE with half a brain can handle Xilinx's design tools.  I don't know what to say about your assertion that engineers are almost universally stupid.  Maybe all the engineers sitting around making Chinese clones of toasters and electric bug zappers aren't the best of the best, but most of us aren't doing that, and I'll bet dollars to donuts that most of us aren't even doing consumer devices.  The guys I've worked with over the years are pretty damn competent and able to do their jobs, and if you're an EE in 2013, dealing with FPGAs is something you're expected to be able to handle.

re: everything else, and "HDLs are NOT programming languages".
Apparently, no one seems to understand the concept of a soft core.  You configure a portion of the gates on the FPGA as a general purpose processor that you can then hand off to the embedded software engineer and he can program in C/C++ (or whatever is available).  The EE and SE work hand in hand to divvy up the task, configure the processors for exactly what they need with whatever co-processors they need, setup the interfaces between them, etc.

So I can get 2 months into it and say, "Hey, you know what?  What I could REALLY use is for you to monitor these 10 inputs, mux them, and set bit anytime one of them triggers.  Filter it a bit for me too", and in a few minutes we can reconfigure the hardware to do just that.  And then a week later I can say, "You know what would work better?  Instead of setting a bit, please increment this word, and I'll decrement when I've serviced it.".  What you have is a chip with a custom processor surrounded by custom hardware and interfaces designed by you and for you.

Maybe there's 5 million theoretical reasons you can come up with why that doesn't work, yet in the real world I've done it time and time again with tremendous success.  It's probably overkill for a toaster, but then again what isn't?  You just have to put on your big boy pants and learn how to use a couple of simple tools, but as a pro that's what you're expected to do.

re: cost and stuff like that
I suspect that most engineers and most projects are not consumer projects and the cost of an FPGA is really not all that significant.  In fact, other than the work I'm doing now with my own business, I'd have to think hard if I EVER worked on a shrink wrapped consumer product, or even know anyone who has.  I believe the answer is no.  A friend of mine works for iRobot but he doesn't work on those cute little vacuum cleaners.
« Last Edit: July 20, 2013, 11:18:09 am by John Coloccia »
 

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
  • Real Machinist, Wannabe EE
Re: EEVblog #496 - What Is An FPGA?
« Reply #23 on: July 20, 2013, 12:49:59 pm »
I do want to suggest you try setting your exposure to +1 stop, or press the backlight button if your camera has one, when the whiteboard dominates the frame. The white board comes across looking a bit too grey and you look a bit dark too. One stop compensation isn't really enough but 1.5 or 2 stops might be more than people will tolerate if the whiteboard actually looks white

+1

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2617
  • Country: 00
    • My random blog.
Re: EEVblog #496 - What Is An FPGA?
« Reply #24 on: July 20, 2013, 12:54:37 pm »
I suspect that most engineers and most projects are not consumer projects and the cost of an FPGA is really not all that significant.  In fact, other than the work I'm doing now with my own business, I'd have to think hard if I EVER worked on a shrink wrapped consumer product, or even know anyone who has.  I believe the answer is no.  A friend of mine works for iRobot but he doesn't work on those cute little vacuum cleaners.

and here lies your problem, You suspect wrong. Market is all about optimization of cost. Altium bet on FPGAs taking over design, but FPGAs are expensive, and dedicated hardware will ALWAYS BE CHEAPER. Not to mention thanks to globalization its cheaper to hire 100 chinese/indian monkeys to code complete works of William Shakespeare than to pay living wage to 3 CS/EEs on staff.
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf