torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Pad.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief Header for the Pad class.
18 
19 #ifndef TORC_ARCHITECTURE_PAD_HPP
20 #define TORC_ARCHITECTURE_PAD_HPP
21 
24 #include <string>
25 
26 namespace torc {
27 namespace architecture {
28 
29  namespace architecture { class PadUnitTest; }
30  namespace architecture { class PackageUnitTest; }
31 
32  /// \brief Encapsulation of the site index, pin name, and pin flags for a package.
33  class Pad {
34  protected:
35  /// \brief The Sites class has access to our internals.
36  friend class Sites;
37  /// \brief Our unit test class has access to our internals.
39  /// \brief The Package unit test class has access to our internals.
41  // types
42  typedef std::string string; ///< \brief Imported type name.
43  typedef xilinx::SiteIndex SiteIndex; ///< \brief Imported type name.
44  typedef xilinx::SiteFlags SiteFlags; ///< \brief Imported type name.
45  // members
46  /// \brief The index of the site corresponding to this pad.
48  /// \brief The name of the pad in its physical package.
49  string mName;
50  /// \brief The site flags for this pad, specifically including bonding.
52  // constructors
53  /// \brief Protected constructor.
54  Pad(SiteIndex inSiteIndex, const string& inName, SiteFlags inFlags)
55  : mSiteIndex(inSiteIndex), mName(inName), mFlags(inFlags) {}
56  public:
57  // constructors
58  /// \brief Null constructor.
59  Pad(void) : mSiteIndex(), mName(), mFlags() {};
60  // accessors
61  /// \brief Returns the index of the site corresponding to this pad.
62  SiteIndex getSiteIndex(void) const { return mSiteIndex; }
63  /// \brief Returns the name of the pad in its physical package.
64  const string& getName(void) const { return mName; }
65  /// \brief Returns the site flags for this pad, specifically including bonding.
66  SiteFlags getFlags(void) const { return mFlags; }
67  };
68 
69  /// \brief Array of constant Pad objects.
71 
72 } // namespace architecture
73 } // namespace torc
74 
75 #endif // TORC_ARCHITECTURE_PAD_HPP
const string & getName(void) const
Returns the name of the pad in its physical package.
Definition: Pad.hpp:64
Encapsulation of the site index, pin name, and pin flags for a package.
Definition: Pad.hpp:33
SiteIndex mSiteIndex
The index of the site corresponding to this pad.
Definition: Pad.hpp:47
string mName
The name of the pad in its physical package.
Definition: Pad.hpp:49
friend class torc::architecture::architecture::PadUnitTest
Our unit test class has access to our internals.
Definition: Pad.hpp:38
Array< const Pad > PadArray
Array of constant Pad objects.
Definition: Pad.hpp:70
friend class torc::architecture::architecture::PackageUnitTest
The Package unit test class has access to our internals.
Definition: Pad.hpp:40
xilinx::SiteFlags SiteFlags
Imported type name.
Definition: Pad.hpp:44
std::string string
Site type and population data for the family and the device.
Definition: Sites.hpp:45
SiteFlags mFlags
The site flags for this pad, specifically including bonding.
Definition: Pad.hpp:51
Pad(SiteIndex inSiteIndex, const string &inName, SiteFlags inFlags)
Protected constructor.
Definition: Pad.hpp:54
std::string string
Imported type name.
Definition: Pad.hpp:42
xilinx::SiteIndex SiteIndex
Imported type name.
Definition: Pad.hpp:43
SiteFlags getFlags(void) const
Returns the site flags for this pad, specifically including bonding.
Definition: Pad.hpp:66
Encapsulation of site attribute flags in an unsigned 16-bit integer.
Header for the Array class.
Encapsulation of a site index in an unsigned 32-bit integer.
SiteIndex getSiteIndex(void) const
Returns the index of the site corresponding to this pad.
Definition: Pad.hpp:62
Pad(void)
Null constructor.
Definition: Pad.hpp:59
Device database types for Xilinx architectures.