RandomNoCScheduler Class Reference
#include <random.h>
Public Member Functions | |
RandomNoCScheduler (const CSize maxDetour, const uint maxNrRipups, const uint maxNrTries) | |
~RandomNoCScheduler () | |
bool | solve () |
Private Member Functions | |
bool | random (const CSize maxDetour, const uint maxNrRipups, const uint maxNrTries) |
void | putMessagesInRandomOrder () |
void | putRoutesInRandomOrder (Routes &routes) |
bool | findScheduleEntityForMessageUsingRandom (Message *m, const CSize maxDetour) |
Private Attributes | |
CSize | maxDetour |
uint | maxNrRipups |
uint | maxNrTries |
Detailed Description
RandomNoCScheduler () Random NoC scheduling algorithm
Constructor & Destructor Documentation
RandomNoCScheduler::RandomNoCScheduler | ( | const CSize | maxDetour, | |
const uint | maxNrRipups, | |||
const uint | maxNrTries | |||
) | [inline] |
RandomNoCScheduler::~RandomNoCScheduler | ( | ) | [inline] |
Member Function Documentation
bool RandomNoCScheduler::findScheduleEntityForMessageUsingRandom | ( | Message * | m, | |
const CSize | maxDetour | |||
) | [private] |
findScheduleEntityForMessageUsingRandom () The function tries to find a schedule entity for the message. For this it uses random choices on the start time, duration and route. On success it returns true and allocates the entity on the NoC. Else it returns false and no resources are claimed.
References NoCScheduler::earliestStartTime(), NoCScheduler::findAllRoutes(), NoCScheduler::findSlotsOnRoute(), Message::getDstNodeId(), NoCSchedulingEntity::getDuration(), NoCScheduler::getInterconnectGraph(), NoCScheduler::getLengthShortestPathBetweenNodes(), InterconnectGraph::getNode(), InterconnectGraph::getSlotTablePeriod(), InterconnectGraph::getSlotTableSize(), Message::getSrcNodeId(), NoCSchedulingEntity::getStartTime(), Route::length(), NoCScheduler::maximalDuration(), NoCScheduler::minimalDuration(), putRoutesInRandomOrder(), MTRand::randInt(), NoCScheduler::reserveResources(), NoCSchedulingEntity::setDuration(), NoCSchedulingEntity::setRoute(), Message::setSchedulingEntity(), NoCSchedulingEntity::setSlotReservations(), and NoCSchedulingEntity::setStartTime().
Referenced by random().
void RandomNoCScheduler::putMessagesInRandomOrder | ( | ) | [private] |
putMessagesInRandomOrder () The function puts all messages in a random order by first assigning a random cost to each messages and then sorting them using this cost.
References NoCScheduleProblem::getMessages(), NoCScheduler::getSchedulingProblem(), NoCScheduler::messagesBegin(), NoCScheduler::messagesEnd(), MTRand::rand(), and Message::setCost().
Referenced by random().
void RandomNoCScheduler::putRoutesInRandomOrder | ( | Routes & | routes | ) | [private] |
putRoutesInRandomOrder () The function puts all routes in a random order by first assigning a random cost to each route and then sorting them using this cost.
References MTRand::rand(), and Route::setCost().
Referenced by findScheduleEntityForMessageUsingRandom().
bool RandomNoCScheduler::random | ( | const CSize | maxDetour, | |
const uint | maxNrRipups, | |||
const uint | maxNrTries | |||
) | [private] |
random () Random-based NoC scheduling algorithm
References findScheduleEntityForMessageUsingRandom(), Message::getSchedulingEntity(), NoCScheduler::messagesBegin(), NoCScheduler::messagesEnd(), putMessagesInRandomOrder(), NoCScheduler::releaseResources(), and NoCScheduler::ripupScheduleEntity().
Referenced by solve().
bool RandomNoCScheduler::solve | ( | ) | [inline, virtual] |
Implements NoCScheduler.
References NoCScheduler::getSchedulingProblem(), maxDetour, maxNrRipups, maxNrTries, random(), and NoCScheduleProblem::setSolvedFlag().
Member Data Documentation
CSize RandomNoCScheduler::maxDetour [private] |
Referenced by solve().
uint RandomNoCScheduler::maxNrRipups [private] |
Referenced by solve().
uint RandomNoCScheduler::maxNrTries [private] |
Referenced by solve().
The documentation for this class was generated from the following files: