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
    • Designing the Address Map
      • What an Address Map Is
      • Sizes, Alignment and Power-of-Two Windows
      • Holes, Aliases and Reserved Space
      • Planning for Growth and Banks
    • Implementing Address Decode
    • Decode Errors and Default Slaves
    • Register Maps and Banks
    • Security and Privilege Regions
    • The Software View and the Hardware-Software Contract
    • IP-XACT and Automated Assembly
    • Memory-Map Verification
  • Interconnect and Bus Fabrics26
  • Clock and Reset Architecture24
  • Power Architecture21
  • Interrupts, DMA and Peripherals15
  • Memories, Boot and Security21
  • IP Integration and Handoff21
  • Top-Level Verification and Bring-up21
  • Package, Pads and I/O18
  • Chip Signoff and Tapeout18
  • SoC Interview Prep16
  • Capstone: Integrate NanoSoC14
Loading lesson

←Designing the Address Map
  1. Topics
  2. SoC Design
  3. Memory Maps and Address Decode
  4. Designing the Address Map
  5. What an Address Map Is
On this page

    Part 3 of 14, lesson 1 of 26Part 3 of 14/Memory Maps and Address Decode/Lesson 1 of 26All levels

    What an Address Map Is

    The map as a contract between hardware and software: regions, attributes, owners and change control.

    Why it matters

    On the first day of NanoSoC bring-up, the ROM sets the stack pointer to 0x2001_0000 and jumps to 0x2000_0000. Both numbers are bets: the first bets that SRAM0 ends exactly where SRAM1 begins, the second bets that SRAM0 contains the loaded image and not a hole that answers with an error. Every driver makes the same kind of bet every time it touches a base address. The address map is where those bets are written down, and when it is wrong the symptom is never a polite message: the CPU fetches an error response from what the linker thought was memory, or a control write lands in a different block's register.

    The core idea

    A map is a short list of regions, and each region carries five promises. The base and size say which addresses belong to it. Access says what software may do: read-only, read-write, execute or no-execute. Cacheable says whether a cache may hold a copy; on NanoSoC only the instruction cache exists, so this attribute is really about the instruction side. Secure says which security state may enter; SRAM1 and the reset controller admit secure accesses only. Ordering says how strongly accesses are held in order: normal memory may be buffered and merged, while peripheral registers are device-type in the CPU memory attributes, meaning non-cacheable and non-bufferable, so two accesses to the device complete in program order.

    The NanoSoC map is the worked example for the whole section, quoted exactly from the design specification:

    Region

    Base

    Size

    Access

    Cacheable

    Secure

    BOOTROM

    0x0000_0000

    16 KB

    Read, execute

    Yes (I-side)

    Either state

    hole H1

    0x0000_4000

    512 MB minus 16 KB

    None

    n/a

    n/a

    SRAM0

    0x2000_0000

    64 KB

    Read, write, execute

    Yes (I-side)

    Either state

    SRAM1

    0x2001_0000

    64 KB

    Read, write, execute

    No

    Secure only

    hole H2

    0x2002_0000

    About 512 MB

    None

    n/a

    n/a

    DMA

    0x4000_0000

    4 KB

    Registers, device

    No

    Either state

    SBR

    0x4000_1000

    4 KB

    Registers, device

    No

    Either state

    UART

    0x4000_2000

    4 KB

    Registers, device

    No

    Either state

    SPI

    0x4000_3000

    4 KB

    Registers, device

    No

    Either state

    GPIO

    0x4000_4000

    4 KB

    Registers, device

    No

    Either state

    INTC

    0x4000_5000

    4 KB

    Registers, device

    No

    Either state

    RSTPWR

    0x4000_6000

    4 KB

    Registers, device

    No

    Secure only

    hole H3

    0x4000_7000

    36 KB

    None (reserved)

    n/a

    n/a

    hole H4

    0x4001_0000

    To top of 32 bits

    None

    n/a

    n/a

    Two details in that table do real work later. The stack top of 0x2001_0000 is one past the end of SRAM0, which is exactly the base of SRAM1: push the first word and it lands in the last word of SRAM0. And the peripheral window holds seven 4 KB slots out of sixteen, leaving slots 7 to 15, the 36 KB hole H3, for later peripherals without moving a single existing base.

    Who owns the map and what changes it

    The integrator owns the map, and ownership means three duties: every consumer derives from one source, every change is versioned, and no region moves once software depends on it. The consumers are the linker script that places code and data, the C headers that name the register bases, the decode logic in the interconnect, the verification memory model that decides which addresses are legal, and the documentation table. When these are generated from one map table they cannot disagree; when they are copied by hand they eventually do, and a register specification that has drifted from the RTL is the classic result, caught by a model-versus-RTL check and fixed by a single machine-readable source.

    Three things legitimately change a map: a new peripheral that takes a reserved slot, a memory that outgrows its window, and a security review that re-partitions a region. All three are covered in the growth lesson of this topic. Anything else, a shifted base to make room or a resized window for convenience, breaks every consumer at once and is how a mature project learns to say no.

    What the review looks for

    • Every row has all five promises filled in: no region with a blank access, cacheable, secure or ordering column.

    • Each consumer names the map version it was generated from, and all versions match.

    • The reset vector, the stack top and the first fetch address each point at a mapped region with the right attributes.

    Verify and debug

    Read the map against the specification with a script, not by eye: the alignment and overlap checker in the next lesson exists for exactly this. Then check the three addresses the chip cannot boot without: the reset vector at 0x0000_0000 must be readable and executable, the stack top at 0x2001_0000 must be writable memory, and the image base at 0x2000_0000 must be the memory the loader filled. If any consumer disagrees about one of those, the map source wins and the consumer is regenerated.

    A driver header copied from an early map while the RTL moved on. The driver compiles, the addresses look sane, and every access hits the wrong block. Generate headers from the map table and the class of bug disappears; the generating flow is taught in the decode topic for the RTL and in the software topic for the headers.

    If asked to define an address map, give the contract answer: a versioned list of regions with access, cacheable, secure and ordering attributes that software and decode logic both derive from. Then offer the NanoSoC table as the example you can write out.

    Check yourself Why is SRAM1 marked secure-only while SRAM0 is open, and what must the hardware do about it?

    SRAM1 holds material worth protecting, so the interconnect filter must return SLVERR to any non-secure access there. The attribute is only real if the filter enforces it; the enforcement lives in the decode topic.

    Related topics

    • Next: Sizes, Alignment and Power-of-Two Windows

    • Implementing Address Decode

    • Protocol First Principles: Address Maps and Decoding

    • RTL: CSR Contract and Address Map

    Previous

    36 / 289

    Next: Sizes, Alignment and Power-of-Two Windows

    Up next

    Up nextSizes, Alignment and Power-of-Two Windows

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Holes, Aliases and Reserved Space
    • Planning for Growth and Banks