0
\$\begingroup\$

I am fairly familiar with the concept of metastability: You have two asynchronous clock domains, there is no way to guarantee that the data will be setup/held properly when input to a flip flop if it's clocked from a different domain (especially with differing clock frequencies that are not integer multiples of one another). The state of the register output will react unpredictably.

In a slow moving single bit case: Typical design will just pipeline some "protection" registers in the new clock domain before utilizing the signal, giving the metastable state time to resolve.

On a fast moving/wide bus signal it is not as simple. The unpredictable nature of metastability may cause some bits of a bus to settle earlier than others (assuming you can't perfectly match all register input trace lengths and perfectly match the register timings), which can look like glitches. In this scenario, designers can utilize a clock crossing FIFO to reliable pass data back and forth.

So what do the guts of a clock crossing FIFO look like and how does it get around the fundamental issue of asynchronous timing?

\$\endgroup\$
  • \$\begingroup\$ The first result was "Understanding clock domain crossing issues," and this merely mentioned that using FIFOs is a thing. Doesn't get into the "why" and "how" they work to get around all the issues I mentioned in my post. \$\endgroup\$ – user2913869 Aug 4 '16 at 19:26
1
\$\begingroup\$

Dual clock ram is used to form a fifo. One clock domain writes the other reads. The tricky part is to tell when the fifo is full/empty. This can be achieved in various ways. One popular method is to use gray encoded counters. You can easily synchronize the count between clock domains because only one bit changes at a time.

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.