How skpro-glitch/riscv-processor-asic works
Project type and purpose
• From the file tree and README, this is an HDL-based RISC-V processor design (ASIC/FPGA prototype) implementing the 32-bit integer ISA. The Verilog files correspond to the main processor datapath, control logic, memories, and submodules (ALU, Branch unit, Fetch, Decode, Execute, Load/Store, program/data memories).
File structure
• Top-level file: Processor.v (with a compiled version Processor_Compiled.v)
• Instruction memory: Prog_Mem.v
• Data memory: RAM.v and Data_RAM.v
• Datapath stages / control modules: Fetch.v, Decode.v, Execute.v, Loadstore.v, Branch.v, ALU.v
• Auxiliary modules: Prog_Count.v (program counter)
Key insights from README
• “Basic RISC-V based processor under development”
• Implements 32-bit integer ISA
• Single‐chip design with separate instruction and data memories
Main components
a. Program Counter (Prog_Count)
b. Instruction Memory (Prog_Mem)
c. Fetch stage (Fetch)
d. Decode stage (Decode) – includes register file and control signal generation
e. Execute stage (Execute) – orchestrates ALU and Branch modules
f. ALU (ALU) and Branch unit (Branch)
g. Memory access (Loadstore + Data_RAM)
h. Data memory (RAM) if used separately
i. Write-back path back into the register file inside Decode
j. Control signals and multiplexers
Relationships and data flows
• PC → instruction memory → fetched instruction → Decode
• Decode outputs register operands & control signals → Execute
• Execute drives ALU operations or Branch decisions
• Branch unit may override PC update
• Loadstore & Data_RAM modules handle memory reads/writes → result to write-back
• Write-back bus returns register data
• PC is updated each cycle by Prog_Count, based on branch/jump signals
Architectural patterns & design principles
• 5-stage pipeline (Fetch, Decode, Execute, Memory, Write-back)
• Harvard architecture (separate instruction and data memories)
• Modular design: each stage in its own .v file
• Clear separation of control (Decode, Branch) and datapath (ALU, memories)
Technologies, frameworks, libraries
• Verilog HDL modules
• ASIC synthesis flow implied by naming (*.v and *_Compiled.v)
• Clear labels: e.g., “PC (Prog_Count)”, “IMEM (Prog_Mem)”, “Fetch”, “Decode (RegFile+Control)”, “ALU”, “Branch Unit”, “Data Memory”
• A note on “5-stage pipeline” and “Harvard memory separation”
Final recommendation
• Be exhaustive: represent every .v module as a block or sub-block
• Inter-module wiring (control buses vs. data buses) clearly
• Don’t overcomplicate: align stages linearly and group related modules (e.g., decode+register file)
• This will give a precise, accurate view for implementation reviews, timing analysis, and ASIC synthesis planning.