所有资源均为网络资源转载。如有侵权请第一时间联系。
本教程与所用的工具仅用于学习探讨,严禁用于商业用途。
前言
学校太抠了,只给模拟组分Cadence服务器,数字组就自求多福吧。 哪有福
那就只能自己搜集一通资料自己来了。
参考资料如下:
synopsys2022安装方法简单说明 - EETOP
[Windows] Synopsys License Generator - EETOP
SynopsysMonoSlayer v24.09 request - EETOP
装机(硬件)
既然是从零开始,那直接闲置机子耍起嘛。在组里不用的旧主机里刨了半天刨了个i5-9400F。没核显不行,装显卡驱动可能就要老半天。继续刨,又刨出来个i5-11400,六核十二线程,不过只有区区16GB内存。如果大家都挂仿真、综合任务的话,肯定是不够的。
找师兄要了两条内存条,一条英睿达一条七彩虹。拿磨砂橡皮擦擦,待会用。
先换硅脂。散热器很好拆,是小型散热器,最上面是风扇往外吹。拆下来一看,硅脂其实还是湿的,感觉没换太久,但拆都拆了不能再放回去,只能顺手涂一下。之前淘宝买了10块钱30g的高导GD3,这价格还说啥了,半年换一次都没问题。
上次亲自涂硅脂是四年前了吧,到同学家里装电脑。后面就再也没自己涂过硅脂了,笔记本清灰后换的都是霍尼韦尔的相变片。刮腻子的手法也生疏了,真得多练。
涂完后上机烤机。中午直接去睡觉忘记关了,回来一看跑了两小时最高温度才55°C,无敌。
你就不怕用便宜硅脂把电脑搞坏吗?
怕,但更怕被假货宰一刀。
便宜是便宜了点,涂着顺滑,不烧核 心。
装机(软件)
硬件搞完改搞软件了,先把系统整上去。
Synopsys的安装器只认RedHat系(CentOS/RHEL/RockyLinux)。CentOS从24年之后就改变了整个系统更新的逻辑,变成持续集成了;论稳定,还是选择Rocky Linux。问了下AI,要装的Synopsys 2022支持RockyLinux 8系列,于是选择目前的最新版本 Rocky Linux 8.10 。
进入下载页面后直接选择版本为Rocky Linux 8,选DVD ISO下载。有点大,大约15G,不过还好校内镜像源可以跑满千兆,五分钟就下完了。
然后用Rufus做个启动盘,参数如下即可。
必须选择“分区类型”为GPT,并开启UEFI启动!
然后点击之后会出一个对话框,问你用默认ISO方式还是DD方式写入:
二者有什么区别?
ISO 模式下,Rufus 会解包镜像并重新组织 U 盘文件结构,可能导致 Rocky Linux 安装程序无法识别本地安装源;DD 模式则原样写入 ISO 镜像,保留分区表、文件系统和启动信息,兼容性更可靠。
官方也在文档 中特别声明:使用 Rufus 写入其镜像时,应选择 DD 模式,否则可能生成无法正常安装的介质!
然后就是漫长的烧录,烧了半个小时。刚好趁这段时间回宿舍去拷下好的EDA大全套。
烧录完毕进去装机。USB启动,之后选择第一项进系统安装。进入安装方案选择时选“带GUI的服务器”预设即可,然后右边的选项看自己需求勾一勾。针对存储空间划分,单盘正常装就行,但是多盘要注意一下……
多盘默认会使用LVM进行逻辑卷整合,将多个盘整合为一大块逻辑盘。缺点是:其中任意一块盘出问题都会导致整个系统无法启动!
建议修改为“标准分区”,在详细设置内重新划分分区。
鸡蛋还是不能放在同一个篮子里,半夜爬起来看挂上的任务结果发现掉盘了真的很让人崩溃。
之后就是第二次漫长的等待了,大约半个小时之后就可以安装完。
进系统后先加个自己的公钥,登录SSH干活也方便。
第一次装完,先换源,再跑个系统更新:
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 45 46 47 48 49 50 51 sudo -irepo_backup="/root/yum.repos.d.before-eda-$(date +%Y%m%d-%H%M%S) " cp -a /etc/yum.repos.d "$repo_backup " printf '仓库备份:%s\n' "$repo_backup " dnf repolist --all sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/rocky|g' \ -i.bak \ /etc/yum.repos.d/Rocky-AppStream.repo \ /etc/yum.repos.d/Rocky-BaseOS.repo \ /etc/yum.repos.d/Rocky-Extras.repo \ /etc/yum.repos.d/Rocky-PowerTools.repo grep -E '^\[|^baseurl=|^mirrorlist=|^enabled=|^gpgcheck=|^gpgkey=' \ /etc/yum.repos.d/Rocky-{BaseOS,AppStream,Extras,PowerTools}.repo dnf clean all dnf makecache dnf install -y dnf-plugins-core dnf config-manager --set-enabled powertools dnf install -y epel-release for repo_file in /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo; do [ -f "$repo_file " ] || continue sed -i.bak \ -e 's!^metalink=!#metalink=!g' \ -e 's!^#baseurl=!baseurl=!g' \ -e 's!https\?://download\.fedoraproject\.org/pub/epel!https://mirrors.ustc.edu.cn/epel!g' \ -e 's!https\?://download\.example/pub/epel!https://mirrors.ustc.edu.cn/epel!g' \ "$repo_file " done dnf clean all dnf makecache dnf repolist dnf repoinfo epel dnf upgrade --refresh -y reboot now
然后需要看一下自己的主机名,自己设定一个,且要记住,后续激活时会用到:
1 2 3 hostnamectl set-hostname 0d00.0721.dev hostnamectl --static getent hosts 0d00.0721.dev
这里,自己的主机名就是0d00.0721.dev
Synopsys EDA安装
先准备一下资源:
Synopsys全套:aHR0cHM6Ly9wYW4uYmFpZHUuY29tL3MvMThqN1JZRjVBcWJGcTVsQVpyZnlpdWc/cHdkPUVMNjM=
Synopsys补丁:aHR0cHM6Ly9jbG91ZC5lc2luZy5kZXYvcy83S0hR 密码:0721
一句话让Codex自己安装(不含Patch):
1 我已经将Synopsys安装包放到了xxxx,请你分析文件并帮我进行安装。我想让多用户可以通过VNC连接后同时使用。
请合理管理自己的Agent。因AI而导致的系统崩溃和数据丢失问题概不负责。
系统环境准备
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 dnf groupinstall -y "Development Tools" dnf install -y \ gcc gcc-c++ make binutils glibc-devel libstdc++-devel \ perl python3 tcsh ksh \ git vim-enhanced wget curl rsync \ tar gzip bzip2 xz unzip zip \ openssh-server openssh-clients chrony firewalld \ tmux htop lsof strace gdb \ policycoreutils-python-utils \ redhat-lsb-core libXScrnSaver.x86_64 dnf install -y \ libnsl libnsl2 libpng12 numactl-libs sqlite-libs \ libX11 libXext libXrender libXt libXtst libXi libXft libXmu libXpm \ libSM libICE libxcb mesa-libGL fontconfig freetype \ dbus-x11 xorg-x11-xauth xorg-x11-utils \ dejavu-sans-fonts liberation-fonts google-noto-sans-cjk-ttc-fonts
1 2 3 4 5 6 7 8 9 10 11 systemctl enable --now sshd chronyd chronyc tracking timedatectl timedatectl set-timezone Asia/Shanghai timedatectl set-ntp false timedatectl set-time "2026-10-16 12:30:00" timedatectl set-ntp true
考虑到服务器要共享,做成多人使用的模式,还需进行权限管理(个人使用可以跳过):
1 2 3 groupadd -f eda usermod -aG eda esing id esing
随后管理员要重新登陆,使新会话获得 eda 组。
然后规划一下存储路径:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 /home/esing/Synopsys/ ├── installer/5.8/ ├── vcs_vT-2022.06-SP2-10/ ├── verdi_vT-2022.06-SP2-10/ ├── dve_vT-2022.06-SP2-10/ ├── scl_v2022.12/ ├── syn_vU-2022.12-SP7-3/ ├── prime_vU-2022.12-SP5-2/ ├── fm_vU-2022.12-SP6/ ├── vc_static_vT-2022.06-SP2/ ├── lc_vU-2022.12-SP6/ └── PDK/ /home/eda-tools/ ├── synopsys/ ├── pdk/ ├── examples/ └── docs/ /home/各用户/eda-work/
之后创建用于安装EDA工具的文件夹,以确保共享软件和个人工作目录分开:
1 2 3 4 install -d -o root -g root -m 0755 /home/eda-tools install -d -o root -g eda -m 0755 /home/eda-tools/synopsys install -d -o root -g eda -m 0750 \ /home/eda-tools/pdk /home/eda-tools/examples /home/eda-tools/docs
最后保持SELinux启用:
1 2 3 getenforce semanage fcontext -a -t usr_t '/home/eda-tools(/.*)?' restorecon -RFv /home/eda-tools
检查Synopsys安装包
正常下载下来的包应当是有CHECKSUM的,建议核对一遍,不然安装到一半出问题就寄了。
先检查一下安装包的目录和平台:
1 2 3 find /home/esing/Synopsys -maxdepth 2 -type f \ \( -name '*INSTALL_README*' -o -name 'checksum_info.txt' -o -name '*.spf*' \) \ -printf '%p\n'
我是装在x86_64上,不知道arm64能不能正常安装
之后进行校验。ckecksum_info.txt格式为CRC size filename,因此写一个Python脚本来进行自动化校验:
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 from pathlib import Pathimport subprocesssource_dir = Path('/home/esing/Synopsys/vcs_vT-2022.06-SP2-10' ) failed = [] checked = 0 for line in (source_dir / 'checksum_info.txt' ).read_text().splitlines(): fields = line.split(None , 2 ) if len (fields) != 3 or not fields[0 ].isdigit() or not fields[1 ].isdigit(): continue crc, size, name = fields if not ('common' in name or 'linux64' in name or name.endswith('_INSTALL_README.txt' )): continue path = source_dir / name if not path.is_file(): failed.append('MISSING: ' + name) continue result = subprocess.check_output(['cksum' , str (path)], universal_newlines=True ).split() checked += 1 if result[:2 ] != [crc, size]: failed.append('MISMATCH: ' + name) for item in failed: print (item) print ('checked=%d failed=%d' % (checked, len (failed)))if failed or checked == 0 : raise SystemExit(1 )
然后记得要用python3运行,但默认的python3是python3.6.8,最好使用python 3.12来运行,或者切换默认python3提供者:
1 2 alternatives --set python3 /usr/bin/python3.12 alternatives --set python /usr/bin/python3
针对安装器,简单对一下sha256即可。这里使用最新的5.8安装器,其明确列出了支持Rocky Linux下安装。
纯终端环境安装Synopsys
终端比VNC快,所以选择纯终端安装了。
1 2 3 cd /home/esing/Synopsys/installer/5.8chmod 755 SynopsysInstaller_v5.8.run./SynopsysInstaller_v5.8.run
接着按照提示将安装器放到/home/eda-tools/synopsys/installer/5.8,并检查入口和帮助:
1 /home/eda-tools/synopsys/installer/5.8/installer -help
这里注意,Installer 5.8 的默认/批处理模式要求 -target 是总安装目录 ,即/home/eda-tools/synopsys,安装器自行生成 vcs/<version>、syn/<version>、prime/<version> 等子目录。不要给 VCS 的 -target 填上 /home/eda-tools/synopsys/vcs/T-2022.06-SP2-10,否则可能产生重复嵌套目录!
安装基础产品并保存日志
确认源目录名与上文一致后,在 root shell 运行。为了安全,设置为遇到安装命令失败就停止,并将日志保存在源目录的 install-logs 中,后面也方便Debug:
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 ( set -euo pipefail installer_bin=/home/eda-tools/synopsys/installer/5.8/installer source_root=/home/esing/Synopsys tools_root=/home/eda-tools/synopsys log_root="$source_root /install-logs" mkdir -p "$log_root " install_product () { local source_name="$1 " product="$2 " release="$3 " if [ ! -d "$source_root /$source_name " ]; then echo "安装包目录不存在:$source_root /$source_name " >&2 return 1 fi "$installer_bin " -batch_installer -install_as_root \ -source "$source_root /$source_name " \ -target "$tools_root " \ -product "$product " \ -release "$release " \ -platform linux64 \ 2>&1 | tee "$log_root /${product} _${release} .log" } install_product scl_v2022.12 scl 2022.12 install_product vcs_vT-2022.06-SP2-10 vcs T-2022.06-SP2-10 install_product dve_vT-2022.06-SP2-10 dve-addon T-2022.06-SP2-10 install_product verdi_vT-2022.06-SP2-10 verdi T-2022.06-SP2-10 install_product lc_vU-2022.12-SP6 lc U-2022.12-SP6 install_product fm_vU-2022.12-SP6 fm U-2022.12-SP6 install_product prime_vU-2022.12-SP5-2 prime U-2022.12-SP5-2 install_product syn_vU-2022.12-SP7-3 syn U-2022.12-SP7-3 install_product vc_static_vT-2022.06-SP2 vc_static T-2022.06-SP2 install_product icc2_vU-2022.12-SP6 icc2 U-2022.12-SP6 install_product icvalidator_vU-2022.12-SP5-4 icvalidator U-2022.12-SP5-4 )
然后就是第三次漫长的等待了……
安装完毕后,先测试一下,看看能不能正常获取到自己的HostID:
1 2 3 scl_bin=/home/eda-tools/synopsys/scl/2022.12/linux64/bin hostnamectl --static "$scl_bin /lmutil" lmhostid
输出形如:
1 2 3 0d00.0721.dev lmutil - Copyright (c) 1989-2022 Flexera. All Rights Reserved. The FlexNet host ID of this machine is "0d0007210721"
这里已经把主机名和HostID都列出来了,记下备用。
Verdi Supplementary Package 单独处理
Verdi Supplementary Package是Verdi的补充包,提供额外组件,顺手的事。
1 2 3 4 5 6 7 8 verdi_root=/home/eda-tools/synopsys/verdi/T-2022.06-SP2-10 install -d "$verdi_root /platform/linux64/lib" /home/eda-tools/synopsys/installer/5.8/installer \ -batch_installer -install_as_root \ -source /home/esing/Synopsys/verdi_vT-2022.06-SP2-10 \ -target "$verdi_root /platform/linux64/lib" \ -product verdi_supp -release T-2022.06-SP2-10 -platform common
若后置步骤尚未完成,脚本通常仍在初始展开路径,可先查看帮助,再执行修复:
1 2 3 4 5 6 7 verdi_root=/home/eda-tools/synopsys/verdi/T-2022.06-SP2-10 supp_root="$verdi_root /platform/linux64/lib/verdi_supp/T-2022.06-SP2-10" post_script="$supp_root /etc/post_install.sh" test -f "$post_script " bash "$post_script " -h bash "$post_script " -r "$supp_root " -verdi_home "$verdi_root " \ -install_verdi_supp Yes -plat linux64
此版本的 -install_verdi_supp 后面必须带 Yes。后置脚本可能移动补充包目录,所以重复操作前先定位现有脚本。
此次完成后,补充包位于 platform/verdi_supp/T-2022.06-SP2-10,并存在以下链接:
1 platform/linux64/lib/vcs -> ../../verdi_supp/T-2022.06-SP2-10
检查最终链接,不手工覆盖一个已经存在的真实 vcs 目录:
1 readlink -f /home/eda-tools/synopsys/verdi/T-2022.06-SP2-10/platform/linux64/lib/vcs
安装目录权限修改
把软件安装目录改为只读:
1 2 3 4 5 6 7 8 9 10 11 chown -R root:eda /home/eda-tools/synopsyschmod -R u+rwX,g+rX,g-w,o-rwx /home/eda-tools/synopsyschmod 0755 /home/eda-tools /home/eda-tools/synopsyschown -R root:root /home/eda-tools/synopsys/sclchmod -R u+rwX,go+rX,go-w /home/eda-tools/synopsys/sclrestorecon -RF /home/eda-tools
这里的 X 只对目录和原本可执行的文件增加执行权限,避免把所有文档都改成可执行文件。使用者不需要共享软件树的写权限。
Patch激活
然后就要用到之前准备的妙妙工具:
1 2 3 4 Synopsys_Patch ├── Synopsys.src ├── SynopsysLicenseGenerator.exe └── SynopsysMonoSlayer
首先打开SynopsysLicenseGenerator.exe软件,如果SRC文件有效,会弹出一个Get features窗口,应该是2842。随后进入软件:
然后填写之前 保存的主机名和HostID,剩下保持默认, 接着将整个窗口移到屏幕靠侧面的地方,再点击Generate, 不然结束后的窗口会被主窗口挡住窗口置顶写的啥玩意 。随后文件夹下会多出一个主机名的文件夹,内部就是生成好的lic文件,可以用于激活。
接着还需要对Synopsys的Checksum进行Patch。将SynopsysMonoSlayer拷贝到之前的安装目录/home/eda-tools/synopsys/下,再运行./SynopsysMonoSlayer -a,进行Patch,然后就是漫长的第四次等待。等出现Patch Done就完成了。
Patch之后,将lic文件拷贝到/home/eda-tools/synopsys/scl/2022.12/linux64/bin/下,先尝试一下运行许可服务器:
如果一切正常,应当会启动监听端口,这说明Patch生效了。
之后写个systemd服务进行持久化,用户名和组就写之前装系统时候设的普通管理员的名称,与eda组:
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 [Unit] Description =Synopsys Common Licensing (SCL 2022.12 )Wants =network-on line.targetAfter =network-on line.targetStartLimitIntervalSec =60 sStartLimitBurst =3 [Service] Type =simpleUser =esingGroup =edaWorkingDirectory =/home/eda-tools/synopsys/scl/2022.12 /linux64/binExecStartPre =/usr/bin/test -r synopsys.licExecStart =/home/eda-tools/synopsys/scl/2022.12 /linux64/bin/lmgrd -c synopsys.lic -zExecStop =/home/eda-tools/synopsys/scl/2022.12 /linux64/bin/lmutil lmdown -c synopsys.lic -qRestart =on -failureRestartSec =5 sTimeoutStopSec =30 sKillMode =control-groupLimitNOFILE =65535 UMask =0027 StandardOutput =journalStandardError =journal[Install] WantedBy =multi-user.target
之后设置服务自启和手动启动即可。
DVE 和 PrimeTime 启动崩溃修复
感谢GPT-6.1-Sol的自动分析,得以修复问题。
安装完毕后,使用verid &等命令都是可以正常启动应用的,但是dve -full64 &和pt_shell -gui &都会崩溃。
6.1Sol分析为:
旧版 EDA 工具自带的 SQLite,与系统 NSS 安全库在同一进程中发生了动态库冲突。
运行下面的命令检查:
1 2 3 4 type -a dve pt_shellprintf 'DISPLAY=%s\n' "$DISPLAY " rpm -q sqlite-libs nss nss-softokn ldconfig -p | grep libsqlite3
输出为:
1 2 3 4 5 6 7 8 9 dve is /usr/local/libexec/synopsys/dve dve is /home/eda-tools/synopsys/vcs/T-2022.06-SP2-10/bin/dve pt_shell is /usr/local/libexec/synopsys/pt_shell pt_shell is /home/eda-tools/synopsys/prime/U-2022.12-SP5-2/bin/pt_shell DISPLAY= sqlite-libs-3.26.0-21.el8_10.x86_64 nss-3.124.0-5.el8_10.x86_64 nss-softokn-3.124.0-5.el8_10.x86_64 libsqlite3.so.0 (libc6,x86-64) => /lib64/libsqlite3.so.0
再查看日志发现,系统 libsoftokn3.so 调用了 SQLite,却进入了 VCS 目录下的 libsqlite3.so.0 。修复方法为,DVE强制指定动态链接库,PrimeTime则直接不使用sqlite而是dbm:
1 2 LD_PRELOAD=/usr/lib64/libsqlite3.so.0 "$VCS_HOME /bin/dve" -full64 NSS_DEFAULT_DB_TYPE=dbm "$PT_HOME /bin/pt_shell" -gui
正常启动。
之后先要新建后面 用来设置环境变量的脚本,再封装一下,用Root用户执行下面的命令,即可完成修复:
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 cat > /usr/local/libexec/synopsys/dve <<'EOF' set -esource /etc/profile.d/synopsys.sh_system_sqlite=/usr/lib64/libsqlite3.so.0 if [ ! -r "$_system_sqlite " ]; then echo "DVE compatibility launcher: system SQLite library is missing." >&2 exit 69 fi export LD_PRELOAD="$_system_sqlite${LD_PRELOAD:+:$LD_PRELOAD} " exec "$VCS_HOME /bin/dve" "$@ " EOF cat > /usr/local/libexec/synopsys/pt_shell <<'EOF' set -esource /etc/profile.d/synopsys.shexport NSS_DEFAULT_DB_TYPE=dbmexec "$PT_HOME /bin/pt_shell" "$@ " EOF chown root:root /usr/local/libexec/synopsys/dve /usr/local/libexec/synopsys/pt_shellchmod 0755 /usr/local/libexec/synopsys/dve /usr/local/libexec/synopsys/pt_shellbash -n /usr/local/libexec/synopsys/dve bash -n /usr/local/libexec/synopsys/pt_shell
普通用户重新加载环境并清除 Bash 命令位置缓存:
1 2 3 4 5 source /etc/profile.d/synopsys.shhash -rcommand -v dve pt_shelldve -full64 & pt_shell -gui &
多用户环境配置
独乐乐不如众乐乐。配下新用户的环境。
默认加载环境变量
建立 /etc/profile.d/synopsys.sh:
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 45 46 47 48 49 50 51 install -d -o root -g root -m 0755 /usr/local/libexec/synopsys cat > /etc/profile.d/synopsys.sh <<'EOF' case " $(id -nG 2>/dev/null) " in *" eda " *) ;; *) return 0 ;; esac export SYNOPSYS_ROOT=/home/eda-tools/synopsysexport VCS_HOME="$SYNOPSYS_ROOT /vcs/T-2022.06-SP2-10" export VERDI_HOME="$SYNOPSYS_ROOT /verdi/T-2022.06-SP2-10" export DC_HOME="$SYNOPSYS_ROOT /syn/U-2022.12-SP7-3" export SYNOPSYS="$DC_HOME " export PT_HOME="$SYNOPSYS_ROOT /prime/U-2022.12-SP5-2" export FM_HOME="$SYNOPSYS_ROOT /fm/U-2022.12-SP6" export VC_STATIC_HOME="$SYNOPSYS_ROOT /vc_static/T-2022.06-SP2" export SCL_HOME="$SYNOPSYS_ROOT /scl/2022.12" export LC_HOME="$SYNOPSYS_ROOT /lc/U-2022.12-SP6" export ICC2_HOME="$SYNOPSYS_ROOT /icc2/U-2022.12-SP6" export ICV_HOME="$SYNOPSYS_ROOT /icvalidator/U-2022.12-SP5-4" export ICV_HOME_DIR="$ICV_HOME " export SYNOPSYS_LC_ROOT="$LC_HOME " export SNPSLMD_LICENSE_FILE="${SNPSLMD_LICENSE_FILE:-27080@localhost} " for _synopsys_dir in \ "$SCL_HOME /linux64/bin" "$VC_STATIC_HOME /bin" "$FM_HOME /bin" "$ICC2_HOME /bin" \ "$PT_HOME /bin" "$DC_HOME /bin" "$VERDI_HOME /bin" "$VCS_HOME /bin" "$ICV_HOME /bin" \ /usr/local/libexec/synopsys; do if [ -d "$_synopsys_dir " ]; then case ":$PATH :" in *":$_synopsys_dir :" *) ;; *) PATH="$_synopsys_dir :$PATH " ;; esac fi done if [ -d "$LC_HOME /bin" ]; then case ":$PATH :" in *":$LC_HOME /bin:" *) ;; *) PATH="$PATH :$LC_HOME /bin" ;; esac fi export PATHunset _synopsys_dirEOF chown root:root /etc/profile.d/synopsys.shchmod 0644 /etc/profile.d/synopsys.shbash -n /etc/profile.d/synopsys.sh
该脚本仅为当前进程具有 eda 组的用户加载环境,避免对其他系统账号加入无关 PATH。LC 放在 PATH 后部,避免它的同名启动器抢在其他产品之前。
普通用户重新登录后,在自己的终端执行:
1 2 3 4 5 6 source /etc/profile.d/synopsys.shhash -rid -nGcommand -v vcs verdi dc_shell design_vision pt_shell fm_shell vc_static_shell lc_shellprintf 'license=%s\n' "$SNPSLMD_LICENSE_FILE " printf 'LC=%s\n' "$SYNOPSYS_LC_ROOT "
即可成功运行。
开号
1 2 3 4 5 6 7 useradd --create-home --shell /bin/bash --groups eda student01 useradd --create-home --shell /bin/bash --groups eda student02 passwd student01 passwd student02 chmod 0700 /home/student01 /home/student02id student01id student02
每个人有个人主组,同时属于 eda,就可以访问Synopsys的软件了。之后每个人登录后自己设置下密码。
同时要修改vnc配置,增加显示号、端口和开机启动。编辑 /etc/tigervnc/vncserver.users,最终映射如下;已有行不重复添加:
1 2 3 :2 =esing :3 =student01 :4 =student02
内网直连方案中再开放两个新增端口:
1 2 3 4 5 6 7 8 9 10 ( set -efirewall-cmd --zone=public --permanent --add-port=5903/tcp firewall-cmd --zone=public --permanent --add-port=5904/tcp firewall-cmd --reload systemctl enable --now vncserver@:3.service vncserver@:4.service systemctl status vncserver@:3.service vncserver@:4.service --no-pager ss -ltnp 'sport = :5902 or sport = :5903 or sport = :5904' )
账号
显示号
TigerVNC Viewer 地址
esing
:2
192.168.10.10::5902
student01
:3
192.168.10.10::5903
student02
:4
192.168.10.10::5904
开完后测试一下:
1 2 3 4 5 6 7 runuser -u student01 -- bash -lc \ 'source /etc/profile.d/synopsys.sh; id -nG; command -v vcs verdi dc_shell pt_shell lc_shell' runuser -u student02 -- bash -lc \ 'source /etc/profile.d/synopsys.sh; id -nG; command -v vcs verdi dc_shell pt_shell lc_shell' runuser -u student01 -- test -x /home/eda-tools/synopsys/vcs/T-2022.06-SP2-10/bin/vcs
VNC配置
安装TigerVNC并确认会话文件存在:
1 2 3 4 dnf install -y tigervnc-server rpm -q tigervnc-server test -f /usr/share/xsessions/gnome.desktopsystemctl cat vncserver@.service
在 /etc/tigervnc/vncserver-config-defaults 中设置:
1 2 session =gnomegeometry =1920 x1080
session=gnome 对应 /usr/share/xsessions/gnome.desktop 的文件名。
在 /etc/tigervnc/vncserver-config-mandatory 中设置:
1 2 3 interface =192.168 .10.10 securitytypes =tlsvnc,vncauthnolisten =tcp
这里要将 interface 改成服务器实际内网 IP,并确保地址稳定。
之后先给管理员分配号,编辑 /etc/tigervnc/vncserver.users,加入:
再开放指定端口:
1 2 3 firewall-cmd --zone=public --permanent --add-port=5902/tcp firewall-cmd --reload firewall-cmd --zone=public --list-ports
即可。
对当前 TigerVNC 1.15,可选地为每人设置默认分辨率:
1 2 3 4 5 6 7 8 9 10 for eda_user in student01 student02; do eda_group=$(id -gn "$eda_user " ) install -d -o "$eda_user " -g "$eda_group " -m 0700 \ "/home/$eda_user /.config/tigervnc" printf 'session=gnome\ngeometry=1920x1080\n' \ > "/home/$eda_user /.config/tigervnc/config" chown "$eda_user :$eda_group " "/home/$eda_user /.config/tigervnc/config" chmod 0600 "/home/$eda_user /.config/tigervnc/config" restorecon -RF "/home/$eda_user /.config/tigervnc" done
添加GUI入口
统一通过加载公共配置的启动脚本进入:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 cat > /usr/local/bin/synopsys-gui <<'EOF' set -esource /etc/profile.d/synopsys.shtool="${1:-} " if [ "$# " -gt 0 ]; then shift ; fi case "$tool " in verdi) exec "$VERDI_HOME /bin/verdi" "$@ " ;; design_vision) exec "$DC_HOME /bin/design_vision" "$@ " ;; formality) exec "$FM_HOME /bin/fm_shell" -gui "$@ " ;; dve) exec /usr/local/libexec/synopsys/dve -full64 "$@ " ;; pt_shell) exec /usr/local/libexec/synopsys/pt_shell -gui "$@ " ;; *) echo "Usage: synopsys-gui {verdi|design_vision|formality|dve|pt_shell}" >&2; exit 2 ;; esac EOF chown root:root /usr/local/bin/synopsys-guichmod 0755 /usr/local/bin/synopsys-guibash -n /usr/local/bin/synopsys-gui
创建快捷方式:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 while IFS='|' read -r app_key app_name; do cat > "/usr/share/applications/synopsys-${app_key} .desktop" <<EOF [Desktop Entry] Type=Application Name=$app_name Exec=/usr/local/bin/synopsys-gui $app_key TryExec=/usr/local/bin/synopsys-gui Icon=applications-engineering Terminal=false Categories=Development;Engineering; EOF chmod 0644 "/usr/share/applications/synopsys-${app_key} .desktop" done <<'APPS' verdi|Verdi design_vision|Design Vision formality|Formality dve|DVE pt_shell|PrimeTime APPS
VC Static 也有 GUI,可以在已加载环境的 VNC 终端使用 vc_static_shell -gui &。
可选:工艺库安装
工艺库自己上网找或者咸鱼买,都行。这里以TSMC 28nm为例。
数字前端通常先需要:
文件/视图
使用者
.db
DC 综合、PrimeTime 时序分析
.lib
Liberty 文本库,按需由 LC 处理
标准单元 .v
门级仿真
README、发布说明、数据手册
核对版本、工艺角、单位和限制
选择TSMC 28HPC+SVT部署,包含96 份 .db、96 份 .lib、两份 Verilog、说明与手册,294 个文件约 2.84 GB。
28 nm 实际使用以下四个包,源包约 1.10 GB:
1 2 3 4 tcbn28hpcplusbwp7t40p140_180a_nldm.tar.gz tcbn28hpcplusbwp7t40p140_110a_vlg.tar.gz tcbn28hpcplusbwp7t40p140_130c_doc.tar.gz tcbn28hpcplusbwp7t40p140_180b_rln.tar.gz
将它们共同展开到厂商的 TSMCHOME 目录结构。其实让AI来装就可以了。
使用时,需要手动指定。以 28 nm 的 TT、0.9 V、25°C 为例,下面在普通用户的个人项目终端中执行:
1 2 3 4 5 source /etc/profile.d/synopsys.shexport TSMC28_ROOT=/home/eda-tools/pdk/tsmc28hpcplus/tcbn28hpcplusbwp7t40p140/180bexport TSMC28_NLDM_DIR="$TSMC28_ROOT /digital/Front_End/timing_power_noise/NLDM/tcbn28hpcplusbwp7t40p140_180a" export DC_TARGET_DB="$TSMC28_NLDM_DIR /tcbn28hpcplusbwp7t40p140tt0p9v25c.db" test -r "$DC_TARGET_DB "
在项目自己的 DC 脚本中使用:
1 2 3 set_app_var target_library [list $::env (DC_TARGET_DB)] set_app_var synthetic_library [list dw_foundation.sldb] set_app_var link_library [concat [list *] $target_library $synthetic_library ]
真实库中的时间、电容单位必须从 Liberty 核对。这里两套库的时间为 ns、电容为 pF;74138 入门测试采用过以下约束:
1 2 3 set_input_transition 0.05 [all_inputs] set_load 0.005 [all_outputs] set_max_delay 1.0 -from [all_inputs] -to [all_outputs]
它们表示 50 ps 输入转换、5 fF 输出负载及 1 ns 组合路径预算。
针对PrimeTime,在普通用户已设置本项目 DC_TARGET_DB 的环境中启动 PT,然后在 PT 内执行:
1 2 3 4 5 6 set link_path [list * $::env (DC_TARGET_DB)]read_verilog build/outputs/decoder74138_mapped.v link_design decoder74138 read_sdc build/outputs/decoder74138.sdc update_timing report_timing -from [all_inputs] -to [all_outputs] -max_paths 10 -slack_lesser_than 1.0e6
测试
74138测试DC
测试一下DC的compile_ultra是否正常:
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 mkdir -p ~/eda-work/dc74138/{rtl,scripts}cd ~/eda-work/dc74138cat > rtl/decoder74138.v <<'EOF' module decoder74138 ( input wire a, b, c, input wire g1, g2a_n, g2b_n, output reg [7:0] y_n ); always @* begin y_n = 8'hff; if (g1 && !g2a_n && !g2b_n) begin case ({c,b,a}) 3' d0: y_n = 8'b11111110; 3' d1: y_n = 8'b11111101; 3' d2: y_n = 8'b11111011; 3' d3: y_n = 8'b11110111; 3' d4: y_n = 8'b11101111; 3' d5: y_n = 8'b11011111; 3' d6: y_n = 8'b10111111; 3' d7: y_n = 8'b01111111; default: y_n = 8' hff; endcase end end endmodule EOF cat > scripts/run_dc.tcl <<'EOF' set project_dir [file dirname [file dirname [file normalize [info script]]]]set build_dir [file join $project_dir build]file mkdir [file join $build_dir work] [file join $build_dir reports] [file join $build_dir outputs] define_design_lib WORK -path [file join $build_dir work] set target_db [file join $::env (DC_HOME) libraries syn lsi_10k.db]set_app_var target_library [list $target_db ] set_app_var synthetic_library [list dw_foundation.sldb] set_app_var link_library [concat [list *] $target_library $synthetic_library ] if {![analyze -format verilog [file join $project_dir rtl decoder74138.v]]} {error "analyze failed" }if {![elaborate decoder74138]} {error "elaborate failed" }current_design decoder74138 if {![link ]} {error "link failed" }if {![check_design]} {error "check_design failed" }set_input_transition 0.1 [all_inputs] set_load 1.0 [all_outputs] set_max_delay 10.0 -from [all_inputs] -to [all_outputs] if {![compile_ultra]} {error "compile_ultra failed" }change_names -rules verilog -hierarchy redirect -file [file join $build_dir reports area.rpt] {report_area} redirect -file [file join $build_dir reports timing.rpt] {report_timing -from [all_inputs] -to [all_outputs]} redirect -file [file join $build_dir reports references.rpt] {report_reference} redirect -file [file join $build_dir reports qor.rpt] {report_qor} write -format verilog -hierarchy -output [file join $build_dir outputs decoder74138_mapped.v] write -format ddc -hierarchy -output [file join $build_dir outputs decoder74138.ddc] write_sdc [file join $build_dir outputs decoder74138.sdc] puts "COMPILE_ULTRA_PASS" EOF dc_shell
在 DC 内执行:
1 source scripts/run_dc.tcl
脚本只使用 DC 自带 lsi_10k.db,用于先把工具运行与实际工艺库问题分开。实际部署的对应示例得到 19 个组合单元、0 个黑盒、路径约 2.91 ns,10 ns 预算下余量约 7.09 ns。完美可用!
库与场景
DC compile_ultra
VCS 门级功能
PrimeTime
SMIC TT,1.10 V,25°C
14 个组合单元,面积报告值 11.491200
74138 全部 64 种输入组合通过
路径约 0.37 ns,1 ns 预算下余量约 0.63 ns
TSMC TT,0.9 V,25°C
14 个组合单元,面积报告值 4.998000
路径约 0.16 ns,1 ns 预算下余量约 0.84 ns