Architecture review is a structured argument that a proposed machine satisfies its software contract under its intended workload and failure model. A block diagram can show components without proving that instruction state, memory visibility, exceptions, device ownership, and performance budgets compose. This review uses a hypothetical 4-core image-processing SoC to demonstrate the evidence a reviewer should request.
Review packet
The proposal contains an ISA summary, pipeline diagram, cache hierarchy, page-table model, DMA rings, and benchmark results. The cores are four-wide out of order, have private 32 KiB L1 caches and shared 2 MiB L2, use write-back coherence, and share DRAM. A camera writes frames through DMA; software applies a filter and sends output to a display engine. The design claims 30 frames per second and “strong consistency” without defining memory-ordering operations or the p99 latency boundary.
The first review question is scope: which claims are architectural and which are implementation assumptions? If software binaries depend on an instruction’s exact overflow or alignment behavior, that behavior belongs to the ISA. If the claim is that a loop usually hits in L1, it is a workload-dependent performance hypothesis. If a driver assumes a DMA buffer is not reused until completion, that is an ownership protocol. Each claim needs a different proof or measurement.
Review the boundary
Why must an architecture review test both the functional contract and the performance model?
Classify each option as correct or incorrect, or leave uncertain options unanswered (“I don't know”) and verify at any time.
Contract completeness
Review the architectural state: registers, PC, privilege modes, memory model, exception causes, atomic operations, vector state, and device address-space attributes. For every instruction class, ask what changes and what remains unchanged. An illegal instruction must not inherit a neighbor’s write enable. A faulting load must specify whether the PC points to the faulting instruction and whether retry is legal.
Check type boundaries: signed and unsigned arithmetic, extension rules, unaligned accesses, byte order, vector tails, and floating-point rounding. An ISA that says “integer add” without overflow semantics forces compilers and debuggers to guess. A device interface that permits arbitrary access widths can create incompatible implementations.
Worked audit finding. The proposed ISA says loads return a word but does not say whether a byte load sign-extends, zero-extends, or leaves upper bits unchanged. This is a blocking defect because software cannot write a portable decoder and a compiler cannot preserve source-level signedness. The reviewer must request a precise table of width and extension behavior.
Review the refinement boundary
A review claims a speculative core is correct because its final benchmark output matches once. No trace connects speculative state to in-order architectural retirement.
Which evidence addresses the missing correctness argument?
Datapath and pipeline audit
Trace one instruction of each class through every stage. For each stage, identify its inputs, outputs, valid bit, control bundle, and side effects. Confirm that destination identifiers travel with their results and that bubbles disable all architectural writes. Check the critical path and the clock constraint using worst-case rather than average delay.
Audit hazards with adversarial sequences: dependent ALU chains, load-use pairs, branch-after-compare, back-to-back writes to one register, memory stalls, and exceptions after speculation. Ask which forwarding paths exist, which dependencies stall, and how the controller prevents deadlock. A review finding must include a trace that demonstrates the failure or a proof that the path is safe.
For out-of-order execution, inspect rename-map checkpoints, physical-register reclamation, load/store disambiguation, reorder-buffer retirement, and store visibility. The statement “execution is out of order but results are correct” is not evidence. The design needs a refinement argument to the ISA and a precise exception story.
Memory-system audit
Compute cache tag/index/offset fields from capacity, line size, and associativity. Identify conflict traces and estimate AMAT from local miss rates. Examine write-back eviction ordering, dirty state, coherence transitions, and fence semantics. A write-back cache without a coherence policy is not a complete shared-memory design: two cores may read different copies after one writes.
Review virtual-memory interaction: TLB tags or ASIDs, page-table levels, permission checks, page faults, cache aliases, invalidation, and frame reuse. A stale TLB entry after context switch is a security defect, not merely a performance problem. A page-table update without interprocessor shootdown can expose a frame to the wrong process.
Review the memory model with a message-passing test. A producer writes data then a flag; a consumer observes the flag then reads data. State which release/acquire or fence operations make the intended order visible. Coherence of each location is not enough to prove cross-location ordering.
I/O and ownership audit
The camera DMA path must specify buffer allocation, IOMMU mapping, cache synchronization, descriptor publication, completion ordering, interrupt behavior, timeout, reset, and buffer reuse. Draw the ownership states and mark which agent may write each field. A completion carrying an invalid length must be rejected before it becomes an array bound.
| Audit Dimension | Verification Standard | Failure Mode Observed | Audit Remediation Action |
|---|---|---|---|
| MMIO Attributes | Strongly-ordered, non-cacheable | Cache hit returns stale device status register | Configure page table entry with Device-nGnRE / PMA I/O attributes |
| Side-Effect FIFO Read | Non-speculative load dispatch | Speculative load silently drains hardware FIFO entry | Enforce load fence (fence r, r / lfence) before FIFO read |
| DMA Descriptor Publication | Strict release barrier | Device reads partially initialized descriptor | Insert fence w, o (write-to-output fence) before ringing doorbell |
| Buffer Ownership Handshake | Single-writer / single-reader | CPU processes buffer while camera DMA writes | Require explicit generation match and ownership bit check |
Review device-memory attributes. Caching a status register can return stale state; speculative reads can acknowledge a side-effect register unexpectedly. A barrier used for ordinary memory may not order a device doorbell. The driver and hardware specification must name the required primitive.
Performance and measurement audit
The proposal’s 30-frame-per-second claim should be decomposed into input, processing, output, scheduling, and queueing. Count arithmetic operations, estimate bytes moved, compute a roofline ceiling, and identify whether the design is compute- or bandwidth-bound. Then examine p50 and p99, not only average frame time. If input bursts or DMA interrupts create queueing, mean throughput can hide missed latency targets.
Benchmark methodology must state input dimensions, pixel distribution, alignment, compiler flags, warm-up, core placement, frequency, cache state, repetitions, and timing boundaries. Counters should test mechanisms: cache misses, branch misses, bandwidth, queue occupancy, and stall reasons. A review should reject “2× faster” when the baseline uses different correctness settings or excludes setup that the product must pay.
Safety and security audit
Enumerate assets and adversaries: user frames, page tables, device buffers, privileged code, and inter-core messages. Check memory-safety arithmetic, privilege boundaries, IOMMU mappings, speculative side channels, cache timing, and stale ownership. Identify the blast radius of a compromised device or driver. A security control must map to a threat and have a test or operational signal.
| Hardware Security Dimension | Attack Surface Evaluated | Concrete Vulnerability Mechanism | Verified Defense Invariant |
|---|---|---|---|
| DMA Access Authority | PCIe bus-mastering endpoints | Compromised peripheral overwrites OS page tables | Hardware IOMMU enforces page-table isolation per device domain |
| Transient Execution Leakage | Branch predictor & out-of-order execution | Spectre v1 bounds-check bypass reads host memory | Speculative execution barrier (sb / lfence) on untrusted indexing |
| Rowhammer DRAM Disturbance | Repeated activation of adjacent DRAM rows | Bit-flips induced in adjacent physical memory pages | Target Row Refresh (TRR) enabled in DRAM controller |
| Fault Recovery & Privilege Containment | Bus error / ECC double-bit parity trap | Kernel panic or uncontained privilege escalation | Synchronous Machine Check Exception (MCE) kills only faulting task |
Check fault containment: illegal instruction, page fault, ECC error, DMA overrun, device timeout, thermal throttling, and power loss. For each, state whether the processor retries, kills a process, resets a device, degrades service, or enters a machine-check path. An architecture that only describes the happy path is incomplete.
Review decision and evidence levels
Classify findings as blocking correctness defects, unverified assumptions, performance risks, or maintainability concerns. A design decision is strong when it has a precise invariant, a worked trace or proof, an experiment plan, and a rollback or recovery story. “The simulator passed” is evidence only for the tested traces and simulator model. “The benchmark improved” is evidence only for the stated workload and measurement boundary.
Worked decision. The proposal uses write-back private L1 caches but gives no coherence protocol. Reject as incomplete because a two-core program can write a shared location and observe stale values, violating the memory model. A revision must specify a protocol, fence interaction, invalidation/ownership transitions, and tests for write-write, read-after-write, false sharing, and eviction. The reviewer should not approve the design merely because single-core benchmarks pass.
Required review report
Construct a one-page architecture claim table, a block and sequence diagram, three adversarial traces, two quantitative models, a threat model, and a list of open assumptions. For every claim, label evidence as theorem/proof, simulation, benchmark, specification, or expert judgment. Include one finding you expect the design team to disagree with and the measurement that would settle it.
Before signing off, perform a boundary review. Ask what happens at zero and maximum lengths, the first and last cache line, a branch taken at a page boundary, an exception after a younger DMA request, a context switch while a TLB entry is cached, a device reset while a descriptor is in flight, and a power failure after a storage acknowledgement. These cases expose whether the design has a real state model or only a collection of nominal diagrams. Record the expected architectural observation and the internal mechanism that enforces it for each case.
The final review meeting should separate disagreement about a requirement from disagreement about an implementation. If two reviewers disagree about whether a frame may be dropped, first resolve the service contract; if they agree on the contract but disagree about a cache or DMA mechanism, compare evidence against the invariant. This prevents architecture review from becoming a preference contest and makes the decision reversible when a measured assumption changes.
Deep Practice
Solve these problems to test and consolidate your understanding. Complete worked solutions and diagnostic hints are available for each problem.
Exercise 5.3.1: ISA Width, Extension, and Exception Contract Audit
A proposed 64-bit ISA manual defines LB rd, offset(rs1) as “loads one byte from effective address rs1 + offset into rd”, omits unaligned-access fault rules for LW/LD, and leaves EPC unspecified when a data TLB miss traps during a speculative load. Identify the three blocking contract defects and write the exact architectural state rules needed to close them.
HintExpandCollapse
Check upper-bit semantics in the 64-bit destination register, alignment fault behavior, and precise exception state.
Worked solutionExpandCollapse
- Upper-bit extension ambiguity: The manual must distinguish signed sign-extension (
LB: bits63..8filled with bit7) from unsigned zero-extension (LBU: bits63..8zeroed); leaving upper bits undefined or preserved prevents portable compilation ofint8_tvs.uint8_t. - Alignment contract omission: For multi-byte loads (
LW,LD), specify whether unaligned addresses trap with an alignment fault or split atomically/non-atomically across cache lines, and define the trap vector and memory side-effect guarantee. - Imprecise trap specification: On a data TLB miss, the ISA must enforce precise exceptions:
EPCrecords the faulting load’s PC,rdremains unmodified, and younger speculative instructions are squashed before architectural commitment.
Exercise 5.3.2: Out-of-Order Speculative Store and Forwarding Audit
A four-wide out-of-order core verifies single-cycle branch prediction recovery in simulation, yet allows executed stores to write L1 cache lines before reaching the head of the reorder buffer (ROB) and forwards from the store buffer by matching only word-aligned addresses without byte-mask checking. Construct an adversarial instruction sequence demonstrating architectural failure for each flaw and state the hardware invariants that fix them.
HintExpandCollapse
Trace a store younger than a faulting load for early L1 writes, and a partial byte store followed by a wider load for forwarding.
Worked solutionExpandCollapse
- Premature store write trace: Suppose instruction (
LD x1, 0(x2)) raises a page fault while younger (SW x3, 0(x4)) writes L1 early. When traps at ROB retirement, architectural memory already contains ‘s speculative store, violating precise exceptions and potentially corrupting shared data visible to other cores or DMA. Invariant: Stores remain buffered in a speculative store queue and commit to L1 only upon reaching the non-faulting head of the ROB. - Width-blind forwarding trace: Suppose (
SB x5, 0(x10)) writes byte 0 while (LW x6, 0(x10)) reads all four bytes[0..3]. Word-address-only matching either returnsx5with stale/zero upper bytes or fails to merge bytes[1..3]from L1. Invariant: Store-to-load forwarding requires full containment of the load’s byte mask within the matching store’s byte mask (or stalling/merging byte-by-byte from L1).
Exercise 5.3.3: Weakly Ordered Message-Passing Failure Trace and Fence Repair
Given Core 0 executing M[data] = 42; M[flag] = 1; and Core 1 executing while (M[flag] == 0); r1 = M[data]; on a weakly ordered multicore processor with coherent caches (initially M[data] = 0, M[flag] = 0), construct a trace showing how r1 == 0 can occur and specify the architectural ordering repair.
HintExpandCollapse
Coherence guarantees single-address serialization, not cross-address store-to-store or load-to-load ordering across data and flag.
Worked solutionExpandCollapse
- Failure trace without barriers: Even with hardware cache coherence (MESI), Core 0’s store buffer or interconnect can make the write
M[flag] = 1visible to Core 1 beforeM[data] = 42drains, or Core 1’s out-of-order load unit can speculatively readM[data](observing0) before the loop exits onM[flag] == 1. - Architectural repair: Core 0 must issue a release store (
stlrorfence w, wbetween the stores todataandflag), and Core 1 must issue an acquire load (ldarorfence r, rafter observingM[flag] == 1and before readingM[data]).
Exercise 5.3.4: Camera DMA Ownership Invariant and MMIO Attribute Audit
In the camera SoC proposal, the driver maps MMIO device status and read-to-clear FIFO registers as normal write-back cacheable memory and updates the DMA ring tail doorbell immediately after writing descriptor fields in cached DRAM. Identify two correctness/hardware corruption failures this causes and formulate the memory-attribute, ordering, and IOMMU isolation invariants required for a sound I/O interface.
HintExpandCollapse
Examine stale/speculative MMIO reads, descriptor publication order across memory/I/O domains, and device physical address bounds.
Worked solutionExpandCollapse
- MMIO cacheable failure: Caching status registers returns stale values from L1 instead of live device state, while speculative loads into a read-to-clear FIFO register silently drain queued hardware words on mispredicted paths. Invariant: Map all MMIO register ranges with strongly ordered, non-cacheable, non-speculative attributes (
Device-nGnRE/ I/O PMA) and guard side-effect reads with load barriers (fence r, r/lfence). - Doorbell race & DMA isolation: Without a write-to-output barrier and cache flush (on non-coherent DMA), the device can fetch uninitialized descriptor bytes after seeing the doorbell write; without an IOMMU, a corrupted descriptor can target kernel page tables. Invariant: Flush/clean descriptor lines if non-coherent, issue
fence w, obefore ringing the MMIO doorbell, verify buffer generation/ownership tags on completion, and confine device bus mastering through an IOMMU page-table domain covering only active frame buffers.
Exercise 5.3.5: Separating Throughput Averages from p99 Latency and Roofline Evidence
The review packet claims the 30 fps / 25 ms p99 latency SLO is met because mean frame latency is and cites a speedup over a scalar baseline compiled at -O0. Explain why neither metric establishes the SLO or microarchitectural claim, and design a falsifiable measurement protocol using latency distributions, hardware counters, and roofline arithmetic intensity.
HintExpandCollapse
Compare mean vs. tail percentiles under jitter, critique unoptimized baselines, and bind DRAM traffic to frame latency ceilings.
Worked solutionExpandCollapse
- Why mean and
-O0evidence fail: A mean easily violates a p99 bound whenever DMA interrupts, TLB shootdowns, or DRAM refresh/queueing create a heavy tail (e.g., 5% of frames taking Comparing against-O0attributes basic register allocation and dead-code removal to the proposed hardware. - Falsifiable measurement protocol:
- Benchmark against an
-O3/vectorized reference implementation with pinned frequencies, warm-up policy, and fixed input resolution RGBA). - Record full per-frame latency percentiles across contiguous frames with concurrent camera DMA load.
- Collect hardware counters (retired ops, DRAM CAS read/write bytes, L1/L2 miss stalls, TLB misses) to compute measured operational intensity on the roofline model and verify which stage bounds
- Benchmark against an