#include <graph.h>

Inheritance diagram for CSDFgraph:
Collaboration diagram for CSDFgraph:

List of all members.

Public Types

typedef std::vector< int > RepetitionVector
typedef RepetitionVector::iterator RepetitonVectorIter
typedef
RepetitionVector::const_iterator 
RepetitonVectorCIter

Public Member Functions

 CSDFgraph (CSDFcomponent &c)
virtual ~CSDFgraph ()
virtual CSDFgraphcreate (CSDFcomponent &c) const
virtual CSDFgraphcreateCopy (CSDFcomponent &c) const
virtual CSDFgraphclone (CSDFcomponent &c) const
void construct (const CNodePtr graphNode)
CString getType () const
void setType (const CString &t)
CSDFactorgetActor (const CId id)
CSDFactorgetActor (const CString &name)
CSDFactorsgetActors ()
uint nrActors () const
CSDFactorsIter actorsBegin ()
CSDFactorsIter actorsEnd ()
CSDFactorsCIter actorsBegin () const
CSDFactorsCIter actorsEnd () const
void addActor (CSDFactor *a)
void removeActor (const CString &name)
virtual CSDFactorcreateActor ()
virtual CSDFactorcreateActor (CSDFcomponent &c)
CSDFchannelgetChannel (const CId id)
CSDFchannelgetChannel (const CString &name)
CSDFchannelsgetChannels ()
uint nrChannels () const
CSDFchannelsIter channelsBegin ()
CSDFchannelsIter channelsEnd ()
CSDFchannelsCIter channelsBegin () const
CSDFchannelsCIter channelsEnd () const
void addChannel (CSDFchannel *c)
void removeChannel (const CString &name)
virtual CSDFchannelcreateChannel (CSDFcomponent &c)
CSDFchannelcreateChannel (CSDFactor *src, CSDFrate rateSrc, CSDFactor *dst, CSDFrate rateDst)
bool isConnected () const
bool isConsistent ()
virtual RepetitionVector getRepetitionVector ()
ostream & print (ostream &out)

Private Member Functions

void calcFractionsConnectedActors (CFractions &fractions, CSDFactor *a, uint ratePeriod)
RepetitionVector calcRepetitionVector (CFractions &fractions, uint ratePeriod)

Private Attributes

CString type
CSDFactors actors
CSDFchannels channels

Friends

ostream & operator<< (ostream &out, CSDFgraph &g)

Detailed Description

CSDFgraph Container for CSDF graph.


Member Typedef Documentation

typedef std::vector<int> CSDFgraph::RepetitionVector
typedef RepetitionVector::const_iterator CSDFgraph::RepetitonVectorCIter
typedef RepetitionVector::iterator CSDFgraph::RepetitonVectorIter

Constructor & Destructor Documentation

CSDFgraph::CSDFgraph ( CSDFcomponent c  ) 

CSDFgraph () Constructor.

Referenced by clone(), create(), and createCopy().

CSDFgraph::~CSDFgraph (  )  [virtual]

~CSDFgraph () Destructor.

References a, actors, c, and channels.


Member Function Documentation

CSDFactorsCIter CSDFgraph::actorsBegin (  )  const [inline]

References actors.

CSDFactorsCIter CSDFgraph::actorsEnd (  )  const [inline]

References actors.

void CSDFgraph::addActor ( CSDFactor a  ) 
void CSDFgraph::addChannel ( CSDFchannel c  ) 
void CSDFgraph::calcFractionsConnectedActors ( CFractions fractions,
CSDFactor a,
uint  ratePeriod 
) [private]

calcFractionsConnectedActors () The function calculates and firing ration (as fractions) of all actors connected to actor 'a' based on its firing rate. In case of an inconsistent graph, all fractions are set to 0.

References c, CSDFport::getActor(), CSDFport::getChannel(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFchannel::oppositePort(), CSDFactor::portsBegin(), CSDFactor::portsEnd(), and CSequence< T >::size().

Referenced by getRepetitionVector().

Here is the call graph for this function:

CSDFgraph::RepetitionVector CSDFgraph::calcRepetitionVector ( CFractions fractions,
uint  ratePeriod 
) [private]

References CFraction::denominator(), g, gcd(), and lcm().

Referenced by getRepetitionVector().

Here is the call graph for this function:

CSDFchannelsCIter CSDFgraph::channelsBegin (  )  const [inline]

References channels.

CSDFchannelsCIter CSDFgraph::channelsEnd (  )  const [inline]

References channels.

CSDFgraph * CSDFgraph::clone ( CSDFcomponent c  )  const [virtual]

clone () The function returns a pointer to a newly allocated CSDF graph object. All properties, actors and channels of the graph are cloned.

Reimplemented in TimedCSDFgraph.

References a, actors, addActor(), addChannel(), channels, component, CSDFcomponent::CSDFcomponent(), CSDFgraph(), g, CSDFcomponent::getName(), getType(), nrActors(), nrChannels(), CSDFcomponent::setName(), and setType().

Referenced by componentToCSDFgraph().

Here is the call graph for this function:

void CSDFgraph::construct ( const CNodePtr  graphNode  ) 

construct () The function initializes all actor properties based on the XML data.

References CGetAttribute(), CHasAttribute(), g, CSDFcomponent::setName(), and setType().

Referenced by constructCSDFgraph(), and constructTimedCSDFgraphStructure().

Here is the call graph for this function:

CSDFgraph * CSDFgraph::create ( CSDFcomponent c  )  const [virtual]

create () The function returns a pointer to a newly allocated CSDF graph object.

Reimplemented in TimedCSDFgraph.

References CSDFgraph().

Here is the call graph for this function:

CSDFactor * CSDFgraph::createActor (  )  [virtual]

createActor () Create a new actor on the graph.

Reimplemented in TimedCSDFgraph.

References a, addActor(), c, CSDFcomponent::CSDFcomponent(), nrActors(), and CSDFcomponent::setName().

Here is the call graph for this function:

CSDFactor * CSDFgraph::createActor ( CSDFcomponent c  )  [virtual]

createActor () Create a new actor on the graph.

Reimplemented in TimedCSDFgraph.

References a, and addActor().

Here is the call graph for this function:

CSDFchannel * CSDFgraph::createChannel ( CSDFcomponent c  )  [virtual]

createChannel () Create a new channel on the graph.

Reimplemented in TimedCSDFgraph.

References addChannel().

Referenced by createChannel().

Here is the call graph for this function:

CSDFchannel * CSDFgraph::createChannel ( CSDFactor src,
CSDFrate  rateSrc,
CSDFactor dst,
CSDFrate  rateDst 
)

createChannel () The function creates a channel between the source and destination actor. Ports with the supplied rates are added to these actors.

Reimplemented in TimedCSDFgraph.

References c, CSDFchannel::connectDst(), CSDFchannel::connectSrc(), createChannel(), CSDFactor::createPort(), CSDFcomponent::CSDFcomponent(), nrChannels(), CSDFactor::nrPorts(), and CSDFcomponent::setName().

Here is the call graph for this function:

CSDFgraph * CSDFgraph::createCopy ( CSDFcomponent c  )  const [virtual]

createCopy () The function returns a pointer to a newly allocated CSDF graph object. All properties of the graph are copied.

Reimplemented in TimedCSDFgraph.

References CSDFgraph(), g, CSDFcomponent::getName(), getType(), CSDFcomponent::setName(), and setType().

Here is the call graph for this function:

CSDFactor * CSDFgraph::getActor ( const CString name  ) 

getActor () The function returns a reference to an actor with the given name.

References a, actors, and CSDFcomponent::getName().

Here is the call graph for this function:

CSDFactor * CSDFgraph::getActor ( const CId  id  ) 

getActor () The function returns a reference to an actor with the given id.

References a, actors, CSDFcomponent::getId(), and CSDFcomponent::getName().

Referenced by addCSDFchannelToGraph(), analyzeCSDFG(), CSDFchannel::clone(), TimedCSDFchannel::clone(), CSDFchannel::construct(), constructTimedCSDFgraph(), getComponents(), and treeVisitChildren().

Here is the call graph for this function:

CSDFactors& CSDFgraph::getActors (  )  [inline]

References actors.

Referenced by dfs().

CSDFchannel * CSDFgraph::getChannel ( const CId  id  ) 

getChannel () The function returns a reference to a channel with the given id.

References c, channels, CSDFcomponent::getId(), and CSDFcomponent::getName().

Referenced by analyzeCSDFG(), constructTimedCSDFgraph(), and CSDFstateSpaceBufferAnalysis::exploreStorageDistribution().

Here is the call graph for this function:

CSDFchannel * CSDFgraph::getChannel ( const CString name  ) 

getChannel () The function returns a reference to a channel with the given name.

References c, channels, and CSDFcomponent::getName().

Here is the call graph for this function:

CSDFchannels& CSDFgraph::getChannels (  )  [inline]

References channels.

CString CSDFgraph::getType (  )  const [inline]
bool CSDFgraph::isConnected (  )  const

isConnected () The function returns true if all actor ports are connected to a channel and all channels are connected to a port. Else it returns false.

References a, actors, c, channels, CSDFchannel::isConnected(), and CSDFactor::isConnected().

Here is the call graph for this function:

bool CSDFgraph::isConsistent (  ) 

isConsistent () The function returns true if the graph is consistent (i.e. the repetition vector is non-zero). Else, it returns false.

References getRepetitionVector().

Referenced by analyzeCSDFG().

Here is the call graph for this function:

ostream & CSDFgraph::print ( ostream &  out  ) 

print () Print the graph to the supplied output stream.

Reimplemented in TimedCSDFgraph.

References a, actors, c, channels, CSDFcomponent::getId(), CSDFcomponent::getName(), getType(), CSDFchannel::print(), and CSDFactor::print().

Here is the call graph for this function:

void CSDFgraph::removeActor ( const CString name  ) 

removeActor () Remove an actor from a graph.

References a, actors, and CSDFcomponent::getName().

Here is the call graph for this function:

void CSDFgraph::removeChannel ( const CString name  ) 

removeChannel () Remove a channel from a graph.

References c, channels, and CSDFcomponent::getName().

Here is the call graph for this function:

void CSDFgraph::setType ( const CString t  )  [inline]

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
CSDFgraph g 
) [friend]

Member Data Documentation

Referenced by getType(), and setType().


The documentation for this class was generated from the following files: