码迷,mamicode.com
首页 > 其他好文 > 详细

利用profiler工具提高NC-Verilog仿真效率

时间:2016-01-22 13:29:00      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:

大家进行芯片验证时,一般都会遇到仿真速度很慢、效率不高的问题。
目前发现了一个方法可以debug上述问题。即,利用NC的profiler工具。

关于profiler工具,我把文档《Cadence® NC-Verilog® Simulator Help》中的原文贴出来:
The pro?ler 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 ?le can help you to identify inef?cient HDL coding practices. Once you have determined what code the simulator is spending most of its time running, improving the ef?ciency of this code will have the greatest effect on simulation performance.
The pro?ler 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 pro?ler is easy to run and has minimal impact on simulation performance and memory usage. To run the pro?ler, 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>

利用profiler工具提高NC-Verilog仿真效率

标签:

原文地址:http://www.cnblogs.com/jyaray/p/5150701.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!