PandA-2024.02
area_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 AREA_INFO_HPP
41 #define AREA_INFO_HPP
42 
43 #include "refcount.hpp"
46 class xml_element;
47 
48 #include <map>
49 #include <string>
50 
51 class area_info
52 {
53  public:
55  using value_t = enum {
56  REGISTERS,
57  SLICE,
58  SLICE_LUTS,
59  LUT_FF_PAIRS,
60  ALMS,
61  LOGIC_ELEMENTS,
62  FUNCTIONAL_ELEMENTS,
63  LOGIC_AREA,
64  DSP,
65  BRAM,
66  DRAM,
67  POWER,
68  URAM
69  };
70 
71  private:
73  double area;
74 
76  std::map<value_t, double> used_resources;
77 
80 
81  public:
86  explicit area_info(const ParameterConstRef& _Param);
88 
90  ~area_info();
92 
96  void print(std::ostream& os) const;
97 
101  static area_infoRef factory(const ParameterConstRef& Param);
102 
106  void set_area_value(const double& _area_);
107 
111  double get_area_value() const;
112 
113  void set_resource_value(value_t val, double num);
114  bool is_used_resource(value_t val) const;
115  double get_resource_value(value_t val) const;
116 
118  static const double area_DEFAULT;
119 };
122 
123 #endif
static const double area_DEFAULT
default area value
Definition: area_info.hpp:118
CONSTREF_FORWARD_DECL(Parameter)
void set_resource_value(value_t val, double num)
Definition: area_info.cpp:67
double get_resource_value(value_t val) const
Definition: area_info.cpp:77
double get_area_value() const
Return the nominal value for the area of the component.
Definition: area_info.cpp:57
Template definition of refcount.
bool is_used_resource(value_t val) const
Definition: area_info.cpp:72
area_info(const ParameterConstRef &_Param)
Constructor.
Definition: area_info.cpp:46
static area_infoRef factory(const ParameterConstRef &Param)
Factory method.
Definition: area_info.cpp:52
void print(std::ostream &os) const
Print method.
Definition: area_info.cpp:86
std::map< value_t, double > used_resources
resources required for the component
Definition: area_info.hpp:76
void set_area_value(const double &_area_)
Set the nominal value for the area of the component.
Definition: area_info.cpp:62
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
REF_FORWARD_DECL(area_info)
const ParameterConstRef Param
class containing all the parameters
Definition: area_info.hpp:79
enum { REGISTERS, SLICE, SLICE_LUTS, LUT_FF_PAIRS, ALMS, LOGIC_ELEMENTS, FUNCTIONAL_ELEMENTS, LOGIC_AREA, DSP, BRAM, DRAM, POWER, URAM } value_t
type of resources
Definition: area_info.hpp:69
~area_info()
Destructor.
double area
a double value representing the area of the component
Definition: area_info.hpp:73

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