クラス sc_core::sc_reset

#include <sc_reset.h>

すべてのメンバ一覧

Protected メソッド

 sc_reset (const sc_signal_in_if< bool > *iface_p)
void notify_processes ()
bool read ()
void remove_process (sc_process_b *)

Static Protected メソッド

static void reconcile_resets ()
static void reset_signal_is (const sc_signal_in_if< bool > &iface, bool level)
static void reset_signal_is (const sc_in< bool > &iface, bool level)

Protected 変数

const sc_signal_in_if< bool > * m_iface_p
std::vector< sc_process_b * > m_processes

Private メソッド

 sc_reset (const sc_reset &)
const sc_resetoperator= (const sc_reset &)

フレンド

class sc_cthread_process
class sc_method_process
class sc_module
class sc_process_b
class sc_signal< bool >
class sc_simcontext
class sc_thread_process


説明

sc_reset.h60 行で定義されています。


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

sc_core::sc_reset::sc_reset ( const sc_signal_in_if< bool > *  iface_p  )  [inline, protected]

sc_reset.h75 行で定義されています。

00075                                                      :
00076         m_iface_p(iface_p) {}
        void notify_processes();

sc_core::sc_reset::sc_reset ( const sc_reset  )  [private]


関数

void sc_core::sc_reset::reconcile_resets (  )  [static, protected]

sc_reset.cpp126 行で定義されています。

00127 {
00128     const sc_signal_in_if<bool>*  iface_p; // Interface to reset signal.
00129     sc_reset_finder*              next_p;  // Next finder to process.
00130     sc_reset_finder*              now_p;   // Finder currently processing.
00131     sc_reset*                     reset_p; // Reset object to use.
00132 
00133     for ( now_p = reset_finder_q; now_p; now_p = next_p )
00134     {
00135         next_p = now_p->m_next_p;
00136         if ( now_p->m_target_p->m_reset_p )
00137             SC_REPORT_ERROR(SC_ID_MULTIPLE_RESETS_,now_p->m_target_p->name());
00138         iface_p = DCAST<const sc_signal_in_if<bool>*>(
00139             now_p->m_port_p->get_interface());
00140         assert( iface_p != 0 );
00141         reset_p = iface_p->is_reset();
00142         now_p->m_target_p->m_reset_p = reset_p;
00143         now_p->m_target_p->m_reset_level = now_p->m_level;
00144                 reset_p->m_processes.push_back(now_p->m_target_p);
00145         delete now_p;
00146     }
00147 }

void sc_core::sc_reset::reset_signal_is ( const sc_signal_in_if< bool > &  iface,
bool  level 
) [static, protected]

sc_reset.cpp212 行で定義されています。

00213 {
00214     sc_process_b* process_p; // Process adding reset for.
00215     sc_reset*        reset_p;   // Reset object.
00216 
00217     process_p = sc_process_b::last_created_process_base();
00218     assert( process_p );
00219     if ( process_p->m_reset_p )
00220         SC_REPORT_ERROR(SC_ID_MULTIPLE_RESETS_,process_p->name());
00221     switch ( process_p->proc_kind() )
00222     {
00223       case SC_CTHREAD_PROC_:
00224         process_p->m_reset_level = level;
00225         reset_p = iface.is_reset();
00226         process_p->m_reset_p = reset_p;
00227                 reset_p->m_processes.push_back(process_p);
00228         break;
00229       case SC_THREAD_PROC_:
00230       case SC_METHOD_PROC_:
00231         SC_REPORT_ERROR(SC_ID_RESET_SIGNAL_IS_NOT_ALLOWED_,"");
00232         break;
00233       default:
00234         SC_REPORT_ERROR(SC_ID_UNKNOWN_PROCESS_TYPE_, process_p->name());
00235         break;
00236     }
00237 }

void sc_core::sc_reset::reset_signal_is ( const sc_in< bool > &  iface,
bool  level 
) [static, protected]

sc_reset.cpp175 行で定義されています。

00176 {
00177     const sc_signal_in_if<bool>* iface_p;
00178     sc_process_b*                process_p;
00179     
00180     process_p = (sc_process_b*)sc_get_current_process_handle();
00181     assert( process_p );
00182     switch ( process_p->proc_kind() )
00183     {
00184       case SC_THREAD_PROC_:
00185       case SC_METHOD_PROC_:
00186         SC_REPORT_ERROR(SC_ID_RESET_SIGNAL_IS_NOT_ALLOWED_,"");
00187                 break;
00188       case SC_CTHREAD_PROC_:
00189         process_p->m_reset_level = level;
00190         iface_p = DCAST<const sc_signal_in_if<bool>*>(port.get_interface());
00191         if ( iface_p )
00192             reset_signal_is( *iface_p, level );
00193         else
00194         {
00195             new sc_reset_finder( &port, level, process_p );
00196         }
00197         break;
00198       default:
00199         SC_REPORT_ERROR(SC_ID_UNKNOWN_PROCESS_TYPE_, process_p->name());
00200         break;
00201     }
00202 }

void sc_core::sc_reset::notify_processes (  )  [protected]

sc_reset.cpp91 行で定義されています。

00092 {
00093     int process_i; // Index of process resetting.
00094     int process_n; // # of processes to reset.
00095     process_n = m_processes.size();
00096     for ( process_i = 0; process_i < process_n; process_i++ )
00097     {
00098         m_processes[process_i]->reset_changed();
00099     }
00100 }

bool sc_core::sc_reset::read (  )  [protected]

sc_reset.cpp109 行で定義されています。

00110 {
00111     return m_iface_p->read(); 
00112 }

void sc_core::sc_reset::remove_process ( sc_process_b process_p  )  [protected]

sc_reset.cpp154 行で定義されています。

00155 {
00156     int process_i; // Index of process resetting.
00157     int process_n; // # of processes to reset.
00158 
00159     process_n = m_processes.size();
00160     for ( process_i = 0; process_i < process_n; process_i++ )
00161     {
00162         if ( m_processes[process_i] == process_p )
00163         {
00164             m_processes[process_i] = m_processes[process_n-1];
00165             m_processes.resize(process_n-1);
00166             return;
00167         }
00168     }
00169 }

const sc_reset& sc_core::sc_reset::operator= ( const sc_reset  )  [private]


フレンドと関連する関数

friend class sc_cthread_process [friend]

sc_reset.h61 行で定義されています。

friend class sc_method_process [friend]

sc_reset.h62 行で定義されています。

friend class sc_module [friend]

sc_reset.h63 行で定義されています。

friend class sc_process_b [friend]

sc_reset.h64 行で定義されています。

friend class sc_signal< bool > [friend]

sc_reset.h65 行で定義されています。

friend class sc_simcontext [friend]

sc_reset.h66 行で定義されています。

friend class sc_thread_process [friend]

sc_reset.h67 行で定義されています。


変数

sc_reset.h82 行で定義されています。

std::vector<sc_process_b*> sc_core::sc_reset::m_processes [protected]

sc_reset.h83 行で定義されています。


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

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