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. | |
void | simulate (const sc_time &duration) |
void | stop () |
void | end () |
void | reset () |
void | oooschedule (sc_cor *cor) |
Scheduling function in the OoO simulation. | |
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. | |
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. | |
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. | |
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. | |
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 () const |
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. | |
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. | |
bool | is_running_process (sc_process_b *) |
Check whether a process is in the running queue. | |
void | suspend_cor (sc_cor *) |
Suspend a coroutine. | |
void | resume_cor (sc_cor *) |
Resume a coroutine. | |
bool | is_locked () |
Check whether the kernel lock is acquired. | |
bool | is_unlocked () |
Check whether the kernel lock is released. | |
bool | is_lock_owner () |
Check whether the kernel lock is owned by the currently running coroutine. | |
bool | is_not_owner () |
Check whether the kernel lock is not owned by the currently running coroutine. | |
bool | is_locked_and_owner () |
Check whether the kernel lock is acquired and owned by the currently running coroutine. | |
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. | |
unsigned int | time_adv_table_index_lookup (int) |
Convert segment ID to index in the time advance table. | |
Friends | |
struct | sc_invoke_method |
class | sc_event |
class | sc_module |
class | sc_channel |
class | sc_object |
class | sc_time |
class | sc_clock |
class | sc_method_process |
class | sc_phase_callback_registry |
class | sc_process_b |
class | sc_process_handle |
class | sc_prim_channel |
class | sc_cthread_process |
class | sc_thread_process |
struct | sc_kernel_lock |
sc_dt::uint64 | sc_delta_count () |
This function returns the local delta count of the running process. | |
const std::vector< sc_event * > & | sc_get_top_level_events (const sc_simcontext *simc_p) |
const std::vector< sc_object * > & | sc_get_top_level_objects (const sc_simcontext *simc_p) |
bool | sc_is_running (const sc_simcontext *simc_p) |
void | sc_pause () |
bool | sc_end_of_simulation_invoked () |
void | sc_start (const sc_time &, sc_starvation_policy) |
bool | sc_start_of_simulation_invoked () |
void | sc_thread_cor_fn (void *) |
sc_time | sc_time_to_pending_activity (const sc_simcontext *) |
bool | sc_pending_activity_at_current_time (const sc_simcontext *) |
bool | sc_pending_activity_at_future_time (const sc_simcontext *) |
sc_cor * | get_cor_pointer (sc_process_b *process_p) |
void | sc_set_time_resolution (double, sc_time_unit) |
sc_time | sc_get_time_resolution () |
void | sc_set_default_time_unit (double, sc_time_unit) |
sc_time | sc_get_default_time_unit () |
The simulation context.
Definition at line 247 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 * | ) |
sc_dt::uint64 sc_core::sc_simcontext::change_stamp | ( | ) | const [inline] |
Definition at line 803 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.
sc_cor_pkg* sc_core::sc_simcontext::cor_pkg | ( | ) | [inline] |
Definition at line 434 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 | ( | ) |
bool sc_core::sc_simcontext::elaboration_done | ( | ) | const [inline] |
Definition at line 719 of file sc_simcontext.h.
void sc_core::sc_simcontext::end | ( | ) |
bool sc_core::sc_simcontext::evaluation_phase | ( | ) | const [inline] |
Definition at line 834 of file sc_simcontext.h.
bool sc_core::sc_simcontext::event_occurred | ( | sc_dt::uint64 | last_change_count | ) | const [inline] |
Definition at line 827 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 | |||
) |
std::vector< sc_thread_handle > & sc_core::sc_simcontext::get_active_invokers | ( | ) | [inline] |
Definition at line 287 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 |
sc_object * sc_core::sc_simcontext::get_current_writer | ( | ) | const [inline] |
Definition at line 886 of file sc_simcontext.h.
bool sc_core::sc_simcontext::get_error | ( | ) | [inline] |
Definition at line 865 of file sc_simcontext.h.
sc_export_registry * sc_core::sc_simcontext::get_export_registry | ( | ) | [inline] |
Definition at line 769 of file sc_simcontext.h.
sc_module_registry * sc_core::sc_simcontext::get_module_registry | ( | ) | [inline] |
Definition at line 755 of file sc_simcontext.h.
sc_object_manager * sc_core::sc_simcontext::get_object_manager | ( | ) | [inline] |
Definition at line 748 of file sc_simcontext.h.
sc_port_registry * sc_core::sc_simcontext::get_port_registry | ( | ) | [inline] |
Definition at line 762 of file sc_simcontext.h.
sc_prim_channel_registry * sc_core::sc_simcontext::get_prim_channel_registry | ( | ) | [inline] |
Definition at line 776 of file sc_simcontext.h.
sc_status sc_core::sc_simcontext::get_status | ( | ) | const [inline] |
Definition at line 725 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 * | ) |
void sc_core::sc_simcontext::initial_crunch | ( | bool | no_crunch | ) | [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 |
bool sc_core::sc_simcontext::is_running_process | ( | sc_process_b * | proc | ) | [inline] |
Check whether a process is in the running queue.
Definition at line 905 of file sc_simcontext.h.
bool sc_core::sc_simcontext::is_unlocked | ( | ) |
Check whether the kernel lock is released.
const sc_time & sc_core::sc_simcontext::max_time | ( | ) | const [inline] |
Definition at line 792 of file sc_simcontext.h.
sc_cor* sc_core::sc_simcontext::next_cor | ( | ) |
sc_object* sc_core::sc_simcontext::next_object | ( | ) |
int sc_core::sc_simcontext::next_proc_id | ( | ) | [inline] |
Definition at line 784 of file sc_simcontext.h.
bool sc_core::sc_simcontext::next_time | ( | sc_time & | t | ) | const |
bool sc_core::sc_simcontext::notify_phase | ( | ) | const [inline] |
Definition at line 849 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::remove_running_process | ( | sc_process_b * | proc | ) | [inline] |
Remove a process from the running queue.
Definition at line 899 of file sc_simcontext.h.
void sc_core::sc_simcontext::remove_trace_file | ( | sc_trace_file * | ) |
void sc_core::sc_simcontext::reset | ( | ) |
void sc_core::sc_simcontext::reset_curr_proc | ( | ) | [inline] |
Definition at line 94 of file sc_simcontext_int.h.
void sc_core::sc_simcontext::resume_cor | ( | sc_cor * | ) |
Resume a coroutine.
void sc_core::sc_simcontext::set_curr_proc | ( | sc_process_b * | process_h | ) | [inline] |
This function is not supported by the out-of-order simulation in the current release.
Definition at line 84 of file sc_simcontext_int.h.
void sc_core::sc_simcontext::set_error | ( | sc_report * | err | ) | [inline] |
Definition at line 856 of file sc_simcontext.h.
int sc_core::sc_simcontext::sim_status | ( | ) | const [inline] |
Definition at line 734 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 | ( | ) | const [inline] |
Definition at line 810 of file sc_simcontext.h.
bool sc_core::sc_simcontext::update_phase | ( | ) | const [inline] |
Definition at line 842 of file sc_simcontext.h.
bool sc_core::sc_simcontext::write_check | ( | ) | const [inline] |
Definition at line 893 of file sc_simcontext.h.
sc_cor* get_cor_pointer | ( | sc_process_b * | process_p | ) | [friend] |
friend class sc_channel [friend] |
Definition at line 254 of file sc_simcontext.h.
friend class sc_clock [friend] |
Definition at line 258 of file sc_simcontext.h.
friend class sc_cthread_process [friend] |
Definition at line 264 of file sc_simcontext.h.
sc_dt::uint64 sc_delta_count | ( | ) | [friend] |
This function returns the local delta count of the running process.
Definition at line 996 of file sc_simcontext.h.
bool sc_end_of_simulation_invoked | ( | ) | [friend] |
Definition at line 1056 of file sc_simcontext.h.
friend class sc_event [friend] |
Definition at line 250 of file sc_simcontext.h.
sc_time sc_get_default_time_unit | ( | ) | [friend] |
sc_time sc_get_time_resolution | ( | ) | [friend] |
const std::vector<sc_event*>& sc_get_top_level_events | ( | const sc_simcontext * | simc_p | ) | [friend] |
const std::vector<sc_object*>& sc_get_top_level_objects | ( | const sc_simcontext * | simc_p | ) | [friend] |
friend struct sc_invoke_method [friend] |
Definition at line 249 of file sc_simcontext.h.
bool sc_is_running | ( | const sc_simcontext * | simc_p | ) | [friend] |
friend struct sc_kernel_lock [friend] |
Definition at line 282 of file sc_simcontext.h.
friend class sc_method_process [friend] |
Definition at line 259 of file sc_simcontext.h.
friend class sc_module [friend] |
Definition at line 251 of file sc_simcontext.h.
friend class sc_object [friend] |
Definition at line 256 of file sc_simcontext.h.
void sc_pause | ( | ) | [friend] |
Definition at line 1017 of file sc_simcontext.h.
bool sc_pending_activity_at_current_time | ( | const sc_simcontext * | ) | [friend] |
bool sc_pending_activity_at_future_time | ( | const sc_simcontext * | ) | [friend] |
friend class sc_phase_callback_registry [friend] |
Definition at line 260 of file sc_simcontext.h.
friend class sc_prim_channel [friend] |
Definition at line 263 of file sc_simcontext.h.
friend class sc_process_b [friend] |
Definition at line 261 of file sc_simcontext.h.
friend class sc_process_handle [friend] |
Definition at line 262 of file sc_simcontext.h.
void sc_set_default_time_unit | ( | double | , | |
sc_time_unit | ||||
) | [friend] |
void sc_set_time_resolution | ( | double | , | |
sc_time_unit | ||||
) | [friend] |
void sc_start | ( | const sc_time & | , | |
sc_starvation_policy | ||||
) | [friend] |
bool sc_start_of_simulation_invoked | ( | ) | [friend] |
Definition at line 1068 of file sc_simcontext.h.
void sc_thread_cor_fn | ( | void * | ) | [friend] |
friend class sc_thread_process [friend] |
Definition at line 265 of file sc_simcontext.h.
friend class sc_time [friend] |
Definition at line 257 of file sc_simcontext.h.
sc_time sc_time_to_pending_activity | ( | const sc_simcontext * | ) | [friend] |