Kite - Detailed Router


TrackSegment.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | K i t e - D e t a i l e d R o u t e r |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./kite/TrackSegment.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef KITE_TRACK_SEGMENT_H
18 #define KITE_TRACK_SEGMENT_H
19 
20 #include <set>
21 #include <functional>
22 #include "kite/TrackElement.h"
23 
24 
25 namespace Kite {
26 
27  using std::string;
28  using std::map;
29  using std::set;
30  using std::binary_function;
31  using Hurricane::Record;
32  using Hurricane::Interval;
33  using Hurricane::DbU;
34  using Hurricane::Net;
35  using Hurricane::Layer;
37 
38  class DataNegociate;
39  class Track;
40  class TrackCost;
41 
42 
43 // -------------------------------------------------------------------
44 // Class : "TrackSegment".
45 
46  class TrackSegment : public TrackElement {
47  public:
48  class CompareById : public binary_function<const TrackSegment*,const TrackSegment*,bool> {
49  public:
50  inline bool operator() ( const TrackSegment* lhs, const TrackSegment* rhs );
51  };
52 
53  public:
54  static TrackElement* create ( AutoSegment*, Track*, bool& created );
55  static size_t getAllocateds ();
56  public:
57  // Wrapped AutoSegment Functions (when applicable).
58  virtual AutoSegment* base () const;
59  virtual bool isFixed () const;
60  virtual bool isHorizontal () const;
61  virtual bool isVertical () const;
62  virtual bool isLocal () const;
63  virtual bool isGlobal () const;
64  virtual bool isBipoint () const;
65  virtual bool isTerminal () const;
66  virtual bool isStrongTerminal ( unsigned int flags=0 ) const;
67  virtual bool isStrap () const;
68  virtual bool isSlackened () const;
69  virtual bool isDogleg () const;
70  virtual bool isReduced () const;
71  virtual bool isUTurn () const;
72  virtual bool isUserDefined () const;
73  // Predicates.
74  virtual bool canDogleg ();
75  virtual bool canDogleg ( Interval );
76  virtual bool canDogleg ( Katabatic::GCell*, unsigned int flags=0 );
77  virtual bool canPivotUp ( float reserve ) const;
78  virtual bool canPivotDown ( float reserve ) const;
79  virtual bool canMoveUp ( float reserve, unsigned int flags ) const;
80  virtual bool canSlacken () const;
81  virtual float getMaxUnderDensity ( unsigned int flags ) const;
82  virtual unsigned long getId () const;
83  virtual unsigned int getDirection () const;
84  virtual Net* getNet () const;
85  virtual const Layer* getLayer () const;
86  virtual DbU::Unit getPitch () const;
87  virtual DbU::Unit getPPitch () const;
88  virtual unsigned long getFreedomDegree () const;
89  virtual unsigned int getDoglegLevel () const;
90  virtual TrackElement* getNext () const;
91  virtual TrackElement* getPrevious () const;
92  virtual TrackElement* getParent () const;
93  virtual DbU::Unit getAxis () const;
94  virtual Interval getFreeInterval () const;
95  virtual Interval getSourceConstraints () const;
96  virtual Interval getTargetConstraints () const;
97  virtual DataNegociate* getDataNegociate ( unsigned int flags=KtDataSelf ) const;
98  virtual TrackElement* getCanonical ( Interval& );
99  virtual size_t getGCells ( Katabatic::GCellVector& ) const;
100  virtual TrackElement* getSourceDogleg ();
101  virtual TrackElement* getTargetDogleg ();
102  virtual TrackElements getPerpandiculars ();
103  virtual size_t getPerpandicularsBound ( set<TrackElement*>& );
104  // Mutators.
105  virtual void setTrack ( Track* );
106  virtual void updateFreedomDegree ();
107  virtual void setDoglegLevel ( unsigned int );
108  virtual void swapTrack ( TrackElement* );
109  virtual void reschedule ( unsigned int level );
110  virtual void detach ();
111  virtual void invalidate ();
112  virtual void revalidate ();
113  virtual void updatePPitch ();
114  virtual void setAxis ( DbU::Unit, unsigned int flags );
115  virtual TrackElement* makeDogleg ();
116  virtual TrackElement* makeDogleg ( Katabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel );
117  virtual TrackElement* makeDogleg ( Interval, unsigned int& flags );
118  virtual void _postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel );
119  virtual bool moveAside ( unsigned int flags );
120  virtual bool slacken ( unsigned int flags=KbNoFlags );
121  virtual bool moveUp ( unsigned int flags );
122  virtual bool moveDown ( unsigned int flags );
123 #if THIS_IS_DISABLED
124  virtual void desalignate ();
125 #endif
126  virtual bool _check () const;
127  virtual Record* _getRecord () const;
128  virtual string _getString () const;
129  virtual string _getTypeName () const;
130 
131  protected:
132  // Attributes.
133  static size_t _allocateds;
134  AutoSegment* _base;
135  unsigned long _freedomDegree;
136  DbU::Unit _ppitch;
137  DataNegociate* _data;
138  unsigned int _dogLegLevel:4;
139 
140  protected:
141  // Constructors & Destructors.
143  virtual ~TrackSegment ();
144  virtual void _postCreate ();
145  virtual void _preDestroy ();
146  private:
147  TrackSegment ( const TrackSegment& );
148  TrackSegment& operator= ( const TrackSegment& );
149 
150  };
151 
152 
153  inline bool TrackSegment::CompareById::operator() ( const TrackSegment* lhs, const TrackSegment* rhs )
154  { return lhs->getId() < rhs->getId(); }
155 
156 
157  typedef set<TrackSegment*,TrackSegment::CompareById> TrackSegmentSet;
158 
159 
160 } // Kite namespace.
161 
162 
163 INSPECTOR_P_SUPPORT(Kite::TrackSegment);
164 
165 #endif // KITE_TRACK_SEGMENT_H
virtual TrackElement * getTargetDogleg()
Definition: TrackSegment.cpp:528
Derived Katabatic::AutoSegment for the router.
Definition: TrackSegment.h:46
virtual float getMaxUnderDensity(unsigned int flags) const
Definition: TrackSegment.cpp:408
virtual bool isLocal() const
Definition: TrackSegment.cpp:151
virtual bool isFixed() const
Definition: TrackSegment.cpp:148
virtual void revalidate()
Definition: TrackSegment.cpp:331
virtual TrackElement * getPrevious() const
Definition: TrackSegment.cpp:197
static TrackElement * create(AutoSegment *, Track *, bool &created)
Definition: TrackSegment.cpp:125
virtual DbU::Unit getAxis() const
Definition: TrackSegment.cpp:170
virtual void invalidate()
Definition: TrackSegment.cpp:178
virtual TrackElement * getNext() const
Definition: TrackSegment.cpp:190
virtual TrackElements getPerpandiculars()
Definition: TrackSegment.cpp:176
virtual void swapTrack(TrackElement *)
Definition: TrackSegment.cpp:350
virtual TrackElement * makeDogleg()
Definition: TrackSegment.cpp:705
std::int64_t Unit
virtual TrackElement * getParent() const
Definition: TrackSegment.cpp:204
Structure managing one routing track.
Definition: Track.h:42
virtual unsigned int getDoglegLevel() const
Definition: TrackSegment.cpp:172
virtual Net * getNet() const
Definition: TrackSegment.cpp:166
virtual bool canDogleg()
Definition: TrackSegment.cpp:545
virtual TrackElement * getCanonical(Interval &)
Definition: TrackSegment.cpp:175
virtual bool isSlackened() const
Definition: TrackSegment.cpp:157
virtual unsigned long getId() const
Definition: TrackSegment.cpp:164
virtual DataNegociate * getDataNegociate(unsigned int flags=KtDataSelf) const
Definition: TrackSegment.cpp:181
Definition: Constants.h:40
virtual void detach()
Definition: TrackSegment.cpp:321
virtual void reschedule(unsigned int level)
Definition: TrackSegment.cpp:392
virtual bool isTerminal() const
Definition: TrackSegment.cpp:154
virtual const Layer * getLayer() const
Definition: TrackSegment.cpp:167
virtual bool isBipoint() const
Definition: TrackSegment.cpp:153
virtual void setTrack(Track *)
Definition: TrackSegment.cpp:317
virtual bool _check() const
Definition: TrackSegment.cpp:825
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
virtual void _postDoglegs(TrackElement *&perpandicular, TrackElement *&parallel)
Definition: TrackSegment.cpp:758
virtual Interval getFreeInterval() const
Definition: TrackSegment.cpp:214
virtual bool isDogleg() const
Definition: TrackSegment.cpp:158
virtual unsigned int getDirection() const
Definition: TrackSegment.cpp:165
virtual bool isStrap() const
Definition: TrackSegment.cpp:156
virtual void setAxis(DbU::Unit, unsigned int flags)
Definition: TrackSegment.cpp:343
The namespace dedicated to Kite.
Definition: Constants.h:22
virtual Interval getTargetConstraints() const
Definition: TrackSegment.cpp:174
virtual void setDoglegLevel(unsigned int)
Definition: TrackSegment.cpp:295
virtual Interval getSourceConstraints() const
Definition: TrackSegment.cpp:173
virtual bool isGlobal() const
Definition: TrackSegment.cpp:152
virtual size_t getGCells(Katabatic::GCellVector &) const
Definition: TrackSegment.cpp:225
virtual unsigned long getFreedomDegree() const
Definition: TrackSegment.cpp:171
Algorimthmic datas associated the TrackSegment.
Definition: DataNegociate.h:50
virtual TrackElement * getSourceDogleg()
Definition: TrackSegment.cpp:511
virtual void updateFreedomDegree()
Definition: TrackSegment.cpp:306
virtual bool isVertical() const
Definition: TrackSegment.cpp:150
virtual bool isHorizontal() const
Definition: TrackSegment.cpp:149


Generated by doxygen 1.8.14 on Mon Feb 3 2020 Return to top of page
Kite - Detailed Router Copyright © 2008-2016 UPMC. All rights reserved