Go to the documentation of this file.
58 pendingOperations_(0) {
60 for (
int i = 0; i <
latency; i++) {
98 const bool reuseBindings =
101 if (!reuseBindings) {
104 const std::size_t operandCount = inputOperands + outputOperands;
108 for (std::size_t i = 1; i <= inputOperands; ++i) {
118 for (std::size_t i = inputOperands + 1; i <= operandCount; ++i) {
120 nextSlot.
io_[i - 1] = &nextSlot.
ioOrig_[i - 1];
144 if (oldestOperation != NULL) {
146 const std::size_t inputOperands = oldestOperation->
numberOfInputs();
148 const std::size_t operandCount = inputOperands + outputOperands;
149 for (std::size_t i = inputOperands + 1; i <= operandCount; ++i) {
virtual int latency() const
SimValue * io_[EXECUTOR_MAX_OPERAND_COUNT]
Inputs and outputs for the operation.
void setBitWidth(int width)
Buffer buffer_
Ring buffer for the pipeline slots.
virtual void advanceClock()
virtual OperationExecutor * copy()
#define EXECUTOR_MAX_OPERAND_COUNT
Maximum count of operation operands supported by the executors. This is used to allocate some static ...
virtual int width() const
virtual int numberOfInputs() const
SimValue ioOrig_[EXECUTOR_MAX_OPERAND_COUNT]
Original inputs and outputs of the operation.
#define assert(condition)
virtual const SimValue & value() const
SimpleOperationExecutor(int latency, FUState &parent)
virtual void setContext(OperationContext &context)
bool hasPendingOperations_
This is set to true if the OperationExecutor is not in 'idle' mode.
Operation * operation_
Operation to be executed, set to NULL when results have been moved to output ports.
OperationContext * context_
Operation context.
virtual void startOperation(Operation &op)
int nextSlot_
Position of the ring buffer where to put the next triggered operation.
virtual ~SimpleOperationExecutor()
virtual Operand & operand(int id) const
std::size_t pendingOperations_
Count of pending operations in the pipeline.
Operation * boundOperation_
Tells the operation for which the bindings are initialized in this "pipeline cell",...
virtual bool simulateTrigger(SimValue **, OperationContext &context) const
bool ready_
Flag telling whether results are ready or not.
virtual int numberOfOutputs() const
PortState & binding(int io) const
virtual void setValue(const SimValue &value)