PandA-2024.02
dataport_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  */
46 #ifndef DATAPORT_OBJ_HPP
47 #define DATAPORT_OBJ_HPP
48 
49 #include <utility>
50 
51 #include "generic_obj.hpp"
52 
56 class dataport_obj : public generic_obj
57 {
59  std::string parameter;
60 
62  unsigned int bitsize;
63 
64  public:
68  dataport_obj(const std::string& _name, unsigned int _bitsize) : generic_obj(DATA_PORT, _name), bitsize(_bitsize)
69  {
70  }
71 
75  dataport_obj(const std::string& _name, const std::string& _parameter, unsigned int _bitsize)
76  : generic_obj(DATA_PORT, _name), parameter(_parameter), bitsize(_bitsize)
77  {
78  }
79 
83  ~dataport_obj() override = default;
84 
88  unsigned int get_bitsize() const
89  {
90  return bitsize;
91  }
92 };
93 
94 #endif
dataport_obj(const std::string &_name, unsigned int _bitsize)
Constructor.
unsigned int bitsize
number of bit
unsigned int get_bitsize() const
return the maximum bitsize associated with the component
Base class for all resources into datapath.
dataport_obj(const std::string &_name, const std::string &_parameter, unsigned int _bitsize)
Constructor.
Generic class managing all resources into datapath.
Definition: generic_obj.hpp:66
primary ports of datapath.
a command port (mainly connections from/to controller)
Definition: generic_obj.hpp:76
~dataport_obj() override=default
Destructor.
std::string parameter
define the parameter name of the object

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