Kite - Detailed Router


TrackMarker.h
1 
2 // -*- C++ -*-
3 //
4 // This file is part of the Coriolis Software.
5 // Copyright (c) UPMC 2008-2013, All Rights Reserved
6 //
7 // +-----------------------------------------------------------------+
8 // | C O R I O L I S |
9 // | K i t e - D e t a i l e d R o u t e r |
10 // | |
11 // | Author : Jean-Paul CHAPUT |
12 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
13 // | =============================================================== |
14 // | C++ Header : "./kite/TrackMarker.h" |
15 // +-----------------------------------------------------------------+
16 
17 
18 
19 
20 #ifndef KITE_TRACK_MARKER_H
21 #define KITE_TRACK_MARKER_H
22 
23 #include "hurricane/DbU.h"
24 namespace Hurricane {
25  class RoutingPad;
26  class Net;
27 }
28 
29 
30 namespace Kite {
31 
32  using Hurricane::Record;
33  using Hurricane::DbU;
35  using Hurricane::Net;
36 
37  class Track;
38 
39 
40 // -------------------------------------------------------------------
41 // Class : "TrackMarker".
42 
43  class TrackMarker {
44 
45  public:
46  static TrackMarker* create ( RoutingPad*, size_t depth );
47  void destroy ();
48  public:
49  Net* getNet () const;
50  inline DbU::Unit getSourceU () const;
51  inline DbU::Unit getTargetU () const;
52  inline Track* getTrack () const;
53  inline unsigned int getWeight ( const Track* ) const;
54  inline void setTrack ( Track* );
55  Record* _getRecord () const;
56  std::string _getString () const;
57  std::string _getTypeName () const;
58  public:
59  class Compare {
60  public:
61  inline bool operator() ( const TrackMarker* lhs , const TrackMarker* rhs ) const;
62  inline bool operator() ( DbU::Unit lhsU, const TrackMarker* rhs ) const;
63  inline bool operator() ( const TrackMarker* lhs , DbU::Unit rhsU ) const;
64  private:
65  inline bool markerLess ( DbU::Unit lhsU, DbU::Unit rhsU ) const;
66  };
67 
68  protected:
69  // Attributes.
70  RoutingPad* _routingPad;
71  DbU::Unit _sourcePosition;
72  DbU::Unit _targetPosition;
73  Track* _track;
74  unsigned int _weight;
75  unsigned int _refcount;
76 
77  protected:
78  // Constructors & destructors.
79  TrackMarker ( RoutingPad*, size_t depth );
80  ~TrackMarker () {};
81  private:
82  TrackMarker ( const TrackMarker& );
83  TrackMarker& operator= ( const TrackMarker& );
84  };
85 
86 
87 // Inline Functions.
88  inline DbU::Unit TrackMarker::getSourceU () const { return _sourcePosition; }
89  inline DbU::Unit TrackMarker::getTargetU () const { return _targetPosition; }
90  inline Track* TrackMarker::getTrack () const { return _track; }
91  inline unsigned int TrackMarker::getWeight ( const Track* track ) const { return _weight; }
92  inline void TrackMarker::setTrack ( Track* track ) { _track = track; }
93 
94  inline bool TrackMarker::Compare::operator() ( const TrackMarker* lhs, const TrackMarker* rhs ) const
95  { return markerLess ( lhs->getSourceU(), rhs->getSourceU() ); }
96 
97  inline bool TrackMarker::Compare::operator() ( DbU::Unit lhsU, const TrackMarker* rhs ) const
98  { return markerLess ( lhsU, rhs->getSourceU() ); }
99 
100  inline bool TrackMarker::Compare::operator() ( const TrackMarker* lhs, DbU::Unit rhsU ) const
101  { return markerLess ( lhs->getSourceU(), rhsU ); }
102 
103  inline bool TrackMarker::Compare::markerLess ( DbU::Unit lhsU, DbU::Unit rhsU ) const
104  { return ( lhsU < rhsU ); }
105 
106 
107 } // Kite namespace.
108 
109 
110 INSPECTOR_P_SUPPORT(Kite::TrackMarker);
111 
112 
113 #endif // KITE_TRACK_MARKER_H
DbU::Unit getTargetU() const
Definition: TrackMarker.h:89
DbU::Unit getSourceU() const
Definition: TrackMarker.h:88
std::int64_t Unit
static TrackMarker * create(RoutingPad *, size_t depth)
Definition: TrackMarker.cpp:44
unsigned int getWeight(const Track *) const
Definition: TrackMarker.h:91
void setTrack(Track *)
Definition: TrackMarker.h:92
Structure managing one routing track.
Definition: Track.h:42
Tag part of Track with a weight.
Definition: TrackMarker.h:43
Track * getTrack() const
Definition: TrackMarker.h:90
The namespace dedicated to Kite.
Definition: Constants.h:22
Net * getNet() const
Definition: TrackMarker.cpp:98


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