Go to the documentation of this file.
51 node_(NULL), cycle_(0), currentBroker_(0), resourceFound_(
false),
52 lastTriedNode_(NULL), lastTriedCycle_(-1) {
91 msg <<
"already placed on different cycle, cur cycle: " << cycle;
110 for (
unsigned int i = 0; i <
assignments_.size(); i++) {
119 string msg =
"No applicable brokers found for assignment!";
132 string msg =
"No applicable brokers found for assignment!";
142 string msg =
"No applicable brokers found for assignment!";
154 string msg =
"Given broker not found!";
166 string msg =
"No applicable brokers found for assignment!";
181 string msg =
"No applicable brokers found for assignment!";
195 string msg =
"Tried to advance before a valid assignment was made!";
199 string msg =
"Advanced beyond last resource broker!";
220 string msg =
"Backtracked beyond first resource broker!";
279 std::pair<ResourceBroker*, SchedulingResource*>(
289 std::pair<ResourceBroker*, SchedulingResource*>(
295 debugLogRM(
"No applicable assignments at all:");
332 for (
size_t j = 0, i = 0; j <
brokers_.size(); j++) {
353 std::pair<ResourceBroker*, SchedulingResource*>& ca =
355 if (!ca.first->isAvailable(
356 *ca.second, node, cycle, bus, srcFU, dstFU, immWriteCycle,
357 immu, immRegIndex)) {
360 for (i--; i >= 0; i--) {
361 std::pair<ResourceBroker*, SchedulingResource*>& ca =
363 ca.first->unassign(node);
370 ca.first->assign(cycle, node, *ca.second, immWriteCycle, immRegIndex);
405 string msg =
"Node is not placed in a cycle.";
409 for (
unsigned int i = 0; i <
brokers_.size(); i++) {
437 if (index < 0 || index >=
static_cast<int>(
brokers_.size())) {
438 string msg =
"Broker index out of range.";
virtual bool isAlreadyAssigned(int cycle, const MoveNode &node, const TTAMachine::Bus *preassignedBus) const =0
const TTAMachine::FunctionUnit * srcFU_
bool tryCachedAssignment(MoveNode &node, int cycle, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex)
std::string toString() const
const TTAMachine::FunctionUnit * dstFU_
virtual ~AssignmentPlan()
int currentBroker_
Current broker.
const TTAMachine::Bus & bus() const
std::vector< std::pair< ResourceBroker *, SchedulingResource * > > lastTestedWorkingAssignment_
cache.
virtual bool isApplicable(const MoveNode &node, const TTAMachine::Bus *preassignedBus) const =0
ResourceBroker & broker()
void setRequest(int cycle, MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex)
ResourceBroker & lastBroker()
void insertBroker(ResourceBroker &broker)
const TTAMachine::ImmediateUnit * immu_
bool isTestedAssignmentPossible()
ResourceBroker & firstBroker()
MoveNode * node_
Move of current resource assignment request.
std::vector< PendingAssignment * > applicableAssignments_
Sequence of applicable pending assignments.
SchedulingResource & resource(int index)
ResourceBroker & currentBroker()
ResourceBroker & broker(int index) const
std::vector< PendingAssignment * > assignments_
Sequence of pending assignments.
int lastTriedAssignment() const
ResourceBroker & nextBroker(ResourceBroker &pos)
TTAProgram::Move & move()
void setCycle(const int newcycle)
MoveNode * lastTriedNode_
find Finds info of the inner loops in the false
std::vector< ResourceBroker * > brokers_
Sequence of resource brokers.
const TTAMachine::Bus * bus_
bool resourceFound_
True if a valid resource of current broker has been assigned.
int cycle_
Cycle in which current node should be placed.