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 comment
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 comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...