FPGA's- id really love an answer to this

wookiebai

New Member
hello

im still building a bit of a project mp3 player
and after extensive research on all the 'other' components (a microcontroller, dram,mp3decoder, dac etc )
im starting to think the whole thing could operate without the main component the FPGA

logic and boolean stuff isnt my forte, so i ask you what practical applications does the fpga bring to a circuit that just moves mp3s from hard drive to Dram then to decoder then dac ???
 
Hmm,

Well there are many FPGA's with enough resources to do exactly that, but be prepared for some serious work.

Simply 'shifting data about' is nothing for an FPGA, and its what their smaller cousins, CPLD's are deisgned for. Also interfacing to a HD. But...the mp3 decoder? I have never attempted to code an mp3 decoder in software so I don't completely understand it. But I do know it requires quite a lot of multiplications, SRAM storage...stuff that is far beyond 'logic and boolean stuff'. (which IS my forte ). People have done it, and given you essentially create hardware from scratch, its wonderfully efficient and extremely quick. (you can parallel tasks, and run them at 200Mhz+). really not for the faint hearted though.

I have no doubt one could have a nice two chip solution, just with an FPGA and DAC, but the costs would soon add up. The FPGA would be a bit pricey for a start.

It sounds like you want to get into FPGA's and programmable logic anyway, so by all means you could incorperate that into your design, perhaps for interfacing to the hard disk, and DRAM (or SRAM which would be easier). Both those tasks are very I/O hungry, and are well suited to small FPGA's, or large CPLD's. But the mp3 decoder? Given the cost, and ease of use, I would strongly recommend a specific MP3 decoder chip for that.

And I 'think' some have built-in DAC's anyway. Either way, the mp3/DAC side of things would be nice and straight forward for you, where-as all the nasty address/data bus handling could be done by the FPGA.

Ok, so to really answer your question...'practical applications of the FPGA' would be:

-A one chip solution for all interfacing needs, negating any logic buffers, latches etc..
-The ability to customize it completely, from scratch.
-No real limit on speed, as if you do it all in parallel, you could shift large chunks of data with only a few clk cycles.
- Many FPGA's have built in SRAM for the user. This can be utilized negating the need for external memory (also speeding things up as well as freeing up I/O's).

If you google 'DIY mp3 player' which I'm sure you have done, you'll see almost all using SDCARDs or flash memory. Which can reach up to 4GB in size, and can be handled by microcontrollers. But....the ones that use 3.5" hard disks tend to be massive. Either using old computer parts, so essentially building a PC that just plays mp3's, or lots and lots of logic to gather data from the hard disk.

Only true DIY one I could find was this:
PJRC High Capacity MP3 Player Circuit Board Project

Microcontorller, RAM (uses SIMM SRAM I believe), and a small xilinx FPGA. As well as an mp3 decoder chip + dac.

With a modern FPGA, you might be able to shrink that chip count to may 3. A microcontorller is always handy though, for control buttons and LCD display, a user interface, but again, that can be handled by the FPGA.

So ultimately, advantages? The ability to build a small, stand-alone hard-disk MP3 player, cheaply, without large PC motherboards. If you don't need to use a HD, them it becomes a whole lot easier.

Blueteeth
 
Oops, totally misread your question lol.

Oh well, many of the points still stand. One-chip solution for what is ultimately a tricky, and I/O heavy task. Interfacing to IDE is beyond a PIC micro, a waste of a large microprocessor, and would take many many individual logic IC's to perform. Natural contender is programmable logic ^^
 
blue teeth

it actually is the PJRC mp3 ive got!
so i have all the parts etc assembled (the decoder seems easy-ish)

but because im new to all this, the FPGA seems excessive to me - but im surely wrong
its already in the circuit but i dont really know why - which is gonna be so much fun come code writing time
what i have taken from your post is the'nasty address stuff' and 'multiplications and SRAM storage' - could make sense

cheers
 
Two major advantages of FPGAs are precision timing and arbitrary parallelism.

Precision timing is nice because you don't need to deal with varying cycle counts of MPU instructions. You just create a counter component to count clock cycles directly. If you need several counters, you can create them - you're not constrained to just a few.

Arbitrary parallelism includes arbitrary data sizes. Counters can be created with as many data bits as needed. They don't need to be multiples of 8 bits. You can build a 19-bit counter if that's what you need.
 
Last edited:

FPGA's are cool. Many people on this forum have said these parts are obsolete, and can be replaced by a PIC. How wrong they are. With a FPGA you can obtain a core design for a MCU written in VHDL, and also have massive I/O to boot, not to mention maintaining timing constraints.
There are web resources for FPGA core designs as well.

OPENCORES.ORG

Design And Reuse, The Web's System-On-Chip Design Resource - IP, Core, System-On-Chip
 
Last edited:
Interfacing to IDE is beyond a PIC micro

Where did you make that up from?, there are many examples on the net of interfacing IDE to PIC's - IDE is fairly 'easy', it's floppy drives which are difficult (and never seen one done yet).

FPGA's are good because they are essentially a hardware solution rather than a software one, so they can be much faster - but both have their place, and many applications of FPGA's have been taken over by PIC's (and others) in more recent times.
 
I agree, but not so sure about "many people".

When you start processing in parallel a CPU does not even come close to what you can do with a FPGA. For this reason they are the method of choice for building LA's and digital scopes.

One of these days I will have to stick my toe in.

3v0

 
3VO, for a software winkidink such as yourself, I think VHDL would come very naturally as it resembles sw.
 
Last edited:
Mikebits, what is a winkidink ? Have I been insulted?

EDIT: There is so much technology at our disposal these days that it makes my head spin. Things that were expensive and difficult not so many years ago has become common place.

So many things... so little time.
 
Last edited:
Ummmm.... no they haven't.

PICs could NEVER take over for FPGAs. Small micros no doubt took over for small PALs and CPLDs, but there is no way they could take over for universal logic with gate counts and speed orders of magnitude greater. Even tiny FPGAs have 10K gate counts.

Even midrange FPGAs can hold an entire PIC, LCD controller, and multiple bus interfaces.

The new FPGAs just being introduced are nonvolatile, 10K gate count, and $0.50 each in large volume with sufficient speed to digital audio processing on the fly.
 
Agreed Ubergeek.

Because FPGA technology is moving so fast these days, much of the information on the internet is already old. Not 'obselete' as FPGA's are still, ultimately, just a large collection of configurable logic cells (look up table based, or macrocell), but since I started working with them about 6 years ago, prices have plummetted, densities have gone through the roof, and power consuption has dropped like a stone.

I tend to work with CPLD's much more than FPGA's, since I can't be bothered to find the config memory required for SRAM based FPGA's. And whilst a PIC obviously has much more memory and arithmetic hardware.. programmable logic, even in its most basic form can be just very quick as a specific task. And 'hard coding' a microprocessor system on chip, with DSP, and any custom interfaces on an FPGA is just a matter of resources.

One caveat about the 'non-volatile' FPGA's: Check out the memory type they use. Altera devices rarely have over 100 reprogramming cycles (including the MAXII's on chip user flash memory). Compared to Xilinx's 10,000, they are less forgiving for educational purposes.

In defence of Nigels statements, I see his point. PIC's/AVR/8-bit controllers can perform many wonderful tasks, and are easier to develop, more reliable, lower power, and cheaper than programmable logic. There are many 'older' apps that once used FPGA's that could now be comfortably handled by PIC's, because microcontrollers have just got 'better'. But at the same time, FPGA's have also increased in complexity, so the tasks they are now suited for are much more complex. Such as 400MB/s viterbi decoders, error correction, software defined radio etc..

But hey, designing systems takes time, knowledge and effort, as well as tools. Which all equates to money. Unless one is designing something for mass production, woud you rather use a $2 PIC and a small FPGA, with a week of software development? Or one large FPGA and a few months writing verilog for your own custom uC embedded in the FPGA? (along with all the expensive support software). Sure, the latter could run 50 times faster, and without the limits of an of the shelf micro, but over kill for many 'standard' applications. It's why if you look in most consumer electronic systems you'll rarely find FPGA's. Sure, they're everywhere in fibre comms, and hardcore DSP situations because of the vast though-put available (clock frequency plus parallelism) but its cheaper and quicker to design a 'system' with a microcontroller, if the micro is capable of that task.

rant over.

Blueteeth
 
That is why I prefer Actel. They have direct flash logic, the flash gates are the logic switches and routing switches there is no need to defend Nigel's points, simply understand that his opinions are based on 5-10yr old knowledge since it takes 5-10yrs before components get into products appearing on his repair bench. I agree that it depends entirely on target market volume. It is quite easy to justify spending $100K to save $1 each in the assembly even for just one 1M unit run. Any other gains are just icing on the cake.

On the other hand, sometimes you want an FPGA because that is the only off the shelf way to do something. I designed a 100MHz timer that used an FPGA for the counter and external ECL to measure 20pS on battery power, but today better FPGAs are available and I could get it all into the FPGA. If I had a micro with 100MHz capture capable counter I would have used it and if I had an FPGA that could be set up as a programmable delay line I would have used it. Now Actel has a part that has PLL, internal memory for the scope FIFO, can be programed with a suitable delay line, and is low enough power.
 
Oo I've been steered away from Actel, purely because in university we dealt with Lattice/Xilinx stuff, so I've built up development tools for those. I am aware that Actel is highly professional, as I seem them used quite often in proper high-end systems. I beileive Xilinx and Altera are aimed far more at the education market, to get peeps 'on board'.

Agreed that ofte an FPGA is the only way to go. As, well, as we've mentioned, its completely customisable, with few limitations. I have never had to design something that requires a large FPGA though (thank god).

I tend to use CPLD's, possibly small FPGA's for the raw logic, such as your counters/ram controllers/LCD controllers etc.. with a micro doing the bulk of the system management. Essentially using the FPGA purely as a custom peripheral, interfaces with SPI/parallel etc.. Antoher exampel is a 200MSPS digital storage scope I'm working on.

And yes, it seems now, I'm starting to require larger/faster chips and so chances are I'll merge the two at some point.

Hmm seems this thread as steered into an avert for FPGA's lol, I hope the OP doesn't mind, and perhaps gain more insight into jsut 'why' the designer of his MP3 player went down that route.

If the OP requires more info on alternatives to FPGA's in hard-disk based mp3 player, I do have some bookmarks that may be useful. Mainly university projects, or little geek rants by fellow techies about trying to get adata too and from a IDE hardisk as cheap as possible.

Blueteeth
 
there is no need to defend Nigel's points, simply understand that his opinions are based on 5-10yr old knowledge since it takes 5-10yrs before components get into products appearing on his repair bench.

No need to defend me at all - I stand by my post, PIC's and other micro-controllers have taken over the role of FPGA's in some applications.

They are cheaper and simpler to use - I also said, which you seemed to ignore, that FPGA's are MUCH faster, where PIC's (or even quad core PC processors) aren't in the same league.

FPGA's were used in a lot of applications where their speed and power weren't needed, and can now be replaced with cheap processors.

And if you think it takes 5-10 years for items to get to repair benches, you're living in cloud cuckoo land!

Off hand I can't even think of a domestic item that uses an FPGA?.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…