How govardhnn/riscv_single_cycle_processor works
This repository implements a simulation-validated, 32-bit single-cycle RISC-V processor. Its principal hardware workflow fetches an instruction from shared memory, decodes it, executes it in the datapath, and commits register, CSR, or memory effects at the clock edge; traps redirect control flow through machine CSRs. The graph follows the README’s architecture description and source paths in the tree. No RTL excerpts were supplied, so relationships are documented at that level rather than inferred from unsampled code.
Main entry points: Core_Datapath.v Core datapath · Control_Unit.v Control unit · Data_Memory.v Unified memory · Single_Cycle_Top.v Single-cycle top
Components 14
Core integration
- Single-cycle top
rtl/Single_Cycle_Top.v - Single-cycle core
rtl/Single_Cycle_Core.v - Unified memory
rtl/Data_Memory.v
Instruction control
- Control unit
rtl/Control_Unit.v - Main decoder
rtl/Main_Decoder.v - ALU decoder
rtl/ALU_decoder.v - Instruction checks
rtl/Instruction_Check.v
Execution datapath
- Core datapath
rtl/Core_Datapath.v - PC control
rtl/PC.v - Register file
rtl/Register_File.v - ALU
rtl/ALU.v - Immediate extension
rtl/Extend.v - Writeback selection
rtl/Result_Mux.v
Machine state
- Machine CSRs
rtl/CSR_File.v
Connections 16
- Single-cycle top → Single-cycle core: connects
README.md - Single-cycle top → Unified memory: connects
README.md - Unified memory → Control unit: supplies instruction
README.md - Unified memory → Core datapath: supplies instruction and data
README.md - Control unit → Core datapath: provides controls
README.md - Core datapath → Unified memory: provides address and store data
README.md - Core datapath → Machine CSRs: accesses
README.md - Machine CSRs → Core datapath: returns CSR and trap state
README.md - Control unit → Main decoder: decodes
README.md - Control unit → ALU decoder: selects ALU operation
README.md - Control unit → Instruction checks: checks encoding
README.md - Core datapath → PC control: selects next PC
README.md - Core datapath → Register file: reads and writes
README.md - Core datapath → ALU: executes operations
README.md - Core datapath → Immediate extension: extends immediates
README.md - Core datapath → Writeback selection: selects writeback
README.md