Skip to content

File operand_collect_stage.h

File List > pipelined > operand_collect_stage.h

Go to the documentation of this file

#pragma once

#include <cstdint>

#include "sim/queue.h"
#include "sm/instr_ptr.h"
#include "sm/pipelined/pipelined.h"

namespace simtix {

namespace pipelined {
class OperandCollectStage {
 public:
  OperandCollectStage(PipelinedSMImpl *sm, const PipelinedSM::Param &p);

  ~OperandCollectStage() = default;
  void OperandCollect();

  void Reset();

 protected:
  void AcceptPendingCollectReqeusts();
  void ExecuteOperandCollectedRequests();
  PipelinedSMImpl *const sm_;

  sim::SizedQueue<InstrPtr> collect_buf_;

  const uint32_t kOperandCollectWidth;
};

}  // namespace pipelined

}  // namespace simtix