1 Star 1 Fork 0

rexiyz / NEMU

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

NEMU

NEMU(NJU Emulator) is a simple but complete full-system emulator designed for teaching purpose. Currently it supports x86, mips32, and riscv32. To build programs run above NEMU, refer to the AM project.

The main features of NEMU include

  • a small monitor with a simple debugger
    • single step
    • register/memory examination
    • expression evaluation without the support of symbols
    • watch point
    • differential testing with reference design (e.g. QEMU)
    • snapshot
  • CPU core with support of most common used instructions
    • x86
      • real mode is not supported
      • x87 floating point instructions are not supported
    • mips32
      • CP1 floating point instructions are not supported
    • riscv32
      • only RV32IM
  • memory
  • paging
    • TLB is optional (but necessary for mips32)
    • protection is not supported
  • interrupt and exception
    • protection is not supported
  • 5 devices
    • serial, timer, keyboard, VGA, audio
    • most of them are simplified and unprogrammable
  • 2 types of I/O
    • port-mapped I/O and memory-mapped I/O

Howto

Run OpenSBI and Linux

All steps below use source code in RISCVERS

  1. Compile a Linux kernel, with proper SD card driver integrated if you want to run Debian or Fedora. Currently Kernel v4.18 is verified to work.
  2. Convert vmlinux to binary format using objcopy.
  3. Compile OpenSBI using build_linux.sh where vmlinux and dtb path may need a modification. dtb can be compiled with dts files located in dts subdirectory of OpenSBI.
  4. Compile NEMU intepreter. You may want to change default sdcard image path in src/devices/sdcard.c to boot Debian or Fedora.
  5. launch NEMU intepreter and load fw_payload.bin generated by OpenSBI. e.g. ./build/riscv64-nemu-interpreter ~/Xiangshan_Linux/opensbi/build/platform/generic/firmware/fw_payload.bin
  6. If you are using a vmlinux with initramfs, you will likely be greeted with a Hello, otherwise you may see startup logs and finally a login prompt from Debian or Fedora if SD card is configured properly.

空文件

简介

提高NEMU易用性,友善NEMU汉化输出,https://gitee.com/rexiyz/oscpu-framework-soc 的子模块 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/rexiyz/NEMU.git
git@gitee.com:rexiyz/NEMU.git
rexiyz
NEMU
NEMU
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891