Go to the documentation of this file.
69 nextOperation_(NULL), nextExecutor_(NULL),
71 activeExecutors_(0), detailedModel_(NULL) {
81 nextOperation_(NULL), nextExecutor_(NULL), operationContext_(name),
82 activeExecutors_(0), detailedModel_(NULL) {
104 for (ExecutorContainer::iterator i =
executors_.begin();
111 (*i).second->reset();
127 "Tried to trigger FU without operation code.");
186 for (
size_t i = 0; i < execListSize; ++i) {
275 for (std::size_t i = 0; i <
execList_.size(); ++i) {
296 assert (oe != NULL &&
"Can only add details to a complex executor.");
306 for (ExecutorContainer::iterator i =
executors_.begin();
345 if (port1 != port2) {
359 ExecutorContainer::iterator iter =
executors_.find(&op);
363 return (*iter).second;
std::vector< PortState * > inputPorts_
Input ports of the function unit.
OperationExecutor * nextExecutor_
OperationExecutor to be used for the next operation (an optimization).
virtual void advanceClock()
bool sameBindings(OperationExecutor &exec1, OperationExecutor &exec2, Operation &op)
OperationContext operationContext_
The operation context for this FU.
bool trigger_
True if operation is triggered in current clock cycle.
void addBinding(int io, PortState &port)
virtual void addOperationExecutor(OperationExecutor &opExec, Operation &op)
virtual int numberOfInputs() const
std::vector< PortState * > outputPorts_
Output ports of the function unit.
virtual OperationExecutor * copy()=0
virtual void addInputPortState(PortState &port)
DetailedOperationSimulator * detailedModel_
Optional detailed operation simulation model. Assume there's one such model per FU or none at all for...
virtual void setContext(OperationContext &context)=0
Operation * nextOperation_
Operation to be triggered next.
bool hasPendingOperations() const
virtual void addInputPortState(PortState &port)
virtual void advanceClock()=0
virtual void advanceClock()
#define assert(condition)
virtual void addOperationExecutor(OperationExecutor &opExec, Operation &op)
virtual void setOperationSimulator(DetailedOperationSimulator &sim)
virtual void startOperation(Operation &op)=0
#define abortWithError(message)
ExecutorContainer executors_
All operation executors.
virtual void replaceOperationExecutor(Operation &op, OperationExecutor *newExecutor)
ExecutorList execList_
All the different instances of OperationExecutors.
static NullFUState & instance()
virtual void setOperationSimulator(DetailedOperationSimulator &sim)
virtual void simulateCycleStart()
std::size_t activeExecutors_
Count of active executors (to allow returning instantly from advanceClock())
virtual void deleteState(OperationContext &context) const
virtual void reset()
this is called at (re)initialization of the simulation
virtual OperationExecutor * executor(Operation &op)
bool idle_
The idle status of the FU. The derived classes should alway set this to true when possible to avoid u...
virtual void createState(OperationContext &context) const
find Finds info of the inner loops in the false
virtual void addOutputPortState(PortState &port)
void setParent(FUState &parent)
static NullFUState instance_
Unique instance of NullFUState.
virtual OperationExecutor * executor(Operation &op)
virtual void addOutputPortState(PortState &port)
virtual int numberOfOutputs() const
PortState & binding(int io) const
virtual OperationContext & context()