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
  • Reconvergence and Gray Coding16
  • Reset Domain Crossing16
  • Architecture and Design Rules16
    • CDC-Aware Partitioning
    • Clock Gating and Muxing
      • Glitch-Free Clock Mux
      • Gating as a Domain Boundary
      • Crossing with Gated Clocks
      • Clock Switching and Reset
    • Interface and IP Rules
    • Quasi-Static Signals and Configuration
  • CDC Signoff Methodology24
  • RDC Signoff16
  • Debug and Case Studies11
  • CDC and RDC Interview Prep30
  • Capstone: Sign Off a Multi-clock Peripheral4
Loading lesson

‹Clock Gating and Muxing
  1. Topics
  2. CDC & RDC
  3. Architecture and Design Rules
  4. Clock Gating and Muxing
  5. Clock Switching and Reset

Part 6 · Architecture and Design Rules · Intermediate

Clock Switching and Reset

Resets and state when the clock source changes; ordering rules.

On this page

    Switching the clock source changes the timing of everything downstream at once. Resets are the tool that makes the change survivable: hold the affected logic in reset across the switch, then release it into the new clock in the same disciplined way as any reset release.

    Ordering rules

    1. Assert before the switch. Put the downstream logic into reset while the old clock still runs, so it enters the switch from a known state rather than mid-transaction.

    2. Switch, then wait for the clock to stabilise. The mux needs its synchroniser delay plus the dead time; a free-running source needs its own start-up time. Count both before doing anything downstream.

    3. Release synchronously to the new clock. A reset released asynchronously into the new domain re-creates the deassertion hazard the reset synchroniser exists to prevent (see reset strategies and reset-domain crossing).

    4. Flush the synchronisers. After release, allow two to three cycles of the new clock before trusting any crossed signal, so stale pre-switch values drain out of every chain.

    5. Restart protocols from idle. Handshakes return to their idle state and FIFOs to empty on the switch; never resume a transfer that straddled the change.

    Step

    Clock needed

    Done when

    1. Assert reset

    Old clock running

    Reset observed asserted in the old domain.

    2. Switch source

    None (output may pause)

    Mux enables confirm the new side (en_b style check).

    3. Wait

    New clock stable

    Source stable plus mux dead time elapsed.

    4. Release reset

    New clock running

    Release synchronised to the new clock.

    5. Flush and restart

    New clock running

    Two to three quiet cycles, protocols from idle.

    What the review looks for

    The reviewer asks for the switch sequence as a written procedure with the wait counts filled in, then checks that reset assertion is independent of the clock being switched (an asynchronous assert, or a reset from a domain that stays alive). A sequence that releases reset into a clock that might still be starting is sent back.

    Common pitfall

    Using a watchdog or a counter in the switched domain to time the wait in step 3. The counter runs on the very clock whose stability is unproven; if the clock is dead, the wait never ends, and if it is runt-pulsing, the count means nothing. Time the wait from a domain that stays alive.

    Interview

    “How do you change clock sources safely?” Assert reset first, switch, wait for stability timed from a live domain, release synchronously to the new clock, flush the synchronisers, and restart every protocol from idle.

    Check yourself A design switches clock sources and releases reset on a fixed delay after the select changes, timed by a counter on the new clock. Name two things wrong.

    First, the counter runs on the unproven clock, so the wait is meaningless if the clock is dead or glitching. Second, a fixed delay is not a release synchronised to the new clock; the release itself can violate recovery and needs a reset synchroniser on the new domain.

    Related topics

    • Glitch-Free Clock Mux

    • RTL: Reset Domain Crossing

    Previous

    86 / 179

    Next: Interface and IP Rules

    Up next

    Up nextInterface and IP Rules

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Glitch-Free Clock Mux
    • Gating as a Domain Boundary