Add phase-by-phase tutorial notes

Add a Tutorial tree that mirrors the roadmap from Phase 0 through Linux bring-up.
Each phase and subphase gets a short learning note with consistent sections for
context, goals, new concepts, mental model, learning tasks, pitfalls, tooling,
testing, and references.

The tutorial material is intentionally explanatory rather than implementation
code. It gives a systems-oriented learner enough FPGA, SystemVerilog, RISC-V,
firmware, and Linux bring-up context to approach each roadmap phase without
turning the notes into copy-paste RTL.
This commit is contained in:
2026-04-28 12:11:23 +02:00
parent 8edfc86027
commit b008b37d49
43 changed files with 2110 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# Phase 13 - Pipeline
## Context
Pipelining overlaps multiple instructions to improve throughput. This is optional for
the Linux goal but highly educational for computer architecture.
## Goals
- Insert registers between conceptual stages.
- Handle data and control hazards.
- Re-run regression tests after changing timing structure.
## New Concepts
- Pipeline stage: portion of instruction work separated by registers.
- Hazard: situation where overlapping instructions would produce wrong behavior.
- Forwarding: using a result before it reaches the register file.
- Flush: discarding wrong-path instructions.
- Stall: holding one or more stages until a hazard clears.
## How To Think About It
A pipeline is not just adding registers. It changes when values are available and when
instructions retire. Correctness depends on explicit hazard handling.
## Learning Tasks
- Draw instruction timelines for dependent arithmetic operations.
- Identify where branch decisions occur and what must be flushed.
- Decide how multi-cycle M and memory operations interact with the pipeline.
## Pitfalls
- Adding pipeline registers before defining valid/kill/stall behavior.
- Forgetting load-use hazards.
- Letting exceptions retire out of order.
## Tooling And Testing
- Keep a non-pipelined core as a conceptual reference.
- Run compliance tests before and after each pipeline milestone.
- Add trace logging of retired instructions if possible.
## References
- Computer Organization and Design RISC-V edition: https://shop.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-820331-6
- Hazard overview: https://en.wikipedia.org/wiki/Hazard_(computer_architecture)
- RISC-V formal interface concepts: https://github.com/SymbioticEDA/riscv-formal