GSIM accepts chirrtl, and compiles it to C++
- Install GMP, clang 19(+).
-
GSIM provides 4 RISC-V cores ready for simulation: ysyx3, Rocket, BOOM, XiangShan.
-
To try GSIM, using
$ make init $ make run dutName=core -
Set core to
ysyx3,rocket,small-boom,large-boom,minimal-xiangshanordefault-xiangshan
- Run
make build-gsimto build GSIM - Build a static binary locally with
make STATIC=1 build-gsim(CI artifacts are built statically). - Run
build/gsim/gsim $(chirrtl-file)to compile chirrtl to C++ - Refer to
build/gsim/gsim --helpfor more information - See C++ harness example to know how it interacts with the emitted C++ code.
- By default
gsimruns quietly (LogLevel=0, dump disabled). Enable lightweight stage logs with--log-level=1(prints pass begin/end). Use--log-level=2for verbose constant-analysis traces; expect a lot more stderr. - Graph dumps:
--dumpturns on both DOT and JSON dumps for every stage;--dump-json/--dump-dotturn on a single format. Combine with--dump-stages=a,b,cto limit which stages emit (e.g.,AfterSplitNodes,ConstantAnalysis). Set--dir=tmp-out/gsim-dumpsto choose the output directory. - Extra debugging artifacts:
--dump-assign-treeincludes assignTree structure in JSON dumps;--dump-const-statuswrites<name>_<stage>_ConstStatus.jsonwith per-node constant-analysis status. - Example:
build/gsim/gsim --dir tmp-out/gsim-dumps --dump --dump-stages=AfterSplitNodes,ConstantAnalysis --dump-assign-tree --log-level=1 ready-to-run/TestHarness-rocket.fir
Lu Chen, Dingyi Zhao, Zihao Yu, Ninghui Sun, Yungang Bao
Design Automation Conference (DAC), 2025