torc::router::NetRouter Class Reference

Provides net routing based on the Nilsson graphsearch algorithm. More...

#include <NetRouter.hpp>

Inheritance diagram for torc::router::NetRouter:

Inheritance graph
[legend]
Collaboration diagram for torc::router::NetRouter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 NetRouter (DDB &inDB, NetRouterHeuristicBase *inHeuristic)
 Public Constructor.
 ~NetRouter ()
 Destructor.
void routeNet (RouteNet &net)
 Route a net.
void resetStats ()
void printStats (std::ostream &out)

Protected Member Functions

void graphSearch (const Tilewire &inSource, TilewireVector &inSinks, RouteNodePtrVector &outRoute)
 Internal top level route function.
void graphSearchLoop (const Tilewire &inSource, const Tilewire &inSink, RouteNodePtrVector &outRoute)
 Routing loop function.
void graphSearchFilter (RouteNode *inParent, const Arc &inArc, RouteNodePtrVector &outRoute)
 Create a new node and put it into the appropriate structure.
void recordPath (RouteNode *node, Tilewire key, Tilewire inSource, RouteNodePtrVector &outRoute)
 Add the newly found route to the outRoute vector.
void clearContainers ()
 Delete nodes in containers and clear them.
bool expandNetTerminals (Tilewire &inSource, TilewireVector &inSinks, RouteNodePtrVector &outRoute)
 Move net terminals out into the INT tiles.
bool testDedicatedPath (Tilewire inSource, Tilewire inSink, RouteNodePtrVector &outRoute)
 Test for a dedicated routing path.
Tilewire expandSourceTerminal (Tilewire inSource, RouteNodePtrVector &outRoute)
 Move the source terminal of a net in the sinkwards direction.
Tilewire expandSinkTerminal (Tilewire inSink, RouteNodePtrVector &outRoute)
 Move the sink terminal of a net in the sourcewards direction.

Protected Attributes

ArcUsagemArcUsage
 Database reference.
WireUsagemWireUsage
 WireUsage reference.
RouteNodePtrQueue mOrder
 Pointer to the heuristic for making routing decisions.
RouteNodePtrMap mOpen
 Collection of candidate nodes the router can expand.
RouteNodePtrMap mClosed
 Collection of nodes that have been expanded.
RouteNodePtrMap mSkipped
 Collection of nodes skipped due to heuristic constraints.
RouteNodePtrVector mPreRoute
 Vector of nodes created during pre-routing.
TilewireSet mAuxClosed
 Set of Closed Tilewires to avoid issues with bidir resources.
TilewireVector mSegmentBuf
 Scratch segment storage.
ArcVector mArcsBuf
 Scratch arc storage.
boost::uint32_t mSearchLimit
 Maximum number of nodes to explore before failing.
boost::uint32_t mStatNets
 Number of nets routed since construction.
boost::uint32_t mStatLoopPasses
 Number of passes through the main loop since construction.
boost::uint32_t mStatExpanded
 Number of nodes created from expansion.
boost::uint32_t mStatSources
 Number of net sources seen since construction.
boost::uint32_t mStatSinks
 Number of net sinks seen since construction.

Private Types

typedef architecture::DDB DDB
 Imported type names.
typedef architecture::ArcUsage ArcUsage
typedef architecture::WireUsage WireUsage
typedef architecture::Tilewire Tilewire
typedef architecture::Arc Arc
typedef
architecture::TilewireVector 
TilewireVector
typedef architecture::ArcVector ArcVector
typedef std::priority_queue
< RouteNode *, std::vector
< RouteNode * >
, RouteNodePtrCostCompare
RouteNodePtrQueue
typedef boost::unordered_map
< Tilewire, RouteNode
*, boost::hash
< architecture::Tilewire > > 
RouteNodePtrMap
typedef boost::unordered_set
< Tilewire, boost::hash
< architecture::Tilewire > > 
TilewireSet


Detailed Description

Provides net routing based on the Nilsson graphsearch algorithm.

The router can either return a vector of nodes or directly populate DDB usage.

Definition at line 42 of file NetRouter.hpp.


Member Typedef Documentation

Imported type names.

Reimplemented from torc::router::NetRouterBase.

Definition at line 45 of file NetRouter.hpp.


Constructor & Destructor Documentation

torc::router::NetRouter::NetRouter ( DDB inDB,
NetRouterHeuristicBase inHeuristic 
) [inline]

Public Constructor.

Definition at line 105 of file NetRouter.hpp.

torc::router::NetRouter::~NetRouter (  )  [inline]

Destructor.

Definition at line 119 of file NetRouter.hpp.


Member Function Documentation

void torc::router::NetRouter::routeNet ( RouteNet net  )  [inline, virtual]

Route a net.

Todo:
Throw appropriate exception.

Todo:
Throw appropriate exception.

Implements torc::router::NetRouterBase.

Definition at line 122 of file NetRouter.hpp.

void torc::router::NetRouter::graphSearch ( const Tilewire inSource,
TilewireVector &  inSinks,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Internal top level route function.

Todo:
Count new RouteNodes?

Todo:
Set initial cost

Definition at line 201 of file NetRouter.hpp.

void torc::router::NetRouter::graphSearchLoop ( const Tilewire inSource,
const Tilewire inSink,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Routing loop function.

Todo:
Throw route failed exception.

Todo:
Throw route limited exception.

Todo:
adjust the node cost to be just the path cost?

Definition at line 250 of file NetRouter.hpp.

void torc::router::NetRouter::graphSearchFilter ( RouteNode inParent,
const Arc inArc,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Create a new node and put it into the appropriate structure.

Todo:
Need to check to see if we should be adjusting pointers in here.

Todo:
Heuristic check if node is filtered
Todo:
Heuristic cost of node

Todo:
Cases for different places the node can go.

Definition at line 305 of file NetRouter.hpp.

void torc::router::NetRouter::recordPath ( RouteNode node,
Tilewire  key,
Tilewire  inSource,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Add the newly found route to the outRoute vector.

Definition at line 329 of file NetRouter.hpp.

void torc::router::NetRouter::clearContainers (  )  [inline, protected]

Delete nodes in containers and clear them.

Todo:
Report statistics on nodes deleted?

Definition at line 354 of file NetRouter.hpp.

bool torc::router::NetRouter::expandNetTerminals ( Tilewire inSource,
TilewireVector &  inSinks,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Move net terminals out into the INT tiles.

Definition at line 370 of file NetRouter.hpp.

bool torc::router::NetRouter::testDedicatedPath ( Tilewire  inSource,
Tilewire  inSink,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Test for a dedicated routing path.

Definition at line 383 of file NetRouter.hpp.

Tilewire torc::router::NetRouter::expandSourceTerminal ( Tilewire  inSource,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Move the source terminal of a net in the sinkwards direction.

Definition at line 407 of file NetRouter.hpp.

Tilewire torc::router::NetRouter::expandSinkTerminal ( Tilewire  inSink,
RouteNodePtrVector &  outRoute 
) [inline, protected]

Move the sink terminal of a net in the sourcewards direction.

Definition at line 425 of file NetRouter.hpp.


Member Data Documentation

Database reference.

ArcUsage reference.

Definition at line 64 of file NetRouter.hpp.

WireUsage reference.

Definition at line 66 of file NetRouter.hpp.

RouteNodePtrQueue torc::router::NetRouter::mOrder [protected]

Pointer to the heuristic for making routing decisions.

Priority queue of nodes to explore during routing, mirrors mOpen.

Definition at line 72 of file NetRouter.hpp.

RouteNodePtrMap torc::router::NetRouter::mOpen [protected]

Collection of candidate nodes the router can expand.

Definition at line 74 of file NetRouter.hpp.

RouteNodePtrMap torc::router::NetRouter::mClosed [protected]

Collection of nodes that have been expanded.

Definition at line 76 of file NetRouter.hpp.

RouteNodePtrMap torc::router::NetRouter::mSkipped [protected]

Collection of nodes skipped due to heuristic constraints.

Definition at line 78 of file NetRouter.hpp.

RouteNodePtrVector torc::router::NetRouter::mPreRoute [protected]

Vector of nodes created during pre-routing.

Definition at line 80 of file NetRouter.hpp.

TilewireSet torc::router::NetRouter::mAuxClosed [protected]

Set of Closed Tilewires to avoid issues with bidir resources.

Definition at line 82 of file NetRouter.hpp.

TilewireVector torc::router::NetRouter::mSegmentBuf [protected]

Scratch segment storage.

Definition at line 85 of file NetRouter.hpp.

ArcVector torc::router::NetRouter::mArcsBuf [protected]

Scratch arc storage.

Definition at line 87 of file NetRouter.hpp.

boost::uint32_t torc::router::NetRouter::mSearchLimit [protected]

Maximum number of nodes to explore before failing.

Definition at line 90 of file NetRouter.hpp.

boost::uint32_t torc::router::NetRouter::mStatNets [protected]

Number of nets routed since construction.

Definition at line 92 of file NetRouter.hpp.

boost::uint32_t torc::router::NetRouter::mStatLoopPasses [protected]

Number of passes through the main loop since construction.

Definition at line 94 of file NetRouter.hpp.

boost::uint32_t torc::router::NetRouter::mStatExpanded [protected]

Number of nodes created from expansion.

Definition at line 96 of file NetRouter.hpp.

boost::uint32_t torc::router::NetRouter::mStatSources [protected]

Number of net sources seen since construction.

Definition at line 98 of file NetRouter.hpp.

boost::uint32_t torc::router::NetRouter::mStatSinks [protected]

Number of net sinks seen since construction.

Definition at line 100 of file NetRouter.hpp.


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

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