クラス sc_core::sc_method_process

#include <sc_method_process.h>

sc_core::sc_method_processに対する継承グラフ

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

 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)
virtual ~sc_method_process ()
virtual const char * kind () const

Protected メソッド

virtual void kill_process ()
sc_method_handle next_exist ()
sc_method_handle next_runnable ()
void clear_trigger ()
void next_trigger (const sc_event &)
void next_trigger (sc_event_or_list &)
void next_trigger (sc_event_and_list &)
void next_trigger (const sc_time &)
void next_trigger (const sc_time &, const sc_event &)
void next_trigger (const sc_time &, sc_event_or_list &)
void next_trigger (const sc_time &, sc_event_and_list &)
void set_next_exist (sc_method_handle next_p)
void set_next_runnable (sc_method_handle next_p)
void set_stack_size (std::size_t size)
bool trigger_dynamic (sc_event *)

Protected 変数

sc_corm_cor
std::size_t m_stack_size
std::vector< sc_process_monitor * > m_monitor_q

Private メソッド

 sc_method_process (const sc_method_process &)
const sc_method_processoperator= (const sc_method_process &)

フレンド

class sc_event
class sc_module
class sc_process_table
class sc_process_handle
class sc_simcontext
class sc_runnable
void sc_method_cor_fn (void *)
void sc_cmethod_cor_fn (void *)
void sc_set_stack_size (sc_method_handle, std::size_t)
void next_trigger (sc_simcontext *)
void next_trigger (const sc_event &, sc_simcontext *)
void next_trigger (sc_event_or_list &, sc_simcontext *)
void next_trigger (sc_event_and_list &, sc_simcontext *)
void next_trigger (const sc_time &, sc_simcontext *)
void next_trigger (const sc_time &, const sc_event &, sc_simcontext *)
void next_trigger (const sc_time &, sc_event_or_list &, sc_simcontext *)
void next_trigger (const sc_time &, sc_event_and_list &, sc_simcontext *)


説明

sc_method_process.h96 行で定義されています。


コンストラクタとデストラクタ

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.cpp144 行で定義されています。

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_method_process.cpp208 行で定義されています。

00209 {
00210 }

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]

sc_core::sc_objectを再定義しています。

sc_method_process.h130 行で定義されています。

00131         { return "sc_method_process"; }

void sc_core::sc_method_process::kill_process (  )  [protected, virtual]

sc_core::sc_process_bを再定義しています。

sc_method_process.cpp125 行で定義されています。

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_process.h247 行で定義されています。

00248 {
00249     return (sc_method_handle)m_exist_p;
00250 }

sc_method_handle sc_core::sc_method_process::next_runnable (  )  [inline, protected]

sc_method_process.h260 行で定義されています。

00261 {
00262     return (sc_method_handle)m_runnable_p;
00263 }

void sc_core::sc_method_process::clear_trigger (  )  [protected]

sc_method_process.cpp68 行で定義されています。

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.h164 行で定義されています。

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.h174 行で定義されています。

00175 {
00176     clear_trigger();
00177     el.add_dynamic( this );
00178     m_event_list_p = &el;
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.h184 行で定義されています。

00185 {
00186     clear_trigger();
00187     el.add_dynamic( this );
00188     m_event_list_p = &el;
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.h195 行で定義されています。

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.h205 行で定義されています。

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.h217 行で定義されています。

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 = &el;
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.h229 行で定義されています。

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 = &el;
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]

sc_method_process.h241 行で定義されています。

00242 {
00243     m_exist_p = next_p;
00244 }

void sc_core::sc_method_process::set_next_runnable ( sc_method_handle  next_p  )  [inline, protected]

sc_method_process.h254 行で定義されています。

00255 {
00256     m_runnable_p = next_p;
00257 }

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.cpp219 行で定義されています。

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.h100 行で定義されています。

friend class sc_module [friend]

sc_core::sc_process_bを再定義しています。

sc_method_process.h101 行で定義されています。

friend class sc_process_table [friend]

sc_method_process.h102 行で定義されています。

friend class sc_process_handle [friend]

sc_core::sc_process_bを再定義しています。

sc_method_process.h103 行で定義されています。

friend class sc_simcontext [friend]

sc_core::sc_process_bを再定義しています。

sc_method_process.h104 行で定義されています。

friend class sc_runnable [friend]

sc_core::sc_process_bを再定義しています。

sc_method_process.h105 行で定義されています。

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_method_process.h151 行で定義されています。

sc_method_process.h152 行で定義されています。

sc_method_process.h153 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:00 2008に生成されました。  doxygen 1.5.6