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

0 Members and 3 Guests are viewing this topic.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #125 on: July 26, 2013, 05:11:44 am »
Quote
I did contemplate starting the video working from GAL's/PAL's to CPLD
Do you (all) think that learning about smaller PLD and FPGA-like devices is useful toward learning how to use FPGA-class chips?  (I'm talking about PLD, CPLD, Silego GreenPak, or the Configurable logic that Microchip (CLC) and Atmel (XCL) have started to put on their chips.)

On the one hand, it seems like these are pretty close to being single-CLB on a chip, so understanding them would be essential to understanding FPGAs.  On the other hand, one doesn't design FPGAs at the CLB level, and I for one find that the massive parallelism a major chokepoint in my understanding (almost as if, having learned something about PLDs, I am hamstrung because I keep trying to think of the FPGA in those terms.)

=====

I have a suggested FPGA project: a multi-channel PWM controller, manipulated by SPI or some other serial interface (or, any of multiple serial interfaces - that's the sort of thing that should be relatively easy in an FPGA, right?)  So, some input logic, a clock source, some 8-bit counter, 32 or so 8bit "compare registers", and some outputs.  Does that seem reasonable?  PLDs and most CPLDs I've looked at don't seem to be able to do it, because those compare registers end up being "buried state", rather than associated with IO pins (where most PLDs put all their flipflops.)

(Of course, the other thing I run into is "Oh wait; I don't need to sort of speed provided by an FPGA; I can just do all that in software on a moderately current microcontroller.  Sigh.)
 

Citizen

  • Guest
Re: EEVblog #496 - What Is An FPGA?
« Reply #126 on: July 26, 2013, 07:19:09 am »
Quote
This really needs voiceover.
I really tried to separate caption and  programming.
But yes, they overlay a  bit.

In the next video i will separate them  better:like captions first, then they disappear and programming starts.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1192
  • Country: ca
    • VE7XEN Blog
Re: EEVblog #496 - What Is An FPGA?
« Reply #127 on: July 26, 2013, 07:32:03 am »
If videos don't have a voice over, I just don't watch them. I'm not engaged and disinterested in reading unemotional, boring text.
73 de VE7XEN
He/Him
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: EEVblog #496 - What Is An FPGA?
« Reply #128 on: July 26, 2013, 07:42:37 am »
PLDs and most CPLDs I've looked at don't seem to be able to do it, because those compare registers end up being "buried state", rather than associated with IO pins (where most PLDs put all their flipflops.)

I can't think of any reason why not; in principle it's trivial. I can see small CPLDs running out of registers, that's all. The logic requirement will scale linearly with the number of channels you want and the width of each counter.

The hardest part - if you're worried about doing it properly - is synchronising register writes from the SPI interface to the PWM clock domain. If you're not careful about timing and metastability, you run the risk of output glitches when the host CPU writes values into your control registers. Getting it rightand avoiding this problem is a 10 minute job for an experienced designer.

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: EEVblog #496 - What Is An FPGA?
« Reply #129 on: July 26, 2013, 07:49:49 am »
Do you (all) think that learning about smaller PLD and FPGA-like devices is useful toward learning how to use FPGA-class chips? 
Yes, of course. I started learning Altera MAX CPLDs, using Quartus and VHDL, and now I'm filling up Cyclone IV FPGAs using the exact same language and tool chain.

I tend to use FPGAs more than CPLDs these days, simply because you get so much more logic for the money. CPLDs are expensive, stupidly so given how small they are in terms of logic density, and what you can do in (say) an ARM microcontroller for less. Where I do use them, it tends to be for glue logic functions - things like dividing clocks, multiplexing TDM highways together, and address decoding... hard real-time functions for which a software approach doesn't really make sense.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #130 on: July 27, 2013, 05:44:34 am »
Quote
Quote
PLDs and most CPLDs I've looked at don't seem to be able to [the 32-channel PWM controller]
I can't think of any reason why not; in principle it's trivial. I can see small CPLDs running out of registers, that's all.

Well, the 32*8bit PWM means at least 256bits of storage (flipflops.)  If I look at something like the Xilinx Coolrunner-2 series of CPLDs, I only see one flipflop per "macrocell", and a 384-macrocell CPLD is relatively "big" (next to largest for that series, and packages in 144pin packages.) (and using the whole macrocell just for the flipflop seems very wasteful.)

Am I missing something?  Am I hopelessly software-minded to expect "memory" to be relatively cheap?  Are there CPLDs with hardwired memory blocks?

(I supposed you could theoretically do this by reprogramming the CPLD each time you change a PWM endpoint, so you'd be comparing the hypothetical counter against a "hardwired" constant implemented in the logic parts of the macrocells.  But that doesn't seem right either.)
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37662
  • Country: au
    • EEVblog
Re: EEVblog #496 - What Is An FPGA?
« Reply #131 on: July 27, 2013, 07:48:37 am »
If videos don't have a voice over, I just don't watch them. I'm not engaged and disinterested in reading unemotional, boring text.

I agree. I started watching the video, but immediately switched off once I realised there was no voiceover.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #496 - What Is An FPGA?
« Reply #132 on: July 27, 2013, 08:45:37 am »
Am I missing something?  Am I hopelessly software-minded to expect "memory" to be relatively cheap?  Are there CPLDs with hardwired memory blocks?
There are some nice Lattice parts with integrated memory, like the LCMXO2-640HC, with 18 kbits block RAM, for EUR 5 at Digikey. They used to categorize it as CPLD in their webpage, but looks like now they call it FPGA. But it has some attributes of CPLDs, e.g. integrated flash memory for instant-on without the need for an external configuration device and single 3.3V operating voltage (but there are other versions with 1.2V core voltage, too). I'm using one of their MachXO2 devices for my Crazy Cartridge: http://www.crazycartridge.org
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline Majorstrain

  • Contributor
  • Posts: 49
Re: Re: EEVblog #496 - What Is An FPGA?
« Reply #133 on: July 27, 2013, 12:23:49 pm »
If videos don't have a voice over, I just don't watch them. I'm not engaged and disinterested in reading unemotional, boring text.

I agree. I started watching the video, but immediately switched off once I realised there was no voiceover.

Yep, must admit I only made it about 30 seconds in before quitting


 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: EEVblog #496 - What Is An FPGA?
« Reply #134 on: July 27, 2013, 01:35:42 pm »
Am I missing something?  Am I hopelessly software-minded to expect "memory" to be relatively cheap?  Are there CPLDs with hardwired memory blocks?
There are some nice Lattice parts with integrated memory, like the LCMXO2-640HC, with 18 kbits block RAM, for EUR 5 at Digikey. They used to categorize it as CPLD in their webpage, but looks like now they call it FPGA. But it has some attributes of CPLDs, e.g. integrated flash memory for instant-on without the need for an external configuration device and single 3.3V operating voltage (but there are other versions with 1.2V core voltage, too). I'm using one of their MachXO2 devices for my Crazy Cartridge: http://www.crazycartridge.org
XO2 is a bit of an oddball ( in a nice way) in that the range spans a wide range from low-end CPLD equivalent to mid-range FPGA. Pity the range of packages has such big hole from 32 to 100 pins. 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37662
  • Country: au
    • EEVblog
Re: Re: EEVblog #496 - What Is An FPGA?
« Reply #135 on: July 27, 2013, 01:35:59 pm »
Yep, must admit I only made it about 30 seconds in before quitting

Then again, thousands of people say that about my voice!
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Re: EEVblog #496 - What Is An FPGA?
« Reply #136 on: July 27, 2013, 01:39:33 pm »
Then again, thousands of people say that about my voice!

Take hearth, Dave. You are an acquired taste. ;)

At least you are a native English speaker, unlike some of the rest of us...  ^-^
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: EEVblog #496 - What Is An FPGA?
« Reply #137 on: July 27, 2013, 01:45:16 pm »
Do you (all) think that learning about smaller PLD and FPGA-like devices is useful toward learning how to use FPGA-class chips? 

I'd say probably not, or at least minimal benefit. If you start with simple designs on a medium sized device, it will compile quickly as the place/route doesn't have to work hard, and you won't be anywhere near running out of resources. All the fancy stuff on bigger devices can just be ignored until you want to use it.
If you start with a CPLD, you may hit resource limits quite quickly, and struggle to make a design fit (although you may learn something from the process of  changing a design to make better use of resources).

Starting with CPLD may be worthwhile for very simple stuff, and cpld compile times are a lot shorter then even a very simple device in an FPGA (e.g. from experience with Lattice, 10 secs vs. 20-30 secs for a trivial FPGA design). However download times for a FPGA into internal RAM may be a little quicker than CPLD flash programming time. 

CPLD might also have the minor benefit that you stand more chance of understanding what the compiler is actually doing as the device is simple enough that the logic equations etc. it generates are reasonably understandable.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Citizen

  • Guest
Re: EEVblog #496 - What Is An FPGA?
« Reply #138 on: July 27, 2013, 02:59:54 pm »
Quote
Then again, thousands of people say that about my voice!

That is right.  Moreover  English is not my native language, so i would better leave my videos without my voiceover, since shitty pronunciation can ruin a tutorial ( especially if it is a programming tutorial).
I have seen such tutorials  many times from big companies like Altera, Xilinx, Cypress etc. where a competent but foreign  guy/girl from India/china/korea tries  to explain things, but i just cant understand what he/she is saying. (normally i understand about 95-99% of spoken english: about 98% what Dave  is saying, but i must admit only 65% of Mikes (mikeselecticsstuff), that is why i am not watching his videos)

I also understand that most fanboys here expect Daves-like  presentation. I will produce more FPGA tutorial in my style, better separating  captions  and programming.
« Last Edit: July 27, 2013, 03:02:36 pm by Citizen »
 

Offline MacAttak

  • Supporter
  • ****
  • Posts: 683
  • Country: us
Re: EEVblog #496 - What Is An FPGA?
« Reply #139 on: July 27, 2013, 05:12:36 pm »
You could always try one using voiceover. Most people tend to believe their own voice and speech are considerably worse than they actually are. Even with a strong accent, you might still be just fine. You'll never know for sure until you do it.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: EEVblog #496 - What Is An FPGA?
« Reply #140 on: July 28, 2013, 02:42:10 pm »
normally i understand about 95-99% of spoken english:
but i must admit only 65% of Mikes (mikeselecticsstuff), that is why i am not watching his videos

definition if irony :)
btw why is that? too much cockney? :D

You could always try one using voiceover. Most people tend to believe their own voice and speech are considerably worse than they actually are. Even with a strong accent, you might still be just fine. You'll never know for sure until you do it.

This is very true. We are used to hear our own voice with a distortion filter of jaw bones and all the 'meat' in our head (shortest path is through the squishy stuff) - this is how we think we sound. Hearing same voice from a recording freaks us out.
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline mickpah

  • Regular Contributor
  • *
  • Posts: 148
  • Country: au
    • Yeti Hacks
Re: EEVblog #496 - What Is An FPGA?
« Reply #141 on: July 29, 2013, 11:26:48 am »
Hi

I have been pulling a Rigol DP832 power supply apart slowly over the last week and got to the keypad. I was going to leave it thinking what could be interesting here?
But lo and behold they are using a microsemi ProASIC3 FGPA as the keyboard controller. Couldn't believe it.
You really need to do a teardown on these power supplies Dave, chock full of goodies. Insane amount of computing power in a linear power supply that costs just over $400 USD.

microsemi also do what they call nano fgpa http://www.microsemi.com/products/fpga-soc/fpga/igloo-overview, niche but interesting. If ever there was something called a hobbyist  FPGA this might go close. well VQ128 in not BGA anyway  :)
« Last Edit: July 30, 2013, 06:46:05 am by mickpah »
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37662
  • Country: au
    • EEVblog
Re: EEVblog #496 - What Is An FPGA?
« Reply #142 on: July 29, 2013, 01:36:15 pm »
You really need to do a teardown on these power supplies Dave, chock full of goodies. Insane amount of computing power in a linear power supply that costs just over $400 USD.

Yes, I need to ditch my Atten piece of rubbish.
Hmm, only AU$420 + GST:
http://www.eyou.com.au/product/rigol-dp832-programmable-triple-output-195-watt-power-supply-/
Didn't know they were that cheap...
 

Offline WarSim

  • Frequent Contributor
  • **
  • Posts: 514
EEVblog #496 - What Is An FPGA?
« Reply #143 on: July 29, 2013, 01:42:05 pm »
Good grief, you find these the day after I order a Spartan3E dev board and programer!  :)
 

Offline mickpah

  • Regular Contributor
  • *
  • Posts: 148
  • Country: au
    • Yeti Hacks
Re: EEVblog #496 - What Is An FPGA?
« Reply #144 on: July 29, 2013, 09:50:06 pm »
You really need to do a teardown on these power supplies Dave, chock full of goodies. Insane amount of computing power in a linear power supply that costs just over $400 USD.

Yes, I need to ditch my Atten piece of rubbish.
Hmm, only AU$420 + GST:
http://www.eyou.com.au/product/rigol-dp832-programmable-triple-output-195-watt-power-supply-/
Didn't know they were that cheap...
yep where I got mine, sadly gst and shipping take it closer to $500AUD - this is one heavy beast. It has quirks and is much deeper than most units but nothing I can't live with it at that price.
 

Offline alter Ratz

  • Contributor
  • Posts: 23
  • Country: at
Re: EEVblog #496 - What Is An FPGA?
« Reply #145 on: October 08, 2013, 07:51:05 pm »
Excellent! Just what I was hoping to see! And just in time for dinner...

Thanks Dave.

I also liked the FPGA blog. I was working in ASIC design (we developed the first FlexRay controller) using FPGA prototyping (ALTERA) a few years ago, which I found not to be too different from software design (which I do now). However it is quite difficult to switch ones mindset from procedural to unlimited paralellism. But when you manage to do it, it is impressive what you can do.

I hope very much that Dave shoots a few followups to this blog entry.   :D

Best regards,
Bernhard
 

Offline idiotsecant

  • Newbie
  • Posts: 8
Re: EEVblog #496 - What Is An FPGA?
« Reply #146 on: October 09, 2013, 12:07:43 am »
Dave, I swear if i'm not careful I might learn something in spite of my university.

Thanks for the video.
 

Offline kcozens

  • Contributor
  • Posts: 44
  • Country: ca
Re: EEVblog #496 - What Is An FPGA?
« Reply #147 on: October 18, 2013, 08:17:17 pm »
Ignore those naysayers, Dave. This was a nice introduction to a very complex topic. I stayed away from FPGA's for a long time. After seeing a video by Jeri Elsworth about some inexpensive FPGA development boards I picked up a couple of Spartan 3 based boards. One was the Papilio One board that was mentioned in Jeri's video. I went with simple development boards which are little more than the FPGA as I already have a lot of parts around to connect up to a board. I didn't want a board where a lot of I/O pins are tied to onboard devices I may not need or want to use.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: EEVblog #496 - What Is An FPGA?
« Reply #148 on: November 27, 2013, 11:41:11 pm »
Great stuff on the FPGA. I just checked out Farnell and there are very reasonably priced Lattice Kits http://uk.farnell.com/lattice-semiconductor/ice40lp1k-blink-evn/kit-eval-iceblink40-lp1k/dp/2253072 . Cheaper than a Raspberry Pi at only £26.19+VAT each!

The BGA chips alone are only £2.75 for 36 pin and £3.71 for 121 pin. Ok they will be a bugger to solder if you don't have a rework station and I guess a proper PCB and solder paste mask is essential. All that is needed is a breakout board and I guess the kit might be good enough for that at least in prototype projects.
 

Offline Winston

  • Regular Contributor
  • *
  • Posts: 121
  • Country: us
    • IC Die Photography
Re: EEVblog #496 - What Is An FPGA?
« Reply #149 on: January 03, 2014, 03:43:06 pm »
FPGA 101 - Making awesome stuff with FPGAs

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf