Forum Discussion
Altera_Forum
Honored Contributor
16 years agoVarible clock rate
Hello together I have a verilog-module that is working with an external 25 MHz clock. Now in my application I would like to work with a variable clock rate. Some other logic modules in the FPG...
Altera_Forum
Honored Contributor
16 years agoHi Geri,
for whatever rate value you choose, the final rate will tend to be correct over time despite the irregular nature of enable. This is a matter of accum. resolution and design toloerances but 32 bits is pretty high for most. You can if you wish use a dedicated accum for a given ratio e.g. for 20MHz on 25MHz you have two choices: generic high resolution accum: modulo 2 above then: 20 = 25 * incr/2^32 then incr = 2^32 * 20/25 = 2^32 * 0.80000... option 2: dedicated accum: i.e. incr = 20, accum 0~24 or incr = 4, accum = 0~4 (in effect a divider)