Classroom Public page

Lab Pack 6: Assembler (Week 6)

207 words

The toolchain begins. Five worksheets in worksheets/ch6/ take you from "I can hand-encode" to "I have written the tool that does the encoding." Your assembler produces a VOF object file that runs on your CPU.


Anchors the week

Week 6: Assembler. First piece of software that produces software. Two-pass design (symbol table; encode); pseudo-instruction expansion; VOF emit.

Concept the lab embodies

Automation of a manual process. The hand-encoding skill from week 4 becomes a Python program; the program is yours; you understand every line.

The five worksheets

Worksheet Time Purpose
lab-6.1-tokenizer-and-pass1.md ~120 min Source → tokens; build symbol table
lab-6.2-pass2-encoding-and-pseudos.md ~120 min Tokens → encoded bytes
lab-6.3-vof-emit-sum-to-n.md ~90 min Round-trip on sum-to-N
lab-6.4-end-to-end-on-silicon-and-toolchain-reconciliation.md ~120 min Your assembler's output runs on your CPU
lab-6.5-nm-and-strings.md ~60 min Industry tools (nm, strings) read your output

Grading rubric

Per-worksheet rubrics. Week-level: assembler handles the full RV32I-Lite ISA; sum-to-N round-trips through the assembler and runs on silicon.

What's next

Lab pack 6a: Static Linker. The next layer of the toolchain.