Ubuntu 22.04 安装Verilator v4.106

最近在研究DiFuzzRTL和RFuzz两个用于挖CPU漏洞的模糊器都需要用到Verilator仿真软件,遂记录一下软件安装过程。

Verilator简介

​ Verilator是一个免费的开源软件工具,它可以将Verilog(一种硬件描述语言)转换为c++SystemC中的周期精确行为模型。所生成的模型是周期精确的2态模型;因此,这些模型通常比更广泛使用的事件驱动模拟器提供更高的性能,后者可以在时钟周期内建模行为。Verilator目前用于学术研究、开源项目和商业半导体开发。它是不断增长的免费EDA软件的一部分。

安装过程

环境:Ubuntu 22.04;安装版本:Verilator v4.106

摘自官方教程:https://verilator.org/guide/latest/install.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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 v4.106 # 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

注意上面有几个命令如果错误可以忽略可能Ubuntu将一些包移除了不影响安装。

Ubuntu 22.04 安装Verilator v4.106

http://example.com/2023/03/03/2023-3-3-1609/

Author

HanyJie

Posted on

2023-03-03

Updated on

2023-03-03

Licensed under

Comments