Skip to content

electrify-7/MIPS_Processor

Repository files navigation

MIPS Processor (Behavioral-Level Implementation)

This project features a behavioral-level Verilog implementation of a simplified MIPS processor. It supports a subset of standard MIPS instructions and is designed for simulation and educational purposes.


Images~

Flow Diagram

Flow Diagram


To setup:

Clone the Repository

git clone https://github.com/electrify-7/MIPS_Processor.git
cd MIPS_Processor

🔧 Prerequisites

Ensure that you have a Verilog simulator installed. The recommended tool is Icarus Verilog, and optionally GTKWave for waveform viewing.


Installation & Usage

Install Verilog Simulator

On Ubuntu/Debian

sudo apt update
sudo apt install iverilog gtkwave

On macOS (with Homebrew)

brew install icarus-verilog
brew install --cask gtkwave

Running the Simulation

  1. Compile the Verilog files:

    iverilog -o output AluControl.v Control.v DataMemory.v InstructionMemory.v ProgramCounter.v RegisterFile.v TestBench.v TopModule.v
  2. Execute the simulation:

    vvp mips_simulation
  3. (Optional) View the waveform:

    gtkwave dumpfile.vcd

Instruction Set Architecture (ISA)

Instruction Type Format Details
R-Type opcode (6) | rs (5) | rt (5) | rd (5) | shamt (5) | funct (6) Opcode: 000000
Funct Codes:
  • ADD: 000000
  • SUB: 000001
  • AND: 000010
  • OR: 000011
  • SLT: 000100
I-Type opcode (6) | rs (5) | rt (5) | immediate (16) Opcodes:
  • LW: 000100
  • SW: 000101
  • BEQ: 000110
J-Type opcode (6) | address (26) Opcodes:
  • JUMP: 000010
  • JAL: 000011

Project Structure (Till 13.04.25)

MIPS_Processor/
├── AluControl.v
├── Control.v
├── DataMemory.v
├── InstructionMemory.v
├── RegisterFile.v
├── TopModule.v
├── TestBench.v
├── ProgramCounter.v
└── README.md

Notes

  • The processor is designed for simulation, not synthesis.
  • You can extend the instruction set or add pipeline stages as enhancements.
  • Waveform files (e.g., dumpfile.vcd) can be configured in the testbench.

Contact

Feel free to open issues or submit pull requests.
GitHub: electrify-7


About

Behavioral level Implementation of mips processor, involving a subset of it's accepted commands.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published