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

Physical design instance-pin pair, suitable for specifying a net endpoint. More...

#include <InstancePin.hpp>

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

Public Types

typedef boost::shared_ptr
< class::torc::architecture::InstancePin > 
ArchitectureInstancePinPtr
 
typedef boost::shared_ptr
< class::torc::physical::InstancePin > 
PhysicalInstancePinPtr
 

Public Member Functions

void updateTilewire (class DDB &inDDB)
 Updates the Tilewire from the instance and pin names. More...
 
TilewiregetTilewire (void)
 Returns the Tilewire designated by this instance pin. More...
 
const InstanceWeakPtr & getInstancePtr (void) const
 Returns the weak instance pointer. More...
 
const PinName & getPinName (void) const
 Returns the pin name. More...
 
void setInstancePtr (const InstanceWeakPtr &inInstancePtr)
 Sets the weak instance pointer. More...
 
void setPinName (const string &inPinName)
 Sets the pin name. More...
 
bool operator== (const InstancePinBase &rhs) const
 Equality operator. More...
 
const WeakPtrTypegetParentWeakPtr (void) const
 Returns a weak pointer to the parent. More...
 
void setParentWeakPtr (WeakPtrType inParentPtr)
 Sets the weak pointer to the parent. More...
 
void resetParentWeakPtr (void)
 Method to reset and orphan this object. More...
 
const SharedPtrTypegetParentSharedPtr (void) const
 Returns a shared pointer to the parent (WARNING: Does not work right). 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...
 
bool operator< (const Tilewire &rhs) const
 Comparison operator. More...
 
bool isUndefined (void) const
 

Static Public Member Functions

static ArchitectureInstancePinPtrphysicalToArchitecture (PhysicalInstancePinPtr &inInstancePinSharedPtr)
 Typecasts a torc::physical::InstancePin to a torc::architecture::InstancePin. More...
 
static PhysicalInstancePinPtrarchitectureToPhysical (ArchitectureInstancePinPtr &inInstancePinSharedPtr)
 

Static Public Attributes

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

Protected Types

typedef std::string string
 Imported type name. More...
 
typedef boost::weak_ptr< class
Net > 
WeakPtrType
 Weak pointer of our own type. More...
 
typedef boost::weak_ptr
< InstancePin
WeakPtrType
 Weak pointer of our own type. More...
 
typedef boost::shared_ptr
< class Net > 
SharedPtrType
 Shared pointer of our own type. More...
 
typedef boost::shared_ptr
< InstancePin
SharedPtrType
 Shared pointer of our own type. More...
 
typedef xilinx::TileIndex TileIndex
 Imported type name. More...
 
typedef xilinx::WireIndex WireIndex
 Imported type name. More...
 

Protected Member Functions

 InstancePin (torc::physical::InstanceSharedPtr inInstancePtr, const string &inPinName)
 Protected constructor. More...
 
void addToInstance (void)
 Asks the associated instance to add this pin from its pin map. More...
 
void removeFromInstance (void)
 Asks the associated instance to remove this pin from its pin map. More...
 
void setSelfWeakPtr (WeakPtrType inSelfPtr)
 Sets the weak pointer to this object. More...
 
const WeakPtrTypegetSelfWeakPtr (void) const
 Returns a weak pointer to this object. More...
 

Protected Attributes

InstanceWeakPtr mInstancePtr
 The pin weak instance pointer. More...
 
PinName mPinName
 The pin name. More...
 
WeakPtrType mParentWeakPtr
 Weak pointer to the parent. More...
 
WeakPtrType mSelfWeakPtr
 Weak pointer this object. More...
 
TileIndex mTileIndex
 The tile index. More...
 
WireIndex mWireIndex
 The wire index. More...
 

Private Member Functions

 InstancePin (const InstancePin &rhs)
 Disabled copy constructor. More...
 

Detailed Description

Physical design instance-pin pair, suitable for specifying a net endpoint.

This class is a Tilewire-aware version of torc::physical::InstancePin. It functions as an encapsulation of an InstancePin and its corresponding Tilewire.

Definition at line 31 of file architecture/InstancePin.hpp.

Member Typedef Documentation

typedef boost::shared_ptr<class Net > torc::physical::Progeny< class Net >::SharedPtrType
protectedinherited

Shared pointer of our own type.

Definition at line 35 of file Progeny.hpp.

typedef boost::shared_ptr<InstancePin > torc::physical::Progenitor< InstancePin >::SharedPtrType
protectedinherited

Shared pointer of our own type.

Definition at line 52 of file Progenitor.hpp.

typedef std::string torc::physical::InstancePinBase::string
protectedinherited

Imported type name.

Definition at line 37 of file physical/InstancePin.hpp.

Imported type name.

Definition at line 43 of file Tilewire.hpp.

typedef boost::weak_ptr<class Net > torc::physical::Progeny< class Net >::WeakPtrType
protectedinherited

Weak pointer of our own type.

Definition at line 33 of file Progeny.hpp.

typedef boost::weak_ptr<InstancePin > torc::physical::Progenitor< InstancePin >::WeakPtrType
protectedinherited

Weak pointer of our own type.

Definition at line 50 of file Progenitor.hpp.

Imported type name.

Definition at line 45 of file Tilewire.hpp.

Constructor & Destructor Documentation

torc::architecture::InstancePin::InstancePin ( torc::physical::InstanceSharedPtr  inInstancePtr,
const string inPinName 
)
inlineprotected

Protected constructor.

Parameters
inInstancePtrThe pin instance pointer.
inPinNameThe pin name.

Definition at line 37 of file architecture/InstancePin.hpp.

38  : InstancePinBase(inInstancePtr, inPinName), Tilewire() {}
Tilewire(void)
Null constructor.
Definition: Tilewire.hpp:55
InstancePinBase(InstanceSharedPtr inInstancePtr, const string &inPinName)
Protected constructor.
torc::architecture::InstancePin::InstancePin ( const InstancePin rhs)
inlineprivate

Disabled copy constructor.

Definition at line 42 of file architecture/InstancePin.hpp.

42 : InstancePinBase(rhs), Tilewire() {}
Tilewire(void)
Null constructor.
Definition: Tilewire.hpp:55
InstancePinBase(InstanceSharedPtr inInstancePtr, const string &inPinName)
Protected constructor.

Member Function Documentation

void torc::physical::InstancePinBase::addToInstance ( void  )
inlineprotectedinherited

Asks the associated instance to add this pin from its pin map.

Definition at line 45 of file physical/InstancePin.hpp.

45 { mInstancePtr.lock()->addPin(mSelfWeakPtr); }
InstanceWeakPtr mInstancePtr
The pin weak instance pointer.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57
static PhysicalInstancePinPtr& torc::architecture::InstancePin::architectureToPhysical ( ArchitectureInstancePinPtr inInstancePinSharedPtr)
inlinestatic

Definition at line 53 of file architecture/InstancePin.hpp.

54  {
55  return reinterpret_cast<PhysicalInstancePinPtr&>(inInstancePinSharedPtr);
56  }
boost::shared_ptr< class::torc::physical::InstancePin > PhysicalInstancePinPtr
const InstanceWeakPtr& torc::physical::InstancePinBase::getInstancePtr ( void  ) const
inlineinherited

Returns the weak instance pointer.

Definition at line 65 of file physical/InstancePin.hpp.

65 { return mInstancePtr; }
InstanceWeakPtr mInstancePtr
The pin weak instance pointer.

+ Here is the caller graph for this function:

const SharedPtrType& torc::physical::Progeny< class Net >::getParentSharedPtr ( void  ) const
inlineinherited

Returns a shared pointer to the parent (WARNING: Does not work right).

Always seems to generate a "Returning reference to temporary" warning, and I cannot figure out why.

It is the caller's responsibility to reset the shared pointer when done.

Todo:
Figure out why Progeny<T>::getParentSharedPtr() yields a "Returning reference to temporary" warning.

Definition at line 59 of file Progeny.hpp.

59 { return mParentWeakPtr.lock(); }
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Definition: Progeny.hpp:38
const WeakPtrType& torc::physical::Progeny< class Net >::getParentWeakPtr ( void  ) const
inlineinherited

Returns a weak pointer to the parent.

Definition at line 47 of file Progeny.hpp.

47 { return mParentWeakPtr; }
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Definition: Progeny.hpp:38
const PinName& torc::physical::InstancePinBase::getPinName ( void  ) const
inlineinherited

Returns the pin name.

Definition at line 67 of file physical/InstancePin.hpp.

67 { return mPinName; }

+ Here is the caller graph for this function:

const WeakPtrType& torc::physical::Progenitor< InstancePin >::getSelfWeakPtr ( void  ) const
inlineinherited

Returns a weak pointer to this object.

Definition at line 68 of file Progenitor.hpp.

68 { return mSelfWeakPtr; }
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57
const TileIndex& torc::architecture::Tilewire::getTileIndex ( void  ) const
inlineinherited

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:

Tilewire& torc::architecture::InstancePin::getTilewire ( void  )
inline

Returns the Tilewire designated by this instance pin.

Definition at line 62 of file architecture/InstancePin.hpp.

62 { return static_cast<Tilewire&>(*this); }
Tilewire(void)
Null constructor.
Definition: Tilewire.hpp:55

+ Here is the caller graph for this function:

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

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
inlineinherited

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
inlineinherited

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
bool torc::architecture::Tilewire::operator== ( const Tilewire rhs) const
inlineinherited

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
bool torc::physical::InstancePinBase::operator== ( const InstancePinBase rhs) const
inlineinherited

Equality operator.

Definition at line 74 of file physical/InstancePin.hpp.

74  {
75  return !(mInstancePtr < rhs.mInstancePtr) && !(rhs.mInstancePtr < mInstancePtr)
76  && mPinName == rhs.mPinName;
77  }
InstanceWeakPtr mInstancePtr
The pin weak instance pointer.
static ArchitectureInstancePinPtr& torc::architecture::InstancePin::physicalToArchitecture ( PhysicalInstancePinPtr inInstancePinSharedPtr)
inlinestatic

Typecasts a torc::physical::InstancePin to a torc::architecture::InstancePin.

Definition at line 49 of file architecture/InstancePin.hpp.

50  {
51  return reinterpret_cast<ArchitectureInstancePinPtr&>(inInstancePinSharedPtr);
52  }
boost::shared_ptr< class::torc::architecture::InstancePin > ArchitectureInstancePinPtr
void torc::physical::InstancePinBase::removeFromInstance ( void  )
inlineprotectedinherited

Asks the associated instance to remove this pin from its pin map.

Definition at line 47 of file physical/InstancePin.hpp.

47 { mInstancePtr.lock()->removePin(mSelfWeakPtr); }
InstanceWeakPtr mInstancePtr
The pin weak instance pointer.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57

+ Here is the caller graph for this function:

void torc::physical::Progeny< class Net >::resetParentWeakPtr ( void  )
inlineinherited

Method to reset and orphan this object.

Definition at line 51 of file Progeny.hpp.

51 { mParentWeakPtr.reset(); }
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Definition: Progeny.hpp:38
void torc::physical::InstancePinBase::setInstancePtr ( const InstanceWeakPtr inInstancePtr)
inlineinherited

Sets the weak instance pointer.

Definition at line 69 of file physical/InstancePin.hpp.

69 { mInstancePtr = inInstancePtr; }
InstanceWeakPtr mInstancePtr
The pin weak instance pointer.
void torc::physical::Progeny< class Net >::setParentWeakPtr ( WeakPtrType  inParentPtr)
inlineinherited

Sets the weak pointer to the parent.

Definition at line 49 of file Progeny.hpp.

49 { mParentWeakPtr = inParentPtr; }
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Definition: Progeny.hpp:38
void torc::physical::InstancePinBase::setPinName ( const string inPinName)
inlineinherited

Sets the pin name.

Definition at line 71 of file physical/InstancePin.hpp.

71 { mPinName = inPinName; }
void torc::physical::Progenitor< InstancePin >::setSelfWeakPtr ( WeakPtrType  inSelfPtr)
inlineprotectedinherited

Sets the weak pointer to this object.

Definition at line 59 of file Progenitor.hpp.

59 { mSelfWeakPtr = inSelfPtr; }
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57
void torc::architecture::Tilewire::setTileIndex ( const TileIndex inTileIndex)
inlineinherited

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)
inlineinherited

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:

void torc::architecture::InstancePin::updateTilewire ( class DDB inDDB)

Updates the Tilewire from the instance and pin names.

Definition at line 25 of file architecture/InstancePin.cpp.

25  {
27  if(instancePtr.expired()) return;
28  getTilewire() = inDDB.sitePinToTilewire(instancePtr.lock()->getSite(), getPinName());
29  }
const PinName & getPinName(void) const
Returns the pin name.
Tilewire & getTilewire(void)
Returns the Tilewire designated by this instance pin.
const InstanceWeakPtr & getInstancePtr(void) const
Returns the weak instance pointer.
boost::weak_ptr< Instance > InstanceWeakPtr
Weak pointer encapsulation of an Instance.

+ Here is the call graph for this function:

Field Documentation

InstanceWeakPtr torc::physical::InstancePinBase::mInstancePtr
protectedinherited

The pin weak instance pointer.

Definition at line 40 of file physical/InstancePin.hpp.

WeakPtrType torc::physical::Progeny< class Net >::mParentWeakPtr
protectedinherited

Weak pointer to the parent.

Definition at line 38 of file Progeny.hpp.

PinName torc::physical::InstancePinBase::mPinName
protectedinherited

The pin name.

Definition at line 42 of file physical/InstancePin.hpp.

WeakPtrType torc::physical::Progenitor< InstancePin >::mSelfWeakPtr
protectedinherited

Weak pointer this object.

This weak pointer is kept here to be passed along to our children, allowing them to point back to us without the strong dependency of a shared pointer.

Definition at line 57 of file Progenitor.hpp.

TileIndex torc::architecture::Tilewire::mTileIndex
protectedinherited

The tile index.

Definition at line 48 of file Tilewire.hpp.

WireIndex torc::architecture::Tilewire::mWireIndex
protectedinherited

The wire index.

Definition at line 50 of file Tilewire.hpp.

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

Definition at line 93 of file Tilewire.hpp.


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