PandA-2024.02
time_info.hpp
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  */
40 #ifndef TIME_INFO_HPP
41 #define TIME_INFO_HPP
42 
43 #include "refcount.hpp"
44 #include "schedule.hpp"
45 
50 class xml_element;
51 
52 class time_info
53 {
57  ControlStep initiation_time;
59  unsigned int cycles;
63  double stage_period;
66 
67  public:
71  explicit time_info(const ParameterConstRef _Param);
72 
76  ~time_info();
77 
78  static time_infoRef factory(const ParameterConstRef Param);
79 
80  void set_initiation_time(const ControlStep _initiation_time);
81 
82  ControlStep get_initiation_time() const;
83 
84  unsigned int get_cycles() const;
85 
86  double get_stage_period() const;
87 
88  void set_stage_period(double st_per);
89 
90  void set_execution_time(double execution_time, unsigned int cycles = time_info::cycles_time_DEFAULT);
91 
92  void set_synthesis_dependent(bool value);
93 
94  bool get_synthesis_dependent() const;
95 
96  double get_execution_time() const;
97 
98  public:
103  static const double execution_time_DEFAULT /*= 0.0*/;
104  static const ControlStep initiation_time_DEFAULT /*= 0*/;
105  static const unsigned int cycles_time_DEFAULT /*=0*/;
106  static const double stage_period_DEFAULT /*= 0.0*/;
108 };
111 
112 #endif
~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
REF_FORWARD_DECL(time_info)
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
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.
CONSTREF_FORWARD_DECL(Parameter)
refcount definition for the class
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
UINT_STRONG_TYPEDEF_FORWARD_DECL(ControlStep)
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
Template definition of refcount.
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
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