- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can anyone please give me idea about how to generate sine wave in vhdl.....please
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Search the forum, there's a file hosted somewhere here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think many people will recommend a look up table approach, while others will recommend the Cordic based method. My recommendation is to implement a cordic in rotation mode, and simply feed it a constant X value, and set Y to zero, and make the angle correspond to a frequency that you wish the fundamental output to be. Then you will get both sine and cosine, with no lookup table, and small resource usage. James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi james, first thank you very much for giving reply. actually i already tried with cordic rotation method,,,but i didn't get it may be i think i'm not going with correct path in coding, so that i'm looking towards lookup table method.., i'm very glad to you if you provide me some info on cordic algorithm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
lookup goertlez's algorithm.
Basically: sin(a+b) = sin(a)cos(b) - cos(a)sin(b) sin(a-b) = sin(a)cos(b) + cos(a)sin(b) so: sin(a+b) = 2sin(a)cos(b) - sin(a-b) and you can generate the terms in sequence with a multiply and an add- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you Socrates ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys
I'm working on an audio synthesizer. I used a "case" using exel (for calculate function). you can use matlab too. vhdl code exemple: case nTHETA is --Table (wave) WHEN 1 => SINE_TMP := 32799 ; WHEN 2 => SINE_TMP := 32832 ; WHEN 3 => SINE_TMP := 32865 ; WHEN 4 => SINE_TMP := 32898 ; ... WHEN 6280 => SINE_TMP := 32662 ; WHEN 6281 => SINE_TMP := 32695 ; WHEN 6282 => SINE_TMP := 32728 ; WHEN 6283 => SINE_TMP := 32760 ; WHEN others => SINE_TMP := 0 ; end case;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use google translator to translate italian see delucagiovanni.com/public/phpbb3/viewtopic.php?f=10&t=269
Ciao!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
instead of a laborious case statement, why not use a constant that is set up via a function using the cos/sin function from the math_real library?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- instead of a laborious case statement, why not use a constant that is set up via a function using the cos/sin function from the math_real library? --- Quote End --- simply because they knew that library thank you! i will check now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you very much friends for your great suggestions and for good discussion.....
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page