#include <rc_reconfigurable.h>
Theoretically, any object can be used with ReChannel's reconfiguration algorithm, as the only technical precondition is that it has to be derived from class rc_reconfigurable. This class contains all the behaviour and state information that is necessary for the simulation of reconfiguration in ReChannel to work.
The reconfigurable has an internal transaction counter. Only if the number of open transactions equals zero the reconfigurable can be deactivated. If an operation is in progress that has to finish safely before the reconfigurable object may be deactivated, a transaction shall be begun. The transaction shall be ended immediately after the operation has been done.
Definition at line 207 of file rc_reconfigurable.h.
Public Types | |
enum | state_type { UNLOADED = 0, INACTIVE, ACTIVE } |
The three possible reconfiguration states of a rc_reconfigurable. More... | |
enum | { STATE_COUNT = 3 } |
The number of possible reconfiguration states. More... | |
enum | action_type { UNLOAD = 0, LOAD, ACTIVATE, DEACTIVATE } |
The four possible reconfiguration actions. More... | |
enum | { ACTION_COUNT = 4 } |
The number of possible reconfiguration actions. More... | |
typedef rc_switch_connector_base | switch_conn_type |
Switch connector base type. | |
typedef rc_switch::filter_chain | filter_chain |
The type of a filter chain. | |
Public Member Functions | |
std::string | rc_get_name () const |
Returns the name of this object. | |
const sc_object * | rc_get_object () const |
Returns the sc_object representation. | |
sc_object * | rc_get_object () |
Returns the sc_object representation. | |
state_type | rc_get_state () const |
Returns the current reconfiguration state. | |
bool | rc_is_state_changing () const |
Determines whether the state is about to change due to an on-going reconfiguration operation. | |
state_type | rc_get_next_state () const |
Returns the next reconfiguration state. | |
bool | rc_is_loaded () const |
Is the reconfigurable object currently loaded? | |
bool | rc_is_active () const |
Is the reconfigurable object currently active? | |
int | rc_get_transaction_count () const |
Returns the number of on-going transactions. | |
void | bind (rc_switch_connector_base &switch_connector) |
Bind this reconfigurable object to a switch connector. | |
void | rc_register_switch (rc_switch &switch_obj, const rc_object_handle &bound_obj) |
Registers a bound switch to this reconfigurable. | |
bool | rc_is_registered (rc_switch &switch_obj) const |
Is the given switch registered with this reconfigurable? | |
void | rc_register_resettable (rc_resettable &resettable) |
Registers a resettable object. | |
bool | rc_is_registered (rc_resettable &resettable) const |
Is the given resettable object registered? | |
void | rc_begin_transaction () |
Begin a transaction. | |
void | rc_end_transaction () |
Ends a previously begun transaction. | |
void | rc_possible_deactivation () |
Marks a point of possible deactivation for thread processes. | |
void | rc_possible_deactivation_delta () |
Marks a point of possible deactivation for thread processes. | |
bool | rc_is_deactivation_requested () const |
Is a deactivation operation currently in progress? | |
void | rc_set_delay (action_type a, sc_time t) |
Set the time a specific reconfiguration action will take. | |
sc_time | rc_get_delay (action_type a) const |
Returns the time taken by a particular reconfiguration action. | |
void | rc_set_default_delay (action_type a, sc_time t) |
Set the default time a specific reconfiguration action will take. | |
sc_time | rc_get_default_delay (action_type a) const |
Returns the default time taken by a particular reconfiguration action. | |
operator const rc_reconfigurable_set & () const | |
Implicit cast to a set containing only this object. | |
const rc_process_control & | rc_get_process_control () const |
Returns the internal process control instance. | |
switch_conn_type * | rc_get_current_switch_connector () const |
Returns the internal process control instance. | |
virtual | ~rc_reconfigurable () |
Destructor. | |
Protected Member Functions | |
rc_reconfigurable (sc_object *this_=NULL) | |
The only available constructor. | |
virtual void | rc_on_load () |
A callback which is called after successful loading. | |
virtual void | rc_on_activate () |
A callback which is called after successful activation. | |
virtual void | rc_on_deactivate () |
A callback which is called after successful deactivation. | |
virtual void | rc_on_unload () |
A callback which is called after successful unloading. | |
void | rc_add_portmap (rc_portmap_base &portmap) |
Adds a port map this rc_reconfigurable is compatible with. | |
void | rc_clear_portmaps () |
Clears all previously added port maps. | |
bool | rc_is_compatible (const rc_portmap_base &portmap) const |
Checks the compatibility with a given port map. | |
void | rc_add_filter (const rc_object_handle &commobj_, rc_interface_filter &filter_) |
Adds a filter to the filter chain of the given communication object. | |
int | rc_get_filter_count (const rc_object_handle &commobj_) const |
Returns the size of the filter chain of a given communication object. | |
filter_chain | rc_get_filter_chain (const rc_object_handle &commobj_) const |
Returns a copy of the filter chain of a given communication object. | |
bool | rc_has_filter (rc_interface_filter &filter_) const |
Is the given filter part of a filter chain. | |
void | rc_refresh_notify (const rc_object_handle &commobj_) |
Instruct the switch connected to the given object to refresh its event notifications. | |
void | rc_refresh_notify_all () |
Instruct all registered switches to refresh their event notifications. | |
Private Types | |
typedef std::pair < rc_switch *, rc_object_handle > | switch_commobj_pair |
typedef boost::multi_index_container < switch_commobj_pair, boost::multi_index::indexed_by < boost::multi_index::ordered_unique < BOOST_MULTI_INDEX_MEMBER(switch_commobj_pair, rc_switch *, first) >, boost::multi_index::ordered_non_unique < BOOST_MULTI_INDEX_MEMBER(switch_commobj_pair, rc_object_handle, second) > > | switch_commobj_map ) |
The type of the multi-indexed (multi)map of communication objects and switches. | |
typedef switch_commobj_map::nth_index < 0 >::type | switch_commobj_index |
The type of the map index: switch -> communication objects. | |
typedef switch_commobj_map::nth_index < 1 >::type | commobj_switch_index |
The type of the map index: communication objects -> switch. | |
typedef std::pair < switch_commobj_index::iterator, switch_commobj_index::iterator > | switch_commobj_range |
The type of a range of the map index switch_commobj_index. | |
typedef std::pair < commobj_switch_index::iterator, commobj_switch_index::iterator > | commobj_switch_range |
The type of a range of the map index commobj_switch_index. | |
typedef std::set < rc_interface_filter * > | filter_set |
The type of a set of filters. | |
typedef std::map < rc_object_handle, filter_chain > | commobj_filters_map |
The type of the map: communication object -> filter chain. | |
typedef std::set < rc_resettable * > | resettable_set |
The type of a set of resettable objects. | |
typedef std::vector < rc_portmap_base * > | portmap_vector |
The type of a set of resettable objects. | |
Private Member Functions | |
rc_control * | get_control () const |
Returns the control (if exists). | |
void | set_control (rc_control *control) |
Sets/resets the control. | |
void | start_of_simulation () |
Completes initialization at the start of simulation. | |
void | reconfigure (state_type new_state) |
Performs a reconfiguration action. | |
void | change_switch_state (rc_switch::state_type new_state) |
Changes the state of the registered switches. | |
void | move (switch_conn_type &target) |
Moves this reconfigurable instance to another switch connector. | |
bool | has_lock () const |
Does the current process hold a lock on this instance? | |
bool | is_locked () const |
Is this instance locked by a controlling process? | |
const sc_event & | get_lock_release_event () const |
Returns the lock release event. | |
bool | trylock () |
Tries to obtain a lock on this reconfigurable (non-blocking). | |
void | lock () |
Obtain a lock on this reconfigurable (blocking). | |
bool | lock (sc_time timeout) |
Obtain a lock on this reconfigurable (blocking, with timeout). | |
bool | unlock () |
Release the lock hold by the current process. | |
bool | share_lock (sc_process_handle proc) |
Register another process that shares current the lock with the calling process. | |
bool | reset_lock_share () |
Release a previously set lock share. | |
bool | has_lock_share () const |
Does the current process hold a shared lock? | |
bool | lock_switches (bool report_error=false) |
Lock all registered switches for this reconfigurable. | |
void | unlock_switches () |
Release the lock on all registered switches for this reconfigurable. | |
void | reset_transaction_count () |
Set transaction count to zero. | |
rc_portmap_base & | get_portmap (int index) |
Get the registered port map of given index. | |
int | get_portmap_count () const |
Get the number of registered port maps. | |
void | _rc_set_sc_object (sc_object &reconf) |
Initialises the sc_object reference. (internal only). | |
void | _rc_delta_sync_state_change (rc_delta_sync_object &delta_sync) |
Callback for rc_delta_sync_object. (internal only). | |
void | _rc_unload () |
Performes the unloading action. (internal only). | |
void | _rc_load () |
Performes the loading action. (internal only). | |
void | _rc_activate () |
Performes the activation action. (internal only). | |
void | _rc_deactivate () |
Performes the deactivation action. (internal only). | |
void | _rc_reset () |
Resets all registered resettable objects. (internal only). | |
int | _rc_is_compatible (const rc_portmap_base &portmap) const |
Checks for compatibility with the given port map. (internal only). | |
rc_portmap_base * | _rc_get_compatible_portmap (const rc_switch_connector_base &switch_conn) const |
Searches for a compatible, registered port map. (internal only). | |
Static Private Member Functions | |
static void | get_all_reconfigurables (std::vector< rc_reconfigurable * > ©_dest) |
Copies the vector that contains all existing reconfigurable objects. | |
Private Attributes | |
sc_object * | p_sc_object |
The sc_object. | |
bool | p_is_no_sc_object |
state_type | p_state |
The current state. | |
state_type | p_next_state |
The next state. | |
int | p_transaction_count |
The current transaction count. | |
rc_process_control | p_pctrl |
The process control object. | |
rc_delta_sync_object | p_delta_sync |
Delta cycle synchroniser object for activation/deactivation. | |
switch_commobj_map | p_switch_commobj_map |
switch_commobj_index & | p_switch_commobj_index |
commobj_switch_index & | p_commobj_switch_index |
filter_set | p_filter_set |
commobj_filters_map | p_commobj_filters_map |
rc_control * | p_control |
rc_reconfigurable_set | p_self_set |
rc_mutex_object | p_mutex |
sc_process_handle | p_lock_share |
sc_time | p_action_default_delays [ACTION_COUNT] |
sc_time | p_action_delays [ACTION_COUNT] |
portmap_vector | p_portmap_vector |
switch_conn_type * | p_curr_switch_conn |
resettable_set | p_resettable_set |
Static Private Attributes | |
static std::vector < rc_reconfigurable * > | s_reconfigurables |
Vector containing all existing reconfigurable objects. | |
Friends | |
class | rc_control |
Allow rc_control to control reconfigurable objects. | |
class | internals::reconfigurable::begin_construction |
class | rc_transaction |
Grant rc_transaction access to transaction related members. | |
class | rc_transaction_counter |
Grant rc_transaction_counter access to transaction related members. |
Switch connector base type.
Definition at line 232 of file rc_reconfigurable.h.
typedef rc_switch::filter_chain filter_chain |
typedef std::pair<rc_switch*, rc_object_handle> switch_commobj_pair [private] |
Definition at line 241 of file rc_reconfigurable.h.
typedef boost::multi_index_container< switch_commobj_pair, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< BOOST_MULTI_INDEX_MEMBER( switch_commobj_pair, rc_switch*, first) >, boost::multi_index::ordered_non_unique< BOOST_MULTI_INDEX_MEMBER( switch_commobj_pair, rc_object_handle, second) > > switch_commobj_map) [private] |
The type of the multi-indexed (multi)map of communication objects and switches.
Definition at line 259 of file rc_reconfigurable.h.
typedef switch_commobj_map::nth_index<0>::type switch_commobj_index [private] |
The type of the map index: switch -> communication objects.
Definition at line 264 of file rc_reconfigurable.h.
typedef switch_commobj_map::nth_index<1>::type commobj_switch_index [private] |
The type of the map index: communication objects -> switch.
Definition at line 269 of file rc_reconfigurable.h.
typedef std::pair< switch_commobj_index::iterator, switch_commobj_index::iterator> switch_commobj_range [private] |
The type of a range of the map index switch_commobj_index.
Definition at line 276 of file rc_reconfigurable.h.
typedef std::pair< commobj_switch_index::iterator, commobj_switch_index::iterator> commobj_switch_range [private] |
The type of a range of the map index commobj_switch_index.
Definition at line 283 of file rc_reconfigurable.h.
typedef std::set<rc_interface_filter*> filter_set [private] |
typedef std::map<rc_object_handle, filter_chain> commobj_filters_map [private] |
The type of the map: communication object -> filter chain.
Definition at line 293 of file rc_reconfigurable.h.
typedef std::set<rc_resettable*> resettable_set [private] |
typedef std::vector<rc_portmap_base*> portmap_vector [private] |
enum state_type |
The three possible reconfiguration states of a rc_reconfigurable.
Definition at line 309 of file rc_reconfigurable.h.
anonymous enum |
enum action_type |
anonymous enum |
rc_reconfigurable | ( | sc_object * | this_ = NULL |
) | [protected] |
The only available constructor.
this_ | a pointer to the sc_object of this instance (if already known before) |
Definition at line 77 of file rc_reconfigurable.cpp.
~rc_reconfigurable | ( | ) | [virtual] |
std::string rc_get_name | ( | ) | const |
Returns the name of this object.
Definition at line 98 of file rc_reconfigurable.cpp.
Referenced by rc_control::add(), rc_reconfigurable::bind(), rc_control::lock(), rc_reconfigurable::lock_switches(), rc_reconfigurable::move(), rc_portal_base::open(), rc_exportal_base::open(), rc_reconfigurable::rc_register_switch(), rc_abstract_switch_b::register_reconfigurable(), rc_portal_base::register_reconfigurable(), rc_exportal_base::register_reconfigurable(), rc_control::trylock(), rc_portal_base::unregister_reconfigurable(), and rc_exportal_base::unregister_reconfigurable().
const sc_object * rc_get_object | ( | ) | const |
Returns the sc_object representation.
Definition at line 610 of file rc_reconfigurable.cpp.
Referenced by rc_control::add(), rc_reconfigurable::rc_add_portmap(), rc_reconfigurable::rc_get_name(), and rc_control::remove().
sc_object * rc_get_object | ( | ) |
Returns the sc_object representation.
Definition at line 627 of file rc_reconfigurable.cpp.
state_type rc_get_state | ( | ) | const [inline] |
Returns the current reconfiguration state.
Definition at line 362 of file rc_reconfigurable.h.
Referenced by rc_control::_rc_do_action(), rc_control::_rc_reconfigure(), rc_prim_channel::rc_get_state(), rc_reconfigurable::rc_possible_deactivation(), and rc_reconfigurable::rc_possible_deactivation_delta().
bool rc_is_state_changing | ( | ) | const [inline] |
Determines whether the state is about to change due to an on-going reconfiguration operation.
Definition at line 369 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::move().
state_type rc_get_next_state | ( | ) | const [inline] |
Returns the next reconfiguration state.
Definition at line 375 of file rc_reconfigurable.h.
Referenced by rc_prim_channel::rc_get_next_state().
bool rc_is_loaded | ( | ) | const [inline] |
Is the reconfigurable object currently loaded?
Definition at line 381 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::move().
bool rc_is_active | ( | ) | const [inline] |
Is the reconfigurable object currently active?
Definition at line 387 of file rc_reconfigurable.h.
Referenced by rc_portal_base::open(), rc_exportal_base::open(), and rc_reconfigurable::start_of_simulation().
int rc_get_transaction_count | ( | ) | const [inline] |
Returns the number of on-going transactions.
Definition at line 396 of file rc_reconfigurable.h.
void bind | ( | rc_switch_connector_base & | switch_connector | ) |
Bind this reconfigurable object to a switch connector.
Definition at line 108 of file rc_reconfigurable.cpp.
Referenced by rc_switch_connector_base::bind_dynamic().
void rc_register_switch | ( | rc_switch & | switch_obj, | |
const rc_object_handle & | bound_obj | |||
) |
Registers a bound switch to this reconfigurable.
Definition at line 126 of file rc_reconfigurable.cpp.
Referenced by rc_exportal_base::bind_dynamic(), rc_exportal_base::bind_exclusively(), and rc_portal_base::register_port().
bool rc_is_registered | ( | rc_switch & | switch_obj | ) | const |
Is the given switch registered with this reconfigurable?
Definition at line 156 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::rc_register_switch().
void rc_register_resettable | ( | rc_resettable & | resettable | ) |
Registers a resettable object.
Resettable components register itself to the reconfigurable context to be reset if the context is deactivated.
Definition at line 162 of file rc_reconfigurable.cpp.
Referenced by ReChannel::rc_register_resettable().
bool rc_is_registered | ( | rc_resettable & | resettable | ) | const |
void rc_begin_transaction | ( | ) | [inline] |
Begin a transaction.
Increases the internal transaction counter by one.
Definition at line 446 of file rc_reconfigurable.h.
Referenced by rc_transaction::begin(), rc_portal_base::begin_access_callback(), rc_exportal_base::begin_access_callback(), and rc_transaction::rc_transaction().
void rc_end_transaction | ( | ) | [inline] |
Ends a previously begun transaction.
Decreases the internal transaction counter by one.
Definition at line 988 of file rc_reconfigurable.h.
Referenced by rc_transaction::end(), rc_portal_base::end_access_callback(), rc_exportal_base::end_access_callback(), and rc_transaction::~rc_transaction().
void rc_possible_deactivation | ( | ) |
Marks a point of possible deactivation for thread processes.
A thread invoking rc_possible_deactivation() will be suspended if the deactivation of the reconfigurable object was requested and the transaction count equals zero.
Definition at line 172 of file rc_reconfigurable.cpp.
Referenced by rc_abstract_prim_filter::_rc_possible_deactivation_callback(), and rc_transaction::end().
void rc_possible_deactivation_delta | ( | ) |
Marks a point of possible deactivation for thread processes.
If a deactivation is requested a thread invoking rc_possible_deactivation_delta() will be suspended till the next delta cycle. This may be useful on the UTF abstraction level.
Definition at line 192 of file rc_reconfigurable.cpp.
bool rc_is_deactivation_requested | ( | ) | const [inline] |
Is a deactivation operation currently in progress?
Definition at line 485 of file rc_reconfigurable.h.
Referenced by rc_abstract_filter::rc_is_deactivation_requested(), rc_reconfigurable::rc_possible_deactivation(), rc_reconfigurable::rc_possible_deactivation_delta(), and rc_reconfigurable::reset_transaction_count().
void rc_set_delay | ( | action_type | a, | |
sc_time | t | |||
) |
Set the time a specific reconfiguration action will take.
Definition at line 205 of file rc_reconfigurable.cpp.
Referenced by rc_control::add(), and rc_control::update_delays().
sc_time rc_get_delay | ( | action_type | a | ) | const [inline] |
Returns the time taken by a particular reconfiguration action.
Definition at line 499 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), rc_reconfigurable::_rc_load(), and rc_reconfigurable::_rc_unload().
void rc_set_default_delay | ( | action_type | a, | |
sc_time | t | |||
) | [inline] |
Set the default time a specific reconfiguration action will take.
Definition at line 505 of file rc_reconfigurable.h.
sc_time rc_get_default_delay | ( | action_type | a | ) | const [inline] |
Returns the default time taken by a particular reconfiguration action.
Definition at line 516 of file rc_reconfigurable.h.
Referenced by rc_control::takes_time().
operator const rc_reconfigurable_set & | ( | ) | const [inline] |
Implicit cast to a set containing only this object.
Definition at line 524 of file rc_reconfigurable.h.
const rc_process_control& rc_get_process_control | ( | ) | const [inline] |
Returns the internal process control instance.
Processes controlled by this process control instance will be automatically reset in case of a deactivation.
Definition at line 535 of file rc_reconfigurable.h.
Referenced by process_support::declare_process(), process_support::disable_process_control(), process_support::method_process(), rc_portal_base::open(), rc_exportal_base::open(), process_support::rc_spawn(), and process_support::thread_process().
switch_conn_type* rc_get_current_switch_connector | ( | ) | const [inline] |
Returns the internal process control instance.
Processes controlled by this process control instance will be automatically reset in case of a deactivation.
Definition at line 544 of file rc_reconfigurable.h.
virtual void rc_on_load | ( | ) | [inline, protected, virtual] |
A callback which is called after successful loading.
This callback is invoked by an external controlling process.
Definition at line 562 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_load().
virtual void rc_on_activate | ( | ) | [inline, protected, virtual] |
A callback which is called after successful activation.
This callback is invoked by an external controlling process.
Definition at line 572 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_activate().
virtual void rc_on_deactivate | ( | ) | [inline, protected, virtual] |
A callback which is called after successful deactivation.
This callback is invoked by an external controlling process.
Definition at line 582 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_deactivate().
virtual void rc_on_unload | ( | ) | [inline, protected, virtual] |
A callback which is called after successful unloading.
This callback is invoked by an external controlling process.
Definition at line 592 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_unload().
void rc_add_portmap | ( | rc_portmap_base & | portmap | ) | [protected] |
Adds a port map this rc_reconfigurable is compatible with.
Definition at line 535 of file rc_reconfigurable.cpp.
void rc_clear_portmaps | ( | ) | [protected] |
bool rc_is_compatible | ( | const rc_portmap_base & | portmap | ) | const [inline, protected] |
void rc_add_filter | ( | const rc_object_handle & | commobj_, | |
rc_interface_filter & | filter_ | |||
) | [protected] |
Adds a filter to the filter chain of the given communication object.
commobj_ | the object the filter shall be added to | |
commobj_ | a filter of compatible type |
Definition at line 213 of file rc_reconfigurable.cpp.
int rc_get_filter_count | ( | const rc_object_handle & | commobj_ | ) | const [protected] |
Returns the size of the filter chain of a given communication object.
Definition at line 228 of file rc_reconfigurable.cpp.
rc_reconfigurable::filter_chain rc_get_filter_chain | ( | const rc_object_handle & | commobj_ | ) | const [protected] |
Returns a copy of the filter chain of a given communication object.
Definition at line 241 of file rc_reconfigurable.cpp.
bool rc_has_filter | ( | rc_interface_filter & | filter_ | ) | const [protected] |
void rc_refresh_notify | ( | const rc_object_handle & | commobj_ | ) | [protected] |
Instruct the switch connected to the given object to refresh its event notifications.
Definition at line 255 of file rc_reconfigurable.cpp.
void rc_refresh_notify_all | ( | ) | [protected] |
Instruct all registered switches to refresh their event notifications.
Definition at line 268 of file rc_reconfigurable.cpp.
static void get_all_reconfigurables | ( | std::vector< rc_reconfigurable * > & | copy_dest | ) | [inline, static, private] |
Copies the vector that contains all existing reconfigurable objects.
Definition at line 662 of file rc_reconfigurable.h.
Referenced by rc_control::start_of_simulation().
rc_control* get_control | ( | ) | const [inline, private] |
Returns the control (if exists).
Definition at line 670 of file rc_reconfigurable.h.
Referenced by rc_control::add(), rc_control::lock(), and rc_control::trylock().
void set_control | ( | rc_control * | control | ) | [inline, private] |
Sets/resets the control.
Definition at line 676 of file rc_reconfigurable.h.
Referenced by rc_control::add(), and rc_control::remove().
void start_of_simulation | ( | ) | [private] |
Completes initialization at the start of simulation.
This method is called by rc_control to complete the initialisation of the respective reconfigurable instance.
Definition at line 279 of file rc_reconfigurable.cpp.
Referenced by rc_control::start_of_simulation().
void reconfigure | ( | state_type | new_state | ) | [private] |
Performs a reconfiguration action.
Definition at line 307 of file rc_reconfigurable.cpp.
Referenced by rc_control::_rc_reconfigure().
void change_switch_state | ( | rc_switch::state_type | new_state | ) | [private] |
Changes the state of the registered switches.
Definition at line 365 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::_rc_delta_sync_state_change(), and rc_reconfigurable::start_of_simulation().
void move | ( | switch_conn_type & | target | ) | [private] |
Moves this reconfigurable instance to another switch connector.
Definition at line 403 of file rc_reconfigurable.cpp.
Referenced by rc_control::move().
bool has_lock | ( | ) | const [inline, private] |
Does the current process hold a lock on this instance?
Definition at line 712 of file rc_reconfigurable.h.
bool is_locked | ( | ) | const [inline, private] |
Is this instance locked by a controlling process?
Definition at line 718 of file rc_reconfigurable.h.
Referenced by rc_control::is_locked().
const sc_event& get_lock_release_event | ( | ) | const [inline, private] |
bool trylock | ( | ) | [inline, private] |
Tries to obtain a lock on this reconfigurable (non-blocking).
Definition at line 731 of file rc_reconfigurable.h.
Referenced by rc_control::trylock().
void lock | ( | ) | [inline, private] |
Obtain a lock on this reconfigurable (blocking).
Definition at line 737 of file rc_reconfigurable.h.
Referenced by rc_control::lock().
bool lock | ( | sc_time | timeout | ) | [inline, private] |
Obtain a lock on this reconfigurable (blocking, with timeout).
Definition at line 743 of file rc_reconfigurable.h.
bool unlock | ( | ) | [private] |
Release the lock hold by the current process.
Definition at line 439 of file rc_reconfigurable.cpp.
Referenced by rc_control::_rc_unlock(), and rc_control::remove().
bool share_lock | ( | sc_process_handle | proc | ) | [private] |
Register another process that shares current the lock with the calling process.
Definition at line 448 of file rc_reconfigurable.cpp.
Referenced by rc_control::_rc_reconfigure().
bool reset_lock_share | ( | ) | [private] |
bool has_lock_share | ( | ) | const [inline, private] |
Does the current process hold a shared lock?
Definition at line 768 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::reconfigure().
bool lock_switches | ( | bool | report_error = false |
) | [private] |
Lock all registered switches for this reconfigurable.
Definition at line 468 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::_rc_load().
void unlock_switches | ( | ) | [private] |
Release the lock on all registered switches for this reconfigurable.
Definition at line 514 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::_rc_unload().
void reset_transaction_count | ( | ) | [private] |
Set transaction count to zero.
Definition at line 527 of file rc_reconfigurable.cpp.
Referenced by rc_transaction_counter::modify(), and rc_reconfigurable::rc_end_transaction().
rc_portmap_base & get_portmap | ( | int | index | ) | [private] |
int get_portmap_count | ( | ) | const [inline, private] |
void _rc_set_sc_object | ( | sc_object & | reconf | ) | [private] |
Initialises the sc_object reference. (internal only).
Definition at line 602 of file rc_reconfigurable.cpp.
Referenced by begin_construction::finish().
void _rc_delta_sync_state_change | ( | rc_delta_sync_object & | delta_sync | ) | [private] |
Callback for rc_delta_sync_object. (internal only).
Is used to synchronise reconfiguration operations with delta cycle boundaries.
Definition at line 643 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::rc_reconfigurable().
void _rc_unload | ( | ) | [private] |
Performes the unloading action. (internal only).
Definition at line 668 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::reconfigure().
void _rc_load | ( | ) | [private] |
Performes the loading action. (internal only).
Definition at line 685 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::reconfigure().
void _rc_activate | ( | ) | [private] |
Performes the activation action. (internal only).
Definition at line 701 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::reconfigure().
void _rc_deactivate | ( | ) | [private] |
Performes the deactivation action. (internal only).
Definition at line 720 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::reconfigure().
void _rc_reset | ( | ) | [private] |
Resets all registered resettable objects. (internal only).
Definition at line 739 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::_rc_activate(), and rc_reconfigurable::_rc_deactivate().
int _rc_is_compatible | ( | const rc_portmap_base & | portmap | ) | const [private] |
Checks for compatibility with the given port map. (internal only).
Definition at line 577 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::rc_add_portmap().
rc_portmap_base * _rc_get_compatible_portmap | ( | const rc_switch_connector_base & | switch_conn | ) | const [private] |
Searches for a compatible, registered port map. (internal only).
Definition at line 589 of file rc_reconfigurable.cpp.
Referenced by rc_reconfigurable::move().
friend class rc_control [friend] |
Allow rc_control to control reconfigurable objects.
Definition at line 212 of file rc_reconfigurable.h.
friend class internals::reconfigurable::begin_construction [friend] |
Definition at line 214 of file rc_reconfigurable.h.
friend class rc_transaction [friend] |
Grant rc_transaction access to transaction related members.
Definition at line 219 of file rc_reconfigurable.h.
friend class rc_transaction_counter [friend] |
Grant rc_transaction_counter access to transaction related members.
Definition at line 225 of file rc_reconfigurable.h.
std::vector< rc_reconfigurable * > s_reconfigurables [static, private] |
Vector containing all existing reconfigurable objects.
Definition at line 859 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::get_all_reconfigurables(), and rc_reconfigurable::rc_reconfigurable().
sc_object* p_sc_object [mutable, private] |
The sc_object.
Stores the pointer to a sc_object base class (if exists)
Definition at line 867 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_set_sc_object(), and rc_reconfigurable::rc_get_object().
bool p_is_no_sc_object [mutable, private] |
Stores true, if no sc_object base class could be found.
Definition at line 871 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_set_sc_object(), and rc_reconfigurable::rc_get_object().
state_type p_state [private] |
The current state.
Definition at line 876 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), rc_reconfigurable::_rc_delta_sync_state_change(), rc_reconfigurable::_rc_load(), rc_reconfigurable::_rc_unload(), rc_reconfigurable::rc_get_state(), rc_reconfigurable::rc_is_active(), rc_reconfigurable::rc_is_deactivation_requested(), rc_reconfigurable::rc_is_loaded(), rc_reconfigurable::rc_is_state_changing(), rc_reconfigurable::reconfigure(), and rc_reconfigurable::start_of_simulation().
state_type p_next_state [private] |
The next state.
Stores the scheduled successive state while a reconfiguration operation is in progress.
Definition at line 883 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), rc_reconfigurable::_rc_delta_sync_state_change(), rc_reconfigurable::_rc_load(), rc_reconfigurable::_rc_unload(), rc_reconfigurable::rc_get_next_state(), rc_reconfigurable::rc_is_deactivation_requested(), and rc_reconfigurable::rc_is_state_changing().
int p_transaction_count [private] |
The current transaction count.
Definition at line 889 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_delta_sync_state_change(), rc_transaction_counter::modify(), rc_reconfigurable::rc_begin_transaction(), rc_reconfigurable::rc_end_transaction(), rc_reconfigurable::rc_get_transaction_count(), rc_reconfigurable::rc_possible_deactivation(), and rc_reconfigurable::reset_transaction_count().
rc_process_control p_pctrl [private] |
The process control object.
Resettable processes are canceled by this object in case of the deactivation of this rc_reconfigurable.
Definition at line 897 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), rc_reconfigurable::_rc_delta_sync_state_change(), rc_reconfigurable::rc_get_process_control(), rc_reconfigurable::rc_possible_deactivation(), and rc_reconfigurable::start_of_simulation().
rc_delta_sync_object p_delta_sync [private] |
Delta cycle synchroniser object for activation/deactivation.
Definition at line 901 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_activate(), rc_reconfigurable::_rc_deactivate(), rc_reconfigurable::_rc_delta_sync_state_change(), rc_reconfigurable::rc_reconfigurable(), and rc_reconfigurable::reset_transaction_count().
switch_commobj_map p_switch_commobj_map [private] |
Definition at line 903 of file rc_reconfigurable.h.
switch_commobj_index& p_switch_commobj_index [private] |
Definition at line 904 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::change_switch_state(), rc_reconfigurable::lock_switches(), rc_reconfigurable::rc_is_registered(), rc_reconfigurable::rc_refresh_notify_all(), rc_reconfigurable::rc_register_switch(), and rc_reconfigurable::unlock_switches().
commobj_switch_index& p_commobj_switch_index [private] |
Definition at line 905 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::move(), and rc_reconfigurable::rc_refresh_notify().
filter_set p_filter_set [private] |
Definition at line 907 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::rc_add_filter(), and rc_reconfigurable::rc_has_filter().
commobj_filters_map p_commobj_filters_map [private] |
Definition at line 908 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::change_switch_state(), rc_reconfigurable::rc_add_filter(), rc_reconfigurable::rc_get_filter_chain(), and rc_reconfigurable::rc_get_filter_count().
rc_control* p_control [private] |
Definition at line 910 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::get_control(), rc_reconfigurable::rc_set_delay(), and rc_reconfigurable::set_control().
rc_reconfigurable_set p_self_set [private] |
Definition at line 911 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::operator const rc_reconfigurable_set &(), and rc_reconfigurable::rc_reconfigurable().
rc_mutex_object p_mutex [private] |
Definition at line 912 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::get_lock_release_event(), rc_reconfigurable::has_lock(), rc_reconfigurable::is_locked(), rc_reconfigurable::lock(), rc_reconfigurable::reconfigure(), rc_reconfigurable::reset_lock_share(), rc_reconfigurable::share_lock(), rc_reconfigurable::trylock(), and rc_reconfigurable::unlock().
sc_process_handle p_lock_share [private] |
Definition at line 913 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::has_lock_share(), rc_reconfigurable::reset_lock_share(), rc_reconfigurable::share_lock(), and rc_reconfigurable::unlock().
sc_time p_action_default_delays[ACTION_COUNT] [private] |
Definition at line 914 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::rc_get_default_delay(), rc_reconfigurable::rc_set_default_delay(), and rc_reconfigurable::rc_set_delay().
sc_time p_action_delays[ACTION_COUNT] [private] |
Definition at line 915 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::rc_get_delay(), and rc_reconfigurable::rc_set_delay().
portmap_vector p_portmap_vector [private] |
Definition at line 917 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_get_compatible_portmap(), rc_reconfigurable::_rc_is_compatible(), rc_reconfigurable::bind(), rc_reconfigurable::get_portmap(), rc_reconfigurable::get_portmap_count(), rc_reconfigurable::rc_add_portmap(), and rc_reconfigurable::rc_clear_portmaps().
switch_conn_type* p_curr_switch_conn [private] |
Definition at line 918 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::bind(), rc_reconfigurable::move(), and rc_reconfigurable::rc_get_current_switch_connector().
resettable_set p_resettable_set [private] |
Definition at line 920 of file rc_reconfigurable.h.
Referenced by rc_reconfigurable::_rc_reset(), rc_reconfigurable::rc_is_registered(), rc_reconfigurable::rc_register_resettable(), and rc_reconfigurable::start_of_simulation().