#include <sc_method_process.h>
sc_method_process.h の 96 行で定義されています。
sc_core::sc_method_process::sc_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 | |||
) |
sc_method_process.cpp の 144 行で定義されています。
00147 : 00148 sc_process_b( 00149 name_p && name_p[0] ? name_p : sc_gen_unique_name("method_p"), 00150 free_host, method_p, host_p, opt_p) 00151 { 00152 00153 // CHECK IF THIS IS AN sc_module-BASED PROCESS AND SIMUALTION HAS STARTED: 00154 00155 if ( DCAST<sc_module*>(host_p) != 0 && sc_is_running() ) 00156 { 00157 SC_REPORT_ERROR( SC_ID_MODULE_METHOD_AFTER_START_, "" ); 00158 } 00159 00160 // INITIALIZE VALUES: 00161 // 00162 // If there are spawn options use them. 00163 00164 m_process_kind = SC_METHOD_PROC_; 00165 if (opt_p) { 00166 m_dont_init = opt_p->m_dont_initialize; 00167 00168 // traverse event sensitivity list 00169 for (unsigned int i = 0; i < opt_p->m_sensitive_events.size(); i++) { 00170 sc_sensitive::make_static_sensitivity( 00171 this, *opt_p->m_sensitive_events[i]); 00172 } 00173 00174 // traverse port base sensitivity list 00175 for ( unsigned int i = 0; i < opt_p->m_sensitive_port_bases.size(); i++) 00176 { 00177 sc_sensitive::make_static_sensitivity( 00178 this, *opt_p->m_sensitive_port_bases[i]); 00179 } 00180 00181 // traverse interface sensitivity list 00182 for ( unsigned int i = 0; i < opt_p->m_sensitive_interfaces.size(); i++) 00183 { 00184 sc_sensitive::make_static_sensitivity( 00185 this, *opt_p->m_sensitive_interfaces[i]); 00186 } 00187 00188 // traverse event finder sensitivity list 00189 for ( unsigned int i = 0; i < opt_p->m_sensitive_event_finders.size(); 00190 i++) 00191 { 00192 sc_sensitive::make_static_sensitivity( 00193 this, *opt_p->m_sensitive_event_finders[i]); 00194 } 00195 } 00196 00197 else 00198 { 00199 m_dont_init = false; 00200 } 00201 }
sc_core::sc_method_process::~sc_method_process | ( | ) | [virtual] |
sc_core::sc_method_process::sc_method_process | ( | const sc_method_process & | ) | [private] |
virtual const char* sc_core::sc_method_process::kind | ( | ) | const [inline, virtual] |
void sc_core::sc_method_process::kill_process | ( | ) | [protected, virtual] |
sc_core::sc_process_bを再定義しています。
sc_method_process.cpp の 125 行で定義されています。
00126 { 00127 // CLEAN UP THE LOW LEVEL STUFF ASSOCIATED WITH THIS DATA STRUCTURE: 00128 00129 sc_process_b::kill_process(); 00130 00131 00132 // REMOVE METHOD FROM RUN QUEUE: 00133 00134 simcontext()->remove_runnable_method( this ); 00135 00136 }
sc_method_handle sc_core::sc_method_process::next_exist | ( | ) | [inline, protected] |
sc_method_handle sc_core::sc_method_process::next_runnable | ( | ) | [inline, protected] |
void sc_core::sc_method_process::clear_trigger | ( | ) | [protected] |
sc_method_process.cpp の 68 行で定義されています。
00069 { 00070 switch( m_trigger_type ) { 00071 case STATIC: 00072 return; 00073 case EVENT: 00074 m_event_p->remove_dynamic( this ); 00075 m_event_p = 0; 00076 break; 00077 case OR_LIST: 00078 m_event_list_p->remove_dynamic( this, 0 ); 00079 m_event_list_p->auto_delete(); 00080 m_event_list_p = 0; 00081 break; 00082 case AND_LIST: 00083 m_event_list_p->remove_dynamic( this, 0 ); 00084 m_event_list_p->auto_delete(); 00085 m_event_list_p = 0; 00086 m_event_count = 0; 00087 break; 00088 case TIMEOUT: 00089 m_timeout_event_p->cancel(); 00090 m_timeout_event_p->reset(); 00091 break; 00092 case EVENT_TIMEOUT: 00093 m_timeout_event_p->cancel(); 00094 m_timeout_event_p->reset(); 00095 m_event_p->remove_dynamic( this ); 00096 m_event_p = 0; 00097 break; 00098 case OR_LIST_TIMEOUT: 00099 m_timeout_event_p->cancel(); 00100 m_timeout_event_p->reset(); 00101 m_event_list_p->remove_dynamic( this, 0 ); 00102 m_event_list_p->auto_delete(); 00103 m_event_list_p = 0; 00104 break; 00105 case AND_LIST_TIMEOUT: 00106 m_timeout_event_p->cancel(); 00107 m_timeout_event_p->reset(); 00108 m_event_list_p->remove_dynamic( this, 0 ); 00109 m_event_list_p->auto_delete(); 00110 m_event_list_p = 0; 00111 m_event_count = 0; 00112 break; 00113 } 00114 m_trigger_type = STATIC; 00115 }
void sc_core::sc_method_process::next_trigger | ( | const sc_event & | e | ) | [inline, protected] |
sc_method_process.h の 164 行で定義されています。
00165 { 00166 clear_trigger(); 00167 e.add_dynamic( this ); 00168 m_event_p = &e; 00169 m_trigger_type = EVENT; 00170 }
void sc_core::sc_method_process::next_trigger | ( | sc_event_or_list & | el | ) | [inline, protected] |
sc_method_process.h の 174 行で定義されています。
00175 { 00176 clear_trigger(); 00177 el.add_dynamic( this ); 00178 m_event_list_p = ⪙ 00179 m_trigger_type = OR_LIST; 00180 }
void sc_core::sc_method_process::next_trigger | ( | sc_event_and_list & | el | ) | [inline, protected] |
sc_method_process.h の 184 行で定義されています。
00185 { 00186 clear_trigger(); 00187 el.add_dynamic( this ); 00188 m_event_list_p = ⪙ 00189 m_event_count = el.size(); 00190 m_trigger_type = AND_LIST; 00191 }
void sc_core::sc_method_process::next_trigger | ( | const sc_time & | t | ) | [inline, protected] |
sc_method_process.h の 195 行で定義されています。
00196 { 00197 clear_trigger(); 00198 m_timeout_event_p->notify_internal( t ); 00199 m_timeout_event_p->add_dynamic( this ); 00200 m_trigger_type = TIMEOUT; 00201 }
void sc_core::sc_method_process::next_trigger | ( | const sc_time & | t, | |
const sc_event & | e | |||
) | [inline, protected] |
sc_method_process.h の 205 行で定義されています。
00206 { 00207 clear_trigger(); 00208 m_timeout_event_p->notify_internal( t ); 00209 m_timeout_event_p->add_dynamic( this ); 00210 e.add_dynamic( this ); 00211 m_event_p = &e; 00212 m_trigger_type = EVENT_TIMEOUT; 00213 }
void sc_core::sc_method_process::next_trigger | ( | const sc_time & | t, | |
sc_event_or_list & | el | |||
) | [inline, protected] |
sc_method_process.h の 217 行で定義されています。
00218 { 00219 clear_trigger(); 00220 m_timeout_event_p->notify_internal( t ); 00221 m_timeout_event_p->add_dynamic( this ); 00222 el.add_dynamic( this ); 00223 m_event_list_p = ⪙ 00224 m_trigger_type = OR_LIST_TIMEOUT; 00225 }
void sc_core::sc_method_process::next_trigger | ( | const sc_time & | t, | |
sc_event_and_list & | el | |||
) | [inline, protected] |
sc_method_process.h の 229 行で定義されています。
00230 { 00231 clear_trigger(); 00232 m_timeout_event_p->notify_internal( t ); 00233 m_timeout_event_p->add_dynamic( this ); 00234 el.add_dynamic( this ); 00235 m_event_list_p = ⪙ 00236 m_event_count = el.size(); 00237 m_trigger_type = AND_LIST_TIMEOUT; 00238 }
void sc_core::sc_method_process::set_next_exist | ( | sc_method_handle | next_p | ) | [inline, protected] |
void sc_core::sc_method_process::set_next_runnable | ( | sc_method_handle | next_p | ) | [inline, protected] |
void sc_core::sc_method_process::set_stack_size | ( | std::size_t | size | ) | [protected] |
bool sc_core::sc_method_process::trigger_dynamic | ( | sc_event * | e | ) | [protected] |
sc_method_process.cpp の 219 行で定義されています。
00220 { 00221 if( is_runnable() ) { 00222 return false; 00223 } 00224 m_timed_out = false; 00225 switch( m_trigger_type ) { 00226 case EVENT: 00227 m_event_p = 0; 00228 m_trigger_type = STATIC; 00229 return true; 00230 case OR_LIST: 00231 m_event_list_p->remove_dynamic( this, e ); 00232 m_event_list_p->auto_delete(); 00233 m_event_list_p = 0; 00234 m_trigger_type = STATIC; 00235 return true; 00236 case AND_LIST: 00237 if( -- m_event_count == 0 ) { 00238 // no need to remove_dynamic 00239 m_event_list_p->auto_delete(); 00240 m_event_list_p = 0; 00241 m_trigger_type = STATIC; 00242 return true; 00243 } 00244 return false; 00245 case TIMEOUT: 00246 m_trigger_type = STATIC; 00247 return true; 00248 case EVENT_TIMEOUT: 00249 if( e == m_event_p ) { 00250 m_timeout_event_p->cancel(); 00251 m_timeout_event_p->reset(); 00252 } else { 00253 m_timed_out = true; 00254 m_event_p->remove_dynamic( this ); 00255 } 00256 m_event_p = 0; 00257 m_trigger_type = STATIC; 00258 return true; 00259 case OR_LIST_TIMEOUT: 00260 if( e != m_timeout_event_p ) { 00261 m_timeout_event_p->cancel(); 00262 m_timeout_event_p->reset(); 00263 } else { 00264 m_timed_out = true; 00265 } 00266 m_event_list_p->remove_dynamic( this, e ); 00267 m_event_list_p->auto_delete(); 00268 m_event_list_p = 0; 00269 m_trigger_type = STATIC; 00270 return true; 00271 case AND_LIST_TIMEOUT: 00272 if( e == m_timeout_event_p ) { 00273 m_timed_out = true; 00274 m_event_list_p->remove_dynamic( this, e ); 00275 m_event_list_p->auto_delete(); 00276 m_event_list_p = 0; 00277 m_trigger_type = STATIC; 00278 return true; 00279 } else if( -- m_event_count == 0 ) { 00280 m_timeout_event_p->cancel(); 00281 m_timeout_event_p->reset(); 00282 // no need to remove_dynamic 00283 m_event_list_p->auto_delete(); 00284 m_event_list_p = 0; 00285 m_trigger_type = STATIC; 00286 return true; 00287 } 00288 return false; 00289 case STATIC: 00290 // we should never get here 00291 assert( false ); 00292 } 00293 return false; 00294 }
const sc_method_process& sc_core::sc_method_process::operator= | ( | const sc_method_process & | ) | [private] |
friend class sc_event [friend] |
sc_method_process.h の 100 行で定義されています。
friend class sc_module [friend] |
friend class sc_process_table [friend] |
sc_method_process.h の 102 行で定義されています。
friend class sc_process_handle [friend] |
friend class sc_simcontext [friend] |
friend class sc_runnable [friend] |
void sc_method_cor_fn | ( | void * | ) | [friend] |
void sc_cmethod_cor_fn | ( | void * | ) | [friend] |
void sc_set_stack_size | ( | sc_method_handle | , | |
std::size_t | ||||
) | [friend] |
void next_trigger | ( | sc_simcontext * | ) | [friend] |
void next_trigger | ( | const sc_event & | , | |
sc_simcontext * | ||||
) | [friend] |
void next_trigger | ( | sc_event_or_list & | , | |
sc_simcontext * | ||||
) | [friend] |
void next_trigger | ( | sc_event_and_list & | , | |
sc_simcontext * | ||||
) | [friend] |
void next_trigger | ( | const sc_time & | , | |
sc_simcontext * | ||||
) | [friend] |
void next_trigger | ( | const sc_time & | , | |
const sc_event & | , | |||
sc_simcontext * | ||||
) | [friend] |
void next_trigger | ( | const sc_time & | , | |
sc_event_or_list & | , | |||
sc_simcontext * | ||||
) | [friend] |
void next_trigger | ( | const sc_time & | , | |
sc_event_and_list & | , | |||
sc_simcontext * | ||||
) | [friend] |
sc_cor* sc_core::sc_method_process::m_cor [protected] |
sc_method_process.h の 151 行で定義されています。
std::size_t sc_core::sc_method_process::m_stack_size [protected] |
sc_method_process.h の 152 行で定義されています。
std::vector<sc_process_monitor*> sc_core::sc_method_process::m_monitor_q [protected] |
sc_method_process.h の 153 行で定義されています。