Kite - Detailed Router


RoutingPlane.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2013, 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/RoutingPlane.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef KITE_ROUTING_PLANE_H
18 #define KITE_ROUTING_PLANE_H
19 
20 #include "crlcore/RoutingLayerGauge.h"
21 #include "kite/Track.h"
22 
23 
24 namespace Kite {
25 
27  using Katabatic::KbDirectionMask;
28  class KiteEngine;
29 
30 
31 // -------------------------------------------------------------------
32 // Class : "RoutingPlane".
33 
34  class RoutingPlane {
35 
36  public:
37  static RoutingPlane* create ( KiteEngine*, size_t depth );
38  void destroy ();
39  inline bool isHorizontal () const;
40  inline bool isVertical () const;
41  inline KiteEngine* getKiteEngine () const;
42  inline RoutingLayerGauge* getLayerGauge () const;
43  inline unsigned int getDirection () const;
44  inline size_t getDepth () const;
45  inline DbU::Unit getAxisMin () const;
46  inline DbU::Unit getAxisMax () const;
47  inline DbU::Unit getTrackMin () const;
48  inline DbU::Unit getTrackMax () const;
49  RoutingPlane* getTop () const;
50  RoutingPlane* getBottom () const;
51  inline const Layer* getLayer () const;
52  inline const Layer* getBlockageLayer () const;
53  inline size_t getTracksSize () const;
54  inline size_t computeTracksSize () const;
55  inline DbU::Unit getTrackPosition ( size_t index ) const;
56  Track* getTrackByIndex ( size_t index ) const;
57  Track* getTrackByPosition ( DbU::Unit axis, unsigned int mode=KtNearest ) const;
58  bool _check ( unsigned int& overlaps ) const;
59  Record* _getRecord () const;
60  string _getString () const;
61  inline string _getTypeName () const;
62 
63  protected:
64  // Sub-Class: TrackCompare.
65  struct TrackCompare {
66  inline bool operator() ( Track* track1, Track* track2 );
67  };
68 
69  protected:
70  // Attributes.
71  KiteEngine* _kite;
72  RoutingLayerGauge* _layerGauge;
73  size_t _depth;
74  unsigned int _flags;
75  DbU::Unit _axisMin;
76  DbU::Unit _axisMax;
77  DbU::Unit _trackMin;
78  DbU::Unit _trackMax;
79  vector<Track*> _tracks;
80 
81  protected:
82  // Constructors & Destructors.
83  RoutingPlane ( KiteEngine*, size_t depth );
84  ~RoutingPlane ();
85  private:
86  RoutingPlane ( const RoutingPlane& );
87  RoutingPlane& operator= ( const RoutingPlane& );
88  };
89 
90 
91 // Inline Functions.
92  inline bool RoutingPlane::TrackCompare::operator() ( Track* lhs, Track* rhs )
93  { return lhs->getAxis() > rhs->getAxis(); };
94 
95  inline KiteEngine* RoutingPlane::getKiteEngine () const { return _kite; }
96  inline RoutingLayerGauge* RoutingPlane::getLayerGauge () const { return _layerGauge; }
97  inline unsigned int RoutingPlane::getDirection () const { return _flags & KbDirectionMask; }
98  inline size_t RoutingPlane::getDepth () const { return _depth; }
99  inline DbU::Unit RoutingPlane::getAxisMin () const { return _axisMin; }
100  inline DbU::Unit RoutingPlane::getAxisMax () const { return _axisMax; }
101  inline DbU::Unit RoutingPlane::getTrackMin () const { return _trackMin; }
102  inline DbU::Unit RoutingPlane::getTrackMax () const { return _trackMax; }
103  inline const Layer* RoutingPlane::getLayer () const { return getLayerGauge()->getLayer(); }
104  inline const Layer* RoutingPlane::getBlockageLayer () const { return getLayerGauge()->getBlockageLayer(); }
105  inline size_t RoutingPlane::getTracksSize () const { return _tracks.size(); }
106  inline string RoutingPlane::_getTypeName () const { return "RoutingPlane"; }
107 
108  inline size_t RoutingPlane::computeTracksSize () const
109  { return _layerGauge->getTrackNumber(_axisMin,_axisMax); }
110 
111  inline DbU::Unit RoutingPlane::getTrackPosition ( size_t index ) const
112  { return _layerGauge->getTrackPosition(_axisMin,index); }
113 
114  inline bool RoutingPlane::isHorizontal () const
115  { return (getDirection() & KbHorizontal); }
116 
117  inline bool RoutingPlane::isVertical () const
118  { return (getDirection() & KbVertical); }
119 
120 
121 } // Kite namespace.
122 
123 
124 INSPECTOR_P_SUPPORT(Kite::RoutingPlane);
125 
126 
127 #endif // KITE_ROUTING_PLANE_H
unsigned int getDirection() const
Definition: RoutingPlane.h:97
bool isVertical() const
Definition: RoutingPlane.h:117
const Layer * getLayer() const
Definition: RoutingPlane.h:103
const Layer * getLayer() const
const Layer * getBlockageLayer() const
Definition: RoutingPlane.h:104
size_t getTracksSize() const
Definition: RoutingPlane.h:105
RoutingPlane * getBottom() const
Definition: RoutingPlane.cpp:150
static RoutingPlane * create(KiteEngine *, size_t depth)
Definition: RoutingPlane.cpp:91
std::int64_t Unit
bool _check(unsigned int &overlaps) const
Definition: RoutingPlane.cpp:174
bool isHorizontal() const
Definition: RoutingPlane.h:114
unsigned int getTrackNumber(DbU::Unit start, DbU::Unit stop) const
KiteEngine * getKiteEngine() const
Definition: RoutingPlane.h:95
DbU::Unit getTrackMax() const
Definition: RoutingPlane.h:102
Structure managing one routing track.
Definition: Track.h:42
DbU::Unit getTrackMin() const
Definition: RoutingPlane.h:101
const Layer * getBlockageLayer() const
The Kite Tool.
Definition: KiteEngine.h:60
DbU::Unit getTrackPosition(size_t index) const
Definition: RoutingPlane.h:111
Track * getTrackByPosition(DbU::Unit axis, unsigned int mode=KtNearest) const
Definition: RoutingPlane.cpp:164
DbU::Unit getAxisMin() const
Definition: RoutingPlane.h:99
DbU::Unit getAxisMax() const
Definition: RoutingPlane.h:100
RoutingLayerGauge * getLayerGauge() const
Definition: RoutingPlane.h:96
Array of Tracks in one Layer.
Definition: RoutingPlane.h:34
size_t computeTracksSize() const
Definition: RoutingPlane.h:108
DbU::Unit getAxis() const
Definition: Track.h:192
size_t getDepth() const
Definition: RoutingPlane.h:98
Definition: Constants.h:41
The namespace dedicated to Kite.
Definition: Constants.h:22
RoutingPlane * getTop() const
Definition: RoutingPlane.cpp:146
Track * getTrackByIndex(size_t index) const
Definition: RoutingPlane.cpp:157


Generated by doxygen 1.8.14 on Sun Nov 21 2021 Return to top of page
Kite - Detailed Router Copyright © 2008-2020 Sorbonne Universite. All rights reserved