先为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/chipsalliance/rocket-chip

$ cd rocket-chip

$ git checkout 281e5c8f2

$ 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 rocket-chip/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):

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐