SDF3Flow Class Reference
#include <flow.h>
Detailed Description
SDFG mapping to MP-SoC flow
Member Enumeration Documentation
enum SDF3Flow::FlowState |
- Enumerator:
Constructor & Destructor Documentation
SDF3Flow::SDF3Flow | ( | SDFflowType | type, | |
CNode * | xmlAppGraph, | |||
CNode * | xmlArchGraph, | |||
CNode * | xmlSystemUsage | |||
) |
SDF3Flow () Constructor.
References appGraph, createAppGraph(), createPlatformGraph(), minStorageDistributions, nocMapping, platformGraph, selectedStorageDistribution, selectedStorageDistributionSet, setSystemUsagePlatformGraph(), stateOfFlow, stepMode, and tileMapping.
SDF3Flow::~SDF3Flow | ( | ) |
~SDF3Flow () Destructor.
References appGraph, nocMapping, platformGraph, and tileMapping.
Member Function Documentation
void SDF3Flow::allocateTDMAtimeSlices | ( | ) | [private] |
allocateTDMAtimeSlices () Allocate TDMA time slices on the processors executing actors from the application.
References Binding::allocateTDMAtimeSlices(), FlowOptimizeStorageSpaceAllocations, FlowSelectStorageDist, logInfo(), setNextStateOfFlow(), and tileMapping.
Referenced by run().
void SDF3Flow::bindSDFGtoTiles | ( | ) | [private] |
bindSDFGtoTiles () Bind actor and channels of the SDFG to the tile resources.
References Binding::bindSDFGtoTiles(), FlowSelectStorageDist, FlowStaticOrderScheduleTiles, logInfo(), Binding::releaseResources(), setNextStateOfFlow(), and tileMapping.
Referenced by run().
void SDF3Flow::checkInputDesignFlow | ( | ) | [private] |
checkInputDesignFlow () The function checks that all required inputs are present and it initializes the used data-structures.
References FlowModelNonLocalMemory, getAppGraph(), getPlatformGraph(), NoCMapping::init(), logInfo(), nocMapping, Binding::setAppGraph(), Binding::setArchGraph(), setNextStateOfFlow(), tileMapping, xmlArchGraph, and xmlSystemUsage.
Referenced by run().
void SDF3Flow::computeStorageDistributions | ( | ) | [private] |
computeStorageDistributions () Compute trade-off space between storage space allocated to channels and maximal throughput of the application graph.
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), SDFstateSpaceBufferAnalysis::analyze(), bufferAnalysisAlgo, TimedSDFgraph::clone(), TimedSDFgraph::createChannel(), _StorageDistributionSet::distributions, TimedSDFactor::_Processor::execTime, SDFstateSpaceBufferAnalysis::findNextStorageDistributionSet(), FlowFailed, FlowSelectStorageDist, g, getAppGraph(), SDFstateSpaceBufferAnalysis::initSearch(), logError(), logInfo(), minStorageDistributions, _StorageDistributionSet::next, _StorageDistribution::next, SDFgraph::nrActors(), TimedSDFactor::processorsBegin(), TimedSDFactor::processorsEnd(), selectedStorageDistribution, selectedStorageDistributionSet, TimedSDFactor::setDefaultProcessor(), setNextStateOfFlow(), _StorageDistribution::sz, _StorageDistributionSet::sz, _StorageDistributionSet::thr, and TimedSDFactor::_Processor::type.
Referenced by run().
void SDF3Flow::constructStaticOrderScheduleTiles | ( | ) | [private] |
constructStaticOrderScheduleTiles () Constrauct static-order schedule for every tile to which actors are bound.
References Binding::constructStaticOrderScheduleTiles(), FlowAllocateTDMAtimeSlices, FlowFailed, logInfo(), setNextStateOfFlow(), and tileMapping.
Referenced by run().
TimedSDFgraph * SDF3Flow::createAppGraph | ( | CNode * | xmlAppGraph | ) | [private] |
createAppGraph () The function creates an timed SDFG according to the XML specification.
References CGetChildNode(), TimedSDFgraph::construct(), and g.
Referenced by SDF3Flow().
PlatformGraph * SDF3Flow::createPlatformGraph | ( | CNode * | xmlPlatformGraph | ) | [private] |
createPlatformGraph () The function creates a platform graph according to the XML specification.
References constructPlatformGraph().
Referenced by SDF3Flow().
CNode * SDF3Flow::createSDF3Node | ( | ) |
createSDF3Node () The function returns an sdf3 node that describes the current status of the mapping flow.
References NoCMapping::addUsageNode(), appGraph, CAddAttribute(), CAddNode(), CNewNode(), createApplicationGraphNode(), NoCMapping::createMappingNode(), createMappingNode(), NoCMapping::createNetworkNode(), createPlatformGraphNode(), createStorageDistributionsNode(), createSystemUsageNode(), NoCMapping::getMessages(), minStorageDistributions, nocMapping, and platformGraph.
Referenced by mapApplicationGraphToArchitectureGraph(), and outputMappingAsXML().
CNode * SDF3Flow::createStorageDistributionsNode | ( | StorageDistributionSet * | distributions | ) | [private] |
createStorageDistributionsNode () The function returns an XML node that describes the storage-space throughput trade-off points.
References appGraph, CAddAttribute(), CAddNode(), CNewNode(), SDFgraph::getChannel(), SDFcomponent::getName(), _StorageDistribution::next, SDFgraph::nrChannels(), and _StorageDistribution::sp.
Referenced by createSDF3Node().
void SDF3Flow::estimateBandwidthConstraints | ( | ) | [private] |
estimateBandwidthConstraints () Estimate the required minimal bandwidth when binding a channel to a connection.
References c, SDFgraph::channelsEnd(), FSMSADF::computeRepetitionVector(), FlowBindSDFGtoTile, getAppGraph(), SDFcomponent::getId(), TimedSDFchannel::getMinBandwidth(), SDFcomponent::getName(), SDFport::getRate(), SDFchannel::getSrcActor(), SDFchannel::getSrcPort(), TimedSDFchannel::getTokenSize(), logInfo(), logMsg(), selectedStorageDistribution, TimedSDFchannel::setMinBandwidth(), setNextStateOfFlow(), and _StorageDistribution::thr.
Referenced by run().
void SDF3Flow::estimateLatencyConstraints | ( | ) | [private] |
estimateLatencyConstraints () Estimate the minimal latency between the production and consumption of a token on a channel.
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), appGraph, c, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), FSMSADF::computeRepetitionVector(), TimedSDFactor::_Processor::execTime, findSimpleCycles(), FlowEstimateBandwidthConstraint, getAppGraph(), SDFchannel::getDstActor(), SDFchannel::getDstPort(), SDFcomponent::getId(), SDFchannel::getInitialTokens(), TimedSDFchannel::getMinLatency(), SDFcomponent::getName(), SDFport::getRate(), SDFchannel::getSrcActor(), logHasLevel(), logInfo(), logMsg(), modelBufferSizeInSDFgraph(), SDFgraph::nrActors(), TimedSDFactor::nrProcessors(), TimedSDFactor::processorsBegin(), TimedSDFactor::processorsEnd(), selectedStorageDistribution, TimedSDFchannel::setMinLatency(), setNextStateOfFlow(), and _StorageDistribution::thr.
Referenced by run().
void SDF3Flow::estimateStorageConstraints | ( | ) | [private] |
estimateStorageConstraints () Set the storage space constraints of the channels based on the selected storage distribution.
References c, SDFgraph::channelsEnd(), _StorageDistributionSet::distributions, TimedSDFchannel::_BufferSize::dst, FlowEstimateLatencyConstraint, getAppGraph(), SDFchannel::getDstPort(), getFlowType(), SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFcomponent::getName(), SDFport::getRate(), SDFchannel::getSrcPort(), logInfo(), logMsg(), TimedSDFchannel::_BufferSize::mem, minStorageDistributions, _StorageDistributionSet::next, SDFflowTypeMPFlow, selectedStorageDistribution, TimedSDFchannel::setBufferSize(), setNextStateOfFlow(), _StorageDistribution::sp, TimedSDFchannel::_BufferSize::src, TimedSDFchannel::_BufferSize::sz, and _StorageDistributionSet::thr.
Referenced by run().
void SDF3Flow::extractCommunicationConstraints | ( | ) | [private] |
extractCommunicationConstraints () Extract communication scheduling problem from the bound and scheduled application.
References NoCMapping::extractCommunicationConstraints(), FlowFailed, FlowScheduleCommunication, logInfo(), nocMapping, and setNextStateOfFlow().
Referenced by run().
TimedSDFgraph* SDF3Flow::getAppGraph | ( | ) | [inline, private] |
SDFflowType SDF3Flow::getFlowType | ( | ) | const [inline] |
References flowType.
Referenced by estimateStorageConstraints(), mapApplicationGraphToArchitectureGraph(), and optimizeStorageSpaceAllocations().
PlatformGraph* SDF3Flow::getPlatformGraph | ( | ) | [inline, private] |
References platformGraph.
Referenced by checkInputDesignFlow(), and outputMappingAsHTML().
FlowState SDF3Flow::getStateOfFlow | ( | ) | [inline, private] |
References stateOfFlow.
Referenced by run().
void SDF3Flow::handleUserInteraction | ( | ) | [private] |
handleUserInteraction () The function request the user for the next action to perform. Possible actions include continuing with the next step of the flow, completing the remaining flow or printing the current result of the flow to the terminal.
References c, outputMappingAsHTML(), outputMappingAsXML(), and setStepMode().
Referenced by run().
void SDF3Flow::modelNonLocalMemoryAccesses | ( | ) | [private] |
modelNonLocalMemoryAccesses () Model non-local memory accesses in the application graph.
References FlowComputeStorageDist, and setNextStateOfFlow().
Referenced by run().
void SDF3Flow::optimizeStorageSpaceAllocations | ( | ) | [private] |
optimizeStorageSpaceAllocations () Optimize the storage space allocations.
References FlowCompleted, FlowExtractCommunicationConstraints, FlowFailed, getFlowType(), logInfo(), Binding::optimizeStorageSpaceAllocations(), setNextStateOfFlow(), and tileMapping.
Referenced by run().
void SDF3Flow::outputMappingAsHTML | ( | ) |
outputMappingAsHTML () The function ouputs the mapping to a set of HTML pages.
References SDFconvertToHTML::convert(), getAppGraph(), getPlatformGraph(), NoCMapping::getSetOfNoCScheduleProblems(), nocMapping, SDFconvertToHTML::setPlatformGraph(), SDFconvertToHTML::setSDFgraph(), and SDFconvertToHTML::setSetOfNoCScheduleProblems().
Referenced by handleUserInteraction(), and mapApplicationGraphToArchitectureGraph().
void SDF3Flow::outputMappingAsXML | ( | ostream & | out | ) |
outputMappingAsXML () The function ouputs an sdf3 node to the supplied stream.
References CNewDoc(), createSDF3Node(), and CSaveFile().
Referenced by handleUserInteraction(), and mapApplicationGraphToArchitectureGraph().
SDF3Flow::FlowState SDF3Flow::run | ( | ) |
run () Execute the design flow. The function returns the last state reached by the design flow. Its value is equal to 'FlowCompleted' when all phases have been executed succesfully or else it is 'FlowFailed' which indicates that a step of the flow could not be completed succesfully.
References allocateTDMAtimeSlices(), bindSDFGtoTiles(), checkInputDesignFlow(), computeStorageDistributions(), constructStaticOrderScheduleTiles(), estimateBandwidthConstraints(), estimateLatencyConstraints(), estimateStorageConstraints(), extractCommunicationConstraints(), FlowAllocateTDMAtimeSlices, FlowBindSDFGtoTile, FlowCompleted, FlowComputeStorageDist, FlowEstimateBandwidthConstraint, FlowEstimateLatencyConstraint, FlowEstimateStorageDist, FlowExtractCommunicationConstraints, FlowFailed, FlowModelNonLocalMemory, FlowOptimizeStorageSpaceAllocations, FlowScheduleCommunication, FlowSelectStorageDist, FlowStart, FlowStaticOrderScheduleTiles, FlowUpdateBandwidthAllocations, getStateOfFlow(), getStepMode(), handleUserInteraction(), modelNonLocalMemoryAccesses(), optimizeStorageSpaceAllocations(), printTimer(), scheduleCommunication(), selectStorageDistribution(), startTimer(), stopTimer(), and updateBandwidthAllocations().
Referenced by mapApplicationGraphToArchitectureGraph().
void SDF3Flow::scheduleCommunication | ( | ) | [private] |
scheduleCommunication () The function tries to find a valid schedule function for the communication scheduling problem.
References FlowSelectStorageDist, FlowUpdateBandwidthAllocations, logInfo(), nocMapping, NoCMapping::scheduleCommunication(), and setNextStateOfFlow().
Referenced by run().
void SDF3Flow::selectStorageDistribution | ( | ) | [private] |
selectStorageDistribution () Select storage distribution from the trade-off space.
References bufferAnalysisAlgo, _StorageDistributionSet::distributions, SDFstateSpaceBufferAnalysis::findNextStorageDistributionSet(), FlowEstimateStorageDist, FlowFailed, getAppGraph(), TimedSDFgraph::getThroughputConstraint(), logError(), logInfo(), logMsg(), minStorageDistributions, _StorageDistribution::next, _StorageDistributionSet::next, SDFgraph::nrActors(), selectedStorageDistribution, selectedStorageDistributionSet, setNextStateOfFlow(), _StorageDistribution::sz, _StorageDistributionSet::sz, _StorageDistribution::thr, _StorageDistributionSet::thr, and CFraction::value().
Referenced by run().
void SDF3Flow::setNextStateOfFlow | ( | FlowState | s | ) | [inline, private] |
References stateOfFlow.
Referenced by allocateTDMAtimeSlices(), bindSDFGtoTiles(), checkInputDesignFlow(), computeStorageDistributions(), constructStaticOrderScheduleTiles(), estimateBandwidthConstraints(), estimateLatencyConstraints(), estimateStorageConstraints(), extractCommunicationConstraints(), modelNonLocalMemoryAccesses(), optimizeStorageSpaceAllocations(), scheduleCommunication(), selectStorageDistribution(), and updateBandwidthAllocations().
void SDF3Flow::setNoCMappingAlgo | ( | NoCMapping * | a | ) | [inline] |
References nocMapping.
Referenced by mapApplicationGraphToArchitectureGraph().
void SDF3Flow::setStepMode | ( | bool | flag | ) | [inline] |
References stepMode.
Referenced by handleUserInteraction(), and mapApplicationGraphToArchitectureGraph().
void SDF3Flow::setSystemUsagePlatformGraph | ( | PlatformGraph * | g, | |
CNode * | systemUsage | |||
) | [private] |
setSystemUsagePlatformGraph () The function sets the usage of the platform graph as specified in the XML specs.
References setUsagePlatformGraph().
Referenced by SDF3Flow().
void SDF3Flow::setTileMappingAlgo | ( | TileMapping * | a | ) | [inline] |
References tileMapping.
Referenced by mapApplicationGraphToArchitectureGraph().
void SDF3Flow::updateBandwidthAllocations | ( | ) | [private] |
updateBandwidthAllocations () The function computes the minimal amount of bandwidth needed on the NIs and it updates these allocations accordingly.
References FlowCompleted, FlowFailed, logInfo(), nocMapping, setNextStateOfFlow(), and NoCMapping::updateBandwidthAllocations().
Referenced by run().
Member Data Documentation
TimedSDFgraph* SDF3Flow::appGraph [private] |
Referenced by createSDF3Node(), createStorageDistributionsNode(), estimateLatencyConstraints(), getAppGraph(), SDF3Flow(), and ~SDF3Flow().
Referenced by computeStorageDistributions(), and selectStorageDistribution().
SDFflowType SDF3Flow::flowType [private] |
Referenced by getFlowType().
NoCMapping* SDF3Flow::nocMapping [private] |
PlatformGraph* SDF3Flow::platformGraph [private] |
Referenced by createSDF3Node(), getPlatformGraph(), SDF3Flow(), and ~SDF3Flow().
Referenced by computeStorageDistributions(), SDF3Flow(), and selectStorageDistribution().
FlowState SDF3Flow::stateOfFlow [private] |
Referenced by getStateOfFlow(), SDF3Flow(), and setNextStateOfFlow().
bool SDF3Flow::stepMode [private] |
Referenced by getStepMode(), SDF3Flow(), and setStepMode().
TileMapping* SDF3Flow::tileMapping [private] |
CNode* SDF3Flow::xmlAppGraph [private] |
CNode* SDF3Flow::xmlArchGraph [private] |
Referenced by checkInputDesignFlow().
CNode* SDF3Flow::xmlSystemUsage [private] |
Referenced by checkInputDesignFlow().
The documentation for this class was generated from the following files: