SystemC 3.0.0
Accellera SystemC proof-of-concept library
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
sc_core::sc_process_b Class Referenceabstract

#include <sysc/kernel/sc_process.h>

Inheritance diagram for sc_core::sc_process_b:
Inheritance graph
[legend]
Collaboration diagram for sc_core::sc_process_b:
Collaboration graph
[legend]

Public Types

enum  process_throw_type {
  THROW_NONE = 0 , THROW_KILL , THROW_USER , THROW_ASYNC_RESET ,
  THROW_SYNC_RESET
}
 
enum  process_state {
  ps_bit_disabled = 1 , ps_bit_ready_to_run = 2 , ps_bit_suspended = 4 , ps_bit_zombie = 8 ,
  ps_normal = 0
}
 
enum  reset_type { reset_asynchronous = 0 , reset_synchronous_off , reset_synchronous_on }
 
enum  trigger_t {
  STATIC , EVENT , OR_LIST , AND_LIST ,
  TIMEOUT , EVENT_TIMEOUT , OR_LIST_TIMEOUT , AND_LIST_TIMEOUT
}
 

Public Member Functions

 sc_process_b (const char *name_p, bool is_thread, bool free_host, sc_entry_func method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)
 
int current_state ()
 
bool dont_initialize () const
 
virtual void dont_initialize (bool dont)
 
std::string dump_state () const
 
sc_curr_proc_kind proc_kind () const
 
sc_eventreset_event ()
 
sc_eventterminated_event ()
 
- Public Member Functions inherited from sc_core::sc_object_host
virtual const std::vector< sc_event * > & get_child_events () const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
- Public Member Functions inherited from sc_core::sc_object
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
 
virtual const char * kind () 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
 
virtual ~sc_object ()
 

Static Public Member Functions

static sc_process_handle last_created_process_handle ()
 

Public Attributes

const char * file
 
int lineno
 
int proc_id
 

Protected Types

enum  spawn_t { SPAWN_ELAB = 0x0 , SPAWN_START = 0x1 , SPAWN_SIM = 0x2 }
 

Protected Member Functions

virtual ~sc_process_b ()
 
virtual void add_child_object (sc_object *)
 
virtual void add_child_event (sc_event *)
 
virtual bool remove_child_object (sc_object *)
 
virtual bool remove_child_event (sc_event *)
 
void add_static_event (const sc_event &)
 
bool dynamic () const
 
sc_reportget_last_report ()
 
bool is_disabled () const
 
bool is_runnable () const
 
void remove_dynamic_events (bool skip_timeout=false)
 
void remove_static_events ()
 
void set_last_report (sc_report *last_p)
 
bool timed_out () const
 
void report_error (const char *msgid, const char *msg="") const
 
void report_immediate_self_notification () const
 
virtual void disable_process (sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
 
void disconnect_process ()
 
virtual void enable_process (sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
 
void initially_in_reset (bool async)
 
bool is_unwinding () const
 
bool start_unwinding ()
 
bool clear_unwinding ()
 
virtual void kill_process (sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
 
void reset_changed (bool async, bool asserted)
 
void reset_process (reset_type rt, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
 
virtual void resume_process (sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
 
virtual void suspend_process (sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
 
virtual void throw_user (const sc_throw_it_helper &helper, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)=0
 
virtual void throw_reset (bool async)=0
 
virtual bool terminated () const
 
void trigger_reset_event ()
 
void semantics ()
 
- Protected Member Functions inherited from sc_core::sc_object_host
 sc_object_host ()
 
 sc_object_host (const char *nm)
 
virtual ~sc_object_host ()
 
virtual hierarchy_scope get_hierarchy_scope ()
 
- Protected Member Functions inherited from sc_core::sc_object
 sc_object ()
 
 sc_object (const char *nm)
 
 sc_object (const sc_object &)
 
sc_objectoperator= (const sc_object &)
 
virtual hierarchy_scope get_hierarchy_scope ()
 

Static Protected Member Functions

static sc_process_blast_created_process_base ()
 

Protected Attributes

int m_active_areset_n
 
int m_active_reset_n
 
bool m_dont_init
 
spawn_t m_dynamic_proc
 
const sc_eventm_event_p
 
int m_event_count
 
const sc_event_listm_event_list_p
 
sc_process_bm_exist_p
 
bool m_free_host
 
bool m_has_reset_signal
 
bool m_has_stack
 
bool m_is_thread
 
sc_reportm_last_report_p
 
sc_curr_proc_kind m_process_kind
 
int m_references_n
 
std::vector< sc_reset * > m_resets
 
sc_eventm_reset_event_p
 
sc_eventm_resume_event_p
 
sc_process_bm_runnable_p
 
sc_process_hostm_semantics_host_p
 
sc_entry_func m_semantics_method_p
 
int m_state
 
std::vector< const sc_event * > m_static_events
 
bool m_sticky_reset
 
sc_eventm_term_event_p
 
sc_throw_it_helperm_throw_helper_p
 
process_throw_type m_throw_status
 
bool m_timed_out
 
sc_eventm_timeout_event_p
 
trigger_t m_trigger_type
 
bool m_unwinding
 
bool m_unsuspendable
 
bool m_suspend_all_req
 

Static Protected Attributes

static sc_process_bm_last_created_process_p
 

Friends

class sc_simcontext
 
class sc_cthread_process
 
class sc_method_process
 
class sc_process_handle
 
class sc_process_table
 
class sc_thread_process
 
class sc_event
 
class sc_object
 
class sc_port_base
 
class sc_runnable
 
class sc_sensitive
 
class sc_sensitive_pos
 
class sc_sensitive_neg
 
class sc_module
 
class sc_report_handler
 
class sc_reset
 
class sc_reset_finder
 
class sc_unwind_exception
 
SC_API sc_process_handle sc_get_current_process_handle ()
 
void sc_thread_cor_fn (void *arg)
 
SC_API bool timed_out (sc_simcontext *)
 
SC_API void sc_suspend_all ()
 
SC_API void sc_unsuspend_all ()
 
SC_API void sc_suspendable ()
 
SC_API void sc_unsuspendable ()
 

Detailed Description

Definition at line 205 of file sc_process.h.

Member Enumeration Documentation

◆ process_state

Enumerator
ps_bit_disabled 
ps_bit_ready_to_run 
ps_bit_suspended 
ps_bit_zombie 
ps_normal 

Definition at line 244 of file sc_process.h.

◆ process_throw_type

Enumerator
THROW_NONE 
THROW_KILL 
THROW_USER 
THROW_ASYNC_RESET 
THROW_SYNC_RESET 

Definition at line 236 of file sc_process.h.

◆ reset_type

Enumerator
reset_asynchronous 
reset_synchronous_off 
reset_synchronous_on 

Definition at line 252 of file sc_process.h.

◆ spawn_t

Enumerator
SPAWN_ELAB 
SPAWN_START 
SPAWN_SIM 

Definition at line 271 of file sc_process.h.

◆ trigger_t

Enumerator
STATIC 
EVENT 
OR_LIST 
AND_LIST 
TIMEOUT 
EVENT_TIMEOUT 
OR_LIST_TIMEOUT 
AND_LIST_TIMEOUT 

Definition at line 258 of file sc_process.h.

Constructor & Destructor Documentation

◆ sc_process_b()

sc_core::sc_process_b::sc_process_b ( const char *  name_p,
bool  is_thread,
bool  free_host,
sc_entry_func  method_p,
sc_process_host host_p,
const sc_spawn_options opt_p 
)

◆ ~sc_process_b()

virtual sc_core::sc_process_b::~sc_process_b ( )
protectedvirtual

Member Function Documentation

◆ add_child_event()

void sc_core::sc_process_b::add_child_event ( sc_event event_p)
inlineprotectedvirtual

Reimplemented from sc_core::sc_object_host.

Definition at line 422 of file sc_process.h.

◆ add_child_object()

void sc_core::sc_process_b::add_child_object ( sc_object object_p)
inlineprotectedvirtual

Reimplemented from sc_core::sc_object_host.

Definition at line 415 of file sc_process.h.

◆ add_static_event()

void sc_core::sc_process_b::add_static_event ( const sc_event )
protected

◆ clear_unwinding()

bool sc_core::sc_process_b::clear_unwinding ( )
inlineprotected

Definition at line 529 of file sc_process.h.

◆ current_state()

int sc_core::sc_process_b::current_state ( )
inline

Definition at line 287 of file sc_process.h.

◆ disable_process()

virtual void sc_core::sc_process_b::disable_process ( sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS)
protectedpure virtual

◆ disconnect_process()

void sc_core::sc_process_b::disconnect_process ( )
protected

◆ dont_initialize() [1/2]

bool sc_core::sc_process_b::dont_initialize ( ) const
inline

Definition at line 288 of file sc_process.h.

◆ dont_initialize() [2/2]

virtual void sc_core::sc_process_b::dont_initialize ( bool  dont)
virtual

Reimplemented in sc_core::sc_cthread_process.

◆ dump_state()

std::string sc_core::sc_process_b::dump_state ( ) const

◆ dynamic()

bool sc_core::sc_process_b::dynamic ( ) const
inlineprotected

Definition at line 305 of file sc_process.h.

◆ enable_process()

virtual void sc_core::sc_process_b::enable_process ( sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS)
protectedpure virtual

◆ get_last_report()

sc_report * sc_core::sc_process_b::get_last_report ( )
inlineprotected

Definition at line 306 of file sc_process.h.

◆ initially_in_reset()

void sc_core::sc_process_b::initially_in_reset ( bool  async)
inlineprotected

Definition at line 457 of file sc_process.h.

◆ is_disabled()

bool sc_core::sc_process_b::is_disabled ( ) const
inlineprotected

Definition at line 470 of file sc_process.h.

◆ is_runnable()

bool sc_core::sc_process_b::is_runnable ( ) const
inlineprotected

Definition at line 481 of file sc_process.h.

◆ is_unwinding()

bool sc_core::sc_process_b::is_unwinding ( ) const
inlineprotected

Definition at line 491 of file sc_process.h.

◆ kill_process()

virtual void sc_core::sc_process_b::kill_process ( sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS)
protectedpure virtual

◆ last_created_process_base()

sc_process_b * sc_core::sc_process_b::last_created_process_base ( )
inlinestaticprotected

Definition at line 542 of file sc_process.h.

◆ last_created_process_handle()

sc_process_handle sc_core::sc_process_b::last_created_process_handle ( )
inlinestatic

Definition at line 530 of file sc_process_handle.h.

◆ proc_kind()

sc_curr_proc_kind sc_core::sc_process_b::proc_kind ( ) const
inline

Definition at line 554 of file sc_process.h.

◆ remove_child_event()

bool sc_core::sc_process_b::remove_child_event ( sc_event event_p)
inlineprotectedvirtual

Reimplemented from sc_core::sc_object_host.

Definition at line 439 of file sc_process.h.

◆ remove_child_object()

bool sc_core::sc_process_b::remove_child_object ( sc_object object_p)
inlineprotectedvirtual

Reimplemented from sc_core::sc_object_host.

Definition at line 429 of file sc_process.h.

◆ remove_dynamic_events()

void sc_core::sc_process_b::remove_dynamic_events ( bool  skip_timeout = false)
protected

◆ remove_static_events()

void sc_core::sc_process_b::remove_static_events ( )
protected

◆ report_error()

void sc_core::sc_process_b::report_error ( const char *  msgid,
const char *  msg = "" 
) const
protected

◆ report_immediate_self_notification()

void sc_core::sc_process_b::report_immediate_self_notification ( ) const
protected

◆ reset_changed()

void sc_core::sc_process_b::reset_changed ( bool  async,
bool  asserted 
)
protected

◆ reset_event()

sc_event & sc_core::sc_process_b::reset_event ( )

◆ reset_process()

void sc_core::sc_process_b::reset_process ( reset_type  rt,
sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS 
)
protected

◆ resume_process()

virtual void sc_core::sc_process_b::resume_process ( sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS)
protectedpure virtual

◆ semantics()

void sc_core::sc_process_b::semantics ( )
inlineprotected

Definition at line 605 of file sc_process.h.

◆ set_last_report()

void sc_core::sc_process_b::set_last_report ( sc_report last_p)
inlineprotected

Definition at line 312 of file sc_process.h.

◆ start_unwinding()

bool sc_core::sc_process_b::start_unwinding ( )
inlineprotected

Definition at line 504 of file sc_process.h.

◆ suspend_process()

virtual void sc_core::sc_process_b::suspend_process ( sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS)
protectedpure virtual

◆ terminated()

bool sc_core::sc_process_b::terminated ( ) const
inlineprotectedvirtual

Definition at line 642 of file sc_process.h.

◆ terminated_event()

sc_event & sc_core::sc_process_b::terminated_event ( )

◆ throw_reset()

virtual void sc_core::sc_process_b::throw_reset ( bool  async)
protectedpure virtual

◆ throw_user()

virtual void sc_core::sc_process_b::throw_user ( const sc_throw_it_helper helper,
sc_descendant_inclusion_info  descendants = SC_NO_DESCENDANTS 
)
protectedpure virtual

◆ timed_out()

bool sc_core::sc_process_b::timed_out ( ) const
inlineprotected

Definition at line 653 of file sc_process.h.

◆ trigger_reset_event()

void sc_core::sc_process_b::trigger_reset_event ( )
protected

Friends And Related Function Documentation

◆ sc_cthread_process

friend class sc_cthread_process
friend

Definition at line 207 of file sc_process.h.

◆ sc_event

friend class sc_event
friend

Definition at line 213 of file sc_process.h.

◆ sc_get_current_process_handle

SC_API sc_process_handle sc_get_current_process_handle ( )
friend

◆ sc_method_process

friend class sc_method_process
friend

Definition at line 208 of file sc_process.h.

◆ sc_module

friend class sc_module
friend

Definition at line 220 of file sc_process.h.

◆ sc_object

friend class sc_object
friend

Definition at line 214 of file sc_process.h.

◆ sc_port_base

friend class sc_port_base
friend

Definition at line 215 of file sc_process.h.

◆ sc_process_handle

friend class sc_process_handle
friend

Definition at line 209 of file sc_process.h.

◆ sc_process_table

friend class sc_process_table
friend

Definition at line 210 of file sc_process.h.

◆ sc_report_handler

friend class sc_report_handler
friend

Definition at line 221 of file sc_process.h.

◆ sc_reset

friend class sc_reset
friend

Definition at line 222 of file sc_process.h.

◆ sc_reset_finder

friend class sc_reset_finder
friend

Definition at line 223 of file sc_process.h.

◆ sc_runnable

friend class sc_runnable
friend

Definition at line 216 of file sc_process.h.

◆ sc_sensitive

friend class sc_sensitive
friend

Definition at line 217 of file sc_process.h.

◆ sc_sensitive_neg

friend class sc_sensitive_neg
friend

Definition at line 219 of file sc_process.h.

◆ sc_sensitive_pos

friend class sc_sensitive_pos
friend

Definition at line 218 of file sc_process.h.

◆ sc_simcontext

friend class sc_simcontext
friend

Definition at line 206 of file sc_process.h.

◆ sc_suspend_all

SC_API void sc_suspend_all ( )
friend

◆ sc_suspendable

SC_API void sc_suspendable ( )
friend

◆ sc_thread_cor_fn

void sc_thread_cor_fn ( void *  arg)
friend

◆ sc_thread_process

friend class sc_thread_process
friend

Definition at line 211 of file sc_process.h.

◆ sc_unsuspend_all

SC_API void sc_unsuspend_all ( )
friend

◆ sc_unsuspendable

SC_API void sc_unsuspendable ( )
friend

◆ sc_unwind_exception

friend class sc_unwind_exception
friend

Definition at line 224 of file sc_process.h.

◆ timed_out

SC_API bool timed_out ( sc_simcontext )
friend

Member Data Documentation

◆ file

const char* sc_core::sc_process_b::file

Definition at line 361 of file sc_process.h.

◆ lineno

int sc_core::sc_process_b::lineno

Definition at line 362 of file sc_process.h.

◆ m_active_areset_n

int sc_core::sc_process_b::m_active_areset_n
protected

Definition at line 366 of file sc_process.h.

◆ m_active_reset_n

int sc_core::sc_process_b::m_active_reset_n
protected

Definition at line 367 of file sc_process.h.

◆ m_dont_init

bool sc_core::sc_process_b::m_dont_init
protected

Definition at line 368 of file sc_process.h.

◆ m_dynamic_proc

spawn_t sc_core::sc_process_b::m_dynamic_proc
protected

Definition at line 369 of file sc_process.h.

◆ m_event_count

int sc_core::sc_process_b::m_event_count
protected

Definition at line 371 of file sc_process.h.

◆ m_event_list_p

const sc_event_list* sc_core::sc_process_b::m_event_list_p
protected

Definition at line 372 of file sc_process.h.

◆ m_event_p

const sc_event* sc_core::sc_process_b::m_event_p
protected

Definition at line 370 of file sc_process.h.

◆ m_exist_p

sc_process_b* sc_core::sc_process_b::m_exist_p
protected

Definition at line 373 of file sc_process.h.

◆ m_free_host

bool sc_core::sc_process_b::m_free_host
protected

Definition at line 374 of file sc_process.h.

◆ m_has_reset_signal

bool sc_core::sc_process_b::m_has_reset_signal
protected

Definition at line 375 of file sc_process.h.

◆ m_has_stack

bool sc_core::sc_process_b::m_has_stack
protected

Definition at line 376 of file sc_process.h.

◆ m_is_thread

bool sc_core::sc_process_b::m_is_thread
protected

Definition at line 377 of file sc_process.h.

◆ m_last_created_process_p

sc_process_b* sc_core::sc_process_b::m_last_created_process_p
staticprotected

Definition at line 404 of file sc_process.h.

◆ m_last_report_p

sc_report* sc_core::sc_process_b::m_last_report_p
protected

Definition at line 378 of file sc_process.h.

◆ m_process_kind

sc_curr_proc_kind sc_core::sc_process_b::m_process_kind
protected

Definition at line 379 of file sc_process.h.

◆ m_references_n

int sc_core::sc_process_b::m_references_n
protected

Definition at line 380 of file sc_process.h.

◆ m_reset_event_p

sc_event* sc_core::sc_process_b::m_reset_event_p
protected

Definition at line 382 of file sc_process.h.

◆ m_resets

std::vector<sc_reset*> sc_core::sc_process_b::m_resets
protected

Definition at line 381 of file sc_process.h.

◆ m_resume_event_p

sc_event* sc_core::sc_process_b::m_resume_event_p
protected

Definition at line 383 of file sc_process.h.

◆ m_runnable_p

sc_process_b* sc_core::sc_process_b::m_runnable_p
protected

Definition at line 384 of file sc_process.h.

◆ m_semantics_host_p

sc_process_host* sc_core::sc_process_b::m_semantics_host_p
protected

Definition at line 385 of file sc_process.h.

◆ m_semantics_method_p

sc_entry_func sc_core::sc_process_b::m_semantics_method_p
protected

Definition at line 386 of file sc_process.h.

◆ m_state

int sc_core::sc_process_b::m_state
protected

Definition at line 387 of file sc_process.h.

◆ m_static_events

std::vector<const sc_event*> sc_core::sc_process_b::m_static_events
protected

Definition at line 388 of file sc_process.h.

◆ m_sticky_reset

bool sc_core::sc_process_b::m_sticky_reset
protected

Definition at line 389 of file sc_process.h.

◆ m_suspend_all_req

bool sc_core::sc_process_b::m_suspend_all_req
protected

Definition at line 400 of file sc_process.h.

◆ m_term_event_p

sc_event* sc_core::sc_process_b::m_term_event_p
protected

Definition at line 390 of file sc_process.h.

◆ m_throw_helper_p

sc_throw_it_helper* sc_core::sc_process_b::m_throw_helper_p
protected

Definition at line 391 of file sc_process.h.

◆ m_throw_status

process_throw_type sc_core::sc_process_b::m_throw_status
protected

Definition at line 392 of file sc_process.h.

◆ m_timed_out

bool sc_core::sc_process_b::m_timed_out
protected

Definition at line 393 of file sc_process.h.

◆ m_timeout_event_p

sc_event* sc_core::sc_process_b::m_timeout_event_p
protected

Definition at line 394 of file sc_process.h.

◆ m_trigger_type

trigger_t sc_core::sc_process_b::m_trigger_type
protected

Definition at line 395 of file sc_process.h.

◆ m_unsuspendable

bool sc_core::sc_process_b::m_unsuspendable
protected

Definition at line 398 of file sc_process.h.

◆ m_unwinding

bool sc_core::sc_process_b::m_unwinding
protected

Definition at line 396 of file sc_process.h.

◆ proc_id

int sc_core::sc_process_b::proc_id

Definition at line 363 of file sc_process.h.


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