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

#include <PortState.hh>

Inheritance diagram for PortState:
Inheritance graph
Collaboration diagram for PortState:
Collaboration graph

Public Member Functions

 PortState (FUState &parent, int width)
 
 PortState (FUState &parent, SimValue &sharedRegister)
 
virtual ~PortState ()
 
virtual FUStateparent () const
 
- Public Member Functions inherited from RegisterState
 RegisterState (int width, bool constantZero=false)
 
 RegisterState (SimValue &sharedRegister)
 
virtual ~RegisterState ()
 
virtual void setValue (const SimValue &value)
 
virtual const SimValuevalue () const
 
- Public Member Functions inherited from StateData
 StateData ()
 
virtual ~StateData ()
 
- Public Member Functions inherited from WritableState
 WritableState ()
 
virtual ~WritableState ()
 
- Public Member Functions inherited from ReadableState
 ReadableState ()
 
virtual ~ReadableState ()
 

Protected Attributes

FUStateparent_
 Parent of the port. More...
 
- Protected Attributes inherited from RegisterState
SimValuevalue_
 Value of the RegisterState. More...
 

Private Member Functions

 PortState (const PortState &)
 Copying not allowed. More...
 
PortStateoperator= (const PortState &)
 Assignment not allowed. More...
 

Detailed Description

Models port of function unit.

Definition at line 51 of file PortState.hh.

Constructor & Destructor Documentation

◆ PortState() [1/3]

PortState::PortState ( FUState parent,
int  width 
)

Constructor.

Parameters
parentThe parent FU state object of the port.
widthThe bit width of the port.

Definition at line 51 of file PortState.cc.

51  :
52  RegisterState(width), parent_(&parent) {
53 }

◆ PortState() [2/3]

PortState::PortState ( FUState parent,
SimValue sharedRegister 
)

Constructor for RegisterState which shares the actual register storage.

Parameters
parentThe parent FU state object of the port.
sharedRegisterThe register which is shared with this.

Definition at line 61 of file PortState.cc.

62  :
63  RegisterState(sharedRegister), parent_(&parent) {
64 
65 }

◆ ~PortState()

PortState::~PortState ( )
virtual

Destructor.

Definition at line 71 of file PortState.cc.

71  {
72 }

◆ PortState() [3/3]

PortState::PortState ( const PortState )
private

Copying not allowed.

Member Function Documentation

◆ operator=()

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

Assignment not allowed.

◆ parent()

FUState & PortState::parent ( ) const
virtual

Returns the parent of the port.

Returns
The parent of the port.

Reimplemented in NullPortState.

Definition at line 80 of file PortState.cc.

80  {
81  return *parent_;
82 }

References parent_.

Referenced by OperationExecutor::addBinding().

Member Data Documentation

◆ parent_

FUState* PortState::parent_
protected

Parent of the port.

Definition at line 61 of file PortState.hh.

Referenced by parent(), TriggeringInputPortState::setValue(), and OpcodeSettingVirtualInputPortState::setValue().


The documentation for this class was generated from the following files:
PortState::parent_
FUState * parent_
Parent of the port.
Definition: PortState.hh:61
PortState::parent
virtual FUState & parent() const
Definition: PortState.cc:80
RegisterState::RegisterState
RegisterState(int width, bool constantZero=false)
Definition: RegisterState.cc:50