Chapter 7 What “combining modules” really means
7.1 There are two kinds of “module”
When we say “combine modules,” we actually tend to confuse two things of different character. First, let’s split them here.
- ① The ISA vocabulary (contract side). The agreement of instructions. A collection of “words”: to the base
RV32I, you add extensionsM·F·C… - ② The hardware parts (machine side). The metal that actually executes that vocabulary. The ALU, the FPU (floating-point unit), and so on.
The preface’s “contract and machine are separate” works, as is, here too. Vocabulary is the contract, parts are the machine. Don’t mix them; first, think separately.
7.2 ① The ISA vocabulary — one base + any number of extensions
The vocabulary side is assembled with “one base + any number of extensions.” The base is RV32I / RV64I (always one). The extensions are M (multiply), A (atomic), F/D (fractions), C (compressed)… (as many as needed). Line up what you’ve added and name it like RV32IMC — the name is, as is, the vocabulary list. (The contents of each extension, one by one, we catalog in the next Chapter 8.)
7.3 ② The hardware parts — the metal that corresponds to the vocabulary
This is the crux of this chapter. Add one vocabulary, and you need a part to execute it. Add the multiply vocabulary (M) → you need a multiplier. Add the fraction vocabulary (F/D) → you need an FPU. Basic integer (I) → the ALU. The vocabulary (contract) and the parts (machine) correspond.
7.4 So, “only as much as you need”
Once this correspondence is clear, the meaning of “only as much as you need” becomes plain. Don’t load vocabulary you don’t need, and you don’t need the matching part = small, low-power (Chapter 6). Conversely, add only the vocabulary with no part, and that instruction won’t (as is) run. Match vocabulary and parts, no more, no less — this is what “choosing and assembling” your own chip means.
F/D = don’t carry an FPU). Why: each vocabulary adds one part, eating area and power. Only the vocabulary you need = only the parts you need = small, low-power. This makes Chapter 6’s “small and simple” concrete.
7.5 Summary
- Modules are two kinds. ① the ISA vocabulary (contract: RV32I + extensions), and ② the hardware parts (machine: ALU, FPU…).
- Add vocabulary, and you need the matching part. Like M → multiplier, F/D → FPU.
- So, “only as much as you need.” Only the vocabulary you need = only the parts you need = small, low-power.