Top Up Prev Next Bottom Contents Index Search

14.3 Class EGNode


Class EGNode is a node in an APEG, corresponding to an invocation of a DataFlowStar in the original SDF graph. The constructor has two arguments: the first argument is the pointer to the original Star of which it is an invocation, and the second argument represents the invocation number. The default value for the invocation number is 1. It has a virtual destructor that does nothing in this class.

An EGNode maintains three public lists of EGGates: ancestors, descendants, and hiddenGates .

14.3.1 Other EGNode public members

Invocations of the same DataFlowStar are linked together.

void setNextInvoc(EGNode* next); 
EGNode* getNextInvoc();
EGNode* getInvocation(int i);
void setInvocationNumber(int i);
int invocationNumber();
The first two methods sets and gets the next invocation EGNode. The third method searches through the linked list starting from the current EGNode to return the invocation with the argument invocation number. If the argument is less than the invocation number of the current EGNode, returns 0. The other methods sets and gets the invocation number of the current EGNode.

void deleteInvocChain(); 
Deletes all EGNodes linked together starting from the current EGNode. This method is usually called at the EGNode of the first invocation.

StringList printMe();
StringList printShort();
These methods print the name and the invocation number. In the first method, the ancestors and descendants lists are also printed.

DataFlowStar* myMaster(); 
Returns the original DataFlowStar of which the current EGNode is an invocation.

int root(); 
This method returns TRUE or FALSE, based on whether this node is a root of the APEG. A node is a root if it either has no ancestors, or if each arc in the ancestor list has enough delay on it.

EGGate* makeArc(EGNode* dest, int samples, int delay); 
Create a connection from this node to the first argument node. A pair of EGGates and an EGArc are allocated in this method. This EGNode is assumed to be the source of the connection.

void resetVisit(); 
void beingVisited();
int alreadyVisited();
The above methods manipulates a flag for traversal algorithms: resets to 0, sets to 1, or queries the flag.

void claimSticky();
int sticky();
These methods manipulates another flag to indicate that the invocations of the same DataFlowStar may not be scheduled into different processors since there is a strong interdependency between them. The first method sets the flag and the second queries the flag.

14.3.2 EGNodeList

Class EGNodeList is derived from class DoubleLinkList.

void append(EGNode* node); 
void insert(EGNode* node);
These methods appends or inserts the argument EGNode to the list.

EGNode* takeFromFront();
EGNode* headNode();
The above methods both returns the first EGNode in the list. The first method removes the node from the list while the second method does not.

There is a iterator class for the EGNodeList class, called EGNodeListIter. It returns the EGNodes.



Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.