SDFstateSpaceBufferAnalysis Class Reference
#include <buffer.h>
Detailed Description
Throughput / storage-space trade-off exploration Analyze the trade-offs between storage distributions and throughput (using auto-concurrency). The search ends as soon as the throughput bound (thrBound) is reached. To find the complete pareto-space, the throughput bound should be set to DOUBLE_MAX.
Constructor & Destructor Documentation
SDFstateSpaceBufferAnalysis::SDFstateSpaceBufferAnalysis | ( | ) | [inline] |
SDFstateSpaceBufferAnalysis::~SDFstateSpaceBufferAnalysis | ( | ) | [inline] |
Member Function Documentation
bool SDFstateSpaceBufferAnalysis::addStorageDistributionToChecklist | ( | StorageDistribution * | d | ) | [private] |
addStorageDistributionToChecklist () The function add the storage distribution 'd' to the list of storage distributions which must still be checked. This list is ordered wrt to the size of the storage distribution. A storage distribution is only added if it is not already contained in the list. When the distribution is added to the list, the function returns 'true', else the function returns 'false'.
References ASSERT, c, _StorageDistributionSet::distributions, g, minStorageDistributions, _StorageDistribution::next, _StorageDistributionSet::next, SDFgraph::nrChannels(), _StorageDistribution::prev, _StorageDistributionSet::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistributionSet::sz, and _StorageDistributionSet::thr.
Referenced by exploreStorageDistribution(), findMinimalStorageDistributions(), and initSearch().
StorageDistributionSet * SDFstateSpaceBufferAnalysis::analyze | ( | TimedSDFgraph * | gr, | |
const double | thrBound = DBL_MAX | |||
) |
analyze () Analyze the trade-offs between storage distributions and throughput (using auto-concurrency). The search ends as soon as the throughput bound (thrBound) is reached. To find the complete pareto-space, the throughput bound should be set to DOUBLE_MAX.
References findMinimalStorageDistributions(), g, initBoundsSearchSpace(), minStorageDistributions, minSz, minSzStep, and transitionSystem.
Referenced by analyzeSDFG(), FSMSADF::MemoryDimAlgo::computeStorageDist(), SDF3Flow::computeStorageDistributions(), randomChannelBufferSizes(), and transformGraph().
void SDFstateSpaceBufferAnalysis::deleteStorageDistribution | ( | StorageDistribution * | d | ) | [private] |
deleteStorageDistribution () Deallocate memory for a storage distribution.
References _StorageDistribution::dep, and _StorageDistribution::sp.
Referenced by exploreStorageDistribution(), findMinimalStorageDistributions(), findNextStorageDistributionSet(), and minimizeStorageDistributionsSet().
void SDFstateSpaceBufferAnalysis::execStorageDistribution | ( | StorageDistribution * | d | ) | [private] |
execStorageDistribution () Compute throughput and storage dependencies of the given storage distribution.
References c, _StorageDistribution::dep, SDFstateSpaceBufferAnalysis::TransitionSystem::execSDFgraph(), g, SDFgraph::nrChannels(), _StorageDistribution::sp, _StorageDistribution::thr, and transitionSystem.
Referenced by exploreStorageDistribution().
void SDFstateSpaceBufferAnalysis::exploreStorageDistribution | ( | StorageDistributionSet * | ds, | |
StorageDistribution * | d | |||
) | [private] |
exploreStorageDistribution () The function computes the throughput of the storage distribution 'd' and adds new storage distributions to the list of distributions which must be checked based on the storage dependencies found in d. The function also updates the maximal throughput of the set of storage distributions when needed.
References addStorageDistributionToChecklist(), c, deleteStorageDistribution(), _StorageDistribution::dep, execStorageDistribution(), g, SDFgraph::getChannel(), SDFchannel::getDstActor(), SDFcomponent::getId(), SDFchannel::getSrcActor(), minSzStep, newStorageDistribution(), _StorageDistribution::next, SDFgraph::nrChannels(), _StorageDistribution::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistributionSet::thr, and _StorageDistribution::thr.
Referenced by exploreStorageDistributionSet().
void SDFstateSpaceBufferAnalysis::exploreStorageDistributionSet | ( | StorageDistributionSet * | ds | ) | [private] |
exploreStorageDistributionSet () Explore all distributions within the set and remove all non-minimal distributions from it.
References _StorageDistributionSet::distributions, exploreStorageDistribution(), minimizeStorageDistributionsSet(), and _StorageDistribution::next.
Referenced by findMinimalStorageDistributions(), and findNextStorageDistributionSet().
void SDFstateSpaceBufferAnalysis::findMinimalStorageDistributions | ( | const double | thrBound | ) | [private] |
findMinimalStorageDistributions () Explore the throughput/storage-size trade-off space till either all minimal storage distributions are found or the throughput bound is reached.
References addStorageDistributionToChecklist(), c, deleteStorageDistribution(), _StorageDistributionSet::distributions, exploreStorageDistributionSet(), g, lbDistributionSz, maxThroughput, minStorageDistributions, minSz, newStorageDistribution(), _StorageDistributionSet::next, _StorageDistribution::next, SDFgraph::nrChannels(), _StorageDistributionSet::prev, _StorageDistribution::prev, _StorageDistribution::sp, _StorageDistributionSet::sz, _StorageDistribution::sz, _StorageDistributionSet::thr, and _StorageDistribution::thr.
Referenced by analyze().
StorageDistributionSet * SDFstateSpaceBufferAnalysis::findNextStorageDistributionSet | ( | ) |
findNextStorageDistributionSet () Analyze the trade-offs between storage distributions and throughput (using auto-concurrency). The search ends as soon as a new pareto point has been found in the space or when the full space has been explored. The function returns the newly discovered storage distribution set or NULL when no new set was found.
References c, deleteStorageDistribution(), _StorageDistributionSet::distributions, exploreStorageDistributionSet(), g, lastExploredStorageDistributionSet, maxThroughput, minStorageDistributions, _StorageDistribution::next, _StorageDistributionSet::next, SDFgraph::nrChannels(), _StorageDistributionSet::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistributionSet::sz, and _StorageDistributionSet::thr.
Referenced by SDF3Flow::computeStorageDistributions(), and SDF3Flow::selectStorageDistribution().
void SDFstateSpaceBufferAnalysis::initBoundsSearchSpace | ( | TimedSDFgraph * | g | ) | [private] |
initBoundsSearchSpace () Compute bounds on the trade-off space that must be explored.
References initLbDistributionSz(), initMaxThroughput(), initMinimalChannelSz(), and initMinimalChannelSzStep().
Referenced by analyze(), and initSearch().
void SDFstateSpaceBufferAnalysis::initLbDistributionSz | ( | TimedSDFgraph * | g | ) | [private] |
initLbDistributionSz () Compute lower bound on the buffer size needed for positive throughput
References c, lbDistributionSz, minSz, and SDFgraph::nrChannels().
Referenced by initBoundsSearchSpace().
void SDFstateSpaceBufferAnalysis::initMaxThroughput | ( | TimedSDFgraph * | g | ) | [private] |
initMaxThroughput () Compute the maximal throughput that can be achieved by the graph.
References SDFstateSpaceThroughputAnalysis::analyze(), and maxThroughput.
Referenced by initBoundsSearchSpace().
void SDFstateSpaceBufferAnalysis::initMinimalChannelSz | ( | TimedSDFgraph * | g | ) | [private] |
initMinimalChannelSz () Compute lower bound on the buffer size needed for positive throughput
References c, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), gcd(), SDFchannel::getDstActor(), SDFchannel::getDstPort(), SDFcomponent::getId(), SDFchannel::getInitialTokens(), SDFport::getRate(), SDFchannel::getSrcActor(), SDFchannel::getSrcPort(), minSz, and SDFgraph::nrChannels().
Referenced by initBoundsSearchSpace().
void SDFstateSpaceBufferAnalysis::initMinimalChannelSzStep | ( | TimedSDFgraph * | g | ) | [private] |
initMinimalChannelSzStep () Compute lower bound on the step size of channels
References c, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), gcd(), SDFchannel::getDstPort(), SDFcomponent::getId(), SDFport::getRate(), SDFchannel::getSrcPort(), minSzStep, and SDFgraph::nrChannels().
Referenced by initBoundsSearchSpace().
void SDFstateSpaceBufferAnalysis::initSearch | ( | TimedSDFgraph * | gr | ) |
initSearch () Initialize the storage distribution search algorithm.
References addStorageDistributionToChecklist(), c, g, initBoundsSearchSpace(), lastExploredStorageDistributionSet, lbDistributionSz, minStorageDistributions, minSz, newStorageDistribution(), _StorageDistribution::next, SDFgraph::nrChannels(), _StorageDistribution::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistribution::thr, and transitionSystem.
Referenced by SDF3Flow::computeStorageDistributions().
void SDFstateSpaceBufferAnalysis::minimizeStorageDistributionsSet | ( | StorageDistributionSet * | ds | ) | [private] |
minimizeMinStorageDistributions () The function removes all storage distributions within the supplied set of storage distributions which are non-minimal. All storage distributions within the set should have the same size.
References deleteStorageDistribution(), _StorageDistributionSet::distributions, _StorageDistribution::next, _StorageDistribution::prev, _StorageDistributionSet::prev, _StorageDistribution::thr, and _StorageDistributionSet::thr.
Referenced by exploreStorageDistributionSet().
StorageDistribution * SDFstateSpaceBufferAnalysis::newStorageDistribution | ( | ) | [private] |
newStorageDistribution () Allocate memory for a new storage distribution.
References _StorageDistribution::dep, g, SDFgraph::nrChannels(), and _StorageDistribution::sp.
Referenced by exploreStorageDistribution(), findMinimalStorageDistributions(), and initSearch().
Member Data Documentation
TimedSDFgraph* SDFstateSpaceBufferAnalysis::g [private] |
Referenced by findNextStorageDistributionSet(), and initSearch().
Referenced by findMinimalStorageDistributions(), initLbDistributionSz(), and initSearch().
Referenced by findMinimalStorageDistributions(), findNextStorageDistributionSet(), and initMaxThroughput().
TBufSize* SDFstateSpaceBufferAnalysis::minSz [private] |
Referenced by analyze(), findMinimalStorageDistributions(), initLbDistributionSz(), initMinimalChannelSz(), and initSearch().
TBufSize* SDFstateSpaceBufferAnalysis::minSzStep [private] |
Referenced by analyze(), exploreStorageDistribution(), and initMinimalChannelSzStep().
Referenced by analyze(), execStorageDistribution(), and initSearch().
The documentation for this class was generated from the following files: