Custom Single-Cycle 32-Bit Processor
Custom ISA and single-cycle datapath in Verilog; synthesis-ready design used as the execution target for Pong assembly (Pong-on-Assembly repo).
View on GitHub →Overview
Single-cycle 32-bit processor in Verilog with custom MIPS-like ISA (R-type, I-type, J-type). Five logical stages (IF, ID, EX, MEM, WB); overflow and setx/jal write to $r30/$r31. Used as the execution target for pong.s in Pong-on-Assembly.
Description
pong.s in the Pong-on-Assembly repo. Demonstrates processor design from ISA definition through datapath and control to synthesis-ready Verilog.IF: The PC is held in flip-flops; an ALU computes PC+1. Instruction memory is addressed by the PC. When a branch or jump is taken, a bubble (zero) is fed instead of the next instruction; otherwise the fetched word is latched for decode.
ID: The instruction is decoded into opcode, rd/rs/rt, shamt, ALU op, sign-extended immediate, and jump target. Control logic identifies instruction types (e.g. r_type, lw, sw, bne, jal) and drives reg_write, mem_read, mem_write, and alu_src. Read ports are steered (e.g. $r30 for bex exception check) for the correct source operands.
EX: The ALU performs add, sub, and, or, sll, sra as needed. It produces result, not-equal and less-than (for branches), and overflow; overflow writes a status code to $r30. Branch and jump targets select the next PC (j/jal/jr/bex take priority over branch over PC+1).
MEM: The ALU result is the memory address. Stores write
data_readRegB; loads read into q_dmem for writeback.WB: Writeback selects ALU result or load data via mem_to_reg. setx writes the immediate to $r30; jal writes the return address (PC) to $r31.
Demo
No live demo available for this project. See the repo for setup and run instructions.
Tech & tools
- Verilog
- Digital design
- Custom ISA
- Single-cycle datapath
Highlights
- Custom instruction set and datapath (fetch, decode, execute)
- Single-cycle execution model; Verilog suitable for FPGA synthesis
- Used as execution target for Pong assembly (pong.s)
- Duke ECE 550 — complements Pong-on-Assembly hardware/software stack
More projects
WorldWide Rover
HackUMass XII — Best Embedded System. Autonomous, globally accessible rover: web interface for real-time control, maze navigation, obstacle avoidance. Python/Flask backend, Raspberry Pi, Arduino, React, ngrok.
Buffet
Trading AI: paper and live trading on Alpaca, strategy optimization, signal processing, and Qiskit-based quantum optimization. Python, TensorFlow, Alpaca API.
Pong on Assembly
Interactive Pong on FPGA (Duke ECE 550). Hardware VGA/PS2 implementation plus full assembly version (pong.s) for custom 32-bit processor ISA.
Baretag iOS App
iOS app (Swift) for real-time device tracking and management; Flask/Ngrok backend and 3D localization validated in Blender.
Multilateration 3D Positioning
3D multilateration and localization algorithms with Python implementation and Blender-based simulation; feeds into Baretag device positioning.
RISC-V Encryption
Low-level encryption on RISC-V: assembly and C implementations for algorithms and analysis on a RISC-V toolchain.
PUF Tester
Hardware tooling for testing and characterizing Physically Unclonable Functions (PUFs); supports security and fingerprinting use cases.
tinyTemp
Temperature display on ATtiny85: reads sensor via ADC and shows °F and °C on SSD1306 OLED (ECE 304, Spring 2024).
WorldWide Rover
HackUMass XII — Best Embedded System. Autonomous, globally accessible rover: web interface for real-time control, maze navigation, obstacle avoidance. Python/Flask backend, Raspberry Pi, Arduino, React, ngrok.
Buffet
Trading AI: paper and live trading on Alpaca, strategy optimization, signal processing, and Qiskit-based quantum optimization. Python, TensorFlow, Alpaca API.