Practice

Clock domain crossing (CDC) problems

Clock domain crossing is where designs that pass every single clock test fail on silicon. These problems build the standard structures one at a time: the two flop synchronizer, the pulse and toggle synchronizers, the handshake, Gray coded pointers and the async FIFO.

84 problems5 free to solve11 easy, 36 medium, 37 hard

The track also covers the clocks themselves: dividers with a 50 percent duty cycle, clock gating cells and the glitch free clock multiplexer.

What these problems cover

  • Two flop and multi flop synchronizers
  • Pulse, toggle and handshake synchronizers
  • Gray code counters for multi bit crossings
  • Asynchronous FIFOs and their full and empty flags
  • Reset synchronizers and reset deassertion
  • Clock dividers, clock gating and glitch free clock multiplexers

Free to start

Solve these with a free account. Every other statement on this page is free to read.

Problems by track

Clock Domain Crossing and Synchronization36

24 more in the Clock Domain Crossing and Synchronization track

Digital Foundations1

Latches and Flip-Flops5

Counters2

Clocking and Synchronization22

10 more in the Clocking and Synchronization track

Interview Circuit3

Datapath Design1

Interfaces and Protocols1

More problems13

How your answer is checked

Your module is compiled with Icarus Verilog and simulated against the problem's testbench. The result lists every test with the value you produced and the value expected, and the waveform shows where they part. Yosys synthesizes the same code, so you can see the schematic and the cell count of what you wrote.

Questions

Can a simulator show metastability?
Not by itself: a simulated flop always settles cleanly. What these problems check is the design around it, the synchronizer stages, the Gray coded pointers, the handshake and the FIFO flags. One problem injects metastability into simulation on purpose so you can watch a synchronizer absorb it.
Is CDC asked in interviews?
Yes. Synchronizers, async FIFO depth and Gray code pointers are some of the most common RTL design interview questions.