CSDFstateSpaceBufferAnalysis 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
CSDFstateSpaceBufferAnalysis::CSDFstateSpaceBufferAnalysis | ( | ) | [inline] |
CSDFstateSpaceBufferAnalysis::~CSDFstateSpaceBufferAnalysis | ( | ) | [inline] |
Member Function Documentation
bool CSDFstateSpaceBufferAnalysis::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, CSDFgraph::nrChannels(), _StorageDistribution::prev, _StorageDistributionSet::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistributionSet::sz, and _StorageDistributionSet::thr.
Referenced by exploreStorageDistribution(), findMinimalStorageDistributions(), and initSearch().
StorageDistributionSet * CSDFstateSpaceBufferAnalysis::analyze | ( | TimedCSDFgraph * | 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 analyzeCSDFG().
StorageDistributionSet * CSDFstateSpaceBufferAnalysis::approximate | ( | TimedCSDFgraph * | gr, | |
const double | thr, | |||
const double | maxPercentageOverEstimation | |||
) |
approximate () The function uses an approximation technique to find a storage distribution (set) that has a throughput equal or larger then 'thr' and that has an over estimation of the total storage-space that is less then or equal to the percentage given by 'maxPercentageOverEstimation'.
void CSDFstateSpaceBufferAnalysis::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 CSDFstateSpaceBufferAnalysis::execStorageDistribution | ( | StorageDistribution * | d | ) | [private] |
execStorageDistribution () Compute throughput and storage dependencies of the given storage distribution.
References c, _StorageDistribution::dep, CSDFstateSpaceBufferAnalysis::TransitionSystem::execCSDFgraph(), g, CSDFgraph::nrChannels(), _StorageDistribution::sp, _StorageDistribution::thr, and transitionSystem.
Referenced by exploreStorageDistribution().
void CSDFstateSpaceBufferAnalysis::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, CSDFgraph::getChannel(), CSDFchannel::getDstActor(), CSDFcomponent::getId(), CSDFchannel::getSrcActor(), minSzStep, newStorageDistribution(), _StorageDistribution::next, CSDFgraph::nrChannels(), _StorageDistribution::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistributionSet::thr, and _StorageDistribution::thr.
Referenced by exploreStorageDistributionSet().
void CSDFstateSpaceBufferAnalysis::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 CSDFstateSpaceBufferAnalysis::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, CSDFgraph::nrChannels(), _StorageDistributionSet::prev, _StorageDistribution::prev, _StorageDistribution::sp, _StorageDistributionSet::sz, _StorageDistribution::sz, _StorageDistributionSet::thr, and _StorageDistribution::thr.
Referenced by analyze().
StorageDistributionSet * CSDFstateSpaceBufferAnalysis::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, CSDFgraph::nrChannels(), _StorageDistributionSet::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistributionSet::sz, and _StorageDistributionSet::thr.
void CSDFstateSpaceBufferAnalysis::initBoundsSearchSpace | ( | TimedCSDFgraph * | 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 CSDFstateSpaceBufferAnalysis::initLbDistributionSz | ( | TimedCSDFgraph * | g | ) | [private] |
initLbDistributionSz () Compute lower bound on the buffer size needed for positive throughput
References c, lbDistributionSz, minSz, and CSDFgraph::nrChannels().
Referenced by initBoundsSearchSpace().
void CSDFstateSpaceBufferAnalysis::initMaxThroughput | ( | TimedCSDFgraph * | g | ) | [private] |
initMaxThroughput () Compute the maximal throughput that can be achieved by the graph.
References CSDFstateSpaceThroughputAnalysis::analyze(), and maxThroughput.
Referenced by initBoundsSearchSpace().
void CSDFstateSpaceBufferAnalysis::initMinimalChannelSz | ( | TimedCSDFgraph * | g | ) | [private] |
initMinimalChannelSz () Compute lower bound on the buffer size needed for positive throughput
References c, CSDFgraph::channelsBegin(), CSDFgraph::channelsEnd(), gcd(), CSDFchannel::getDstActor(), CSDFchannel::getDstPort(), CSDFcomponent::getId(), CSDFchannel::getInitialTokens(), CSDFport::getRate(), CSDFchannel::getSrcActor(), CSDFchannel::getSrcPort(), minSz, CSDFgraph::nrChannels(), and CSequence< T >::size().
Referenced by initBoundsSearchSpace().
void CSDFstateSpaceBufferAnalysis::initMinimalChannelSzStep | ( | TimedCSDFgraph * | g | ) | [private] |
initMinimalChannelSzStep () Compute lower bound on the step size of channels
References CSDFgraph::channelsBegin(), CSDFgraph::channelsEnd(), gcd(), CSDFchannel::getDstPort(), CSDFcomponent::getId(), CSDFport::getRate(), CSDFchannel::getSrcPort(), minSzStep, CSDFgraph::nrChannels(), and CSequence< T >::size().
Referenced by initBoundsSearchSpace().
void CSDFstateSpaceBufferAnalysis::initSearch | ( | TimedCSDFgraph * | gr | ) |
initSearch () Initialize the storage distribution search algorithm.
References addStorageDistributionToChecklist(), c, g, initBoundsSearchSpace(), lastExploredStorageDistributionSet, lbDistributionSz, minStorageDistributions, minSz, newStorageDistribution(), _StorageDistribution::next, CSDFgraph::nrChannels(), _StorageDistribution::prev, _StorageDistribution::sp, _StorageDistribution::sz, _StorageDistribution::thr, and transitionSystem.
void CSDFstateSpaceBufferAnalysis::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 * CSDFstateSpaceBufferAnalysis::newStorageDistribution | ( | ) | [private] |
newStorageDistribution () Allocate memory for a new storage distribution.
References _StorageDistribution::dep, g, CSDFgraph::nrChannels(), and _StorageDistribution::sp.
Referenced by exploreStorageDistribution(), findMinimalStorageDistributions(), and initSearch().
Member Data Documentation
TimedCSDFgraph* CSDFstateSpaceBufferAnalysis::g [private] |
TBufSize* CSDFstateSpaceBufferAnalysis::lastChStep [private] |
Referenced by findNextStorageDistributionSet(), and initSearch().
Referenced by findMinimalStorageDistributions(), initLbDistributionSz(), and initSearch().
Referenced by findMinimalStorageDistributions(), findNextStorageDistributionSet(), and initMaxThroughput().
TBufSize* CSDFstateSpaceBufferAnalysis::minSz [private] |
Referenced by analyze(), findMinimalStorageDistributions(), initLbDistributionSz(), initMinimalChannelSz(), and initSearch().
TBufSize* CSDFstateSpaceBufferAnalysis::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: