MIPS processor design
The goal of this project was to design a MIPS processor. We implemented the processor in VHDL and tested it on a reprogrammable (FPGA) chip. This project involved two students, I worked with Alexandre L.
We worked with Mentor Graphics' development suit (ModelSim, Leonardo and HDL Designer). These tools were used to simulate our processor on a desktop computer.
In order to manipulate data, two components are required: an algorithm (that will instruct how to manipulate the data) and hardware resources (that will do the actual manipulation).
A processor is a system that some has hardware resources, access to the data (in our case via the RAM) and a way to understand and execute instructions (in our case the instructions are in the ROM). The main parts of a processor are:
- ALU (arithmetic logic unit)
This part is responsible for performing basic operations such as addition, substraction, AND, OR, etc...
- Register File
The register file is a special memory (known as registers) that is accessible very quickly (because it is inside the processor). These registers are used to store the intermediate results of calculations (because it is easier and more efficient to design the instructions to use these registers rather than the RAM). We had 32 registers.
- 3 data buses and 2 address buses
The buses allow data to be exchanged between the registers and the RAM and ROM.
- PC (program counter)
The PC is a special register, used to keep track of what is the next instruction to be executed.
- Control Unit
The control unit is used to manage the above resources. It is implemented as a state machine.
We implemented all these parts and inter-connected them to form the datapath. Our processor is very simple and understands 8 instructions (addition, substraction, logic AND, logic OR, immediate add, conditional branch, loading and storing data in RAM). The reason our processor is simple is because it does not have a pipeline or virtual memory support.
- final report (pdf format)
- prime.asm
A test application we wrote in assembly that calculates a list of prime numbers. We were proud to have found a way to do this, considering we didn't have multiplication or division instructions.
- MIPS assembler and emulator
Xavier Perseguers wrote a MIPS assembler and emulator, that helped us while testing our processor (little historical note: Xavier's emulator turned out to have more bugs than our processor ;)