在RISC-V的学习以及TVM-VTA的学习中,使用到了Verilator,因此记录其编译安装的方式。

    Verilato作为开源的Verilog仿真器,使用方便。

    OS: Ubuntu 18.04.3 Dependence Instation:[1]

    1. sudo apt-get install git make autoconf g++ flex bison
    2. sudo apt-get install libfl2 # Ubuntu only (ignore if gives error)
    3. sudo apt-get install libfl-dev # Ubuntu only (ignore if gives error)

    Clone source with git:

    1. git clone http://git.veripool.org/git/verilator

    编译前,对编译的版本选择:

    1. cd verilator
    2. git pull
    3. git tag
    4. # git checkout master # Use development branch (e.g. recent bug fix)
    5. # git checkout stable # Use most recent release
    6. # git checkout v{version} # Switch to specified release version

    编译安装:

    1. autoconf
    2. ./configure --prefix=$VERILATOR_ROOT
    3. # --prefix=/path/to/install 指定安装的目录
    4. make -j`nproc` # make
    5. # -j`nproc` 指定最大核心编译, 也可指定 -jn
    6. 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.