20 #include "hurricane/Point.h" 25 #include "kite/TrackCost.h" 26 #include "kite/TrackElement.h" 46 , BeginIsSegmentMin = 0x00000002
47 , BeginIsSegmentMax = 0x00000004
48 , EndIsTrackMax = 0x00000008
49 , EndIsSegmentMin = 0x00000010
50 , EndIsNextSegmentMin = 0x00000020
51 , EndIsSegmentMax = 0x00000040
52 , BeforeFirstElement = BeginIsTrackMin |EndIsSegmentMin
53 , InsideElement = BeginIsSegmentMin|EndIsSegmentMax
54 , OutsideElement = BeginIsSegmentMax|EndIsNextSegmentMin
55 , AfterLastElement = BeginIsSegmentMax|EndIsTrackMax
56 , EmptyTrack = BeginIsTrackMin |EndIsTrackMax
57 , BeginMask = BeginIsTrackMin |BeginIsSegmentMin|BeginIsSegmentMax
58 , EndMask = EndIsTrackMax |EndIsSegmentMin |EndIsNextSegmentMin|EndIsSegmentMax
67 virtual bool isHorizontal ()
const = 0;
68 virtual bool isVertical ()
const = 0;
69 inline bool isLocalAssigned ()
const;
72 virtual unsigned int getDirection ()
const = 0;
73 inline size_t getIndex ()
const;
74 unsigned int getDepth ()
const;
75 const Layer* getLayer ()
const;
76 const Layer* getBlockageLayer ()
const;
80 Track* getNextTrack ()
const;
81 Track* getPreviousTrack ()
const;
82 inline size_t getSize ()
const;
90 DbU::Unit getSourcePosition ( vector<TrackElement*>::iterator )
const;
91 DbU::Unit getMinimalPosition (
size_t index,
unsigned int state )
const;
92 DbU::Unit getMaximalPosition (
size_t index,
unsigned int state )
const;
94 Interval getOccupiedInterval (
size_t& begin )
const;
95 Interval expandFreeInterval (
size_t& begin,
size_t& end,
unsigned int state,
Net* )
const;
96 void getBeginIndex (
DbU::Unit position,
size_t& begin,
unsigned int& state )
const;
97 void getOverlapBounds (
Interval,
size_t& begin,
size_t& end )
const;
98 TrackCost getOverlapCost (
Interval,
Net*,
size_t begin,
size_t end,
unsigned int flags )
const;
99 TrackCost getOverlapCost (
Interval,
Net*,
unsigned int flags )
const;
100 TrackCost getOverlapCost (
TrackElement*,
unsigned int flags )
const;
101 void getTerminalWeight (
Interval,
Net*,
size_t& count,
unsigned int& weight )
const;
102 DbU::Unit getSourcePosition (
size_t index )
const;
103 bool check (
unsigned int& overlaps,
const char* message=NULL )
const;
104 unsigned int checkOverlap (
unsigned int& overlaps )
const;
105 inline void setLocalAssigned (
bool );
112 virtual Record* _getRecord ()
const;
113 virtual string _getString ()
const;
114 virtual string _getTypeName ()
const = 0;
123 vector<TrackElement*> _segments;
124 vector<TrackMarker*> _markers;
133 virtual void _postCreate ();
134 virtual void _preDestroy ();
140 inline unsigned int setMinimalFlags (
unsigned int& state,
unsigned int flags )
const;
141 inline unsigned int setMaximalFlags (
unsigned int& state,
unsigned int flags )
const;
145 struct SourceCompare {
153 struct SegmentCompare {
165 {
return lessSource(lhsSource,rhs->
getSourceU()); }
169 {
return lessSource(lhs->
getSourceU(),rhsSource); }
172 inline bool Track::SourceCompare::lessSource (
DbU::Unit lhsSource,
DbU::Unit rhsSource )
173 {
return lhsSource < rhsSource; }
189 inline bool Track::isLocalAssigned ()
const {
return _localAssigned; }
190 inline RoutingPlane* Track::getRoutingPlane ()
const {
return _routingPlane; }
191 inline size_t Track::getIndex ()
const {
return _index; }
192 inline DbU::Unit Track::getAxis ()
const {
return _axis; }
193 inline DbU::Unit Track::getMin ()
const {
return _min; }
194 inline DbU::Unit Track::getMax ()
const {
return _max; }
195 inline size_t Track::getSize ()
const {
return _segments.size(); }
196 inline void Track::setLocalAssigned (
bool state ) { _localAssigned=state; }
198 inline unsigned int Track::setMinimalFlags (
unsigned int& state,
unsigned int flags )
const 201 state |= (flags & BeginMask);
205 inline unsigned int Track::setMaximalFlags (
unsigned int& state,
unsigned int flags )
const 208 state |= (flags & EndMask);
218 #endif // KITE_TRACK_H
DbU::Unit getTargetU() const
Definition: TrackElement.h:242
Structure managing one routing track.
Definition: Track.h:42
The Kite Tool.
Definition: KiteEngine.h:60
DbU::Unit getSourceU() const
Definition: TrackElement.h:241
Tag part of Track with a weight.
Definition: TrackMarker.h:43
Array of Tracks in one Layer.
Definition: RoutingPlane.h:34
static const size_t npos
Definition: Track.h:63
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
IndexState
Definition: Track.h:45
The namespace dedicated to Kite.
Definition: Constants.h:22