Go to the documentation of this file.
34 #ifndef TTA_ITEMPLATE_BROKER_HH
35 #define TTA_ITEMPLATE_BROKER_HH
77 int immRegIndex)
const override;
86 int immRegIndex)
const override;
89 int immRegIndex)
override;
99 int immRegIndex)
const override;
106 int immRegIndex)
const override;
119 int, std::shared_ptr<TTAProgram::Immediate>)
const;
121 void clear()
override;
123 typedef std::vector<std::shared_ptr<const TTAProgram::Move> >
Moves;
124 typedef std::vector<std::shared_ptr<const TTAProgram::Immediate> >
Immediates;
137 std::map<const MoveNode*, TTAProgram::Instruction*, MoveNode::Comparator>
145 std::map<const MoveNode*, std::shared_ptr<TTAProgram::Immediate>,
std::map< int, TTAProgram::Instruction * > instructions_
cycle/instruction
void assignImmediate(int, std::shared_ptr< TTAProgram::Immediate >)
virtual bool isTemplateAvailable(int, std::shared_ptr< TTAProgram::Immediate >) const
virtual void setupResourceLinks(const ResourceMapper &mapper) override
virtual bool isITemplateBroker() const override
std::map< const MoveNode *, TTAProgram::Instruction *, MoveNode::Comparator > oldParentInstruction_
MoveNode/ original parent instruction.
virtual SchedulingResourceSet allAvailableResources(int, const MoveNode &, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcUnit, const TTAMachine::FunctionUnit *dstUnit, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
ITemplateBroker(std::string, BusBroker &busBroker, unsigned int initiationInterval=0)
virtual void assign(int cycle, MoveNode &node, SchedulingResource &res, int immWriteCycle, int immRegIndex) override
virtual int latestCycle(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcUnit, const TTAMachine::FunctionUnit *dstUnit, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
SchedulingResourceSet findITemplates(int, Moves &, Immediates &) const
virtual void loseInstructionOwnership(int cycle)
virtual bool isApplicable(const MoveNode &node, const TTAMachine::Bus *) const override
std::vector< std::shared_ptr< const TTAProgram::Move > > Moves
virtual void buildResources(const TTAMachine::Machine &target) override
void reselectTemplate(TTAProgram::Instruction &ins, int cycle)
virtual bool isAlreadyAssigned(int cycle, const MoveNode &node, const TTAMachine::Bus *preassignedBus) const override
virtual bool isAnyResourceAvailable(int, const MoveNode &, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
SimpleResourceManager * rm_
std::map< int, bool > instructionsNotOwned_
virtual TTAProgram::Instruction * instruction(int cycle)
virtual ~ITemplateBroker()
void unassignImmediate(int, const TTAMachine::ImmediateUnit &)
virtual void unassign(MoveNode &node) override
std::map< const MoveNode *, int, GraphNode::Comparator > immediateCycles_
Record cycle for MoveNodes that needed immediate writes, IU broker restores immediates before the tem...
std::vector< std::shared_ptr< const TTAProgram::Immediate > > Immediates
virtual int earliestCycle(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcUnit, const TTAMachine::FunctionUnit *dstUnit, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
std::map< const MoveNode *, std::shared_ptr< TTAProgram::Immediate >, GraphNode::Comparator > immediateValues_
std::vector< TTAMachine::Bus * > slots_
Move/immediate slots.
bool isImmediateInTemplate(int, std::shared_ptr< TTAProgram::Immediate >) const