OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DirectGuardState Class Reference

#include <GuardState.hh>

Inheritance diagram for DirectGuardState:
Inheritance graph
Collaboration diagram for DirectGuardState:
Collaboration graph

Public Member Functions

 DirectGuardState (const ReadableState &targetRegister)
 
virtual ~DirectGuardState ()
 
virtual const SimValuevalue () const
 
virtual void endClock ()
 
virtual void advanceClock ()
 
- Public Member Functions inherited from GuardState
 GuardState (const ReadableState &targetRegister, int latency)
 
virtual ~GuardState ()
 
- Public Member Functions inherited from ClockedState
 ClockedState ()
 
virtual ~ClockedState ()
 
virtual void reset ()
 this is called at (re)initialization of the simulation More...
 
- Public Member Functions inherited from ReadableState
 ReadableState ()
 
virtual ~ReadableState ()
 

Private Member Functions

 DirectGuardState ()
 
 DirectGuardState (const DirectGuardState &)
 Copying not allowed. More...
 
DirectGuardStateoperator= (const DirectGuardState &)
 Assignment not allowed. More...
 

Private Attributes

const ReadableStatetarget_
 The target register watched by this guard. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GuardState
 GuardState ()
 Only subclasses allowed to create empty GuardStates. More...
 

Detailed Description

Models a GuardState that reads value immediately from the source. Register guard latency 1 or port guard latency 0

Definition at line 123 of file GuardState.hh.

Constructor & Destructor Documentation

◆ DirectGuardState() [1/3]

DirectGuardState::DirectGuardState ( const ReadableState targetRegister)

Constructor.

Parameters
targetRegisterThe targer register this guard watches.

Definition at line 142 of file GuardState.cc.

142  :
143  target_(&targetRegister) {
144 }

◆ ~DirectGuardState()

DirectGuardState::~DirectGuardState ( )
virtual

Destructor.

Definition at line 149 of file GuardState.cc.

149  {
150 }

◆ DirectGuardState() [2/3]

DirectGuardState::DirectGuardState ( )
private

◆ DirectGuardState() [3/3]

DirectGuardState::DirectGuardState ( const DirectGuardState )
private

Copying not allowed.

Member Function Documentation

◆ advanceClock()

void DirectGuardState::advanceClock ( )
virtual

Does nothing.

Reimplemented from GuardState.

Definition at line 164 of file GuardState.cc.

164  {
165 }

◆ endClock()

void DirectGuardState::endClock ( )
virtual

Does nothing.

Reimplemented from GuardState.

Definition at line 157 of file GuardState.cc.

157  {
158 }

◆ operator=()

DirectGuardState& DirectGuardState::operator= ( const DirectGuardState )
private

Assignment not allowed.

◆ value()

const SimValue & DirectGuardState::value ( ) const
virtual

Returns the current value of the guard.

Returns
The current value of the guard.

Reimplemented from GuardState.

Definition at line 173 of file GuardState.cc.

173  {
174  return target_->value();
175 }

References target_, and ReadableState::value().

Here is the call graph for this function:

Member Data Documentation

◆ target_

const ReadableState* DirectGuardState::target_
private

The target register watched by this guard.

Definition at line 142 of file GuardState.hh.

Referenced by value().


The documentation for this class was generated from the following files:
DirectGuardState::target_
const ReadableState * target_
The target register watched by this guard.
Definition: GuardState.hh:142
ReadableState::value
virtual const SimValue & value() const =0