OpenASIP 2.2
Loading...
Searching...
No Matches
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
36namespace 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) :
47}
48
49/**
50 * Destructor.
51 */
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 */
64bool
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 */
87bool
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 */
108bool
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 */
127bool
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 */
150bool
159
160}
virtual bool estimatePortReadDelay(const TTAMachine::FUPort &port, const IDF::FUImplementationLocation &implementation, DelayInNanoSeconds &outputDelay, HDB::HDBManager &hdb)
virtual bool estimatePortWriteDelay(const TTAMachine::FUPort &port, const IDF::FUImplementationLocation &implementation, DelayInNanoSeconds &inputDelay, HDB::HDBManager &hdb)
virtual bool estimateArea(const TTAMachine::FunctionUnit &architecture, const IDF::FUImplementationLocation &implementation, AreaInGates &area, HDB::HDBManager &hdb)
virtual bool estimateEnergy(const TTAMachine::FunctionUnit &architecture, const IDF::FUImplementationLocation &implementation, const TTAProgram::Program &program, const ExecutionTrace &traceDB, EnergyInMilliJoules &energy, HDB::HDBManager &hdb)
virtual bool estimateMaximumComputationDelay(const TTAMachine::FunctionUnit &architecture, const IDF::FUImplementationLocation &implementation, DelayInNanoSeconds &computationDelay, HDB::HDBManager &hdb)
double AreaInGates
type for area values in equivalent gates
double DelayInNanoSeconds
type for propagation delays in nano seconds
double EnergyInMilliJoules
type for consumed energy in milli joules