1、前言
一生一芯预学习中需要安装5.008版本Verilator,通过git方式下载所需要版本。
2、步骤
1、Verilator官网中找到Git Quick Install;
代码:
# Prerequisites:
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 libfl2 # Ubuntu only (ignore if gives error)
sudo apt-get install libfl-dev # Ubuntu only (ignore if gives error)
sudo apt-get install zlibc zlib1g zlib1g-dev # Ubuntu only (ignore if gives error)
git clone https://github.com/verilator/verilator ### Only first time
# Every time you need to build:
unsetenv VERILATOR_ROOT # For csh; ignore error if on bash
unset VERILATOR_ROOT # For bash
cd verilator
git pull # Make sure git repository is up-to-date
git tag # See what versions exist
#git checkout master # Use development branch (e.g. recent bug fixes)
#git checkout stable # Use most recent stable release
git checkout v5.008 # Switch to specified release version
autoconf # Create ./configure script
./configure # Configure and create Makefile
make -j `nproc` # Build Verilator itself (if error, try just 'make')
sudo make install
3 、查看版本
@ysyx:~/verilator$ verilator --version
Verilator 5.008 2023-03-04 rev v5.008
4、C++例子
C++例子 官方步骤非常详细。
5、编译可能出现与4.210不同的报错
make: help2man: no such file or directory make: *** [makefile:191: verilator_gantt.1] error 127
解决办法:文章来源:https://www.toymoban.com/news/detail-596926.html
sudo apt-get install help2man文章来源地址https://www.toymoban.com/news/detail-596926.html
到了这里,关于Unbuntu22.04安装Verilator --5.008的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!