- Four versions of MIPS 32bit implemented with Verilog HDL in Vivado HLx.
- For each version of MIPS, there are several interesting test programs in both assembly and hex code that solve problems such as Fibonacci (recursion), Hanoi tower, select sort and so on.
- Simulation files are also implemented.
- All versions can be used on Digilent Nexys4 DDR Board and all variables in the CPU are visible on the development board!
- Each version came with a detailed report (in Chinese) explaining the design and result.
- Related materials and course slides are also provided!
The following versions of MIPS 32bit are included:
- monocycle
- multicycle
- pipeline
- pipeline with cache
- one instruction cache and one data cache
- Install Vivado
- A Digilent Nexys4 DDR Board
- In module
imem()
, there is this line of code for loading hex instructions. Replace<FILE>
with the actual path of the hex program
$readmemh("<FILE>", RAM);
- In module
regfile()
, there may be this line of code for resetting the register. Replace<FILE>
with the actual path ofemptyreg.dat
$readmemh("<FILE>",rf);
- When writing file path, use
/
instead of default\
!
- Simulation:
- just run Simulation
- Nexys4 DDR Board:
- run Synthesis
- run Implementation
- run Generate Bitstream
- open Hardware Manager
- connect the board
- MIPS simulator QtSpim can run MIPS assembly (32 bit)
- MIPS Converter converts MIPS assembly into hex code and vice versa