Metastability in electronics
Encyclopedia
Metastability in electronics is the ability of a digital electronic system to persist for an unbounded time in an unstable equilibrium or metastable
Metastability
Metastability describes the extended duration of certain equilibria acquired by complex systems when leaving their most stable state after an external action....

 state.
In metastable states, the circuit may be unable to settle into a stable '0' or '1' logic level
Logic level
In digital circuits, a logic level is one of a finite number of states that a signal can have. Logic levels are usually represented by the voltage difference between the signal and ground , although other standards exist...

 within the time required for proper circuit operation. As a result, the circuit can act in unpredictable ways, and may lead to a system failure.

Metastable states are inherent features of asynchronous digital systems
Asynchronous circuit
An asynchronous circuit is a circuit in which the parts are largely autonomous. They are not governed by a clock circuit or global clock signal, but instead need only wait for the signals that indicate completion of instructions and operations. These signals are specified by simple data transfer...

, and of systems with more than one independent clock domain. In self-timed asynchronous systems, arbiters are designed to allow the system to proceed only after the metastability has resolved, so the metastability is a normal condition, not an error condition.
In synchronous systems with asynchronous inputs, synchronizers are designed to make the probability of a synchronization failure acceptably small.
Metastable states are avoidable in fully synchronous systems when the input setup and hold time requirements on flip-flops are satisfied.

Flip-flops

In electronics
Electronics
Electronics is the branch of science, engineering and technology that deals with electrical circuits involving active electrical components such as vacuum tubes, transistors, diodes and integrated circuits, and associated passive interconnection technologies...

, the flip-flop
Flip-flop (electronics)
In electronics, a flip-flop or latch is a circuit that has two stable states and can be used to store state information. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. It is the basic storage element in sequential logic...

 is a device that is susceptible to metastability. It has two well-defined stable states, traditionally designated 0 and 1, but under certain conditions (see below) it can hover between them for longer than a clock cycle. This condition is known as metastability. Such a metastable "state" is considered a failure mode of the logic design and timing philosophy or implementation.

The most common cause of metastability is violating the flip-flop's setup and hold times. During the time from the setup to the hold time (capture window), the data input of the flip-flop should remain in a stable logic state; a change of the data input in that time will have a probability of setting the flip-flop to a metastable state.

In a typical scenario where data travels from the output of a source flip-flop to the input of target flip-flop, metastability is caused by either:
  1. the target clock having a different frequency than the source flip-flop, in which case the setup and hold time of the target flip-flop will be violated eventually, or
  2. the target and source clock having the same frequency, but a phase alignment that causes the data to arrive at the target flip-flop during its setup and hold time. This can be caused by fixed overhead or variations in logic delay times on the worst case path between the two flip flops, variations in clock arrival times (clock skew
    Clock skew
    -In circuit design:In circuit designs, clock skew is a phenomenon in synchronous circuits in which the clock signal arrives at different components at different times...

    ), or other causes.

Arbiters

In electronics, an arbiter is a circuit designed to determine which of several signals arrive first. Arbiters are used in asynchronous circuits to order computational activities for shared resources to prevent concurrent incorrect operations. Arbiters are used on the inputs of fully synchronous systems, and also between clock domains, as synchronizer
Synchronizer
The term synchronizer can mean more than one thing.* In automobiles, a synchronizer is part of a synchromesh manual transmission that allows the smooth engagement of gears....

s for input signals. Although they can minimize the occurrence of metastability to very low probabilities, all arbiters nevertheless have metastable states, which are unavoidable at the boundaries of regions of the input state space
State space (controls)
In control engineering, a state space representation is a mathematical model of a physical system as a set of input, output and state variables related by first-order differential equations...

 resulting in different outputs.

Synchronous circuits

Synchronous circuit
Synchronous circuit
A synchronous circuit is a digital circuit in which the parts are synchronized by a clock signal.In an ideal synchronous circuit, every change in the logical levels of its storage components is simultaneous. These transitions follow the level change of a special signal called the clock...

 design techniques make digital circuits that are resistant to the failure modes that can be caused by metastability. A clock domain is defined as a group of flip flops with a common clock. Such architectures can form a circuit guaranteed free of metastability (below a certain maximum clock frequency, above which first metastability, then outright failure occur). However, even then, if the system has a dependence on any continuous inputs then these are likely to be vulnerable to metastable states.

When synchronous design techniques are used, protection against metastable events causing systems failures need only be provided when transferring data between different clock domains or from an unclocked region into the synchronous system. This protection can often take the form of a series of delay flip flops which delay the data stream long enough for the metastability to have statistically been removed.

Failure modes

Although metastability is well understood and architectural techniques to control it are known, it persists as a failure mode
Failure mode
Failure causes are defects in design, process, quality, or part application, which are the underlying cause of a failure or which initiate a process which leads to failure. Where failure depends on the user of the product or process, then human error must be considered.-Component failure:A part...

 in equipment.

Serious computer and digital hardware bugs caused by metastability have a fascinating social history. Many engineers have refused to believe that a bistable device can enter into a state that is neither true nor false and has a positive probability that it will remain indefinite for any given period of time, albeit with exponentially decreasing probability over time. However, metastability is an inevitable result of any attempt to map a continuous domain to a discrete one. There will always be points in the continuous domain which are equidistant (or nearly so) from the points of the discrete domain, making a decision as to which discrete point to select a difficult and potentially lengthy process. If the inputs to an arbiter or flip-flop arrive almost simultaneously, the circuit most likely will traverse a point of metastability. Metastability remains poorly understood in some circles, and various engineers have proposed their own circuits said to solve or filter out the metastability; typically these circuits simply shift the occurrence of metastability from one place to another. Chips using multiple clock sources are often tested with tester clocks that have fixed phase relationships, not the independent clocks drifting past each other that will be experienced during operation. This usually explicitly prevents the metastable failure mode that will occur in the field from being seen or reported. Current engineering solutions to this problem are often the well-characterized, multi-stage common-clock shift registers discussed in the links below.

See also

  • Ground bounce
    Ground bounce
    In electronic engineering, ground bounce is a phenomenon associated with transistor switching where the gate voltage can appear to be less than the local ground potential, causing the unstable operation of a logic gate.-Description:...

  • Asynchronous CPU
  • Introduction to VLSI Systems
    Mead & Conway revolution
    The Mead & Conway revolution was the development of VLSI design and prototyping within or for academic institutions, both for education and research, and consequently breeding new kinds of industries based on microelectronics applications.-Background:...

    by Carver Mead
    Carver Mead
    Carver Andress Mead is a US computer scientist. He currently holds the position of Gordon and Betty Moore Professor Emeritus of Engineering and Applied Science at the California Institute of Technology , having taught there for over 40 years.Mead studied electrical engineering at Caltech, getting...

     and Lynn Conway
    Lynn Conway
    Lynn Conway is an American computer scientist, electrical engineer, inventor, trans woman, and activist for the transgender community....

  • Analog-to-digital converter
    Analog-to-digital converter
    An analog-to-digital converter is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement...

  • Buridan's ass
    Buridan's ass
    Buridan's ass is an illustration of a paradox in philosophy in the conception of free will.It refers to a hypothetical situation wherein an ass is placed precisely midway between a stack of hay and a pail of water...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK