33#ifndef TTA_EXECUTION_PIPELINE_HH
34#define TTA_EXECUTION_PIPELINE_HH
60 typedef std::set<PipelineElement*,PipelineElement::Comparator>
ResourceSet;
67 void addResourceUse(
const std::string& name,
int start,
int duration);
68 void addPortRead(
int operand,
int start,
int duration);
89 int slack(
int input)
const;
128 const std::string& resource,
int start,
int duration)
const;
132 const std::string& name,
141 const std::string& name,
154 const std::string& resource,
168 const std::string& osName);
void checkOutputOperand(int operand) const
ObjectStateTable sortResourceUsages(const ObjectState *pipelineState) const
static void checkResourceName(const std::string &name)
void loadState(const ObjectState *state)
bool isPortUsed(const FUPort &port, int cycle) const
OperandSet readOperands() const
static void checkDuration(int duration)
bool isArchitectureEqual(const ExecutionPipeline *pipeline) const
void removeAllResourceUses()
std::vector< ResourceSet > ResourceUsage
Vector for resource sets.
std::vector< const ObjectState * > ObjectStateTable
Vector for ObjectState pointers.
void addResourceUse(const std::string &name, int start, int duration)
void checkInputOperand(int operand) const
void internalRemoveOperandUse(int operand, int start, int duration)
PipelineElement * pipelineElement(const std::string &name) const
static const std::string OSKEY_RESOURCE_NAME
ObjectState attribute key for name of resource.
void addResourceUsage(ObjectStateTable &usages, const ObjectState *usageState) const
OperandSet writtenOperands() const
static const std::string OSNAME_OPERAND_WRITE
ObjectState name for operand write.
int firstCycleWithoutOperandUse(int operand, int cycle) const
void internalRemoveResourceUse(const std::string &name, int start, int duration)
void addPortRead(int operand, int start, int duration)
bool isOperandWritten(int operand) const
void removeOperandUse(int operand, int cycle)
IOUsage opReads_
Operand reads.
IOUsage opWrites_
Operand writes.
std::set< int > OperandSet
Set for operand indexes.
static void saveOperandUse(int operand, int cycleToSave, ObjectState *pipelineState, const std::string &osName)
static const std::string OSKEY_START_CYCLE
ObjectState attribute key for start cycle of a resource usage.
ObjectState * saveState() const
bool isOperandBound(const FUPort &port, const OperandSet &operands) const
void checkStartCycle(int startCycle) const
static const std::string OSKEY_OPERAND
ObjectState attribute key for operand number.
HWOperation * parent_
The parent operation.
int slack(int input) const
void internalAddResourceUse(const std::string &name, int start, int duration)
static const std::string OSNAME_OPERAND_READ
ObjectState name for operand read.
void internalAddPortUse(int operand, int start, int duration, IOUsage &toModify)
ResourceSet resourceUsages(int cycle) const
ResourceSet usedResources() const
virtual ~ExecutionPipeline()
void addPortWrite(int operand, int start, int duration)
void adjustLatency(int newLatency)
bool isPortWritten(const FUPort &port, int cycle) const
bool isPortRead(const FUPort &port, int cycle) const
void removeResourceUse(const std::string &name)
int firstCycleWithoutResource(const std::string &resource) const
void checkOperandAvailability(int operand, int start, int duration) const
bool isResourceUsed(const std::string &name, int cycle) const
static const std::string OSNAME_PIPELINE
ObjectState name for ExecutionPipeline.
static const std::string OSNAME_RESOURCE_USAGE
ObjectState name for pipeline resource usage.
std::set< PipelineElement *, PipelineElement::Comparator > ResourceSet
Set for pipeline elements.
static const std::string OSKEY_CYCLES
ObjectState attribute key for duration of a resource usage.
ResourceUsage resourceUsage_
Resource usage.
bool isOperandRead(int operand) const
const HWOperation * parentOperation() const
void checkResourceAvailability(const std::string &resource, int start, int duration) const
std::vector< OperandSet > IOUsage
Vector for operand sets.
static void saveResourceUse(const PipelineElement *element, int cycleToSave, ObjectState *pipelineState)
PipelineElement * addPipelineElement(const std::string &name) const