Jump to content

Naming of ports which inherits sc_signal/in/outs


Recommended Posts

Dear All,


I have an use case as follows:


# include <systemc>

# ifndef M_SIGNAL_H_
# define M_SIGNAL_H_

  template < typename T > 
  class m_signal
     :   public sc_core::sc_signal < T >
     public :
        m_signal (const char* portName_) 
           std::cout << this->name() << std::endl ;
           // I need to assign name!

# endif

  int sc_main(int argc, char* argv[])
     m_signal < sc_dt::sc_uint < 21 > > thisSignal("thisSignal") ;
     std::cout << thisSignal.name() << std::endl ;
     std::cout << thisSignal.basename() << std::endl ;
     std::cout << thisSignal.kind() << std::endl ;

     return EXIT_SUCCESS ;



I want to give access name() of the parent class. An idea to inherit it will be great and appreciated. This is very important for tracing to work accordingly.




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