Go to the documentation of this file.
33 #include <boost/format.hpp>
50 unsigned int initiationInterval):
51 initiationInterval_(initiationInterval),
52 resourceMapper_(NULL),
82 for (ResourceMap::const_iterator resIter =
resMap_.begin();
83 resIter !=
resMap_.end(); resIter++) {
118 for (ResourceMap::const_iterator resIter =
resMap_.begin();
119 resIter !=
resMap_.end(); resIter++) {
128 string msg =
"No available resource found.";
165 int immRegIndex)
const {
168 immWriteCycle, immu, immRegIndex);
184 machinePart = MapTools::keyForValue<const MachinePart*>(
resMap_, &r);
186 string msg =
"Machine part of for resource ";
188 msg +=
" not found!";
270 pair<const TTAMachine::MachinePart*, SchedulingResource*>(&mp, res));
280 for (ResourceMap::iterator i =
resMap_.begin(); i !=
resMap_.end(); ++i ) {
281 contents.insert(i->second);
330 ResourceMap::const_iterator itr =
resMap_.begin();
332 if (!(*itr).second->validateDependentGroups()) {
333 std::string msg = (boost::format(
334 "Broker '%s' failed to validate DependentGroup for '%s'!") %
338 if (!(*itr).second->validateRelatedGroups()){
339 std::string msg = (boost::format(
340 "Broker '%s' failed to validate RelatedGroup for '%s'!") %
367 for (ResourceMap::iterator i =
resMap_.begin(); i !=
resMap_.end(); i++) {
virtual ~ResourceBroker()
virtual SchedulingResourceSet allAvailableResources(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const
unsigned int initiationInterval_
bool hasResource(const SchedulingResource &r) const
MoveResMap assignedResources_
virtual std::string brokerName() const
void addResource(const TTAMachine::MachinePart &mp, SchedulingResource *res)
bool hasResourceOf(const TTAMachine::MachinePart &mp) const
void resources(ResourceSet &contents)
void setResourceMapper(const ResourceMapper &mapper)
virtual bool isAvailable(SchedulingResource &des, const MoveNode &node, int cycle, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const
virtual void setInitiationInterval(unsigned int cycles)
void validateResources() const
virtual bool isAnyResourceAvailable(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const
virtual bool isITemplateBroker() const
virtual SchedulingResource & availableResource(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const
virtual bool isExecutionPipelineBroker() const
int resourceCount() const
virtual bool isIUBroker() const
virtual bool isAvailable(const int cycle) const =0
virtual bool canAssign(const int cycle, const MoveNode &node) const =0
unsigned int instructionIndex(unsigned int) const
ResourceBroker(std::string, unsigned int initiationInterval=0)
const ResourceMapper & resourceMapper() const
virtual const TTAMachine::MachinePart & machinePartOf(const SchedulingResource &r) const
virtual const std::string & name() const
const ResourceMapper * resourceMapper_
virtual bool isBusBroker() const