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
    • SRAM and ROM
    • Register Files
    • Valid/Ready Handshake
    • AXI-Lite
    • AXI-Stream
    • Bus Integration
    • Synchronous FIFO
    • Register-Map and CSR RTL
    • Memory Reliability
    • Peripheral RTL Integration
      • Peripheral Shell
      • Clock, Reset, and Power Contract
      • Interrupts and Events
      • FIFO and DMA Boundary
      • Errors and Integration Signoff
    • Full AXI4: RTL Roadmap
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Peripheral RTL Integration
  1. Topics
  2. RTL Design
  3. Memory & Buses
  4. Peripheral RTL Integration
  5. Clock, Reset, and Power Contract

Part 7 · Memory & Buses · Intermediate

Clock, Reset, and Power Contract

Bring a peripheral to a safe pin state, preserve software-visible reset values, and gate only after quiescence.

Why this matters

A peripheral that is idle but still holds a pending status bit loses it if the clock is gated or reset at the wrong time. The driver then fails once in a while and nobody finds the cause.

After this lesson you can: define the reset, clock-gating and retention behaviour of a peripheral, including safe pin states.

  • Reset pin outputs and output enables to protocol-safe values.

  • Release the bus/CSR side only when its clock is alive.

  • Synchronize asynchronous external inputs before control logic uses them.

  • Do not gate the engine clock while busy, while FIFO state must drain, or while an interrupt update is pending.

  • Retain or reinitialize software-visible configuration according to the power-state contract.

Applied to the sensor controller, reset deasserts chip select and drives the serial clock to its configured idle polarity before the engine can start. Clock gating waits until no transfer, FIFO update, or pending event capture needs the engine clock.

State

Required behavior

Reset asserted

Pins safe, requests low, FIFOs logically empty

Clock gated

No pending accepted work; wake condition remains observable

Power off

Outputs isolated; incoming requests blocked

Wake

Clock stable, reset released, retained/default configuration valid before enable

State diagram. Reset goes to Run when the clock is alive and reset is released. Run goes to Gated when quiescent with nothing pending. Gated goes to Wake on the wake condition, and Wake returns to Run when the clock is stable and configuration is valid. Run goes to Off with outputs isolated, and Off returns to Reset when power is restored.
The peripheral's power states: the clock is gated only from a quiescent Run state, and Wake must restore a stable clock and valid configuration before Run

Read each arrow as a condition that must already be true before the move.

  • Run to Gated is the risky edge: a transfer, a FIFO update or an event capture still needing the clock blocks it.

  • Wake is a state of its own. Enabling the engine before the clock is stable and the configuration is valid is the classic wake-up bug.

Common pitfall

A peripheral can be functionally idle but still have software-visible pending status. Clearing or losing that state during clock gating creates intermittent driver failures.

Check yourself What must be true before gating a peripheral engine clock?

The engine is quiescent, no accepted transaction needs progress, FIFO policy is satisfied, and wake/interrupt logic remains clocked or asynchronous by design.

Remember

  • On reset, drive outputs to protocol-safe values and release the bus side only when its clock is alive.

  • Do not gate the engine clock while it is busy, a FIFO must drain, or an event capture is pending.

  • Synchronise asynchronous inputs before control logic uses them.

Rule of thumb: idle hardware can still hold state software must see.

Keep going

  • Practice: Reset strategies in RTL: synchronous, asynchronous and gated

  • Interview: run a mock interview on this topic

Related topics

  • Clock architecture

  • Interrupts and events

Previous

240 / 350

Next: Interrupts and Events

Up next

Up nextInterrupts and Events

Sign in to save progress

Practice this lessonReport an error

See also

  • FIFO and DMA Boundary
  • Errors and Integration Signoff