PandA-2024.02
time_info.cpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2023-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
41 #include "time_info.hpp"
42 
43 #include "schedule.hpp"
44 
45 const double time_info::execution_time_DEFAULT = 0;
46 const ControlStep time_info::initiation_time_DEFAULT =
47  ControlStep(0u);
48 const unsigned int time_info::cycles_time_DEFAULT =
49  0;
50 const double time_info::stage_period_DEFAULT = 0;
51 
53  : Param(_Param),
54  initiation_time(initiation_time_DEFAULT),
55  cycles(cycles_time_DEFAULT),
56  synthesis_dependent(false),
57  stage_period(stage_period_DEFAULT),
58  execution_time(execution_time_DEFAULT)
59 {
60 }
61 
62 time_info::~time_info() = default;
63 
64 void time_info::set_execution_time(double _execution_time, unsigned int _cycles)
65 {
66  execution_time = _execution_time;
67  cycles = _cycles;
68 }
69 
71 {
73 }
74 
76 {
77  return synthesis_dependent;
78 }
79 
81 {
82  return execution_time;
83 }
84 
85 void time_info::set_initiation_time(const ControlStep _initiation_time)
86 {
87  initiation_time = _initiation_time;
88 }
89 
90 ControlStep time_info::get_initiation_time() const
91 {
92  return initiation_time;
93 }
94 
95 unsigned int time_info::get_cycles() const
96 {
97  return cycles;
98 }
99 
101 {
102  return stage_period;
103 }
104 
105 void time_info::set_stage_period(double st_per)
106 {
107  stage_period = st_per;
108 }
109 
111 {
112  return time_infoRef(new time_info(Param));
113 }
~time_info()
Destructor.
unsigned int cycles
number of cycles required to complete the computation
Definition: time_info.hpp:59
double execution_time
execution time, in terms of ns, for this type of operation on a given functional unit.
Definition: time_info.hpp:65
ControlStep initiation_time
initiation time, in terms of cycle_units, for this type of operation on a given functional unit...
Definition: time_info.hpp:57
void set_execution_time(double execution_time, unsigned int cycles=time_info::cycles_time_DEFAULT)
Definition: time_info.cpp:64
bool get_synthesis_dependent() const
Definition: time_info.cpp:75
Collect information about resource performance.
ControlStep get_initiation_time() const
Definition: time_info.cpp:90
void set_stage_period(double st_per)
Definition: time_info.cpp:105
unsigned int get_cycles() const
Definition: time_info.cpp:95
bool synthesis_dependent
flag to check if the number of cycles are dependent on the synthesis or not
Definition: time_info.hpp:61
void set_initiation_time(const ControlStep _initiation_time)
Definition: time_info.cpp:85
double stage_period
critical timing execution path, in term of ns, of a potentially pipelined operation.
Definition: time_info.hpp:63
Data structure used to store the schedule of the operations.
static const double stage_period_DEFAULT
zero means that the operation last in ceil(execution_time/clock_period)
Definition: time_info.hpp:106
static const unsigned int cycles_time_DEFAULT
zero means that the operation is not pipelined
Definition: time_info.hpp:105
double get_execution_time() const
Definition: time_info.cpp:80
const ParameterConstRef Param
class containing all the parameters
Definition: time_info.hpp:55
static const double execution_time_DEFAULT
Definition: time_info.hpp:103
static const ControlStep initiation_time_DEFAULT
Definition: time_info.hpp:104
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
time_info(const ParameterConstRef _Param)
Constructor.
Definition: time_info.cpp:52
refcount< time_info > time_infoRef
refcount definition of the class
Definition: time_info.hpp:110
double get_stage_period() const
Definition: time_info.cpp:100
static time_infoRef factory(const ParameterConstRef Param)
Definition: time_info.cpp:110
void set_synthesis_dependent(bool value)
Definition: time_info.cpp:70

Generated on Mon Feb 12 2024 13:02:55 for PandA-2024.02 by doxygen 1.8.13