#include <rc_delta_sync_object.h>
If this is object is enabled (see set_enabled()) a call to request_update() will trigger the update of the channel at the end of the current delta cycle. A user-specified callback function is then called during the following update phase of SystemC. This mechanism allows operations to be synchronised with the delta cycle transitions.
Definition at line 54 of file rc_delta_sync_object.h.
Public Types | |
| typedef boost::function < void(rc_delta_sync_object &)> | delta_sync_callback_type |
| the type of the callback function | |
Public Member Functions | |
| rc_delta_sync_object () | |
| default constructor | |
| rc_delta_sync_object (delta_sync_callback_type callback, bool enabled=false) | |
| constructor setting the initial state | |
| virtual void | request_update () |
| Requests a call to the callback at the end of this delta cycle. | |
| bool | is_enabled () const |
| Returns if the channel is enabled. | |
| void | set_enabled (bool b) |
| Sets the activity state of the channel. | |
| void | set_callback (delta_sync_callback_type callback) |
| Changes the user defined callback. | |
Protected Member Functions | |
| virtual void | update () |
| Is called during update phase (if previously requested). | |
Private Member Functions | |
| rc_delta_sync_object (const rc_delta_sync_object &orig) | |
| //(disabled) | |
| rc_delta_sync_object & | operator= (const rc_delta_sync_object &orig) |
| //(disabled) | |
Private Attributes | |
| bool | p_enabled |
| the "enabled" flag | |
| delta_sync_callback_type | p_callback |
| the user-specified callback | |
| typedef boost::function<void (rc_delta_sync_object&)> delta_sync_callback_type |
the type of the callback function
When a callback is called, the parameter passes a reference to the rc_delta_sync_object the call is originating from.
Definition at line 65 of file rc_delta_sync_object.h.
default constructor
Initially the channel is disabled and no callback is set.
Definition at line 47 of file rc_delta_sync_object.cpp.
| rc_delta_sync_object | ( | delta_sync_callback_type | callback, | |
| bool | enabled = false | |||
| ) |
constructor setting the initial state
| callback | the user-specified callback that shall be called in case of an update. | |
| enabled | the inital activity state |
Definition at line 41 of file rc_delta_sync_object.cpp.
| rc_delta_sync_object | ( | const rc_delta_sync_object & | orig | ) | [private] |
//(disabled)
| void request_update | ( | ) | [virtual] |
Requests a call to the callback at the end of this delta cycle.
Definition at line 52 of file rc_delta_sync_object.cpp.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), and rc_reconfigurable::reset_transaction_count().
| bool is_enabled | ( | ) | const [inline] |
| void set_enabled | ( | bool | b | ) | [inline] |
Sets the activity state of the channel.
Definition at line 98 of file rc_delta_sync_object.h.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), and rc_reconfigurable::_rc_delta_sync_state_change().
| void set_callback | ( | delta_sync_callback_type | callback | ) |
Changes the user defined callback.
Definition at line 59 of file rc_delta_sync_object.cpp.
Referenced by rc_reconfigurable::rc_reconfigurable().
| void update | ( | ) | [protected, virtual] |
Is called during update phase (if previously requested).
Definition at line 65 of file rc_delta_sync_object.cpp.
| rc_delta_sync_object& operator= | ( | const rc_delta_sync_object & | orig | ) | [private] |
//(disabled)
bool p_enabled [private] |
the "enabled" flag
Definition at line 116 of file rc_delta_sync_object.h.
Referenced by rc_delta_sync_object::is_enabled(), rc_delta_sync_object::request_update(), rc_delta_sync_object::set_enabled(), and rc_delta_sync_object::update().
delta_sync_callback_type p_callback [private] |
the user-specified callback
Definition at line 120 of file rc_delta_sync_object.h.
Referenced by rc_delta_sync_object::set_callback(), and rc_delta_sync_object::update().
1.5.3