FSMSADF::MemoryBinding Class Reference
#include <memory.h>
Detailed Description
MemoryBinding Container for tile memory binding.
Member Typedef Documentation
typedef list<ActorBinding> FSMSADF::MemoryBinding::ActorBindings |
typedef list<ChannelBinding> FSMSADF::MemoryBinding::ChannelBindings |
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().
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().
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().
constructFromXML() This function creates the memory binding as specified by the connectionNode.
References a, addActorBinding(), addChannelBinding(), FSMSADF::BufferSize::asLoc(), c, CGetAttribute(), CGetChildNode(), CHasAttribute(), CNextNode(), FSMSADF::ScenarioGraph::getActor(), FSMSADF::ScenarioGraph::getChannel(), FSMSADF::Actor::getProcessorType(), and FSMSADF::Scenario::getScenarioGraph().
Referenced by FSMSADF::TileBinding::constructFromXML().
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().
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().
convertToXML() This function converts the memory binding to an XML object.
References actorBindings, FSMSADF::BufferSize::asString(), CAddAttribute(), CAddNode(), channelBindings, and FSMSADF::GraphComponent::getName().
map<Scenario*, ActorBindings>& FSMSADF::MemoryBinding::getActorBindings | ( | ) | [inline] |
References actorBindings.
Referenced by clone(), and FSMSADF::GraphBinding::extractApplicationBindingFromPlatformBinding().
getAllocatedMemorySize() The function returns the amount of memory which has been allocated to the application in scenario s.
References a, actorBindings, c, channelBindings, FSMSADF::ChannelBindingConstraints::getBufferSize(), FSMSADF::ScenarioBindingConstraints::getConstraintsOfChannel(), FSMSADF::GraphBindingConstraints::getConstraintsOfScenario(), getGraphBindingConstraints(), FSMSADF::Actor::getStateSizeOfScenario(), and MAX.
Referenced by getAvailableMemorySize(), getMemorySizeUsedForGraph(), and FSMSADF::OutputHTML::printPlatformBinding().
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().
map<Scenario*, ChannelBindings>& FSMSADF::MemoryBinding::getChannelBindings | ( | ) | [inline] |
References channelBindings.
Referenced by clone(), and FSMSADF::GraphBinding::extractApplicationBindingFromPlatformBinding().
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().
Memory* FSMSADF::MemoryBinding::getMemory | ( | ) | const [inline] |
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().
Size FSMSADF::MemoryBinding::getMemorySizeUsedForOtherGraphs | ( | ) | const [inline] |
References memorySizeUsedForOtherGraphs.
Referenced by clone(), and convertResourceUsageToXML().
TileBinding* FSMSADF::MemoryBinding::getTileBinding | ( | ) | const [inline] |
References FSMSADF::GraphComponent::getParent().
Referenced by getGraphBindingConstraints(), and getMemorySizeUsedForGraph().
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().
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().
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().
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().
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] |
Referenced by clone(), and constructResourceUsageFromXML().
Member Data Documentation
map<Scenario*, ActorBindings> FSMSADF::MemoryBinding::actorBindings [private] |
map<Scenario*, ChannelBindings> FSMSADF::MemoryBinding::channelBindings [private] |
Memory* FSMSADF::MemoryBinding::memory [private] |
Referenced by getAvailableMemorySize(), and getMemory().
Referenced by getAvailableMemorySize(), and getMemorySizeUsedForOtherGraphs().
The documentation for this class was generated from the following files: