1. git clone https://github.com/freechipsproject/rocket-chip.git
$ git clone https://github.com/ucb-bar/rocket-chip.git
$ cd rocket-chip
$ git submodule update --init
2. 配置環境變量
setenv RISCV "~/rocket-chip/riscv/toolchain"
setenv MAKEFLAGS " -j1"
setenv RISCV_TOOLS_PATH "~/rocket-chip/riscv/toolchain"
setenv PATH "${PATH}:${RISCV_TOOLS_PATH}/bin
cd rocket-chip/riscv-tools
$ ./build.sh
3.安裝jdk
sudo apt-get install default-jdk
4. 安裝sbt
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get update
sudo apt-get install sbt
5. 配置firrtl
- Compile firrtl:
sbt compile
- Run tests:
sbt test
- Build executable (
utils/bin/firrtl
):sbt assembly
- Note: You can add
utils/bin
to your path to call firrtl from other processes
- Note: You can add
- Publish this version locally in order to satisfy other tool chain library dependencies:
cd firrtl $sbt compile $sbt test $sbt assembly setenv PATH "${PATH}:utils/bin" cd .. sbt publishLocal firrtl
5. 配置chisel3
$cd chisel3
$sbt compile
$sbt test
6. finish
$ cd vsim
$ make