Welcome, Guest. Please login or register.

Author Topic: FPGA for dummies  (Read 59503 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« on: December 06, 2011, 05:02:04 PM »
It should be noted that VHDL and Verilog are languages which are technology-independent, and are used to implement logic on a wide range of hardware, including ASICS (which by the definitions in this threads are "not emulations" of the "real" thing - because they're hardwared).

Quote from: psxphill
FPGA appears to be pretty similar to writing a computer program.

http://en.wikipedia.org/wiki/Verilog
http://en.wikipedia.org/wiki/VHDL


The VHDL language is used to describe the logic function of a circuit; it's not a sequencial program which emulates that circuit. The result is synthesized for the target technology - ASIC, FPGA, CPLD, PLD etc. If you're crazy enough you can even print a schematic of result of the synthesis and implement it yourself using 74-circuit.

This raises a question: If I do this. I design a circuit using the VHDL language, and implement the result of the synthesis using 74-circuits. Would this still be an emulation?

Quote from: psxphill
The major difference between an FPGA and a software emulator is you don't have to work round operating system limitations on an FPGA. However the FPGA is still an emulator.


FPGAs are inherently parallel and perform logic functions just like a (huge) bunch of 74-circuits would. A software emulator is inherently sequencial since it's executed by a CPU. FPGAs don't execute anything. You could have a software emulator running on a system without an operating system. This would still be extremely different from a hardware implementation on an FPGA.

All this is (very) clear to people who work with this stuff, or who has at *least* taken some rudimentary courses on this subject. There are good books about this too.

Quote from: Thorham;670500
An FPGA emulates a circuit, because while the components are fixed, it's wiring is not, and therefore the circuit isn't fixed. It imitates a circuit's function by providing user definable wiring. Wires are part of a circuit, and these aren't fixed here.


By this definition, all programmable logic are emulations of "real" circuits.

There are many types of programmable logic circuits, all of which the function is described using the VHDL (or Verilog) language. Just because FPGAs use lookup tables similar to SRAMs instead of fuses or some reprogrammable incarnation of the same thing, doesn't mean it's an emulation of that circuit.
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #1 on: December 06, 2011, 05:06:08 PM »
Quote from: persia;670474
But if you tell the FPGA to create a gate, how does it do that?  What is the FPGAs actual method of creating a gate inside itself?  How does it remember that gate? What is actually going on at the physical level?  Surely there aren't a lot of nano-bots building and tearing down hardware inside the FPGA.


This is fundamental switching theory; the FPGA uses lookup tables for combinatorial logic and logic for interconnects, MUXes etc. These lookup tables are similar to SRAMs, and this is why FPGA contents is volatile.
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #2 on: December 06, 2011, 05:42:44 PM »
Quote from: Thorham;670520
And there we have it: Lookup tables. This means there's no physical chip, which means it's an emulation (imitation). Or perhaps it's about the meaning of the word 'emulation' being interpreted in different ways.

No, this is again fundamental switching theory. Lookup tables is a common way to describe a combinatorial logic function, it's not unique for FPGAs at all. The only difference in that case is that the tables are volatile in the case of the FPGA, and that their state has to be defined after power up. But apart from that, LUTs are used in all programmable logic circuits afaik, and I wouldn't be surprised if a considerable part of any ASIC design also ends up being synthesized into some kind of lookup table.

EDIT: Of course it's not an emulation of a "real" chip. It's a medium for programmable logic, nothing else. The same code can be put into an ASIC as well, giving the exact same function and timing.
« Last Edit: December 06, 2011, 05:45:04 PM by shoggoth »
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #3 on: December 06, 2011, 06:17:18 PM »
Quote from: psxphill;670522
An FPGA just removes a layer of abstraction, otherwise it's largely the same.


This is so untrue I don't know where to begin. FPGAs are the equivalent of a huge number of 74 logic gates. It's a programmable device, but so is a CPLD, or even a flash memory (which can be used as a programmable logic chip, btw). An FPGA is not even similar to a CPU.
 
Yes an FPGA is hugely parallel, but you can get hugely parallel processors (think GPGPU).[/quote]

There are multi-core CPUs, but each of these cores are inherently sequential and execute code. FPGAs does not execute code. They're merely a representation of a bunch of logic gates and flipflops, which can be *made* to execute code by implementing a softcore CPU.

Argumentation based on "I heard that" and random links to wikipedia without sound background knowledge makes it really difficult to discuss things. I understand that you'd like to make a point, and there is nothing wrong with that. But with claims like "FPGAs are essentially CPUs" just because they can be programmed to perform a function is... awkward. No offense.
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #4 on: December 06, 2011, 07:16:23 PM »
Quote from: billt;670532
Please discuss this detail in reference to antifuse based FPGAs.


I just mentioned SRAM-based devices because one of the posters used this to support his/her claim about FPGAs being an emulation of "real" hardware, due to their volatile nature. There are of course other non-volatile technologies as well. Apart from this I don't know what kind of answer you're fishing for here :)
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #5 on: December 06, 2011, 10:34:21 PM »
Quote from: Thorham;670562
The point is that you don't have, say, two transistors which are directly, mechanically connected (such as using a printed circuit board that's custom made, which the components are soldered onto). In an FPGA you have configurable components in between the wires (or am I missing something again?).


Thorham, what about CPLDs and ASICs. Are those also considered emulations of the real thing? I mean, in a CPLD, you don't have, say, two transistors which are directly, mechanically connected (such as using a printed circuit board that's custom made, which the components are soldered onto).
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #6 on: December 07, 2011, 02:28:09 AM »
Quote from: Thorham;670576
Don't know about CPLDs, but in general, if you have a programmable device in which you can make a circuit design actually work, then it's an emulation (also because of extra components needed which aren't part of the design).


So... by definition it's emulating... what exactly? A (fairly large) bunch of 74-circuits? Transistors? I have a different theory: it implements a logic function. That logic function could be implemented in other ways as well. The technology used to implement that logic function has no impact on functionality whatsoever as long as the technology is able to sustain timing requirements etc.
 

Offline shoggoth

  • Full Member
  • ***
  • Join Date: Dec 2004
  • Posts: 223
    • Show all replies
Re: FPGA for dummies
« Reply #7 on: December 12, 2011, 12:20:46 AM »
Quote from: psxphill;670621
Saying that FPGA isn't emulation because an FPGA is parallel or isn't programmed the same as a CPU is just plain stupid.

 
You clearly misinterpreted my comments, or didn't read them in their proper context. You have been claiming similarities between FPGAs and CPUs on the basis that they're both programmable devices, programmed using programming languages, and… other things which only makes sense if you disregard all technical facts about this matter. I wouldn't go as far as to call that, quote "plain stupid", but I'd definitely call it ignorant.

Quote
I've worked on a couple of very well known emulators, so I know what I'm talking about. Linking to wikipedia is more so I don't have to rewrite what they already said. kthx


I've implemented user land emulators and worked on a number of low level emulation frameworks, including semi-cycle accurate ones, which means I'm not entirely unfamiliar with the inner workings of emulators either. Other posters may very well know what they're talking about, even if their opinions about stuff differ from yours.

Just to make sure we understand each other. I don't claim to be an expert on VHDL and FPGA technology, but I have used it to implement several projects. For real. Now, that doesn't mean I'd use your words ("so I know what I'm talking about"), because that would be, quote, "plain stupid".

Problem here is about belief vs. technical facts, and since I'm not much of a believer I don't think I have anything more to add here, at least not to this particular part of the discussion.

kthx.