mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-04 22:32:36 +00:00
- Adjusted slot assignments in to reflect new peripheral mappings. - Updated to validate new OpenC906 configurations, including generator and profile checks. - Modified to reference the new Std-series VexiiRiscv generator. - Changed cache maintenance instructions in to align with C906 specifications. - Revised assertions in to account for internal unit removals. - Updated to reflect changes in peripheral interface counts and policies. - Added new test file to ensure preservation of the frozen HP configuration in the Std-series generator.
185 lines
10 KiB
Typst
185 lines
10 KiB
Typst
#import "../style.typ": *
|
|
#change-start("v05-emphasis-architecture","Selected body emphasis: architecture")
|
|
#import "../figures.typ": *
|
|
#import "../waveforms.typ": timing
|
|
#import "../diagram-packages.typ": memory-window-diagram
|
|
#import "../soc-architecture.typ": soc-functional-diagram
|
|
|
|
= System Architecture
|
|
#change-start("dev-architecture","Ten-master fabric, address map, LP IRQ and lifecycle reference")
|
|
== Introduction
|
|
=== SoC Architecture
|
|
Mini PRODUCT contains *two fixed harts*, an LP-owned control plane, a native HP data fabric and
|
|
two APB4 register islands. There is *no hardware cache coherency*. Software transfers shared
|
|
buffer ownership explicitly and performs the required fences and cache maintenance.
|
|
|
|
#figure(soc-functional-diagram(), caption:[Mini PRODUCT functional architecture and clock domains.])<soc-functional-overview>
|
|
|
|
=== Management Processor
|
|
==== Hazard3
|
|
Hazard3 is hart 0 and the *root-management processor*. The reference profile selects RV32IM
|
|
firmware. Its AHB-Lite interface is adapted to AXI32 for control access; memory transactions
|
|
are directed through the LP gateway to the shared data plane. The management JTAG path provides
|
|
halt, resume, register and system-bus access. LP retains control while HP is held in reset.
|
|
#source-note("docs/hazard3-debug.md", title:"Management debug transport and acceptance flow")
|
|
|
|
=== Application Processor
|
|
==== OpenC906
|
|
The HP hart is the locked T-Head OpenC906 pre-generated RTL in its default RV64GC
|
|
configuration, with supervisor/user modes and Sv39 virtual memory. Hart 1 issues a single
|
|
*128-bit AXI4 master*, downsized to the 64-bit HP data fabric and split into memory and MMIO
|
|
ports by address window. The uncached MMIO path is downsized further and crosses into the LP
|
|
control plane. Its CLINT/PLIC are *core-internal* (c900 layouts) and never appear as SoC
|
|
fabric targets. OpenSBI/Linux inputs and the vendored core revision are dependency-locked.
|
|
#source-note("docs/lp-hp-architecture.md", title:"LP/HP architecture and boot contract")
|
|
|
|
#include "processor-details.typ"
|
|
|
|
== Interconnect
|
|
=== AXI4 and APB4 Interfaces
|
|
The product replaces the former NMI/AXI4-Lite/APB3 organization with AXI4 control and data
|
|
paths and APB4 register targets. The compatibility RIBP boundary for selected MPW cores is
|
|
described in @mpw. It is not the PRODUCT data fabric.
|
|
|
|
The LP control fabric uses 32-bit data. APB accesses cross LP to PCLK through asynchronous
|
|
request/response bridges. The HP data plane uses 64-bit data, 32-bit addresses and seven-bit
|
|
global transaction IDs. Adapters preserve byte lanes and response attribution across width
|
|
and clock boundaries. HP MMIO cannot write root-owned SYSCTRL/RCU, watchdog, GPIO administration
|
|
and other protected management controls.
|
|
|
|
#change-start("system-fabric", "PRODUCT control and memory circuit paths")
|
|
#figure(fabric-diagram(), caption:[PRODUCT control and memory paths. Gateway adaptation and CDC separate the functional clock domains.])<fabric-diagram>
|
|
#change-end("system-fabric")
|
|
|
|
=== Common Bus Protocols <common-protocols>
|
|
The following WaveDrom examples define the handshake notation used by the IP chapters.
|
|
They show valid protocol ordering, not guaranteed transaction latency. Address windows,
|
|
byte strobes, burst limits, access permissions and IP-specific side effects remain binding.
|
|
|
|
#timing("apb4",[APB4 setup, access and wait-state example.])
|
|
#timing("axi4",[AXI4 read-address and response-channel example.])
|
|
#timing("axis",[AXI4-Stream backpressure and end-of-transfer example.])
|
|
|
|
=== Interconnect Matrix
|
|
The #data.policies.len() initiator identities access #data.targets.len() memory targets. The crossbar arbitrates reads and
|
|
writes separately for each target. I/O gateway A combines USB2, SDIO0 and the APU private
|
|
master; gateway B combines SDIO1 and SPI-SD. JPEG occupies slot 6, EXT-H slot 7,
|
|
GA2D slot 8 and NPU slot 9.
|
|
|
|
#note[The matrix on the next page is generated from the RTL access policy. R/W permission is
|
|
subject to active memory-pad mode, resource ownership, target readiness and EXT-H address bounds.
|
|
An allowed entry does not guarantee throughput.]
|
|
|
|
#pagebreak()
|
|
#figure(matrix-diagram(), caption:[AXI64 memory access matrix: R = read, W = write, - = denied.])<bus-matrix>
|
|
The HP memory master is the only instruction-permitted initiator. HP cache attributes are preserved;
|
|
DMA, I/O gateways, LP gateway, JPEG, EXT-H, GA2D and NPU require non-cacheable transactions. XPI is read-only
|
|
on this data plane; indirect writes use its APB-controlled command engine.
|
|
|
|
Denied accesses return a finite error response with source attribution. EXT-H has additional
|
|
read/write address bounds. SRAM and SDRAM use multiple outstanding credits; serial targets
|
|
have more restricted concurrency. Software must not assume coherency or treat theoretical bus
|
|
width multiplied by clock rate as measured application bandwidth.
|
|
#source-note("rtl/mini/integration/soc_topology.json", title:"Generated matrix source: data_master_policies")
|
|
#pagebreak()
|
|
|
|
#include "bus-programming.typ"
|
|
|
|
=== Address Mapping
|
|
All ranges below are inclusive. The SRAM range is resolved using the reference profile's
|
|
32 KiB setting. Peripheral windows are address allocations; not every offset implements a
|
|
register. Detailed contracts define valid offsets and access modes. Reserved regions do not
|
|
advertise an implemented IP.
|
|
|
|
#ds-table("memory", [Memory and reserved data apertures],
|
|
([Window], [Base], [End], [Size]),
|
|
data.regions.filter(r=>r.route in ("axi4","ram","reserved") and r.size > 4096).map(r=>(
|
|
code(r.symbol),code(r.base_hex),code(r.end_hex),r.size_label)),
|
|
widths:(1fr,1.1fr,1.1fr,0.65fr),
|
|
notes:[FLASH is the reset/boot alias. SPISD's former card-data aperture is reserved. HP_C906_SYS
|
|
is reserved for the HP core's internal CLINT/PLIC decode; it is not a SoC fabric target. The physical
|
|
capacity of fitted XPI/OPI devices remains board-dependent.],
|
|
)
|
|
#ds-table("registers", [Register and interrupt-controller windows],
|
|
([Window], [Base], [Size], [Integration]),
|
|
data.regions.filter(r=>not(r.route in ("axi4","ram","reserved") and r.size > 4096)).map(r=>(
|
|
code(r.symbol),code(r.base_hex),r.size_label,r.availability)),
|
|
widths:(1.3fr,1fr,0.6fr,1.35fr),
|
|
)
|
|
<reserved>
|
|
GA2D occupies the active 4 KiB APB4 window at 0x10012000. The former SPI-SD data aperture
|
|
remains reserved. PRODUCT keeps a compatibility responder at the former selectable user-IP
|
|
window; it does not instantiate MPW user IPs there.
|
|
|
|
#block(breakable:false)[
|
|
#figure(memory-window-diagram(),kind:image,supplement:[Figure],caption:[Selected PRODUCT memory address windows in the reference configuration.])<memory-window-layout>
|
|
]
|
|
|
|
#pagebreak()
|
|
#include "memory-use.typ"
|
|
== Clock and Reset
|
|
=== Architecture
|
|
The RCU compatibility wrapper contains the product clock/reset subsystem. AON uses REF24;
|
|
LP resets to REF24 and HP resets to the external 72 MHz safe source. The reference profile
|
|
disables the PLL. Generic PLL selectors model 72-240 MHz in 24 MHz steps; these are digital
|
|
integration choices, not qualified silicon speed grades.
|
|
|
|
#change-start("system-clocks", "System clock and reset circuit organization")
|
|
#figure(clock-diagram(), caption:[Clock-domain organization and reset defaults. Frequencies shown are configuration values.])<clock-diagram>
|
|
#change-end("system-clocks")
|
|
|
|
The memory root is the stable external 72 MHz clock divided by two. Audio, DVP pixel, ULPI and
|
|
JTAG have independent clocks. The inventory below lists domains without presenting synthesis
|
|
constraint periods as measured operating limits.
|
|
#ds-table("domains", [Canonical clock/reset-domain inventory],
|
|
([Domain], [Clock signal], [Reset signal]),
|
|
data.clocks.map(d=>(d.name,code(d.clock),code(d.reset))),widths:(0.6fr,1.45fr,1.45fr),
|
|
)
|
|
|
|
=== Reset and Logic
|
|
Clock changes validate the request, block new traffic, quiesce and drain accepted work, park
|
|
LP, select the safe source, apply and qualify the PLL setting, then restore the requested
|
|
roots. Timeout or lock loss returns to the safe source and retains fault status. Reset
|
|
release uses per-domain synchronizers; coordinated warm flushes prevent stale transactions
|
|
from re-entering a restarted domain.
|
|
#source-note("docs/pll-clock-control.md", title:"Clock transition, fault and PLL control contract")
|
|
#tbd[PLL jitter, PVT range, clock-tree closure and pad-level reset timing require physical
|
|
qualification. No crystal-oscillator range or maximum core frequency is specified here.]
|
|
|
|
#include "operating-states.typ"
|
|
#include "reset-summary.typ"
|
|
#include "clock-programming.typ"
|
|
|
|
== Interrupt System
|
|
The management interrupt vector is 64 bits wide; two local causes and 62 external positions
|
|
are distinct from the currently allocated source list. The following numbers are
|
|
LP vector bits, not HP PLIC IDs. Peripheral-level status registers identify causes
|
|
within an aggregate source. Resource-controlled interrupts are routed according to ownership.
|
|
#ds-table("lp-irqs", [LP interrupt vector],
|
|
([LP bit], [Source], [Description]),
|
|
data.interrupts.map(i=>(str(i.core_bit),code(i.name),i.description)),
|
|
widths:(0.45fr,1.25fr,2fr),
|
|
)
|
|
|
|
HP local software/timer interrupts come from the core-internal CLINT, and external sources
|
|
from the core-internal PLIC (T-Head c900 layouts, decoded inside the OpenC906 core). Sixteen
|
|
SoC external sources are wired; *SoC source n reaches software as PLIC ID n+16*. Source 1 is
|
|
UART1, source 2 is the mailbox doorbell, source 3 is EXT-H, and sources 4-12 are the
|
|
resource-owned DMA, USB2, SDIO0, SDIO1, SPI-SD, JPEG, APU, GA2D and NPU lines; sources 13-15
|
|
are reserved. GA2D uses LP vector bit 32 (external ordinal 30),
|
|
which is distinct from HP external source 11; NPU uses LP vector bit 33 (external ordinal 31)
|
|
or HP external source 12 according to Resource Controller ownership. The PLIC drives the
|
|
hart's machine and supervisor external interrupts.
|
|
Claim/complete and priority rules follow the T-Head C906 manuals.
|
|
#block(above:rhythm.metadata-before,below:rhythm.metadata-after,breakable:false)[
|
|
#set text(size:9pt)
|
|
#source("docs/ip/hp-platform.md",title:"HP PLIC, local interrupts and mailbox") · LP software: @irq-runtime
|
|
]
|
|
|
|
#include "system-management.typ"
|
|
#include "register-programming.typ"
|
|
#include "interface-subsets.typ"
|
|
#change-end("dev-architecture")
|
|
|
|
#change-end("v05-emphasis-architecture")
|