分五段:取指、译码、计算、访存和写回,以及一个控制单元。上升沿更新中间寄存器,下降读数,修改存储状态。并使用转发和暂停解决了数据冲突。指令集支持所有的 ALU 操作,LW/SW 访存操作,但不支持所有跳转指令。注意:
- 除了 .v 文件中包含了 verilog 代码,其他都是 ISE 自动生成的文件,可忽略;
- i_mem、d_mem、r_mem 文件夹中以 bench_*.txt 的格式预存了指令和数据;
该仓库的代码经过仿真测试正确无误,但如果要综合需要删掉 rf.v、dm.v 和 im.v 中的 $ 系统指令。