XiangShan (้ฆๅฑฑ) is an open-source high-performance RISC-V processor project.
ไธญๆ่ฏดๆๅจๆญคใ
Copyright 2020-2022 by Institute of Computing Technology, Chinese Academy of Sciences.
Copyright 2020-2022 by Peng Cheng Laboratory.
XiangShan-doc is our official documentation repository. It contains design spec., technical slides, tutorials and more.
- Micro-architecture documentation of XiangShan has been published. Please check out https://xiangshan-doc.readthedocs.io
Our paper introduces XiangShan and the practice of agile development methodology on high performance RISC-V processors. It covers some representative tools we have developed and used to accelerate the chip development process, including design, functional verification, debugging, performance validation, etc. This paper is awarded all three available badges for artifact evaluation (Available, Functional, and Reproduced).
Paper PDF | IEEE Xplore | BibTeX | Presentation Slides | Presentation Video
Wechat/ๅพฎไฟก๏ผ้ฆๅฑฑๅผๆบๅค็ๅจ
Zhihu/็ฅไน๏ผ้ฆๅฑฑๅผๆบๅค็ๅจ
Weibo/ๅพฎๅ๏ผ้ฆๅฑฑๅผๆบๅค็ๅจ
You can contact us through our mailing list. All mails from this list will be archived here.
The first stable micro-architecture of XiangShan is called Yanqihu (้ๆ ๆน) and is on the yanqihu branch, which has been developed since June 2020.
The second stable micro-architecture of XiangShan is called Nanhu (ๅๆน) and is on the nanhu branch.
The current version of XiangShan, also known as Kunminghu (ๆๆๆน), is still under development on the master branch.
The micro-architecture overview of Nanhu (ๅๆน) is shown below.
Some of the key directories are shown below.
.
โโโ src
โ โโโ main/scala # design files
โ โโโ device # virtual device for simulation
โ โโโ system # SoC wrapper
โ โโโ top # top module
โ โโโ utils # utilization code
โ โโโ xiangshan # main design code
โ โโโ transforms # some useful firrtl transforms
โโโ scripts # scripts for agile development
โโโ fudian # floating unit submodule of XiangShan
โโโ huancun # L2/L3 cache submodule of XiangShan
โโโ difftest # difftest co-simulation framework
โโโ ready-to-run # pre-built simulation images
make bsp
make idea
- Run
make verilogto generate verilog code. The output file isbuild/XSTop.v. - Refer to
Makefilefor more information.
- Set environment variable
NEMU_HOMEto the absolute path of the NEMU project. - Set environment variable
NOOP_HOMEto the absolute path of the XiangShan project. - Set environment variable
AM_HOMEto the absolute path of the AM project. - Install
mill. Refer to the Manual section in this guide. - Clone this project and run
make initto initialize submodules.
- Install Verilator, the open-source Verilog simulator.
- Run
make emuto build the C++ simulator./build/emuwith Verilator. - Refer to
./build/emu --helpfor run-time arguments of the simulator. - Refer to
Makefileandverilator.mkfor more information.
Example:
make emu CONFIG=MinimalConfig EMU_THREADS=2 -j10
./build/emu -b 0 -e 0 -i ./ready-to-run/coremark-2-iteration.bin --diff ./ready-to-run/riscv64-nemu-interpreter-so


