Go to file
cz4e 37f33e11bc
timing(LoadUnit): fpWen and pdest reg out (#4144)
when loadunit writeback
* **fpWen** uses register directly out
* **pdest** uses register directly out
2025-01-13 14:30:06 +08:00
.github chore(mmu): update mmu owner, replace @Lemover with @linjuanZ (#4116) 2025-01-02 11:59:37 +08:00
coupledL2@394b7392f5 submodule(CoupledL2): bump CoupledL2 (#4140) 2025-01-07 09:51:06 +08:00
debug bump difftest & mkdir for wave/perf for local-ci script's run-mode (#1927) 2023-02-21 12:49:41 +08:00
difftest@e073982590 feat(Svnapot): support Svnapot extension (#4107) 2025-01-03 18:23:27 +08:00
fudian@e1bd4695ca chore: bump chisel 6.0.0 (#2654) 2024-01-19 15:05:34 +08:00
huancun@3fc7e7e0c2 submodule(CoupledL2, HuanCun): bump (#3487) 2024-09-06 23:34:13 +08:00
images docs(readme): update kunminghu architecture graph (#3910) 2024-11-21 16:24:27 +08:00
macros/src/main/scala NewCSR: fix unprivileged CSRs and permission check 2024-07-17 10:42:14 +08:00
openLLC@466bfd7663 submodule(OpenLLC): add support for top-down analysis (#4113) 2025-01-02 11:38:05 +08:00
project update sbt version 2019-03-03 16:54:26 +08:00
ready-to-run@98f779c914 submodule(ready-to-run): Bump nemu ref in ready to run 2025-01-07 09:48:03 +08:00
rocket-chip@61a5be2607 submodule(rocket-chip): bump rocket-chip to fix SBA 2025-01-13 10:03:30 +08:00
scripts feat(Svnapot): support Svnapot extension (#4107) 2025-01-03 18:23:27 +08:00
src timing(LoadUnit): fpWen and pdest reg out (#4144) 2025-01-13 14:30:06 +08:00
tools/readmemh misc: update PCL information (#899) 2021-07-24 23:26:38 +08:00
utility@74e73cbd24 feat(SRAMTemplate): add param separateGateClock for independent RCLK and WCLK gating (#4125) 2025-01-10 15:39:34 +08:00
yunsuan@3cd12ca678 area(VirtualLoadQueue): remove useless regs (#4061) 2024-12-26 10:49:07 +08:00
.gitignore chore(gitignore): ignore log file like *.err and *.log (#3915) 2024-11-22 15:27:26 +08:00
.gitmodules top: implement XSNoCTop and standalone devices (#3136) 2024-07-04 22:20:58 +08:00
.mill-version build: bump mill to 0.12.3 (#3933) 2024-11-26 16:12:10 +08:00
.scalafmt.conf style(Frontend): use scalafmt formatting frontend (#3370) 2024-10-25 23:08:56 +08:00
LICENSE Add MulanPSL-2.0 License (#824) 2021-06-04 09:06:35 +08:00
Makefile build: support L2 and L3 cache size configuration (#4099) 2024-12-30 11:06:56 +08:00
Makefile.test test: add example of chiseltest's unit-test and generating verilog for xs' module (#1890) 2023-02-14 09:52:51 +08:00
README.md docs(Acknowledgement): Add acknowledgement in README (#3912) 2024-11-25 11:14:39 +08:00
build.sbt Add sbt build support (#857) 2021-07-03 09:34:31 +08:00
build.sc build: add `difftest.test` to build target (#4135) 2025-01-07 09:48:36 +08:00
readme.zh-cn.md docs(Acknowledgement): Add acknowledgement in README (#3912) 2024-11-25 11:14:39 +08:00
scalastyle-config.xml first commit 2019-02-06 11:06:33 +08:00
scalastyle-test-config.xml first commit 2019-02-06 11:06:33 +08:00

README.md

XiangShan

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.

Docs and slides

XiangShan-doc is our official documentation repository. It contains design spec., technical slides, tutorials and more.

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).

Artifacts Available Artifacts Evaluated — Functional Results 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.

xs-arch-kunminghu

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 verilog to generate verilog code. The output file is build/XSTop.v.
  • Refer to Makefile for more information.

Run Programs by Simulation

Prepare environment

  • Set environment variable NEMU_HOME to the absolute path of the NEMU project.
  • Set environment variable NOOP_HOME to the absolute path of the XiangShan project.
  • Set environment variable AM_HOME to the absolute path of the AM project.
  • Install mill. Refer to the Manual section in this guide.
  • Clone this project and run make init to initialize submodules.

Run with simulator

  • Install Verilator, the open-source Verilog simulator.
  • Run make emu to build the C++ simulator ./build/emu with Verilator.
  • Refer to ./build/emu --help for run-time arguments of the simulator.
  • Refer to Makefile and verilator.mk for 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

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.