On 11/12/2012 12:46 PM, Rob Gaddi wrote:
> On Sun, 11 Nov 2012 01:16:57 -0800 (PST)
>
pierpaolo...@gmail.com wrote:
>
>> I have to generate a 78MHz clock (duty cycle 0.5 or 0.7) from a 100MHz base clock (duty cycle 0.5) using VHDL language (so the ratio is 200/156). I know that I can use DCM, PLL or similar, but at this moment (unfortunately) I just can't.
>>
>> Therefore I thought to use (excluding any DCM or PLL) a simple frequency divider, but in this case I also know that the frequency can be divided only by integer numbers (and minimum 2, because I would use counters to do that - and In my case I have to divide the base clock by 1,2820512820512820512820512820513...).
>>
>> So I have no idea how to realize that without using any DCM or other stuff... I thought to divide the 100MHz clock in smaller frequencies (like 50MHz, 25MHz etc.) and adding them (50+25+3 for example), but is this the right way (logically I don't think so)?
>>
>> So, have you some suggests?
>
> You can't do what you're trying to do, or at least not reliably.
I don't agree. You just need to think outside of the box.
> If you were SUPREMELY desperate you could build an NCO to drive a pin
> or two as a poor-man's DAC (you're up above Nyquist, so you'd have to
> be clever here), then use an LC filter to trap 78 MHz, a Schmitt
> trigger to square it back up, then feed it back into the chip.
>
> I feel like we should write this question over the door here: "What is
> it you're actually trying to accomplish that makes you think you need
> _____?"
>
How about of circuit that uses both edges of the 50% duty cycle 100 MHz
clock? That would give you a virtual 200 MHz clock with a resolution of
5 ns. This gives a base error of 22% worse case, not including
propagation deltas in the clock and I/O routing.
This is not an easy circuit to design, but it can be done I think. This
will require a double clocked counter with two registers and two adders.
Think of it as two phased...
The results of the two adders will be logically combined to produce two
phases of the output which would be combined in a DDR type output. If
the DDR output isn't supported, then the two phases would have to be
xored in a single LUT before being output. This should produce a clock
with 5 ns resolution and little edge jitter if manually placed
appropriately.
If this is not clear I can provide some HDL, but that might take a
little time and I don't have much today.
Rick