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

Routing net. More...

#include <RoutingNet.hpp>

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

Public Member Functions

 RoutingNet (NetSharedPtr snet)
 Constructor. More...
 
NetSharedPtr getSuperNet (void)
 Returns net supernet. More...
 
NetSharedPtr setSuperNet (NetSharedPtr snet)
 Sets super net. More...
 
size_t getPathCount (size_t index)
 Returns path count for pin index. More...
 
bool setPathCount (size_t index, size_t pCount)
 Sets path count for pin index. More...
 
size_t getPathCount (InstancePinSharedPtr pinPtr)
 Returns path count for pin. More...
 
bool setPathCount (InstancePinSharedPtr pinPtr, size_t pCount)
 Sets path count for pin. More...
 
bool operator== (const RoutingNet &rhs) const
 Equality operator. More...
 
const stringgetName (void) const
 Returns the object name. More...
 
bool operator== (const Named &rhs) const
 Equality operator. More...
 

Protected Types

typedef std::string string
 Imported type name. More...
 

Protected Attributes

NetSharedPtr superNet
 The original net. More...
 
std::vector< size_t > pathCounts
 combinational path count More...
 
string mName
 The name of the object. More...
 

Friends

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

Detailed Description

Routing net.

Definition at line 30 of file RoutingNet.hpp.

Member Typedef Documentation

typedef std::string torc::physical::RoutingNet::string
protected

Imported type name.

Definition at line 37 of file RoutingNet.hpp.

Constructor & Destructor Documentation

torc::physical::RoutingNet::RoutingNet ( NetSharedPtr  snet)
inline

Constructor.

Parameters
originalnet

Definition at line 50 of file RoutingNet.hpp.

50  : Named(snet->getName()) {
51  pathCounts.resize(snet->getSourceCount() + snet->getSinkCount(),0);
52  superNet=snet;
53  }
Named(const string &inName)
Constructor which must specify the object name.
Definition: Named.hpp:48
std::vector< size_t > pathCounts
combinational path count
Definition: RoutingNet.hpp:43
NetSharedPtr superNet
The original net.
Definition: RoutingNet.hpp:41

Member Function Documentation

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:

size_t torc::physical::RoutingNet::getPathCount ( size_t  index)
inline

Returns path count for pin index.

Definition at line 67 of file RoutingNet.hpp.

67  {
68  return pathCounts[index];
69  }
std::vector< size_t > pathCounts
combinational path count
Definition: RoutingNet.hpp:43

+ Here is the caller graph for this function:

size_t torc::physical::RoutingNet::getPathCount ( InstancePinSharedPtr  pinPtr)
inline

Returns path count for pin.

Definition at line 78 of file RoutingNet.hpp.

78  {
79  size_t index =0;
80  Net::InstancePinSharedPtrIterator sip = superNet->sourcesBegin();
81  Net::InstancePinSharedPtrIterator sie = superNet->sourcesEnd();
82  while(sip != sie){
83  if(**sip == *pinPtr)
84  return getPathCount(index);;
85  ++index;
86  ++sip;
87  }
88 
89  sip = superNet->sinksBegin();
90  sie = superNet->sinksEnd();
91  while(sip != sie){
92  if(**sip == *pinPtr)
93  return getPathCount(index);;
94  ++index;
95  ++sip;
96  }
97  return getPathCount(index);
98  }
InstancePinSharedPtrVector::iterator InstancePinSharedPtrIterator
Non-constant iterator to InstancePin shared pointer objects.
NetSharedPtr superNet
The original net.
Definition: RoutingNet.hpp:41
size_t getPathCount(size_t index)
Returns path count for pin index.
Definition: RoutingNet.hpp:67

+ Here is the call graph for this function:

NetSharedPtr torc::physical::RoutingNet::getSuperNet ( void  )
inline

Returns net supernet.

Definition at line 57 of file RoutingNet.hpp.

57  {
58  return superNet;
59  }
NetSharedPtr superNet
The original net.
Definition: RoutingNet.hpp:41
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::RoutingNet::operator== ( const RoutingNet 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 127 of file RoutingNet.hpp.

127 { return getName() == rhs.getName(); }
const string & getName(void) const
Returns the object name.
Definition: Named.hpp:51

+ Here is the call graph for this function:

bool torc::physical::RoutingNet::setPathCount ( size_t  index,
size_t  pCount 
)
inline

Sets path count for pin index.

Definition at line 72 of file RoutingNet.hpp.

72  {
73  pathCounts[index] = pCount;
74  return true;
75  }
std::vector< size_t > pathCounts
combinational path count
Definition: RoutingNet.hpp:43

+ Here is the caller graph for this function:

bool torc::physical::RoutingNet::setPathCount ( InstancePinSharedPtr  pinPtr,
size_t  pCount 
)
inline

Sets path count for pin.

Definition at line 101 of file RoutingNet.hpp.

101  {
102  size_t index =0;
103  Net::InstancePinSharedPtrIterator sip = superNet->sourcesBegin();
104  Net::InstancePinSharedPtrIterator sie = superNet->sourcesEnd();
105  while(sip != sie){
106  if(**sip == *pinPtr)
107  return setPathCount(index, pCount);
108  ++index;
109  ++sip;
110  }
111  sip = superNet->sinksBegin();
112  sie = superNet->sinksEnd();
113  while(sip != sie){
114  if(**sip == *pinPtr)
115  return setPathCount(index, pCount);
116  ++index;
117  ++sip;
118  }
119  return setPathCount(index, pCount);
120  }
InstancePinSharedPtrVector::iterator InstancePinSharedPtrIterator
Non-constant iterator to InstancePin shared pointer objects.
bool setPathCount(size_t index, size_t pCount)
Sets path count for pin index.
Definition: RoutingNet.hpp:72
NetSharedPtr superNet
The original net.
Definition: RoutingNet.hpp:41

+ Here is the call graph for this function:

NetSharedPtr torc::physical::RoutingNet::setSuperNet ( NetSharedPtr  snet)
inline

Sets super net.

Definition at line 62 of file RoutingNet.hpp.

62  {
63  return (superNet=snet);
64  }
NetSharedPtr superNet
The original net.
Definition: RoutingNet.hpp:41

Friends And Related Function Documentation

friend class RcFactory
friend

The Factory class has direct access to our internals.

Definition at line 33 of file RoutingNet.hpp.

Field Documentation

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

The name of the object.

Definition at line 43 of file Named.hpp.

std::vector<size_t> torc::physical::RoutingNet::pathCounts
protected

combinational path count

Definition at line 43 of file RoutingNet.hpp.

NetSharedPtr torc::physical::RoutingNet::superNet
protected

The original net.

Definition at line 41 of file RoutingNet.hpp.


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