R.Adiga Posted August 19, 2017 Report Share Posted August 19, 2017 Hello, Is there a way to generate execution trace for a SystemC project? Thanks, R.Adiga Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted August 20, 2017 Report Share Posted August 20, 2017 Quote Is there a way to generate execution trace for a SystemC project? Can you clarify what do you mean by execution trace? Quote Link to comment Share on other sites More sharing options...
R.Adiga Posted August 21, 2017 Author Report Share Posted August 21, 2017 Hi Roman Popov, I'm just exploring if there are any ways to generate trace for the list of functions that are called during the simulation. My idea is to utilize this execution trace to debug the model to make sure that the sequence of activities that needs to be performed are in order. I can do this using step by step debugging, but it consumes lot of time. If there are any ways to generate a text file with a list of function call details, this would help. Thanks, R.Adiga Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted August 21, 2017 Report Share Posted August 21, 2017 Hi Adiga, at the end, SystemC simulations are plain C++ programs. Therefore, you can use any program trace tool that meets your needs. One example could be the Linux perf tool, see https://perf.wiki.kernel.org. Your favorite SystemC simulator may have additional analysis features. You might want to ask your vendor about this. Hope that helps, Philipp Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted August 21, 2017 Report Share Posted August 21, 2017 Another option would be to write a python script for gdb that will automate the process. It's not hard in my experience, probably will take 2-3 weeks to implement. https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html Drawback is that it would be simulating quite slowly. Quote Link to comment Share on other sites More sharing options...
R.Adiga Posted August 22, 2017 Author Report Share Posted August 22, 2017 Hi Philipp and Roman Popov, thanks very much for the pointers! This really helps :) Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted September 5, 2017 Report Share Posted September 5, 2017 Hello @R.Adiga, I have developed something similar you can have a look here: https://github.com/AmeyaVS/trace-ninja (Still under development but basic functionality implemented for getting traces). If you are developing on Linux I would suggest of having a look here: https://github.com/namhyung/uftrace , which offers much better tracing capabilities and lower latencies. Both the methodologies are dependent on using GCC toolchain for building the SystemC library. The only advantage you get on using my project is that it would work under Cygwin/Windows with GCC compiler (Not tested under MinGW). Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.