torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VprExporter.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 DDB class.
18 
19 #ifndef TORC_ARCHITECTURE_VPREXPORTER_HPP
20 #define TORC_ARCHITECTURE_VPREXPORTER_HPP
21 
24 #include <fstream>
25 
26 namespace torc {
27 namespace architecture {
28 
29  /// \brief Device database exporter for the University of Toronto's VPR.
30  /// \note This is still experimental and under development.
31  class VprExporter {
32  protected:
33  // types
34  typedef std::fstream fstream; ///< \brief Imported type name.
35  typedef std::string string; ///< \brief Imported type name.
36  typedef std::vector<string> StringVector; ///< \brief Vector type.
37  typedef std::vector<uint32_t> Uint32Vector; ///< \brief Vector type.
38  typedef xilinx::WireFlags WireFlags; ///< \brief Imported type name.
39  typedef xilinx::WireCount WireCount; ///< \brief Imported type name.
40  typedef xilinx::WireIndex WireIndex; ///< \brief Imported type name.
41  typedef xilinx::TileCount TileCount; ///< \brief Imported type name.
42  typedef xilinx::TileIndex TileIndex; ///< \brief Imported type name.
43  typedef xilinx::TileCol TileCol; ///< \brief Imported type name.
44  typedef xilinx::TileRow TileRow; ///< \brief Imported type name.
45  typedef xilinx::TileTypeIndex TileTypeIndex; ///< \brief Imported type name.
46  // classes
47  /// \brief VPR node temporary class.
48  class Node {
49  public:
51  uint32_t mIndex;
56  uint32_t mColRange;
57  uint32_t mRowRange;
60  Node(void) : mTilewire(), mIndex(0), mMinCol(-1), mMinRow(-1), mMaxCol(0), mMaxRow(0)
61  {}
62  };
63  // members
64  /// \brief Reference to the database object.
66  /// \brief Reference to the database Tiles object.
67  const Tiles& mTiles;
68  /// \brief Reference to the database Segments object.
70  /// \brief Minimum row bounds.
72  /// \brief Minimum column bounds.
74  /// \brief Maximum row bounds.
76  /// \brief Maximum column bounds.
78  /// \brief Output file stream for VPR data.
80  public:
81  // constructors
82  /// \brief Public constructor.
83  VprExporter(DDB& inDDB) : mDDB(inDDB), mTiles(mDDB.getTiles()),
84  mSegments(mDDB.getSegments()),
85  mMinTileRow(10), mMinTileCol(10),
86  mMaxTileRow(10), mMaxTileCol(10) {}
87  // functions
88  /// \brief Exports routing graph information for VPR v6.0.
89  void operator()(void);
90  };
91 
92 } // namespace architecture
93 } // namespace torc
94 
95 #endif // TORC_ARCHITECTURE_VPREXPORTER_HPP
Encapsulation of a tile index in an unsigned 32-bit integer.
VPR node temporary class.
Definition: VprExporter.hpp:48
TileCol mMaxTileCol
Maximum column bounds.
Definition: VprExporter.hpp:77
Encapsulation of a tile row in an unsigned 16-bit integer.
VprExporter(DDB &inDDB)
Public constructor.
Definition: VprExporter.hpp:83
std::string string
Imported type name.
Definition: VprExporter.hpp:35
Encapsulation of a tile column in an unsigned 16-bit integer.
Device database, including complete wiring and logic support.
Definition: DDB.hpp:42
Device database exporter for the University of Toronto's VPR.
Definition: VprExporter.hpp:31
xilinx::TileRow TileRow
Imported type name.
Definition: VprExporter.hpp:44
xilinx::WireCount WireCount
Imported type name.
Definition: VprExporter.hpp:39
fstream mStream
Output file stream for VPR data.
Definition: VprExporter.hpp:79
Encapsulation of wire attribute flags in an unsigned 16-bit integer.
void operator()(void)
Exports routing graph information for VPR v6.0.
Definition: VprExporter.cpp:97
std::fstream fstream
Imported type name.
Definition: VprExporter.hpp:34
Encapsulation of a wire index in an unsigned 16-bit integer.
std::string string
Encapsulation of a device tile and wire pair.
Definition: Tilewire.hpp:39
const Tiles & mTiles
Reference to the database Tiles object.
Definition: VprExporter.hpp:67
Tile map, tile type, and wire information for the family and device.
Definition: Tiles.hpp:36
Encapsulation of a wire count in an unsigned 16-bit integer.
Encapsulation of a tile count in an unsigned 32-bit integer.
xilinx::TileCount TileCount
Imported type name.
Definition: VprExporter.hpp:41
DDB & mDDB
Reference to the database object.
Definition: VprExporter.hpp:65
TileCol mMinTileCol
Minimum column bounds.
Definition: VprExporter.hpp:73
TileRow mMaxTileRow
Maximum row bounds.
Definition: VprExporter.hpp:75
xilinx::TileIndex TileIndex
Imported type name.
Definition: VprExporter.hpp:42
std::vector< string > StringVector
Vector type.
Definition: VprExporter.hpp:36
Encapsulation of a tile type index in an unsigned 16-bit integer.
xilinx::TileCol TileCol
Imported type name.
Definition: VprExporter.hpp:43
TileRow mMinTileRow
Minimum row bounds.
Definition: VprExporter.hpp:71
Header for the DDB class.
xilinx::WireFlags WireFlags
Imported type name.
Definition: VprExporter.hpp:38
std::vector< uint32_t > Uint32Vector
Vector type.
Definition: VprExporter.hpp:37
Segment and irregular arc data for the device.
Definition: Segments.hpp:40
xilinx::WireIndex WireIndex
Imported type name.
Definition: VprExporter.hpp:40
xilinx::TileTypeIndex TileTypeIndex
Imported type name.
Definition: VprExporter.hpp:45
const Segments & mSegments
Reference to the database Segments object.
Definition: VprExporter.hpp:69
Device database types for Xilinx architectures.