# 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;
39 using Katabatic::AutoSegment;
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:
65 DataNegociate ( TrackElement* );
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
Kite::RoutingEvent
Atomic Placement Request for a TrackSegment.
Definition: RoutingEvent.h:55
Kite::DataNegociate::MaximumSlack
Definition: DataNegociate.h:60
Kite::DataNegociate::getTrackSegment
TrackElement * getTrackSegment() const
Definition: DataNegociate.h:121
Kite::DataNegociate::SlackState
SlackState
Definition: DataNegociate.h:52
Kite::DataNegociate::getRipupCount
unsigned int getRipupCount() const
Definition: DataNegociate.h:126
Kite::DataNegociate::ConflictSolveByPlaceds
Definition: DataNegociate.h:57
Kite::DataNegociate::setState
void setState(unsigned int, unsigned int flags=0)
Definition: DataNegociate.h:142
Kite::DataNegociate::decRipupCount
void decRipupCount()
Definition: DataNegociate.h:138
Kite::DataNegociate::setRipupCount
void setRipupCount(unsigned int)
Definition: DataNegociate.h:136
Kite::DataNegociate::RipupPerpandiculars
Definition: DataNegociate.h:52
Hurricane::DbU::Unit
std::int64_t Unit
Kite::DataNegociate::getStateCount
unsigned int getStateCount() const
Definition: DataNegociate.h:132
Kite::DataNegociate::hasRoutingEvent
bool hasRoutingEvent() const
Definition: DataNegociate.h:119
Kite::DataNegociate::getTerminals
unsigned int getTerminals() const
Definition: DataNegociate.h:125
Kite::DataNegociate::setRoutingEvent
void setRoutingEvent(RoutingEvent *)
Definition: DataNegociate.h:134
Kite::DataNegociate::getStateAndRipupCount
unsigned int getStateAndRipupCount() const
Definition: DataNegociate.h:152
Kite::DataNegociate::ConflictSolveByHistory
Definition: DataNegociate.h:56
Kite::DataNegociate::getNet
Net * getNet() const
Definition: DataNegociate.h:129
Kite::Track
Structure managing one routing track.
Definition: Track.h:42
Hurricane::Interval
Kite::DataNegociate::Repair
Definition: DataNegociate.h:62
Kite::KtResetCount
Definition: Constants.h:43
Kite::DataNegociate::resetStateCount
void resetStateCount()
Definition: DataNegociate.h:133
Katabatic::AutoSegment
Kite::DataNegociate::getRoutingEvent
RoutingEvent * getRoutingEvent() const
Definition: DataNegociate.h:120
Katabatic
Kite::DataNegociate::getWiringDelta
DbU::Unit getWiringDelta(DbU::Unit axis) const
Definition: DataNegociate.cpp:67
Kite::DataNegociate::getState
unsigned int getState() const
Definition: DataNegociate.h:124
Kite::DataNegociate::getLeftMinExtend
DbU::Unit getLeftMinExtend() const
Definition: DataNegociate.h:127
Kite::DataNegociate::update
void update()
Definition: DataNegociate.cpp:82
Kite::DataNegociate::Dogleg
Definition: DataNegociate.h:54
Kite::DataNegociate::MoveUp
Definition: DataNegociate.h:59
Kite::DataNegociate::getPerpandicularFree
const Interval & getPerpandicularFree() const
Definition: DataNegociate.h:131
Kite::DataNegociate::incRipupCount
void incRipupCount()
Definition: DataNegociate.h:137
Kite::TrackElement
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
Kite::DataNegociate::Slacken
Definition: DataNegociate.h:55
Kite::DataNegociate::getTrack
Track * getTrack() const
Definition: DataNegociate.h:123
Hurricane
Kite::DataNegociate::Unimplemented
Definition: DataNegociate.h:61
Kite::DataNegociate::Minimize
Definition: DataNegociate.h:53
Kite::TrackElement::getTrack
Track * getTrack() const
Definition: TrackElement.h:238
Kite
The namespace dedicated to Kite.
Definition: Constants.h:22
Kite::DataNegociate::getRightMinExtend
DbU::Unit getRightMinExtend() const
Definition: DataNegociate.h:128
Kite::DataNegociate::LocalVsGlobal
Definition: DataNegociate.h:58
Kite::DataNegociate
Algorimthmic datas associated the TrackSegment.
Definition: DataNegociate.h:50
Kite::DataNegociate::resetRipupCount
void resetRipupCount()
Definition: DataNegociate.h:139
Hurricane::Net

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