Rob Gaddi <rga...@technologyhighland.invalid> wrote:
> On Thu, 24 May 2012 14:24:53 +0000 (UTC)
(snip, I wrote)
>> Given that it is an AND of done bits, in the usual case each
>> one transitions from 0 to 1 until all are 1.
> That's exactly right, and I feel silly for not having mentioned
> it out front. The assertion of all_done, shifted onto a different
> clock domain, is what goes back around and asynchronously
> clears all of the individual done flags.
You mean a register between all_done and when it goes back around?
I would call it asynchronous if there wasn't a register there.
> All of you stop wincing; I know exactly how bad that sounds and I
> swear to god there are reasons it had to be this way.
If there is a zero hold time register (And even if not, the 0
signal won't make it back fast enough to cause problems.)
then that is fine. If there is no register around the loop,
then it takes somewhat more analysis.
> So the only possible modes of operation are:
> all_done is low, and all I want is for it to never erroneously
> transition high until all 24 done flags come up. Once it's up it
> stays up.
You don't say about any possibly glitches on inputs to the AND.
> all_done has been high, causing a 20 ns asynchronous clear pulse to
> hit all the done flags, dropping them all. In this case, all_done
> should drop once and only once as the various path skews from the
> pulse to the clear to the AND gate structure all work themselves out.
The only way you could know the pulse was 20ns is coming from a FF
clocked at 50MHz, so I will assume that. In that case, you only have
to worry about glitches that last longer than 20ns. That is, after
all_done has been latched, could it glitch low 20ns later. The AND
gate shouldn't do that itself, but if its inputs can, that could
still be a problem. But 20ns is pretty long, so you should be able
to prove that can't happen.
> The reason I'm concerned about glitches is, because all_done is sampled
> asynchronously to it's originating clock, a glitch could happen to get
> captured, with some unknown but small probability. The reason I can't
> just test it out is the same: given that if a glitch exists there's
> only a small probability of capturing it, I might test a given
> sequence 10,000 times without catching a glitch that I would have seen
> on the 10,001st.
There is another problem not discussed yet: metastability.
Metastability is completely separate from race conditions, but
people sometimes get the two confused. You need to separately
show that metatability isn't a problem.
I am still not sure where the registers are, so I won't try to
say more about metastability.
Also, if there is no register around the loop (which seems
unlikely mentioning clock domains) then it takes different
treatment.
-- glen