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

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • The NanoSoC Tour
  • Reading Path
  • SoC Glossary10
  • SoC Metrics Reference
  • SoC Cheatsheet
  • What SoC Integration Is12
  • Architecture and Budgets21
  • Memory Maps and Address Decode26
  • Interconnect and Bus Fabrics26
  • Clock and Reset Architecture24
  • Power Architecture21
  • Interrupts, DMA and Peripherals15
  • Memories, Boot and Security21
  • IP Integration and Handoff21
    • IP Collateral and Versioning
    • Wrappers and Adapters
      • Why Every Block Is Wrapped
      • Width and Protocol Adapters
      • The NanoSoC Wrappers
    • Integration Lint and Connectivity Checks
    • Top-Level SDC and Constraint Merge
    • DFT Integration
    • Debug Infrastructure
    • Safety and Fault Architecture
  • Top-Level Verification and Bring-up21
  • Package, Pads and I/O18
  • Chip Signoff and Tapeout18
  • SoC Interview Prep16
  • Capstone: Integrate NanoSoC14
Loading lesson

←Wrappers and Adapters
  1. Topics
  2. SoC Design
  3. IP Integration and Handoff
  4. Wrappers and Adapters
  5. The NanoSoC Wrappers
On this page

    Part 9 of 14, lesson 6 of 21Part 9 of 14/IP Integration and Handoff/Lesson 6 of 21All levels

    The NanoSoC Wrappers

    Each wrapper on the chip: the DMA address slice, clock enables, reset entry, stream ties and isolation cells.

    Why it matters

    Patterns are cheap; instances are where chips fail. NanoSoC has six wrappers worth knowing by name, and each exists because of one fact about the chip: the DMA's 8-bit port, the CLK_EN register with two enables, the synchronised release the DMA does not provide, the stream ports that carry only four signals, and the 114 isolation clamps between the switchable and always-on domains. Walking those six turns the abstract wrapper rules of the last two lessons into concrete port lists.

    The core idea

    The DMA APB wrapper slices twelve address bits to eight and exports the truncation check the lint rule consumes: apb_paddr bits 11 down to 8 must be zero for canonical accesses, and the wrapper states the sixteen alias images as documented fact rather than wiring accident. The clock wrapper gates clk_sys into the DMA and the stream bridge from CLK_EN bits 0 and 1, through a two-flop synchroniser and the latch-based gating cell, so the clock never glitches; the register write itself is still software's responsibility. The reset wrapper feeds the synchronised rst_sys_n release into the DMA's rst_n, supplying the two-flop release the block omits. The stream link carries only TDATA, TVALID, TREADY and TLAST. The stream wrapper has no sideband ties, because neither the DMA nor the stream bridge has TKEEP, TSTRB, TID, TDEST or TUSER and there is nothing to wire; the connectivity table records the absence as one row, so a future block that adds a sideband fails the port-list diff. The interrupt wrapper carries irq_dma and irq_sbr through clamp-to-zero isolation into the always-on controller, two of the 114 cells. And the secure-filter wrapper sits at the interconnect and the APB slot decoder, enforcing AxPROT-based denial for SRAM1 and the reset controller, because the DMA has no PPROT to propagate.

    nano_dma_wrap.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // DMA APB wrapper: 12-bit slot address to the 8-bit block port.
    // Complete and self-contained; the alias it creates is documented,
    // and canonical accesses are flagged for the lint rule.
    module nano_dma_wrap (
      input  logic [11:0] apb_paddr,
      output logic [7:0]  dma_paddr,
      output logic        addr_canonical
    );
      assign dma_paddr = apb_paddr[7:0];
      assign addr_canonical = (apb_paddr[11:8] == 4'h0);
    endmodule
    Diagram
    # not-run: NanoSoC wrapper census, NanoSoC teaching values
    DMA APB slice: 12 bits to 8 bits, 16 alias images, canonical when bits [11:8] are zero
    Clock enables: CLK_EN bit 0 (DMA), bit 1 (stream bridge), reset value 0x3 (both on)
    Reset entry: rst_sys_n with two-flop synchronised release into DMA rst_n
    Stream link: only TDATA, TVALID, TREADY, TLAST; no sideband on either end, absence recorded in the connectivity table
    Isolation: irq_dma and irq_sbr through clamp-to-0 cells, 2 of the 114 total
    Secure filter: SRAM1 and RSTPWR deny non-secure (AxPROT[1] = 1), DMA has no PPROT

    What the review looks for

    • The six wrappers above each present, each with the reason it exists written beside it.

    • The alias images drawn on the map as aliases with the canonical range marked, matching the memory-map section exactly.

    • The 114-cell isolation count reconciled: 47 APB-bridge outputs, 52 SRAM0 macro signals, 13 ROM signals and 2 interrupts.

    Verify and debug

    Probe the alias from software: read DMA STATUS at 0x4000_0004 and at 0x4000_0204 and confirm both return the same value, then confirm the project rule forbids the second address everywhere headers and tests are generated. Toggle each CLK_EN bit and confirm the corresponding clock stops and restarts; assert reset for 16 domain cycles and confirm the synchronised release the block cannot provide itself. The clock-gating case is worth a directed test of its own (see the pitfall). Two interrupts through isolation can be checked by forcing the switchable domain off in simulation and confirming both controller inputs read zero.

    Clock gated off during an APB access: after CLK_EN is written to 0x0, the first access to the DMA never completes, because a stopped DMA cannot drive PREADY and the AXI-to-APB bridge has no timeout. No error is reported; only a reset recovers. Caught by a directed test that accesses a gated block; fixed by a bridge watchdog (256 cycles) that completes the access with an error response, and by hardware that refuses to gate the clock of a busy block.

    If asked to describe the DMA integration in sixty seconds, answer: twelve bits sliced to eight with sixteen documented images, gated clock from CLK_EN, synchronised reset the block lacks, a four-signal stream link with the absent sidebands recorded, level interrupt through clamp-to-zero isolation, and the secure filter outside the block because it has no protection port.

    Check yourself Who checks that apb_paddr bits 11 down to 8 are zero, and when?

    The wrapper exports the canonical flag, the lint rule consumes it statically, and the connectivity test from the next topic proves no slave input depends on those bits. Software is additionally restricted to the first image, 0x4000_0000 to 0x4000_00FF.

    Related topics

    • Width and Protocol Adapters

    • Next: Integration Lint and Connectivity Checks

    • PD: Abstract Versus Full View

    Previous

    177 / 289

    Next: Integration Lint and Connectivity Checks

    Up next

    Up nextIntegration Lint and Connectivity Checks

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Why Every Block Is Wrapped