A 32-bit single-cycle RISC-V processor built from basic logic primitives (NAND gates) up to a fully functional CPU capable of executing ISA instructions.
- ISA: RISC-V (RV32I Base Integer Instruction Set)
- Design Type: Single-Cycle Datapath
- Base Primitive: Universal NAND logic gates
- Environment: Logisim-evolution
- Primitives: Universal NAND-logic gates, Multiplexers, Decoders.
- Sequential Logic: D-Flip-Flops, Registers, 32-bit Register File.
- ALU & Arithmetic: 32-bit Adder, Arithmetic Logic Unit with zero-detection.
- Datapath & Control: Main Control Unit, Extend unit, PC logic, Memory interfaces.
-
addi— Immediate Addition -
add— Register Addition -
sw— Store Word to Data Memory -
lw— Load Word from Data Memory -
beq— Branch if Equal (Conditional Jump)
- Arithmetic (R-Type):
add,sub,xor,or,and,slt - Arithmetic Immediate (I-Type):
addi,xori,ori,andi,slti - Memory Access:
lw(Load Word),sw(Store Word) - Control Flow:
beq(Branch if Equal)
- Install Logisim-evolution.
- Open
src/cpu/SingleCycleProcessor.circ. - Load hex binaries from
tests/into Instruction Memory (ROM). - Enable Clock
Ctrl + Kor step through manually.