ubuntu 配置 riscv rocket-chip

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

  1. Compile firrtl: sbt compile
  2. Run tests: sbt test
  3. Build executable (utils/bin/firrtl): sbt assembly
    • Note: You can add utils/bin to your path to call firrtl from other processes
  4. 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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章