All Projects → Trinkle23897 → Mips32 Cpu

Trinkle23897 / Mips32 Cpu

奋战一学期,造台计算机(编译出的bit文件在release中,可以直接食用)

Labels

Projects that are alternatives of or similar to Mips32 Cpu

Antikernel
The Antikernel operating system project
Stars: ✭ 75 (-20.21%)
Mutual labels:  verilog
Vsdflow
VSDFLOW is an automated solution to programmers, hobbyists and small scale semiconductor technology entrepreneurs who can craft their ideas in RTL language, and convert the design to hardware using VSD (RTL-to-GDS) FLOW. VSDFLOW is completely build using OPHW tools, where the user gives input RTL in verilog. From here on the VSDFLOW takes control, RTL is synthesized (using Yosys). The synthesized netlist is given to PNR tool (Qflow) and finally Sign-off is done with STA tool (using Opentimer). The output of the flow is GDSII layout and performance & area metrics of your design. VSDFLOW also provide hooks at all stages for users working at different levels of design flow. It is tested for 30k instance count design like ARM Cortex-M0, and can be further tested for multi-million instance count using hierarchical or glue logic.
Stars: ✭ 82 (-12.77%)
Mutual labels:  verilog
Lpc sniffer tpm
A low pin count sniffer for ICEStick - targeting TPM chips
Stars: ✭ 91 (-3.19%)
Mutual labels:  verilog
Ustc Rvsoc
FPGA-based RISC-V CPU+SoC.
Stars: ✭ 77 (-18.09%)
Mutual labels:  verilog
Cpu
A very primitive but hopefully self-educational CPU in Verilog
Stars: ✭ 80 (-14.89%)
Mutual labels:  verilog
Wujian100 open
IC design and development should be faster,simpler and more reliable
Stars: ✭ 1,252 (+1231.91%)
Mutual labels:  verilog
Computerarchitecturelab
This repository is used to release the Labs of Computer Architecture Course from USTC
Stars: ✭ 75 (-20.21%)
Mutual labels:  verilog
Icestation 32
Compact FPGA game console
Stars: ✭ 93 (-1.06%)
Mutual labels:  verilog
Ponylink
A single-wire bi-directional chip-to-chip interface for FPGAs
Stars: ✭ 80 (-14.89%)
Mutual labels:  verilog
Ivtest
Regression test suite for Icarus Verilog.
Stars: ✭ 90 (-4.26%)
Mutual labels:  verilog
Toooba
RISC-V Core; superscalar, out-of-order, multi-core capable; based on RISCY-OOO from MIT
Stars: ✭ 79 (-15.96%)
Mutual labels:  verilog
Homotopy
Homotopy theory in Coq.
Stars: ✭ 79 (-15.96%)
Mutual labels:  verilog
Hoodlum
A nicer HDL.
Stars: ✭ 88 (-6.38%)
Mutual labels:  verilog
Minimig Aga mister
Stars: ✭ 77 (-18.09%)
Mutual labels:  verilog
Fpga Cnn
FPGA implementation of Cellular Neural Network (CNN)
Stars: ✭ 91 (-3.19%)
Mutual labels:  verilog
Genesis mister
Sega Genesis for MiSTer
Stars: ✭ 75 (-20.21%)
Mutual labels:  verilog
Xilinx Serial Miner
Bitcoin miner for Xilinx FPGAs
Stars: ✭ 83 (-11.7%)
Mutual labels:  verilog
Radioberry 2.x
Ham Radio hat for Raspberry PI
Stars: ✭ 92 (-2.13%)
Mutual labels:  verilog
Cores Swervolf
FuseSoC-based SoC for SweRV EH1
Stars: ✭ 92 (-2.13%)
Mutual labels:  verilog
Oldland Cpu
Oldland CPU - a 32-bit RISC FPGA CPU including RTL + tools
Stars: ✭ 90 (-4.26%)
Mutual labels:  verilog

Thinpad 模板工程

工程包含示例代码和所有引脚约束,可以直接编译。

代码中包含中文注释,编码为utf-8,在Windows版Vivado下可能出现乱码问题。

请统一使用utf-8编码

报告位于 https://github.com/Trinkle23897/mips32-cpu/releases/download/v4.VGA/report.pdf

First Milestone (Fri. Week7)

Basic CPU Implementation

Git

把master给protect了,请注意不要commit一些奇奇怪怪的东西进来(比如ip文件夹),不然vivado工程在git merge完之后可能会崩……

统一四个空格缩进,使用utf-8编码

simulation

点击Run SimulationRun Behavior Simulation,之后会生成波形图,然后可以在scope选项卡中选择,object选项卡里面会出来变量,把要看的变量拖到仿真波形图里面,点击上方有个重新开始的图标(Relaunch Simulation)就能看到仿真波形了

测试

  1. 安装gnu工具链:(以ubuntu为例)

    sudo apt install gcc-mipsel-linux-gnu g++-mipsel-linux-gnu
    
  2. 拉取submodule之后编译功能测例:

    cd cpu_testcase
    git submodule init
    git submodule update
    cd ..
    ./compile_cpu_func_test.sh
    
  3. main.data编译出来之后会被塞到thinpad_top.srcs/sources_1/new/里面,接下来按上一节跑simulation就行了。需要参照的数据是寄存器r0s3,分别是$4$19的值。前者标出跑到第几组测例,后者标出一共跑通了几组测例。可以跑到0x41

为了跑起来,修改了pc_reg.v(修改了pc的初始值)和inst_rom.v(修改了访存的姿势)。

Second Milestone

完成所有功能测例,并在板子上全部通过。频率为10M

  1. topmodule为thinpad_top.v和tb.sv
  2. 改了compile func test的脚本,make ver=sim是没延时的,直接make是有延时的
  3. 在外面接写好了sram的控制逻辑,在内部写好了带TLB的MMU,添加了所有异常的处理

测试

  1. 编译vivado project,点击Generate bitstream,我本机五分钟之内能跑出来
  2. 本地连接192.168.8.8,远程调试连接http://os.cs.tsinghua.edu.cn/thinpad/
  3. 以本地为例,先传func test生成的bin,然后再把bit传上去(路径位于thinpad_top.runs/impl_1/thinpad_top.bit),印象中bin放置在BASERAM offset=0位置处
  4. 然后它就会自动跑,看到0x5d说明成功

Third Milestone

运行监控程序,提频,40M

运行方法

按照监控里面的readme安装完并编译完之后上传kernel.bin,记得位置选项选择直连串口,然后才能调试

➜  term git:(75bf515) ✗ python3 term.py -t 166.111.227.237:40965
connecting to 166.111.227.237:40965...connected
b'MONITOR for MIPS32 - initialized.'
>> G
>>addr: 0x80002000

elapsed time: 0.000s
>> G
>>addr: 0x8000200c
OK
elapsed time: 0.000s
>> G
>>addr: 0x80002030

elapsed time: 10.067s
>> G
>>addr: 0x80002064

elapsed time: 5.033s
>> G
>>addr: 0x800020ac

elapsed time: 5.872s
>> G
>>addr: 0x800020d8

elapsed time: 12.584s

显示图片:

    lui t0, 8
    lui t1, 0x8040
    lui t2, 0xba00
.VGA:
    lb t3, 0(t1)
    sb t3, 0(t2)
    addiu t0, t0, -1
    addiu t1, t1, 1
    addiu t2, t2, 1
    bnez t0, .VGA
    nop 

然后将图片转换成bin文件(给好了一个在bit/pic.bin),传到ExtRam里面,然后运行这段汇编代码即可看到vga中显示图像。

Fourth Milestone

运行uCore

跑不起来,鸽了

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].