34#include <boost/format.hpp>
58 std::string name,
ResourceBroker& fub,
unsigned int initiationInterval):
60 inputFUBroker_(fub), busBroker_(NULL) {
89 string msg =
"Broker not capable of assigning resources to node!";
112 for (
int i = 0; i < rf.
portCount(); i++) {
115 if (inputSocket != NULL) {
191 if (res != NULL && res->
isInUse(cycle) &&
236 string msg =
"Broker not capable of assigning resources to node!";
241 string msg =
"Broker does not contain given resource.";
251 for (
int i = 0; i < socket.
portCount(); i++) {
257 port = socket.
port(i);
264 "Broker does not have necessary Port registered!");
273 std::pair<const MoveNode*, SchedulingResource*>(&node,&res));
300 "InputPSocketBroker: assigned resource changed!";
320 for (
int i = 0; i < navi.
count(); i++) {
344 for (ResourceMap::iterator resIter =
resMap_.begin();
345 resIter !=
resMap_.end(); resIter++) {
348 dynamic_cast<const Socket*
>((*resIter).first);
352 "Broker does not have necessary Socket registered!");
356 for (
int i = 0; i < socket->
portCount(); i++) {
375 std::string msg =
"InputPSocketBroker: finding ";
376 msg +=
" resource for Segment ";
377 msg +=
" failed with error: ";
#define abortWithError(message)
std::string errorMessageStack(bool messagesOnly=false) const
TTAProgram::Move & move()
void addResource(const TTAMachine::MachinePart &mp, SchedulingResource *res)
MoveResMap assignedResources_
SchedulingResource * resourceOf(const TTAMachine::MachinePart &mp) const
unsigned int instructionIndex(unsigned int) const
bool hasResource(const SchedulingResource &r) const
void setResourceMapper(const ResourceMapper &mapper)
unsigned int initiationInterval_
virtual const TTAMachine::MachinePart & machinePartOf(const SchedulingResource &r) const
void insert(SchedulingResource &resource)
virtual void unassign(const int cycle, MoveNode &node)=0
virtual bool canAssign(const int cycle, const MoveNode &node) const =0
virtual void addToRelatedGroup(const int group, SchedulingResource &resource)
virtual void assign(const int cycle, MoveNode &node)=0
virtual bool isInUse(const int cycle) const =0
virtual RFPort * port(const std::string &name) const
virtual TCEString name() const
ComponentType * item(int index) const
virtual SocketNavigator socketNavigator() const
Unit * parentUnit() const
virtual Socket * inputSocket() const
@ INPUT
Data goes from bus to port.
Direction direction() const
Port * port(int index) const
Segment * segment(int index) const
virtual int portCount() const
Terminal & destination() const
void setDestination(Terminal *dst)
virtual int index() const
virtual bool isGPR() const
virtual const TTAMachine::Port & port() const
virtual const TTAMachine::RegisterFile & registerFile() const
virtual bool isFUPort() const