OpenASIP
2.0
|
#include <ExecutingOperation.hh>
Classes | |
struct | PendingResult |
Public Member Functions | |
ExecutingOperation (Operation &op, unsigned stages) | |
SimValue & | io (int operand) |
const Operation & | operation () const |
unsigned | stage () const |
bool | isLastPipelineStage () const |
void | start () |
void | stop () |
void | advanceCycle () |
void | initIOVec () |
Public Attributes | |
std::vector< SimValue > | iostorage_ |
std::vector< SimValue * > | iovec_ |
OSAL simulateTrigger() compatible I/O vector for fast execution. More... | |
std::vector< PendingResult > | pendingResults_ |
int | stage_ |
int | stages_ |
bool | free_ |
const Operation * | op_ |
Models an operation executing in the FU pipeline.
This is a helper class used by MultiCycleOperationExecutor to produce a more detailed simulation of operations executing in the FUs. Notably, this model is used in the interface to override operation simulation models from SystemC simulations (see tce_systemc.hh).
Definition at line 48 of file ExecutingOperation.hh.
|
inline |
void ExecutingOperation::advanceCycle | ( | ) |
Should be called at the end of a simulation cycle.
Definition at line 73 of file ExecutingOperation.cc.
References pendingResults_, and stage_.
Referenced by MultiLatencyOperationExecutor::advanceClock().
|
inline |
Definition at line 116 of file ExecutingOperation.hh.
References iostorage_, and iovec_.
Referenced by MultiLatencyOperationExecutor::startOperation().
SimValue & ExecutingOperation::io | ( | int | operand | ) |
Returns the value bound to the input or output operand with the given ID.
Definition at line 41 of file ExecutingOperation.cc.
References iostorage_.
|
inline |
Returns true in case the currently simulated stage for the operation is the last before finishing the execution.
The next advanceCycle call will push the operation out from the FU pipeline after which all results are assumed to have arrived.
Definition at line 75 of file ExecutingOperation.hh.
|
inline |
Definition at line 63 of file ExecutingOperation.hh.
References op_.
Referenced by MultiLatencyOperationExecutor::advanceClock(), and MultiLatencyOperationExecutor::startOperation().
|
inline |
void ExecutingOperation::start | ( | ) |
Methods that should not be called from SystemC models.
Sets the operation execution to be started.
Should be called at the beginning of a single operation's simulation.
Definition at line 51 of file ExecutingOperation.cc.
References free_, pendingResults_, and stage_.
Referenced by MultiLatencyOperationExecutor::startOperation().
void ExecutingOperation::stop | ( | ) |
Sets the operation execution to be stopped.
Should be called at the end of a single operation's simulation. This sets the object to be reusable for other operation execution.
Definition at line 65 of file ExecutingOperation.cc.
References free_.
Referenced by MultiLatencyOperationExecutor::advanceClock().
bool ExecutingOperation::free_ |
Definition at line 138 of file ExecutingOperation.hh.
Referenced by MultiLatencyOperationExecutor::advanceClock(), MultiLatencyOperationExecutor::findFreeExecutingOperation(), start(), and stop().
std::vector<SimValue> ExecutingOperation::iostorage_ |
Definition at line 125 of file ExecutingOperation.hh.
Referenced by initIOVec(), io(), MultiLatencyOperationExecutor::MultiLatencyOperationExecutor(), and MultiLatencyOperationExecutor::startOperation().
std::vector<SimValue*> ExecutingOperation::iovec_ |
OSAL simulateTrigger() compatible I/O vector for fast execution.
Definition at line 127 of file ExecutingOperation.hh.
Referenced by MultiLatencyOperationExecutor::advanceClock(), and initIOVec().
const Operation* ExecutingOperation::op_ |
Definition at line 140 of file ExecutingOperation.hh.
Referenced by operation().
std::vector<PendingResult> ExecutingOperation::pendingResults_ |
Definition at line 132 of file ExecutingOperation.hh.
Referenced by advanceCycle(), start(), and MultiLatencyOperationExecutor::startOperation().
int ExecutingOperation::stage_ |
Definition at line 134 of file ExecutingOperation.hh.
Referenced by MultiLatencyOperationExecutor::advanceClock(), advanceCycle(), isLastPipelineStage(), stage(), and start().
int ExecutingOperation::stages_ |
Definition at line 137 of file ExecutingOperation.hh.
Referenced by isLastPipelineStage().