OpenASIP  2.0
RFCostEstimationPlugin.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 RFCostEstimationPlugin.cc
26  *
27  * Implementation of RFCostEstimationPlugin 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 RF.
57  *
58  * @param architecture The RF architecture of which area to estimate.
59  * @param implementation (The location of) the implementation of RF.
60  * @param area The variable to store the area estimate into.
61  * @return True only if area could be estimated successfully.
62  */
63 bool
67  AreaInGates&,
68  HDB::HDBManager&) {
69 
70  return false;
71 }
72 
73 /**
74  * Estimates the energy consumed by the given RF when running the given
75  * program.
76  *
77  * @param architecture The RF architecture of which area to estimate.
78  * @param implementation (The location of) the implementation of RF. Can be
79  * an instance of NullFUImplementationLocation.
80  * @param program The program of which energy to calculate.
81  * @param traceDB The simulation trace database of the program running in the
82  * target architecture which can be used in the estimation
83  * algorithm.
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 RF port.
101  *
102  * @param port The RF port of which input delay to estimate.
103  * @param implementation (The location of) the implementation of RF.
104  * @param inputDelay The variable to store the delay estimate into.
105  * @return True only if input delay could be estimated successfully.
106  */
107 bool
109  const TTAMachine::RFPort&,
112  HDB::HDBManager&) {
113 
114  return false;
115 }
116 
117 /**
118  * Estimates the output delay of the given RF port.
119  *
120  * @param port The RF port of which output delay to estimate.
121  * @param implementation (The location of) the implementation of RF.
122  * @param outputDelay The variable to store the delay estimate into.
123  * @return True only if output delay could be estimated successfully.
124  */
125 bool
127  const TTAMachine::RFPort&,
130  HDB::HDBManager&) {
131 
132  return false;
133 }
134 
135 /**
136  * Estimates the maximum "computation delay" of the given RF.
137  *
138  * The maximum computation delay is the longest stage in the RF's
139  * execution. It's used mainly for calculating the maximum clock frequency
140  * of target architecture.
141  *
142  * @param architecture The RF architecture of which area to estimate.
143  * @param implementation (The location of) the implementation of RF. Can be
144  * an instance of NullRFImplementationLocation.
145  * @param computationDelay The variable to store the delay estimate into.
146  * @return True only if computation delay could be estimated successfully.
147  */
148 bool
153  HDB::HDBManager&) {
154 
155  return false;
156 }
157 
158 }
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
TTAProgram::Program
Definition: Program.hh:63
CostEstimator::RFCostEstimationPlugin::~RFCostEstimationPlugin
virtual ~RFCostEstimationPlugin()
Definition: RFCostEstimationPlugin.cc:52
CostEstimator::AreaInGates
double AreaInGates
type for area values in equivalent gates
Definition: CostEstimatorTypes.hh:35
TTAMachine::RFPort
Definition: RFPort.hh:45
CostEstimator::EnergyInMilliJoules
double EnergyInMilliJoules
type for consumed energy in milli joules
Definition: CostEstimatorTypes.hh:37
CostEstimator::RFCostEstimationPlugin::estimatePortReadDelay
virtual bool estimatePortReadDelay(const TTAMachine::RFPort &port, const IDF::RFImplementationLocation &implementation, DelayInNanoSeconds &outputDelay, HDB::HDBManager &hdb)
Definition: RFCostEstimationPlugin.cc:126
TTAMachine::BaseRegisterFile
Definition: BaseRegisterFile.hh:48
CostEstimator::RFCostEstimationPlugin::estimateArea
virtual bool estimateArea(const TTAMachine::BaseRegisterFile &architecture, const IDF::RFImplementationLocation &implementation, AreaInGates &area, HDB::HDBManager &hdb)
Definition: RFCostEstimationPlugin.cc:64
CostEstimator::RFCostEstimationPlugin::estimateMaximumComputationDelay
virtual bool estimateMaximumComputationDelay(const TTAMachine::BaseRegisterFile &architecture, const IDF::RFImplementationLocation &implementation, DelayInNanoSeconds &computationDelay, HDB::HDBManager &hdb)
Definition: RFCostEstimationPlugin.cc:149
ExecutionTrace
Definition: ExecutionTrace.hh:56
HDB::HDBManager
Definition: HDBManager.hh:82
CostEstimator::CostEstimationPlugin
Definition: CostEstimationPlugin.hh:45
CostEstimator::DelayInNanoSeconds
double DelayInNanoSeconds
type for propagation delays in nano seconds
Definition: CostEstimatorTypes.hh:39
CostEstimator::RFCostEstimationPlugin::estimatePortWriteDelay
virtual bool estimatePortWriteDelay(const TTAMachine::RFPort &port, const IDF::RFImplementationLocation &implementation, DelayInNanoSeconds &inputDelay, HDB::HDBManager &hdb)
Definition: RFCostEstimationPlugin.cc:108
CostEstimator::RFCostEstimationPlugin::RFCostEstimationPlugin
RFCostEstimationPlugin(const std::string &name)
Definition: RFCostEstimationPlugin.cc:44
CostEstimator
Definition: CostEstimationPlugin.cc:36
RFCostEstimationPlugin.hh
CostEstimator::RFCostEstimationPlugin::estimateEnergy
virtual bool estimateEnergy(const TTAMachine::BaseRegisterFile &architecture, const IDF::RFImplementationLocation &implementation, const TTAProgram::Program &program, const ExecutionTrace &traceDB, EnergyInMilliJoules &energy, HDB::HDBManager &hdb)
Definition: RFCostEstimationPlugin.cc:88