前面的文章已经对verilator相关功能和流程进行了较详细的介绍,由于最近版本更新较多,并且很多粉丝希望有一个更完整的总结,特别是针对最新版本,本节将基于verilator最新版本,对资料和相关内容进行总结,并介绍一下最新版本的安装。
资料总结
verilator官网:Veripool
安装说明文档:https://verilator.org/guide/latest/install.html
源代码git地址:https://github.com/verilator/verilator
版本更新:Issues · verilator/verilator · GitHub
相关papers:Veripool
使用文档(特别是相关参数说明):https://veripool.org/ftp/verilator_doc.pdf
最新版本安装
安装必要的软件包:
sudo apt-get install git perl python3 make autoconf g++ flex bison ccache
sudo apt-get install libgoogle-perftools-dev numactl perl-doc
sudo apt-get install libfl-dev
sudo apt-get install zlibc zlib1g zlib1g-dev
拷贝代码:
git clone https://github.com/verilator/verilator
编译前准备:
unset VERILATOR_ROOT # For bash
cd verilator
git pull # Make sure git repository is up-to-date
git tag # See what versions exist
g++版本要求:
g++ --version
输入git tag查看最新版本:
我们安装的版本是:
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
建议至少g++升级到9.4.0以上,版本过低的话会报错,配置和安装即可:
autoconf # Create ./configure script
./configure # Configure and create Makefile
make -j `nproc` # Build Verilator itself (if error, try just 'make')
sudo make install
实例参看第一节。
输入:
verilator --version
查看版本号,可以看到最先版本已经是5.000以上了。