Jump to content
sumit_tuwien

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.

 

Regards,

Sumit

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

×