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

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
    • Low-Power RTL Hub
    • DFT and Scan Hub
    • Physical Awareness Hub
    • Waveform Debug Hub
    • STA and ECO Hub
    • RTL-to-Implementation Closure
    • DFT-Ready RTL
    • Capstone: Resilient Streaming Peripheral
      • Stage 1: Specification
      • Stage 2: CSR and Control
      • Stage 3: Buffered Streams
      • Stage 4: CDC and Reset
      • Stage 5: Arithmetic and Reliability
      • Stage 6: Verification
      • Stage 7: Constraints and Implementation
      • Stage 8: Signoff Review
    • Principal Design Review
    • Senior RTL Interview Questions & Model Answers
  • Glossary and Notation
Loading lesson

‹Capstone: Resilient Streaming Peripheral
  1. Topics
  2. RTL Design
  3. Senior & Interview
  4. Capstone: Resilient Streaming Peripheral
  5. Stage 4: CDC and Reset

Part 9 · Senior · Senior

Stage 4: CDC and Reset

Move the processing pipeline into a second clock domain and survive independent reset and clock availability.

Why this matters

Resetting one side of an asynchronous FIFO breaks the pointer agreement, and a configuration crossing bit by bit can produce a value software never wrote. Both look fine until a clock ratio or a reset lands at the wrong time.

After this lesson you can: choose a crossing method for each signal, release each reset in its own clock domain, and recover from a one-sided reset without losing track of accepted work.

Crossing

CP-1 direction / protocol / owner

Input complete beat

clk_io -> clk_dp async FIFO; includes owner/framing/status. Source-registered Gray pointers with source-step delay/skew constraints, interstage timing and both-end reset ownership

Output complete beat

clk_dp -> clk_io async FIFO with identical framing/epoch ownership; hold the external offer independently of internal FIFO reset until shared cancellation is authorized

START/config snapshot

clk_io -> clk_dp acknowledged stable bundled-data handshake; constrain every bit before earliest capture; one pending configuration; no new operation until completion

Done/error and final counters

clk_dp -> clk_io acknowledged response record containing epoch/operation, counters and status. Hold until ack; set sticky IO IRQ from that record. No open-loop event toggle or independent per-bit counter synchronization

Diagnostic live counters (extension)

Explicit snapshot request/ack, or a source-registered unit-step Gray counter with wrap/sampling and skew bounds; not a coherent bitwise binary bus

Slow readiness level

Local -> clk_io synchronized status; stale status is not immediate fault detection. It participates in a fresh recovery barrier

Reset/fault/epoch

Always-running clk_io supervisor owns containment and coordinated FIFO/handshake restart; per-domain synchronous release and fresh acknowledgements before epoch reuse

Diagram with two clock boxes. clk_io holds CSR and control, the recovery supervisor, the input FIFO write side and the output FIFO read side. clk_dp holds the datapath. Arrows: input async FIFO to the datapath, datapath to output async FIFO, START/config handshake from control to datapath, done/counters record back to control, reset and epoch from the supervisor to the datapath, and a readiness level back to the supervisor.
The crossing map: two async FIFOs carry beats, two acknowledged handshakes carry the snapshot and the response record, and the supervisor owns reset and epoch.

Every arrow that leaves a box is one row of the table above. Solid arrows carry work; dashed arrows carry control and status.

  1. Assert both domains into safe state.

  2. Release each reset synchronously to its own clock.

  3. Wait for consumer alive/ready before producer sends work.

  4. Define behavior if one domain resets during a transaction.

  5. Verify several clock ratios, phase relationships, and one-sided resets.

The CDC stage produces an explicit recovery rule for stage 5: arithmetic starts only after configuration acknowledgement and a fresh recovery barrier, not alive alone. A one-sided reset first closes admission and invalidates the operation. Flush/reinitialize both FIFO endpoints and request/ack history; acknowledge the new recovery epoch from each clock domain before reuse. Keep old epoch/operation records long enough to classify cancellation, not merely clear the scoreboard.

One-sided reset with a stopped peer

Step

Supervisor / interface

Accounting and reopening

Epoch7: accepted A/B/C, delivered A

B offered but stalled, C buffered behind B

Two accepted owners remain live

DP reset/fault detected; DP clock unavailable

Close admission; latch fault; keep B offered unchanged unless the sink participates in shared interface reset

Do not cancel or reinterpret B/C solely from a stale peer-alive flag

Shared IO/sink reset acknowledged

Authorize cancellation of outstanding old stream offers and complete FIFO flush

Record B/C as cancelled in epoch7 with reset reason; accepted3 = delivered1 + discarded2

Peer remains stopped through 1024-cycle recovery watchdog

Keep fault/containment; no readiness or synthetic ack

Epoch8 cannot open; a fixed source-domain timer is not peer evidence

Peer clock returns and explicit recover is requested

Release locally, complete fresh req/ack flush barrier, confirm both endpoint histories idle

Open epoch8 only after both acknowledgements; late epoch7 response cannot complete epoch8 work

If the sink cannot acknowledge shared cancellation, preserve B until its handshake and remain closed; no reset-controller assertion may silently retract it. The controller must meet a bounded fault-detection/containment budget, and the scoreboard accounts for work accepted before closure. Use the always-on recovery pilot as a controller-contract starting point, not proof of this integrated peripheral. Actual FIFO resources have their own reset/busy/clock requirements, which implementation must satisfy.

Warning

Resetting only one side of an async FIFO invalidates pointer agreement. The architecture must flush/reinitialize both sides or perform a coordinated recovery protocol.

Check yourself Why not synchronize the multi-bit configuration register bit by bit?

Bits can settle on different cycles and create a configuration that never existed. Hold a snapshot stable and cross it with a handshake.

Remember

  • Streams cross through asynchronous FIFOs; start, config and done records cross by acknowledged handshake.

  • A one-sided reset closes admission, flushes both FIFO ends and starts a new recovery epoch.

  • Verify several clock ratios, phases and one-sided resets, not one lucky ratio.

Rule of thumb: hold a snapshot stable and cross it with a handshake; never cross a multi-bit value bit by bit.

Keep going

  • Practice: Debugging metastability from asynchronous reset deassertion

  • Practice: Asynchronous FIFO pointer mismatch caused by a CDC bug

  • Code lab: CDC handshake

  • Interview: run a mock interview on this topic

Related topics

  • Reset and CDC

  • Stage 5: Arithmetic and reliability

Previous

306 / 350

Next: Stage 5: Arithmetic and Reliability

Up next

Up nextStage 5: Arithmetic and Reliability

Sign in to save progress

Practice this lessonReport an error

See also

  • Stage 1: Specification
  • Stage 2: CSR and Control
  • Stage 6: Verification