Build a CPU

Step 9 of 9

Real architectures

What a genuine processor adds

The CPU you built is real in structure and tiny in every dimension: four registers, sixteen memory cells, nine instructions, one instruction at a time.

A real processor keeps the same skeleton — fetch, decode, control signals, datapath, write back — and adds scale and overlap. Thirty-two registers instead of four. Billions of memory cells. Caches, because memory is far away. A pipeline, so several instructions are in flight at once. Interrupts, so the outside world can break in.

None of that changes what you built. It makes more of it happen at the same time.

LEGv8 is the teaching subset of ARM used in Computer Organization and Design. Its instructions are the ones you already know, wearing different names:

Your ADD R3, R1, R2 becomes ADD X3, X1, X2. Your LOAD R1, addr becomes LDUR X1, [X0, #addr], and STORE R1, addr becomes STUR X1, [X0, #addr]. The extra punctuation is real addressing — a base register plus an offset — rather than the bare cell number this lab uses.

This step builds on the ones before it, and will make a lot more sense after them. Go to Logic gates