SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_core::sc_port< IF, N, P > Class Template Reference

Generic port class and base class for other port classes. More...

#include <sysc/communication/sc_port.h>

Inheritance diagram for sc_core::sc_port< IF, N, P >:
Collaboration diagram for sc_core::sc_port< IF, N, P >:

Public Types

typedef this_type port_type
 
typedef unsigned phase_cb_mask
 

Public Member Functions

 sc_port ()
 
 sc_port (const char *name_)
 
 sc_port (IF &interface_)
 
 sc_port (const char *name_, IF &interface_)
 
 sc_port (base_type &parent_)
 
 sc_port (const char *name_, base_type &parent_)
 
 sc_port (this_type &parent_)
 
 sc_port (const char *name_, this_type &parent_)
 
virtual ~sc_port ()
 
virtual const char * kind () const
 
SC_VIRTUAL_ void bind (IF &interface_)
 
SC_VIRTUAL_ void bind (port_type &parent_)
 
void operator() (IF &interface_)
 
void operator() (port_type &parent_)
 
int size () const
 
IF * operator-> ()
 
const IF * operator-> () const
 
const IF * get_interface (int iface_i) const
 
IF * get_interface (int iface_i)
 
virtual sc_interfaceget_interface ()
 
virtual const sc_interfaceget_interface () const
 
IF * operator[] (int index_)
 
const IF * operator[] (int index_) const
 
virtual sc_type_index get_interface_type () const
 
int bind_count ()
 
const char * name () const
 
const char * basename () const
 
virtual void print (::std::ostream &os=::std::cout) const
 
virtual void dump (::std::ostream &os=::std::cout) const
 
virtual void trace (sc_trace_file *tf) const
 
sc_simcontextsimcontext () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &name_)
 
const sc_attr_baseget_attribute (const std::string &name_) const
 
sc_attr_baseremove_attribute (const std::string &name_)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
virtual const std::vector< sc_event * > & get_child_events () const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
sc_objectget_parent () const
 
sc_objectget_parent_object () const
 

Protected Member Functions

void bind (sc_interface &interface_)
 
virtual int vbind (sc_interface &)
 
virtual int vbind (sc_port_base &)
 
virtual void make_sensitive (sc_thread_handle, sc_event_finder *=0) const
 
virtual void make_sensitive (sc_method_handle, sc_event_finder *=0) const
 
virtual void before_end_of_elaboration ()
 
virtual void end_of_elaboration ()
 
virtual void start_of_simulation ()
 
virtual void end_of_simulation ()
 
void report_error (const char *id, const char *add_msg=0) const
 
void add_static_event (sc_method_handle process_p, const sc_event &event) const
 
void add_static_event (sc_thread_handle process_p, const sc_event &event) const
 
virtual void add_child_event (sc_event *event_p)
 
virtual void add_child_object (sc_object *object_p)
 
virtual bool remove_child_event (sc_event *event_p)
 
virtual bool remove_child_object (sc_object *object_p)
 
phase_cb_mask register_simulation_phase_callback (phase_cb_mask)
 
phase_cb_mask unregister_simulation_phase_callback (phase_cb_mask)
 

Protected Attributes

sc_bind_info * m_bind_info
 

Detailed Description

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
class sc_core::sc_port< IF, N, P >

Generic port class and base class for other port classes.

N is the maximum number of channels (with interface IF) that can be bound to this port. N <= 0 means no maximum.

Definition at line 391 of file sc_port.h.

Member Typedef Documentation

◆ phase_cb_mask

typedef unsigned sc_core::sc_object::phase_cb_mask
inherited

Definition at line 75 of file sc_object.h.

◆ port_type

template<class IF>
typedef this_type sc_core::sc_port_b< IF >::port_type
inherited

Definition at line 280 of file sc_port.h.

Constructor & Destructor Documentation

◆ sc_port() [1/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( )
inline

Definition at line 403 of file sc_port.h.

◆ sc_port() [2/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( const char *  name_)
inlineexplicit

Definition at line 407 of file sc_port.h.

◆ sc_port() [3/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( IF &  interface_)
inlineexplicit

Definition at line 411 of file sc_port.h.

◆ sc_port() [4/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( const char *  name_,
IF &  interface_ 
)
inline

Definition at line 415 of file sc_port.h.

◆ sc_port() [5/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( base_type parent_)
inlineexplicit

Definition at line 419 of file sc_port.h.

◆ sc_port() [6/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( const char *  name_,
base_type parent_ 
)
inline

Definition at line 423 of file sc_port.h.

◆ sc_port() [7/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( this_type parent_)
inline

Definition at line 427 of file sc_port.h.

◆ sc_port() [8/8]

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
sc_core::sc_port< IF, N, P >::sc_port ( const char *  name_,
this_type parent_ 
)
inline

Definition at line 431 of file sc_port.h.

◆ ~sc_port()

template<class IF, int N = 1, sc_port_policy P = SC_ONE_OR_MORE_BOUND>
virtual sc_core::sc_port< IF, N, P >::~sc_port ( )
inlinevirtual

Definition at line 438 of file sc_port.h.

Member Function Documentation

◆ add_attribute()

bool sc_core::sc_object::add_attribute ( sc_attr_base )
inherited

◆ add_child_event()

virtual void sc_core::sc_object::add_child_event ( sc_event event_p)
protectedvirtualinherited

◆ add_child_object()

virtual void sc_core::sc_object::add_child_object ( sc_object object_p)
protectedvirtualinherited

Reimplemented in sc_core::sc_process_b.

◆ add_static_event() [1/2]

void sc_core::sc_port_base::add_static_event ( sc_method_handle  process_p,
const sc_event event 
) const
protectedinherited

◆ add_static_event() [2/2]

void sc_core::sc_port_base::add_static_event ( sc_thread_handle  process_p,
const sc_event event 
) const
protectedinherited

◆ attr_cltn() [1/2]

sc_attr_cltn& sc_core::sc_object::attr_cltn ( )
inherited

◆ attr_cltn() [2/2]

const sc_attr_cltn& sc_core::sc_object::attr_cltn ( ) const
inherited

◆ basename()

const char* sc_core::sc_object::basename ( ) const
inherited

◆ before_end_of_elaboration()

virtual void sc_core::sc_port_base::before_end_of_elaboration ( )
protectedvirtualinherited

◆ bind() [1/3]

void sc_core::sc_port_base::bind ( sc_interface interface_)
protectedinherited

◆ bind() [2/3]

template<class IF>
SC_VIRTUAL_ void sc_core::sc_port_b< IF >::bind ( IF &  interface_)
inlineinherited

Definition at line 286 of file sc_port.h.

◆ bind() [3/3]

template<class IF>
SC_VIRTUAL_ void sc_core::sc_port_b< IF >::bind ( port_type parent_)
inlineinherited

Definition at line 295 of file sc_port.h.

◆ bind_count()

int sc_core::sc_port_base::bind_count ( )
inherited

◆ dump()

virtual void sc_core::sc_object::dump ( ::std::ostream &  os = ::std::cout) const
virtualinherited

◆ end_of_elaboration()

◆ end_of_simulation()

virtual void sc_core::sc_port_base::end_of_simulation ( )
protectedvirtualinherited

◆ get_attribute() [1/2]

sc_attr_base* sc_core::sc_object::get_attribute ( const std::string &  name_)
inherited

◆ get_attribute() [2/2]

const sc_attr_base* sc_core::sc_object::get_attribute ( const std::string &  name_) const
inherited

◆ get_child_events()

virtual const std::vector<sc_event*>& sc_core::sc_object::get_child_events ( ) const
inlinevirtualinherited

Definition at line 114 of file sc_object.h.

◆ get_child_objects()

virtual const std::vector<sc_object*>& sc_core::sc_object::get_child_objects ( ) const
inlinevirtualinherited

Reimplemented in sc_core::sc_process_b, and sc_core::sc_module.

Definition at line 117 of file sc_object.h.

◆ get_interface() [1/4]

template<class IF >
const IF * sc_core::sc_port_b< IF >::get_interface ( int  iface_i) const
inlineinherited

Definition at line 508 of file sc_port.h.

◆ get_interface() [2/4]

template<class IF >
IF * sc_core::sc_port_b< IF >::get_interface ( int  iface_i)
inlineinherited

Definition at line 493 of file sc_port.h.

◆ get_interface() [3/4]

template<class IF>
virtual sc_interface* sc_core::sc_port_b< IF >::get_interface ( )
inlinevirtualinherited

Implements sc_core::sc_port_base.

Definition at line 324 of file sc_port.h.

◆ get_interface() [4/4]

template<class IF>
virtual const sc_interface* sc_core::sc_port_b< IF >::get_interface ( ) const
inlinevirtualinherited

Implements sc_core::sc_port_base.

Definition at line 327 of file sc_port.h.

◆ get_interface_type()

template<class IF >
sc_type_index sc_core::sc_port_b< IF >::get_interface_type ( ) const
inlinevirtualinherited

Implements sc_core::sc_port_base.

Definition at line 578 of file sc_port.h.

◆ get_parent()

sc_object* sc_core::sc_object::get_parent ( ) const
inherited

◆ get_parent_object()

sc_object* sc_core::sc_object::get_parent_object ( ) const
inlineinherited

Definition at line 121 of file sc_object.h.

◆ kind()

◆ make_sensitive() [1/2]

template<class IF >
void sc_core::sc_port_b< IF >::make_sensitive ( sc_thread_handle  handle_p,
sc_event_finder event_finder_ = 0 
) const
protectedvirtualinherited

Reimplemented from sc_core::sc_port_base.

Definition at line 593 of file sc_port.h.

◆ make_sensitive() [2/2]

template<class IF >
void sc_core::sc_port_b< IF >::make_sensitive ( sc_method_handle  handle_p,
sc_event_finder event_finder_ = 0 
) const
protectedvirtualinherited

Reimplemented from sc_core::sc_port_base.

Definition at line 614 of file sc_port.h.

◆ name()

const char* sc_core::sc_object::name ( ) const
inlineinherited

Definition at line 77 of file sc_object.h.

◆ num_attributes()

int sc_core::sc_object::num_attributes ( ) const
inherited

◆ operator()() [1/2]

template<class IF>
void sc_core::sc_port_b< IF >::operator() ( IF &  interface_)
inlineinherited

Definition at line 289 of file sc_port.h.

◆ operator()() [2/2]

template<class IF>
void sc_core::sc_port_b< IF >::operator() ( port_type parent_)
inlineinherited

Definition at line 298 of file sc_port.h.

◆ operator->() [1/2]

template<class IF >
IF * sc_core::sc_port_b< IF >::operator-> ( )
inlineinherited

Definition at line 465 of file sc_port.h.

◆ operator->() [2/2]

template<class IF >
const IF * sc_core::sc_port_b< IF >::operator-> ( ) const
inlineinherited

Definition at line 477 of file sc_port.h.

◆ operator[]() [1/2]

template<class IF>
IF* sc_core::sc_port_b< IF >::operator[] ( int  index_)
inlineinherited

Definition at line 316 of file sc_port.h.

◆ operator[]() [2/2]

template<class IF>
const IF* sc_core::sc_port_b< IF >::operator[] ( int  index_) const
inlineinherited

Definition at line 318 of file sc_port.h.

◆ print()

virtual void sc_core::sc_object::print ( ::std::ostream &  os = ::std::cout) const
virtualinherited

◆ register_simulation_phase_callback()

phase_cb_mask sc_core::sc_object::register_simulation_phase_callback ( phase_cb_mask  )
protectedinherited

◆ remove_all_attributes()

void sc_core::sc_object::remove_all_attributes ( )
inherited

◆ remove_attribute()

sc_attr_base* sc_core::sc_object::remove_attribute ( const std::string &  name_)
inherited

◆ remove_child_event()

virtual bool sc_core::sc_object::remove_child_event ( sc_event event_p)
protectedvirtualinherited

◆ remove_child_object()

virtual bool sc_core::sc_object::remove_child_object ( sc_object object_p)
protectedvirtualinherited

Reimplemented in sc_core::sc_process_b.

◆ report_error()

void sc_core::sc_port_base::report_error ( const char *  id,
const char *  add_msg = 0 
) const
protectedinherited

◆ simcontext()

sc_simcontext* sc_core::sc_object::simcontext ( ) const
inlineinherited

Definition at line 91 of file sc_object.h.

◆ size()

template<class IF>
int sc_core::sc_port_b< IF >::size ( ) const
inlineinherited

Definition at line 304 of file sc_port.h.

◆ start_of_simulation()

virtual void sc_core::sc_port_base::start_of_simulation ( )
protectedvirtualinherited

◆ trace()

virtual void sc_core::sc_object::trace ( sc_trace_file tf) const
virtualinherited

◆ unregister_simulation_phase_callback()

phase_cb_mask sc_core::sc_object::unregister_simulation_phase_callback ( phase_cb_mask  )
protectedinherited

◆ vbind() [1/2]

template<class IF >
int sc_core::sc_port_b< IF >::vbind ( sc_interface interface_)
inlineprotectedvirtualinherited

◆ vbind() [2/2]

template<class IF >
int sc_core::sc_port_b< IF >::vbind ( sc_port_base parent_)
inlineprotectedvirtualinherited

Member Data Documentation

◆ m_bind_info

sc_bind_info* sc_core::sc_port_base::m_bind_info
protectedinherited

Definition at line 190 of file sc_port.h.


The documentation for this class was generated from the following file: