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
    • Clock Sources and PLLs
    • Dividers, Muxes and Glitch-Free Switching
    • Clock Gating Architecture
    • Clock Domain Planning
      • Choosing Domains and Ratios
      • Phase-Related Versus Asynchronous Signoff
      • Domain Table and Ownership
    • Top-Level Crossings
    • Always-On Domain, Wake Policy and a Timer Extension
    • Reset Sources and Reset Tree
    • Reset Sequencing and Release
  • 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

←Clock Domain Planning
  1. Topics
  2. SoC Design
  3. Clock and Reset Architecture
  4. Clock Domain Planning
  5. Choosing Domains and Ratios
On this page

    Part 5 of 14, lesson 10 of 24Part 5 of 14/Clock and Reset Architecture/Lesson 10 of 24All levels

    Choosing Domains and Ratios

    Why NanoSoC has three domains: speed where it pays, slowness where it saves, and integer ratios throughout.

    Why it matters

    The CPU wants the fastest clock the timing will close; the UART wants the slowest clock that still oversamples its baud rate; the fabric wants whatever moves bursts without becoming the bottleneck. One clock for all three wastes power in the peripherals or starves the CPU. Three clocks is the smallest set that gives each job what it needs, and integer ratios keep every crossing cheap to reason about. This lesson makes that trade explicit. Its one job is the choice; how pairs sign off is next.

    The core idea

    The fast domain, clk_cpu at 192 MHz, holds the core, its instruction cache and the CPU side of the asynchronous AXI bridge: exactly the logic whose performance scales with frequency. The system domain, clk_sys at 96 MHz, holds the fabric, the memories, the DMA, the bridge and the fast APB segment: the logic that must keep up with bursts but gains nothing from core speed. The slow domain, clk_per at 24 MHz, holds the UART, SPI, GPIO, interrupt controller and reset controller: peripherals whose rates are 115.4 kbaud (UART) and 6 Mb/s (SPI) against a 24 MHz clock, plus the always-on logic that must run while the PLL sleeps. Ratios 8:4:1 mean one slow period holds exactly 4 system and 8 CPU periods, which bounds synchroniser latency to small whole numbers and keeps the crossing table readable.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    # Domain choice arithmetic: every rate the slow domain must still meet.
    UART_BAUD = 24e6 / (16 * 13)  # NanoSoC teaching values: clk_per, 16x, BAUDDIV 13
    assert abs(UART_BAUD - 115384.6) < 0.1, UART_BAUD
    SPI_CLK = 24e6 / (2 * (1 + 1))  # CLKDIV reset 1
    assert SPI_CLK == 6e6, SPI_CLK
    # The slow domain still oversamples comfortably: 24 MHz / 115 kbaud ~= 208x.
    assert 24e6 / UART_BAUD > 200
    # Fabric peak is clock-limited: 4 B x 96 MHz = 384 MB/s; the burst-16
    # sustained rate is 384 x 16/17 = 361.4 MB/s (NanoSoC specification, bandwidth table).
    peak_mb = 4 * 96e6 / 1e6
    assert peak_mb == 384.0
    assert round(peak_mb * 16 / 17, 1) == 361.4
    # The slow domain would NOT serve a clock-halving: 12 MHz gives 104x
    # oversampling of the fixed 115.4 kbaud only if the divisor halves too.
    assert not (12e6 / UART_BAUD > 200)
    print("PASS: 24 MHz still serves UART/SPI; 96 MHz fabric peaks at 384, sustains 361.4 MB/s")

    What the review looks for

    • Each domain has a stated reason tied to a rate: CPU speed, burst throughput, always-on survival.

    • All ratios are small integers, and any proposed new domain states its ratios before its name.

    • No block sits in a faster domain than its rate needs; the slow peripherals are the test of this.

    Verify and debug

    Check the slowest job per domain against its clock: the UART baud divider, the SPI divider and the interrupt synchroniser hold times all derive from 24 MHz, and halving it must break them loudly in simulation. If a peripheral works at any clock, its rate logic is over-margined or secretly asynchronous; either deserves a question.

    Always-on logic fed from a switched domain. The NanoSoC version of this mistake is putting wake logic in the system domain: the block never wakes because its own clock is off. The domain choice above keeps every wake path on clk_per in the always-on power domain.

    If asked how many domains a chip needs, answer with the method, not a number: group by required rate and availability, minimise the count, keep integer ratios, then price the crossings. NanoSoC lands on three.

    Check yourself Why do integer ratios matter if every crossing is synchronised anyway?

    They bound latency to small whole destination cycles, align edges for testable behaviour, and let one timing analysis cover the pair. Non-integer ratios still work through the same synchronisers but make every budget a worst-case sweep.

    Related topics

    • Next: Phase-Related Versus Asynchronous Signoff

    • CDC and RDC: Identifying Domains

    • CDC and RDC: CDC-Aware Partitioning

    Previous

    100 / 289

    Next: Phase-Related Versus Asynchronous Signoff

    Up next

    Up nextPhase-Related Versus Asynchronous Signoff

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Domain Table and Ownership