RISC-V's fixed 32-bit instruction width has an energy cost: fetching 4 bytes per instruction, even when a simpler encoding (like ARM Thumb's 16-bit) would suffice.
The RV32C (Compressed) extension addresses this: 16-bit encodings for the most common instructions reduce instruction memory bandwidth by ~25-30%, which directly reduces:
| ISA variant | Avg instruction size | Relative fetch energy |
|---|---|---|
| RV32I | 4.0 bytes | 1.00× |
| RV32IC | ~3.0 bytes | ~0.75× |
| ARM Thumb-2 | ~3.2 bytes | ~0.80× |
Your Project 1 implements RV32I without the C extension — but in a battery-powered product, adding RV32C would be one of the first optimizations.
Your Verilator testbenches are executable specifications of your processor:
test_addi.sv documents that ADDI x1, x0, 42 stores 42 in x1 after exactly 4 cycles.ADDI, the test fails — the specification is enforced, not just written.Your project repository can run Verilator tests on every push:
# .github/workflows/test.yml
name: Verilator tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make -C tb test
Module 3 - HW/SW Interfaces (Weeks 7-9): extending your core with a custom MUL instruction, a memory-mapped bus, and UART/timer/GPIO peripherals - Project 2.