Jump to content

How to extract port connectivity

Recommended Posts



I would like to determine port connectivity after elaboration.


For example, I want to put code inside an SC_MODULE that would find the names of other ports that are connect to this module.  Or, maybe there is a way to walk the hierarchy tree, and extract connectivity?


The name() function gives my current instance hierarchy, but I cannot find any information on port connections.


Any ideas?




Share this post

Link to post
Share on other sites



there are several functions in SystemC to access/traverse the object hierarchy and analyze the individual elements:

  • sc_get_toplevel_objects()
  • sc_object::get_parent_object()
  • sc_object::get_child_objects()
  • sc_object::kind() (or C++'s dynamic_cast)
  • sc_port_base::get_interface()

You can find a description of their functionality in IEEE 1666-2011.


See the following thread for some ideas: http://forums.accellera.org/topic/129-extract-structural-information-from-systemc/


Greetings from Oldenburg,


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now