PandA-2024.02
conv_conn_obj.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) 2004-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  */
43 #ifndef CONV_CONN_OBJ_HPP
44 #define CONV_CONN_OBJ_HPP
45 
46 #include "generic_obj.hpp"
47 
53 {
55  unsigned int bitsize;
56 
57  public:
61  uu_conv_conn_obj(const std::string& _name) : generic_obj(UU_CONV_CONN_OBJ, _name), bitsize(0)
62  {
63  }
64 
68  ~uu_conv_conn_obj() override = default;
69 
73  void add_bitsize(unsigned int _bitsize)
74  {
75  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
76  }
77 
81  unsigned int get_bitsize() const
82  {
83  return bitsize;
84  }
85 };
86 
92 {
94  unsigned int bitsize;
95 
96  public:
100  ui_conv_conn_obj(const std::string& _name) : generic_obj(UI_CONV_CONN_OBJ, _name), bitsize(0)
101  {
102  }
103 
107  ~ui_conv_conn_obj() override = default;
108 
112  void add_bitsize(unsigned int _bitsize)
113  {
114  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
115  }
116 
120  unsigned int get_bitsize() const
121  {
122  return bitsize;
123  }
124 };
125 
131 {
133  unsigned int bitsize;
134 
135  public:
139  iu_conv_conn_obj(const std::string& _name) : generic_obj(IU_CONV_CONN_OBJ, _name), bitsize(0)
140  {
141  }
142 
146  ~iu_conv_conn_obj() override = default;
147 
151  void add_bitsize(unsigned int _bitsize)
152  {
153  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
154  }
155 
159  unsigned int get_bitsize() const
160  {
161  return bitsize;
162  }
163 };
164 
170 {
172  unsigned int bitsize;
173 
174  public:
178  ii_conv_conn_obj(const std::string& _name) : generic_obj(II_CONV_CONN_OBJ, _name), bitsize(0)
179  {
180  }
181 
185  ~ii_conv_conn_obj() override = default;
186 
190  void add_bitsize(unsigned int _bitsize)
191  {
192  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
193  }
194 
198  unsigned int get_bitsize() const
199  {
200  return bitsize;
201  }
202 };
203 
209 {
211  unsigned int bitsize_in;
213  unsigned int bitsize_out;
214 
215  public:
219  ff_conv_conn_obj(const std::string& _name) : generic_obj(FF_CONV_CONN_OBJ, _name), bitsize_in(0), bitsize_out(0)
220  {
221  }
222 
226  ~ff_conv_conn_obj() override = default;
227 
231  void add_bitsize_in(unsigned int _bitsize)
232  {
233  bitsize_in = _bitsize > bitsize_in ? _bitsize : bitsize_in;
234  }
235 
239  void add_bitsize_out(unsigned int _bitsize)
240  {
241  bitsize_out = _bitsize > bitsize_out ? _bitsize : bitsize_out;
242  }
243 
247  unsigned int get_bitsize_in() const
248  {
249  return bitsize_in;
250  }
254  unsigned int get_bitsize_out() const
255  {
256  return bitsize_out;
257  }
258 };
259 
265 {
267  unsigned int bitsize;
268 
269  public:
273  i_assign_conn_obj(const std::string& _name) : generic_obj(I_ASSIGN_CONN_OBJ, _name), bitsize(0)
274  {
275  }
276 
280  ~i_assign_conn_obj() override = default;
281 
285  void add_bitsize(unsigned int _bitsize)
286  {
287  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
288  }
289 
293  unsigned int get_bitsize() const
294  {
295  return bitsize;
296  }
297 };
298 
304 {
306  unsigned int bitsize;
307 
308  public:
312  u_assign_conn_obj(const std::string& _name) : generic_obj(U_ASSIGN_CONN_OBJ, _name), bitsize(0)
313  {
314  }
315 
319  ~u_assign_conn_obj() override = default;
320 
324  void add_bitsize(unsigned int _bitsize)
325  {
326  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
327  }
328 
332  unsigned int get_bitsize() const
333  {
334  return bitsize;
335  }
336 };
337 
343 {
345  unsigned int bitsize;
346 
347  public:
351  f_assign_conn_obj(const std::string& _name) : generic_obj(F_ASSIGN_CONN_OBJ, _name), bitsize(0)
352  {
353  }
354 
358  ~f_assign_conn_obj() override = default;
359 
363  void add_bitsize(unsigned int _bitsize)
364  {
365  bitsize = _bitsize > bitsize ? _bitsize : bitsize;
366  }
367 
371  unsigned int get_bitsize() const
372  {
373  return bitsize;
374  }
375 };
376 
377 #endif // CONV_CONN_OBJ_HPP
This class is used to specify the type of a connection object: UINT.
unsigned int bitsize
number of bit of in/out ports
unsigned int bitsize
number of bit of in/out ports
ii_conv_conn_obj(const std::string &_name)
Constructor.
specify the type of a connection object: UINT
Definition: generic_obj.hpp:86
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
This class is used to specify the type of a connection object: REAL.
a converter from signed to signed int
Definition: generic_obj.hpp:83
unsigned int bitsize
number of bit of in/out ports
This class is used to convert unsigned into unsigned int.
This class is used to convert unsigned into signed int.
unsigned int get_bitsize_out() const
return the output bitsize associated with the component
This class is used to convert signed into signed int.
a converter from unsigned to unsigned int
Definition: generic_obj.hpp:80
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
Base class for all resources into datapath.
ff_conv_conn_obj(const std::string &_name)
Constructor.
uu_conv_conn_obj(const std::string &_name)
Constructor.
This class is used to convert signed into unsigned int.
void add_bitsize(unsigned int _bitsize)
add a size to the component
u_assign_conn_obj(const std::string &_name)
Constructor.
void add_bitsize(unsigned int _bitsize)
add a size to the component
ui_conv_conn_obj(const std::string &_name)
Constructor.
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
void add_bitsize(unsigned int _bitsize)
add a size to the component
~uu_conv_conn_obj() override=default
Destructor.
void add_bitsize_in(unsigned int _bitsize)
add a size in to the component
iu_conv_conn_obj(const std::string &_name)
Constructor.
a converter from real to real int
Definition: generic_obj.hpp:84
unsigned int bitsize
number of bit of in/out ports
f_assign_conn_obj(const std::string &_name)
Constructor.
Generic class managing all resources into datapath.
Definition: generic_obj.hpp:66
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
void add_bitsize(unsigned int _bitsize)
add a size to the component
This class is used to specify the type of a connection object: INT.
i_assign_conn_obj(const std::string &_name)
Constructor.
unsigned int bitsize
number of bit of in/out ports
unsigned int bitsize
number of bit of in/out ports
void add_bitsize(unsigned int _bitsize)
add a size to the component
a converter from signed to unsigned int
Definition: generic_obj.hpp:82
This class is used to convert real into real.
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
void add_bitsize(unsigned int _bitsize)
add a size to the component
unsigned int get_bitsize_in() const
return the input bitsize associated with the component
an adder object representation used to compute some addresses
Definition: generic_obj.hpp:79
void add_bitsize(unsigned int _bitsize)
add a size to the component
unsigned int bitsize
number of bit of in/out ports
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
specify the type of a connection object: INT
Definition: generic_obj.hpp:85
unsigned int bitsize_in
number of bit of in ports
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
a converter from unsigned to signed int
Definition: generic_obj.hpp:81
unsigned int bitsize_out
number of bit of out ports
void add_bitsize_out(unsigned int _bitsize)
add a size in to the component

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