Audio project with an FPGA?

This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I'm a third year student in electrical engineering and in one of my class we have to design something with an FPGA (from altera).
'For your term project you are to choose an interesting digital system, design the system in VHDL, synthesize it for the Altera family of FPGAs and gather statistics. Your project should use between 5,000 to 200,000 logic gates and can use multiple FPGAs.

I don't really know what can be done with FPGAs but I'd like to do something related to audio. I know groups from past years designed an mp3 decoder. This would have been interesting a couple of years ago but now I think it is over-used.
Any ideas are really welcome Btw, this is for a 3 credit class so it is not an 'End of degree project'.
Thanks a lot

Here are some proposed subject by the instructor...they don't look really attractive to me!!

1.. Error detecting-correcting modules. Some of the more advanced n-out-of-m error correcting codes (other than the Hamming codes) would be
very interesting topics.

2.. Various communication network protocols including ATM, SONET, Ethernet, FDDI, DBDQ, IBM token ring, high speed serial links or any recent development.

3.. Digital neural networks and fuzzy logic systems to recognize patterns or perform processing.

4.. A digital system including MPEG, JPEG, speech/image or video
compression and decompression systems, etc. Voice sub-band coding is one example; it can compress a 64 Kbit/s voice stream to about 8Kbit/s.

5.. RISC CPU, DSP and computer subsystems, for example, cache controller, schedulers, PCI bus interface.

6.. A hardware encryption/decryption units. The RSA, PGP, and DES algorithms are currently among the most popular.

7.. Fast designs for performing computer arithmetic algorithms, i.e., multiplication, division, square roots etc., including transform function such as FFT, DCT, and Hadamard Transform.

8.. Image processing systems: hardware to perform image manipulations, i.e. moving the view to the left or right, zooming in or out, rendering, hidden line removal, etc. The fields of computer graphics or Virtual Reality are full of interesting things to do with images.

10.. You can also construct smaller sub-systems of a larger system. For example, MPEG and JPEG compression systems often use 8x8 Discrete Cosine Transforms. You could just implement the DCT, which is a sub-system of the MPEG/JPEG systems.

11.. FPGAs have been proposed for use in DNA pattern matchers, where they apparently outperform supercomputers. They have been proposed in Nuclear Magnetic Resonance (NMR) medical machines, where they perform digital signal processing to create a 3D image of the human brain.
You lucky bastard :) I'd love to get an assignment like that (although, I might yet, next year).

I'd go for some sort of dedicated CPU - maybe on a chip, maybe a PCI bus monitor, maybe a web server, NAT on a chip... cache controller would be a lot of fun, too.

Right, right, you want audio. Umm...
FFT/spectrum analyser?
Audio processor?
Audio encrypter?
S/PDIF decoder?
Arbitrary function generator?
Sound recorder (including compression)?

(tee hee... I can't wait until 4th year!)
Retired diyAudio Moderator
Joined 2002
If you want a fairly easy project for a sound recorder, interface one of these chips with the fpga:

voice recorder chips

They make it real easy to record sound.

An externally hosted image should be here but it was not working when we last tested it.

In my ece4894, another group created a project with this. It didn't use a FPGA, but it might provide some kind of idea.

project page

Retired diyAudio Moderator
Joined 2002
yeah, I am co-oping this semester, and the company that I am working for does processor design using fpgas. The fpga that they mainly use has the altera apex 20ke chip with 600,000 gates. It works great.

I personally just picked up the altera up1 board with the flex 10k20 chip with 20,000 gates on it, and it has worked for the small projects that I needed to do. It only cost $90 from altera if you were a student (might be a georgia tech discount in there). They also now have a up1x board, which has 70,000 gates, which costs a little more.

Here is a page with good examples and basic projects.

The vga code there works great, and I have used it for some projects.

I checked the order form, and they are charging $149 for the up1 and $199 for the up1x. Here is the order form:

Altera order form (pdf)

Thanks for your inputs everyone!
A lot of people proposed a FFT spectrum analyser. I just don't fully understand what could be done with an FPGA in that case...what could the final output product do and how would it compare to commercial one?
I'd like to do something usefull...or something that I could reuse as part of another project later on.

Thanks a lot
You can make a PCM -> PDM/PWM convertor. It can be used as the front-end of a digital amp. With all those extra gates, I bet you could do some oversampling as well. 64x oversampling of CD could give you a DSD signal, same as they use in SACD.

Wow WON I think you just won (no pun intended) the grand prize!
I was thinking about building a digital amplifier for my project lab next year...I could start with the PCM -> PDM/PWM convertor and build the remaining parts next year.
Do you know where I could start looking for information about this? I am really impressed by the TacT Audio Millenium amplifier
They say that their design uses 'revolutionary, exclusive, proprietary PCM-to-PWM EQUIBIT technology. EQUIBIT simplifies the signal path from the digital signal source to the speakers. A unique digital processor circuit controls the power output devices directly using digital pulses. '

Do you think that the fpga would be large/powerfull enough to do the same thing?

Thanks a lot
Yeah, I suppose I knew it was a good idea because I had it in my head for like a year now... :) Glad that someone's going to try...just promise to post the Verilog code when you're done!

Yeah, I knew about the TacT audio amps. I remember reading that the first versions used several DSPs, but that their new designs were implemented on a single FPGA. This doesn't mean that they implemented several DSPs on that FPGA -- reconfigurable logic has the interesting benefit that the computational granularity (in both time and space) can be adjusted for your problem. Oftentimes, you can achieve a far greater computational density with an FPGA compared to CPUs/DSPs, and I think this case is a perfect example. You can build a deeply pipelined execution unit that narrows from a CDs standard 16 bits (or 20 or whatever...) to the 1 bit output without wasting many LUTs. Think about how inefficiently a DSP (with a minimum word size of 16 or 32 bits) would perform this. You'd probably have enough gates leftover to do random control.

A good link for the signal processing aspect:

In short, I think that this is very do-able project, especially if you have help from here. Have fun!

Ok I'm into it...but I have very thin knowledge of digital audio principles. I guess the input would be in SPDIF format (from the cd digital output). First, this should be properly received and decoded. Then, I suppose that a lot of work/analysis should be done on the signal to convert it to PWM - which I don't really fully understand...
I'm sure this is do-able but I would need to do some reading...but I don't know where to start.

Do you know any good reliable source of information about all this stuff? books, websites, magazines?

The class starts only in May so I have time to dig this up.

Thanks a lot

Ok I've been reading all week long on the subject with my partners (pcm/pwm converter).
We came to the conclusion that it is almost impossible to do...Theory behing this is really complex if you don't want to have a lot of distortion/noise. The only info available is some phd thesis we found...and you all know like me that phd guys don't give you the answers right away!!

If anyone has something to say to make us change our minds please post it here...this was a fantastic project, but maybe not do-able

easy answer

I know a project that would be killer . I have considered doing this one myself, but it would take too much of my spare time.

Create a realtime Ogg Vorbis decoder. To my knowledge, the C source still uses floating point, but it could be converted to fixed point if you work at it. I have even heard rumors that someone is working on a fixed point version. Check out the mailing lists for more information. Additionally, this project has the benefit of experts available to you, via email, who can answer just about any question you could possibly conceive.

An interesting note as well: the man who began this codec, Monty, has to be one of the most brilliant people in Open Source to date. He single handedly invented an audio codec that :
  1. Beats the crap out of mp3 (at half the bitrate)
  2. Written in his spare time
  3. The result of no formal audio instruction (self taught)
  4. Written without corporate funds
  5. Written in a fraction of the time Fraunhofer AG took to invent mp3
  6. Written without using any currently patented algorithms (royalty free)
  7. Supports features mp3 does not, such as arbitrary channel counts

    Not bad for a twenty something, eh? :D
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.