rc_driver_object_base Class Reference

#include <rc_driver_object.h>

Inheritance diagram for rc_driver_object_base:

rc_driver_object_b< IF, false > rc_driver_object_b< IF, true > rc_nb_driver_object rc_driver_object

List of all members.


Detailed Description

This class is the base class of a driver object.

It contains all the infrastructure necessary to cache the calls that have to be forwarded. There also is a handle to the process that represents the driver. A driver object normally uses an own process instance which performs the forwarding. In case of non-blocking drivers it is also possible to shares one static process among all other driver objects.

See also:
rc_driver_object.h, RC_USE_SHARED_METHOD_DRIVER

Definition at line 125 of file rc_driver_object.h.


Protected Types

typedef
boost::function
< void(void)> 
call_type
 The type of the forwarded function object.
typedef std::vector
< write_call
write_call_vector
 The type of the write call vector.
typedef std::vector
< write_call >
::iterator 
write_call_iterator
 The type of the write call vector iterator.

Protected Member Functions

 rc_driver_object_base ()
 Constructor.
virtual ~rc_driver_object_base ()
 Virtual destructor.
virtual void writer_method_proc ()
 The writer method process.
virtual void writer_thread_proc ()
 The writer thread process.

Static Protected Member Functions

static void safe_event_notify (sc_event &e)
 Notifies an event.

Protected Attributes

sc_process_handle m_hproc
 Handle of the forwarding process of this driver object.
write_call_vectorm_write_call_vector
 Vector caching all pending calls of this driver object.
sc_event * m_pending_write_event
 Pending write event.
bool m_pending_write_event_notified_flag
 Flag to indicate whether the write event was notified.
bool * m_pending_write_event_notified
 Pointer to the notification flag used by this driver object.

Static Protected Attributes

static sc_process_handle s_hproc
 shared static driver process for non-blocking interfaces
static write_call_vector s_write_call_vector
 shared write call vector
static sc_event s_pending_write_event
 shared pending write event
static bool s_pending_write_event_notified_flag = false
 shared notification flag

Private Member Functions

 rc_driver_object_base (const rc_driver_object_base &dobj)
 (disabled)
rc_driver_object_baseoperator= (const rc_driver_object_base &dobj)
 (disabled)

Static Private Member Functions

static void s_writer_method_proc ()
 The static method process that forwards non-blocking calls.
static sc_process_handle s_create_method_process ()
 Creates a method process that forwards non-blocking calls .

Friends

class internals::driver_object::nb_driver_access_call
 Gives the non-blocking call object access to the members.
class internals::driver_object::driver_access_call
 Gives the blocking call object access to the members.

Classes

struct  write_call
 Class representing a write call (+properties). More...

Member Typedef Documentation

typedef boost::function<void (void)> call_type [protected]

The type of the forwarded function object.

A forwarded function object is always of the form: void f(void).

Reimplemented in rc_driver_object_b< IF, false >, and rc_driver_object_b< IF, true >.

Definition at line 141 of file rc_driver_object.h.

typedef std::vector<write_call> write_call_vector [protected]

The type of the write call vector.

Reimplemented in rc_driver_object_b< IF, false >, and rc_driver_object_b< IF, true >.

Definition at line 151 of file rc_driver_object.h.

typedef std::vector<write_call>::iterator write_call_iterator [protected]

The type of the write call vector iterator.

Reimplemented in rc_driver_object_b< IF, false >, and rc_driver_object_b< IF, true >.

Definition at line 155 of file rc_driver_object.h.


Constructor & Destructor Documentation

rc_driver_object_base (  )  [protected]

Constructor.

Definition at line 71 of file rc_driver_object.cpp.

~rc_driver_object_base (  )  [protected, virtual]

Virtual destructor.

Definition at line 91 of file rc_driver_object.cpp.

rc_driver_object_base ( const rc_driver_object_base dobj  )  [private]

(disabled)


Member Function Documentation

void writer_method_proc (  )  [protected, virtual]

The writer method process.

Definition at line 105 of file rc_driver_object.cpp.

void writer_thread_proc (  )  [protected, virtual]

The writer thread process.

Definition at line 122 of file rc_driver_object.cpp.

void safe_event_notify ( sc_event &  e  )  [static, protected]

Notifies an event.

Parameters:
e the event to be notified
Notifies an event. This method can be called irrespectively of the current active SystemC's simulation phase.

Note:
May even be called during the update phase.
Attention:
This function relies on a SystemC kernel that either notifies the event or throws an error if sc_event::notify() is called during the update phase. Another reaction will result in undefined behaviour.

Definition at line 150 of file rc_driver_object.cpp.

Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), and nb_driver_access_call::operator()().

void s_writer_method_proc (  )  [static, private]

The static method process that forwards non-blocking calls.

Definition at line 52 of file rc_driver_object.cpp.

Referenced by rc_driver_object_base::rc_driver_object_base().

static sc_process_handle s_create_method_process (  )  [static, private]

Creates a method process that forwards non-blocking calls .

rc_driver_object_base& operator= ( const rc_driver_object_base dobj  )  [private]

(disabled)


Friends And Related Function Documentation

friend class internals::driver_object::nb_driver_access_call [friend]

Gives the non-blocking call object access to the members.

Definition at line 130 of file rc_driver_object.h.

friend class internals::driver_object::driver_access_call [friend]

Gives the blocking call object access to the members.

Definition at line 135 of file rc_driver_object.h.


Member Data Documentation

sc_process_handle m_hproc [protected]

Handle of the forwarding process of this driver object.

Definition at line 199 of file rc_driver_object.h.

Referenced by rc_driver_object_base::rc_driver_object_base().

write_call_vector* m_write_call_vector [protected]

Vector caching all pending calls of this driver object.

Definition at line 203 of file rc_driver_object.h.

Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), nb_driver_access_call::operator()(), rc_driver_object_base::writer_method_proc(), rc_driver_object_base::writer_thread_proc(), and rc_driver_object_base::~rc_driver_object_base().

sc_event* m_pending_write_event [protected]

Pending write event.

This event is notified if new calls have to be forwarded. The forwarder process is sensitive to this event.

Definition at line 210 of file rc_driver_object.h.

Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), nb_driver_access_call::operator()(), and rc_driver_object_base::~rc_driver_object_base().

bool m_pending_write_event_notified_flag [protected]

Flag to indicate whether the write event was notified.

The flag is set to true if the write event was notified. The flag is set to false when the writer process is activated.

Definition at line 217 of file rc_driver_object.h.

bool* m_pending_write_event_notified [protected]

Pointer to the notification flag used by this driver object.

The indirection is necessary to allow the use of the static method writer process as well as another writer process.

Definition at line 224 of file rc_driver_object.h.

Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), nb_driver_access_call::operator()(), rc_driver_object_base::writer_method_proc(), and rc_driver_object_base::writer_thread_proc().

sc_process_handle s_hproc [static, protected]

shared static driver process for non-blocking interfaces

See also:
RC_USE_SHARED_METHOD_DRIVER

Definition at line 232 of file rc_driver_object.h.

Referenced by rc_driver_object_base::rc_driver_object_base().

rc_driver_object_base::write_call_vector s_write_call_vector [static, protected]

shared write call vector

See also:
RC_USE_SHARED_METHOD_DRIVER

Definition at line 237 of file rc_driver_object.h.

Referenced by rc_driver_object_base::s_writer_method_proc(), and rc_driver_object_base::~rc_driver_object_base().

sc_event s_pending_write_event [static, protected]

shared pending write event

See also:
RC_USE_SHARED_METHOD_DRIVER

Definition at line 242 of file rc_driver_object.h.

Referenced by rc_driver_object_base::rc_driver_object_base(), and rc_driver_object_base::~rc_driver_object_base().

bool s_pending_write_event_notified_flag = false [static, protected]

shared notification flag

See also:
RC_USE_SHARED_METHOD_DRIVER

Definition at line 247 of file rc_driver_object.h.

Referenced by rc_driver_object_base::s_writer_method_proc().


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