Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

help for audio codec using VHDL

Altera_Forum
Honored Contributor II
23,839 Views

i am a begineer at using altera DE2 board and VHDL. i have to complete my project with in 10 days time but dont have any idea of where to start and how.. help ......... 

i need to build a duplex audio system that works similar to a phone but here CDMA must be considered.  

first i would like to have some good advice on where to start and how .... on audio CODEC  

any help would be more than appreciated
0 Kudos
72 Replies
Altera_Forum
Honored Contributor II
3,185 Views

Dear Dr.Muthuswamy, 

 

thanks a lot for posting and diskussing your description files. 

It was realy helpfull to me to solve a problem, that i was trying to fix the whole week ;o) 

Im working on my diploma project and this audio-stuff is only needet for testing the SD-RAM-Controller wich my thesis is about. 

I hop its no Problem for You, if i use peaces of Yor I2C-controler for my tests and mention you as an source? 

 

again thanks 0xFF FFFF Thanks for doing what you are doing ;o)
0 Kudos
Altera_Forum
Honored Contributor II
3,184 Views

Hmmm..I followed FvM's suggestions and posted the audio codec on the Altera wiki (quite a while back): 

 

http://www.alterawiki.com/wiki/de1_board 

 

Anyway, now I also added documentation. Thx. 

 

Bart
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

Hi mbharat , 

 

i tried to compile your vhdl files , i think you missed uploading "i2cController" file ?? 

 

Regards,
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

Hello FPGA_guru011, 

 

As I posted earlier, please download the design from the following folder: 

 

http://myweb.msoe.edu/muthuswamy/digitalsystemsdesign/ee3921/audio/vhdl/ 

 

Please make sure to read the documentation. Repost if you have questions. 

 

Bart
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

i executed your code in quartus. But on compiling it says i2c_controller entity is undefined. Wat do i do?

0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

 

--- Quote Start ---  

i executed your code in quartus. But on compiling it says i2c_controller entity is undefined. Wat do i do? 

--- Quote End ---  

 

 

http://myweb.msoe.edu/muthuswamy/digitalsystemsdesign/ee3921/audio/vhdl/ 

 

Bart
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

 

--- Quote Start ---  

thank you again i have now been able to configure the mic in line in and out ............. sorry to bother you again but i want another help how do i use the data of mic in.......... in your program i can use ta line in data but how to use the mic in data??? 

--- Quote End ---  

 

 

Hey bhatta, 

 

Can you please share with me how you were able to read in the data from the mic? 

 

Thanks
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

 

--- Quote Start ---  

i am a begineer at using altera DE2 board and VHDL. i have to complete my project with in 10 days time but dont have any idea of where to start and how.. help ......... 

i need to build a duplex audio system that works similar to a phone but here CDMA must be considered.  

first i would like to have some good advice on where to start and how .... on audio CODEC  

any help would be more than appreciated 

--- Quote End ---  

 

 

 

Hi, 

 

I'm trying to configure WM8731 Codec on DE2 board as an ADC too. But i have no idea how the whole thing works. I'd like to pump in music through WM8731 Codec, and pass the music signal to FPGA (I have designed a LPF and program in cyclone II), then obtain the filtered music signal through WM8731 Codec again. The purpose that using WM8731 Codec is just to demo the audio signal filtering process in real time. I'd like to disable the filtering function that provided by WM8731 Codec. Other than configuring WM8731 Codec, i will need another file for configuring i2c so that WM8731 Codec can communicate with FPGA (cyclone II) ? Am i rite?  

 

Please guide me through this. If possible, i'd like to have a copy of codes as reference. I'm just a beginner. Your help will be appreciated :)
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

I cannot reach  

 

myweb.msoe.edu/muthuswamy/Dig...21/audio/VHDL/ 

 

Is it possible you post the Zip file here :)
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

I am almost done moving the website over but I already posted the .zip in the forums. Search for it and you will be able to find it. Good luck. 

 

Bart
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

 

--- Quote Start ---  

I have attached a few pieces of my hardware description in VHDL. Note that is for the Wolfson WM8731 on the DE1 board. But the DE2 has the same chip so the attached hardware description should work with the appropriate pin assignment modifications. 

 

Note that I could not upload clockBuffer.vhd because of the 5 file limit. BUT you should be able to easily create the clockBuffer using the MegaIP wizard. Also I do not claim my code is the best (especially the i2c part) but it does the job. 

 

You should go through the code and understand how it works. Honestly, if you are a beginner with VHDL and DE2, it may be very difficult to finish this project in 10 days (unless you have previous hardware design experience). 

 

Good luck. 

 

Bart 

--- Quote End ---  

 

 

 

i already run the file that u upload...but the coding have error after compilation. 

the error's message: 

[Error: Node instance "i2cController" instantiates undefined entity "i2c_controller"] 

 

mbharat, could you pls help me to fixed this error. 

 

tq
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

plsss help me.... 

 

i still can't fixed the same error 

Error: Node instance "i2cController" instantiates undefined entity "i2c_controller" 

 

i run the coding that uploaded by mbharat using Quartus II 9.1sp2 web edition.  

 

pls help me coz i need to complete my mini project by next 2 weeks....
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

yes, a have looked at that link (opencores.org)...but i didn't find anything that will help me in order to fixed that error.... 

i need to fixed that error because my project is related to the coding that was uploaded by mbharat.... 

anyone here, plsssss help me....really mean it.
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

The entity "i2c_controller" is probably defined in a different file. Try to look up for the file that defines it, and check that it is included in your Quartus project. If not, include it.

0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

 

--- Quote Start ---  

The entity "i2c_controller" is probably defined in a different file. Try to look up for the file that defines it, and check that it is included in your Quartus project. If not, include it. 

--- Quote End ---  

 

 

Daixiwen, i already put all the file that was uploaded by mbharat in one folder and include the entire file in my Quartus project. But when i compiled it, still have the same error: [Error: Node instance "i2cController" instantiates undefined entity "i2c_controller"]. When i click the error message, it show the error is at this command line: i2cController : i2c_controller port map (i2cClock20KHz,scl,sda,i2cControllerData,reset,i2cRun,done,'0',ack); 

FYI, I used De2 Altera, Cyclone II, device EP2C35F672C6. Daixiwen , mbharat and anyone here please help me. I'm really new for this software and I don't know anything about VHDL Quartus II, I just try my best to complete the task given by lecturer. I'm really sorry for disturbing all of you here. But I really need help to complete my project. Really pls help me.
0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

Which project from the link mbharat put did you use? I had a quick look at "Audio Codec Interface" and I didn't find the line you are referring to.

0 Kudos
Altera_Forum
Honored Contributor II
3,185 Views

Daixiwen, i refer at the 1st page of this thread (help for audio codec using VHDL).  

mbharat have uploaded the entire files.
0 Kudos
Altera_Forum
Honored Contributor II
3,188 Views

@mbharat, im really sorry to disturbing you, 

could u pls help me in order to fixed the error [Error: Node instance "i2cController" instantiates undefined entity "i2c_controller"]. 

seriously i cant fixed that error by referring the link http://www.alterawiki.com/wiki/de1_board

im really sorry to bother u. im really desperate to complete the project. pls
0 Kudos
Altera_Forum
Honored Contributor II
3,188 Views

It looks like the i2c_controller is indeed missing from the files, that's why you can't compile the project. I don't recognise the component ports, it doesn't look like something from opencores but more like a custom component made for the demonstration.

0 Kudos
Altera_Forum
Honored Contributor II
3,188 Views

actually, i want to do a project to produce any funny sound. So, i thought that the file uploaded by @mbharat will help me...  

first of all i need to create sound using vhdl. Then, i can change the sound by manipulating the frequency. But i dnt know how to do. 

i saw the file by mbharat have audio codec, thats why i thought it will help me because im really zero in VHDL Quartus II.. 

tq
0 Kudos
Reply