Model Configurations¶
This project provides several system configurations.
core_only
Models only the SPARC core connected to main memory. Every processor-generated address (a virtual address) is used directly to index into main memory, with no translation.core_mmu
Adds a Memory Management Unit (MMU) between the core and main memory. Every processor-generated virtual address is translated to a physical address before it reaches main memory.core_mmu_devices
Adds a timer, an interrupt controller, a serial device and a scratch-pad, as one shared set on the memory side of the MMU, reached by physical address like main memory.core_l1cache_mmu_devices
Adds split instruction and data L1 caches between the core and the MMU. VIVT and write-through.multicore
Several cores (4 by default), each thecore_l1cache_mmu_devicescore with its own caches and MMU, sharing one main memory and one set of devices over a shared bus. Its sitar_model can also run on several host threads at once. It is described in its own section, The Multicore System.
Two more configurations model the APARA accelerator, a vector
compute engine designed to work alongside a SPARC processor: apara,
one engine on its own, and sparc_apara, core_l1cache_mmu_devices
plus one engine, which the SPARC program loads, starts, and exchanges
data with. They are described in their own section, The APARA
Accelerator.
For each configuration, there exist two implementations:
cpp_model
A 0-delay functional model. A plain host C++ function-call chain through the model's components, with no notion of cycles or timing.sitar_model
A cycle-timed model. The same components, driven through Sitar with real per-opcode, interconnect, and memory timing.
The configurations and their path in the project (linked) are summarized here:
| Configuration | Type | Description |
|---|---|---|
| core_only | cpp (functional model) | The core plus main memory. No MMU, devices, or caches. |
| core_only | sitar (timing model) | The core plus main memory. No MMU, devices, or caches. |
| core_mmu | cpp (functional model) | Adds an MMU between the core and main memory. |
| core_mmu | sitar (timing model) | Adds an MMU between the core and main memory. |
| core_mmu_devices | cpp (functional model) | Adds the peripheral devices below the MMU. |
| core_mmu_devices | sitar (timing model) | Adds the peripheral devices below the MMU. |
| core_l1cache_mmu_devices | cpp (functional model) | Adds split L1 caches between the core and the MMU. |
| core_l1cache_mmu_devices | sitar (timing model) | Adds split L1 caches between the core and the MMU. |
| multicore | cpp (functional model) | Several core_l1cache_mmu_devices cores sharing memory and devices. The cores take turns. See Execution Model. |
| multicore | sitar (timing model) | Several core_l1cache_mmu_devices cores sharing memory and devices over a round-robin bus. |
| apara | cpp (functional model) | One APARA engine on its own, no SPARC core. See The APARA Engine. |
| apara | sitar (timing model) | One APARA engine on its own, with its pipeline's timing. |
| sparc_apara | cpp (functional model) | core_l1cache_mmu_devices plus one APARA engine. See The Engine in a System. |
| sparc_apara | sitar (timing model) | core_l1cache_mmu_devices plus one APARA engine, on a two-master bus. |
For each configuration, both the cpp and sitar models include the same
components: core_mmu's MMU, for example, is present in both its
cpp_model and its sitar_model, just reached with 0 added delay in
the former and real Sitar timing in the latter.
See Model Components for the list of all components, such as the SPARC Core, the MMU, and devices, that are included in this project.
Each configuration's folder also has a COMPONENTS file, listing what
it contains, so that the validation runner knows which test suites it
can run (see Validation
Suite).
Sitar Model Structure¶
For specifically the Sitar models, which have a notion of structure and timing, this section describes the structure and component interconnections for each configuration, as well as the code structure.
Configuration: core_only¶
Structure diagram¶
No net crossing anywhere. The core talks directly to memory over a procedure handshake, so zero delay communication is possible between the core and memory procedures. The "--||--" symbol indicates direct communication between the two procedures using a handshake and shared variables.
Model description¶
This shows component instance ownership: which design unit instantiates which, and how many instances.
Top | +-- Core (module) | +-- sparcThread : SparcThread (procedure) | | | +-- 5x VirtualMainMemoryInterface (procedure) | +-- mainMemory : VirtualMainMemory (procedure)
Configuration: core_mmu¶
Structure diagram¶
The core talks to the MMU over the same procedure handshake core_only
uses. The MMU talks to physical memory over two nets, since
PhysicalMainMemory is a module, not a procedure. Crossing a net costs
Sitar's own unavoidable minimum one cycle each way, so even at every
knob's default this configuration cannot reach a fully 0-delay run the
way core_only can.
Model description¶
This shows component instance ownership: which design unit instantiates which, and how many instances.
Top | +-- System (module) | +-- core : Core (module) | | | +-- sparcThread : SparcThread (procedure) | | | | | +-- 5x VirtualMainMemoryInterface (procedure) | | | +-- mmu : Mmu (procedure) | | | +-- 2x PhysicalMainMemoryInterface (procedure) | | | +-- PullAToken / PushAToken (procedure) | +-- mainMemory : PhysicalMainMemory (module) | +-- PullAToken / PushAToken (procedure)
Two nets connect the core to main memory. Each net carries data from an output port to an input port.
| Net | From | To |
|---|---|---|
requestNet |
core.requestOut |
mainMemory.requestIn |
responseNet |
mainMemory.responseOut |
core.responseIn |
Configuration: core_mmu_devices¶
Structure diagram¶
The core and its MMU are unchanged from core_mmu. Below the MMU sits
a bridge, which reads the physical address of each access and sends it
either to main memory or to the peripheral devices (Timer, Serial,
Interrupt Controller). The devices are one shared set on the memory
side, not part of the core. That is what lets several cores share them later.
Every arrow between modules is a net, and every net crossing costs at
least one cycle. A memory access crosses four nets here (core to
bridge to memory, and back), two more than in core_mmu. The
Interrupt Controller sends its interrupt level to the core over its own
net, as a level: a token arrives only when the level changes, and the
core polls that net once per cycle. An interrupt therefore reaches the
core one cycle after the Interrupt Controller raises it.
The devices' behavior is the same C++ class in both models
(PeripheralDevicesCore). The sitar_model's PeripheralDevices module
ticks it once per simulated cycle. The cpp_model has no cycles, yet the
Timer has to count something, so the cpp_model ticks the devices once
after every instruction. One instruction is one model cycle there, and
a timer set to fire after n cycles fires after n instructions. In
the sitar_model an instruction usually takes several cycles, so the
same program sees the timer fire after fewer instructions. Timer
counts are model time in both models, not hardware time (see
Timer). See Peripheral Devices for
what the devices do.
Model description¶
This shows component instance ownership: which design unit instantiates which, and how many instances.
Top | +-- System (module) | +-- core : Core (module) | | | +-- sparcThread : SparcThread (procedure) | | | +-- mmu : Mmu (procedure) | +-- bridge : SystemBridge (module) | +-- mainMemory : PhysicalMainMemory (module) | +-- devices : PeripheralDevices (module)
Seven nets connect the modules. Each net carries data from an output port to an input port.
| Net | From | To |
|---|---|---|
coreRequestNet |
core.requestOut |
bridge.coreRequestIn |
coreResponseNet |
bridge.coreResponseOut |
core.responseIn |
memoryRequestNet |
bridge.memoryRequestOut |
mainMemory.requestIn |
memoryResponseNet |
mainMemory.responseOut |
bridge.memoryResponseIn |
devicesRequestNet |
bridge.devicesRequestOut |
devices.requestIn |
devicesResponseNet |
devices.responseOut |
bridge.devicesResponseIn |
interruptLevelNet |
devices.interruptLevelOut[0] |
core.interruptLevelIn |
Configuration: core_l1cache_mmu_devices¶
Structure diagram¶
The same system as core_mmu_devices, with one more procedure inside
Core: the split L1 caches, between sparcThread and mmu. All three
are procedures of the one Core module, so a cache hit completes with
no net crossing and no added delay (unless a hit-latency knob is set).
A miss reads the whole 64-byte line through the MMU, which costs the
MMU's translation plus eight doubleword transactions through the
bridge. See Model Components for what the
caches do.
Nothing is cached while the MMU is disabled, unless the MMU Control
Register's "always cacheable" bit is set. A program can set
it itself, or the simulator can, with --always-cacheable.
Model description¶
This shows component instance ownership: which design unit instantiates which, and how many instances.
Top | +-- System (module) | +-- core : Core (module) | | | +-- sparcThread : SparcThread (procedure) | | | +-- caches : L1Caches (procedure) | | | +-- mmu : Mmu (procedure) | +-- bridge : SystemBridge (module) | +-- mainMemory : PhysicalMainMemory (module) | +-- devices : PeripheralDevices (module)
The nets are the same seven as in core_mmu_devices.
The multicore configuration¶
The Sitar structure of multicore, its array of cores and the shared
bus between them, is described in its own section, in Model Structure and
Assumptions.
The APARA configurations¶
The Sitar structure of apara and sparc_apara is described with the
engine, in The APARA Accelerator section: the
engine's pipeline modules and nets in APARA Timing
Model, and how the engine and
its host side join core_l1cache_mmu_devices in The Engine in a
System.