Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Path
  • CDC/RDC Glossary
  • CDC/RDC Metrics Reference
  • CDC/RDC Interview Prep
  • CDC/RDC Signoff Cheatsheet
  • Clock Domains and Failure Modes8
  • Metastability and Synchronizers16
  • CDC Protocols and Handshakes16
    • Pulse Synchronizers
      • Why Pulses Need Help
      • Toggle Synchronizer
      • Pulse Stretching and Edge Detect
      • Spacing and Rate Limits
    • Handshake Protocols Across Domains
    • Async FIFO CDC
    • CDC Protocol Verification
  • Reconvergence and Gray Coding16
  • Reset Domain Crossing16
  • Architecture and Design Rules16
  • CDC Signoff Methodology24
  • RDC Signoff16
  • Debug and Case Studies11
  • CDC and RDC Interview Prep30
  • Capstone: Sign Off a Multi-clock Peripheral4
Loading lesson

‹Pulse Synchronizers
  1. Topics
  2. CDC & RDC
  3. CDC Protocols and Handshakes
  4. Pulse Synchronizers
  5. Toggle Synchronizer

Part 3 · CDC Protocols and Handshakes · All levels

Toggle Synchronizer

Toggle at the source, synchronise the level, edge-detect at the destination, and never re-toggle early.

On this page

    Why it matters

    The toggle scheme is the standard answer when a pulse is too short for the destination clock. It converts the event into a level change that persists for as long as needed, so the destination is guaranteed a stable level to sample. Every signoff reviewer recognises the three-part shape: a source toggle flop, a level synchroniser, and a destination edge detector.

    The pattern

    1. Source: a flop that flips on every input pulse (toggle_s <= ~toggle_s). Each event becomes a level change that holds until the next event.

    2. Crossing: a two-flop (or more) synchroniser on the destination clock carries the level, exactly like any single-bit level crossing.

    3. Destination: an edge detector (pulse_d = sync ^ sync_delayed) turns each received flip back into a one-cycle pulse.

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    // snippet: the toggle scheme in compact form (resets omitted for brevity;
    // the full resettable version is built in the RTL handshake lessons).
    // Source domain:
    //   always @(posedge clk_s) if (pulse_s) toggle_s <= ~toggle_s;
    // Crossing: 2FF synchroniser of toggle_s into clk_d -> sync_t.
    // Destination domain:
    //   always @(posedge clk_d) sync_t_d <= sync_t;
    //   assign pulse_d = sync_t ^ sync_t_d;

    Simulation: the lost pulse and the toggle fix

    The waveform below is simulation output for the wave source of this topic: a one-cycle source pulse beside the same event sent as a toggle. One slot is one cycle of clk_s.

    How to read it: pulse_s is high for a single source slot (slot 2), between two destination edges, so a plain synchroniser would never see it. toggle_s flips in slot 5 and holds still. sync_t rises in slot 10, two destination edges later, and the edge detector answers with pulse_d high across slots 10 to 12 and low again in slot 13.

    The central rule

    The source must not toggle again before the destination has seen the current toggle. If two flips land inside one destination period, the synchroniser output may move once or not at all, and one event is lost. The enforceable form of the rule is a minimum spacing between source pulses, covered in the spacing lesson.

    What the checks look for

    Review question

    What passes

    Is the toggle flop clocked by the source clock and fed only by the pulse?

    Yes, with no combinational shortcuts around it

    Does the level cross through a proper synchroniser?

    Two or more destination flops, no logic between them

    Is the edge detector on the synchronised output, not the raw toggle?

    Only the last synchroniser flop feeds the XOR

    Is the spacing rule written down and checked?

    A stated minimum gap plus an assertion or test (see the spacing lesson)

    Common mistakes

    Common pitfall

    Toggling on a level instead of a pulse: if the source input is a level that stays high for several cycles, the flop toggles every cycle and the destination sees a burst of phantom events. Qualify the toggle with a single-cycle pulse, or gate it with a busy flag.

    Interview

    Draw all three parts with their clocks labelled, then state the re-toggle rule unprompted. The follow-up is always about spacing, so have the two-destination-periods figure ready.

    Check yourself The destination clock is 50 MHz. Two source pulses arrive 15 ns apart and the toggle flips twice. What can the destination see?

    The flips are 15 ns apart but the destination period is 20 ns, so both flips can fall inside one destination period and merge: the destination may report one pulse or none. The spacing rule is violated.

    Related topics

    • Spacing and rate limits

    • RTL: CDC Protocols

    Previous

    32 / 179

    Next: Pulse Stretching and Edge Detect

    Up next

    Up nextPulse Stretching and Edge Detect

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Spacing and Rate Limits
    clk_spulse_stoggle_sclk_dsync_tpulse_d
    Simulation output: a one-cycle source pulse beside the same event carried as a toggle into a 30 ns destination domain