Forum Discussion
Altera_Forum
Honored Contributor
17 years agoReal numbers require a decimal point, so 425e0 is not a valid real number, but 425.0 will work.
It is true that if you have a system clock of 50MHz and wish to produce a tone of 425Hz, the MIF can get large. On the other hand, you can throttle the generation of the tone using the enable strobe to manage the size of the ROM generated. The sample frequency then becomes the rate at which the enable line is strobed while the tone value stays the same. While the original question was to be able to generate a single tone, it is true the Altera NCO can produce a variety of tones based on the tuning word. If tuning is something that is required, I'd recommend reading up on cordics (http://en.wikipedia.org/wiki/cordic).