Home › Practice › RTL Design › Two-flop synchronizer
Two-flop synchronizer
EasyRTLCDCtwo clocks
d is a level that changes in the clk_a domain (it comes straight from a clk_a flop). Bring it into the clk_b domain as q.
- Ports are fixed:
clk_a,clk_b,rst_b(synchronous, active-high, toclk_b),d,q.qis 0 after reset. - Rule 1:
dmust feed exactly oneclk_bflop, straight into its D pin, with no logic. - Rule 2: that flop's output may feed only other
clk_bflops, with no logic between them. So the chain is at least two flops before any logic or output. Three flops is fine. - Rule 3:
qmay only show values thatdhad. Oncedhas been steady for 5clk_bedges,qmust equal it.
What this grader can and cannot see. Simulators and Studio treat flops as ideal and cannot show metastability, so this grader checks the structure and the worst-case bit timing instead. A failure of rule 1 or 2 is shown as a message naming the net. A failure of rule 3 is shown as a table of steps.
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.