SystemC
Recoding Infrastructure for SystemC v0.6.3 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
|
The simulation context. More...
#include <sysc/kernel/sc_simcontext.h>
Public Member Functions | |
sc_simcontext () | |
~sc_simcontext () | |
void | initialize (bool=false) |
void | cycle (const sc_time &) |
This function is not supported by the out-of-order simulation in the current release. More... | |
void | simulate (const sc_time &duration) |
void | stop () |
void | end () |
void | reset () |
void | print_threads_states () |
void | print_events_states () |
void | update_dependency_set () |
void | oooschedule (sc_cor *cor) |
Scheduling function in the OoO simulation. More... | |
int | sim_status () const |
bool | elaboration_done () const |
std::vector< sc_thread_handle > & | get_active_invokers () |
sc_object_manager * | get_object_manager () |
sc_status | get_status () const |
sc_object * | active_object () |
void | hierarchy_push (sc_module *) |
sc_module * | hierarchy_pop () |
sc_module * | hierarchy_curr () const |
sc_object * | first_object () |
sc_object * | next_object () |
sc_object * | find_object (const char *name) |
sc_module_registry * | get_module_registry () |
sc_port_registry * | get_port_registry () |
sc_export_registry * | get_export_registry () |
sc_prim_channel_registry * | get_prim_channel_registry () |
const char * | gen_unique_name (const char *basename_, bool preserve_first=false) |
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, int seg_id, int inst_id) |
Two new parameters segment ID and instance ID are added for the out-of-order simulation. More... | |
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, int seg_id, int inst_id) |
Two new parameters segment ID and instance ID are added for the out-of-order simulation. More... | |
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, int seg_id, int inst_id) |
Two new parameters segment ID and instance ID are added for the out-of-order simulation. More... | |
sc_process_b * | get_curr_proc () const |
sc_object * | get_current_writer () const |
bool | write_check () const |
void | set_curr_proc (sc_process_b *) |
This function is not supported by the out-of-order simulation in the current release. More... | |
void | reset_curr_proc () |
int | next_proc_id () |
void | add_trace_file (sc_trace_file *) |
void | remove_trace_file (sc_trace_file *) |
const sc_time & | max_time () const |
const sc_time & | time_stamp () |
sc_dt::uint64 | change_stamp () const |
sc_dt::uint64 | delta_count () const |
bool | event_occurred (sc_dt::uint64 last_change_count) const |
bool | evaluation_phase () const |
bool | is_running () const |
bool | update_phase () const |
bool | notify_phase () const |
bool | get_error () |
void | set_error (sc_report *) |
sc_cor_pkg * | cor_pkg () |
sc_cor * | next_cor () |
const ::std::vector< sc_object * > & | get_child_objects () const |
void | elaborate () |
void | prepare_to_simulate () |
void | initial_crunch (bool no_crunch) |
This function is partially supported by the out-of-order simulation in the current release. More... | |
bool | next_time (sc_time &t) const |
bool | pending_activity_at_current_time () const |
void | remove_running_process (sc_process_b *) |
Remove a process from the running queue. More... | |
bool | is_running_process (sc_process_b *) |
Check whether a process is in the running queue. More... | |
void | suspend_cor (sc_cor *) |
Suspend a coroutine. More... | |
void | resume_cor (sc_cor *) |
Resume a coroutine. More... | |
bool | is_locked () |
Check whether the kernel lock is acquired. More... | |
bool | is_unlocked () |
Check whether the kernel lock is released. More... | |
bool | is_lock_owner () |
Check whether the kernel lock is owned by the currently running coroutine. More... | |
bool | is_not_owner () |
Check whether the kernel lock is not owned by the currently running coroutine. More... | |
bool | is_locked_and_owner () |
Check whether the kernel lock is acquired and owned by the currently running coroutine. More... | |
unsigned int | conflict_table_index_lookup (int, int) |
Convert segment ID and instance ID to index in the data conflict table and event notification table. More... | |
unsigned int | time_adv_table_index_lookup (int) |
Convert segment ID to index in the time advance table. More... | |
const sc_time & | get_oldest_untraced_time () |
Public Attributes | |
std::list< sc_process_b * > | m_synch_thread_queue |
std::list< sc_process_b * > | m_all_proc |
sc_time | m_oldest_time |
sc_timestamp | m_simulation_duration |
sc_timestamp | m_simulation_time |
sc_starvation_policy | m_starvation_policy |
int | last_seg_id |
std::list< sc_process_b * > | m_waking_up_threads |
The simulation context.
Definition at line 329 of file sc_simcontext.h.
sc_core::sc_simcontext::sc_simcontext | ( | ) |
sc_core::sc_simcontext::~sc_simcontext | ( | ) |
sc_object* sc_core::sc_simcontext::active_object | ( | ) |
void sc_core::sc_simcontext::add_trace_file | ( | sc_trace_file * | ) |
|
inline |
Definition at line 1047 of file sc_simcontext.h.
unsigned int sc_core::sc_simcontext::conflict_table_index_lookup | ( | int | , |
int | |||
) |
Convert segment ID and instance ID to index in the data conflict table and event notification table.
|
inline |
Definition at line 534 of file sc_simcontext.h.
sc_process_handle sc_core::sc_simcontext::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, | ||
int | seg_id, | ||
int | inst_id | ||
) |
Two new parameters segment ID and instance ID are added for the out-of-order simulation.
sc_process_handle sc_core::sc_simcontext::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, | ||
int | seg_id, | ||
int | inst_id | ||
) |
Two new parameters segment ID and instance ID are added for the out-of-order simulation.
sc_process_handle sc_core::sc_simcontext::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, | ||
int | seg_id, | ||
int | inst_id | ||
) |
Two new parameters segment ID and instance ID are added for the out-of-order simulation.
void sc_core::sc_simcontext::cycle | ( | const sc_time & | ) |
This function is not supported by the out-of-order simulation in the current release.
sc_dt::uint64 sc_core::sc_simcontext::delta_count | ( | ) | const |
void sc_core::sc_simcontext::elaborate | ( | ) |
|
inline |
Definition at line 958 of file sc_simcontext.h.
void sc_core::sc_simcontext::end | ( | ) |
|
inline |
Definition at line 1063 of file sc_simcontext.h.
|
inline |
Definition at line 1056 of file sc_simcontext.h.
sc_object* sc_core::sc_simcontext::find_object | ( | const char * | name | ) |
sc_object* sc_core::sc_simcontext::first_object | ( | ) |
const char* sc_core::sc_simcontext::gen_unique_name | ( | const char * | basename_, |
bool | preserve_first = false |
||
) |
|
inline |
Definition at line 332 of file sc_simcontext_int.h.
const ::std::vector<sc_object*>& sc_core::sc_simcontext::get_child_objects | ( | ) | const |
sc_process_b* sc_core::sc_simcontext::get_curr_proc | ( | ) | const |
|
inline |
Definition at line 1115 of file sc_simcontext.h.
|
inline |
Definition at line 1094 of file sc_simcontext.h.
|
inline |
Definition at line 1008 of file sc_simcontext.h.
|
inline |
Definition at line 994 of file sc_simcontext.h.
|
inline |
Definition at line 987 of file sc_simcontext.h.
const sc_time& sc_core::sc_simcontext::get_oldest_untraced_time | ( | ) |
|
inline |
Definition at line 1001 of file sc_simcontext.h.
|
inline |
Definition at line 1015 of file sc_simcontext.h.
|
inline |
Definition at line 964 of file sc_simcontext.h.
sc_module* sc_core::sc_simcontext::hierarchy_curr | ( | ) | const |
sc_module* sc_core::sc_simcontext::hierarchy_pop | ( | ) |
void sc_core::sc_simcontext::hierarchy_push | ( | sc_module * | ) |
|
inline |
This function is partially supported by the out-of-order simulation in the current release.
void sc_core::sc_simcontext::initialize | ( | bool | = false | ) |
bool sc_core::sc_simcontext::is_lock_owner | ( | ) |
Check whether the kernel lock is owned by the currently running coroutine.
bool sc_core::sc_simcontext::is_locked | ( | ) |
Check whether the kernel lock is acquired.
bool sc_core::sc_simcontext::is_locked_and_owner | ( | ) |
Check whether the kernel lock is acquired and owned by the currently running coroutine.
bool sc_core::sc_simcontext::is_not_owner | ( | ) |
Check whether the kernel lock is not owned by the currently running coroutine.
bool sc_core::sc_simcontext::is_running | ( | ) | const |
|
inline |
Check whether a process is in the running queue.
Definition at line 1134 of file sc_simcontext.h.
bool sc_core::sc_simcontext::is_unlocked | ( | ) |
Check whether the kernel lock is released.
|
inline |
Definition at line 1031 of file sc_simcontext.h.
sc_cor* sc_core::sc_simcontext::next_cor | ( | ) |
sc_object* sc_core::sc_simcontext::next_object | ( | ) |
|
inline |
Definition at line 1023 of file sc_simcontext.h.
bool sc_core::sc_simcontext::next_time | ( | sc_time & | t | ) | const |
|
inline |
Definition at line 1078 of file sc_simcontext.h.
void sc_core::sc_simcontext::oooschedule | ( | sc_cor * | cor | ) |
Scheduling function in the OoO simulation.
bool sc_core::sc_simcontext::pending_activity_at_current_time | ( | ) | const |
void sc_core::sc_simcontext::prepare_to_simulate | ( | ) |
void sc_core::sc_simcontext::print_events_states | ( | ) |
void sc_core::sc_simcontext::print_threads_states | ( | ) |
|
inline |
Remove a process from the running queue.
Definition at line 1128 of file sc_simcontext.h.
void sc_core::sc_simcontext::remove_trace_file | ( | sc_trace_file * | ) |
void sc_core::sc_simcontext::reset | ( | ) |
|
inline |
Definition at line 103 of file sc_simcontext_int.h.
void sc_core::sc_simcontext::resume_cor | ( | sc_cor * | ) |
Resume a coroutine.
|
inline |
This function is not supported by the out-of-order simulation in the current release.
Definition at line 93 of file sc_simcontext_int.h.
|
inline |
Definition at line 1085 of file sc_simcontext.h.
|
inline |
Definition at line 973 of file sc_simcontext.h.
void sc_core::sc_simcontext::simulate | ( | const sc_time & | duration | ) |
void sc_core::sc_simcontext::stop | ( | ) |
void sc_core::sc_simcontext::suspend_cor | ( | sc_cor * | ) |
Suspend a coroutine.
unsigned int sc_core::sc_simcontext::time_adv_table_index_lookup | ( | int | ) |
Convert segment ID to index in the time advance table.
const sc_time& sc_core::sc_simcontext::time_stamp | ( | ) |
void sc_core::sc_simcontext::update_dependency_set | ( | ) |
|
inline |
Definition at line 1071 of file sc_simcontext.h.
|
inline |
Definition at line 1122 of file sc_simcontext.h.
|
friend |
|
friend |
Definition at line 332 of file sc_simcontext.h.
|
friend |
Definition at line 339 of file sc_simcontext.h.
|
friend |
Definition at line 343 of file sc_simcontext.h.
|
friend |
Definition at line 349 of file sc_simcontext.h.
|
friend |
This function returns the local delta count of the running process.
|
friend |
|
friend |
Definition at line 335 of file sc_simcontext.h.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 334 of file sc_simcontext.h.
|
friend |
|
friend |
Definition at line 369 of file sc_simcontext.h.
|
friend |
|
friend |
Definition at line 344 of file sc_simcontext.h.
|
friend |
Definition at line 336 of file sc_simcontext.h.
|
friend |
Definition at line 341 of file sc_simcontext.h.
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 345 of file sc_simcontext.h.
|
friend |
Definition at line 348 of file sc_simcontext.h.
|
friend |
Definition at line 346 of file sc_simcontext.h.
|
friend |
Definition at line 347 of file sc_simcontext.h.
|
friend |
Definition at line 351 of file sc_simcontext.h.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 350 of file sc_simcontext.h.
|
friend |
Definition at line 342 of file sc_simcontext.h.
|
friend |
int sc_core::sc_simcontext::last_seg_id |
Definition at line 897 of file sc_simcontext.h.
std::list<sc_process_b*> sc_core::sc_simcontext::m_all_proc |
Definition at line 882 of file sc_simcontext.h.
sc_time sc_core::sc_simcontext::m_oldest_time |
Definition at line 893 of file sc_simcontext.h.
sc_timestamp sc_core::sc_simcontext::m_simulation_duration |
Definition at line 894 of file sc_simcontext.h.
sc_timestamp sc_core::sc_simcontext::m_simulation_time |
Definition at line 895 of file sc_simcontext.h.
sc_starvation_policy sc_core::sc_simcontext::m_starvation_policy |
Definition at line 896 of file sc_simcontext.h.
std::list<sc_process_b*> sc_core::sc_simcontext::m_synch_thread_queue |
Definition at line 879 of file sc_simcontext.h.
std::list<sc_process_b*> sc_core::sc_simcontext::m_waking_up_threads |
Definition at line 898 of file sc_simcontext.h.