Kite - Detailed Router


DataNegociate.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@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./kite/DataNegociate.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef KITE_DATA_NEGOCIATE_H
18 #define KITE_DATA_NEGOCIATE_H
19 
20 #include <string>
21 #include <iostream>
22 
23 namespace Hurricane {
24  class Record;
25 }
26 
27 #include "kite/TrackElement.h"
28 namespace Katabatic {
29  class AutoSegment;
30 }
31 
32 
33 namespace Kite {
34 
35  using std::string;
36  using std::cerr;
37  using std::endl;
38  using Hurricane::Record;
40 
41  class Track;
42  class TrackElement;
43  class RoutingEvent;
44 
45 
46 // -------------------------------------------------------------------
47 // Class : "DataNegociate".
48 
49 
50  class DataNegociate {
51  public:
52  enum SlackState { RipupPerpandiculars = 1
53  , Minimize = 2
54  , Dogleg = 3
55  , Slacken = 4
56  , ConflictSolveByHistory = 5
57  , ConflictSolveByPlaceds = 6
58  , LocalVsGlobal = 7
59  , MoveUp = 8
60  , MaximumSlack = 9
61  , Unimplemented =10
62  , Repair =11
63  };
64  public:
66  ~DataNegociate ();
67  inline bool hasRoutingEvent () const;
68  inline RoutingEvent* getRoutingEvent () const;
69  inline TrackElement* getTrackSegment () const;
70  inline TrackElement* getChildSegment () const;
71  inline Track* getTrack () const;
72  inline DbU::Unit getLeftMinExtend () const;
73  inline DbU::Unit getRightMinExtend () const;
74  inline unsigned int getTerminals () const;
75  inline Net* getNet () const;
76  inline unsigned int getState () const;
77  inline unsigned int getStateCount () const;
78  inline unsigned int getRipupCount () const;
79  inline unsigned int getStateAndRipupCount () const;
80  DbU::Unit getWiringDelta ( DbU::Unit axis ) const;
81  inline const vector<TrackElement*>& getPerpandiculars () const;
82  inline const Interval& getPerpandicularFree () const;
83  inline void setState ( unsigned int, unsigned int flags=0 );
84  inline void setRoutingEvent ( RoutingEvent* );
85  inline void setChildSegment ( TrackElement* );
86  inline void setRipupCount ( unsigned int );
87  inline void incRipupCount ();
88  inline void decRipupCount ();
89  inline void resetRipupCount ();
90  inline void resetStateCount ();
91  void update ();
92  static string getStateString ( DataNegociate* );
93  Record* _getRecord () const;
94  string _getString () const;
95  inline string _getTypeName () const;
96  protected:
97  // Attributes.
98  TrackElement* _trackSegment;
99  TrackElement* _childSegment;
100  RoutingEvent* _routingEvent;
101  Net* _net;
102  unsigned int _state : 5;
103  unsigned int _stateCount : 5;
104  unsigned int _terminals : 5;
105  unsigned int _ripupCount : 16;
106  DbU::Unit _leftMinExtend;
107  DbU::Unit _rightMinExtend;
108  vector<DbU::Unit> _attractors;
109  vector<TrackElement*> _perpandiculars;
110  Interval _perpandicularFree;
111  Interval _reduceRanges[2];
112  private:
113  DataNegociate ( const DataNegociate& );
114  DataNegociate& operator= ( const DataNegociate& );
115  };
116 
117 
118 // Inline Functions.
119  inline bool DataNegociate::hasRoutingEvent () const { return _routingEvent != NULL; }
120  inline RoutingEvent* DataNegociate::getRoutingEvent () const { return _routingEvent; }
121  inline TrackElement* DataNegociate::getTrackSegment () const { return _trackSegment; }
122  inline TrackElement* DataNegociate::getChildSegment () const { return _childSegment; }
123  inline Track* DataNegociate::getTrack () const { return _trackSegment->getTrack(); }
124  inline unsigned int DataNegociate::getState () const { return _state; }
125  inline unsigned int DataNegociate::getTerminals () const { return _terminals; }
126  inline unsigned int DataNegociate::getRipupCount () const { return _ripupCount; }
127  inline DbU::Unit DataNegociate::getLeftMinExtend () const { return _leftMinExtend; }
128  inline DbU::Unit DataNegociate::getRightMinExtend () const { return _rightMinExtend; }
129  inline Net* DataNegociate::getNet () const { return _net; }
130  inline const vector<TrackElement*>& DataNegociate::getPerpandiculars () const { return _perpandiculars; }
131  inline const Interval& DataNegociate::getPerpandicularFree () const { return _perpandicularFree; }
132  inline unsigned int DataNegociate::getStateCount () const { return _stateCount; }
133  inline void DataNegociate::resetStateCount () { _stateCount=0; }
134  inline void DataNegociate::setRoutingEvent ( RoutingEvent* event ) { _routingEvent = event; }
135  inline void DataNegociate::setChildSegment ( TrackElement* child ) { _childSegment = child; }
136  inline void DataNegociate::setRipupCount ( unsigned int count ) { _ripupCount = count; }
137  inline void DataNegociate::incRipupCount () { _ripupCount++; }
138  inline void DataNegociate::decRipupCount () { if (_ripupCount) _ripupCount--; }
139  inline void DataNegociate::resetRipupCount () { _ripupCount = 0; }
140  inline string DataNegociate::_getTypeName () const { return "DataNegociate"; }
141 
142  inline void DataNegociate::setState ( unsigned int state, unsigned int flags )
143  {
144  if ( (_state != state) or (flags & KtResetCount) ) {
145  //std::cerr << "Changing state to:" << state << std::endl;
146  _state = state;
147  _stateCount = 1;
148  } else
149  _stateCount++;
150  }
151 
152  inline unsigned int DataNegociate::getStateAndRipupCount () const
153  { return (_state << 4) + _ripupCount; }
154 
155 
156 } // Kite namespace.
157 
158 #endif // KITE_DATA_NEGOCIATE_H
Atomic Placement Request for a TrackSegment.
Definition: RoutingEvent.h:55
SlackState
Definition: DataNegociate.h:52
std::int64_t Unit
Structure managing one routing track.
Definition: Track.h:42
Definition: Constants.h:43
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
The namespace dedicated to Kite.
Definition: Constants.h:22
Algorimthmic datas associated the TrackSegment.
Definition: DataNegociate.h:50


Generated by doxygen 1.8.13 on Mon May 14 2018 Return to top of page
Kite - Detailed Router Copyright © 2008-2016 UPMC. All rights reserved