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

‹Memory & Buses
  1. Topics
  2. RTL Design
  3. Memory & Buses
  4. Peripheral RTL Integration

Part 7 · Memory & Buses · Intermediate

Peripheral RTL Integration

A reusable peripheral shell: bus adapter, CSR bank, datapath, FIFOs, interrupts, DMA handshake, clocks, resets, and error containment.

  • 5topics
  • 5lessons

Topics in this section

  1. 1Peripheral Shell1 lesson
  2. 2Clock, Reset, and Power Contract1 lesson
  3. 3Interrupts and Events1 lesson
  4. 4FIFO and DMA Boundary1 lesson
  5. 5Errors and Integration Signoff1 lesson
On this page

    SPI, I2C, UART, GPIO, timers, and DMA engines differ at their pins but share an integration shell. This topic teaches that shell and links protocol-specific behavior to the dedicated Protocols course.

    A planned SPI sensor-controller integration exercise carries the discussion: CSRs program transfers, a TX FIFO feeds the serializer, an RX FIFO captures samples, DMA moves bursts, and sticky status reports faults. This topic supplies contracts, snippets and worked traces, not a complete controller or executed integration scenario.

    Peripheral block architecture with CSR, FIFOs, interrupts, DMA and IO engine.
    The common peripheral shell isolates transport, software contract, buffering, protocol engine, and system integration.

    Lessons in this topic

    5 lessons, about 17 min

    1. 1Peripheral ShellYou can partition a peripheral into transport, CSR bank, control, datapath and IO timing, and define the accepted-request interface between them.3 min
    2. 2Clock, Reset, and Power ContractYou can define the reset, clock-gating and retention behaviour of a peripheral, including safe pin states.2 min
    3. 3Interrupts and EventsYou can classify peripheral events as level or sticky, and capture a short external pulse by stretching it across two destination samples.4 min
    4. 4FIFO and DMA BoundaryYou can drive a DMA request with high and low watermarks, wire a fall-through FIFO to a valid/ready DMA port, and count only accepted beats.4 min
    5. 5Errors and Integration SignoffYou can recover from a timeout without reusing the transaction slot too early, and plan the cross-layer faults a peripheral signoff must cover.4 min

    Tip

    Use this topic for block architecture; use the Protocols course for SPI modes, I2C arbitration, UART flow control, APB phases, and AHB/AXI transaction rules.

    Check yourself Why should the protocol engine not directly decode AXI-Lite channels?

    It couples pin-level behavior to one bus, mixes independent state machines, and makes verification harder. A thin adapter and CSR contract keep the engine reusable.

    Revision sheet

    The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.

    Peripheral Shell

    • The engine sees accepted FIFO operations and start events, never bus channel levels.

    • engine_busy has a single owner, including the reservation on the accepting edge.

    • An invalid operation returns an error and is never reported as success.

    Rule of thumb: decide who owns each piece of state, then draw the boundary around it.

    Clock, Reset, and Power Contract

    • 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.

    Interrupts and Events

    • Level causes (watermark, FIFO space) are cleared by removing the condition. Sticky causes (done, timeout, error) are cleared by W1C.

    • A pulse shorter than the destination sampling gap can be missed by a two-flop synchroniser.

    • Repeated events merge into one sticky bit. Count them if occurrences matter.

    Rule of thumb: software clears sticky bits and removes level causes.

    FIFO and DMA Boundary

    • The request sets at one watermark and clears at the other. Keep the low mark below the high mark, or the hysteresis disappears.

    • A fall-through wiring needs the front word stable until an accepted pop. A registered-pop FIFO needs a prefetch adapter first.

    • Software and DMA need arbitration so they cannot pop the same word.

    Rule of thumb: count only accepted valid/ready beats, never the request.

    Errors and Integration Signoff

    • A timeout gives one upstream error. The slot stays owned until the late reply drains or a coordinated reset starts a new epoch.

    • Keep separate ledgers for upstream and downstream accepted work.

    • Recovery means safe pins, resolved ownership and acceptance of a later legal transfer.

    Rule of thumb: never reuse an owned slot because a timeout fired.

    Practise it

    • Mini project: a two-master bus with decoder, default slave and timeout

    • Practice question: Memory-mapped register interface with read and write support

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

    • Practice question: CDC synchroniser for a memory-peripheral transfer

    • Code lab: Interrupt aggregator

    • Code lab: DMA controller FSM

    • Interview: run a mock interview on this topic

    PreviousNext: Peripheral Shell

    Up next

    Up nextPeripheral Shell

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • SRAM and ROM
    • Register Files
    • Valid/Ready Handshake