ancestors
or descendants
based on the direction of connection.
EGGate(EGNode* parent, PortHole* pPort);Is a constructor. The first argument is the EGNode that this EGGate belongs to, and the second argument is the corresponding porthole of the original SDF graph.
const PortHole* aliasedPort();The above methods returns the corresponding porthole of the original SDF graph, the name of the porthole.
const char* name() const;
int isItInput();Returns TRUE or FALSE based on whether the corresponding porthole is an input or not.
void allocateArc(EGGate* dest, int no_samples, int no_delay);The method creates a connection between this EGGate and the first argument by allocating an arc with information from the second and the third arguments. It should be called once per connection.
int samples();These methods call the corresponding methods of the EGArc class if an arc was already allocated by
int delay();
void addSamples(int increments);
allocateArc.
EGGate* farGate();The above methods query information about the other side of the connection: EGGate, EGNode, the original DataFlowStar that the EGNode points to, and the invocation number of the EGNode.
EGNode* farEndNode();
DataFlowStar* farEndMaster();
int farEndInvocation();
StringList printMe();It prints the information of the arc allocated: the sample rate and the initial delay.
void setProperty(PortHole* pPort, int index);This method sets the pointer to the corresponding porthole of the original SDF graph and the index of the EGGate. Since multiple EGGates in an EGNode may be mapped to the same porthole in the original SDF graph, we order the EGGates by indices.
void setLink(EGGateLink* p);Since the list of EGGates is maintained as a derived class of DoubleLinkList, an EGGate is assigned an EGGateLink that is derived from the DoubleLink class. These methods set and get the assigned EGGateLink.
EGGateLink* getLink();
void hideMe(int flag);If the initial delay is greater than or equal to the sample rate in an EGArc, the precedence relationship between the source and the destination of the arc disappears while not removing the arc from the APEG. This method removes this EGGate from the access list of EGGates (
ancestors
or descendants
), and stores it in the list of hidden EGGates (hiddenGates)
of the parent EGNode . If the argument flag is NULL, it calls the same method for the EGGate of the other side of connection. By default, the flag is NULL.
virtual ~EGGate();Is a virtual destructor that deletes the allocated arc, removes itself from the list of EGGates.
The following ordering is maintained in the precedence list: entries for the same far-end EGNode occur together (one after another), and they occur in order of increasing invocation number. Entries for the same invocation occur in increasing order of the number of delays on the arc.
EGGateLink(EGGate* e);The constructor has an argument for an EGGate.
EGGate* gate();These methods return the corresponding EGGate and the next link in the parent list.
EGGateLink* nextLink();
void removeMeFromList();Removes this link from the parent list.
void initialize();This method deletes all EGGates in the list and initialize the list. It is called inside the destructor.
DoubleLink* createLink(EGGate* e);Creates an EGGateLink for the argument EGGate.
void insertGate(EGGate* e, int update);This method insert a new EGGate into the proper position in the precedence list. The update parameter indicates whether or not to update the arc data if an EGGate with the same far-end EGNode and delay, already exists. If
update
is 0, the argument EGGate will be deleted if redundant. If 1, the arc information of the existing EGGate will be updated (sample rate will be increased). When we insert an EGGate to the descendants
list of the parent EGNode, we set update
to be 1. If the EGGate will be added to the ancestors,
the variable is set 0.
StringList printMe();Prints the list of EGGates.
farEndMaster
that is different from the argument DataFlowStar.
EGGate* nextMaster(DataFlowStar* master);