This repository contains the Verilog implementation of a MIPS32 pipeline processor. The design is based on the book "Digital Design and Computer Architecture" by David Money Harris and Sarah L. Harris. The processor includes a 5-stage pipeline: Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Write Back (WB), along with a hazard detection unit to manage data and control hazards.
- Instruction Fetch (IF): Fetches the instruction from the instruction memory.
- Instruction Decode (ID): Decodes the fetched instruction and reads the necessary registers.
- Execute (EX): Performs arithmetic or logical operations.
- Memory Access (MEM): Accesses data memory for load and store instructions.
- Write Back (WB): Writes the result back to the register file.
The MIPS32 pipeline processor currently supports the following instructions:
add
- Addsub
- Subtractor
- Bitwise ORand
- Bitwise ANDslt
- Set Less Thanaddi
- Add Immediatelw
- Load Wordsw
- Store Wordbeq
- Branch if Equalj
- Jump
The hazard unit is responsible for detecting and resolving data and control hazards. It ensures that the pipeline operates smoothly without conflicts. The unit implements forwarding and stalling mechanisms to handle different types of hazards.
- Verilog compiler (such as Icarus Verilog)
- Simulator (such as Modelsim)
Digital Design and Computer Architecture by David Money Harris & Sarah L. Harris