Forum Discussion
Altera_Forum
Honored Contributor
17 years agoyou also need to enter the freq_sample as your clock's actual frequency.
However although this code is well written it fails at some values... Moreover I am not sure if it gives phase continuity correctly. It is also rigid and may be good for one particular frequency but could result in very large memory especially for small values of tone relative to clock. You better use Altera NCO compiler. This is more versatile and can generate any frequency less than clk/2 including very very fine steps by simply changing the tuning word value. kaz