SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_module.h File Reference

Base class of all hierarchical modules and channels. More...

Include dependency graph for sc_module.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sc_core::sc_in< T >
 
class  sc_core::sc_inout< T >
 
class  sc_core::sc_out< T >
 
struct  sc_core::sc_bind_proxy
 Struct for temporarily storing a pointer to an interface or port. More...
 
class  sc_core::sc_module
 Base class for all structural entities. More...
 

Namespaces

 sc_core
 

Macros

#define SC_NEW(x)   ::sc_core::sc_module_dynalloc(new x);
 
#define SC_MODULE(user_module_name)   struct user_module_name : ::sc_core::sc_module
 
#define SC_CTOR(user_module_name)
 
#define SC_HAS_PROCESS(user_module_name)   typedef user_module_name SC_CURRENT_USER_MODULE
 
#define declare_method_process(handle, name, host_tag, func)
 
#define declare_thread_process(handle, name, host_tag, func)
 
#define declare_cthread_process(handle, name, host_tag, func, edge)
 
#define SC_CTHREAD(func, edge)
 
#define SC_METHOD(func)
 
#define SC_THREAD(func)
 

Typedefs

typedef sc_module sc_core::sc_channel
 
typedef sc_module sc_core::sc_behavior
 

Functions

SC_API sc_module * sc_core::sc_module_dynalloc (sc_module *)
 

Variables

SC_API const sc_bind_proxy sc_core::SC_BIND_PROXY_NIL
 

Detailed Description

Base class of all hierarchical modules and channels.

Original Author: Stan Y. Liao, Synopsys, Inc. Martin Janssen, Synopsys, Inc.

CHANGE LOG AT THE END OF THE FILE

Definition in file sc_module.h.

Macro Definition Documentation

◆ declare_cthread_process

#define declare_cthread_process (   handle,
  name,
  host_tag,
  func,
  edge 
)
Value:
{ \
name, false, \
SC_MAKE_FUNC_PTR( host_tag, func ), this, 0 ); \
this->sensitive.operator() ( handle, edge );\
}
#define SC_MAKE_FUNC_PTR(callback_tag, func)
Definition: sc_process.h:154
sc_simcontext * sc_get_curr_simcontext()
sc_process_handle create_cthread_process(const char *name_p, bool free_host, SC_ENTRY_FUNC method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)

Definition at line 446 of file sc_module.h.

◆ declare_method_process

#define declare_method_process (   handle,
  name,
  host_tag,
  func 
)
Value:
{ \
name, false, SC_MAKE_FUNC_PTR( host_tag, func ), \
this, 0 ); \
this->sensitive << handle; \
this->sensitive_pos << handle; \
this->sensitive_neg << handle; \
}
#define SC_MAKE_FUNC_PTR(callback_tag, func)
Definition: sc_process.h:154
sc_simcontext * sc_get_curr_simcontext()
sc_process_handle create_method_process(const char *name_p, bool free_host, SC_ENTRY_FUNC method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)

Definition at line 424 of file sc_module.h.

◆ declare_thread_process

#define declare_thread_process (   handle,
  name,
  host_tag,
  func 
)
Value:
{ \
name, false, \
SC_MAKE_FUNC_PTR( host_tag, func ), this, 0 ); \
this->sensitive << handle; \
this->sensitive_pos << handle; \
this->sensitive_neg << handle; \
}
#define SC_MAKE_FUNC_PTR(callback_tag, func)
Definition: sc_process.h:154
sc_process_handle create_thread_process(const char *name_p, bool free_host, SC_ENTRY_FUNC method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)
sc_simcontext * sc_get_curr_simcontext()

Definition at line 435 of file sc_module.h.

◆ SC_CTHREAD

#define SC_CTHREAD (   func,
  edge 
)
Value:
declare_cthread_process( func ## _handle, \
#func, \
SC_CURRENT_USER_MODULE, \
func, \
edge )
#define declare_cthread_process(handle, name, host_tag, func, edge)
Definition: sc_module.h:446

Definition at line 456 of file sc_module.h.

◆ SC_CTOR

#define SC_CTOR (   user_module_name)
Value:
typedef user_module_name SC_CURRENT_USER_MODULE; \
user_module_name( ::sc_core::sc_module_name )
Module name class.

Definition at line 406 of file sc_module.h.

◆ SC_HAS_PROCESS

#define SC_HAS_PROCESS (   user_module_name)    typedef user_module_name SC_CURRENT_USER_MODULE

Definition at line 412 of file sc_module.h.

◆ SC_METHOD

#define SC_METHOD (   func)
Value:
declare_method_process( func ## _handle, \
#func, \
SC_CURRENT_USER_MODULE, \
func )
#define declare_method_process(handle, name, host_tag, func)
Definition: sc_module.h:424

Definition at line 464 of file sc_module.h.

◆ SC_MODULE

#define SC_MODULE (   user_module_name)    struct user_module_name : ::sc_core::sc_module

Definition at line 402 of file sc_module.h.

◆ SC_NEW

#define SC_NEW (   x)    ::sc_core::sc_module_dynalloc(new x);

Definition at line 394 of file sc_module.h.

◆ SC_THREAD

#define SC_THREAD (   func)
Value:
declare_thread_process( func ## _handle, \
#func, \
SC_CURRENT_USER_MODULE, \
func )
#define declare_thread_process(handle, name, host_tag, func)
Definition: sc_module.h:435

Definition at line 471 of file sc_module.h.