Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

FPGA

Status
Not open for further replies.

Electrix

Member
What exactly is an FPGA ?

Can we use it in similar applications of microcontrollers ?
How do we program FPGAs

Thanks...
 
FPGAs are programmable hardware. Hardware can operate in parallel and therefore generally faster than software-based microprocessors. However, microprocessors are generally more suited for decision-intensive applications. Hardware is often described using Hardware Description Languages (HDLs), of which the main ones are VHDL and Verilog. Common FPGA vendors include Xilinx, Altera and Lattice.
 
Well FPGA stands for Field Programmable Gate Arrays. checkmate has described a great advantage that FPGAs have over conventional microprocessors and DSPs, that is parallelism. we can use an FPGA to do any function that a microcontroller can. actually you can implement the whole microcontroller on the FPGA and do anything with it.

an FPGA is normally programmed with the JTAG interface. its better to buy a development kit like the Xilinx Spartan-3 Starter Kit or the Altium LiveDesign Evaluation Kit. if you buy such a board then you just have to connect the board to your PC's parallel port and you can program the FPGA with the software that comes with the board.

if you want to start with FPGAs then buy the book "Design Warrior's Guide to FPGAs" by Clive Maxfield. and start learning an HDL. if you know C, then you should start with Verilog HDL. and yes do get a development board. if you are doing a degree then this will also help you in your projects

i hope that helps
 
I knew nothing about Verilog HDL but got the book, played with the Altera compiler and in a day I made the all-amazing LED blink program to work. Got $99 Altera board from http://www.tj-qidong.com and I have to say that it is a pretty easy and cool way to do kickass time accurate waveforms
 
It should be noted that there are many really large FPGAs available. They can be much more flexible than a micro. You can get soft cores for them which are essentially standard microprocessors that can be programmed into the FPGA. The advantage of these soft cores is that many times you can modify them and add extra custom instructions for example.

Many FPGAs also have built in hardware cores and/or RAM blocks that can be connected many ways. Some even include multiple power pc cores, but these FPGAs will be quite pricy.

Basically, an FPGA is divided into many logic cells (often in the hundreds of thousands). These cells basically have a small memory (ie 4 or 8 bit) that is indexed by a multiplexor (or somthing simmilar). The inputs/outputs from these logic cells can then be connected in many ways through programmable switches/links to give just about any conceivable logic.

When writing code for an FPGA, you usually dont explicitly decide which cells to use and how to connect them, the compiler does that for you. You can write code in Verilog, VHDL, or through a graphical logic editor that lets you draw out your logic using standard logic gate symbols.
 
What would be good is if you could buy PCs with volitile volatile FPGAs on their CPUs so programs could make their own super fast insrtuctions.
 
Hero999 said:
What would be good is if you could buy PCs with volitile volatile FPGAs on their CPUs so programs could make their own super fast insrtuctions.

I think the internal instructions are already super fast, it's the limitations outside the CPU that are the main bottleneck.
 
Nigel Goodwin said:
I think the internal instructions are already super fast, it's the limitations outside the CPU that are the main bottleneck.
And you'd need an army of algorithm-oriented hardware engineers to design the soft circuits. THey only really do that for military-type things where it's needed. No regular person needs that much parallel processing or feed through.
 
I'm struggling to understand the sort of application for which an FPGA is used whereas I can see lots of uses for microcontrollers - this probably reflects my background as a software rather than a hardware person.

Can someone give me an example of the sort of thing FPGAs are used for, please? Are there any feasible uses in a "hobbyist" environment?
 
Anything which requires silly amounts of speed!, a common use is in a homemade PC oscilloscope, where an FPGA can be used for transferring readings from a high speed DAC to fast memory, MUCH faster than a processor can. You can then read the data out of the memory and transfer it to the PC via serial or USB etc.

There are various examples of this on the net, often as university projects.
 
as stated "silly amounts of speed"

in a uP you would have a single ALU so if you wanted to multiply 9 sets of 2 number together it would have to go through the list one after another.

But what if you needed those number fast? say for a FPGA-implemented current-controller... well you put down 9 multiplier blocks and do those multiplications all at the same time (well in 2 clock-cycles)

Also there is something called deterministic computation which is alot easier to prove with VHDL then it is with C (well thats the arguement I keep hearing from our softy lot)
 
Silly amounts of speed is not always feasible with FPGAs. If your design requires a lot of interconnections, routing the signals can introduce unexpected delays. The number of roadways is limited; and at each crossroad, there can be only one input signal.

Yes, the companies will give you examples of GHz serial communications, but that's only two wires in each direction. Your PCB will limit your speed capacity.

When you want to control several things with precise timing is where FPGAs can shine. No interrupt latencies, no need to piecemeal multibit I/O one-byte-at-a-time. No need to mask bits, no need to OR bytes together. Just control and sense as many signals as you can; with as many counters and state machines as the chip can handle. Your I/O is as wide as the number of available I/O pins.

Design flexibility is another reason for choosing FPGAs. If your requirements change, but your I/O pinout doesn't, then there's no need to create a new board. If your design can benefit from eliminating a CPU, then this flexibility is potentially a winner. If the logic becomes complex enough to be simplified with a CPU, add a CPU "core" to your FPGA design and write firmware for the CPU.
 
Last edited:
David James said:
I'm struggling to understand the sort of application for which an FPGA is used whereas I can see lots of uses for microcontrollers - this probably reflects my background as a software rather than a hardware person.

Can someone give me an example of the sort of thing FPGAs are used for, please? Are there any feasible uses in a "hobbyist" environment?
-Have you seen the cost of an FPGA?
-How difficult they are to mounting?
-How much more people know C than VHDL or Verilog?
-How many more people who are familiar with algorithms are software engineers rather than hardware engineers?
 
TV Standards Converter

David James said:
I'm struggling to understand the sort of application for which an FPGA is used .....

Can someone give me an example of the sort of thing FPGAs are used for, please? Are there any feasible uses in a "hobbyist" environment?

This **broken link removed** was designed by a vintage TV enthusiast.

It converts modern (525/NTSC or 625/PAL/SECAM) TV signals into historic TV standards (341/405*/441/455/819 line).
It is used by people who restore or maintain vintage TVs.


*Including 405line NTSC color as tested by the BBC in the 1950s. There was also a version made for CBS 405 line field sequencial color.
 
For about $10.00 US you can get a FPGA with about 3000 logic gates and 256 flip-flops. All (most) are surface mount. I hand solder the older style but it is a *****. Do not try the BGA type.

VHDL, Verilog and C are commonly used but you can enter a schematic. I combine schematic and VHDL. Altera and Xilinx have free software. FPGA programming is in-between hard ware and software programming. We often call it firmware. Many of the programmers also do hardware and software.

Speed: I do video processing. Often we are working at speeds that cannot be done with discreet parts.

I have taken large boards full of TTL parts and reduced them to 1 square inch. The speed was very slow. Now there is only one part. We can make changes with out making a new PCB.

My biggest FPGA project used 300,000 logic gates and pages of video RAM. It fit into the palm of your hand.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top