|
EMU Test / Changes Detection (push) Waiting to run
Details
EMU Test / Generate Verilog (push) Blocked by required conditions
Details
EMU Test / EMU - Basics (push) Blocked by required conditions
Details
EMU Test / EMU - CHI (push) Blocked by required conditions
Details
EMU Test / EMU - Performance (push) Blocked by required conditions
Details
EMU Test / EMU - MC (push) Blocked by required conditions
Details
EMU Test / SIMV - Basics (push) Blocked by required conditions
Details
EMU Test / Upload Artifacts (push) Blocked by required conditions
Details
EMU Test / Check Submodules (push) Blocked by required conditions
Details
EMU Test / Check Format (push) Blocked by required conditions
Details
In the original design, the condition for `to_last_hptw_req` was: `dup_wait_resp && entries(io.mem.resp.bits.id).req_info.s2xlate === allStage`. As a result, when a newly entered LLPTW request dups with an entry currently returning from memory, and the new request is marked as allStage, the `to_last_hptw_req` signal would be true. This causes the state machine to transition to the `state_last_hptw_req` state and send a request to HPTW. However, if the page table returned from memory contains a `vsStagePf` or `gStagePf`, it should directly go to `mem_out` or `bitmap_check` without performing a final HPTW translation. Therefore, this commit fixes the bug by adding a restriction to the original `to_last_hptw_req` condition to ensure that no exceptions are present; otherwise, the state machine will transition to either `mem_out` or `bitmap_check`. Additionally, this PR also fixes a bug where `last_hptw_req_ppn` did not account for the napot case. |
||
|---|---|---|
| .github | ||
| ChiselAIA@6608dc16ec | ||
| coupledL2@b2b3ae7d6a | ||
| debug | ||
| difftest@9d5e8eb361 | ||
| fudian@e1bd4695ca | ||
| huancun@c5e02bd616 | ||
| images | ||
| macros/src/main/scala | ||
| openLLC@614ceb4c5d | ||
| project | ||
| ready-to-run@c22a4b2e81 | ||
| rocket-chip@bea0af5d85 | ||
| scripts | ||
| src | ||
| tools/readmemh | ||
| utility@baacebea4b | ||
| yunsuan@cadd3c2f43 | ||
| .gitignore | ||
| .gitmodules | ||
| .mill-version | ||
| .scalafmt.conf | ||
| LICENSE | ||
| Makefile | ||
| Makefile.test | ||
| README.md | ||
| build.sbt | ||
| build.sc | ||
| readme.zh-cn.md | ||
| scalastyle-config.xml | ||
| scalastyle-test-config.xml | ||
README.md
XiangShan
XiangShan (香山) is an open-source high-performance RISC-V processor project.
中文说明在此。
Documentation
XiangShan's documentation is available at docs.xiangshan.cc.
The microarchitecture documentation on docs.xiangshan.cc is currently outdated for the latest version (Kunminghu). An updated version is in progress.
XiangShan User Guide has been published separately. You can find it at XiangShan-User-Guide/releases.
Publications
MICRO 2022: Towards Developing High Performance RISC-V Processors Using Agile Methodology
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
Follow us
Wechat/微信:香山开源处理器

Zhihu/知乎:香山开源处理器
Weibo/微博:香山开源处理器
You can contact us through our mailing list. All mails from this list will be archived here.
Architecture
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 Kunminghu (昆明湖) is shown below.
Sub-directories Overview
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
IDE Support
bsp
make bsp
IDEA
make idea
Generate Verilog
- Run
make verilogto generate verilog code. The output file isbuild/XSTop.v. - Refer to
Makefilefor more information.
Run Programs by Simulation
Prepare environment
- 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.
Run with simulator
- 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
Troubleshooting Guide
Acknowledgement
The implementation of XiangShan is inspired by several key papers. We list these papers in XiangShan document, see: Acknowledgements. We very much encourage and expect that more academic innovations can be realised based on XiangShan in the future.
LICENSE
Copyright © 2020-2025 Institute of Computing Technology, Chinese Academy of Sciences.
Copyright © 2021-2025 Beijing Institute of Open Source Chip
Copyright © 2020-2022 by Peng Cheng Laboratory.
XiangShan is licensed under Mulan PSL v2.


