Go to the documentation of this file.
34 #ifndef TTA_SIMPLE_RESOURCE_MANAGER_HH
35 #define TTA_SIMPLE_RESOURCE_MANAGER_HH
52 class TerminalImmediate;
69 int immWriteCycle = -1,
71 int immRegIndex = -1)
const override;
81 int immWriteCycle = -1,
83 int immRegIndex = -1)
override;
91 int immWriteCycle = -1,
93 int immRegIndex = -1)
const override;
99 int immWriteCycle = -1,
101 int immRegIndex = -1)
const override;
107 int immWriteCycle = -1,
109 int immRegIndex = -1)
const override;
115 int immWriteCycle = -1,
117 int immRegIndex = -1)
const override;
125 virtual std::shared_ptr<TTAProgram::TerminalImmediate>
129 int, std::shared_ptr<TTAProgram::Immediate>)
const;
132 virtual void print(std::ostream& target)
const;
133 virtual std::string
toString()
const;
168 std::map<int, std::list< SimpleResourceManager*> > >
static std::map< const TTAMachine::Machine *, std::map< int, std::list< SimpleResourceManager * > > > rmPool_
virtual int immediateWriteCycle(const MoveNode &) const
void buildResourceModel(const TTAMachine::Machine &machine)
virtual bool canAssign(int cycle, MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) const override
virtual int largestCycle() const override
virtual int smallestCycle() const override
virtual std::shared_ptr< TTAProgram::TerminalImmediate > immediateValue(const MoveNode &)
void setCFG(const ControlFlowGraph *cfg)
virtual void assign(int cycle, MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) override
virtual unsigned initiationInterval() const
virtual void unassign(MoveNode &node) override
virtual void clearOldResources()
virtual ~SimpleResourceManager()
virtual bool hasGuard(const MoveNode &node) const
void clear()
Clears all bookkeeping done by this RM. The RM can then be reused for different BB.
virtual int earliestCycle(MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) const override
static void disposeRM(SimpleResourceManager *rm, bool allowReuse=true)
SimpleResourceManager(const TTAMachine::Machine &machine, unsigned int ii=0)
static SimpleResourceManager * createRM(const TTAMachine::Machine &machine, unsigned int ii=0)
unsigned int instructionIndex(unsigned int) const
virtual unsigned int resourceCount() const
virtual void print(std::ostream &target) const
SimpleBrokerDirector * director_
Resource manager's broker director.
void setMaxCycle(unsigned int maxCycle)
virtual bool canTransportImmediate(const MoveNode &node, const TTAMachine::Bus *preAssignedBus=NULL) const
const TTAMachine::Machine & machine() const
void setDDG(const DataDependenceGraph *ddg)
AssignmentPlan plan_
Resource assignment plan.
ResourceBuildDirector buildDirector_
Resource build director.
virtual int latestCycle(MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) const override
virtual bool isTemplateAvailable(int, std::shared_ptr< TTAProgram::Immediate >) const
void setBBN(const BasicBlockNode *bbn)
virtual void loseInstructionOwnership(int cycle)
unsigned int initiationInterval_
virtual bool supportsExternalAssignments() const override
virtual std::string toString() const
virtual TTAProgram::Instruction * instruction(int cycle) const override