0

In my signal processing class, my professor said using TWO flip flop can avoid metastability. But he didn't explain it well. I wonder if anyone could enlighten me here? Thanks in advance!

GotYaLoot
  • 53
  • 4
  • Adding flip flops in chain don't actually avoid metastability, it just increases MTBF => decreases metastability probability at the output. 'Two Flip-Flops' is just a widely accepted metric for low-medium speed designs. – Mitu Raj Dec 03 '21 at 19:14
  • 1
    "Avoid" doesn't mean "prevent". If you dramatically increase MTBF, that counts as "avoidance". – TimWescott Dec 03 '21 at 19:53

2 Answers2

5

Two flip flops cannot avoid metastability. Not even three or four. But they can make it a lot less likely, much, much less likely.

Once you've reduced the rate that metastable events happen from something observable like a few times a second or once a day, to once in the age of the universe, you can be forgiven for saying that it's 'cured'.

The trick is to wait long enough. You delegate the waiting to a pipeline of DFFs so that you don't have to slow down the system clock. Two in the pipeline is often enough, but sometimes you need three or four to meet a very tough specification.

See this Q/A for more information.

Neil_UK
  • 166,079
  • 3
  • 185
  • 408
-1

Whatever answer it was previously, "TWO flip flop CAN avoid metastability" if the cycle time can meet the setup and hold timing.

The underlying idea is that the first stage may run into metastable state due to the insufficient setup and hold time of the input signal, but the second stage sees the output of the first stage, settles soon enough, before the following cycle comes to the setup time begin, and delays (propagation delay) enough to meet the hold time, thus satisfying both of the setup and hold time. That is where the TWO comes.

A broader and in-depth discussion goes to synchronization, sampling theory, bandwidth, statistics, and etc. This is one example that you can see how far it can go.


Edited.

In the Wikipedia, This is where the metastability came from. This is where metastability in digital logic is discussed.

This one is from academia, that I agree with:

In theory a flip-flop in this quasi-stable state could remain there indefinitely – but in reality it won't. In a practical circuit, cascading two flip-flops practically squares the probability of failure. With two flip-flops, and at reasonable data rates, errors occur millions or even billions of years apart.

jay
  • 3,841
  • 9
  • 24