torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NetRouterHeuristicBase.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief Header for the HeuristicBase class.
18 
19 #ifndef TORC_ROUTER_NETROUTERHEURISTICBASE_HPP
20 #define TORC_ROUTER_NETROUTERHEURISTICBASE_HPP
21 
25 
26 namespace torc {
27 namespace router {
28 
29  /// \brief Provides the interface for net routers.
31  // types
32  /// \brief Imported type names
37 
38  public:
39  // constructor
40  /// \brief Public Constructor
42  /// \brief Destructor.
44 
45  /// \brief Set the current routing target
46  virtual void setSink(const Tilewire& inSink) = 0;
47  /// \brief Calculate the node cost based on distance to the sink and path length
48  virtual void nodeCost(RouteNode& inNode) = 0;
49  /// \brief Reorder the Sinks based on this heuristic
50  virtual void reorderSinks(const Tilewire& inSource, TilewireVector& inSinks) {}
51  /// \brief Heuristically expand a segment.
52  virtual void expandSegmentSinks(const Tilewire& inTilewire, ArcVector& outArcs) {
53  mDB.expandSegmentSinks(inTilewire, outArcs);
54  }
55 
56  }; // class HeuristicBase
57 
58 
59 } // namespace router
60 } // namespace torc
61 
62 #endif // TORC_ROUTER_NETROUTERHEURISTICBASE_HPP
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
Definition: Tilewire.hpp:101
Device database, including complete wiring and logic support.
Definition: DDB.hpp:42
NetRouterHeuristicBase(DDB &inDB)
Public Constructor.
Header for the RouteNode class.
virtual void expandSegmentSinks(const Tilewire &inTilewire, ArcVector &outArcs)
Heuristically expand a segment.
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.
Definition: DDB.cpp:314
std::vector< Arc > ArcVector
Vector of Arc objects.
Definition: Arc.hpp:78
virtual void reorderSinks(const Tilewire &inSource, TilewireVector &inSinks)
Reorder the Sinks based on this heuristic.
Encapsulation of a device tile and wire pair.
Definition: Tilewire.hpp:39
Provides the interface for net routers.
Header for the Tilewire class.
virtual void setSink(const Tilewire &inSink)=0
Set the current routing target.
An object that holds an arc and path information for routing.
Definition: RouteNode.hpp:40
architecture::DDB DDB
Imported type names.
Provides the interface for net routers.
Header for the HeuristicBase class.
virtual void nodeCost(RouteNode &inNode)=0
Calculate the node cost based on distance to the sink and path length.