#include <DDFForwardScheduler.h>
|
| DDFForwardScheduler () |
|
| ~DDFForwardScheduler () |
|
void | deadlockIteration (int flag) |
|
int | run () |
|
void | setup () |
|
void | deadlockIteration (int flag) |
|
int | run () |
|
void | setup () |
|
const char * | domain () const |
|
void | resetFlag () |
|
void | setup () |
|
StringList | displaySchedule () |
|
double | getStopTime () |
|
void | resetStopTime (double v) |
|
int | run () |
|
void | setParams (int numOver, double pd, int maxbsize) |
|
void | setStopTime (double limit) |
|
void | setup () |
|
|
typedef std::deque
< DataFlowStar * > | DFStarList |
|
Performance optimized DDF Scheduler. The behaviour is derived from DDFSimpleSched. A iteration is defined as in DDFSimpleSched. The buffer overflow condition is slightly different from this scheduler.
- See Also
- DDFSimpleSched
- Author
- Andreas Franck $d$
- Version
- $v$
DDFForwardScheduler::DDFForwardScheduler |
( |
| ) |
|
DDFForwardScheduler::~DDFForwardScheduler |
( |
| ) |
|
Destructor, frees dynamic storage.
bool DDFForwardScheduler::classifyPredecessor |
( |
DataFlowStar * |
pS | ) |
|
|
protected |
Classify a star as Runnable, Not runnable or Deferred. This method is run after a star connected to an outport of pS was fired. In this special version of classifyStar, only the outports are classified anew.
- Returns
- true if successful.
bool DDFForwardScheduler::classifyStar |
( |
DataFlowStar * |
pS | ) |
|
|
protected |
Classify a star as Runnable, Not runnable or Deferred. This method is usually called in the setup method. At runtime, the following specialized methods are used.
- Returns
- true if succesful.
bool DDFForwardScheduler::classifySuccessor |
( |
DataFlowStar * |
pS | ) |
|
|
protected |
Classify a star as Runnable, Not runnable or Deferred. This method is run after a star connected to an inport of pS was fired. This is an optimized version of classifyStar, only the input portholes are tested.
- Returns
- false on error.
void DDFForwardScheduler::deadlockIteration |
( |
int |
flag | ) |
|
|
inline |
Turn on or off the feature where the scheduler runs in one iteration until it deadlocks.
- Parameters
-
runUntilDeadlock | FALSE for running a specified number of iterations, FALSE for running until a deadlock occurs. |
DataFlowStar * DDFForwardScheduler::findLeastDeferred |
( |
| ) |
|
|
protected |
Find the least deferred star. If there is no deferred star, the simulation is deadlocked.
- Warning
- This an expensive method, and it is assumed that it will not be called often.
- Returns
- Pointer to the least deferred star or NULL if nonen was found.
bool DDFForwardScheduler::initialClassify |
( |
| ) |
|
|
protected |
Classifies the stars before the simulation starts. The stars are classified as not runnable, deferred or runnable. The lists of runnable Stars are initialized and filled for the first time, the respective pointers are set for the first iteration (iteration #0).
- Returns
- false if an error occured
bool DDFForwardScheduler::isSource |
( |
const DataFlowStar & |
s | ) |
const |
|
protectedvirtual |
Determine if the star is a source. The definition used here follows DDFSimpleSched, where a source is a star without inputs.
- Warning
- This method overrides DDFSimpleSched::isSource() to make this method as const as possible.
- Parameters
-
s | The star in question return true if s is a source star. |
int DDFForwardScheduler::pragmaRegistered |
( |
DataFlowStar * |
as | ) |
|
|
protectedvirtual |
Check to see whether a firingsPerIteration pragma is registered for the star. If so, parse that pragma and store it in the star. Also, add a pointer to the star to the pragmaStars list if the value of the pragma is non-zero.
- Parameters
-
as | The star to be be parsed and possibly registered. |
- Returns
- FALSE on error.
Reimplemented from DDFSimpleSched.
int DDFForwardScheduler::run |
( |
| ) |
|
The run function.
- See Also
- Scheduler
int DDFForwardScheduler::runStar |
( |
DataFlowStar * |
pS | ) |
|
|
protected |
Fire the specified star. This method calls the derived Str::run() methos checks the overflow condition. Also sets the state of this and the connected stars and schedules them for invocation.
void DDFForwardScheduler::setup |
( |
| ) |
|
bool DDFForwardScheduler::setupStars |
( |
| ) |
|
|
protected |
Initialize the stars for simulation. This includes setting up the input and output caches of the stars and registering of the firingsPerIteration pragma. The input and output ports ports of every star are held in dynamically allocated arrays. This method has to be called in the setup() method and after a topology change, if supported.
- Returns
- true if successfull.
DFStarList* DDFForwardScheduler::mCurrentReadyStars |
|
protected |
Pointer to the currently used list of ready Stars
DFStarList DDFForwardScheduler::mEvenReadyStars |
|
protected |
List of runnable stars. There are to alternating lists, This holds the ready stars in even iterations.
DFStarList* DDFForwardScheduler::mNextReadyStars |
|
protected |
Pointer to the list of stars to be fired in the next iteration
DFStarList DDFForwardScheduler::mOddReadyStars |
|
protected |
List of runnable stars. There are to alternating lists, This holds the ready stars in odd iterations.
DFStarList DDFForwardScheduler::mPragmaStars |
|
protected |
List to hold the stars with a registered pragma. The pragmaStars list from DDFSimpleSched is not used due to performance problems.