利用profiler工具提高NC-Verilog仿真效率
2016-01-22 11:37
465 查看
大家进行芯片验证时,一般都会遇到仿真速度很慢、效率不高的问题。
目前发现了一个方法可以debug上述问题。即,利用NC的profiler工具。
关于profiler工具,我把文档《Cadence® NC-Verilog® Simulator Help》中的原文贴出来:
The profiler is a tool that measures where CPU time is spent during simulation. Although it was developed primarily to help Cadence R&D diagnose performance bottlenecks in the simulator, some of the information in the output file can help you to identify inefficient HDL coding practices. Once you have determined what code the simulator is spending most of its time running, improving the efficiency of this code will have the greatest effect on simulation performance.
The profiler works by interrupting the simulation at regular intervals (currently 100 times per second) and noting what was executing at that time. It keeps track of the number of “hits” on different activities, which approximates the amount of CPU time spent in these activities.
The profiler is easy to run and has minimal impact on simulation performance and memory usage. To run the profiler, use the -profile command-line option when you invoke the simulator (ncsim). Use +ncprofile if you are running in single-step invocation mode with the ncverilog command.
就是说,NC-Verilog在仿真引擎内集成了一个profiler工具,该工具每秒中断仿真器100次,并在终端记录下来,仿真结束时会生成一个日志文件(ncprof.out)。
日志文件里会列出被中断次数最多的模块、代码行和结构类型,这些信息可以帮助诊断是哪些代码或模块在仿真时耗费了最多的时间。
通过修改这些模块,就能提升仿真效率。而Profiler功能本身,对仿真只产生非常小的影响。
我们通过-profile选项打开上述功能,仿真命令如下:
或者
目前发现了一个方法可以debug上述问题。即,利用NC的profiler工具。
关于profiler工具,我把文档《Cadence® NC-Verilog® Simulator Help》中的原文贴出来:
The profiler is a tool that measures where CPU time is spent during simulation. Although it was developed primarily to help Cadence R&D diagnose performance bottlenecks in the simulator, some of the information in the output file can help you to identify inefficient HDL coding practices. Once you have determined what code the simulator is spending most of its time running, improving the efficiency of this code will have the greatest effect on simulation performance.
The profiler works by interrupting the simulation at regular intervals (currently 100 times per second) and noting what was executing at that time. It keeps track of the number of “hits” on different activities, which approximates the amount of CPU time spent in these activities.
The profiler is easy to run and has minimal impact on simulation performance and memory usage. To run the profiler, use the -profile command-line option when you invoke the simulator (ncsim). Use +ncprofile if you are running in single-step invocation mode with the ncverilog command.
就是说,NC-Verilog在仿真引擎内集成了一个profiler工具,该工具每秒中断仿真器100次,并在终端记录下来,仿真结束时会生成一个日志文件(ncprof.out)。
日志文件里会列出被中断次数最多的模块、代码行和结构类型,这些信息可以帮助诊断是哪些代码或模块在仿真时耗费了最多的时间。
通过修改这些模块,就能提升仿真效率。而Profiler功能本身,对仿真只产生非常小的影响。
我们通过-profile选项打开上述功能,仿真命令如下:
ncverilog +ncprofile <other_options>
或者
ncsim –profile snapshot_name <other_options>
相关文章推荐
- 如何用脚本更新聊天服务器
- 17. Letter Combinations of a Phone Number
- Java(.NET)经典排序算法之选择排序
- uva1471 - Defense Lines (最长上升子序列变形)
- poj 2996 Help Me with the Game
- Java IO流(概述)
- 道与JAVA(二)
- python IO编程
- JavaScript回调方法中使用外部变量出现的问题
- iOS数据库存储数组或字典等数据
- 页面回显获取值栈对象属性
- 使用SDWebImage 清除App 缓存
- 多线程synchronized用例解析
- KVC KVO
- iOS数据库存储数组或字典等数据
- 超类
- iOS 数组遍历删除元素的问题
- /dev/ipldevice 作用
- python学习笔记-Day12-- memcached / redis / rabbitMQ / sqlalchemy
- NSMutableAttributedString使用