Go to the documentation of this file.
69 unsigned int initiationInterval):
97 string msg =
"Broker not capable of assigning resources to node!";
105 ResourceMap::const_iterator resIter =
resMap_.begin();
109 while (resIter !=
resMap_.end()) {
111 dynamic_cast<const ControlUnit*
>((*resIter).first);
116 resourceSet.
insert(*fuRes);
138 if (foundFU !=
nullptr) {
154 if (tempPort == NULL){
157 "Target is missing necessary FUPort!");
159 bool triggering =
false;
169 std::string msg =
"InputFUBroker: finding ";
170 msg +=
" resource for Socket ";
171 msg +=
" failed with error: ";
177 cycle, node, *pSocket, triggering)) {
178 resourceSet.
insert(foundFURes);
183 std::set<TCEString> candidateFUs;
184 std::set<TCEString> allowedFUs;
185 std::set<TCEString> rejectedFUs;
195 candidateFUs, n.
move(),
198 allowedFUs, n.
move(),
201 rejectedFUs, n.
move(),
212 candidateFUs.clear();
215 TCEString(
"Added candidate FU duo pre-set fu") +
220 while (resIter !=
resMap_.end()) {
228 if (candidateFUs.size() > 0 &&
231 TCEString(
"skipped ") << unit->
name() <<
" because it was not "
232 " in the candidate set.");
237 if (allowedFUs.size() > 0 &&
240 TCEString(
"skipped ") << unit->
name() <<
" because it was not "
241 " in the allowed set.");
249 " in the rejected set.");
268 if (tempPort == NULL){
271 "Target is missing necessary FUPort!");
273 bool triggering =
false;
283 std::string msg =
"InputFUBroker: finding ";
284 msg +=
" resource for Socket ";
285 msg +=
" failed with error: ";
290 if (fuRes.
canAssign(cycle, node, *pSocket, triggering)) {
291 resourceSet.
insert(*(*resIter).second);
293 debugLogRM(
"could not assign the fuRes to it.");
301 if (resourceSet.
count() == 0) {
302 debugLogRM(
"InputFUBroker returned an empty resource set.");
417 string msg =
"Broker not capable of assigning resources to node!";
422 string msg =
"Broker does not contain given resource.";
440 fuRes.
assign(cycle, node);
442 std::pair<const MoveNode*, SchedulingResource*>(
446 abortWithError(
"GCU required but tried to assign something else!");
459 fuRes.
assign(cycle, node);
461 std::pair<const MoveNode*, SchedulingResource*>(&node, &fuRes));
505 std::map<const TTAMachine::FunctionUnit*,int> nopWeights;
508 for (
int i = 0; i < navi.
count(); i++) {
535 for (ResourceMap::iterator resIter =
resMap_.begin();
536 resIter !=
resMap_.end(); resIter++) {
543 "Broker has other resource then FU registered!");
548 for (
int i = 0; i < fu->
portCount(); i++) {
558 for (
int i = 0; i < fuCount; i++) {
virtual bool isFUPort() const
virtual void addToDependentGroup(const int group, SchedulingResource &resource)
void setProgramOperation(ProgramOperationPtr po)
virtual Socket * inputSocket() const
unsigned int initiationInterval_
virtual TCEString name() const
virtual const TTAMachine::FunctionUnit & functionUnit() const
bool isDestinationOperation() const
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
Terminal & destination() const
virtual HWOperation * operationLowercase(const std::string &name) const
bool hasResource(const SchedulingResource &r) const
MoveResMap assignedResources_
virtual BaseFUPort * port(const std::string &name) const
SchedulingResource & resourceOf(const TTAMachine::MachinePart &mp, int index=0) const
virtual bool isTriggering() const
void addResource(const TTAMachine::MachinePart &mp, SchedulingResource *res)
bool hasResourceOf(const TTAMachine::MachinePart &mp) const
virtual TCEString name() const
#define assert(condition)
virtual FUPort * port(int operand) const
virtual Operation & hintOperation() const
void setResourceMapper(const ResourceMapper &mapper)
@ ANN_REJECTED_UNIT_DST
Dst. unit rejected.
void setDestination(Terminal *dst)
static void addAnnotatedFUs(std::set< TCEString > &candidateFUs, const TTAProgram::Move &m, TTAProgram::ProgramAnnotation::Id id)
virtual ControlUnit * controlUnit() const
#define abortWithError(message)
virtual int operationIndex() const
virtual FunctionUnitNavigator functionUnitNavigator() const
std::string errorMessageStack(bool messagesOnly=false) const
virtual int operationCount() const
SchedulingResource * resourceOf(const TTAMachine::MachinePart &mp) const
virtual const TTAMachine::Port & port() const
virtual bool isExecutionPipelineResource() const
virtual bool isInputFUResource() const
@ ANN_ALLOWED_UNIT_DST
Dst. unit candidate.
int inputMoveCount() const
virtual int portCount() const
virtual const TTAMachine::FunctionUnit & functionUnit() const
ProgramOperation & destinationOperation(unsigned int index=0) const
ProgramOperationPtr programOperation() const
TTAProgram::Move & move()
int resourceCount(const TTAMachine::MachinePart &mp) const
virtual bool hasOperationLowercase(const std::string &name) const
unsigned int instructionIndex(unsigned int) const
const ResourceMapper & resourceMapper() const
virtual const TTAMachine::MachinePart & machinePartOf(const SchedulingResource &r) const
ComponentType * item(int index) const
virtual HWOperation * operation(const std::string &name) const
SpecialRegisterPort * returnAddressPort() const
void insert(SchedulingResource &resource)
std::pair< bool, const TTAMachine::FunctionUnit * > findDstFUOfMove(const MoveNode &node, const TTAMachine::FunctionUnit *resFU, DataDependenceGraph::NodeSet &processedInputNodes) const
MoveNode & inputMove(int index) const
@ ANN_CONN_CANDIDATE_UNIT_DST
Dst. unit candidate.