The RAMblings by James Trimble

All issues

The RAMblings: Metastability

I hope you all enjoyed learning about the Williams tube last week. This week I want to build the foundation for some interesting discussions on clocks, so today I'm going to introduce the concept of metastability.


As you probably know, in digital logic we have a setup time requirement. The setup time is a period of time before the active clock edge during which our inputs need to be held constant. But what happens if we don't do that?


Enter metastability. The definition of metastability is "the ability of a digital electronic system to persist for an unbounded time in an unstable equilibrium or metastable state."


Metastability can lead to digital outputs having some unknown voltage until the metastability eventually resolves. You can think of the stable states (1/high and 0/low) as being the valleys between a hill which represents the metastable region. Any disturbance (e.g. noise) will cause the state to change from the metastable state to a stable one. The problem is you don't know how long that will take and what the output will be while it's in this region.


image


In the image below, you can see an example over multiple runs of an input causing a metastable state. Notice that the time to transition back to the stable states (high or low) varies.



Also notice that it doesn't always resolve to the same result. Sometimes it goes high and sometimes it goes low.


Some key takeaways to remember:

  1. Every bistable device has a metastable state between the two stable states.
  2. Violating the setup and hold times can lead to metastability.
  3. The output voltage and the time to resolve to a stable state from a metastable state are unknown.
  4. The probability that the resolution time exceeds some arbitrary time decreases exponentially. (The longer we wait the more likely it is to have become stable).


In future newsletters we'll look at causes of metastability and how to design for them.


If you got this far, I hope you're enjoying the newsletter. Please share it with someone you know! https://sendfox.com/theramblings


-James "TRON" Trimble


References:

https://en.wikipedia.org/wiki/Metastability_(electronics)

https://www.linkedin.com/pulse/unveiling-metastability-vlsi-taming-unpredictable-beast-priya-pandey/

David Money Harris, and Sarah L Harris. Digital Design and Computer Architecture, RISC-V Edition. Amsterdam, Morgan Kaufmann, 2022.

Share
Get the next issue in your inbox
Free, and you can unsubscribe any time.

0 comments

More issues

All 5 →
#3 Jun 7, 2024

The RAMblings: DTMF

Read issue →
#1 May 21, 2024

The RAMblings: The 1st RAM

Read issue →