rc_abstract_switch_b Class Reference

#include <rc_abstract_switch.h>

Inheritance diagram for rc_abstract_switch_b:

rc_switch rc_abstract_switch rc_abstract_switch< if_type > rc_abstract_switch< ReChannel::rc_port_traits< PORT >::port_traits::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_in< T > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_in_resolved >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_inout< T > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_inout_resolved >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type > rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >

List of all members.


Detailed Description

Base class of rc_abstract_switch<IF>.

Definition at line 54 of file rc_abstract_switch.h.


Public Types

typedef
rc_switch::state_type 
state_type
 The three possible states of a switch.

Public Member Functions

virtual state_type get_switch_state () const
 The current state.
virtual unsigned int get_transaction_count () const
 The number of pending transactions at this switch.
virtual bool is_registered (const rc_reconfigurable &module) const
 Is the given rc_reconfigurable registered with this switch?
virtual bool is_locked () const
 Is the switch locked by a rc_reconfigurable?
virtual std::string get_switch_kind () const
 The kind of the switch.
virtual std::string get_switch_name () const
 The name of the switch.
virtual ~rc_abstract_switch_b ()

Protected Member Functions

virtual void register_reconfigurable (rc_reconfigurable &module, sc_interface &dyn_if)
 Registers a rc_reconfigurable instance.
virtual void unregister_reconfigurable (rc_reconfigurable &module)
 Unregisters a previously registered rc_reconfigurable instance.
virtual bool is_lock_owner (const rc_reconfigurable &reconf) const
 Has the switch been locked by the given rc_reconfigurable?
virtual bool set_locked (rc_reconfigurable &lock_owner, bool lock)
 Sets/unsets the lock owner.

Protected Attributes

state_type m_state
unsigned int m_transaction_count

Private Types

typedef std::set
< void * > 
set
typedef std::map
< rc_reconfigurable *,
void * > 
module_void_map

Private Member Functions

 rc_abstract_switch_b ()
void * find_registered_if (rc_reconfigurable *module) const
bool is_registered (void *dyn_if) const
virtual void * _rc_dynamic_cast (sc_interface *dyn_if) const =0
virtual const char * _rc_get_if_type () const =0
 rc_abstract_switch_b (const rc_abstract_switch_b &orig)
rc_abstract_switch_boperator= (const rc_abstract_switch_b &orig)

Private Attributes

rc_reconfigurablep_lock_owner
set p_interface_set
module_void_map p_mod_if_map

Friends

class rc_abstract_switch

Member Typedef Documentation

typedef std::set<void*> set [private]

Definition at line 60 of file rc_abstract_switch.h.

typedef std::map<rc_reconfigurable*, void*> module_void_map [private]

Definition at line 61 of file rc_abstract_switch.h.

typedef rc_switch::state_type state_type

The three possible states of a switch.

Reimplemented from rc_switch.

Reimplemented in rc_abstract_exportal, rc_portal_b, rc_abstract_exportal< if_type >, rc_abstract_exportal< sc_fifo_out_if< T > >, rc_abstract_exportal< sc_fifo_in_if< T > >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_portal_b< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Definition at line 63 of file rc_abstract_switch.h.


Constructor & Destructor Documentation

rc_abstract_switch_b (  )  [private]

Definition at line 42 of file rc_abstract_switch.cpp.

~rc_abstract_switch_b (  )  [virtual]

Definition at line 46 of file rc_abstract_switch.cpp.

rc_abstract_switch_b ( const rc_abstract_switch_b orig  )  [private]


Member Function Documentation

virtual state_type get_switch_state (  )  const [inline, virtual]

The current state.

Implements rc_switch.

Definition at line 69 of file rc_abstract_switch.h.

virtual unsigned int get_transaction_count (  )  const [inline, virtual]

The number of pending transactions at this switch.

Implements rc_switch.

Definition at line 72 of file rc_abstract_switch.h.

virtual bool is_registered ( const rc_reconfigurable reconf  )  const [inline, virtual]

Is the given rc_reconfigurable registered with this switch?

Implements rc_switch.

Definition at line 75 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch::is_registered(), and rc_abstract_switch_b::register_reconfigurable().

virtual bool is_locked (  )  const [inline, virtual]

Is the switch locked by a rc_reconfigurable?

Note:
Locking is used to detect reconfiguration conflicts.

Implements rc_switch.

Definition at line 81 of file rc_abstract_switch.h.

virtual std::string get_switch_kind (  )  const [inline, virtual]

The kind of the switch.

Implements rc_switch.

Reimplemented in rc_abstract_exportal, rc_portal_b, rc_abstract_exportal< if_type >, rc_abstract_exportal< sc_fifo_out_if< T > >, rc_abstract_exportal< sc_fifo_in_if< T > >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_portal_b< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Definition at line 84 of file rc_abstract_switch.h.

virtual std::string get_switch_name (  )  const [inline, virtual]

The name of the switch.

Implements rc_switch.

Reimplemented in rc_abstract_exportal, rc_portal_b, rc_abstract_exportal< if_type >, rc_abstract_exportal< sc_fifo_out_if< T > >, rc_abstract_exportal< sc_fifo_in_if< T > >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_portal_b< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Definition at line 87 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch_b::register_reconfigurable().

void register_reconfigurable ( rc_reconfigurable reconf,
sc_interface &  dyn_if 
) [protected, virtual]

Registers a rc_reconfigurable instance.

Parameters:
reconf the rc_reconfigurable instance
dyn_if the connected dynamic interface

Implements rc_switch.

Reimplemented in rc_abstract_exportal, rc_portal_b, rc_abstract_exportal< if_type >, rc_abstract_exportal< sc_fifo_out_if< T > >, rc_abstract_exportal< sc_fifo_in_if< T > >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_portal_b< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Definition at line 60 of file rc_abstract_switch.cpp.

Referenced by rc_portal_b::register_reconfigurable(), and rc_abstract_exportal::register_reconfigurable().

void unregister_reconfigurable ( rc_reconfigurable reconf  )  [protected, virtual]

Unregisters a previously registered rc_reconfigurable instance.

Remarks:
Unregistering of a loaded module shall result in an error.

Implements rc_switch.

Reimplemented in rc_abstract_exportal, rc_portal_b, rc_abstract_exportal< if_type >, rc_abstract_exportal< sc_fifo_out_if< T > >, rc_abstract_exportal< sc_fifo_in_if< T > >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_portal_b< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_portal_b< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Definition at line 86 of file rc_abstract_switch.cpp.

Referenced by rc_portal_b::unregister_reconfigurable(), and rc_abstract_exportal::unregister_reconfigurable().

virtual bool is_lock_owner ( const rc_reconfigurable reconf  )  const [inline, protected, virtual]

Has the switch been locked by the given rc_reconfigurable?

Note:
Locking is used to detect reconfiguration conflicts.

Implements rc_switch.

Definition at line 99 of file rc_abstract_switch.h.

bool set_locked ( rc_reconfigurable lock_owner,
bool  lock 
) [protected, virtual]

Sets/unsets the lock owner.

Note:
Locking is used to detect reconfiguration conflicts.

Implements rc_switch.

Definition at line 49 of file rc_abstract_switch.cpp.

void * find_registered_if ( rc_reconfigurable module  )  const [inline, private]

Definition at line 180 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch::get_registered_if(), and rc_abstract_switch_b::unregister_reconfigurable().

bool is_registered ( void *  dyn_if  )  const [inline, private]

Definition at line 188 of file rc_abstract_switch.h.

virtual void* _rc_dynamic_cast ( sc_interface *  dyn_if  )  const [private, pure virtual]

Implemented in rc_abstract_switch, rc_abstract_switch< if_type >, rc_abstract_switch< sc_fifo_out_if< T > >, rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_abstract_switch< sc_fifo_in_if< T > >, rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_abstract_switch< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Referenced by rc_abstract_switch_b::register_reconfigurable().

virtual const char* _rc_get_if_type (  )  const [private, pure virtual]

Implemented in rc_abstract_switch, rc_abstract_switch< if_type >, rc_abstract_switch< sc_fifo_out_if< T > >, rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_mutex_if > >::if_type >, rc_abstract_switch< sc_fifo_in_if< T > >, rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_semaphore_if > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_fifo_in< T > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_inout_resolved >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< PORT >::port_traits::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_in_rv< W > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_fifo_out< T > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_port< sc_event_queue_if > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_inout_rv< W > >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_in_resolved >::if_type >, rc_abstract_switch< ReChannel::rc_port_traits< sc_inout< T > >::if_type >, and rc_abstract_switch< ReChannel::rc_port_traits< sc_in< T > >::if_type >.

Referenced by rc_abstract_switch_b::register_reconfigurable().

rc_abstract_switch_b& operator= ( const rc_abstract_switch_b orig  )  [private]


Friends And Related Function Documentation

friend class rc_abstract_switch [friend]

Definition at line 57 of file rc_abstract_switch.h.


Member Data Documentation

state_type m_state [protected]

Definition at line 119 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch_b::get_switch_state().

unsigned int m_transaction_count [protected]

Definition at line 120 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch_b::get_transaction_count().

rc_reconfigurable* p_lock_owner [private]

Definition at line 126 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch_b::is_lock_owner(), rc_abstract_switch_b::is_locked(), and rc_abstract_switch_b::set_locked().

set p_interface_set [private]

Definition at line 127 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch_b::is_registered(), rc_abstract_switch_b::register_reconfigurable(), and rc_abstract_switch_b::unregister_reconfigurable().

module_void_map p_mod_if_map [private]

Definition at line 128 of file rc_abstract_switch.h.

Referenced by rc_abstract_switch_b::find_registered_if(), rc_abstract_switch_b::is_registered(), rc_abstract_switch_b::register_reconfigurable(), and rc_abstract_switch_b::unregister_reconfigurable().


The documentation for this class was generated from the following files:
Generated on Tue Jan 1 23:14:12 2008 for ReChannel by  doxygen 1.5.3