OpenLabs handbook

CPU Visual Handbook

Type an instruction, watch the transistors settle.

Two machines, one engine. A generic accumulator microprocessor that spells the instruction cycle out instant by instant, and a single-cycle RV32I datapath that does the whole thing in one. Both modelled down to the transistor. You write the assembly; the model runs it.

Reference model

The machine in the instruction-cycle lab — its registers, its buses, its two instruction formats and its example program — is reconstructed from a lecture deck by Prof. Filippo Valiante Filho, used with his permission. The text here is our own.

Princípio de Funcionamento de um Microprocessador, Prof. Filippo Valiante Filho · prof.valiante.info · what we took, and what we wrote →

Roadmap

The order in which the concepts hold each other up. Not a queue — later phases reach back, and the map shows it.

Your progress0 of 6

Phase 1 · Signals

One wire, one tick

Phase 2 · Gates

CMOS logic

Phase 3 · Registers and the ALU

Writing a register

Phase 4 · The instruction cycle

The generic ISA

Phase 5 · The datapath, all at once

RV32I base ISA

Phase 6 · Assembly

  • done
  • where you are
  • not written yet
  • The Datasheet · reference, not a step
  1. 01 Signals A wire carries one bit, and time is what it takes to settle.
  2. 02 Gates Transistors into gates, gates into adders. Nothing is a black box.
  3. 03 Registers and the ALU Where a number waits, and where it changes.
  4. 04 The instruction cycle Fetch, decode, execute — spelled out as separate instants instead of drawn as one arrow.
  5. 05 The datapath, all at once Fetch, decode, execute — as one drawing that actually runs.
  6. 06 Assembly Your program is the input. The CPU is the model that consumes it.

Articles and labs

Each phase pairs prose with a model. The article says what is true; the lab is the thing running, and you can break it.

01 Signals

A wire carries one bit, and time is what it takes to settle.

Articles

Labs

  • One wire, one tick coming

02 Gates

Transistors into gates, gates into adders. Nothing is a black box.

Articles

Labs

03 Registers and the ALU

Where a number waits, and where it changes.

Articles

  • The register file coming
  • The registers a computer cannot do without coming

Labs

  • Writing a register coming

04 The instruction cycle

Fetch, decode, execute — spelled out as separate instants instead of drawn as one arrow.

Articles

  • Control is not data coming
  • Instruction formats coming
  • The instruction cycle ready
  • One program, twenty-nine instants coming

Labs

05 The datapath, all at once

Fetch, decode, execute — as one drawing that actually runs.

Articles

  • One instruction, end to end coming

Labs

06 Assembly

Your program is the input. The CPU is the model that consumes it.

Articles

Labs

Handbook assessment

The cumulative assessment has not been authored yet. Available labs and articles remain open for study.