OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpcodeSettingVirtualInputPortState Class Reference

#include <OpcodeSettingVirtualInputPortState.hh>

Inheritance diagram for OpcodeSettingVirtualInputPortState:
Inheritance graph
Collaboration diagram for OpcodeSettingVirtualInputPortState:
Collaboration graph

Public Member Functions

 OpcodeSettingVirtualInputPortState (Operation &operation, OperationExecutor &executor, FUState &parent, InputPortState &real)
 
 OpcodeSettingVirtualInputPortState (Operation &operation, FUState &parent, InputPortState &real)
 
virtual ~OpcodeSettingVirtualInputPortState ()
 
virtual void setValue (const SimValue &value)
 
virtual const SimValuevalue () const
 
InputPortStaterealPort () const
 
- Public Member Functions inherited from InputPortState
 InputPortState (FUState &parent, int width)
 
 InputPortState (FUState &parent, SimValue &registerToUse)
 
virtual ~InputPortState ()
 
- Public Member Functions inherited from PortState
 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 ()
 
- 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 ()
 

Private Member Functions

 OpcodeSettingVirtualInputPortState (const OpcodeSettingVirtualInputPortState &)
 Copying not allowed.
 
OpcodeSettingVirtualInputPortStateoperator= (const OpcodeSettingVirtualInputPortState &)
 Assignment not allowed.
 

Private Attributes

Operationoperation_
 Operation of the port.
 
OperationExecutorexecutor_
 Operation executor used to execute the operation in the target FU, this is an optimization to avoid searching for the executor every time the operation is triggered.
 
InputPortStatereal_
 Real input port.
 

Additional Inherited Members

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

Detailed Description

Operation setting input port state.

Port is virtual, that is it doesn't model real input port state. It has a pointer to the real port in which value is really set.

Definition at line 51 of file OpcodeSettingVirtualInputPortState.hh.

Constructor & Destructor Documentation

◆ OpcodeSettingVirtualInputPortState() [1/3]

OpcodeSettingVirtualInputPortState::OpcodeSettingVirtualInputPortState ( Operation operation,
OperationExecutor executor,
FUState parent,
InputPortState real 
)

Constructor.

Parameters
OperationOperation of the port.
executorOperationExecutor to use to execute the operation when it's triggered.
parentParent function unit.
realThe real port in which this port belongs to.

Definition at line 68 of file OpcodeSettingVirtualInputPortState.cc.

72 :
73 InputPortState(parent, real.value().width()),
74 operation_(operation), executor_(&executor),
75 real_(real) {
76}
OperationExecutor * executor_
Operation executor used to execute the operation in the target FU, this is an optimization to avoid s...
virtual FUState & parent() const
Definition PortState.cc:80
virtual const SimValue & value() const
int width() const
Definition SimValue.cc:103

◆ OpcodeSettingVirtualInputPortState() [2/3]

OpcodeSettingVirtualInputPortState::OpcodeSettingVirtualInputPortState ( Operation operation,
FUState parent,
InputPortState real 
)

Constructor.

Parameters
OperationOperation of the port.
parentParent function unit.
realThe real port in which this port belongs to.

Definition at line 50 of file OpcodeSettingVirtualInputPortState.cc.

53 :
54 InputPortState(parent, real.value().width()),
55 operation_(operation), executor_(NULL),
56 real_(real) {
57}

◆ ~OpcodeSettingVirtualInputPortState()

OpcodeSettingVirtualInputPortState::~OpcodeSettingVirtualInputPortState ( )
virtual

Destructor.

Definition at line 82 of file OpcodeSettingVirtualInputPortState.cc.

82 {
83}

◆ OpcodeSettingVirtualInputPortState() [3/3]

OpcodeSettingVirtualInputPortState::OpcodeSettingVirtualInputPortState ( const OpcodeSettingVirtualInputPortState )
private

Copying not allowed.

Member Function Documentation

◆ operator=()

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

Assignment not allowed.

◆ realPort()

InputPortState * OpcodeSettingVirtualInputPortState::realPort ( ) const

Returns the real port.

Returns
The real port.

Definition at line 116 of file OpcodeSettingVirtualInputPortState.cc.

116 {
117 return &real_;
118}

References real_.

◆ setValue()

void OpcodeSettingVirtualInputPortState::setValue ( const SimValue value)
virtual

Sets the value of the port and sets operation to function unit.

Reimplemented from RegisterState.

Definition at line 89 of file OpcodeSettingVirtualInputPortState.cc.

89 {
90
91 if (executor_ != NULL) {
93 } else {
95 }
98}
void setTriggered()
void setOperation(Operation &operation)
FUState * parent_
Parent of the port.
Definition PortState.hh:61
virtual void setValue(const SimValue &value)

References executor_, operation_, PortState::parent_, real_, FUState::setOperation(), FUState::setTriggered(), RegisterState::setValue(), and value().

Here is the call graph for this function:

◆ value()

const SimValue & OpcodeSettingVirtualInputPortState::value ( ) const
virtual

Returns the value of the parent port.

Returns
The value of the parent port.

Reimplemented from RegisterState.

Definition at line 106 of file OpcodeSettingVirtualInputPortState.cc.

106 {
107 return real_.value();
108}

References real_, and RegisterState::value().

Referenced by setValue().

Here is the call graph for this function:

Member Data Documentation

◆ executor_

OperationExecutor* OpcodeSettingVirtualInputPortState::executor_
private

Operation executor used to execute the operation in the target FU, this is an optimization to avoid searching for the executor every time the operation is triggered.

Definition at line 83 of file OpcodeSettingVirtualInputPortState.hh.

Referenced by setValue().

◆ operation_

Operation& OpcodeSettingVirtualInputPortState::operation_
private

Operation of the port.

Definition at line 79 of file OpcodeSettingVirtualInputPortState.hh.

Referenced by setValue().

◆ real_

InputPortState& OpcodeSettingVirtualInputPortState::real_
private

Real input port.

Definition at line 85 of file OpcodeSettingVirtualInputPortState.hh.

Referenced by realPort(), setValue(), and value().


The documentation for this class was generated from the following files: