FSMSADF::MemoryBinding Class Reference

#include <memory.h>

Inheritance diagram for FSMSADF::MemoryBinding:
Collaboration diagram for FSMSADF::MemoryBinding:

List of all members.

Classes

class  ActorBinding
class  ChannelBinding

Public Types

typedef list< ActorBindingActorBindings
typedef list< ChannelBindingChannelBindings

Public Member Functions

 MemoryBinding (GraphComponent c, Memory *m)
 ~MemoryBinding ()
MemoryBindingclone (GraphComponent c)
void constructFromXML (Scenario *s, const CNodePtr memoryNode)
void constructResourceUsageFromXML (const CNodePtr memoryNode)
void convertToXML (Scenario *s, const CNodePtr memoryNode)
void convertResourceUsageToXML (const CNodePtr memoryNode)
MemorygetMemory () const
GraphBindingConstraintsgetGraphBindingConstraints () const
map< Scenario *, ActorBindings > & getActorBindings ()
void setActorBindings (map< Scenario *, ActorBindings > &a)
bool addActorBinding (Scenario *s, Actor *a, const Actor::ProcessorType &t)
void removeActorBinding (Scenario *s, const Actor *a)
bool hasActorBinding (Scenario *s, const Actor *a) const
bool hasResourcesActorBinding (Scenario *s, const Actor *a, const Actor::ProcessorType &t) const
map< Scenario
*, ChannelBindings > & 
getChannelBindings ()
void setChannelBindings (map< Scenario *, ChannelBindings > &ch)
bool addChannelBinding (Scenario *s, Channel *c, BufferSize::Loc l)
void removeChannelBinding (Scenario *s, const Channel *c)
bool hasChannelBinding (Scenario *s, const Channel *c) const
bool hasResourcesChannelBinding (Scenario *s, const Channel *c, const BufferSize::Loc &l) const
TileBindinggetTileBinding () const
Size getAvailableMemorySize (Scenario *s) const
Size getAllocatedMemorySize (Scenario *s) const
Size getMemorySizeUsedForGraph () const
Size getMemorySizeUsedForOtherGraphs () const
void setMemorySizeUsedForOtherGraphs (Size sz)

Private Attributes

Memorymemory
map< Scenario *, ActorBindingsactorBindings
map< Scenario *, ChannelBindingschannelBindings
Size memorySizeUsedForOtherGraphs

Detailed Description

MemoryBinding Container for tile memory binding.


Member Typedef Documentation


Constructor & Destructor Documentation

FSMSADF::MemoryBinding::MemoryBinding ( GraphComponent  c,
Memory m 
)

MemoryBinding() Constructor.

Referenced by clone().

FSMSADF::MemoryBinding::~MemoryBinding (  ) 

~MemoryBinding() Destructor.


Member Function Documentation

bool FSMSADF::MemoryBinding::addActorBinding ( Scenario s,
Actor a,
const Actor::ProcessorType t 
)

addActorBinding() The function binds actor a in scenario s to this memory. The function returns true on success. Otherwise it returns false.

References actorBindings, hasActorBinding(), and hasResourcesActorBinding().

Referenced by FSMSADF::GraphBinding::bindActorToTile(), FSMSADF::bindThreadToTile(), and constructFromXML().

Here is the call graph for this function:

bool FSMSADF::MemoryBinding::addChannelBinding ( Scenario s,
Channel c,
BufferSize::Loc  l 
)

addChannelBinding() The function binds channel c in scenario s to this memory. The function returns true on success. Otherwise it returns false.

References channelBindings, hasChannelBinding(), and hasResourcesChannelBinding().

Referenced by FSMSADF::GraphBinding::bindChannelToConnection(), FSMSADF::GraphBinding::bindChannelToTile(), and constructFromXML().

Here is the call graph for this function:

MemoryBinding * FSMSADF::MemoryBinding::clone ( GraphComponent  c  ) 

clone() Create a cloned copy of this memory binding.

References getActorBindings(), getChannelBindings(), getMemory(), getMemorySizeUsedForOtherGraphs(), MemoryBinding(), setActorBindings(), setChannelBindings(), and setMemorySizeUsedForOtherGraphs().

Referenced by FSMSADF::TileBinding::clone().

Here is the call graph for this function:

void FSMSADF::MemoryBinding::constructFromXML ( Scenario s,
const CNodePtr  memoryNode 
)
void FSMSADF::MemoryBinding::constructResourceUsageFromXML ( const CNodePtr  memoryNode  ) 

constructResourceUsageFromXML() This function sets the resource usgae of the memoru.

References CGetAttribute(), CHasAttribute(), and setMemorySizeUsedForOtherGraphs().

Referenced by FSMSADF::TileBinding::constructResourceUsageFromXML().

Here is the call graph for this function:

void FSMSADF::MemoryBinding::convertResourceUsageToXML ( const CNodePtr  memoryNode  ) 

convertResourceUsageToXML() This function converts the resource usage of this memory binding to an XML object.

References CAddAttribute(), getMemorySizeUsedForGraph(), getMemorySizeUsedForOtherGraphs(), and FSMSADF::GraphComponent::getName().

Here is the call graph for this function:

void FSMSADF::MemoryBinding::convertToXML ( Scenario s,
const CNodePtr  memoryNode 
)

convertToXML() This function converts the memory binding to an XML object.

References actorBindings, FSMSADF::BufferSize::asString(), CAddAttribute(), CAddNode(), channelBindings, and FSMSADF::GraphComponent::getName().

Here is the call graph for this function:

map<Scenario*, ActorBindings>& FSMSADF::MemoryBinding::getActorBindings (  )  [inline]
Size FSMSADF::MemoryBinding::getAllocatedMemorySize ( Scenario s  )  const
Size FSMSADF::MemoryBinding::getAvailableMemorySize ( Scenario s  )  const

getAvailableMemorySize() The function returns the amount of memory which is available in this memory in scenario s.

References getAllocatedMemorySize(), FSMSADF::Memory::getSize(), memory, and memorySizeUsedForOtherGraphs.

Referenced by hasResourcesActorBinding(), and hasResourcesChannelBinding().

Here is the call graph for this function:

map<Scenario*, ChannelBindings>& FSMSADF::MemoryBinding::getChannelBindings (  )  [inline]
GraphBindingConstraints * FSMSADF::MemoryBinding::getGraphBindingConstraints (  )  const

getGraphBindingConstraints() Get the graph binding constraints associated with this binding.

References FSMSADF::PlatformBinding::getGraphBindingConstraints(), FSMSADF::TileBinding::getPlatformBinding(), and getTileBinding().

Referenced by getAllocatedMemorySize(), and hasResourcesChannelBinding().

Here is the call graph for this function:

Size FSMSADF::MemoryBinding::getMemorySizeUsedForGraph (  )  const

getMemorySizeUsedForGraph() The function returns the maximal amount of memory which has been allocated to the application in any of its scenarios.

References g, getAllocatedMemorySize(), FSMSADF::PlatformBinding::getApplicationGraph(), FSMSADF::TileBinding::getPlatformBinding(), FSMSADF::Graph::getScenarios(), getTileBinding(), and MAX.

Referenced by FSMSADF::GraphBinding::computeParetoQuantities(), convertResourceUsageToXML(), and FSMSADF::OutputHTML::printPlatformBinding().

Here is the call graph for this function:

Size FSMSADF::MemoryBinding::getMemorySizeUsedForOtherGraphs (  )  const [inline]
TileBinding* FSMSADF::MemoryBinding::getTileBinding (  )  const [inline]

References FSMSADF::GraphComponent::getParent().

Referenced by getGraphBindingConstraints(), and getMemorySizeUsedForGraph().

Here is the call graph for this function:

bool FSMSADF::MemoryBinding::hasActorBinding ( Scenario s,
const Actor a 
) const

hasActorBinding() The function returns true when a binding of actor a in scenario s to this memory exists. Otherwise it returns false.

References actorBindings.

Referenced by addActorBinding(), and FSMSADF::OutputHTML::printPlatformBinding().

bool FSMSADF::MemoryBinding::hasChannelBinding ( Scenario s,
const Channel c 
) const

hasChannelBinding() The function returns true when a binding of channel c in scenario s to this memory exists. Otherwise it returns false.

References channelBindings.

Referenced by addChannelBinding(), and FSMSADF::OutputHTML::printPlatformBinding().

bool FSMSADF::MemoryBinding::hasResourcesActorBinding ( Scenario s,
const Actor a,
const Actor::ProcessorType t 
) const

hasResourcesActorBinding() The function checks whether there are sufficient resources available to bind actor a to this memory when the actor will be mapped to the specified processor type.

References getAvailableMemorySize(), FSMSADF::Actor::getStateSizeOfScenario(), and FSMSADF::Actor::ProcessorType::type.

Referenced by addActorBinding().

Here is the call graph for this function:

bool FSMSADF::MemoryBinding::hasResourcesChannelBinding ( Scenario s,
const Channel c,
const BufferSize::Loc l 
) const

hasResourcesChannelBinding() The function checks whether there are sufficient resources available to bind channel c to this memory.

References getAvailableMemorySize(), FSMSADF::ChannelBindingConstraints::getBufferSize(), FSMSADF::ScenarioBindingConstraints::getConstraintsOfChannel(), FSMSADF::GraphBindingConstraints::getConstraintsOfScenario(), and getGraphBindingConstraints().

Referenced by addChannelBinding().

Here is the call graph for this function:

void FSMSADF::MemoryBinding::removeActorBinding ( Scenario s,
const Actor a 
)

removeActorBinding() The function removes the binding of actor a in scenario s to this memory.

References actorBindings.

Referenced by FSMSADF::GraphBinding::bindActorToTile(), FSMSADF::GraphBinding::removeActorToTileBinding(), and FSMSADF::unbindThreadToTile().

void FSMSADF::MemoryBinding::removeChannelBinding ( Scenario s,
const Channel c 
)

removeChannelBinding() The function removes the binding of channel c in scenario s to this memory.

References channelBindings.

Referenced by FSMSADF::GraphBinding::bindChannelToConnection(), and FSMSADF::GraphBinding::removeChannelBinding().

void FSMSADF::MemoryBinding::setActorBindings ( map< Scenario *, ActorBindings > &  a  )  [inline]

References actorBindings.

Referenced by clone().

void FSMSADF::MemoryBinding::setChannelBindings ( map< Scenario *, ChannelBindings > &  ch  )  [inline]

References channelBindings.

Referenced by clone().

void FSMSADF::MemoryBinding::setMemorySizeUsedForOtherGraphs ( Size  sz  )  [inline]

Member Data Documentation


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