How vaibhavgupta03/vaibhavs16bitriscvcpu works
This repository implements a compact, 16-bit RISC-V-inspired pipelined CPU, with an assembler and a board-facing wrapper. The principal workflow is to assemble prog.asm into prog.hex, load instructions into the CPU, decode and execute them through the pipeline, access data memory, and expose results through the board interface. The README documents the major pipeline and board capabilities; source excerpts were provided only for the assembler, so implementation-level links are limited to those documented relationships.
Main entry points: cpu.v Pipeline Controller · top.v Board Wrapper · prog.asm Assembly Program · assembler.py Assembler
Components 13
Program Authoring
- Assembly Program
prog.asm - Assembler
assembler.py - Program Image
prog.hex
CPU Pipeline
- Pipeline Controller
cpu.v - Instruction Decoder
decoder.v - ALU
alu.v - Register File
register.v - Program Counter
cpu.v
Instruction And Data Memory
- Instruction ROM
instrROM.v - Data RAM
dataRAM.v
Board Interface
- Board Wrapper
top.v - Clock Divider
clkDivider.v
Other components
- Programmer
Connections 12
- Programmer → Assembly Program: edits
README.md - Assembly Program → Assembler: assembles
README.md - Assembler → Program Image: emits
assembler.py - Program Image → Instruction ROM: loads
README.md - Board Wrapper → Pipeline Controller: connects I/O
README.md - Board Wrapper → Clock Divider: uses clock
README.md - Pipeline Controller → Program Counter: updates
README.md - Pipeline Controller → Instruction ROM: fetches instructions
README.md - Pipeline Controller → Instruction Decoder: decodes instructions
README.md - Pipeline Controller → Register File: reads and writes
README.md - Pipeline Controller → ALU: executes operations
README.md - Pipeline Controller → Data RAM: loads and stores
README.md