torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
architecture/XdlImporter.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 XdlImporter class.
18 
19 #ifndef TORC_ARCHITECTURE_XDLIMPORTER_HPP
20 #define TORC_ARCHITECTURE_XDLIMPORTER_HPP
21 
25 #include <iostream>
28 
29 namespace torc {
30 namespace architecture {
31 
32  /// \brief Architecture aware importer from XDL format into a physical design.
34  protected:
35  // typedefs
36  /// \brief Type of the superclass.
38  // members
39  /// \brief The device database pointer.
41  // functions
42  /// \brief Initialize the device database.
43  virtual void initializeDatabase(void);
44  /// \brief Bind the given instance pin to its database Tilewire if applicable.
45  virtual void bind(torc::physical::InstancePinSharedPtr& inInstancePin);
46  /// \brief Bind the given pip to the database arc and wire usage if applicable.
47  virtual void bind(torc::physical::Pip& inPip, EPipType inPipType);
48  public:
49  // constructors
50  /// \brief Basic constructor.
51  XdlImporter(void) : super(), mDDBPtr(0) {}
52  /// \brief Destructor.
53  ~XdlImporter(void) {
54  if(mDDBPtr) { delete mDDBPtr; mDDBPtr = 0; }
55  }
56  // accessors
57  /// \brief Returns the pointer for the device database.
58  DDB* getDDBPtr(void) { return mDDBPtr; }
59  // functions
60  /// \brief Releases ownership of the device database. The caller is now responsible for
61  /// deleting it.
62  DDB* releaseDDBPtr(void) { DDB* ddbPtr = mDDBPtr; mDDBPtr = 0; return ddbPtr; }
63  };
64 
65 } // namespace architecture
66 } // namespace torc
67 
68 #endif // TORC_ARCHITECTURE_XDLIMPORTER_HPP
Device database, including complete wiring and logic support.
Definition: DDB.hpp:42
virtual void initializeDatabase(void)
Initialize the device database.
torc::physical::XdlImporter super
Type of the superclass.
Header for the DDBStreamHelper class.
boost::shared_ptr< class InstancePin > InstancePinSharedPtr
Shared pointer encapsulation of an InstancePin.
DDB * releaseDDBPtr(void)
Releases ownership of the device database. The caller is now responsible for deleting it...
Architecture aware importer from XDL format into a physical design.
EPipType
The pip type, either regular or routethrough.
Header for the XdlImporter class.
Header for torc::physical output stream helpers.
Header for the InstancePin class.
Physical design programmable interconnect point.
Definition: Pip.hpp:34
DDB * getDDBPtr(void)
Returns the pointer for the device database.
Header for the DDB class.
virtual void bind(torc::physical::InstancePinSharedPtr &inInstancePin)
Bind the given instance pin to its database Tilewire if applicable.
Importer from XDL format into a physical design.
DDB * mDDBPtr
The device database pointer.