#include <rc_resettable.h>
A component is regarded as resettable if it implements the abstract base interface rc_resettable. Resettable components are automatically reset in case of activation or deactivation of their associated reconfigurable context. For the reset mechanism to work, resettable components have to be registered at a rc_reconfigurable instance. Usually a resettable component automatically registers itself to the current reconfigurable context by invoking function rc_register_resettable() at construction.
The execution of rc_on_reset() and rc_on_init_resettable() shall not take any time, i.e. it may not invoke any wait statements.
Definition at line 71 of file rc_resettable.h.
Protected Member Functions | |
virtual void | rc_on_reset ()=0 |
Called to request the object for an immediate reset. | |
virtual void | rc_on_init_resettable ()=0 |
Called when the object shall store its state. | |
virtual | ~rc_resettable () |
Virtual destructor. | |
Friends | |
class | rc_reconfigurable |
This interface is intended to be used by rc_reconfigurable. |
virtual ~rc_resettable | ( | ) | [inline, protected, virtual] |
virtual void rc_on_reset | ( | ) | [protected, pure virtual] |
Called to request the object for an immediate reset.
rc_on_reset() is called every time a rc_reconfigurable is activated or deactivated during simulation phase, i.e. normally it will be called twice. An implementation is free to only reset itself either at activation or deactivation.
Implemented in rc_module, rc_mutex, rc_semaphore, resettable_var, and rc_reconfigurable_module< Module, false >.
Referenced by rc_signal_rv::RC_ON_RESET(), rc_signal_resolved::RC_ON_RESET(), rc_signal< bool >::RC_ON_RESET(), rc_semaphore::rc_on_reset(), and rc_mutex::rc_on_reset().
virtual void rc_on_init_resettable | ( | ) | [protected, pure virtual] |
Called when the object shall store its state.
This callback method shall be invoked to give the object opportunity to store its initial state. A good point of time may be directly after SystemC's construction phase has finished.
Implemented in rc_module, resettable_var, and rc_reconfigurable_module< Module, false >.
Referenced by rc_signal_rv::RC_ON_INIT_RESETTABLE(), and rc_signal_resolved::RC_ON_INIT_RESETTABLE().
friend class rc_reconfigurable [friend] |
This interface is intended to be used by rc_reconfigurable.
Definition at line 76 of file rc_resettable.h.