Re: Thinking out loud about metastability

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Quoted text here. Click to load it

Does this mean that, thanks to routing delay, you could just do a 3
flip-flops in parallel for capturing, voting circuit on the other
side, and not have to worry about it?

Quoted text here. Click to load it


--
Nicholas C. Weaver                                 snipped-for-privacy@cs.berkeley.edu

Re: Thinking out loud about metastability
On Mon, 25 Aug 2003 18:25:30 +0000 (UTC),

Quoted text here. Click to load it

Voting circuits don't work as a metastability cure.  Imagine a
2-out-of-3 circuit that's looking at three flip-flops.  If one FF is
HIGH, another is LOW, and the third is metastable, what's the output
of the voting circuit?

Back in the early 80's, UCSD professor Leonard Marino wrote a paper in
which he very thoroughly analyzed a number of alleged metastability
cures, one of which was the voting circuit.  I can't find my copy of
the paper, but it must have appeared in IEEE Transactions on
Computers.

Bob Perlman
Cambrian Design Works

Re: Thinking out loud about metastability
On Mon, 25 Aug 2003 21:31:53 +0000 (UTC),

Quoted text here. Click to load it

True on both counts.  But how do you do make the output stable?  This
is the point at which folks have tried adding hysteresis, etc.  And
we've all been down that road before, I think.

Bob Perlman
Cambrian Design Works




Re: Thinking out loud about metastability

Quoted text here. Click to load it

I agree.

The odds that one synchronizer  will work without error is always better than
the odds that two synchronizers will work without error.

The voting circuit only works without error
only if two of the three synchronizers work without error.

   -- Mike Treseler


Re: Thinking out loud about metastability
I am embarrassed. I fell into the "fix metastability trap".
To quote a German proverb:
 "Alter schuetzt vor Torheit nicht" (Age is no protection against stupidity).

So, before anybody starts experimenting:
Three or more flip-flops with majority voting are no cure for
metastability, they just protract the agony. And so do all sorts of
other schemes. All of them!
But, as Hal wrote, just waiting helps. And you do not have to wait very
long. Clocking the synchronizer result at 300 MHz into a second
flip-flop gives you the "wrong" result once in a billion years. ( and we
can debate what is actually right or wrong ).
The uncertainty of 0 or 1 is never the issue in metastability ( either
answer is as good as the other), it is the unpredictable timing that is
the bummer. Since that range of unpredictability (is that a word?) is
statistically less than 2 ns for any reasonable probability, we can
ignore metastability in all but the very fastest applications.

But we cannot fix it, not with voting, nor with hysteresis, nor with any
other contraptions.

My thanks to Bob Perlman for kicking me in the shins. It's good to have
friends. :-)
Peter Alfke

Re: Thinking out loud about metastability

Quoted text here. Click to load it

I proposed some time ago that injecting a high frequency signal into the FF
feedback path would limit metastabilty maximum duration.

You drop a pin onto a table now and then it will land perfectly balanced on
its point, how long it stays upright depends on how well it was balanced.

Vibrate the table and it will stay upright for less time.


Re: Thinking out loud about metastability
Quoted text here. Click to load it



I don't think so.

This is another example of a "fix".  They don't work.  The only question
is can you see why they don't work?

In this case, the vibrations will kick some pins that have started to
fall back to the ballancing point.

--
The suespammers.org mail server is located in California.  So are all my
other mailboxes.  Please do not send unsolicited bulk e-mail or unsolicited
We've slightly trimmed the long signature. Click to see the full one.
Re: Thinking out loud about metastability
Well, the "pin is falling over" in 2 ns anyhow, so how fast can you
"shake the table"?
We are not worried about microseconds of metastability anymore...
Peter Alfke

nospam wrote:
Quoted text here. Click to load it

Re: Thinking out loud about metastability
Quoted text here. Click to load it

Question: When a D-type flip-flop is in meta-stability, is it's output
(Q pin) voltage equal to the input (D pin) voltage?

If it's not the same voltage, then a cascaded flip-flop, clocked just
after the first one, would not be in meta-stability! Isn't it?

Luiz Carlos

Re: Thinking out loud about metastability
The output level of a flip-flop during its metastable time is
irrelevant. If it were in the middle ( which it isn't) we could easily
fix this with a zener diode.
The problem is timing. The Q output  can - and will - change to the
opposite state at a totally unpredictable time. That's the problem:
unpredictable timing, not unknown levels.

Cascading flip-flops is the standard remedy, but it introduces latency.

Remember: Metastability causes an extra 3 ns of unpredictable delay once
in a billion years...  Seems to be an affordable risk.

Peter Alfke
=========================
Luiz Carlos wrote:
Quoted text here. Click to load it

Re: Thinking out loud about metastability
Quoted text here. Click to load it

Very well put.  I think it is so well said that it sould be added to the
FPGA FAQ.  There is a comp.arch.fpga FAQ, right?

--

Rick "rickman" Collins

snipped-for-privacy@XYarius.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Thinking out loud about metastability
Thankyou Philip.
But as I said, I don't believe "There is no cure for metastability",
or any other problem. It's just a question of time.

Luiz Carlos.

Re: Thinking out loud about metastability
Quoted text here. Click to load it

Yep, you are right, it is just a matter of time. In this case
it is infinite.

When you do your designs do you

A) Do nothing special for async signals entering a synchronous
   domain, because some day someone will solve this problem.

or

B) Use multistage synchronizers to move signals from one clock
   domain to another, because some day someone will solve this
   problem, but it hasn't happened yet.

or

C) Not sure, because I haven't ever seen this problem.

Quoted text here. Click to load it

Philip



Re: Thinking out loud about metastability
Quoted text here. Click to load it


Actually I use the option B). Sorry if you are disappointed! (You were
sarcastic first!)

But I remember people saying CMOS is slow, copper can't be used as
metal layer, and a better example: "We are reaching the silicon
physical limits"!

This is a kind of religion, I don't believe in "not possible", only in
"I don't know how to do".

Anyway, I don't claim to know everything. If you get more persuasive I
can change my mind.

At last, I really liked your first post, I found it very elucidative
(really, no joke).

Luiz Carlos

Re: Thinking out loud about metastability
Quoted text here. Click to load it

However, there are many thing which are "NOT POSSIBLE" barring a
massive change in our understanding of basic physics and math.

It is not possible to build a perpetual motion machine ("In this house
we obey the laws of thermodynamics!").

It is not possible to measure a particle's position and velocity with
perfect precision (heisenberg uncertanty principle).

It is not possible to have two energetically stable local-minima
without an energetically-stable local maxima between them: a point of
metastibility.
--
Nicholas C. Weaver                                 snipped-for-privacy@cs.berkeley.edu

Re: Thinking out loud about metastability
Quoted text here. Click to load it

This has nothing to do with the problem.  There is nothing you can do
with gates or noise or voltage to solve it.  But to understand that, you
need to go beyond these things and consider the problem from a
theoretical viewpoint.

Take a look at a graph of energy (or voltage) levels of a bi-stable
function.  If you analyze the behavior of varying amount of energy being
applied, you will find that the time it takes to return to one of the
minimum energy level states is indeterminate.  There is nothing you can
do to add gates or noise or voltage, this is a basic property of
bi-stable systems... even quantum mechanical ones!

--

Rick "rickman" Collins

snipped-for-privacy@XYarius.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Thinking out loud about metastability
Quoted text here. Click to load it

Yes, but there are several types of problems.  A few of them
are "well known" to be impossible.  Examples include traveling
faster than light and perpetual motion machines.  I think
metastability is one of these.

Sure, I'll keep an eye open for new results, but I won't waste any
time if I'm working on an engineering problem with current technology
and I will use claims/suggestions of a solution as an idiot filter
unless they are backed up by some amazing evidence.  A usenet post
isn't good enough.  We're talking Nobel Prize class work.

--
The suespammers.org mail server is located in California.  So are all my
other mailboxes.  Please do not send unsolicited bulk e-mail or unsolicited
We've slightly trimmed the long signature. Click to see the full one.
Re: Thinking out loud about metastability
Quoted text here. Click to load it

You can make the capture window small, but there is always a finite
chance that you will capture the metastable point.

Basic calculus:  IF a curve has two local minima (the stable points),
there must be one local maximum (the metastable point) between the
two.  If you happen to capture the input data when it is at the
metastable point, metastability/unstable equilibria happens.

--
Nicholas C. Weaver                                 snipped-for-privacy@cs.berkeley.edu

Re: Thinking out loud about metastability
Luiz,
you need to read up on metastability.
There are things even in physics that have no solution. Perpetual motion
is one. If you want to get philosophical about metastability, read
Heisenberg's Uncertainty papers.

Phil Freidin has described the problem very well. He and I agree 100% on
the problem. But I have made quantitative tests and know the (very low)
probability. Everybody has an opinion, very few have performed measurements...

Peter Alfke
=================================
Luiz Carlos wrote:
Quoted text here. Click to load it

Re: Thinking out loud about metastability

Quoted text here. Click to load it

A metastable failure doesn't require that you land exactly on the
balance point.  There may be only one point that keeps you in the
metastable state forever, but there's a range of points that will
delay FF settling long enough to make your design fail.  The more time
you give the design to settle, the shorter that range of points is.

Accordingly, noise doesn't have to kick the FF to that perfect balance
point.  It need only force you close enough that the FF output
transition is sufficiently delayed to hose over the circuit.

Bob Perlman
Cambrian Design Works


Site Timeline