简体   繁体   English

我可以从系统Verilog测试台通过DPI调用获得C例程的调用图吗?

[英]Can I get a call graph of C routines which are called via a DPI call from a system verilog testbench

I am working on a verification project. 我正在做一个验证项目。 Certain testbench components are written in c which are called via DPI, the c routines are extensive and i am having difficult time in figuring out which routine is called by whom. 某些测试平台组件是用c编写的,可通过DPI调用,c例程很广泛,而且我很难确定谁调用了哪个例程。 A pure C program may be I could use cachegrind for this task. 一个纯C程序可能是我可以将cachegrind用于此任务。 In this case it is not a main() which is doing the call but are triggered on events. 在这种情况下,不是main()在进行调用,而是在事件上触发。 Any method by which i could get an idea of the sequence of calls being done during simulation? 有什么方法可以让我了解模拟过程中执行的呼叫顺序? Cadence Incisive tool is used. 使用Cadence Incisive工具。

记录呼叫者并使用准确的时间戳记记录被呼叫者,然后进行比较

Google's "gperftools" will give you a callgraph for performance hotspots and if you set the threshold for data collection low enough, you'll get as much detail as you can handle: Google的“ gperftools”将为您提供性能热点的调用图 ,如果将数据收集的阈值设置得足够低,您将获得尽可能多的详细信息:

在此处输入图片说明

You can also instruct it to focus on specific functions when it generates the graphviz graph in order to hone in on specific code paths. 您还可以指示它在生成graphviz图时专注于特定功能,以适应特定的代码路径。 I've personally used google perftools on a chip's testbench. 我个人在芯片的测试平台上使用过Google perftools。 Works like a champ. 像冠军一样工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM