Skip to content
BetterDL

Asynchronous input

Also called: async input, unsynchronized input

A signal whose changes have no fixed timing relationship to the receiving clock, like a push button, so it can violate setup or hold.

An asynchronous input is any signal that can change at any moment relative to the clock that reads it. Examples:

  • a push button or switch;
  • a sensor or another chip with no shared clock;
  • a signal from a part of the same chip running on a different clock (a clock domain crossing).

Within a synchronous design, timing analysis guarantees that every D input is stable during its flip-flop's setup and hold window. An asynchronous input breaks that guarantee: no analysis can say when it will change. Sooner or later it changes right inside the window, and the flip-flop that samples it may go metastable.

You can't prevent that, but you can contain it:

  • Pass the input through a two flip flop synchronizer before any logic uses it.
  • Synchronize it once, then fan out the synchronized copy.

Don't confuse this with an asynchronous control input such as an asynchronous clear. That's a flip-flop pin that acts without waiting for the clock. An asynchronous input is a signal not timed by your clock.

Worked example

Example

Why the raw button is dangerous

A button feeds two flip-flops directly: one starts a counter, the other lights an LED. The button is pressed just as a clock edge arrives.

  1. 1.

    Both flip-flops sample the input inside their setup-and-hold windows.

  2. 2.

    Each may resolve independently: one might capture 1 and the other 0.

  3. 3.

    Now the counter has started but the LED is off: an inconsistent state that the design never intended.

  4. 4.

    Fix: one two-flip-flop synchronizer, whose output feeds both flip-flops.

Common mistakes

  • Feeding an asynchronous input to several flip-flops before synchronizing it.

  • Assuming a slow human press can't cause trouble. The edge of the press can still land inside a window.

Practice Asynchronous input

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Asynchronous input is taught in Timing and Sequential Logic.