19 #ifndef TORC_ROUTER_UNROUTER_HPP
20 #define TORC_ROUTER_UNROUTER_HPP
82 boost::int32_t releasedArcs = 0;
90 TilewireVector::iterator p;
93 const Tilewire& segmentTilewire = *p;
96 TilewireVector::iterator q;
97 TilewireVector::iterator f =
mSinksBuf.end();
102 Arc arc(segmentTilewire, sinkTilewire);
229 void findBranchSinks(Tilewire inTilewire, TilewireVector& outSinks) {
230 std::cout << "findBranchSinks not yet implemented." << std::endl;
234 void findSinks(Tilewire inTilewire, TilewireVector& outSinks) {
235 std::cout << "findSinks not yet implemented." << std::endl;
243 std::vector<RouteTreeNode*> activeSinks;
247 TilewireVector::iterator p;
250 const Tilewire& segmentTilewire = *p;
254 TilewireVector::iterator q;
255 TilewireVector::iterator f =
mSinksBuf.end();
256 for (q =
mSinksBuf.begin(); q < f; q++) {
261 segmentTilewire, sinkTilewire, 0, inNode));
265 unsigned int activeSinksSize = activeSinks.size();
266 if(activeSinksSize == 0)
return;
269 for(
unsigned int i = 0; i < activeSinksSize; i++) {
280 bool foundParent =
false;
281 std::vector<RouteTreeNode*> activeSinks;
284 TilewireVector::iterator p;
287 const Tilewire& segmentTilewire = *p;
291 TilewireVector::iterator q;
294 const Tilewire& sourceTilewire = *q;
296 std::cout <<
"ALREADY SEEN THIS TILEWIRE" << std::endl;
301 std::cout <<
"TRACER ERROR: MULTIPLE PARENTS" << std::endl;
304 parentArc =
Arc(sourceTilewire, segmentTilewire);
319 TilewireVector::iterator q;
320 TilewireVector::iterator f =
mSinksBuf.end();
321 for (q =
mSinksBuf.begin(); q < f; q++) {
324 std::cout <<
"ALREADY SEEN THIS TILEWIRE" << std::endl;
329 segmentTilewire, sinkTilewire, 0, inNode));
333 unsigned int activeSinksSize = activeSinks.size();
334 std::cout <<
"ACTIVE SINKS SIZE: " << activeSinksSize << std::endl;
337 if (activeSinksSize > 1) {
340 std::cout << activeSinksSize << std::endl;
341 for (
unsigned int i = 0; i < activeSinksSize; i++) {
409 #endif // TORC_ROUTER_UNROUTER_HPP
Unroutes connected resources in a DDB instance.
architecture::TilewireVector TilewireVector
Encapsulation of an arc between two tilewires.
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
void addChildren(const std::vector< RouteTreeNode * > &newChildren)
Add children to the node.
RouteNode * getParent() const
Get the node's parent.
Device database, including complete wiring and logic support.
WireUsage & mWireUsage
WireUsage reference.
Unrouter(DDB &inDB)
Public Constructor.
RouteTreeNode * traceToSource(Tilewire inTilewire)
Trace from given Tilewire sourcewards to the source of the net.
TilewireVector mSegmentBuf
Scratch segment storage.
TilewireVector mWireQueue
Encapsulation the design wire usage.
TilewireVector mSourcesBuf
Scratch wire storage.
architecture::ArcVector ArcVector
void releaseArc(const Arc &inArc, bool releaseSource=true, bool releaseSink=true)
Marks the arc and all of its source and sink segment wires as unused.
RouteTreeNode * traceFull(Tilewire inTilewire)
Trace from given Tilewire and recover the entire net.
TilewireVector mSinksBuf
Scratch wire storage.
std::vector< Arc > ArcVector
Vector of Arc objects.
const Tilewire & getSourceTilewire(void) const
Returns the source tilewire.
Header for Boost.Test helper functions.
const Tilewire & getSinkTilewire() const
Get the sink Tilewire.
void expandTilewireSinks(const Tilewire &inTilewire, TilewireVector &outSinks, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sinks.
RouteTreeNode * traceBranch(Tilewire inTilewire)
Trace from given Tilewire sinkwards and sourcewards to source or branch.
const Tilewire & getSinkTilewire(void) const
Returns the sink tilewire.
Header for torc::physical output stream helpers.
void traceUpstream(RouteTreeNode *inNode, boost::int32_t inMode)
Recursively traces from the specified RouteTreeNode in one of three modes.
Encapsulation of a device tile and wire pair.
const Tilewire & getSourceTilewire() const
Get the source Tilewire.
Encapsulation the design arc usage.
boost::uint16_t getNumChildren()
Get the number of children.
void expandTilewireSources(const Tilewire &inTilewire, TilewireVector &outSources, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sources.
boost::int32_t unrouteToSinks(const Tilewire inTilewire)
std::set< Tilewire > mTracedWiresBuf
Traced wires collection.
An object that holds more complete path information for routing and tracing.
architecture::DDB DDB
Imported type name.
void traceDownstream(RouteTreeNode *inNode)
Remove the dummy node if possible.
void makeParent(const Tilewire &inSource, const Tilewire &inSink)
Allocate a new node and make it the parent of this node.
ArcUsage & mArcUsage
ArcUsage reference.
Header for the DDB class.
architecture::ArcUsage ArcUsage
RouteTreeNode * getChild(unsigned int index)
Get a child by index, returns 0 for invalid index.
bool isUsed(const Arc &inArc)
Determines whether the specified arc is in use.
RouteTreeNode * traceToSinks(Tilewire inTilewire)
Trace from given Tilewire in a sinkwards direction only.
DDB & mDB
Database reference.
void expandSegment(const Tilewire &inTilewire, TilewireVector &outTilewires, EExpandDirection inExpandDirection=eExpandDirectionNone)
Expands the given tilewire's segment.
architecture::WireUsage WireUsage
Header for the RouteTreeNode class.
architecture::Tilewire Tilewire