Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_simcontext Class Reference

#include <sc_simcontext.h>

Collaboration diagram for sc_simcontext:

Collaboration graph
[legend]
List of all members.

Public Methods

 sc_simcontext ()
 ~sc_simcontext ()
void initialize (bool=false)
void cycle (const sc_time &)
void simulate (const sc_time &duration)
void stop ()
void end ()
void reset ()
int sim_status () const
bool elaboration_done () const
sc_object_managerget_object_manager ()
void hierarchy_push (sc_module *)
sc_modulehierarchy_pop ()
sc_modulehierarchy_curr () const
sc_objectfirst_object ()
sc_objectnext_object ()
sc_objectfind_object (const char *name)
sc_module_registryget_module_registry ()
sc_port_registryget_port_registry ()
sc_export_registryget_export_registry ()
sc_prim_channel_registryget_prim_channel_registry ()
const char * gen_unique_name (const char *basename_)
sc_method_handle register_method_process (const char *name, SC_ENTRY_FUNC fn, sc_module *)
sc_method_handle create_dynamic_method_process (const char *name, SC_ENTRY_FUNC fn, sc_process_host *, bool dont_initialize=false)
sc_thread_handle register_thread_process (const char *name, SC_ENTRY_FUNC fn, sc_module *)
sc_thread_handle create_dynamic_thread_process (const char *name, SC_ENTRY_FUNC fn, sc_process_host *, size_t size=0, bool dont_initialize=false)
sc_cthread_handle register_cthread_process (const char *name, SC_ENTRY_FUNC fn, sc_module *)
sc_curr_proc_handle get_curr_proc_info ()
void set_curr_proc (sc_method_handle)
void set_curr_proc (sc_thread_handle)
void reset_curr_proc ()
int next_proc_id ()
void add_trace_file (sc_trace_file *)
const sc_timetime_stamp () const
uint64 delta_count () const
bool is_running () const
bool update_phase () const
bool get_error ()
void set_error ()
sc_cor_pkgcor_pkg ()
sc_cornext_cor ()
const sc_pvector< sc_object * > & get_child_objects () const
void elaborate ()
void prepare_to_simulate ()
void initial_crunch (bool no_crunch)

Friends

class sc_event
class sc_module
class sc_object
class sc_time
class sc_clock
bool sc_end_of_simulation_invoked ()
bool sc_start_of_simulation_invoked ()
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 ()
void watching (const sc_lambda_ptr &, sc_simcontext *)
void watching (const sc_signal_bool_deval &, sc_simcontext *)

Constructor & Destructor Documentation

sc_simcontext::sc_simcontext  
 

Definition at line 390 of file sc_simcontext.cpp.

sc_simcontext::~sc_simcontext  
 

Definition at line 395 of file sc_simcontext.cpp.


Member Function Documentation

void sc_simcontext::add_trace_file sc_trace_file  
 

Definition at line 984 of file sc_simcontext.cpp.

References sc_pvector< sc_trace_file * >::push_back().

Referenced by sc_create_vcd_trace_file(), and sc_create_wif_trace_file().

sc_cor_pkg* sc_simcontext::cor_pkg   [inline]
 

Definition at line 216 of file sc_simcontext.h.

Referenced by sc_thread_process::prepare_for_simulation(), sc_cthread_cor_fn(), sc_switch_thread(), and sc_thread_cor_fn().

sc_method_handle sc_simcontext::create_dynamic_method_process const char *    name,
SC_ENTRY_FUNC    fn,
sc_process_host  ,
bool    dont_initialize = false
 

Definition at line 899 of file sc_simcontext.cpp.

References sc_process_b::do_initialize(), dont_initialize(), sc_process_table::push_front(), and SC_ENTRY_FUNC.

Referenced by sc_create_dynamic_method().

sc_thread_handle sc_simcontext::create_dynamic_thread_process const char *    name,
SC_ENTRY_FUNC    fn,
sc_process_host  ,
size_t    size = 0,
bool    dont_initialize = false
 

Definition at line 939 of file sc_simcontext.cpp.

References sc_process_b::do_initialize(), dont_initialize(), sc_thread_process::prepare_for_simulation(), sc_process_table::push_front(), SC_ENTRY_FUNC, and sc_thread_process::set_stack_size().

void sc_simcontext::cycle const sc_time   [inline]
 

Definition at line 509 of file sc_simcontext.cpp.

References SC_REPORT_WARNING, and sc_runnable::toggle().

Referenced by sc_cycle().

uint64 sc_simcontext::delta_count   [inline]
 

Definition at line 398 of file sc_simcontext.h.

Referenced by sc_signal< sc_logic >::event(), sc_signal< bool >::event(), sc_signal< sc_lv< W > >::event(), sc_event_queue::notify(), sc_delta_count(), sc_signal< sc_logic >::update(), sc_signal< bool >::update(), sc_signal< T >::update(), and sc_buffer< T >::update().

void sc_simcontext::elaborate  
 

Definition at line 526 of file sc_simcontext.cpp.

References sc_module_registry::construction_done(), sc_prim_channel_registry::construction_done(), sc_export_registry::construction_done(), sc_port_registry::construction_done(), sc_module_registry::elaboration_done(), sc_prim_channel_registry::elaboration_done(), sc_export_registry::elaboration_done(), sc_port_registry::elaboration_done(), SC_SIM_OK, and sim_status().

Referenced by initialize().

bool sc_simcontext::elaboration_done   [inline]
 

Definition at line 316 of file sc_simcontext.h.

Referenced by sc_trace().

void sc_simcontext::end  
 

Definition at line 827 of file sc_simcontext.cpp.

References sc_module_registry::simulation_done(), sc_prim_channel_registry::simulation_done(), sc_export_registry::simulation_done(), and sc_port_registry::simulation_done().

sc_object * sc_simcontext::find_object const char *    name
 

Definition at line 867 of file sc_simcontext.cpp.

References sc_object_manager::find_object().

sc_object * sc_simcontext::first_object  
 

Definition at line 855 of file sc_simcontext.cpp.

References sc_object_manager::first_object().

const char * sc_simcontext::gen_unique_name const char *    basename_
 

Definition at line 875 of file sc_simcontext.cpp.

References sc_name_gen::gen_unique_name().

Referenced by sc_gen_unique_name().

const sc_pvector< sc_object * > & sc_simcontext::get_child_objects  
 

Definition at line 1012 of file sc_simcontext.cpp.

sc_curr_proc_handle sc_simcontext::get_curr_proc_info   [inline]
 

Definition at line 374 of file sc_simcontext.h.

Referenced by halt(), next_trigger(), sc_get_curr_process_handle(), sc_get_curr_process_kind(), sc_set_location(), sc_watch::sc_watch(), timed_out(), wait(), wait_until(), and watching_during_simulation().

bool sc_simcontext::get_error   [inline]
 

Definition at line 427 of file sc_simcontext.h.

sc_export_registry * sc_simcontext::get_export_registry   [inline]
 

Definition at line 359 of file sc_simcontext.h.

Referenced by sc_export_base::sc_export_base(), and sc_export_base::~sc_export_base().

sc_module_registry * sc_simcontext::get_module_registry   [inline]
 

Definition at line 345 of file sc_simcontext.h.

Referenced by sc_module::sc_module_init(), and sc_module::~sc_module().

sc_object_manager * sc_simcontext::get_object_manager   [inline]
 

Definition at line 338 of file sc_simcontext.h.

Referenced by sc_module::sc_module(), sc_module_name::sc_module_name(), sc_module_name::~sc_module_name(), and sc_object::~sc_object().

sc_port_registry * sc_simcontext::get_port_registry   [inline]
 

Definition at line 352 of file sc_simcontext.h.

Referenced by sc_port_base::sc_port_base(), watching_before_simulation(), and sc_port_base::~sc_port_base().

sc_prim_channel_registry * sc_simcontext::get_prim_channel_registry   [inline]
 

Definition at line 366 of file sc_simcontext.h.

sc_module * sc_simcontext::hierarchy_curr  
 

Definition at line 849 of file sc_simcontext.cpp.

References sc_object_manager::hierarchy_curr().

Referenced by sc_port_registry::insert(), and sc_gen_unique_name().

sc_module * sc_simcontext::hierarchy_pop  
 

Definition at line 843 of file sc_simcontext.cpp.

References sc_object_manager::hierarchy_pop().

Referenced by sc_module::end_module().

void sc_simcontext::hierarchy_push sc_module  
 

Definition at line 837 of file sc_simcontext.cpp.

References sc_object_manager::hierarchy_push().

Referenced by sc_module::sc_module_init().

void sc_simcontext::initial_crunch bool    no_crunch [inline]
 

Definition at line 663 of file sc_simcontext.cpp.

References sc_runnable::is_empty(), and sc_runnable::toggle().

Referenced by initialize().

void sc_simcontext::initialize bool    = false
 

Definition at line 686 of file sc_simcontext.cpp.

References elaborate(), initial_crunch(), and prepare_to_simulate().

Referenced by sc_initialize(), and simulate().

bool sc_simcontext::is_running   [inline]
 

Definition at line 405 of file sc_simcontext.h.

Referenced by sc_prim_channel_registry::insert(), sc_port_registry::insert(), sc_module_registry::insert(), sc_export_registry::insert(), sc_sensitive::make_static_sensitivity(), sc_sensitive_neg::operator()(), sc_sensitive_pos::operator()(), sc_sensitive::operator()(), sc_report_compose_message(), sc_set_default_time_unit(), sc_set_stop_mode(), sc_set_time_resolution(), and sc_module::set_stack_size().

sc_cor * sc_simcontext::next_cor  
 

Definition at line 992 of file sc_simcontext.cpp.

References sc_thread_process::m_cor, and sc_thread_process::ready_to_run().

Referenced by sc_cthread_cor_fn(), sc_switch_thread(), and sc_thread_cor_fn().

sc_object * sc_simcontext::next_object  
 

Definition at line 861 of file sc_simcontext.cpp.

References sc_object_manager::next_object().

int sc_simcontext::next_proc_id   [inline]
 

Definition at line 382 of file sc_simcontext.h.

void sc_simcontext::prepare_to_simulate  
 

Definition at line 558 of file sc_simcontext.cpp.

References sc_process_table::cthread_q_head(), sc_process_b::do_initialize(), sc_pvector< sc_event * >::erase_all(), sc_cor_pkg::get_main(), sc_runnable::init(), sc_runnable::is_empty(), sc_process_table::method_q_head(), sc_method_process::next_exist(), sc_cthread_process::next_exist(), sc_thread_process::next_exist(), sc_prim_channel_registry::perform_update(), sc_cthread_process::prepare_for_simulation(), sc_thread_process::prepare_for_simulation(), sc_pvector< sc_event * >::raw_data(), SC_SIM_OK, sim_status(), sc_pvector< sc_event * >::size(), sc_module_registry::start_simulation(), sc_prim_channel_registry::start_simulation(), sc_export_registry::start_simulation(), sc_port_registry::start_simulation(), sc_process_table::thread_q_head(), and sc_event::trigger().

Referenced by initialize().

sc_cthread_handle sc_simcontext::register_cthread_process const char *    name,
SC_ENTRY_FUNC    fn,
sc_module  
 

Definition at line 967 of file sc_simcontext.cpp.

References sc_process_table::push_front(), SC_ENTRY_FUNC, and SC_REPORT_ERROR.

sc_method_handle sc_simcontext::register_method_process const char *    name,
SC_ENTRY_FUNC    fn,
sc_module  
 

Definition at line 882 of file sc_simcontext.cpp.

References sc_process_table::push_front(), SC_ENTRY_FUNC, and SC_REPORT_ERROR.

sc_thread_handle sc_simcontext::register_thread_process const char *    name,
SC_ENTRY_FUNC    fn,
sc_module  
 

Definition at line 922 of file sc_simcontext.cpp.

References sc_process_table::push_front(), SC_ENTRY_FUNC, and SC_REPORT_ERROR.

void sc_simcontext::reset  
 

Definition at line 820 of file sc_simcontext.cpp.

void sc_simcontext::reset_curr_proc   [inline]
 

Definition at line 67 of file sc_simcontext_int.h.

References sc_curr_proc_info::kind, sc_curr_proc_info::process_handle, and SC_NO_PROC_.

Referenced by sc_module::end_module().

void sc_simcontext::set_curr_proc sc_thread_handle    [inline]
 

Definition at line 55 of file sc_simcontext_int.h.

References sc_process_b::is_cthread(), sc_curr_proc_info::kind, sc_curr_proc_info::process_handle, SC_CTHREAD_PROC_, and SC_THREAD_PROC_.

void sc_simcontext::set_curr_proc sc_method_handle    [inline]
 

Definition at line 48 of file sc_simcontext_int.h.

References sc_curr_proc_info::kind, sc_curr_proc_info::process_handle, and SC_METHOD_PROC_.

void sc_simcontext::set_error   [inline]
 

Definition at line 419 of file sc_simcontext.h.

Referenced by sc_cthread_cor_fn(), and sc_thread_cor_fn().

int sc_simcontext::sim_status   [inline]
 

Definition at line 324 of file sc_simcontext.h.

References SC_SIM_ERROR, SC_SIM_OK, and SC_SIM_USER_STOP.

Referenced by elaborate(), prepare_to_simulate(), sc_start(), and simulate().

void sc_simcontext::simulate const sc_time   duration
 

Definition at line 696 of file sc_simcontext.cpp.

References sc_event::cancel(), sc_event_timed::event(), sc_ppq< sc_event_timed * >::extract_top(), initialize(), sc_runnable::is_empty(), sc_event::notify_delayed(), sc_event_timed::notify_time(), SC_REPORT_ERROR, SC_SIM_OK, sc_time, sim_status(), sc_ppq_base::size(), sc_runnable::toggle(), sc_ppq< sc_event_timed * >::top(), and sc_event::trigger().

Referenced by sc_start().

void sc_simcontext::stop  
 

Definition at line 804 of file sc_simcontext.cpp.

References sc_runnable::init(), SC_REPORT_WARNING, SC_STOP_IMMEDIATE, and stop_mode.

Referenced by sc_stop().

const sc_time & sc_simcontext::time_stamp   [inline]
 

Definition at line 390 of file sc_simcontext.h.

Referenced by sc_event::notify(), sc_event::notify_delayed(), sc_simulation_time(), and sc_time_stamp().

bool sc_simcontext::update_phase   [inline]
 

Definition at line 412 of file sc_simcontext.h.

Referenced by sc_event::notify().


Friends And Related Function Documentation

friend class sc_clock [friend]
 

Definition at line 135 of file sc_simcontext.h.

bool sc_end_of_simulation_invoked   [friend]
 

Definition at line 514 of file sc_simcontext.h.

friend class sc_event [friend]
 

Definition at line 131 of file sc_simcontext.h.

sc_time sc_get_default_time_unit   [friend]
 

Definition at line 352 of file sc_time.cpp.

sc_time sc_get_time_resolution   [friend]
 

Definition at line 296 of file sc_time.cpp.

friend class sc_module [friend]
 

Definition at line 132 of file sc_simcontext.h.

friend class sc_object [friend]
 

Definition at line 133 of file sc_simcontext.h.

void sc_set_default_time_unit double   ,
sc_time_unit   
[friend]
 

Definition at line 303 of file sc_time.cpp.

void sc_set_time_resolution double   ,
sc_time_unit   
[friend]
 

Definition at line 232 of file sc_time.cpp.

bool sc_start_of_simulation_invoked   [friend]
 

Definition at line 522 of file sc_simcontext.h.

friend class sc_time [friend]
 

Definition at line 134 of file sc_simcontext.h.

Referenced by simulate().

void watching const sc_signal_bool_deval &    s,
sc_simcontext *    simc = sc_get_curr_simcontext()
[friend]
 

Definition at line 103 of file sc_wait_cthread.h.

void watching const sc_lambda_ptr   lambda,
sc_simcontext *    simc = sc_get_curr_simcontext()
[friend]
 

Definition at line 95 of file sc_wait_cthread.h.


The documentation for this class was generated from the following files:
Generated on Fri Jan 14 08:32:11 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18