在ubuntu20.04上面跑通rocket-chip仿真,用rocket-tools工具

ubuntu20.04

$ sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev device-tree-compiler pkg-config libexpat-dev libfl-dev

$ git clone https://github.com/freechipsproject/rocket-tools
$ cd rocket-tools
$ git checkout 2022.12.26

$ git submodule update --init --recursive
$ export RISCV=/path/to/install/riscv/toolchain
$ export PATH=$RISCV/bin:$PATH 
$ export MAKEFLAGS="$MAKEFLAGS -jN"
$ ./build.sh


$ git clone https://github.com/ucb-bar/rocket-chip.git
$ cd rocket-chip
$ git submodule update --init

$ cd rocket-chip/emulator
$ make -jN
$ make -jN run-asm-tests
$ make -jN run-bmark-tests

$ cd emulator
$ make debug
$ make -jN run-asm-tests-debug
$ make -jN run-bmark-tests-debug

$ cd vsim
$ make verilog
$ make verilog CONFIG=freechips.rocketchip.system.DefaultFPGAConfig
$ make -jN run CONFIG=freechips.rocketchip.system.DefaultFPGAConfig
if you have access to VCS, you can run assembly tests and benchmarks with the following commands (again assuming you have N cores on your host machine):

你可能感兴趣的:(chisel,riscv,verilator,chisel,rocketchip,risc-v)