sonalidutta Posted November 13, 2013 Report Share Posted November 13, 2013 Hi, I want to access the unique process id of a SystemC process P inside process P. Can I do that? If yes, what is the API for that? The base class for all sc_process is class sc_process_b. sc_method_process and sc_thread_process are derived from it. sc_process class has a public member variable, called proc_id. This denotes the unique id of a process. My question is how to access this id inside the process itself. For example: Inside process P: std::cout << proc_id << std::endl; does not work! Thanks Sonali Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted November 13, 2013 Report Share Posted November 13, 2013 First of all, sc_process_b is not a standardized class, it's implementation specific.Instead, you can use the sc_process_handle class to identify your processes, see IEEE 1666-2011, clause 5.6 for details. The current process handle can be obtained by the function sc_get_current_process_handle: std::cout << sc_core::sc_get_current_process_handle().name() << std::endl; Greetings from Oldenburg, Philipp maehne and amitk3553 2 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.