简体   繁体   中英

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. A pure C program may be I could use cachegrind for this task. In this case it is not a main() which is doing the call but are triggered on events. Any method by which i could get an idea of the sequence of calls being done during simulation? Cadence Incisive tool is used.

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

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:

在此处输入图片说明

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. I've personally used google perftools on a chip's testbench. Works like a champ.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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