我的16位MIPS,小CPU

来源:互联网 发布:finale打谱软件 mac版 编辑:程序博客网 时间:2024/05/16 07:13

参照胡伟武老师的教材《计算机体系结构》第5章,利用寒假的最后四五天,写出来并仿真成功。

小庆祝一下~撒花。。

胡老师的书刚出来不久,还有好多错误。写的过程中纠正书中错误,添了书上一些没写而必须有的东西。

手头没有板子所以木有下到板子里跑。哎。。怀念本科在实验室的时候。。

5级静态流水线,无前递,数据RAW相关时流水线自动阻塞。在Xilinx 3s1000fg320-5 上RTL能综合到80多MHz,用加法和移位操作实现了乘法。

还用Java为它写了个汇编器,方便调试用。支持标号,还能回填哦~ 呵呵不过这个JAVA代码写的很渣。。

 主要技术指标:

1. 16-bit data width
2. classic 5-stage static pipeline, 1 branch delay slot, theoretical CPI is 1.0
3. pipeline is able to detect and prevent RAW hazards, no forwarding logic
4. 8 general purpose register (reg 0 is special, according to mips architecture)
5. up to now supports 13 instructions, see ./doc/instruction_set.txt for details
6. Maximum clk Frequency: 82.688MHz on Xilinx 3s1000fg320-5 device (XST).

这个小CPU的工程管理严格按照opencores的标准来做,体验了一把外国工程设计的严谨作风~

眼下我已经把这个工程(包含所有的源代码、各模块的testbench及脚本、文档)放到了Opencore.org(好网站,上面好多好工程,类似sourceforge,推荐一下)上进行维护。

工程名字叫“Educational 16-bit MIPS Processor”,希望能帮助大家学习mips。

地址:

http://opencores.org/project,mips_16  需要有opencores的账号才能登入。

工程简介:

This project was aimed at providing people a simple, runnable, and easy-to-enhance MIPS CPU main architecture, along with well commented Verilog RTL source code, complete simulation test benches & scripts, and detailed documentation. People can read the source code, make simulations to verify the result, and then make modifications to enhance it. I hope this project can help you learning the MIPS CPU architecture and enjoy constructing your own CPU core.

欢迎大家下载查看并提意见~


原创粉丝点击