Jump to content

Accessing unique process_id of a systemC process


Recommended Posts



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!




Link to post
Share on other sites

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,

Link to post
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...