win11下wsl2搭建vcs2016+verdi开发环境教程

1 资源获取

链接:https://pan.baidu.com/s/1SFCxy1CGoOGlp2gwk9imRw
提取码:1234
下载完成后拷贝进wsl2中
文件内容

2 安装方法

2.1 具体安装步骤

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 1. 创建安装目录
$ mkdir vcs2016 verdi2016 scl_v11.9
# 2. 解压SynopsysInstaller.rar
$ unrar x SynopsysInstaller.rar
# 3. 执行SynopsysInstaller_v3.3.run安装vcs、scl和verdi的安装器
$ chmod 777 SynopsysInstaller_v3.3.run
$ ./SynopsysInstaller_v3.3.run
$ Please specify installation directory [.]: ./
# 4. 安装csh
$ sudo apt install csh
# 5. 运行安装器
$ ./setup.sh
# 6. 根据提示依次安装vcs2016、scl_v11.9、verdi2016
<next> <选择安装源目录> <next> <next> <next> <选择linux64,next> <选择第1步创建的安装路径> <Accept Install> <Finish> <Dismiss>
# 7. 获取mac地址(不清楚就百度一下)和hostname
$ ifconfig
$ hostname
# 8. 通过scl_keygen.exe获取许可证文件Synopsys.dat
# 在<HOST Daemon>和<HOST ID Feature>处填入mac地址
# 在<HOST Name>处填入hostname
# 修改<EXPIRE>为12-dec-2030
# 点击<Generate>生成许可证文件Synopsys.dat
# 9. 修改许可证文件第二行,增加snpslmd文件路径
$ dos2unix Synopsys.dat
$ vim Synopsys.dat
$ <2G$a> scl_v11.9/amd64/bin/snpslmd
$ mkdir vcs2016/license
$ mv Synopsys.dat vcs2016/license/
# 10. 修改.bashrc文件,添加环境变量
$ # <见下方>
$ source ~/.bashrc
# 11. 激活license
$ lmli
# 12. 启动dve和verdi
$ dve
$ verdi
# 其他(Debug)
$ # 下载gcc-4.8 g++-4.8的方法见下方
$ sudo apt gcc-4.8 g++-4.8
$ sudo apt install lsb-core libjpeg62
$ # 将libpng12.so.0拷贝进/usr/lib/x86_64-linux-gnu/目录内
$ sudo apt update
$ sudo apt upgrade
$ sudo mkdir /usr/tmp/

2.2 配置环境变量

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# .bashrc文件
#vcs2016
export PATH="/home/gh/app/vcs2016/gui/dve/bin:"$PATH
export PATH="/home/gh/app/vcs2016/bin:"$PATH
export VCS_HOME="/home/gh/app/vcs2016"
export DVE_HOME="/home/gh/app/vcs2016/gui/dve"
export LM_LICENSE_FILE="/home/gh/app/vcs2016/license/Synopsys.dat"
export LM_LICENSE_FILE=27000@planckgh
export VCS_TARGET_ARCH="amd64"
export VCS_ARCH_OVERRIDE="linux"
alias verdi='verdi -full64 &'
alias dve='dve -full64 &'
alias lmli="/home/gh/app/scl_v11.9/amd64/bin/lmgrd -c /home/gh/app/vcs2016/license/Synopsys.dat"
#verdi2016
export PATH="/home/gh/app/verdi2016/bin:"$PATH
export VERDI_HOME="/home/gh/app/verdi2016"
export NOVAS_HOME="/home/gh/app/verdi2016"
#scl_v11.9
export PATH="/home/gh/app/scl_v11.9/amd64/bin:"$PATH

2.3 下载所需文件

1
2
3
4
5
6
7
8
9
$ sudo vim etc/apt/sources.list
# 在文档后面增加
deb http://dk.archive.ubuntu.com/ubuntu/ xenial main
deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cz.archive.ubuntu.com/ubuntu xenial main
# 然后更新镜像源
$ sudo apt update
# 安装gcc-4.8, g++-4.8
sudo apt install gcc-4.8, g++-4.8

注意,有时update时会报错, 提示GPG error缺少公钥,多见于添加了xenial版本(Ubuntu16)源。

1
2
3
4
5
6
7
8
W: GPG error: http://dk.archive.ubuntu.com/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://dk.archive.ubuntu.com/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://cz.archive.ubuntu.com/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://cz.archive.ubuntu.com/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

解决办法

根据报错信息“NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32”,将对应公钥导入即可

1
2
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32