torc::physical::Instance Class Reference

Physical design instance. More...

#include <Instance.hpp>

Inheritance diagram for torc::physical::Instance:

Inheritance graph
[legend]
Collaboration diagram for torc::physical::Instance:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
InstancePinMap::const_iterator 
InstancePinSharedPtrConstIterator
 Constant iterator to InstancePin shared pointers.
typedef InstancePinMap::iterator InstancePinSharedPtrIterator
 Non-constant iterator to InstancePin shared pointers.

Public Member Functions

bool operator== (const Instance &rhs) const
 Equality operator.
void unplace (void)
 Unplace the instance.
const
InstancePinSharedPtrConstIterator 
findPin (const PinName &inPinName) const
 Returns an InstancePin iterator for the requested pin.
std::pair
< InstancePinSharedPtrConstIterator,
InstancePinSharedPtrConstIterator
findPinRange (const PinName &inPinName) const
 Returns a range that encompasses all instance pins for the given pin.
size_t getPinCount (const string &inPinName) const
 Returns the number of instance pins associated with the given pin.
const stringgetType (void) const
 Returns the logic type for this instance.
const stringgetTile (void) const
 Returns the placement tile for this instance.
const stringgetSite (void) const
 Returns the placement site for this instance.
EInstanceBonding getBonding (void) const
 Returns the IO bonding for this instance.
InstanceReferenceSharedPtr getInstanceReferencePtr (void) const
 Returns the instance reference for this instance, if any.
void setType (const string &inType)
 Sets the logic type for this instance.
void setTile (const string &inTile)
 Sets the placement tile for this instance.
void setSite (const string &inSite)
 Sets the placement site for this instance.
void setBonding (EInstanceBonding inBonding)
 Sets the IO bonding for this instance.
void setInstanceReferencePtr (InstanceReferenceSharedPtr inInstanceReferenceSharedPtr)
 Sets the instance reference for this instance.
InstancePinSharedPtrConstIterator pinsBegin (void) const
 Returns the begin constant iterator for instance pins.
InstancePinSharedPtrConstIterator pinsEnd (void) const
 Returns the end constant iterator for instance pins.
InstancePinSharedPtrIterator pinsBegin (void)
 Returns the begin non-constant iterator for instance pins.
InstancePinSharedPtrIterator pinsEnd (void)
 Returns the end non-constant iterator for instance pins.
size_t getPinCount (void) const
 Returns the number of instance pins in the instance.

Protected Types

typedef std::string string
 Imported type name.
typedef std::multimap< PinName,
InstancePinSharedPtr
InstancePinMap
 Map from instance pin name to instance pin.

Protected Member Functions

void addPin (const InstancePinWeakPtr &inInstancePinPtr)
 Add the referenced InstancePin to our pin map.
void removePin (const InstancePinWeakPtr &inInstancePinPtr)
 Remove the referenced InstancePin from our pin map.
 Instance (const string &inName, const string &inType, const string &inTile, const string &inSite, EInstanceBonding inBonding, InstanceReferenceSharedPtr &inInstanceReferencePtr)
 Protected constructor.

Protected Attributes

string mType
 The instance logic type.
string mTile
 The instance placement tile, or an empty string if unplaced.
string mSite
 The instance placement site, or an empty string if unplaced.
EInstanceBonding mBonding
 The instance bonding.
InstanceReferenceSharedPtr mInstanceReferencePtr
 The module instance reference, if any.
InstancePinMap mInstancePins
 The map of pin names to InstancePin weak pointers.

Friends

class Factory
 The Factory class has direct access to our internals.
class InstancePinBase
 The InstancePin class has direct access to our internals.


Detailed Description

Physical design instance.

This class describes a physical instance in the design.

Todo:
Need a good way of finding the direction of each instance pin.

Definition at line 50 of file Instance.hpp.


Member Typedef Documentation

typedef std::string torc::physical::Instance::string [protected]

Imported type name.

Reimplemented from torc::physical::ConfigMap.

Definition at line 62 of file Instance.hpp.

Map from instance pin name to instance pin.

Definition at line 64 of file Instance.hpp.

typedef InstancePinMap::const_iterator torc::physical::Instance::InstancePinSharedPtrConstIterator

Constant iterator to InstancePin shared pointers.

Definition at line 112 of file Instance.hpp.

Non-constant iterator to InstancePin shared pointers.

Definition at line 114 of file Instance.hpp.


Constructor & Destructor Documentation

torc::physical::Instance::Instance ( const string inName,
const string inType,
const string inTile,
const string inSite,
EInstanceBonding  inBonding,
InstanceReferenceSharedPtr inInstanceReferencePtr 
) [inline, protected]

Protected constructor.

Parameters:
inName The instance name.
inType The instance type.
inTile The instance tile, or an empty string if unplaced.
inSite The instance site, or an empty string if unplaced.
inBonding The specified bonding for unplaced IO, or eInstanceBondingUnknown for placed IO instances and non-IO instances.
inInstanceReferencePtr The module instance reference, if applicable. The default value is almost always correct. Note that instance references are never required for XDL, and are only supported to completely replicated the original design.

Definition at line 104 of file Instance.hpp.


Member Function Documentation

void torc::physical::Instance::addPin ( const InstancePinWeakPtr inInstancePinPtr  )  [protected]

Add the referenced InstancePin to our pin map.

Definition at line 25 of file Instance.cpp.

void torc::physical::Instance::removePin ( const InstancePinWeakPtr inInstancePinPtr  )  [protected]

Remove the referenced InstancePin from our pin map.

Definition at line 33 of file Instance.cpp.

bool torc::physical::Instance::operator== ( const Instance rhs  )  const [inline]

Equality operator.

This function deems instances equal if their names are identical.

Parameters:
rhs The instance to compare against.
Returns:
true if both instance names are identical, or false otherwise.

Definition at line 120 of file Instance.hpp.

void torc::physical::Instance::unplace ( void   )  [inline]

Unplace the instance.

The instance is unplaced by clearing its site and tile. Unplace this instance by clearing its site and tile fields.

Definition at line 125 of file Instance.hpp.

const InstancePinSharedPtrConstIterator torc::physical::Instance::findPin ( const PinName inPinName  )  const [inline]

Returns an InstancePin iterator for the requested pin.

Definition at line 130 of file Instance.hpp.

std::pair<InstancePinSharedPtrConstIterator, InstancePinSharedPtrConstIterator> torc::physical::Instance::findPinRange ( const PinName inPinName  )  const [inline]

Returns a range that encompasses all instance pins for the given pin.

Returns:
A constance iterator pair that encompasses all instance pins for the given pins. Refer to std::pair to determine how to extract the iterators.

Definition at line 138 of file Instance.hpp.

size_t torc::physical::Instance::getPinCount ( const string inPinName  )  const [inline]

Returns the number of instance pins associated with the given pin.

Definition at line 142 of file Instance.hpp.

const string& torc::physical::Instance::getType ( void   )  const [inline]

Returns the logic type for this instance.

Definition at line 146 of file Instance.hpp.

const string& torc::physical::Instance::getTile ( void   )  const [inline]

Returns the placement tile for this instance.

Definition at line 148 of file Instance.hpp.

const string& torc::physical::Instance::getSite ( void   )  const [inline]

Returns the placement site for this instance.

Definition at line 150 of file Instance.hpp.

EInstanceBonding torc::physical::Instance::getBonding ( void   )  const [inline]

Returns the IO bonding for this instance.

Definition at line 152 of file Instance.hpp.

InstanceReferenceSharedPtr torc::physical::Instance::getInstanceReferencePtr ( void   )  const [inline]

Returns the instance reference for this instance, if any.

Definition at line 154 of file Instance.hpp.

void torc::physical::Instance::setType ( const string inType  )  [inline]

Sets the logic type for this instance.

Definition at line 157 of file Instance.hpp.

void torc::physical::Instance::setTile ( const string inTile  )  [inline]

Sets the placement tile for this instance.

Definition at line 159 of file Instance.hpp.

void torc::physical::Instance::setSite ( const string inSite  )  [inline]

Sets the placement site for this instance.

Definition at line 161 of file Instance.hpp.

void torc::physical::Instance::setBonding ( EInstanceBonding  inBonding  )  [inline]

Sets the IO bonding for this instance.

The bonding must be EInstanceBonding::eInstanceBondingUnknown unless this instance is an unplaced IO. For an unplaced IO, the bonding setting determines whether the instance will be placed on a bonded pad or an unbonded pad.

Definition at line 166 of file Instance.hpp.

void torc::physical::Instance::setInstanceReferencePtr ( InstanceReferenceSharedPtr  inInstanceReferenceSharedPtr  )  [inline]

Sets the instance reference for this instance.

If this instance is the instantiation of a module instance, the InstanceReference points back to the original instance in the instantiation module. Instance refrences are rarely used, and almost never needed, and are only supported to faithfully replicate XDL designs.

Definition at line 172 of file Instance.hpp.

InstancePinSharedPtrConstIterator torc::physical::Instance::pinsBegin ( void   )  const [inline]

Returns the begin constant iterator for instance pins.

Definition at line 176 of file Instance.hpp.

InstancePinSharedPtrConstIterator torc::physical::Instance::pinsEnd ( void   )  const [inline]

Returns the end constant iterator for instance pins.

Definition at line 178 of file Instance.hpp.

InstancePinSharedPtrIterator torc::physical::Instance::pinsBegin ( void   )  [inline]

Returns the begin non-constant iterator for instance pins.

Definition at line 180 of file Instance.hpp.

InstancePinSharedPtrIterator torc::physical::Instance::pinsEnd ( void   )  [inline]

Returns the end non-constant iterator for instance pins.

Definition at line 182 of file Instance.hpp.

size_t torc::physical::Instance::getPinCount ( void   )  const [inline]

Returns the number of instance pins in the instance.

Definition at line 184 of file Instance.hpp.


Friends And Related Function Documentation

friend class Factory [friend]

The Factory class has direct access to our internals.

Reimplemented from torc::physical::Progenitor< T >.

Definition at line 54 of file Instance.hpp.

friend class InstancePinBase [friend]

The InstancePin class has direct access to our internals.

This is provided to allow notification when instance pins are added or removed for this object.

Definition at line 58 of file Instance.hpp.


Member Data Documentation

The instance logic type.

The type should be a valid logic type for the target architecture, or the name of a module defined in this design.

Definition at line 69 of file Instance.hpp.

The instance placement tile, or an empty string if unplaced.

Definition at line 71 of file Instance.hpp.

The instance placement site, or an empty string if unplaced.

Definition at line 73 of file Instance.hpp.

The instance bonding.

The bonding must be EInstanceBonding::eInstanceBondingUnknown unless this instance is an unplaced IO. For an unplaced IO, the bonding setting determines whether the instance will be placed on a bonded pad or an unbonded pad.

Definition at line 78 of file Instance.hpp.

The module instance reference, if any.

If this instance is the instantiation of a module instance, the InstanceReference points back to the original instance in the instantiation module. Instance refrences are rarely used, and almost never needed, and are only supported to faithfully replicate XDL designs.

Definition at line 84 of file Instance.hpp.

The map of pin names to InstancePin weak pointers.

Definition at line 86 of file Instance.hpp.


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

Generated on Thu Oct 13 16:50:46 2011 for TORC by  doxygen 1.5.6