torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::architecture::Tilewire Class Reference

Encapsulation of a device tile and wire pair. More...

#include <Tilewire.hpp>

+ Inheritance diagram for torc::architecture::Tilewire:
+ Collaboration diagram for torc::architecture::Tilewire:

Public Member Functions

 Tilewire (void)
 Null constructor. More...
 
 Tilewire (const TileIndex &inTileIndex, const WireIndex &inWireIndex)
 Public constructor. More...
 
 Tilewire (const Tilewire &inTilewire)
 Copy constructor. More...
 
const TileIndexgetTileIndex (void) const
 Returns the tile index. More...
 
const WireIndexgetWireIndex (void) const
 Returns the wire index. More...
 
void setTileIndex (const TileIndex &inTileIndex)
 Sets the tile index. More...
 
void setWireIndex (const WireIndex &inWireIndex)
 Sets the wire index. More...
 
bool operator== (const Tilewire &rhs) const
 Equality operator. More...
 
const Tilewireoperator= (const Tilewire &rhs)
 Assignment operator. More...
 
bool operator< (const Tilewire &rhs) const
 Comparison operator. More...
 
bool isUndefined (void) const
 

Static Public Attributes

static const Tilewire sInvalid = Tilewire(TileIndex(-1), WireIndex(-1))
 

Protected Types

typedef xilinx::TileIndex TileIndex
 Imported type name. More...
 
typedef xilinx::WireIndex WireIndex
 Imported type name. More...
 

Protected Attributes

TileIndex mTileIndex
 The tile index. More...
 
WireIndex mWireIndex
 The wire index. More...
 

Friends

std::size_t hash_value (const Tilewire &inTilewire)
 Return a hash value for the specified tilewire. More...
 

Detailed Description

Encapsulation of a device tile and wire pair.

Todo:
Have to justify the packing decision, and its impact on memory footprint versus performance.

A tilewire uniquely identifies a physical wire in the device, as defined by its tile index and wire index. Tilewires are used extensively by the device database, and by the router and tracer classes.

Definition at line 39 of file Tilewire.hpp.

Member Typedef Documentation

Imported type name.

Definition at line 43 of file Tilewire.hpp.

Imported type name.

Definition at line 45 of file Tilewire.hpp.

Constructor & Destructor Documentation

torc::architecture::Tilewire::Tilewire ( void  )
inline

Null constructor.

The tilewire will be set to Tilewire::sInvalid.

Definition at line 55 of file Tilewire.hpp.

torc::architecture::Tilewire::Tilewire ( const TileIndex inTileIndex,
const WireIndex inWireIndex 
)
inline

Public constructor.

Definition at line 57 of file Tilewire.hpp.

58  : mTileIndex(inTileIndex), mWireIndex(inWireIndex) {}
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50
torc::architecture::Tilewire::Tilewire ( const Tilewire inTilewire)
inline

Copy constructor.

Definition at line 60 of file Tilewire.hpp.

61  : mTileIndex(inTilewire.mTileIndex), mWireIndex(inTilewire.mWireIndex) {}
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50

Member Function Documentation

const TileIndex& torc::architecture::Tilewire::getTileIndex ( void  ) const
inline

Returns the tile index.

Definition at line 64 of file Tilewire.hpp.

64 { return mTileIndex; }
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48

+ Here is the caller graph for this function:

const WireIndex& torc::architecture::Tilewire::getWireIndex ( void  ) const
inline

Returns the wire index.

Definition at line 66 of file Tilewire.hpp.

66 { return mWireIndex; }
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50

+ Here is the caller graph for this function:

bool torc::architecture::Tilewire::isUndefined ( void  ) const
inline

Definition at line 86 of file Tilewire.hpp.

86  {
88  }
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool torc::architecture::Tilewire::operator< ( const Tilewire rhs) const
inline

Comparison operator.

This operator facilitates ordering in containers.

Definition at line 80 of file Tilewire.hpp.

80  {
81  if(mTileIndex < rhs.mTileIndex) return true;
82  if(mTileIndex == rhs.mTileIndex && mWireIndex < rhs.mWireIndex) return true;
83  return false;
84  }
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50
const Tilewire& torc::architecture::Tilewire::operator= ( const Tilewire rhs)
inline

Assignment operator.

Definition at line 76 of file Tilewire.hpp.

77  { mTileIndex = rhs.mTileIndex; mWireIndex = rhs.mWireIndex; return *this; }
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50
bool torc::architecture::Tilewire::operator== ( const Tilewire rhs) const
inline

Equality operator.

Definition at line 73 of file Tilewire.hpp.

74  { return mTileIndex == rhs.mTileIndex && mWireIndex == rhs.mWireIndex; }
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50
void torc::architecture::Tilewire::setTileIndex ( const TileIndex inTileIndex)
inline

Sets the tile index.

Definition at line 68 of file Tilewire.hpp.

68 { mTileIndex = inTileIndex; }
TileIndex mTileIndex
The tile index.
Definition: Tilewire.hpp:48

+ Here is the caller graph for this function:

void torc::architecture::Tilewire::setWireIndex ( const WireIndex inWireIndex)
inline

Sets the wire index.

Definition at line 70 of file Tilewire.hpp.

70 { mWireIndex = inWireIndex; }
WireIndex mWireIndex
The wire index.
Definition: Tilewire.hpp:50

+ Here is the caller graph for this function:

Friends And Related Function Documentation

std::size_t hash_value ( const Tilewire inTilewire)
friend

Return a hash value for the specified tilewire.

Definition at line 27 of file Tilewire.cpp.

27  {
28  std::size_t seed = 0;
29  boost::hash_combine(seed, inTilewire.getTileIndex());
30  boost::hash_combine(seed, inTilewire.getWireIndex());
31  return seed;
32  }

Field Documentation

TileIndex torc::architecture::Tilewire::mTileIndex
protected

The tile index.

Definition at line 48 of file Tilewire.hpp.

WireIndex torc::architecture::Tilewire::mWireIndex
protected

The wire index.

Definition at line 50 of file Tilewire.hpp.

const Tilewire torc::architecture::Tilewire::sInvalid = Tilewire(TileIndex(-1), WireIndex(-1))
static

Definition at line 93 of file Tilewire.hpp.


The documentation for this class was generated from the following files: