Applications of FPGA - Page 1
Forum section: electronics / general

author: SolarSunrise
author_rank: Regular Contributor
timestamp: February 08, 2014, 08:13:14 pm
content: I've known FPGA for years and I have studied the HDL for quite some time now. However, I did not spend my dough to buy a dev board because I cannot think of a need for it. (Note, I am a hobbyist, not an engineer) Can somebody give me some REAL WORLD applications of FPGA's? Not stuff like "Ohh you can build a computer in FPGA's" or "Ah, it's used in high speed applications and real multitasking applications" but I mean REAL WORLD, give me lots of examples of its usage. Where it is used? Why is it used?Let's clear this up in this thread right here, right now.

author: scientist
author_rank: Frequent Contributor
timestamp: February 08, 2014, 08:42:17 pm
content: It's used in like 90% of all FLIR thermal imagers because it can take in massive amounts of data very rapidly, and with little lag even though there's plenty of multiplication/division to correct all the data. Also, those FPGAs simultaneously run Windows CE while processing the data live in another part of the die so there really isn't any other option... attempting to do this on any old Intel chip would run into bandwidth and power options, and FLIR is too cheap to get ASICs every few years.They're also useful for simulating ASICs and correcting errors -- to simulate, say, your iPhone processor, Apple probably used an FPGA with a few million gates the size of a small cabinet. That is, it literally ran a scaled simulation of every single gate in the ASIC, without physically making the chip.

author: PA0PBZ
author_rank: Super Contributor
timestamp: February 08, 2014, 08:47:51 pm
content: Quote from: scientist on February 08, 2014, 08:42:17 pmYou should watch Mike's teardown again, because I think you missed the ARM processor...

author: scientist
author_rank: Frequent Contributor
timestamp: February 08, 2014, 08:52:33 pm
content: My bad... the FPGA does simultaneously run the LCD, and then take input from the ARM to overlay the GUI, but doesn't run the GUI itself.

author: nctnico
author_rank: Super Contributor
timestamp: February 08, 2014, 09:29:01 pm
content: One of my former employer used FPGAs on their products. They made cards to record calls on digital telephone systems. Each system has it's own proprietary protocol so the hardware needed to support 10's of different systems. The card contained a universal analog front-end and the FPGA took care of decoding the digital signals. Changing a card to a different telephone system was just a matter of different firmware which is very production friendly.

author: deephaven
author_rank: Frequent Contributor
timestamp: February 08, 2014, 09:49:00 pm
content: I've spent most of my life designing electronics for generating video of some description, sometimes characters, sometimes graphics. I used to do it with a board full of TTL logic - counters, gates, roms etc, prototyping by wiring it all up by hand. Now it all fits in an FPGA. Once a PCB layout is done with the FPGA on it, I can radically change the functionality - effectively changing the hardware - just by re-programming the FPGA.

author: SolarSunrise
author_rank: Regular Contributor
timestamp: February 09, 2014, 09:08:11 pm
content: So FPGA's are the "assistants" for the "brain" microprocessors, most of the time.Can anyone offer more examples? Examples are worth 1000 tutorials.

author: deephaven
author_rank: Frequent Contributor
timestamp: February 09, 2014, 10:09:31 pm
content: Quote from: SolarSunrise on February 09, 2014, 09:08:11 pmIf you go on, say, the Altera website and look at their demo boards you will see plenty of examples of how they can be used. I only use Altera FPGA's, but I'm sure other vendors like Xilinx and lattice will have similar offerings.

author: MatCat
author_rank: Frequent Contributor
timestamp: February 09, 2014, 10:13:21 pm
content: Basically anything you want that requires lots of logic gates. I can think of a million uses for an FPGA, but it really all depends on what do you want to do? It's a bit like trying to find an excuse to use it instead of using it because it is the most logical for your need to ask for examples of their uses. Everything from complex parallel IO to intense data processing, it can be what you want it to be.

author: mian2zi3
author_rank: Contributor
timestamp: February 09, 2014, 10:27:48 pm
content: Whenever you need custom logic but the volume doesn't justify the cost of doing an ASIC.Another example is high-speed interfaces that can't handled by a processor. DRAM is a possible example, like interfacing between high-speed ADCs, DRAM and external interfaces in an oscilloscope front end, or sampling, DRAM and external interfaces in a logic analyzer.

author: Oldsirhippy
author_rank: Newbie
timestamp: February 17, 2014, 11:30:23 am
content: @Solarsunrise.I too would like to see a lot more examples of FPGA uses.Examples I have seen include bitcoin mining and emulation of older arcade games - these are rather complex designs.For myself, I am in the process of re-designing a frequency multiplier - it takes a pulse train and multiplies it by 2x up to 256x. A possible use of this is to increase optical encoder resolution - but I have yet to test it for that application.I designed this over 30 years ago using 74 series TTL and it worked fine to increase sampling pulses for a data logging application . The FPGA design means I don't have to re-wire circuits when I want to improve the design. It also means that I can use much higher clock rates which are not available using TTL. I can change the length of the counters simply by changing an integer in VHDL, if I used TTL this small change would take a lot of re-wiring and board space. FPGAs are impressive!I use the Xilinx XCS series - the Papilio design. And program using VHDL, I haven't tried Verilog.It would be great to see other real world FPGA design examples.

author: hans
author_rank: Super Contributor
timestamp: February 17, 2014, 03:34:23 pm
content: Just in test equipment you can find tons of FPGA's. Every cheap Chinese oscilloscope is powered by a collection of FPGA's/CLPD's, from Rigol DS1052E to their latest series 1000Z/2000A, etc. Every USB oscilloscope that's even a bit useable uses a FPGA to sample at high-speed, buffer data, and transfer it over USB.Custom video equipment also use them a lot, like high-speed camera's or multi sensor/spectrum camera's. Although you can maybe (?) bit bang a CMOS sensor at half a decent framerate with a big microcontroller, it doesn't scale that well (what if you want 3 or 5 camera sensors?), arbitrary sensor clock patterns (different type of CCD sensors), or you get non-consumer interfaces (like Camera Link).Also because they are reprogrammable, you can custom tailor applications for specific customers.People also love to make old-school consoles or ROM loaders with FPGA's. I think I saw a guy making a ROM card for a Nintendo 64 (that console is truly old) from a standard micro SD card, that buffers the ROM and acts like it is a classic ROM cassette.

author: marshallh
author_rank: Unknown
timestamp: February 17, 2014, 03:53:38 pm
content: Quote from: Dawgie on February 17, 2014, 11:51:20 amI have a pcb from one of those - It is either from a ptp microwave link or base station of some sort.

author: Kremmen
author_rank: Super Contributor
timestamp: February 17, 2014, 09:51:15 pm
content: Quote from: SolarSunrise on February 09, 2014, 09:08:11 pmOne of my semi-hobby projects was a linear resolver to quadrature encoder. This is used in CNC mill renovations where the control system is expecting a quadrature encoder motion feedback, but the machine is equipped with linear resolvers providing sinusoidal phased signals.The conversion was done using the Angle Tracking Observer algorithm, implemented using fast A/D-converters and Xilinx Spartan 3 and 6 FPGAs. The calculation would be challenging to do with a sequentially programmed MCU, but the parallel logic of an FPGA is very suitable for the application.

author: Rigby
author_rank: Super Contributor
timestamp: February 17, 2014, 10:29:47 pm
content: So FPGAs can be any digital circuit you like, provided the circuit in question can fit in the FPGA. Giant LED matrix controller, for example.One use that interests me greatly is that you can completely re-implement old arcade hardware within an FPGA; one can accept digital input from joysticks and buttons, and drive an arcade monitor, and completely re-implement every bit of hardware in those old games with an FPGA. This is useful, because modern emulation software emulates frame-by-frame, which necessarily creates a one-frame delay between what is happening and what you see, and depending on operating system, the rendering subsystem can add multiple frames of latency. With multiple frames of latency, the feel of those games is lost. FPGAs can solve this cheaply, but there are so very few people interested in doing the work.Anyway, that's two examples.

author: FrankBuss
author_rank: Unknown
timestamp: February 17, 2014, 10:45:12 pm
content: Quote from: Rigby on February 17, 2014, 10:29:47 pmBut there are a fewI started to port an Atari 2600 design to the Turbo Chameleon:https://github.com/FrankBuss/TCA2601Needs still a lot of work, but games are already working. I really like the ability to instantiate just another microprocessor core inside the FPGA if you need it. I did this with a second 6502 for an on screen display I'm planning (using myYaGraphCongraphics coprocessor from the 6502), which overlays the Atari 2600 VGA output and runs in parallel. Later it should access the SD-card to load programs for the main system.For professional work I helped implementing an audio system, where the FPGA was able to decode lots of AES3 digital audio channels, balanced analog inputs (with external ADCs) and de-embed audio from 3G SDI signals. All in parallel and with an arbitrary routing in the FPGA to DSPs, and to analog (with DACs) and AES3 outputs. But there was a microprocessor in the system as well, to run Linux with network, GUI etc. which would be more expensive to implement in a FPGA.

author: hamster_nz
author_rank: Super Contributor
timestamp: February 17, 2014, 10:53:20 pm
content: Most FPGAs have some pretty impressive DSP capability.For under $80 you can get 16 DSP blocks which can run at more than 300MHz - about 5G MACs (Multiply Accumulate per second) - for US$500 you can Zedboard with peak of 276 GMACs.I'm using a single DSP block to implement upto a 997 point symetrical FIR filters for each channel of a 24-bit / 48kHz audio pipeline, and using only a 48Mhz system clock!

author: BravoV
author_rank: Super Contributor
timestamp: February 18, 2014, 04:02:18 am
content: Storage raid controller, for example LSI products, they use PFGA a lot, even for low end models.

author: Tabs
author_rank: Regular Contributor
timestamp: February 19, 2014, 02:27:55 am
content: Hi all,Apologies if this post is too basic, but I thought it may be good to start from the beginning and put some context behind what FPGAs are, why and where we use them and what we use them for.There are two performance extremes when it comes to performing analog & digital signal/data processing.At the low end of the scale (comparatively) are the microprocessors. These are the Intel/AMD/ARM chips you use in your computer. I'm also putting microcontrollers (ATMEL, PIC, ARM, 8051 etc) in this category. They tend to be limited to digital data processing only (although some MCUs will have ADCs and DACs)These things can be programmed to leverage their internal resources (ALU, mem, data transfer etc) in any generic way in order to accomplish a very wide variety of tasks.This can include, spreadsheets (or any office type stuff), complex number crunching (3D simulations/rendering in media eg video/graphics or engineering eg EMC, stress/strain) and general browsing and time wasting. That's whats so good about them. They can do all these tasks and, most importantly, they can do them at the same time (managed by the kernel of course). They are the jack of all trades, master of none. They prefer 'thinking' and 'managing' over 'doing'.If you asked these devices to do something ridiculously complex (compared to what they are capable of) they will still complete the task. Its just that they will take such a long time and consume so much power that they are either not cost effective or too slow and the window for when the result is required has passed. This is the penalty you pay for having a device that can do a wide variety of different tasks (I think this is called in-homogeneous computing).This is where ASICs come in. These devices are essentially an entire analog/digital circuit board crammed into a silicon chip. When you think of ASICs think 'money is no object', 'performance is king' (performance = power or throughput or robustness or ... whatever parameter you care about). They are 'processors' (analog and/or digital) that are hard coded (instead of programmed) to do one specific task and only that task. They are effectively the master at that particular task. Because of this, they can vastly outperform any other generic processor (intels, arms etc). If you ever ask these guys to do anything else, then all that processing power crumbles into nothingness. Infact, you cant ask these devices to do anything else. The ASIC design (or program) is etched into the silicon wafer using the same technique used to create the intel processors. Once they are 'burned' that's it. They like 'doing' rather than 'thinking' (although some ASICs can have processor cores inside them for 'thinking')FPGAs are the middle ground. They can be programmed to do one dedicated task one day, and another different dedicated task the other day. In the past they were more biased towards the microprocessor class of devices because they didnt do analog. You would read paragraphs like:"If you take the entire subject of electronics engineering (not electrical engineering eg power plants & distribution) and subtract linear amplifiers, mixers and the line-level part of analog communication such as RS485, 232 etc then you are left with digital electronics, most of which can be implemented in an FPGA"Now, FPGAs are being released with analog parts built in such as ADCs.FPGAs have become so incredibly fast and large that most modern electronics of reasonable complexity will contain an FPGA. In nearly all cases they have overtaken digital only ASICs because they are infinitely more flexible at much reduced cost (both in product development time and to purchase). Most digital only ASICs are developed on FPGA and then once proved and, if justified, transferred to ASIC through whats called the 'HardCopy' route. This is essentially a hard coded FPGA. Altera (or whoever) takes your design file and converts it into a mask for the lithography process and essentially creates a custom hardcoded FPGA for you.You better be prepared to bend over and pull your pants down though.ASICs are only ever made when there's serious volumes behind the product or if you need mixed mode (analog and digital) circuitry. They are used in aviation and defense applications because of their superior robustness against radiation (rad-hard ASICs) and because silicon structures are usually bigger than most commercial CPUs. This lets the silicon structures survive longer against neutron damage.If your working on a project which needs an FPGA, your job is basically to get the FPGA as close as possible to the front of the signal chain. Modern ADCs/DACs + FPGA designs have pushed the 'rf' domain out into the multiple GHz to 10s of GHz area.When i say 'thinking' what I really mean is doing conditional execution eg 'if ... then... else if ....' type statements.In an FPGA you are dedicating hardware to do an instruction. Imagine you are adding up two 18bit numbers in three different locations. The HDL synthesizer will create three 18bit adders for you. In a CPU the instructions would be queued as part of the feth-execute cycle. The two 18bit numbers would be sent to 1 adder (in the ALU) to be summed and this would happen three times in the sequence the add instruction appears in the code. In the FPGA the three adders would execute at the same time (in parallel) every clock cycle. This gives them a huge throughput compared to intel chips doing the same task. Imagine this with huge data sets.If you dedicate hardware to 'thinking' eg an 'if' statement then you're basically killing your parallel execution. You're basically saying the 'if' hardware will run 50% of the time and the 'else if' will run the other 50%. Do this in many places and you're turning the your expensive FPGA into a crappy microprocessor that can be beaten by a proper intel or arm chip.In the real world, its difficult to make useful product that doesn't have some sort of intelligence behind the raw grunt of signal/data processing. The intelligence comes from conditional execution which is best performed by a microprocessor. If you have electronic equipment that feels laggy or slow to respond then its because the CPU is doing too many other things.This brings us to when you would use an FPGA.FPGAs are used whenever you need to do a dedicated task faster than a microprocessor or if you want to offload the heavy lifting from your poor little micro (ARMs , Intels) and let it have the time to 'think'. In this way FPGAs are treated as co-processors or hardware accelerators for the 'main' cpu.Examples are:main CPU tells the FPGA to process data from an ADC, display it on the screen whilst copying it to memory. The main cpu is then free to do pattern matching on the data in memory, look for peaks etc. This could be a scope which triggers off a specific data pattern and shows the corresponding peak value of a signal on the screen.My little arduino might run out of grunt when its talking to loads of peripherals over SPI. it could have 1 SPI link to an FPGA which talks to all the peripherals on behalf of my arduino. It would collect the data and send it to the arduino in slow time.My satellite TV box may have an FPGA which decrypts the channel and displays the image.My wireless router may have an FPGA processing 5x1gbps ethernet channels.HD Video cameras may use them to encode the data into MPEG or whateverThere are SDRs. Mobile phone base stations are transitioning to SDR FPGAs instead of ASICs because their cheaper to upgrade when new standards come out.When you get a CAT scan at the hospital, or ultrasound or .... its all processed by FPGAs (probably)When I dont have the space for CPU + FPGA i will get a softcore (CPU inside an FPGA).With a PSU+Sensor+ADCs/DACs+FPGA+Memory+Display you can pretty much replicate the functionality of any electronic product out there.Long live FPGAsTabs

author: TNb
author_rank: Regular Contributor
timestamp: February 20, 2014, 03:22:25 pm
content: Actel FPGAs are used in planes and in spacecrafts, because they are radiation-tolerant.Also Xilinx radiation-tolerant Virtex are used on Mars rovers, isn't that cool?

author: jeremy
author_rank: Super Contributor
timestamp: February 21, 2014, 11:24:30 am
content: Off the top of my head:Very, very high volume networking. Often the task of packet sorting/queuing is offloaded to fast FPGAs as it can be done in parallel. Easy to upgrade for new spec changes or bugfixes, just send a new bitstream.Very fast communications (10GBit ethernet, 100GBit ethernet, etc). The protocols are not mature enough or volume not high enough to justify mass production of ASICs. Although this is starting to be less and less true.Medical Imaging systems (Ultrasound, MR, XRay, PET, etc). I'm pretty sure they are used to do dynamic focusing by controlling transducer pulse timing and those sorts of things in ultrasound, as well as forming part of time-gain-control circuits (gain that varies periodically). Particularly in computed tomography (CT) applications, there is a lot of parallelizable maths to get done in a very short amount of time => parallel in an FPGA. Not worth it to make an ASIC as techniques and tuning methods change relatively often.Digital correlators - often implemented on FPGAs when there are large numbers of photodetectors; this is a particular kind of signal processing is common in spectroscopy equipment.Image sensors/microbolometer arrays aka FLIR - What is very important about the FLIR case is that they need to do spatial (across pixels) and temporal (across time) filtering simultaneously, so this is perfect for pipelining. You can also use the reprogrammability of the chips to provide better filtering systems as the detectors are put to the test by customers.Motion planning (see the SmoothStepper as an example) and servo control (Gecko Drive G320x)Universal programmers.Mod chips for gaming consoles.High frequency trading. Having FPGAs calculate and execute share trades on the order of nanoseconds. Lots of money in this!Real-time Kalman filters (any sort of real-time DSP magic I guess!) for sensor fusion. Used a lot in robotics and high frequency trading.Bonus: I once saw a talk by a guy who spread out FPGAs in a wireless mesh network all through a pretend village. Each of the FPGAs had extremely accurate synchronised clocks and several microphones. When a gunshot was fired, the FPGAs all 'discussed' their measurements and were able to triangulate the gunshot in three dimensions while cancelling out echoes, and determine what sort of gun fired the round. This was all in about one second.

author: diyaudio
author_rank: Frequent Contributor
timestamp: February 21, 2014, 04:01:23 pm
content: Quote from: Tabs on February 19, 2014, 02:27:55 am@TabsThanks for the detailed explanation cleared "some" mist around FPGAs for me.

author: miguelvp
author_rank: Super Contributor
timestamp: February 24, 2014, 01:05:00 am
content: FPGAs can be used to replace boards that are no longer available as long as you know how they worked.Others mentioned they can be used to do full arcade systems, but they also can be used to repair old arcade systems that are missing a board and you have the full diagram for it.You can use FPGAs for parallel computing too, Altera just came up with a somewhat simplistic approach to optimize computation by not adjusting the floating point back after operations, so since you can extend the mantissa all you want in the fpga, you can keep on computing and just convert back when you are done computing. Makes it a very mean floating point processing beast.Since you can do that, you can do very fast DSP's on it, image processing computer vision, physics, particle simulations, well everything really, provided you have enough gates. Also all this at a low power cost compared to say GPUs.You can also use it to say, unpopulate a phone's SoC and replace it with the fpga and you have all those peripherals for your use.You can use it for packet capture and analysis. Make an awesome logic analyzer, drive an LCD directly. You could use it for biometric signatures, well, really you can use them for anything!You can make your on Codecs for some weird audio/video format you been thinking about. You can experiment with microprocessor designs to see if your crazy prefetch schema will actually be faster than what is out there.Home automation also comes to mind, doing your own network protocols at the Hardware Layer.Of course once you have any of this done, you can always go to ASIC and gain on performance and power consumption (at a cost of building the chip)But the most important part of FPGAs is that you can use them to blink LEDs.

author: Dago
author_rank: Frequent Contributor
timestamp: February 24, 2014, 07:04:43 am
content: Quote from: miguelvp on February 24, 2014, 01:05:00 amAnd the best part is when you get to make such an LED blinker at work (like I'm currently working on)

author: Berni
author_rank: Super Contributor
timestamp: March 14, 2014, 08:26:06 am
content: There are also some nice DIY uses for FPGAs as they are essentially the poor mans digital ASIC.Sometimes you might want to interface a obscure interface that's not found as a peripheral on MCUs or has data going trough it too fast for the CPU to handle. For example a lot of people wanted to use laptop LCD screens for stuff, but they have a really high speed LVDS bus and you can use a FPGA to translate a VGA or HDMI signal in to the right LVDS signals or act as some sort of 'graphics card' for a smaller MCU to allow it to draw on the screen, or perhaps draw an GUI overlay over the top of a VGA signal.You can also use them to pretend to be a chip like make the FPGA pretend it is a NAND flash chip and use a few MB of DDR2 ram as the actual memory and you could then watch the host device read locations while you modify them on the fly. Similar if you want to hack some authentication card or dongle you could use a FPGA in between to look at and on the fly modify data that's going to and from it in order to reverse engineer the protocol. Especially useful when the protocol is very obscure and/or high speed.You see the potential of FPGAs a lot more if you did a lot of MCU programming, there are some things that a simply MCU cannot do but a FPGA can do almost anything within reason.