FPGARelated.com
Forums

Relationship between high and low speed clocks

Started by H. Peter Anvin December 3, 2008
>> Good point, *any* signal from the 25 MHz domain would work, it doesn't need >> to be a free running toggling flop.
>I actually have one handy anyway (part of a counter in the 25 MHz domain.)
FFs are generally plentiful in FPGAs. The routing from where you have a FF over to where you need it may be more valuable than a FF. -- These are my opinions, not necessarily my employer's. I hate spam.
Hal Murray wrote:
>>> Good point, *any* signal from the 25 MHz domain would work, it doesn't need >>> to be a free running toggling flop. > >> I actually have one handy anyway (part of a counter in the 25 MHz domain.) > > FFs are generally plentiful in FPGAs. The routing from where you > have a FF over to where you need it may be more valuable than a FF. >
Yes. Fortunately the compiler takes care of that (it will split and merge identical registers as routing warrants.) I guess one can override that, but that's hard to know without knowing where things end up anyway. -hpa
>>> I actually have one handy anyway (part of a counter in the 25 MHz domain.) >> >> FFs are generally plentiful in FPGAs. The routing from where you >> have a FF over to where you need it may be more valuable than a FF.
>Yes. Fortunately the compiler takes care of that (it will split and >merge identical registers as routing warrants.) I guess one can >override that, but that's hard to know without knowing where things end >up anyway.
If the counter is on the opposite side of the chip from the place where you want your 25/100 logic, you have to route the signal across the chip. What I was trying to suggest is changing the source text to create a new FF in order to avoid that routing. It all depends... I'd probably start with the extra FF just to keep the source code clean. Why add an obscure dependency if you don't need it. -- These are my opinions, not necessarily my employer's. I hate spam.
Hal Murray wrote:
> > If the counter is on the opposite side of the chip from the place > where you want your 25/100 logic, you have to route the signal > across the chip. > > What I was trying to suggest is changing the source text to create > a new FF in order to avoid that routing. > > It all depends... > > I'd probably start with the extra FF just to keep the source code clean. > Why add an obscure dependency if you don't need it. >
My point was mostly that the compiler will treat two FFs with identical clocks and identical inputs as a single FF, and then will split that single FF if warranted. This is actually the right thing for the compiler to do, as it has information the programmer generally does not in this instance. I'll just do in my source what ends up looking cleanest. -hpa