VCS仿真性能优化

1 热点分析

编译选项 -simprofile

1.Compile your design using the -simprofile compile-time option.
Important:
If this is not the first compilation of your design, delete the csrc and simv.daidir directories and simv executable file before this step. Incremental compilation is not yet supported for the unified profiler.

 

仿真选项 -simprofile time+mem

2.At runtime, you can enter the -simprofile runtime option with a keyword argument or sub-option to specify the type of data VCS MX collects during the simulation. These keyword arguments or sub-options are as follows:
time

The time argument specifies collecting CPU time profile information.

mem
The mem argument specifies collecting machine memory profile information.

noprof
Tells VCS MX not to collect profiling information at runtime. Synopsys recommends entering this runtime option and keyword argument or sub-option instead of simply omitting the -simprofile runtime option.

noreport
Tells VCS MX to collect profile information at runtime but not write the profileReport.html file or the profileReport directory after simulation

 

2 性能统计

You can capture the CPU resource statistics for compilation and simulation using the -reportstats option.

You can specify this option at compile time as well as runtime or both depending on your requirement.

 

3 性能优化

如果PLI/DPI/DirectC 这一项占的比例较大,而且是DPI中的uvm_re_match占的时间较多,
可以在编译选项中 加上 +define+UVM_REGEX_NO_DPI 可以大大降低这个部分的时间消耗

 

  • 优化PLI相关性能

当有PLI访问Design时,由于有数据交互,会有不小的仿真性能损失。尤其是当我们使用debug_access+all等方式为整个Desgin开放ACC权限时,性能损失就更大。

其实有的时候,我们只需要少数模块提供ACC权限给PLI就可以了。比如,我们可能只有少数的模块需要force, deposit等等。我们可以使用 +vcs+learn+pli sim option来进行pli tab的学习。当我们把这个仿真选项加上后,再进行用例的回归,就会在用例的run目录下生成一个pli_lean.tab文件,这个文件就指定了跑该条case需要加那些ACC权限。我们可以随便写个脚本把所有测试用例的pli_learn.tab文件merge到一起,相当于求个并集。然后在以后的编译时加上 +applylearn+merge_pli_learn.tab, 就不再需要将debug_access的权限开得很高了。这种方法可以一定程度上提高房展性能。

 

注:以上总结基于VCS 2018

 

### 解决 VSCode 中 'failed to fetch' 错误 当遇到 `failed to fetch` 错误时,通常意味着软件包管理器无法从指定的资源库下载所需的文件。对于 VSCode 的此类问题,可以考虑以下几个方面来解决问题。 #### 1. 更新 APT 源列表并清理缓存 有时由于本地APT源配置不当或网络连接不稳定可能导致此错误发生。可以通过更新APT源列表以及清除旧有的下载记录尝试修复该问题: ```bash sudo apt-get clean sudo apt-get update ``` 如果仍然存在特定于架构的问题,比如不必要的二进制源导致冲突,则可移除不匹配的目标架构设置[^3]。 #### 2. 卸载冲突版本的 Java 运行环境 某些情况下,安装了多个不同版本的Java运行环境可能会引起依赖关系混乱从而引发fetch失败的情况。此时应该先卸载可能造成干扰的具体组件: ```bash sudo apt uninstall openjdk-11-jre-headless sudo apt-get remove openjdk-11-jre-headless ``` 这一步骤能够帮助排除因重复定义而产生的潜在矛盾[^4]。 #### 3. 修改扩展存储位置 若是在处理VS Code插件同步过程中遇到了路径不存在之类的提示信息,那么应当确认所使用的远程仓库地址是否正确无误,并确保拥有足够的权限访问这些资源。另外一种可能性是本地磁盘空间不足或是目标目录被意外删除造成的读写异常[^2]: 为了防止这种情况再次出现,建议调整默认的工作区保存路径至更加稳定可靠的分区上;同时定期备份重要资料以防万一丢失数据。 #### 4. 使用国内镜像加速下载速度 考虑到国际带宽限制等因素的影响,在中国大陆地区使用官方Ubuntu服务器作为主要更新节点效率较低。因此推荐切换成阿里云、网易等提供的高速镜像站点以提高获取速率和成功率。 编辑 `/etc/apt/sources.list.d/vscode.list` 文件中的URL指向更合适的替代选项即可完成更改操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值