Jump to content

How to extract port connectivity


Zack63

Recommended Posts

Hello,

 

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?

 

Thanks,

-Mike

Link to comment
Share on other sites

Mike,

 

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,

  Philipp

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.

Guest
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...