FPGA - Page 1
Forum section: electronics / projects

author: Strube09
author_rank: Regular Contributor
timestamp: September 30, 2010, 07:13:16 pm
content: Hey everyone,Maybe this is a stupid question but I don't really know much (anything) at all about FPGAs.I know you can configure the logic around whatever your needs are and configure many logic circuits that operate independently of each other all on one chip. Including a soft core processor.But, can you design FPGAs to handle analog too? Mainly can you make a comparator, opamp, DAC and ADC? Or would these have to be external peripherals?Anyone use a Psoc from Cirrus? They look pretty interesting as they can have amps and all sorts of peripherals configured.Thanks,Strube

author: Simon
author_rank: Unknown
timestamp: September 30, 2010, 07:20:21 pm
content: To be honest I don't even know what an FPGA is so your question is valid enough for me

author: David
author_rank: Frequent Contributor
timestamp: September 30, 2010, 07:52:28 pm
content: The simple answer is no, although mixed-signal FPGAs are starting to be released with ADCs etc... You should look at the architecture of an FPGA and you will better understand them. There's lots on the internet, I would recommend looking at manufacturers websites such as Altera, Xilinx, Actel etc..

author: David
author_rank: Frequent Contributor
timestamp: September 30, 2010, 07:55:43 pm
content: Just an addition while we're on the subject: When configuring FPGAs it is important to remember that VHDL/Verilog etc are not programming languages. You are simply describing the operation of the hardware. This is where many people run into problems as they put together some 'code' that just about works without really realising how this is being synthesized into hardware, thus not properly understanding issues such as timing and area optimization.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: September 30, 2010, 10:39:05 pm
content: This producthas been around a while, but not heard much of it recently - probably a bit niche. In practice unless you need something exoti, hanging discrete ADCs/DACs or a small PIC or AVR off the FPGA is the cheapest way to add analogue IO.

author: EEVblog
author_rank: Unknown
timestamp: October 01, 2010, 12:17:48 am
content: The basic answer is no.There are specific niche products that can kinda do this, as Mike pointed out, but FPGA's are essentially digital devices.Those specific niche products are generally speaking, pretty poor performers too.The FPGA industry is starting to realise that people need these dedicated peripheral features, and that FPGA's aren't the be-all-end-all device. Just like you get all manner of peripherals on microcontrollers, likewise we are starting to see more and more "hard silicon" peripherals embedded into FPGA's as well. e.g. high speed serial interfaces, ARM processor cores etc. Analog features like ADC's will be next I'm sure.Dave.

author: EEVblog
author_rank: Unknown
timestamp: October 01, 2010, 12:19:29 am
content: Quote from: David on September 30, 2010, 07:55:43 pmIndeed, and this is what makes FPGA's a real big trap for both old and young players alike.If I has a dollar for every FPGA project I've seen which kinda-sort works, I'd be a rich man!Dave.

author: Zad
author_rank: Super Contributor
timestamp: October 01, 2010, 02:01:11 am
content: I have tried to get "into" FPGAs for a few years now. I have read books and used a dev kit, but I still don't really 'get' the feel of them. I implicitly understand the transistor and gate level, and the principles of chaining them together into module and systems. No problem there. But at this point the manufacturers always seem to want to get too smart and insist on fancy compilers that get more and more abstracted. Just like PC programming languages seem to get more abstract and bloated, so does the FPGA world. They all seem to be trying to out-do each other with their all singing all dancing fancypants dev software, full of buzzwords.I would love to see someone like Microchip do some DIP, SOIC or maybe 64 pin FPGAs, they needn't be mega fast or huge cell count. Just make them fast enough, low power, and cheap enough.

author: joelby
author_rank: Frequent Contributor
timestamp: October 01, 2010, 02:39:04 am
content: Quote from: Zad on October 01, 2010, 02:01:11 amThey're not incredibly cheap (though they're at the cheaper end of things available at the moment) but you can get breadboard-able FPGA modules fromhttp://www.dlpdesign.com/fpga/. If you want to play around with them, I'd probably recommend spending a bit more and getting a 'development board' with switches and LEDs built in. I'm currently using a Digilent Nexys2. Unfortunately, Avnet have discontinued their $49 Spartan-3A board.A CPLD might be a cheaper way to get in to HDL - here's a breadboardable module for $25:http://www.blackboxconsulting.com.au/product-details/cmod.htmlMany FPGA problems involve high speed, large scale integration and signal conversion, so you start to be limited even with a few hundred pins available. There's not much call for leaded packages, which also have issues operating at very high speeds. Consider how the Rigol oscilloscope works - it uses four parallel ADCs (maybe 12 interface pins each?) and a wide memory (40-50 pins?).There are plenty of people using FPGAs to do DAC, especially for VGA output, using resistor dividers. Many high speed devices are pretty much designed to be used with FPGAs, though. The ADC I'm using only has LVDS serial outputs, and I'm not aware of any microcontroller capable of accepting this sort of signal, let alone at the 600 Mbps data rates that even low-end FPGAs will do.

author: djsb
author_rank: Super Contributor
timestamp: October 01, 2010, 11:23:31 am
content: Sorry but I had to mention it.I'm currently using Altiums Nanoboard 3000 with Altium designer. I'm slowly working through the discovery series of tutorials on Altiums website. So far the tutorials have gone without a hitch and I'm pleasantly surprised at how straightforward they are. At this point I may sound like a fanboy but the potential of these boards for learning about FPGA's and getting real work done is exciting.OK, a lot of the under the hood stuff is hidden. But it can be examined if needed and not having to deal with the low level detail is liberating. I've only scratched the surface so far but I hope to learn a lot from using this board.The only problem with the Altium tools is the cost of the software may put some people off. Lots of different options though.I'm not trying to advertise, I'm just a user who is pleasantly surprised.

author: Strube09
author_rank: Regular Contributor
timestamp: October 01, 2010, 12:23:05 pm
content: Thanks for all the replies everyone.This confirms my thoughts.I think my projects are small enough and only worthy of just a simple micro... Think I will stick these for now.

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 01, 2010, 12:40:45 pm
content: May i continue the quest? hope i may. I have another quriosity... is FPGA can be programmed to do some sort of algorithm frequently used in processor based system, such encoding MPEG or JPEG at very fast execution time? or even some complex Compression, Encryption or "Specialized Image Processing" Scheme? Hope somebody care to reply.

author: Neilm
author_rank: Super Contributor
timestamp: October 01, 2010, 03:38:50 pm
content: Simple answer is yes.I went for a job interview some time ago where they used an FPGA to do image recognition. It had to identify a grain of rice as it fell over a fall. If the grain was too discoloured it had to identify it and activate a small air jet to blow it into the reject chute.Neil

author: Zad
author_rank: Super Contributor
timestamp: October 01, 2010, 03:57:06 pm
content: Compression, encryption and real time image processing is exactly what they are good at.The "long tail" seems to be a market area that the FPGA companies are very bad at covering. They are all racing to be the new multi-GHz Intel/AMD, forgetting that a huge amount of money is to be made in the 8/16 bit areas.

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 04:01:39 pm
content: indeed there are applications like the world community grid programme that thrive on small bit but highly paralleled processors (there is a PC version and a version that runs on video card processors and easily matches if not outperforms CPU's), the multi-core 64 bit processors are not the be all end all infact they need yet more resources to do even a 16 bit calculation as they still have to do it in 64 bit

author: joelby
author_rank: Frequent Contributor
timestamp: October 22, 2010, 05:50:27 am
content: Quote from: Zad on October 01, 2010, 02:01:11 amIn my never-ending quest for cheap FPGA development boards, I found theLatticeXP2, which is currently on special for $29. The caveat is that the programming cable needs a parallel port, and the USB cable costs.. wait for it.. $149.If you still have such a port, it looks like it'd be okay for smaller projects or for learning. The only problem may be that the next step up, the LatticeXP2 Standard Evaluation Board, costs $695. It seems like there are fewer third-party companies making development boards based on Lattice parts, and there are a couple of Xilinx Spartan 6 boards in the $200+ range that would be much more capable, so there's some risk of lock-in if you don't write portable code.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2010, 07:52:20 am
content: Quote from: joelby on October 22, 2010, 05:50:27 amIt might work with a parallel to USB converter cable which can be picked up cheaply off ebay.

author: joelby
author_rank: Frequent Contributor
timestamp: October 22, 2010, 07:58:42 am
content: Quote from: Hero999 on October 22, 2010, 07:52:20 amSure, if you ignore the warning on the page I linked to: "Please note that Lattice programming software does not operate with a 3rd party USB to parallel port adapter."I've heard that these (or at least the cheapest variant of these) adaptors implement the bare minimum required to get printers working and don't support more esoteric bit-twiddling, timing-sensitive applications. It'd be worth a try, thoughIncidentally you can get a proper ispdownload cable for $90 on eBay.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2010, 08:51:02 pm
content: I've had problems with those crappy USB cables too. I couldn't get my old Cannon 660 LBP printer to work with one which is why I said IF.

author: Unknown
author_rank: Unknown
timestamp: October 22, 2010, 09:12:49 pm
content: Bit banging tends to work notoriously bad with USB-to-parallel converters, it's either extremely slow or if timing is critical doesn't work at all. And most modern operating systems aren't exactly optimized for real-time control of a parallel port in the first place. I would expect much better luck with a normal printer than a programmer.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 23, 2010, 03:16:45 am
content: Wouldn't it be trivial to use a PIC?

author: joelby
author_rank: Frequent Contributor
timestamp: October 23, 2010, 06:03:40 am
content: Yes and no. You would need to reverse engineer the USB protocol used by the official programmer, which is almost certainly undocumented. If it wasn't compatible, you'd need to write and support your own PC software. After all the time this would take, you might as well have bought the official cable.