19 #ifndef TORC_ROUTER_PATHFINDERNETROUTERHEURISTIC_HPP
20 #define TORC_ROUTER_PATHFINDERNETROUTERHEURISTIC_HPP
33 #include <boost/cstdint.hpp>
34 #include <boost/timer.hpp>
35 #include <boost/unordered_map.hpp>
36 #include <boost/functional/hash.hpp>
37 #include <boost/integer_traits.hpp>
96 std::cout<<
"SETUP CONFLICT MAP" << std::endl;
109 boost::int32_t bestDistance = boost::integer_traits<boost::int32_t>::max();
110 boost::int32_t distance = boost::integer_traits<boost::int32_t>::max();
111 boost::int32_t cost = 0;
122 ArcVector::iterator p;
123 ArcVector::iterator e =
mArcsBuf.end();
124 for (p =
mArcsBuf.begin(); p != e; p++) {
131 if (distance < bestDistance) bestDistance = distance;
133 if (bestDistance == boost::integer_traits<boost::int32_t>::max()) {
137 cost += bestDistance;
140 std::cout <<
"NULL PARENT" << std::endl;
145 cost = (cost + (*mConflictMap)[sinkTilewire].mHistorySharing)
154 boost::int32_t bestDistance = boost::integer_traits<boost::int32_t>::max();
155 boost::int32_t distance = boost::integer_traits<boost::int32_t>::max();
156 boost::int32_t cost = 0;
167 ArcVector::iterator p;
168 ArcVector::iterator e =
mArcsBuf.end();
169 for (p =
mArcsBuf.begin(); p != e; p++) {
176 if (distance < bestDistance) bestDistance = distance;
178 if (bestDistance == boost::integer_traits<boost::int32_t>::max()) {
182 cost += bestDistance;
199 true,
true,
true,
false);
201 unsigned int s = tempArcs.size();
204 for (
unsigned int i = t; i < s; i++) {
205 outArcs.push_back(tempArcs[i]);
207 for (
unsigned int i = 0; i < t; i++) {
208 outArcs.push_back(tempArcs[i]);
215 boost::int32_t distance = 0;
216 boost::int32_t iRow = tileInfo->
getRow();
217 boost::int32_t iCol = tileInfo->
getCol();
232 #endif // TORC_ROUTER_PATHFINDERNETROUTERHEURISTIC_HPP
DDB & mDB
Database reference.
void nodeCostInitial(RouteNode &inNode)
architecture::TileInfo TileInfo
const Tiles & mTiles
Tiles reference.
const TileCol & getCol(void) const
Returns the column for this tile.
architecture::Tiles Tiles
Encapsulation of a tile row in an unsigned 16-bit integer.
architecture::ArcUsage ArcUsage
Encapsulation of an arc between two tilewires.
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
const TileRow & getRow(void) const
Returns the row for this tile.
Encapsulation of a tile column in an unsigned 16-bit integer.
RouteNode * getParent() const
Get the node's parent.
ArcUsage & mArcUsage
ArcUsage reference.
Device database, including complete wiring and logic support.
void setSink(const Tilewire &inSink)
Set the current routing target.
Tilewire mTargetSink
Target sink tilewire.
ArcVector mArcsBuf
Arc buffer.
void expandSegmentSinks(const Tilewire &inTilewire, ArcVector &outArcs)
Heuristic handling of expansion of a node.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Encapsulation the design wire usage.
boost::any getParameter(boost::uint32_t index)
Get a parameter.
boost::int32_t mCol
Target column coordinate.
Header for the RouteNode class.
architecture::TilewireVector TilewireVector
void expandSegmentSinks(const Tilewire &inTilewire, ArcVector &outSinks, EExpandDirection inExpandDirection=eExpandDirectionNone, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands all sink arcs for the given tilewire's segment.
architecture::ArcVector ArcVector
std::vector< Arc > ArcVector
Vector of Arc objects.
const Tilewire & getSinkTilewire() const
Get the sink Tilewire.
PathFinderSharingMap * mConflictMap
PathFinder sharing information.
boost::unordered_map< Tilewire, TilewireData > PathFinderSharingMap
architecture::TilewireVector TilewireVector
Provides net routing based on the Nillson graphsearch algorithm.
void setCost(boost::int32_t inHeuristicCost)
Set the heuristic node cost.
Header for torc::physical output stream helpers.
Encapsulation of a device tile and wire pair.
Encapsulation the design arc usage.
Tile map, tile type, and wire information for the family and device.
const TileInfo * mSinkTileInfo
Target sink tile information.
Encapsulation of a tile within a device tile map.
boost::int32_t mRow
Target row coordinate.
architecture::WireUsage WireUsage
architecture::xilinx::TileCol TileCol
architecture::Tilewire Tilewire
architecture::DDB DDB
Imported type names.
Header for the HeuristicBase class.
An object that holds an arc and path information for routing.
virtual boost::int32_t distanceToSink(const Tilewire &inTilewire)
void nodeCost(RouteNode &inNode)
Calculate the node cost based on distance to the sink and path length.
Provides the interface for net routers.
Header for the DDB class.
const TileIndex & getTileIndex(void) const
Returns the tile index.
virtual void reorderSinks(const Tilewire &inSource, TilewireVector &inSinks)
Reorder the Sinks based on this heuristic.
architecture::xilinx::TileRow TileRow
architecture::ArcVector ArcVector
bool isUsed(const Arc &inArc)
Determines whether the specified arc is in use.
PathFinderNetRouterHeuristic(DDB &inDB)
Public Constructor.
~PathFinderNetRouterHeuristic()
Destructor.
virtual boost::int32_t clkDistanceToSink(const Tilewire &inTilewire)
const boost::int32_t getCost() const
Get the heuristic node cost.
TilewireVector mSegmentBuf
Segment tilewire buffer.
Device database types for Xilinx architectures.