SystemC
Recoding Infrastructure for SystemC v0.6.3 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
|
User initiated dynamic process support. More...
#include <sysc/kernel/sc_process.h>
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 Types inherited from sc_core::sc_object | |
typedef unsigned | phase_cb_mask |
Public Member Functions | |
void | set_upcoming_segment_ids (int *segment_ids) |
sets the upcoming segment ids TS 07/08/17 More... | |
int * | get_upcoming_segment_ids () |
returns the upcoming segment ids TS 07/08/17 More... | |
void | set_upcoming_socket_id (int socket_id) |
sets the upcoming socket id ZC 10:30 2018/10/31 More... | |
int | get_upcoming_socket_id () |
returns the upcoming socket id ZC 10:31 2018/10/31 More... | |
void | increase_offset (int offset) |
increase the offset ZC 10:30 2018/10/31 More... | |
void | decrease_offset (int offset) |
decrease the offset ZC 10:31 2018/10/31 More... | |
int | get_offset () |
returns the offset ZC 10:31 2018/10/31 More... | |
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 |
const ::std::vector< sc_object * > & | get_child_objects () const |
sc_curr_proc_kind | proc_kind () const |
sc_event & | reset_event () |
sc_event & | terminated_event () |
void | lock_and_push (CHNL_MTX_TYPE_ *lock) |
Acquire a new channel lock or increment the lock counter. More... | |
void | pop_and_unlock (CHNL_MTX_TYPE_ *lock) |
Release a channel lock or decrement the lock counter. More... | |
void | lock_all_channels (void) |
Acquire all the channel locks. More... | |
void | unlock_all_channels (void) |
Release all the channel locks. More... | |
int | get_segment_id () |
Set the current segment ID of this process. More... | |
void | set_segment_id (int id) |
Get the current segment ID of this process. More... | |
const sc_timestamp & | get_timestamp () |
Set the local time stamp of this process. More... | |
void | set_timestamp (const sc_timestamp &ts) |
Get the local time stamp of this process. More... | |
int | get_instance_id () |
Set the instance ID of this process. More... | |
void | set_instance_id (int id) |
Get the instance ID of this process. More... | |
void | add_sensitivity_event (const sc_event &e) |
std::string | event_names () |
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_simcontext * | simcontext () const |
bool | add_attribute (sc_attr_base &) |
sc_attr_base * | get_attribute (const std::string &name_) |
const sc_attr_base * | get_attribute (const std::string &name_) const |
sc_attr_base * | remove_attribute (const std::string &name_) |
void | remove_all_attributes () |
int | num_attributes () const |
sc_attr_cltn & | attr_cltn () |
const sc_attr_cltn & | attr_cltn () const |
virtual const std::vector < sc_event * > & | get_child_events () const |
sc_object * | get_parent () const |
sc_object * | get_parent_object () const |
Static Public Member Functions | |
static sc_process_handle | last_created_process_handle () |
Public Attributes | |
bool | event_list_member_triggered |
sc_timestamp | wake_up_time_for_event_list |
int * | segment_ids |
stores the upcoming segment ids TS 07/08/17 More... | |
int | socket_id_ |
stores the upcoming socket id ZC 10:31 2018/10/31 More... | |
const char * | file |
int | lineno |
int | proc_id |
int | m_process_state |
The name of this process. More... | |
sc_event_or_list * | m_sensitivity_events |
sc_timestamp | possible_wakeup_time |
bool | invoker |
sc_process_b * | cur_invoker_method_handle |
Static Protected Member Functions | |
static sc_process_b * | last_created_process_base () |
Static Protected Attributes | |
static sc_process_b * | m_last_created_process_p |
Friends | |
class | Invoker |
class | sc_simcontext |
class | sc_cthread_process |
class | sc_method_process |
class | sc_process_handle |
class | sc_thread_process |
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_channel |
class | sc_report_handler |
class | sc_reset |
class | sc_reset_finder |
class | sc_unwind_exception |
const char * | sc_gen_unique_name (const char *, bool preserve_first) |
sc_process_handle | sc_get_current_process_handle () |
void | sc_thread_cor_fn (void *arg) |
bool | timed_out (sc_simcontext *) |
bool | heap_cmp (sc_process_b *&, sc_process_b *&) |
User initiated dynamic process support.
This class implements the base class for a threaded process_base process whose semantics are provided by the true virtual method semantics(). Classes derived from this one will provide a version of semantics which implements the desired semantics. See the sc_spawn_xxx classes below.
Notes: (1) Object instances of this class maintain a reference count of outstanding handles. When the handle count goes to zero the object will be deleted. (2) Descriptions of the methods and operators in this class appear with their implementations. (3) The m_sticky_reset field is used to handle synchronous resets that are enabled via the sc_process_handle::sync_reset_on() method. These resets are not generated by a signal, but rather are modal by method call: sync_reset_on - sync_reset_off.
Definition at line 558 of file sc_process.h.
Enumerator | |
---|---|
ps_bit_disabled | |
ps_bit_ready_to_run | |
ps_bit_suspended | |
ps_bit_zombie | |
ps_normal |
Definition at line 704 of file sc_process.h.
Enumerator | |
---|---|
THROW_NONE | |
THROW_KILL | |
THROW_USER | |
THROW_ASYNC_RESET | |
THROW_SYNC_RESET |
Definition at line 696 of file sc_process.h.
Enumerator | |
---|---|
reset_asynchronous | |
reset_synchronous_off | |
reset_synchronous_on |
Definition at line 712 of file sc_process.h.
Enumerator | |
---|---|
STATIC | |
EVENT | |
OR_LIST | |
AND_LIST | |
TIMEOUT | |
EVENT_TIMEOUT | |
OR_LIST_TIMEOUT | |
AND_LIST_TIMEOUT |
Definition at line 718 of file sc_process.h.
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 | ||
) |
|
protectedvirtual |
|
inlineprotectedvirtual |
Reimplemented from sc_core::sc_object.
Definition at line 986 of file sc_process.h.
void sc_core::sc_process_b::add_sensitivity_event | ( | const sc_event & | e | ) |
|
protected |
|
inlineprotected |
Definition at line 1095 of file sc_process.h.
|
inline |
Definition at line 740 of file sc_process.h.
|
inline |
decrease the offset ZC 10:31 2018/10/31
Definition at line 681 of file sc_process.h.
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
|
protected |
|
inline |
Definition at line 741 of file sc_process.h.
|
virtual |
Reimplemented in sc_core::sc_cthread_process.
std::string sc_core::sc_process_b::dump_state | ( | ) | const |
|
inlineprotected |
Definition at line 828 of file sc_process.h.
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
std::string sc_core::sc_process_b::event_names | ( | ) |
|
protected |
|
inlinevirtual |
Reimplemented from sc_core::sc_object.
Definition at line 1008 of file sc_process.h.
int sc_core::sc_process_b::get_instance_id | ( | ) |
Set the instance ID of this process.
|
inlineprotected |
Definition at line 830 of file sc_process.h.
|
inline |
returns the offset ZC 10:31 2018/10/31
Definition at line 690 of file sc_process.h.
int sc_core::sc_process_b::get_segment_id | ( | ) |
Set the current segment ID of this process.
const sc_timestamp& sc_core::sc_process_b::get_timestamp | ( | ) |
Set the local time stamp of this process.
|
inline |
returns the upcoming segment ids TS 07/08/17
Definition at line 631 of file sc_process.h.
|
inline |
returns the upcoming socket id ZC 10:31 2018/10/31
Definition at line 656 of file sc_process.h.
|
inline |
increase the offset ZC 10:30 2018/10/31
Definition at line 672 of file sc_process.h.
|
inlineprotected |
Definition at line 1023 of file sc_process.h.
|
inlineprotected |
Definition at line 1036 of file sc_process.h.
|
inlineprotected |
Definition at line 1047 of file sc_process.h.
|
inlineprotected |
Definition at line 1057 of file sc_process.h.
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
|
inlinestaticprotected |
Definition at line 1108 of file sc_process.h.
|
inlinestatic |
Definition at line 517 of file sc_process_handle.h.
void sc_core::sc_process_b::lock_all_channels | ( | void | ) |
Acquire all the channel locks.
Acquire all the channel locks in the list m_acq_chnl_lock_queue, from the beginning to the end.
void sc_core::sc_process_b::lock_and_push | ( | CHNL_MTX_TYPE_ * | lock | ) |
Acquire a new channel lock or increment the lock counter.
Acquire a new channel lock and push it to the end of the list m_acq_chnl_lock_queue, or increment the lock counter of the corresponding channel lock in the list.
void sc_core::sc_process_b::pop_and_unlock | ( | CHNL_MTX_TYPE_ * | lock | ) |
Release a channel lock or decrement the lock counter.
Release the channel lock at the end of the list m_acq_chnl_lock_queue if its lock counter equals one, or decrement its lock counter.
|
inline |
Definition at line 1120 of file sc_process.h.
|
inlineprotectedvirtual |
Reimplemented from sc_core::sc_object.
Definition at line 995 of file sc_process.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
sc_event& sc_core::sc_process_b::reset_event | ( | ) |
|
protected |
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
|
inlineprotected |
Definition at line 1169 of file sc_process.h.
void sc_core::sc_process_b::set_instance_id | ( | int | id | ) |
Get the instance ID of this process.
|
inlineprotected |
Definition at line 837 of file sc_process.h.
void sc_core::sc_process_b::set_segment_id | ( | int | id | ) |
Get the current segment ID of this process.
void sc_core::sc_process_b::set_timestamp | ( | const sc_timestamp & | ts | ) |
Get the local time stamp of this process.
|
inline |
sets the upcoming segment ids TS 07/08/17
Definition at line 622 of file sc_process.h.
|
inline |
sets the upcoming socket id ZC 10:30 2018/10/31
Definition at line 647 of file sc_process.h.
|
inlineprotected |
Definition at line 1070 of file sc_process.h.
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
|
inlineprotectedvirtual |
Definition at line 1210 of file sc_process.h.
sc_event& sc_core::sc_process_b::terminated_event | ( | ) |
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
|
protectedpure virtual |
Implemented in sc_core::sc_method_process, and sc_core::sc_thread_process.
|
inlineprotected |
Definition at line 1221 of file sc_process.h.
|
protected |
void sc_core::sc_process_b::unlock_all_channels | ( | void | ) |
Release all the channel locks.
Release all the channel locks in the list m_acq_chnl_lock_queue, from the end of the beginning.
|
friend |
|
friend |
Definition at line 559 of file sc_process.h.
|
friend |
Definition at line 576 of file sc_process.h.
|
friend |
Definition at line 562 of file sc_process.h.
|
friend |
|
friend |
|
friend |
Definition at line 563 of file sc_process.h.
|
friend |
Definition at line 573 of file sc_process.h.
|
friend |
Definition at line 567 of file sc_process.h.
|
friend |
Definition at line 568 of file sc_process.h.
|
friend |
Definition at line 564 of file sc_process.h.
|
friend |
Definition at line 578 of file sc_process.h.
|
friend |
Definition at line 579 of file sc_process.h.
|
friend |
Definition at line 580 of file sc_process.h.
|
friend |
Definition at line 569 of file sc_process.h.
|
friend |
Definition at line 570 of file sc_process.h.
|
friend |
Definition at line 572 of file sc_process.h.
|
friend |
Definition at line 571 of file sc_process.h.
|
friend |
Definition at line 561 of file sc_process.h.
|
friend |
|
friend |
Definition at line 565 of file sc_process.h.
|
friend |
Definition at line 581 of file sc_process.h.
|
friend |
sc_process_b* sc_core::sc_process_b::cur_invoker_method_handle |
Definition at line 964 of file sc_process.h.
bool sc_core::sc_process_b::event_list_member_triggered |
Definition at line 605 of file sc_process.h.
const char* sc_core::sc_process_b::file |
Definition at line 882 of file sc_process.h.
bool sc_core::sc_process_b::invoker |
Definition at line 963 of file sc_process.h.
int sc_core::sc_process_b::lineno |
Definition at line 883 of file sc_process.h.
|
protected |
A list of channel locks acquired by this process.
Definition at line 932 of file sc_process.h.
|
protected |
Definition at line 894 of file sc_process.h.
|
protected |
Definition at line 895 of file sc_process.h.
|
protected |
Definition at line 896 of file sc_process.h.
|
protected |
Definition at line 897 of file sc_process.h.
|
protected |
Definition at line 900 of file sc_process.h.
|
protected |
Definition at line 901 of file sc_process.h.
|
protected |
Definition at line 898 of file sc_process.h.
|
protected |
Definition at line 902 of file sc_process.h.
|
protected |
Definition at line 903 of file sc_process.h.
|
protected |
Definition at line 904 of file sc_process.h.
|
protected |
Definition at line 905 of file sc_process.h.
|
protected |
The instance ID of this process.
Definition at line 950 of file sc_process.h.
|
protected |
Definition at line 906 of file sc_process.h.
|
staticprotected |
Definition at line 957 of file sc_process.h.
|
protected |
Definition at line 907 of file sc_process.h.
|
protected |
Definition at line 908 of file sc_process.h.
|
protected |
Definition at line 909 of file sc_process.h.
int sc_core::sc_process_b::m_process_state |
The name of this process.
Definition at line 890 of file sc_process.h.
|
protected |
Definition at line 910 of file sc_process.h.
|
protected |
Definition at line 912 of file sc_process.h.
|
protected |
Definition at line 911 of file sc_process.h.
|
protected |
Definition at line 913 of file sc_process.h.
|
protected |
Definition at line 914 of file sc_process.h.
|
protected |
The current segment ID of this process.
Definition at line 938 of file sc_process.h.
|
protected |
Definition at line 915 of file sc_process.h.
|
protected |
Definition at line 916 of file sc_process.h.
sc_event_or_list* sc_core::sc_process_b::m_sensitivity_events |
Definition at line 892 of file sc_process.h.
|
protected |
Definition at line 917 of file sc_process.h.
|
protected |
Definition at line 918 of file sc_process.h.
|
protected |
Definition at line 919 of file sc_process.h.
|
protected |
Definition at line 920 of file sc_process.h.
|
protected |
Definition at line 921 of file sc_process.h.
|
protected |
Definition at line 922 of file sc_process.h.
|
protected |
Definition at line 923 of file sc_process.h.
|
protected |
Definition at line 924 of file sc_process.h.
|
protected |
The local time stamp of this process.
Definition at line 944 of file sc_process.h.
|
protected |
Definition at line 925 of file sc_process.h.
|
protected |
Definition at line 926 of file sc_process.h.
sc_timestamp sc_core::sc_process_b::possible_wakeup_time |
Definition at line 959 of file sc_process.h.
int sc_core::sc_process_b::proc_id |
Definition at line 884 of file sc_process.h.
|
protected |
Definition at line 953 of file sc_process.h.
int* sc_core::sc_process_b::segment_ids |
stores the upcoming segment ids TS 07/08/17
Definition at line 640 of file sc_process.h.
int sc_core::sc_process_b::socket_id_ |
stores the upcoming socket id ZC 10:31 2018/10/31
Definition at line 665 of file sc_process.h.
sc_timestamp sc_core::sc_process_b::wake_up_time_for_event_list |
Definition at line 613 of file sc_process.h.