Prerequisites
Give the datapath an instruction contract
This ninth domain follows digital logic foundations and digital control and datapaths. Those lessons establish arithmetic, storage, state machines and accepted transfers. The IC-design route explains implementation; it is useful context rather than a requirement to run a synthesis tool before understanding an instruction.
The architecture lessons are in English and can be followed on paper. Start from what the software-visible machine must do, then explore how implementation choices change time, resource use and data movement.
Follow the six lessons
- ISA and microarchitecture: distinguish the architectural contract from the implementation, introduce RV32I and x86-64 context, and calculate instruction-count/CPI/frequency time.
- Instruction execution: run a fully specified eight-bit teaching machine through loads, arithmetic, a store and a branch.
- Pipelines: overlap stages while preserving dependencies, and count fill, drain and lost cycles.
- Caches: split addresses, trace hits and conflict misses, and keep additional miss penalty distinct from complete miss time.
- Buses and I/O: distinguish memory and device operations, calculate burst payload and reason about completion and shared access.
- CPU and GPU parallelism: account for serial work, active lanes, memory traffic and transfer overhead.
These lessons use original teaching values and a toy instruction listing whose semantics are explicitly separate from real ISA encodings. A mathematical processor trace is not a fabricated core or an execution benchmark.
Combine execution and a memory trace
Run the instruction-execution listing with memory[20] = 6 and memory[21] = 0. What is stored, is the branch taken and what is R1 when execution halts?
Independently, use the four-line, four-byte direct-mapped cache from the cache lesson. Start empty and read byte addresses 0, 1, 4, 0, 16, 0. Count misses and total serialized time with 1 ns lookup plus 20 ns additional miss penalty.
For a separate ideal three-stage pipeline, count cycles for 20 independent instructions with no stalls. At 10 ns per cycle, find elapsed time. Finally, compare a 10 ms CPU task with an accelerator whose kernel takes 2 ms and serialized transfer/setup takes 3 ms.
Explain the combined answer
The toy ADD retains (250 + 6) modulo 256 = 0. STORE writes zero, BNZ is not taken and slot 5 sets R1 to 99 before HALT. Seven instructions execute including HALT. A branch tests the stored bit pattern rather than the unbounded mathematical sum.
The cache trace has four misses and two hits. Serialized time is 6 × 1 + 4 × 20 = 86 ns. Address 16 and address 0 compete for line zero, so the last access misses even though the cache has unused lines.
The ideal pipeline takes 20 + 3 − 1 = 22 cycles, or 220 ns. The separate accelerator comparison totals 2 + 3 = 5 ms, so end-to-end speedup is 10/5 = 2. Kernel-only speedup would answer a different question.
Continue toward firmware
Continue with firmware and embedded to apply these instruction, memory and I/O contracts to startup and peripherals. You should now be able to explain why a faster clock does not guarantee a faster task, why a cache hit rate does not describe every workload and why an accepted I/O write may still await its physical effect. The computing stack links the next available route.
Reading steps
- ISA and microarchitecture — contract, implementation and performance
- Instruction execution — fetch, operands and architectural updates
- Pipelines and hazards — overlap, dependencies and penalties
- Caches and memory hierarchy — locality, tags and misses
- Buses and I/O — transactions, addresses and shared service
- CPU and GPU parallelism — useful work, bandwidth and overhead
Verification record
- Sources assessed by Codex (assistant)
- Example checks recorded
- Independent human review pending
Selected claims have been assessed against the passages below. This record does not certify every sentence or guarantee correctness.
Inspect claims, evidence and limitations
Source assessment: . 1 of 1 selected claims marked supported by the assessor. This is not a coverage percentage for the article.
The route separates instruction behavior from pipelined execution and memory-system implementation.
Assessor finding: supported · model · Article passage
- MIT Computation Structures — 13.1, Building the Beta, datapath and instruction execution — Building the Beta, datapath responsibilities; route order is editorial
Passage read: Inspected the specified primary documentation or teaching passage during this authoring pass.
Assessment is limited to this selected claim under the article’s stated model; original exercise inputs are checked separately.
- MIT Computation Structures — 13.1, Building the Beta, datapath and instruction execution — Building the Beta, datapath responsibilities; route order is editorial
Reproducible checks
- Published tables, state traces, worked arithmetic and reading prerequisites under the explicitly stated teaching assumptions.
Passed on 2026-10-27
node --test --test-name-pattern='architecture examples execute printed instructions, preserve cache mappings, pipeline accounting and scoped throughput with ordered prerequisites' src/library/architecture.test.ts
Limits and open work
- Assistant assessment of selected claims; independent human review remains pending.
- Numerical costs, timings, addresses and capacities are original stipulated inputs, not measurements or universal properties of a device.
- Model checks do not establish physical implementation, compiler correctness, formal proof or hardware deployment unless separately documented.
Independent human review
Pending. No independent human reviewer has signed off this version.
Content fingerprint: 11dba38ffbeff55fb0ca587cadb4e4c1b51b8161319b04267df920e0ce51dee1. An article change invalidates this assessment.
Sources
- RISC-V ratified specification — RV32I base integer ISA, version 2.1
- MIT Computation Structures — 13.1, Building the Beta, datapath and instruction execution
- MIT Computation Structures — 14.1, Caches and the Memory Hierarchy
- MIT Computation Structures — 15.1, Pipelining the Beta, data and control hazards
- NVIDIA CUDA Programming Guide — Programming Model, blocks, grids, warps and SIMT
Published by devutils · Updated · Original explanatory text; sources retain their own terms.