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

Physical design net. More...

#include <Net.hpp>

+ Inheritance diagram for torc::physical::Net:
+ Collaboration diagram for torc::physical::Net:

Public Types

typedef
InstancePinSharedPtrVector::const_iterator 
InstancePinSharedPtrConstIterator
 Constant iterator to InstancePin shared pointer objects. More...
 
typedef
InstancePinSharedPtrVector::iterator 
InstancePinSharedPtrIterator
 Non-constant iterator to InstancePin shared pointer objects. More...
 
typedef PipVector::const_iterator PipConstIterator
 Constant iterator to Pip objects. More...
 
typedef PipVector::iterator PipIterator
 Non-constant iterator to Pip objects. More...
 
typedef const_iterator const_iterator
 Constant iterator to {setting,Config} pairs. More...
 
enum  EAnnotationType {
  ePlacerInstanceTypeIndex, ePlacerInstanceSitePtr, ePlacerInstanceDependentInstanceAbove, ePlacerInstanceDependsOnInstanceBelow,
  eRouterNetTilewireSources, eRouterNetTilewireSinks, eRouterNetArcList, eRouterNetRouteNodePtrVector,
  eRouterNetRouteTime, eRouterNetArcVector, eAnnotationGlobalRouter, eAnnotationCount
}
 Enumeration for all types of annotations. More...
 

Public Member Functions

bool containsSource (InstancePinSharedPtr &inInstancePinPtr) const
 Determines whether the given instance pin is a source of this net. More...
 
bool containsSink (InstancePinSharedPtr &inInstancePinPtr) const
 Determines whether the given instance pin is a sink of this net. More...
 
bool containsPip (const Pip &inPip) const
 Determines whether the net contains the given pip. More...
 
void addSource (InstancePinSharedPtr &inInstancePinPtr)
 Adds the given instance pin as a source for this net. More...
 
void addSink (InstancePinSharedPtr &inInstancePinPtr)
 Adds the given instance pin as a sink for this net. More...
 
bool removeSource (InstancePinSharedPtr &inInstancePinPtr)
 Removes the given instance pin from the sources of this net. More...
 
bool removeSink (InstancePinSharedPtr &inInstancePinPtr)
 Removes the given instance pin from the sinks of this net. More...
 
void addPip (const Pip &inPip)
 Adds the given pip to this net. More...
 
bool removePip (const Pip &inPip)
 Removes the given pip from this net. More...
 
void unroute (void)
 Unroute the net. More...
 
bool hasAnySources (void) const
 Returns true if the net has any sources. More...
 
bool hasOneSource (void) const
 Returns true if the net has exactly one source. More...
 
bool hasMultipleSources (void) const
 Returns true if the net has more than one source. More...
 
size_t getSourceCount (void) const
 Returns the number of sources on the net. More...
 
bool hasAnySinks (void) const
 Returns true if the net has any sinks. More...
 
bool hasOneSink (void) const
 Returns true if the net has exactly one sink. More...
 
bool hasMultipleSinks (void) const
 Returns true if the next has more than one sink. More...
 
size_t getSinkCount (void) const
 Returns the number of sinks on the net. More...
 
bool hasAnyPips (void) const
 Returns true if the net has any pips. More...
 
size_t getPipCount (void) const
 Returns the number of pips on the net. More...
 
bool isRouted (void) const
 Returns true if the net has any pips. More...
 
bool isUnrouted (void) const
 Returns true if the net has no pips. More...
 
InstancePinSharedPtrConstIterator sourcesBegin (void) const
 Returns the begin constant iterator for source instance pins. More...
 
InstancePinSharedPtrConstIterator sourcesEnd (void) const
 Returns the end constant iterator for source instance pins. More...
 
InstancePinSharedPtrIterator sourcesBegin (void)
 Returns the begin non-constant iterator for source instance pins. More...
 
InstancePinSharedPtrIterator sourcesEnd (void)
 Returns the end non-constant iterator for source instance pins. More...
 
InstancePinSharedPtrConstIterator sinksBegin (void) const
 Returns the begin constant iterator for sink instance pins. More...
 
InstancePinSharedPtrConstIterator sinksEnd (void) const
 Returns the end constant iterator for sink instance pins. More...
 
InstancePinSharedPtrIterator sinksBegin (void)
 Returns the begin non-constant iterator for sink instance pins. More...
 
InstancePinSharedPtrIterator sinksEnd (void)
 Returns the end non-constant iterator for sink instance pins. More...
 
PipConstIterator pipsBegin (void) const
 Returns the begin constant iterator for pips. More...
 
PipConstIterator pipsEnd (void) const
 Returns the end constant iterator for pips. More...
 
PipIterator pipsBegin (void)
 Returns the begin non-constant iterator for pips. More...
 
PipIterator pipsEnd (void)
 Returns the end non-constant iterator for pips. More...
 
ENetType getNetType (void) const
 Returns the net power type. See ENetPowerType. More...
 
void setNetType (ENetType inNetType)
 Sets the net power type. See ENetPowerType. More...
 
bool operator== (const Net &rhs) const
 Equality operator. More...
 
void deprecatedSetName (const string &inName)
 Illegally sets the object name. More...
 
const stringgetName (void) const
 Returns the object name. More...
 
bool operator== (const Named &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_iterator configBegin (void) const
 Returns the begin constant iterator for configurations. More...
 
const_iterator configEnd (void) const
 Returns the end constant iterator for configurations. More...
 
size_t getConfigCount (void) const
 Returns the number of configurations in the map. More...
 
bool configIsEmpty (void) const
 Returns true if the configuration map is empty. More...
 
void clearConfig (void)
 Clears the configuration map. More...
 
bool hasConfig (const string &inSetting) const
 Returns true if the specified setting exists in the map. More...
 
bool getConfig (const string &inSetting, Config &outConfig)
 Looks up the specified setting in the map. More...
 
bool getConfig (const string &inSetting, string &outName, string &outValue)
 Looks up the specified setting in the map. More...
 
void setConfig (const string &inSetting, const Config &inConfig)
 Sets the configuration for the given setting. More...
 
void setConfig (const string &inSetting, const string &inName, const string &inValue)
 Sets the configuration for the given setting. More...
 
bool removeConfig (const string &inSetting)
 Removes the named configuration. More...
 
void addConfigs (const ConfigMap &inConfigMap)
 Merges the configurations from the given ConfigMap into this one. More...
 
std::pair< iterator, iterator > getMultiConfigValues (const string &inSetting)
 Returns a range that encompasses all of the configurations for the given setting. More...
 
size_type getMultiConfigCount (const string &inSetting)
 Returns the number of configurations for the given setting. More...
 
boost::any getAnnotation (uint32 inKey)
 Get an annotation. Returns an empty annotation if the index doesn't exist. More...
 
void setAnnotation (uint32 inKey, boost::any inValue)
 Set an annotation. More...
 
void removeAnnotation (uint32 inKey)
 Remove an annotation. More...
 
bool hasAnnotation (uint32 inKey)
 Check if an annotation exists. More...
 

Static Public Member Functions

static bool allowConfigDuplicates (const string &inSetting)
 Returns true if multiple configurations are allowed for the given setting. More...
 

Protected Types

typedef std::string string
 Imported type name. More...
 
typedef boost::weak_ptr< class
Circuit
WeakPtrType
 Weak pointer of our own type. More...
 
typedef boost::shared_ptr
< class Circuit
SharedPtrType
 Shared pointer of our own type. More...
 
typedef std::multimap
< std::string, Config
super
 Convenience typedef to represent our superclass. More...
 
typedef boost::weak_ptr< NetWeakPtrType
 Weak pointer of our own type. More...
 
typedef boost::shared_ptr< NetSharedPtrType
 Shared pointer of our own type. More...
 

Protected Member Functions

 Net (const string &inName, ENetType inNetType)
 Protected constructor. More...
 
void setName (const string &inName)
 Sets the object name. 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

ENetType mNetType
 The net power type. See ENetType. More...
 
InstancePinSharedPtrVector mSources
 Vector of instance pin shared pointer sources for the net. More...
 
InstancePinSharedPtrVector mSinks
 Vector of instance pin shared pointer sinks for the net. More...
 
PipVector mPips
 Vector of pips for the net. More...
 
string mName
 The name of the object. More...
 
WeakPtrType mParentWeakPtr
 Weak pointer to the parent. More...
 
SequenceIndex mNextSequenceIndex
 Sequence index to use for the next configuration added to this map. More...
 
boost::unordered_map
< boost::uint32_t, boost::any > 
mAnnotations
 Map containing any annotations. More...
 
WeakPtrType mSelfWeakPtr
 Weak pointer this object. More...
 

Friends

class Factory
 The Factory class has direct access to our internals. More...
 

Detailed Description

Physical design net.

The Net class owns its instance pins and its pips, and is responsible for deleting them.

Todo:
Consider checking for duplicates whenever a source, sink, or pip is added. On the other hand, we provide the functions to check for existing resources, so perhaps we can just leave it to the user.

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

Member Typedef Documentation

Constant iterator to {setting,Config} pairs.

Definition at line 52 of file ConfigMap.hpp.

typedef InstancePinSharedPtrVector::const_iterator torc::physical::Net::InstancePinSharedPtrConstIterator

Constant iterator to InstancePin shared pointer objects.

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

typedef InstancePinSharedPtrVector::iterator torc::physical::Net::InstancePinSharedPtrIterator

Non-constant iterator to InstancePin shared pointer objects.

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

typedef PipVector::const_iterator torc::physical::Net::PipConstIterator

Constant iterator to Pip objects.

Definition at line 73 of file physical/Net.hpp.

typedef PipVector::iterator torc::physical::Net::PipIterator

Non-constant iterator to Pip objects.

Definition at line 75 of file physical/Net.hpp.

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

Shared pointer of our own type.

Definition at line 35 of file Progeny.hpp.

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

Shared pointer of our own type.

Definition at line 52 of file Progenitor.hpp.

typedef std::string torc::physical::Net::string
protected

Imported type name.

Definition at line 50 of file physical/Net.hpp.

typedef std::multimap<std::string, Config> torc::physical::ConfigMap::super
protectedinherited

Convenience typedef to represent our superclass.

Definition at line 45 of file ConfigMap.hpp.

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

Weak pointer of our own type.

Definition at line 33 of file Progeny.hpp.

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

Weak pointer of our own type.

Definition at line 50 of file Progenitor.hpp.

Member Enumeration Documentation

Enumeration for all types of annotations.

Enumerator
ePlacerInstanceTypeIndex 
ePlacerInstanceSitePtr 
ePlacerInstanceDependentInstanceAbove 
ePlacerInstanceDependsOnInstanceBelow 
eRouterNetTilewireSources 
eRouterNetTilewireSinks 
eRouterNetArcList 
eRouterNetRouteNodePtrVector 
eRouterNetRouteTime 
eRouterNetArcVector 
eAnnotationGlobalRouter 
eAnnotationCount 

Definition at line 57 of file Annotated.hpp.

Constructor & Destructor Documentation

torc::physical::Net::Net ( const string inName,
ENetType  inNetType 
)
inlineprotected

Protected constructor.

Parameters
inNameThe net name.
inNetTypeThe net power type.

Definition at line 64 of file physical/Net.hpp.

64  : Renamable<Circuit>(inName), ConfigMap(),
65  mNetType(inNetType) {}
ENetType mNetType
The net power type. See ENetType.
ConfigMap(void)
Null constructor.
Definition: ConfigMap.hpp:55

Member Function Documentation

void torc::physical::ConfigMap::addConfigs ( const ConfigMap inConfigMap)
inlineinherited

Merges the configurations from the given ConfigMap into this one.

For each setting, if the setting does not already exist in the map, it is added. If the setting does exist, then the incoming configuration either replaces the existing setting (in the case of regular settings), or is added to the map (in the case of special settings for which multiple configurations are allowed).

Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 159 of file ConfigMap.hpp.

159  {
160  if(inConfigMap.empty()) return;
161  /// \todo Acquire mutex.
162  const_iterator p = inConfigMap.begin();
163  const_iterator e = inConfigMap.end();
164  while(p != e) {
165  // look up the config information
166  const string& setting = p->first;
167  const Config& config = p->second;
168  // try to insert the setting into the map (while respecting our special semantics)
169  setConfig(setting, config);
170  p++;
171  }
172  /// \todo Release mutex.
173  }
void setConfig(const string &inSetting, const Config &inConfig)
Sets the configuration for the given setting.
Definition: ConfigMap.hpp:119
const_iterator const_iterator
Constant iterator to {setting,Config} pairs.
Definition: ConfigMap.hpp:52

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::physical::Net::addPip ( const Pip inPip)
inline

Adds the given pip to this net.

Duplicate pips are not currently discarded.

Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 140 of file physical/Net.hpp.

140  {
141  /// \todo Acquire mutex.
142  mPips.push_back(inPip);
143  const_cast<Pip&>(inPip).setParentWeakPtr(mSelfWeakPtr);
144  /// \todo Release mutex.
145  }
void setParentWeakPtr(WeakPtrType inParentPtr)
Sets the weak pointer to the parent.
Definition: Progeny.hpp:49
PipVector mPips
Vector of pips for the net.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57

+ Here is the call graph for this function:

void torc::physical::Net::addSink ( InstancePinSharedPtr inInstancePinPtr)
inline

Adds the given instance pin as a sink for this net.

Duplicate sinks are not currently discarded.

Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 104 of file physical/Net.hpp.

104  {
105  /// \todo Acquire mutex.
106  mSinks.push_back(inInstancePinPtr);
107  inInstancePinPtr->setParentWeakPtr(mSelfWeakPtr);
108  inInstancePinPtr->addToInstance();
109 // inInstancePinPtr->getInstancePtr().lock()->addPin(inInstancePinPtr);
110  /// \todo Release mutex.
111  }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57
void torc::physical::Net::addSource ( InstancePinSharedPtr inInstancePinPtr)
inline

Adds the given instance pin as a source for this net.

Duplicate sources are not currently discarded.

Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 94 of file physical/Net.hpp.

94  {
95  /// \todo Acquire mutex.
96  mSources.push_back(inInstancePinPtr);
97  inInstancePinPtr->setParentWeakPtr(mSelfWeakPtr);
98  inInstancePinPtr->addToInstance();
99 // inInstancePinPtr->getInstancePtr().lock()->addPin(inInstancePinPtr);
100  /// \todo Release mutex.
101  }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
Definition: Progenitor.hpp:57
static bool torc::physical::ConfigMap::allowConfigDuplicates ( const string inSetting)
inlinestaticinherited

Returns true if multiple configurations are allowed for the given setting.

Special Xilinx settings prefixed with an underscore may have multiple configurations in the map.

Definition at line 177 of file ConfigMap.hpp.

177  {
178  return inSetting.size() >= 1 && inSetting[0] == '_';
179  }

+ Here is the caller graph for this function:

void torc::physical::ConfigMap::clearConfig ( void  )
inlineinherited

Clears the configuration map.

Definition at line 67 of file ConfigMap.hpp.

67 { ConfigMap::clear(); }

+ Here is the caller graph for this function:

const_iterator torc::physical::ConfigMap::configBegin ( void  ) const
inlineinherited

Returns the begin constant iterator for configurations.

Definition at line 58 of file ConfigMap.hpp.

58 { return super::begin(); }

+ Here is the caller graph for this function:

const_iterator torc::physical::ConfigMap::configEnd ( void  ) const
inlineinherited

Returns the end constant iterator for configurations.

Definition at line 60 of file ConfigMap.hpp.

60 { return super::end(); }

+ Here is the caller graph for this function:

bool torc::physical::ConfigMap::configIsEmpty ( void  ) const
inlineinherited

Returns true if the configuration map is empty.

Definition at line 65 of file ConfigMap.hpp.

65 { return super::empty(); }

+ Here is the caller graph for this function:

bool torc::physical::Net::containsPip ( const Pip inPip) const
inline

Determines whether the net contains the given pip.

Returns
true if the net contains the given pip, or false otherwise.

Definition at line 89 of file physical/Net.hpp.

89  {
90  return std::find(pipsBegin(), pipsEnd(), inPip) != pipsEnd();
91  }
PipConstIterator pipsBegin(void) const
Returns the begin constant iterator for pips.
PipConstIterator pipsEnd(void) const
Returns the end constant iterator for pips.

+ Here is the call graph for this function:

bool torc::physical::Net::containsSink ( InstancePinSharedPtr inInstancePinPtr) const
inline

Determines whether the given instance pin is a sink of this net.

Returns
true if the given instance pin is a sink of this net, or false otherwise.

Definition at line 84 of file physical/Net.hpp.

84  {
85  return std::find(sinksBegin(), sinksEnd(), inInstancePinPtr) != sinksEnd();
86  }
InstancePinSharedPtrConstIterator sinksBegin(void) const
Returns the begin constant iterator for sink instance pins.
InstancePinSharedPtrConstIterator sinksEnd(void) const
Returns the end constant iterator for sink instance pins.

+ Here is the call graph for this function:

bool torc::physical::Net::containsSource ( InstancePinSharedPtr inInstancePinPtr) const
inline

Determines whether the given instance pin is a source of this net.

Returns
true if the given instance pin is a source of this net, or false otherwise.

Definition at line 79 of file physical/Net.hpp.

79  {
80  return std::find(sourcesBegin(), sourcesEnd(), inInstancePinPtr) != sourcesEnd();
81  }
InstancePinSharedPtrConstIterator sourcesEnd(void) const
Returns the end constant iterator for source instance pins.
InstancePinSharedPtrConstIterator sourcesBegin(void) const
Returns the begin constant iterator for source instance pins.

+ Here is the call graph for this function:

void torc::physical::Renamable< Circuit >::deprecatedSetName ( const string inName)
inlineinherited

Illegally sets the object name.

Deprecated:
.

Definition at line 61 of file physical/Renamable.hpp.

61 { mName = inName; }
string mName
The name of the object.
Definition: Named.hpp:43
boost::any torc::common::Annotated::getAnnotation ( uint32  inKey)
inlineinherited

Get an annotation. Returns an empty annotation if the index doesn't exist.

Definition at line 45 of file Annotated.hpp.

45 { return mAnnotations[inKey]; }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

bool torc::physical::ConfigMap::getConfig ( const string inSetting,
Config outConfig 
)
inlineinherited

Looks up the specified setting in the map.

Parameters
inSettingThe setting to query.
outConfigReference to a configuration to be populated if the setting exists in the map. Default values are used if the setting does not exist.
Note
If this is a special setting with multiple configuration entries, only the first one will be placed in outConfig.
Returns
true if the settings exists in the map, or false otherwise.

Definition at line 82 of file ConfigMap.hpp.

82  {
83  // employ friendship status to reach in and reference the config name and value members
84  return getConfig(inSetting, outConfig.mName, outConfig.mValue);
85  }
bool getConfig(const string &inSetting, Config &outConfig)
Looks up the specified setting in the map.
Definition: ConfigMap.hpp:82

+ Here is the caller graph for this function:

bool torc::physical::ConfigMap::getConfig ( const string inSetting,
string outName,
string outValue 
)
inlineinherited

Looks up the specified setting in the map.

Parameters
inSettingThe setting to query.
outNameReference to a string to accept the configuration name, or the default name if the setting does not exist.
outValueReference to a string to accept the configuration value, or the default value if the setting does not exist.
Note
If this is a special setting with multiple configuration entries, only the first one will be placed in outName and outValue.
Returns
true if the settings exists in the map, or false otherwise.
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 95 of file ConfigMap.hpp.

95  {
96  /// \todo Acquire mutex.
97  iterator result = find(inSetting);
98  if(result == end()) {
99  // if the key doesn't exist, return default values
100  outName = Config::sConfigDefaultName;
101  outValue = Config::sConfigDefaultValue;
102  return false;
103  } else {
104  // otherwise return the config data
105  Config& config = result->second;
106  outName = config.getName();
107  outValue = config.getValue();
108  return true;
109  }
110  /// \todo Release mutex.
111  }
static const char * sConfigDefaultValue
Default configuration value.
Definition: Config.hpp:53
static const char * sConfigDefaultName
Default configuration name.
Definition: Config.hpp:51

+ Here is the call graph for this function:

size_t torc::physical::ConfigMap::getConfigCount ( void  ) const
inlineinherited

Returns the number of configurations in the map.

Definition at line 63 of file ConfigMap.hpp.

63 { return super::size(); }

+ Here is the caller graph for this function:

size_type torc::physical::ConfigMap::getMultiConfigCount ( const string inSetting)
inlineinherited

Returns the number of configurations for the given setting.

Definition at line 186 of file ConfigMap.hpp.

186 { return count(inSetting); }

+ Here is the caller graph for this function:

std::pair<iterator, iterator> torc::physical::ConfigMap::getMultiConfigValues ( const string inSetting)
inlineinherited

Returns a range that encompasses all of the configurations for the given setting.

Returns
An iterator pair that encompasses all configurations for the setting. Refer to std::pair to determine how to extract the iterators.

Definition at line 183 of file ConfigMap.hpp.

184  { return equal_range(inSetting); }

+ Here is the caller graph for this function:

const string& torc::physical::Named::getName ( void  ) const
inlineinherited

Returns the object name.

Definition at line 51 of file Named.hpp.

51 { return mName; }
string mName
The name of the object.
Definition: Named.hpp:43

+ Here is the caller graph for this function:

ENetType torc::physical::Net::getNetType ( void  ) const
inline

Returns the net power type. See ENetPowerType.

Definition at line 217 of file physical/Net.hpp.

217 { return mNetType; }
ENetType mNetType
The net power type. See ENetType.

+ Here is the caller graph for this function:

const SharedPtrType& torc::physical::Progeny< class Circuit >::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 Circuit >::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
size_t torc::physical::Net::getPipCount ( void  ) const
inline

Returns the number of pips on the net.

Definition at line 185 of file physical/Net.hpp.

185 { return mPips.size(); }
PipVector mPips
Vector of pips for the net.

+ Here is the caller graph for this function:

const WeakPtrType& torc::physical::Progenitor< Net >::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
size_t torc::physical::Net::getSinkCount ( void  ) const
inline

Returns the number of sinks on the net.

Definition at line 181 of file physical/Net.hpp.

181 { return mSinks.size(); }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.

+ Here is the caller graph for this function:

size_t torc::physical::Net::getSourceCount ( void  ) const
inline

Returns the number of sources on the net.

Definition at line 173 of file physical/Net.hpp.

173 { return mSources.size(); }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.

+ Here is the caller graph for this function:

bool torc::common::Annotated::hasAnnotation ( uint32  inKey)
inlineinherited

Check if an annotation exists.

Definition at line 51 of file Annotated.hpp.

51  {
52  return (mAnnotations.find(inKey) != mAnnotations.end());
53  }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

bool torc::physical::Net::hasAnyPips ( void  ) const
inline

Returns true if the net has any pips.

Definition at line 183 of file physical/Net.hpp.

183 { return !mPips.empty(); }
PipVector mPips
Vector of pips for the net.

+ Here is the caller graph for this function:

bool torc::physical::Net::hasAnySinks ( void  ) const
inline

Returns true if the net has any sinks.

Definition at line 175 of file physical/Net.hpp.

175 { return !mSinks.empty(); }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.
bool torc::physical::Net::hasAnySources ( void  ) const
inline

Returns true if the net has any sources.

Definition at line 167 of file physical/Net.hpp.

167 { return !mSources.empty(); }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
bool torc::physical::ConfigMap::hasConfig ( const string inSetting) const
inlineinherited

Returns true if the specified setting exists in the map.

Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 69 of file ConfigMap.hpp.

69  {
70  /// \todo Acquire mutex.
71  const_iterator result = find(inSetting);
72  return result != end();
73  /// \todo Release mutex.
74  }
const_iterator const_iterator
Constant iterator to {setting,Config} pairs.
Definition: ConfigMap.hpp:52

+ Here is the caller graph for this function:

bool torc::physical::Net::hasMultipleSinks ( void  ) const
inline

Returns true if the next has more than one sink.

Definition at line 179 of file physical/Net.hpp.

179 { return mSinks.size() > 1; }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.
bool torc::physical::Net::hasMultipleSources ( void  ) const
inline

Returns true if the net has more than one source.

Definition at line 171 of file physical/Net.hpp.

171 { return mSources.size() > 1; }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
bool torc::physical::Net::hasOneSink ( void  ) const
inline

Returns true if the net has exactly one sink.

Definition at line 177 of file physical/Net.hpp.

177 { return mSinks.size() == 1; }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.
bool torc::physical::Net::hasOneSource ( void  ) const
inline

Returns true if the net has exactly one source.

Definition at line 169 of file physical/Net.hpp.

169 { return mSources.size() == 1; }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
bool torc::physical::Net::isRouted ( void  ) const
inline

Returns true if the net has any pips.

Definition at line 187 of file physical/Net.hpp.

187 { return hasAnyPips(); }
bool hasAnyPips(void) const
Returns true if the net has any pips.

+ Here is the call graph for this function:

bool torc::physical::Net::isUnrouted ( void  ) const
inline

Returns true if the net has no pips.

Definition at line 189 of file physical/Net.hpp.

189 { return !hasAnyPips(); }
bool hasAnyPips(void) const
Returns true if the net has any pips.

+ Here is the call graph for this function:

bool torc::physical::Named::operator== ( const Named rhs) const
inlineinherited

Equality operator.

Definition at line 54 of file Named.hpp.

54 { return mName == rhs.mName; }
string mName
The name of the object.
Definition: Named.hpp:43
bool torc::physical::Net::operator== ( const Net rhs) const
inline

Equality operator.

This function deems nets equal if their names are identical.

Parameters
rhsThe net to compare against.
Returns
true if both net names are identical, or false otherwise.

Definition at line 225 of file physical/Net.hpp.

225 { return mName == rhs.mName; }
string mName
The name of the object.
Definition: Named.hpp:43
PipConstIterator torc::physical::Net::pipsBegin ( void  ) const
inline

Returns the begin constant iterator for pips.

Definition at line 208 of file physical/Net.hpp.

208 { return mPips.begin(); }
PipVector mPips
Vector of pips for the net.

+ Here is the caller graph for this function:

PipIterator torc::physical::Net::pipsBegin ( void  )
inline

Returns the begin non-constant iterator for pips.

Definition at line 212 of file physical/Net.hpp.

212 { return mPips.begin(); }
PipVector mPips
Vector of pips for the net.
PipConstIterator torc::physical::Net::pipsEnd ( void  ) const
inline

Returns the end constant iterator for pips.

Definition at line 210 of file physical/Net.hpp.

210 { return mPips.end(); }
PipVector mPips
Vector of pips for the net.

+ Here is the caller graph for this function:

PipIterator torc::physical::Net::pipsEnd ( void  )
inline

Returns the end non-constant iterator for pips.

Definition at line 214 of file physical/Net.hpp.

214 { return mPips.end(); }
PipVector mPips
Vector of pips for the net.
void torc::common::Annotated::removeAnnotation ( uint32  inKey)
inlineinherited

Remove an annotation.

Definition at line 49 of file Annotated.hpp.

49 { mAnnotations.erase(inKey); }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

bool torc::physical::ConfigMap::removeConfig ( const string inSetting)
inlineinherited

Removes the named configuration.

Parameters
inSettingThe configuration to remove.
Returns
true if the configuration was removed, or false if the configuration did not exist.
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 145 of file ConfigMap.hpp.

145  {
146  /// \todo Acquire mutex.
147  iterator e = end();
148  iterator result = super::find(inSetting);
149  if(result == e) return false;
150  erase(result);
151  /// \todo Release mutex.
152  return true;
153  }
bool torc::physical::Net::removePip ( const Pip inPip)
inline

Removes the given pip from this net.

Returns
true if the pip was removed from this net, or false if it was not found.
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 148 of file physical/Net.hpp.

148  {
149  /// \todo Acquire mutex.
150  // look up the pip
151  PipIterator e = pipsEnd();
152  PipIterator result = std::find(pipsBegin(), e, inPip);
153  // do nothing if the pip doesn't exist
154  if(result == e) return false;
155  // erase the pip
156  mPips.erase(result);
157  /// \todo Release mutex.
158  return true;
159  }
PipConstIterator pipsBegin(void) const
Returns the begin constant iterator for pips.
PipVector mPips
Vector of pips for the net.
PipConstIterator pipsEnd(void) const
Returns the end constant iterator for pips.
PipVector::iterator PipIterator
Non-constant iterator to Pip objects.

+ Here is the call graph for this function:

bool torc::physical::Net::removeSink ( InstancePinSharedPtr inInstancePinPtr)
inline

Removes the given instance pin from the sinks of this net.

Returns
true if the instance pin was removed from the sink list, or false if it was not found.
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 128 of file physical/Net.hpp.

128  {
129  /// \todo Acquire mutex.
131  InstancePinSharedPtrIterator result = std::find(sinksBegin(), e, inInstancePinPtr);
132  if(result == e) return false;
133  inInstancePinPtr->removeFromInstance();
134  mSinks.erase(result);
135  /// \todo Release mutex.
136  return true;
137  }
InstancePinSharedPtrConstIterator sinksBegin(void) const
Returns the begin constant iterator for sink instance pins.
InstancePinSharedPtrConstIterator sinksEnd(void) const
Returns the end constant iterator for sink instance pins.
InstancePinSharedPtrVector::iterator InstancePinSharedPtrIterator
Non-constant iterator to InstancePin shared pointer objects.
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.

+ Here is the call graph for this function:

bool torc::physical::Net::removeSource ( InstancePinSharedPtr inInstancePinPtr)
inline

Removes the given instance pin from the sources of this net.

Returns
true if the instance pin was removed from the source list, or false if it was not found.
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 115 of file physical/Net.hpp.

115  {
116  /// \todo Acquire mutex.
118  InstancePinSharedPtrIterator result = std::find(sourcesBegin(), e, inInstancePinPtr);
119  if(result == e) return false;
120  inInstancePinPtr->removeFromInstance();
121  mSources.erase(result);
122  /// \todo Release mutex.
123  return true;
124  }
InstancePinSharedPtrConstIterator sourcesEnd(void) const
Returns the end constant iterator for source instance pins.
InstancePinSharedPtrVector::iterator InstancePinSharedPtrIterator
Non-constant iterator to InstancePin shared pointer objects.
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
InstancePinSharedPtrConstIterator sourcesBegin(void) const
Returns the begin constant iterator for source instance pins.

+ Here is the call graph for this function:

void torc::physical::Progeny< class Circuit >::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::common::Annotated::setAnnotation ( uint32  inKey,
boost::any  inValue 
)
inlineinherited

Set an annotation.

Definition at line 47 of file Annotated.hpp.

47 { mAnnotations[inKey] = inValue; }
boost::unordered_map< boost::uint32_t, boost::any > mAnnotations
Map containing any annotations.
Definition: Annotated.hpp:34

+ Here is the caller graph for this function:

void torc::physical::ConfigMap::setConfig ( const string inSetting,
const Config inConfig 
)
inlineinherited

Sets the configuration for the given setting.

If this is a regular setting, then any existing configuration for the setting will be replaced, but if this is a special setting for which multiple configurations are allowed, it will be added to the map alongside the existing configurations.

Parameters
inSettingThe setting of interest.
inConfigThe configuration to set.

Definition at line 119 of file ConfigMap.hpp.

119  {
120  setConfig(inSetting, inConfig.getName(), inConfig.getValue());
121  }
void setConfig(const string &inSetting, const Config &inConfig)
Sets the configuration for the given setting.
Definition: ConfigMap.hpp:119

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::physical::ConfigMap::setConfig ( const string inSetting,
const string inName,
const string inValue 
)
inlineinherited

Sets the configuration for the given setting.

If this is a regular setting, then any existing configuration for the setting will be replaced, but if this is a special setting for which multiple configurations are allowed, it will be added to the map alongside the existing configurations.

Parameters
inSettingThe setting of interest.
inNameThe configuration name to set.
inValueThe configuration value to set.
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 130 of file ConfigMap.hpp.

130  {
131  /// \todo Acquire mutex.
132  // if duplicates are disallowed for this setting, erase any matching entries
133  if(!allowConfigDuplicates(inSetting)) {
134  std::pair<iterator, iterator> range = equal_range(inSetting);
135  if(range.first != range.second) erase(range.first, range.second);
136  }
137  // insert the config entry
138  insert(make_pair(inSetting, Config(inName, inValue, mNextSequenceIndex++)));
139  /// \todo Release mutex.
140  }
static bool allowConfigDuplicates(const string &inSetting)
Returns true if multiple configurations are allowed for the given setting.
Definition: ConfigMap.hpp:177
SequenceIndex mNextSequenceIndex
Sequence index to use for the next configuration added to this map.
Definition: ConfigMap.hpp:48

+ Here is the call graph for this function:

void torc::physical::Renamable< Circuit >::setName ( const string inName)
inlineprotectedinherited

Sets the object name.

Definition at line 52 of file physical/Renamable.hpp.

52 { mName = inName; }
string mName
The name of the object.
Definition: Named.hpp:43
void torc::physical::Net::setNetType ( ENetType  inNetType)
inline

Sets the net power type. See ENetPowerType.

Definition at line 219 of file physical/Net.hpp.

219 { mNetType = inNetType; }
ENetType mNetType
The net power type. See ENetType.
void torc::physical::Progeny< class Circuit >::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

+ Here is the caller graph for this function:

void torc::physical::Progenitor< Net >::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
InstancePinSharedPtrConstIterator torc::physical::Net::sinksBegin ( void  ) const
inline

Returns the begin constant iterator for sink instance pins.

Definition at line 200 of file physical/Net.hpp.

200 { return mSinks.begin(); }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.

+ Here is the caller graph for this function:

InstancePinSharedPtrIterator torc::physical::Net::sinksBegin ( void  )
inline

Returns the begin non-constant iterator for sink instance pins.

Definition at line 204 of file physical/Net.hpp.

204 { return mSinks.begin(); }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.
InstancePinSharedPtrConstIterator torc::physical::Net::sinksEnd ( void  ) const
inline

Returns the end constant iterator for sink instance pins.

Definition at line 202 of file physical/Net.hpp.

202 { return mSinks.end(); }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.

+ Here is the caller graph for this function:

InstancePinSharedPtrIterator torc::physical::Net::sinksEnd ( void  )
inline

Returns the end non-constant iterator for sink instance pins.

Definition at line 206 of file physical/Net.hpp.

206 { return mSinks.end(); }
InstancePinSharedPtrVector mSinks
Vector of instance pin shared pointer sinks for the net.
InstancePinSharedPtrConstIterator torc::physical::Net::sourcesBegin ( void  ) const
inline

Returns the begin constant iterator for source instance pins.

Definition at line 192 of file physical/Net.hpp.

192 { return mSources.begin(); }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.

+ Here is the caller graph for this function:

InstancePinSharedPtrIterator torc::physical::Net::sourcesBegin ( void  )
inline

Returns the begin non-constant iterator for source instance pins.

Definition at line 196 of file physical/Net.hpp.

196 { return mSources.begin(); }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
InstancePinSharedPtrConstIterator torc::physical::Net::sourcesEnd ( void  ) const
inline

Returns the end constant iterator for source instance pins.

Definition at line 194 of file physical/Net.hpp.

194 { return mSources.end(); }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.

+ Here is the caller graph for this function:

InstancePinSharedPtrIterator torc::physical::Net::sourcesEnd ( void  )
inline

Returns the end non-constant iterator for source instance pins.

Definition at line 198 of file physical/Net.hpp.

198 { return mSources.end(); }
InstancePinSharedPtrVector mSources
Vector of instance pin shared pointer sources for the net.
void torc::physical::Net::unroute ( void  )
inline

Unroute the net.

The net is unrouted by clearing its pip list.

Definition at line 162 of file physical/Net.hpp.

162  {
163  mPips.clear();
164  }
PipVector mPips
Vector of pips for the net.

Friends And Related Function Documentation

friend class Factory
friend

The Factory class has direct access to our internals.

Definition at line 46 of file physical/Net.hpp.

Field Documentation

boost::unordered_map<boost::uint32_t, boost::any> torc::common::Annotated::mAnnotations
protectedinherited

Map containing any annotations.

Definition at line 34 of file Annotated.hpp.

string torc::physical::Named::mName
protectedinherited

The name of the object.

Definition at line 43 of file Named.hpp.

ENetType torc::physical::Net::mNetType
protected

The net power type. See ENetType.

Definition at line 53 of file physical/Net.hpp.

SequenceIndex torc::physical::ConfigMap::mNextSequenceIndex
protectedinherited

Sequence index to use for the next configuration added to this map.

Definition at line 48 of file ConfigMap.hpp.

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

Weak pointer to the parent.

Definition at line 38 of file Progeny.hpp.

PipVector torc::physical::Net::mPips
protected

Vector of pips for the net.

Definition at line 59 of file physical/Net.hpp.

WeakPtrType torc::physical::Progenitor< Net >::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.

InstancePinSharedPtrVector torc::physical::Net::mSinks
protected

Vector of instance pin shared pointer sinks for the net.

Definition at line 57 of file physical/Net.hpp.

InstancePinSharedPtrVector torc::physical::Net::mSources
protected

Vector of instance pin shared pointer sources for the net.

Definition at line 55 of file physical/Net.hpp.


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