//------------------------------------------------------------------------------ //"sc_reset_signal_is" // //------------------------------------------------------------------------------ void sc_reset::reset_signal_is( const sc_in<bool>& port, bool level ) { const sc_signal_in_if<bool>* iface_p; sc_process_b* process_p; process_p = (sc_process_b*)sc_get_current_process_handle(); assert( process_p ); switch ( process_p->proc_kind() ) { case SC_THREAD_PROC_: case SC_METHOD_PROC_: SC_REPORT_ERROR(SC_ID_RESET_SIGNAL_IS_NOT_ALLOWED_,""); break; case SC_CTHREAD_PROC_: process_p->m_reset_level = level; iface_p = DCAST<const sc_signal_in_if<bool>*>(port.get_interface()); if ( iface_p ) reset_signal_is( *iface_p, level ); else { new sc_reset_finder( &port, level, process_p ); } break; default: SC_REPORT_ERROR(SC_ID_UNKNOWN_PROCESS_TYPE_, process_p->name()); break; } }
//------------------------------------------------------------------------------ //"sc_reset::reset_signal_is - ports" // // These overloads of the reset_signal_is() method will register the active // process with the sc_reset object instance associated with the supplied port. // If the port does not yet have a pointer to its sc_signal<bool> instance it // will create an sc_reset_finder class object instance that will be used // to set the process' reset information when the port has been bound. // // Arguments: // async = true if the reset signal is asynchronous, false if not. // port = port for sc_signal<bool> that will provide the reset signal. // level = level at which reset is active, either true or false. //------------------------------------------------------------------------------ void sc_reset::reset_signal_is( bool async, const sc_in<bool>& port, bool level) { const sc_signal_in_if<bool>* iface_p; sc_process_b* process_p; process_p = (sc_process_b*)sc_get_current_process_handle(); assert( process_p ); process_p->m_has_reset_signal = true; switch ( process_p->proc_kind() ) { case SC_THREAD_PROC_: case SC_METHOD_PROC_: case SC_CTHREAD_PROC_: iface_p = DCAST<const sc_signal_in_if<bool>*>(port.get_interface()); if ( iface_p ) reset_signal_is( async, *iface_p, level ); else new sc_reset_finder( async, &port, level, process_p ); break; default: SC_REPORT_ERROR(SC_ID_UNKNOWN_PROCESS_TYPE_, process_p->name()); break; } }