在RISC-V的学习以及TVM-VTA的学习中,使用到了Verilator,因此记录其编译安装的方式。
Verilato作为开源的Verilog仿真器,使用方便。
OS: Ubuntu 18.04.3 Dependence Instation:[1]
sudo apt-get install git make autoconf g++ flex bison
sudo apt-get install libfl2 # Ubuntu only (ignore if gives error)
sudo apt-get install libfl-dev # Ubuntu only (ignore if gives error)
Clone source with git:
git clone http://git.veripool.org/git/verilator
编译前,对编译的版本选择:
cd verilator
git pull
git tag
# git checkout master # Use development branch (e.g. recent bug fix)
# git checkout stable # Use most recent release
# git checkout v{version} # Switch to specified release version
编译安装:
autoconf
./configure --prefix=$VERILATOR_ROOT
# --prefix=/path/to/install 指定安装的目录
make -j`nproc` # make
# -j`nproc` 指定最大核心编译, 也可指定 -jn
sudo make install
安装后配置-环境变量设定:
[1]: Installing Verilator, [OL], 2019-08-27, https://www.veripool.org/projects/verilator/wiki/Installing
2019.08.27: Write the Base Document.