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

Router net. More...

#include <RouteUtilities.hpp>

+ Collaboration diagram for torc::router::RouteUtilities:

Public Types

typedef ArcVector::const_iterator ArcConstIterator
 
typedef ArcVector::iterator ArcIterator
 
typedef
TilewireVector::const_iterator 
TilewireConstIterator
 
typedef TilewireVector::iterator TilewireIterator
 
typedef
RouteNodePtrVector::const_iterator 
RouteNodePtrConstIterator
 
typedef
RouteNodePtrVector::iterator 
RouteNodePtrIterator
 

Public Member Functions

 RouteUtilities ()
 Constructor. More...
 
void design2routenets (NetSharedPtrIterator netsbegin, NetSharedPtrIterator netsend, RouteNetVector &routenets)
 
void routenets2design (RouteNetVector &routenets, NetSharedPtrIterator netsbegin, NetSharedPtrIterator netsend, architecture::DDB &ddb)
 

Data Fields

boost::unordered_map
< boost::uint32_t, boost::any > 
mProperties
 Net annotation structure. More...
 

Protected Attributes

string mName
 Name of the net. More...
 
TilewireVector mSources
 Vector of net source Tilewires. More...
 
TilewireVector mSinks
 Vector of net sink Tilewires. More...
 
ArcVector mArcs
 Vector of arcs representing net connectivity. More...
 
RouteNodePtrVector mRouteNodes
 Vector of RouteNodes representing net connectivity. More...
 

Private Types

typedef std::string string
 Imported type names. More...
 
typedef architecture::Tilewire Tilewire
 
typedef
architecture::TilewireVector 
TilewireVector
 
typedef architecture::Arc Arc
 
typedef architecture::ArcVector ArcVector
 
typedef
torc::physical::NetSharedPtr 
NetSharedPtr
 
typedef std::vector< NetSharedPtrNetSharedPtrVector
 
typedef
torc::physical::Circuit::NetSharedPtrConstIterator 
NetSharedPtrConstIterator
 
typedef
torc::physical::Circuit::NetSharedPtrIterator 
NetSharedPtrIterator
 
typedef
torc::physical::Net::InstancePinSharedPtrConstIterator 
InstancePinSharedPtrConstIterator
 
typedef
torc::physical::Net::InstancePinSharedPtrIterator 
InstancePinSharedPtrIterator
 
typedef torc::physical::Pip Pip
 

Detailed Description

Router net.

The RouteNet class contains architecture specific sources and sinks.

Definition at line 39 of file RouteUtilities.hpp.

Member Typedef Documentation

Definition at line 45 of file RouteUtilities.hpp.

typedef ArcVector::const_iterator torc::router::RouteUtilities::ArcConstIterator

Definition at line 59 of file RouteUtilities.hpp.

typedef ArcVector::iterator torc::router::RouteUtilities::ArcIterator

Definition at line 60 of file RouteUtilities.hpp.

Definition at line 49 of file RouteUtilities.hpp.

Definition at line 56 of file RouteUtilities.hpp.

typedef RouteNodePtrVector::const_iterator torc::router::RouteUtilities::RouteNodePtrConstIterator

Definition at line 63 of file RouteUtilities.hpp.

typedef RouteNodePtrVector::iterator torc::router::RouteUtilities::RouteNodePtrIterator

Definition at line 64 of file RouteUtilities.hpp.

typedef std::string torc::router::RouteUtilities::string
private

Imported type names.

Definition at line 42 of file RouteUtilities.hpp.

typedef TilewireVector::const_iterator torc::router::RouteUtilities::TilewireConstIterator

Definition at line 61 of file RouteUtilities.hpp.

typedef TilewireVector::iterator torc::router::RouteUtilities::TilewireIterator

Definition at line 62 of file RouteUtilities.hpp.

Constructor & Destructor Documentation

torc::router::RouteUtilities::RouteUtilities ( )
inline

Constructor.

Definition at line 85 of file RouteUtilities.hpp.

85 {}

Member Function Documentation

void torc::router::RouteUtilities::design2routenets ( NetSharedPtrIterator  netsbegin,
NetSharedPtrIterator  netsend,
RouteNetVector routenets 
)
inline

Definition at line 87 of file RouteUtilities.hpp.

88  {
89  NetSharedPtrIterator p = netsbegin;
90  for (p = netsbegin; p != netsend; p++) {
91  TilewireVector sources;
92  TilewireVector sinks;
93 //std::cout << "Converting: " << (*p)->getName() << std::endl;
94  //for (InstancePinSharedPtrConstIterator pinPtr = (*p)->sourcesBegin();
95  for (InstancePinSharedPtrIterator pinPtr = (*p)->sourcesBegin();
96  pinPtr != (*p)->sourcesEnd(); pinPtr++) {
97  //sources.push_back((((architecture::InstancePin)(*pinPtr)).getTilewire());
98  sources.push_back(INSTANCE_PIN_PHYSICAL_TO_ARCHITECTURE(*pinPtr)->getTilewire());
99 //std::cout << "Source: " << sources.back() << std::endl;
100  if (sources.back() == Tilewire::sInvalid) {
101  std::cout << "BAD IMPORT: " << (*p)->getName() << " - "
102  << (*pinPtr)->getPinName() << std::endl;
103  }
104  }
105  for (InstancePinSharedPtrIterator pinPtr = (*p)->sinksBegin();
106  pinPtr != (*p)->sinksEnd(); pinPtr++) {
107  sinks.push_back(INSTANCE_PIN_PHYSICAL_TO_ARCHITECTURE(*pinPtr)->getTilewire());
108 //std::cout << "Sink: " << sinks.back() << std::endl;
109  if (sinks.back() == Tilewire::sInvalid) {
110  std::cout << "BAD IMPORT: " << (*p)->getName() << " - "
111  << (*pinPtr)->getPinName() << std::endl;
112  }
113  }
114 
115 
116  std::string name = (*p)->getName();
117  routenets.push_back(RouteNet(name, sources, sinks));
118  }
119  }
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
Definition: Tilewire.hpp:101
torc::physical::Circuit::NetSharedPtrIterator NetSharedPtrIterator
std::string string
torc::physical::Net::InstancePinSharedPtrIterator InstancePinSharedPtrIterator
#define INSTANCE_PIN_PHYSICAL_TO_ARCHITECTURE(x)
Reinterpret the given torc::physical::InstancePinSharedPtr as a torc::architecture::InstancePinShared...
static const Tilewire sInvalid
Definition: Tilewire.hpp:93

+ Here is the caller graph for this function:

void torc::router::RouteUtilities::routenets2design ( RouteNetVector routenets,
NetSharedPtrIterator  netsbegin,
NetSharedPtrIterator  netsend,
architecture::DDB ddb 
)
inline

Definition at line 120 of file RouteUtilities.hpp.

121  {
122  NetSharedPtrIterator p = netsbegin;
123  architecture::ExtendedWireInfo ewisource(ddb);
124  architecture::ExtendedWireInfo ewisink(ddb);
125  unsigned int i = 0;
126  for (p = netsbegin; p != netsend; p++) {
127  if (!((*p)->getName() == routenets[i].getName())) {
128  std::cout << "Name mismatch for corresponding entry: "
129  << (*p)->getName() << " " << routenets[i].getName() << std::endl;
130  throw;
131  }
132  // convert route nodes to pips
133  RouteNodePtrVector& routeNodes = routenets[i].routeNodes();
134  for (unsigned int j = 0; j < routeNodes.size(); j++) {
135  Arc arc = routeNodes[j]->getArc();
136 
137  if (arc.getSourceTilewire() == arc.getSinkTilewire()) continue;
138 
139  ewisource = arc.getSourceTilewire();
140  ewisink = arc.getSinkTilewire();
141 
142  Pip pip = physical::Factory::newPip(ewisource.mTileName, ewisource.mWireName,
143  ewisink.mWireName, physical::ePipUnidirectionalBuffered);
144 
145  (*p)->addPip(pip);
146  }
147 
148 
149 
150  i++;
151  }
152  }
Encapsulation of an arc between two tilewires.
Definition: Arc.hpp:28
std::vector< RouteNode * > RouteNodePtrVector
Vector of RouteNode pointers.
Definition: RouteNode.hpp:115
torc::physical::Circuit::NetSharedPtrIterator NetSharedPtrIterator
const Tilewire & getSourceTilewire(void) const
Returns the source tilewire.
Definition: Arc.hpp:45
const Tilewire & getSinkTilewire(void) const
Returns the sink tilewire.
Definition: Arc.hpp:47
static torc::physical::Pip newPip(const string &inTileName, const string &inSourceWireName, const string &inSinkWireName, EPipDirection inPipDirection, RoutethroughSharedPtr inRoutethroughPtr=RoutethroughSharedPtr())
Construct a pip and return it.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ArcVector torc::router::RouteUtilities::mArcs
protected

Vector of arcs representing net connectivity.

Definition at line 75 of file RouteUtilities.hpp.

string torc::router::RouteUtilities::mName
protected

Name of the net.

Definition at line 69 of file RouteUtilities.hpp.

boost::unordered_map<boost::uint32_t, boost::any> torc::router::RouteUtilities::mProperties

Net annotation structure.

Definition at line 80 of file RouteUtilities.hpp.

RouteNodePtrVector torc::router::RouteUtilities::mRouteNodes
protected

Vector of RouteNodes representing net connectivity.

Definition at line 77 of file RouteUtilities.hpp.

TilewireVector torc::router::RouteUtilities::mSinks
protected

Vector of net sink Tilewires.

Definition at line 73 of file RouteUtilities.hpp.

TilewireVector torc::router::RouteUtilities::mSources
protected

Vector of net source Tilewires.

Definition at line 71 of file RouteUtilities.hpp.


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