torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtendedWireInfo.cpp
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 Source for the ExtendedWireInfo class.
18 
23 
24 namespace torc {
25 namespace architecture {
26 
27  void ExtendedWireInfo::set(const Tilewire& inTilewire) {
28  // be sure to handle invalid tilewires appropriately
29  if(inTilewire.isUndefined()) {
35  mTileName = "";
36  mTileTypeName = "";
37  mWireName = "";
39  return;
40  }
41  // extract the tile and wire indexes
42  mWireIndex = inTilewire.getWireIndex();
43  mTileIndex = inTilewire.getTileIndex();
44  const Tiles& tiles = mDDB.getTiles();
45  // get information about the tile itself
46  const TileInfo& tileInfo = tiles.getTileInfo(mTileIndex);
47  mTileTypeIndex = tileInfo.getTypeIndex();
48  mTileRow = tileInfo.getRow();
49  mTileCol = tileInfo.getCol();
50 //mTileName = "";
51  mTileName = tileInfo.getName();
52  // get information about the tile type
54  // get information about the wire
55  const WireInfo& wireInfo = tiles.getWireInfo(mTileTypeIndex, mWireIndex);
56  mWireName = wireInfo.getName();
57  mWireFlags = wireInfo.getFlags();
58  }
59 
60 } // namespace architecture
61 } // namespace torc
const WireIndex & getWireIndex(void) const
Returns the wire index.
Definition: Tilewire.hpp:66
const char * mTileTypeName
The tile type name.
const TileCol & getCol(void) const
Returns the column for this tile.
Definition: TileInfo.hpp:96
const TileRow & getRow(void) const
Returns the row for this tile.
Definition: TileInfo.hpp:94
xilinx::WireIndex WireIndex
Imported type name.
const Tiles & getTiles(void) const
Returns a constant reference to the family and device tile data.
Definition: DDB.hpp:146
const char * mWireName
The wire name.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Definition: Tiles.hpp:137
Header for the WireInfo class.
const Array< const WireInfo > & getWireInfo(TileTypeIndex inTileTypeIndex) const
Returns the WireInfo array for the specified tile type.
Definition: Tiles.hpp:140
TileTypeIndex mTileTypeIndex
The tile type index.
xilinx::TileRow TileRow
Imported type name.
const char * mTileName
The tile name.
Encapsulation of a device tile and wire pair.
Definition: Tilewire.hpp:39
const DDB & mDDB
The device database reference.
Tile map, tile type, and wire information for the family and device.
Definition: Tiles.hpp:36
Encapsulation of a tile within a device tile map.
Definition: TileInfo.hpp:33
const char * getTileTypeName(TileTypeIndex inTileTypeIndex) const
Returns the tile type name for the given tile type index.
Definition: Tiles.hpp:164
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
Definition: TileInfo.hpp:92
Header for the ExtendedWireInfo class.
WireIndex mWireIndex
The wire index.
xilinx::TileCol TileCol
Imported type name.
const char * getName(void) const
Returns the name for this tile.
Definition: TileInfo.hpp:98
Header for the DDB class.
TileIndex mTileIndex
The tile index.
xilinx::WireFlags WireFlags
Imported type name.
const TileIndex & getTileIndex(void) const
Returns the tile index.
Definition: Tilewire.hpp:64
Header for the TileInfo class.
Encapsulation of a wire within a tile type.
Definition: WireInfo.hpp:36
bool isUndefined(void) const
Definition: Tilewire.hpp:86
const char * getName(void) const
Returns the name for this wire.
Definition: WireInfo.hpp:109
WireFlags mWireFlags
The wire flags.
xilinx::TileTypeIndex TileTypeIndex
Imported type name.
const WireFlags getFlags(void) const
Returns the attribute flags for this wire.
Definition: WireInfo.hpp:107
xilinx::TileIndex TileIndex
Imported type name.
void set(const Tilewire &inTilewire)
Configure the extended info fields.