How praneethsaibharath/riscv works
This repository is a staged RV32IM processor project, with FPGA-facing integration and cycle-trace utilities. The principal workflow is instruction fetch through the five pipeline stages to register writeback, augmented by arithmetic, cache, prediction, counter, and bit-manipulation features. The README supports the processor and feature relationships; source excerpts additionally show trace utilities and simulation invocation. Feature implementations beyond the sampled files are represented at their documented directory paths, not inferred internal wiring.
Main entry points: execute_stage.v Execute · pipeline_5stage.v Fetch · memory_stage.v Memory Stage · decode_stage.v Decode
Components 19
Processor Pipeline
- Fetch
feature_1/modules/pipeline_5stage.v - Decode
feature_1/modules/decode_stage.v - Execute
feature_1/modules/execute_stage.v - Memory Stage
feature_1/modules/memory_stage.v - Writeback
feature_1/modules/writeback_stage.v - Hazard Control
feature_1/modules/hazard_unit.v
Execution Extensions
- RV32M Multiplier
feature_2 - IEEE 754 FPU
feature_4 - RV32M Divider
feature_5 - Zbb Operations
feature_9
Memory System
- L1 I-Cache
feature_3 - L1 D-Cache
feature_6
Control And Monitoring
- Branch Prediction
feature_7 - Performance CSRs
feature_8
Trace Utilities
- Pipeline Trace
run_pipeline_trace.py - Feature 1 Trace
feature_1/run_pipeline_trace.py - Feature 2 Trace
feature_2/run_pipeline_trace.py - Pipeline Simulation
feature_1/simulation
Other components
- Program
Connections 19
- Program → Fetch: executes on
README.md - Fetch → Decode: passes instructions
README.md - Decode → Execute: passes operands
README.md - Execute → Memory Stage: passes results
README.md - Memory Stage → Writeback: passes results
README.md - Hazard Control → Fetch: controls stalls
README.md - Hazard Control → Decode: forwards operands
README.md - Execute → RV32M Multiplier: uses arithmetic
README.md - Execute → IEEE 754 FPU: uses arithmetic
README.md - Execute → RV32M Divider: uses arithmetic
README.md - Execute → Zbb Operations: executes operations
README.md - Fetch → L1 I-Cache: reads instructions
README.md - Memory Stage → L1 D-Cache: accesses data
README.md - Branch Prediction → Fetch: predicts targets
README.md - Branch Prediction → Execute: recovers flushes
README.md - Performance CSRs → Writeback: tracks retirement
README.md - Pipeline Trace → Pipeline Simulation: runs simulation
run_pipeline_trace.py - Feature 1 Trace → Pipeline Simulation: runs simulation
feature_1/run_pipeline_trace.py - Feature 2 Trace → Pipeline Simulation: builds benchmark
feature_2/run_pipeline_trace.py