This repository contains a Verilog implementation of a MIPS datapath. The datapath is a structural representation of the MIPS processor, including the registers, the ALU, and the control unit.
- 32 registers
- Arithmetic and logical operations in the ALU
- Control unit for executing instructions
To use the MIPS datapath, you will need a Verilog compiler such as Icarus Verilog.
-
Clone the repository:
git clone https://github.com/kenanAST/MIPS-datapath.git -
Compile the MIPS Instructions(see compiler.py):
python compiler.py blank.memh -
Run the simulation:
python run.py testbench.v
The repository contains the following files:
processor.v: top-level module for the datapathcontrol_unit.v: control unit for the datapathalu.v: arithmetic and logic unit for the datapathreg_file.v: register file for the datapathinst_rom.v: instruction memory for the datapathinput_mux.v: parameterized mux for the 3-mux used in the datapathdata_memory.vdata memory for the datapathcompiler.pybinary instructions to hex instructionsblank.memhcompiled instructions used in instruction memory
The Verilog code for the MIPS datapath is based on the Digital Design and Computer Architecture textbook by David Harris and Sarah Harris.
