34#ifndef TTA_FU_STATE_HH
35#define TTA_FU_STATE_HH
bool trigger_
True if operation is triggered in current clock cycle.
virtual OperationContext & context()
OperationContext operationContext_
The operation context for this FU.
std::size_t activeExecutors_
Count of active executors (to allow returning instantly from advanceClock())
void setOperation(Operation &operation, OperationExecutor &executor)
bool idle_
The idle status of the FU. The derived classes should alway set this to true when possible to avoid u...
Operation * nextOperation_
Operation to be triggered next.
virtual void replaceOperationExecutor(Operation &op, OperationExecutor *newExecutor)
FUState(const FUState &)
Copying not allowed.
virtual void addOutputPortState(PortState &port)
virtual void advanceClock()
std::vector< OperationExecutor * > ExecutorList
Contains all the different instances of executors.
OperationExecutor * nextExecutor_
OperationExecutor to be used for the next operation (an optimization).
virtual void reset()
this is called at (re)initialization of the simulation
bool sameBindings(OperationExecutor &exec1, OperationExecutor &exec2, Operation &op)
std::map< Operation *, OperationExecutor * > ExecutorContainer
Maps operations to executors.
virtual void addInputPortState(PortState &port)
virtual void addOperationExecutor(OperationExecutor &opExec, Operation &op)
ExecutorList execList_
All the different instances of OperationExecutors.
std::vector< PortState * > inputPorts_
Input ports of the function unit.
virtual OperationExecutor * executor(Operation &op)
ExecutorContainer executors_
All operation executors.
DetailedOperationSimulator * detailedModel_
Optional detailed operation simulation model. Assume there's one such model per FU or none at all for...
FUState & operator=(const FUState &)
Assignment not allowed.
virtual void setOperationSimulator(DetailedOperationSimulator &sim)
void setOperation(Operation &operation)
std::vector< PortState * > outputPorts_
Output ports of the function unit.
virtual void addInputPortState(PortState &port)
virtual void addOutputPortState(PortState &port)
static NullFUState instance_
Unique instance of NullFUState.
NullFUState(const NullFUState &)
Copying not allowed.
NullFUState & operator=(const NullFUState &)
Assignment not allowed.
virtual void addOperationExecutor(OperationExecutor &opExec, Operation &op)
virtual void advanceClock()
virtual OperationExecutor * executor(Operation &op)
static NullFUState & instance()