How kinzafatim/single-cycle-rv32i-chisel works
Project type and purpose
• This is a hardware-description project (written in Chisel/Scala) that implements a single-cycle RV32I RISC-V processor.
• Its goal is to fetch, decode, and execute each instruction in one clock cycle, using modules for ALU, Branch, Control, Data Memory, Instruction Memory, PC, Register File, and Immediate Generator.
File structure
• src/main/scala/single_cycle: contains all processor modules (ALU.scala, Branch.scala, Control.scala, Datamem.scala, Instr_mem.scala, Pc.scala, RV32I.scala, regfile.scala, ImmGen.scala).
• src/main/scala/gcd: an auxiliary Decoupled GCD example.
• src/test/scala: unit tests for each hardware module.
• build.sbt/build.sc, project directory: SBT/Chisel build and plugin configuration.
• README.md: outlines modules, usage, and testbenches.
README for additional insights
• Confirms single-cycle architecture with no pipelining.
• Details on module responsibilities and test procedure via ChiselTest.
Elements
• Clear labels for blocks (e.g., “ALU”, “Control Unit”, “Register File”).
• Blue for pure datapath blocks
• Buses (e.g., 32-bit data bus, 32-bit address bus).
• Immediate generator as a small block off the decode stage.