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
      • CSR Contract and Address Map
      • Field Access Types
      • Hardware/Software Arbitration
      • Byte Strobes and Partial Writes
      • Atomic and Shadowed Updates
      • Interrupt Register Pattern
      • Adapter and Signoff
      • Generated Register Workflow
      • The Firmware Side: a C Driver for W1C, RC and Shadow Registers
    • Memory Reliability
    • Peripheral RTL Integration
    • Full AXI4: RTL Roadmap
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Register-Map and CSR RTL
  1. Topics
  2. RTL Design
  3. Memory & Buses
  4. Register-Map and CSR RTL
  5. Adapter and Signoff

Part 7 · Memory & Buses · Intermediate

Adapter and Signoff

Translate AXI-Lite or APB transfers into a one-cycle CSR request and prove the software-visible contract.

On this page

    Why this matters

    A bus wait state that replays a register access runs a side effect twice: a read-to-clear loses an event, a command starts twice. The adapter must turn one bus transfer into exactly one CSR request.

    After this lesson you can: describe a thin AXI-Lite or APB adapter around a single-outstanding CSR port, and split the verification between adapter, registers and one end-to-end test.

    Keep adapters thin

    At this point the packet-processor fields are fully defined without a bus. The adapter's only job is to convert an accepted AXI-Lite or APB transfer into the same internal request and return the same response.

    Adapter responsibility

    CSR responsibility

    Handshake and channel ordering

    Address decode and field behavior

    Capture address/data/strobes

    Read mux and write effects

    Return protocol response

    Return data and error response

    CSR error becomes SLVERR on AXI-Lite (BRESP/RRESP = 2'b10) and PSLVERR on APB

    Raise error for an unmapped offset

    Timeout at integration boundary

    No hidden protocol state

    Use the single-outstanding contract and canonical field map from CSR Contract and Address Map. AXI-Lite captures AW and W independently, pairs them, emits one req_take, then retains B until BREADY. Reads retain RDATA/RRESP until RREADY. APB latches the ACCESS request, issues it once using an issued flag, and asserts PREADY only when its captured CSR response is available. The issued flag resets only on APB completion/new transfer, not on each wait cycle. An APB wait is not another CSR operation.

    APB START with two wait cycles

    PSEL is high for the whole transfer and is not drawn. The page's edges E0 to E3 end slots 0 to 3, and the trace starts with enable = 1 and busy = 0. Address and data stay stable through E3.

    • Slot 0 (E0): PENABLE is low, so this is the setup phase. The adapter latches the address and data.

    • Slot 1 (E1): access phase, PREADY low. req_take is high for this one cycle, so the CSR sees one request. issued sets and the START count becomes 1.

    • Slot 2 (E2): still waiting. issued is already 1, so req_take stays low and nothing is replayed. The adapter captures the CSR response.

    • Slot 3 (E3): PREADY is high and the transfer completes once. issued clears one slot later, and the count stays at 1.

    AXI read-to-clear with RREADY stalls

    Start with the sticky bit at 1 and a new event arriving at E1. The snapshot at req_take is the old value, and the next sticky value is (old & ~1) | event, so the new event survives the clear. The read response is held until RREADY, and no second clear happens while it waits.

    Edge

    What happens

    RVALID

    RREADY

    RDATA

    Sticky after

    E0

    AR accepted and buffered

    0

    -

    -

    1

    E1

    req_take: snapshot old = 1; sticky_next = (old & ~1) | event = 1

    0

    -

    -

    1

    E2

    Response held, stalled

    1

    0

    1

    1

    E3

    Response held, stalled; no second clear

    1

    0

    1

    1

    E4

    RREADY high: one response retires

    1

    1

    1

    1

    A later read sees the new event. RC is not part of the canonical W1C map.

    Adapter checker obligations: count req_take and side effects per upstream transaction (each at most one); accepted requests = retired responses + owned responses within a reset epoch; compare saved response data/error on every stalled and accepting edge. Bound response waits in the harness and terminate failures fatally.

    Verification matrix

    • Reset values and reserved bits.

    • Every access type with zero, one, and all-one writes.

    • Each byte-strobe combination.

    • Hardware set colliding with software clear.

    • Unmapped and misaligned accesses.

    • Back-to-back reads/writes and adapter backpressure.

    • Interrupt event, mask, enable, clear, and reassertion.

    Tip

    Check AXI/APB correctness at the adapter, CSR semantics against a protocol-independent request model, and the composition with one end-to-end test.

    Check yourself What is the main verification benefit of a protocol-independent CSR request?

    All field semantics can be exhaustively tested without AXI/APB timing, while protocol VIP verifies the adapter separately. Failures localize to transport or register behavior.

    Remember

    • The adapter converts an accepted transfer into one internal request. Wait cycles are not new requests.

    • Hold the response until the bus accepts it, with no second side effect while it waits.

    • Test field semantics without any bus, and the adapter with protocol checks.

    Rule of thumb: keep protocol timing in the adapter and register meaning in the CSR bank.

    How this was checked

    The APB and AXI traces on this page are written by hand from the stated contract. They are not output from a run of a complete adapter.

    Keep going

    • Practice: AXI4-Lite slave interface with read and write register access

    • Code lab: AXI-Lite write channel stub

    • Interview: run a mock interview on this topic

    Related topics

    • Generated register workflow

    • AXI-Lite adapter transport

    • APB protocol course

    Previous

    229 / 350

    Next: Generated Register Workflow

    Up next

    Up nextGenerated Register Workflow

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • CSR Contract and Address Map
    • Field Access Types
    • Hardware/Software Arbitration
    clkpenablepreadyreq_takeissuedstart_cnt01
    An APB transfer with two wait cycles: the adapter issues the CSR request once, counts one START, and clears its issued flag only when the transfer completes