OpenASIP
2.0
|
#include <ExecutableMove.hh>
Public Member Functions | |
ExecutableMove (const ReadableState &src, BusState &bus, WritableState &dst) | |
ExecutableMove (const ReadableState &src, BusState &bus, WritableState &dst, const ReadableState &guardReg, bool negated) | |
ExecutableMove (InlineImmediateValue *immediateSource, BusState &bus, WritableState &dst, const ReadableState &guardReg, bool negated) | |
ExecutableMove (InlineImmediateValue *immediateSource, BusState &bus, WritableState &dst) | |
virtual | ~ExecutableMove () |
virtual void | executeRead () |
virtual void | executeWrite () |
virtual void | evaluateGuard () |
virtual bool | squashed () const |
ClockCycleCount | executionCount () const |
void | resetExecutionCount () |
Protected Member Functions | |
ExecutableMove () | |
Protected Attributes | |
const ReadableState * | src_ |
Source of the move. More... | |
BusState * | bus_ |
Bus of the move. More... | |
WritableState * | dst_ |
Destination of the move. More... | |
const ReadableState * | guardReg_ |
Guard of the move. More... | |
const bool | guarded_ |
True if this is a guarded move. More... | |
const bool | negated_ |
True if guard is inverted. More... | |
ClockCycleCount | executionCount_ |
The count of times this move has been fully executed (without squash). More... | |
bool | squashed_ |
True in case this move was squashed last time it was executed. More... | |
Private Member Functions | |
ExecutableMove (const ExecutableMove &) | |
Copying not allowed. More... | |
ExecutableMove & | operator= (const ExecutableMove &) |
Assignment not allowed. More... | |
Private Attributes | |
InlineImmediateValue * | inlineImmediate_ |
If the move source is an inline immediate, the instance is stored here so it can be deleted in the destructor. More... | |
Represents an interpreted move.
Interpreted means that source and destination of the move are already resolved.
Definition at line 52 of file ExecutableMove.hh.
ExecutableMove::ExecutableMove | ( | const ReadableState & | src, |
BusState & | bus, | ||
WritableState & | dst | ||
) |
Constructor.
src | Source of the move. |
bus | Bus of the move. |
dst | Destination of the move. |
Definition at line 53 of file ExecutableMove.cc.
ExecutableMove::ExecutableMove | ( | const ReadableState & | src, |
BusState & | bus, | ||
WritableState & | dst, | ||
const ReadableState & | guardReg, | ||
bool | negated | ||
) |
Constructor.
src | Source of the move. |
bus | Bus of the move. |
dst | Destination of the move. |
guardReg | Guard register. |
negated | True if guard is reversed. |
Definition at line 72 of file ExecutableMove.cc.
ExecutableMove::ExecutableMove | ( | InlineImmediateValue * | immediateSource, |
BusState & | bus, | ||
WritableState & | dst, | ||
const ReadableState & | guardReg, | ||
bool | negated | ||
) |
Constructor.
Used to construct a move that has an inline immediate as the source. The inline immediate becomes property of the created ExecutableMove and is deleted by it.
immediateSource | The inline immediate source of the move. |
bus | Bus of the move. |
dst | Destination of the move. |
guardReg | Guard register. |
negated | True if guard is reversed. |
Definition at line 97 of file ExecutableMove.cc.
ExecutableMove::ExecutableMove | ( | InlineImmediateValue * | immediateSource, |
BusState & | bus, | ||
WritableState & | dst | ||
) |
Constructor.
Used to construct a move that has an inline immediate as the source. The inline immediate becomes property of the created ExecutableMove and is deleted by it.
immediateSource | The inline immediate source of the move. |
bus | Bus of the move. |
dst | Destination of the move. |
guardReg | Guard register. |
negated | True if guard is reversed. |
Definition at line 122 of file ExecutableMove.cc.
|
virtual |
|
protected |
A dummy constructor for being used with DummyExecutableMove
Definition at line 228 of file ExecutableMove.cc.
References inlineImmediate_.
|
private |
Copying not allowed.
|
virtual |
Evaluates the possible guard of the move, i.e., decides whether the move is squashed at the simulated cycle or not.
This must be called by the ExecutableInstruction before any executeRead()/executeWrite() is called in order not to overwrite the old guard value in case of the default 1-latency guards.
Definition at line 150 of file ExecutableMove.cc.
References bus_, guarded_, guardReg_, negated_, BusState::setSquashed(), SimValue::sIntWordValue(), squashed_, and ReadableState::value().
|
virtual |
Copies the value of the move source to the transport bus.
Reimplemented in BuslessExecutableMove.
Definition at line 166 of file ExecutableMove.cc.
References bus_, GUARD_BLOCKS_BUS_WRITE, guarded_, BusState::setValueInlined(), squashed_, src_, and ReadableState::value().
|
virtual |
Writes the value of the bus to the destination.
If the move is guarded, the value is written to destination only if guard expression is true.
Reimplemented in BuslessExecutableMove.
Definition at line 181 of file ExecutableMove.cc.
References bus_, dst_, executionCount_, guarded_, WritableState::setValue(), squashed_, and RegisterState::value().
ClockCycleCount ExecutableMove::executionCount | ( | ) | const |
Returns the count of executions of this move.
This count does not include squashed executions.
Definition at line 206 of file ExecutableMove.cc.
References executionCount_.
Referenced by DummyExecutableMove::DummyExecutableMove().
|
private |
Assignment not allowed.
void ExecutableMove::resetExecutionCount | ( | ) |
Resets the execution counter of this move.
Definition at line 194 of file ExecutableMove.cc.
References executionCount_.
|
inlinevirtual |
Returns true in case move with the move was squashed the last time the instruction was executed.
Being squashed means that the move is guarded and the guard expression evaluated to false.
Definition at line 221 of file ExecutableMove.cc.
References squashed_.
|
protected |
Bus of the move.
Definition at line 94 of file ExecutableMove.hh.
Referenced by evaluateGuard(), executeRead(), and executeWrite().
|
protected |
Destination of the move.
Definition at line 96 of file ExecutableMove.hh.
Referenced by BuslessExecutableMove::executeWrite(), and executeWrite().
|
protected |
The count of times this move has been fully executed (without squash).
Definition at line 104 of file ExecutableMove.hh.
Referenced by DummyExecutableMove::DummyExecutableMove(), BuslessExecutableMove::executeWrite(), executeWrite(), executionCount(), and resetExecutionCount().
|
protected |
True if this is a guarded move.
Definition at line 100 of file ExecutableMove.hh.
Referenced by evaluateGuard(), executeRead(), BuslessExecutableMove::executeWrite(), and executeWrite().
|
protected |
Guard of the move.
Definition at line 98 of file ExecutableMove.hh.
Referenced by evaluateGuard(), and BuslessExecutableMove::executeWrite().
|
private |
If the move source is an inline immediate, the instance is stored here so it can be deleted in the destructor.
Definition at line 115 of file ExecutableMove.hh.
Referenced by ExecutableMove(), and ~ExecutableMove().
|
protected |
True if guard is inverted.
Definition at line 102 of file ExecutableMove.hh.
Referenced by evaluateGuard(), and BuslessExecutableMove::executeWrite().
|
protected |
True in case this move was squashed last time it was executed.
Definition at line 106 of file ExecutableMove.hh.
Referenced by evaluateGuard(), executeRead(), BuslessExecutableMove::executeWrite(), executeWrite(), and squashed().
|
protected |
Source of the move.
Definition at line 92 of file ExecutableMove.hh.
Referenced by executeRead(), and BuslessExecutableMove::executeWrite().