OpenASIP 2.2
Loading...
Searching...
No Matches
DesignSpaceExplorer.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file DesignSpaceExplorer.hh
26 *
27 * Declaration of DesignSpaceExplorer class.
28 *
29 * @author Jari Mäntyneva 2006 (jari.mantyneva-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_DESIGN_SPACE_EXPLORER_HH
34#define TTA_DESIGN_SPACE_EXPLORER_HH
35
36#include <set>
37#include <vector>
38#include <istream>
39#include "Application.hh"
40#include "Exception.hh"
41#include "SimulatorConstants.hh"
42#include "PluginTools.hh"
43#include "Estimator.hh"
44#include "DSDBManager.hh"
45#include "TestApplication.hh"
46#include "BaseLineReader.hh"
47
48class CostEstimates;
49class ExecutionTrace;
51
52namespace TTAMachine {
53 class Machine;
54}
55
56namespace TTAProgram {
57 class Program;
58}
59
60namespace IDF {
61 class MachineImplementation;
62}
63
64/**
65 * Design space explorer interface provides methods to automatically evaluate
66 * machine configurations and select best implementations to the processor
67 * components according the test applications set in Design Space Database
68 * (DSDB).
69 */
71public:
73 virtual ~DesignSpaceExplorer();
74
75 virtual void setDSDB(DSDBManager& dsdb);
76
77 virtual bool evaluate(
78 const DSDBManager::MachineConfiguration& configuration,
79 CostEstimates& results=dummyEstimate_, bool estimate=false);
80
81 virtual DSDBManager& db();
83 const std::string& pluginName, DSDBManager* dsdb = NULL);
84
85 std::vector<DesignSpaceExplorerPlugin*> getPlugins();
86
89 const double& frequency = 0.0,
90 const double& maxArea = 0.0,
91 const bool& createEstimates = true,
92 const std::string& icDec = "DefaultICDecoder",
93 const std::string& icDecHDB = "asic_130nm_1.5V.hdb");
97 const double& frequency = 0.0,
98 const double& maxArea = 0.0,
99 const bool& createEstimates = true,
100 const std::string& icDec = "DefaultICDecoder",
101 const std::string& icDecHDB = "asic_130nm_1.5V.hdb");
103 const TTAMachine::Machine& mach,
104 const double& frequency = 0.0,
105 const double& maxArea = 0.0,
106 const std::string& icDec = "DefaultICDecoder",
107 const std::string& icDecHDB = "asic_130nm_1.5V.hdb") const;
109 const TTAMachine::Machine& mach,
112 CostEstimator::DelayInNanoSeconds& longestPathDelay);
115
116protected:
118 const std::string applicationFile,
120 TCEString paramOptions = "-O3");
121
124 const TestApplication& testApplication,
125 const ClockCycleCount& maxCycles, ClockCycleCount& runnedCycles,
126 const bool tracing, const bool useCompiledSimulation = false,
127 std::vector<ClockCycleCount>* executionCounts = NULL);
128
129private:
130 /// Design space database where results are stored.
132 /// The plugin tool.
134 /// The estimator frontend.
136 /// Output stream.
137 std::ostringstream* oStream_;
138 /// Used for the default evaluate() argument.
140
141};
142
143#endif
int RowID
Type definition of row ID in relational databases.
Definition DBTypes.hh:37
TTAMachine::Machine * machine
the architecture definition of the estimated processor
find Finds info of the inner loops in the program
CycleCount ClockCycleCount
Alias for ClockCycleCount.
RowID createImplementationAndStore(const DSDBManager::MachineConfiguration &conf, const double &frequency=0.0, const double &maxArea=0.0, const bool &createEstimates=true, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb")
DSDBManager * dsdb_
Design space database where results are stored.
RowID addConfToDSDB(const DSDBManager::MachineConfiguration &conf)
virtual void setDSDB(DSDBManager &dsdb)
IDF::MachineImplementation * selectComponents(const TTAMachine::Machine &mach, const double &frequency=0.0, const double &maxArea=0.0, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb") const
const ExecutionTrace * simulate(const TTAProgram::Program &program, const TTAMachine::Machine &machine, const TestApplication &testApplication, const ClockCycleCount &maxCycles, ClockCycleCount &runnedCycles, const bool tracing, const bool useCompiledSimulation=false, std::vector< ClockCycleCount > *executionCounts=NULL)
std::vector< DesignSpaceExplorerPlugin * > getPlugins()
void createEstimateData(const TTAMachine::Machine &mach, const IDF::MachineImplementation &idf, CostEstimator::AreaInGates &area, CostEstimator::DelayInNanoSeconds &longestPathDelay)
bool createImplementation(const DSDBManager::MachineConfiguration &conf, DSDBManager::MachineConfiguration &newConf, const double &frequency=0.0, const double &maxArea=0.0, const bool &createEstimates=true, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb")
static CostEstimates dummyEstimate_
Used for the default evaluate() argument.
CostEstimator::Estimator estimator_
The estimator frontend.
virtual DSDBManager & db()
static DesignSpaceExplorerPlugin * loadExplorerPlugin(const std::string &pluginName, DSDBManager *dsdb=NULL)
virtual bool evaluate(const DSDBManager::MachineConfiguration &configuration, CostEstimates &results=dummyEstimate_, bool estimate=false)
TTAProgram::Program * schedule(const std::string applicationFile, TTAMachine::Machine &machine, TCEString paramOptions="-O3")
static PluginTools pluginTool_
The plugin tool.
std::ostringstream * oStream_
Output stream.
double AreaInGates
type for area values in equivalent gates
double DelayInNanoSeconds
type for propagation delays in nano seconds