ROCKET-CHIP设计验证环境创建流程

Author:  智能物联 www.aiotek.pro

如何在ubuntu16.04上建立ROCKET-CHIP设计验证环境

#clone rocket-chip.git

$cd /home/cad

$git clone https://github.com/ucb-bar/rocket-chip

$cd /home/cad/rocket-chip

$git submodule update --init

$git submodule update --init --recursive

#clone riscv-tools and riscv-gnu-toolchain for software development

#pay attention to file .gitmodule

$git clone https://github.com/riscv/riscv-tools

$git submodule init

$git submodule update

$export RISCV=/home/cad/riscv-tools/riscv-gnu-toolchain

$export PATH=${RISCV}/bin:$PATH

#install java1.8

$sudo apt-get install default-jre

$java -version

#install sbt

$echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
$echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
$curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add

$sudo apt-get update

$sudo apt-get install sbt

$sbt --script-version

如何生成RISCV指令集 ROCKET-CHIPVERILOG代码

Note: Clone rocket-chip.git and installation of java sbt is not described here

1. compile & test & publish 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

Publish this version locally in order to satisfy other tool chain library dependencies:

$cd firrtl

$sbt compile

$sbt test

$sbt assembly

$sbt publishLocal

will publish firrtl jar package to ~/.ivy2/local/edu.berkeley.cs/

you can move to ~/.ivy2/cache/edu.berkeley.cs/

2. compile and test chisel3

$cd chisel3

$sbt compile

$sbt test

3. generate verilog RTL code into generated directory

$ cd vsim

$ make verilog

Then you can go into generated directory and investigate every files for detail. Enjoy!

如何跑emulationsimulation

# run emulation &

# refer to emulator/generated-src/freechips.rocketchip.system.DefaultConfig.d

$cd emulatior

$make run-asm-tests

$make run-bmark-tests

$make clean

# run simulation &  

# refer to vsim/generated-src/freechips.rocketchip.system.DefaultConfig.d

$cd vsim

$make run-asm-tests

$make run-bmark-tests

$make clean

你可能感兴趣的:(chisel,verilog,riscv,riscv,chisel,verilator,rocket-chip,vcs)