Hi,
Quote:
> > I am working on a project that need a clock division in VHDL using
> > Altera Maxplus2, the problem of Maxplus2 is it doesn't support floating
> > point operation. If I want to divide the 80MHz clock to 32 MHz, any
> > idea how to get it done without using real data type?
> What you try to do is a division by 2.5 If you'd draw some waves,
> the answer should becomne clear. I you use two counters, one clocked
> on the falling edge and one clocked on the rising edge, it is
> possible to construct two one bit signals from those that can be
> OR'ed together to give the 32MHz clock. The counters can be
> from 0 to 4 and they give a high signal when they are 0 and 1.
> (R = rising edge, F = falling edge of 80 MHz clock)
> R F R F R F R F R F R F R F
> ------- ------
> | | | Pos clocked signal
> --- -----------
> ------- ----
> | | | Neg clocked signal
> ----- -----------
> ========= ======
> | | | OR'ed result = 32MHz
> === =========
> The thing to worry about is to start both counters at the
> correct moment. The amount of logic is minimal in the
> negedge clock domain, so clock buffering might not be
> needed. Note that this 32MHz signal probably have significant
> jitter.
The jitter is 6.25 ns peak to peak, with a fundamental frequency of 16
MHz.
The whole thing can be done in 6 flip flops, or 7 flip flops if a 50%
duty cycle is needed on the output.
Email for the source code. (Remove the ".hates.spam" part of my email
address first.)
Regards,
Allan.
--
Agilent Technologies Voice: +61 3 9210 5527
Advanced Networks Division Fax: +61 3 9210 5550
347 Burwood Highway Forest Hill 3131 Australia