Forum Discussion
Altera_Forum
Honored Contributor
16 years agoGenerating a Sine Wave
Hello Friends, I am a newbie.. hope you dont mind if my query is odd.. i wanted to the know like how can we generate a SINE WAVE.. by writing a verilog or vhdl code. i browsed throug...
Altera_Forum
Honored Contributor
16 years ago1. You can take one onchip memory component and write down hex file to initialize it with values you want or values you have in 'sine.txt'. You can refer to Quartus II handbook on how to initialize onchip memory using hex files.
2. You will not be able to store float values directly in onchip memory so either you can multiply it with some proper value to have rounded integer values or store decimal and fraction parts separately in memory and use it in you application. I am not sure whether this has answer your question or not, but if you can decribe what you want to do with this sine values then may be I can have better answer.