OpenASIP  2.0
FUCostEstimationPlugin.cc
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 FUCostEstimationPlugin.cc
26  *
27  * Implementation of FUCostEstimationPlugin class
28  *
29  * @author Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)
30  *
31  * @note rating: red
32  */
33 
35 
36 namespace CostEstimator {
37 
38 /**
39  * Constructor.
40  *
41  * @param name The name of the created plugin in HDB.
42  * @param data The HDB the plugin's data is stored in.
43  */
45  const std::string& name) :
46  CostEstimationPlugin(name) {
47 }
48 
49 /**
50  * Destructor.
51  */
53 }
54 
55 /**
56  * Estimates the area of the given function unit.
57  *
58  * @param architecture The FU architecture of which area to estimate.
59  * @param implementation (The location of) the implementation of FU. Can be
60  * an instance of NullFUImplementationLocation.
61  * @param area The variable to store the area estimate into.
62  * @return True only if area could be estimated successfully.
63  */
64 bool
68  AreaInGates&,
69  HDB::HDBManager&) {
70 
71  return false;
72 }
73 
74 /**
75  * Estimates the energy consumed by the given function unit when running
76  * the given program.
77  *
78  * @param architecture The FU architecture of which area to estimate.
79  * @param implementation (The location of) the implementation of FU. Can be
80  * an instance of NullFUImplementationLocation.
81  * @param program The program of which energy to calculate.
82  * @param traceDB The simulation trace database of the program running in the
83  * target architecture.
84  * @param energy The variable to store the energy estimate into.
85  * @return True only if energy could be estimated successfully.
86  */
87 bool
91  const TTAProgram::Program&,
92  const ExecutionTrace&,
94  HDB::HDBManager&) {
95 
96  return false;
97 }
98 
99 /**
100  * Estimates the input delay of the given function unit port.
101  *
102  * @param port The FU port of which input delay to estimate.
103  * @param implementation (The location of) the implementation of FU. Can be
104  * an instance of NullFUImplementationLocation.
105  * @param inputDelay The variable to store the delay estimate into.
106  * @return True only if input delay could be estimated successfully.
107  */
108 bool
110  const TTAMachine::FUPort&,
113  HDB::HDBManager&) {
114 
115  return false;
116 }
117 
118 /**
119  * Estimates the output delay of the given function unit port.
120  *
121  * @param port The FU port of which output delay to estimate.
122  * @param implementation (The location of) the implementation of FU. Can be
123  * an instance of NullFUImplementationLocation.
124  * @param outputDelay The variable to store the delay estimate into.
125  * @return True only if output delay could be estimated successfully.
126  */
127 bool
129  const TTAMachine::FUPort&,
132  HDB::HDBManager&) {
133 
134  return false;
135 }
136 
137 /**
138  * Estimates the maximum computation delay of the given function unit.
139  *
140  * The maximum computation delay is the longest stage in the FU unit's
141  * pipeline. It's used mainly for calculating the maximum clock frequency
142  * of target architecture.
143  *
144  * @param architecture The FU architecture of which area to estimate.
145  * @param implementation (The location of) the implementation of FU. Can be
146  * an instance of NullFUImplementationLocation.
147  * @param computationDelay The variable to store the delay estimate into.
148  * @return True only if computation delay could be estimated successfully.
149  */
150 bool
155  HDB::HDBManager&) {
156 
157  return false;
158 }
159 
160 }
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
TTAProgram::Program
Definition: Program.hh:63
CostEstimator::FUCostEstimationPlugin::estimatePortReadDelay
virtual bool estimatePortReadDelay(const TTAMachine::FUPort &port, const IDF::FUImplementationLocation &implementation, DelayInNanoSeconds &outputDelay, HDB::HDBManager &hdb)
Definition: FUCostEstimationPlugin.cc:128
CostEstimator::AreaInGates
double AreaInGates
type for area values in equivalent gates
Definition: CostEstimatorTypes.hh:35
FUCostEstimationPlugin.hh
CostEstimator::EnergyInMilliJoules
double EnergyInMilliJoules
type for consumed energy in milli joules
Definition: CostEstimatorTypes.hh:37
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
TTAMachine::FUPort
Definition: FUPort.hh:46
ExecutionTrace
Definition: ExecutionTrace.hh:56
CostEstimator::FUCostEstimationPlugin::FUCostEstimationPlugin
FUCostEstimationPlugin(const std::string &name)
Definition: FUCostEstimationPlugin.cc:44
CostEstimator::FUCostEstimationPlugin::~FUCostEstimationPlugin
virtual ~FUCostEstimationPlugin()
Definition: FUCostEstimationPlugin.cc:52
HDB::HDBManager
Definition: HDBManager.hh:82
CostEstimator::CostEstimationPlugin
Definition: CostEstimationPlugin.hh:45
CostEstimator::FUCostEstimationPlugin::estimateEnergy
virtual bool estimateEnergy(const TTAMachine::FunctionUnit &architecture, const IDF::FUImplementationLocation &implementation, const TTAProgram::Program &program, const ExecutionTrace &traceDB, EnergyInMilliJoules &energy, HDB::HDBManager &hdb)
Definition: FUCostEstimationPlugin.cc:88
CostEstimator::DelayInNanoSeconds
double DelayInNanoSeconds
type for propagation delays in nano seconds
Definition: CostEstimatorTypes.hh:39
CostEstimator::FUCostEstimationPlugin::estimateArea
virtual bool estimateArea(const TTAMachine::FunctionUnit &architecture, const IDF::FUImplementationLocation &implementation, AreaInGates &area, HDB::HDBManager &hdb)
Definition: FUCostEstimationPlugin.cc:65
CostEstimator::FUCostEstimationPlugin::estimatePortWriteDelay
virtual bool estimatePortWriteDelay(const TTAMachine::FUPort &port, const IDF::FUImplementationLocation &implementation, DelayInNanoSeconds &inputDelay, HDB::HDBManager &hdb)
Definition: FUCostEstimationPlugin.cc:109
CostEstimator
Definition: CostEstimationPlugin.cc:36
CostEstimator::FUCostEstimationPlugin::estimateMaximumComputationDelay
virtual bool estimateMaximumComputationDelay(const TTAMachine::FunctionUnit &architecture, const IDF::FUImplementationLocation &implementation, DelayInNanoSeconds &computationDelay, HDB::HDBManager &hdb)
Definition: FUCostEstimationPlugin.cc:151