17 #ifndef KATABATIC_SESSION_H 18 #define KATABATIC_SESSION_H 24 #include <boost/function.hpp> 25 #include "hurricane/Commons.h" 26 #include "hurricane/DbU.h" 27 #include "crlcore/CellGauge.h" 28 #include "crlcore/RoutingGauge.h" 29 #include "katabatic/Constants.h" 30 #include "katabatic/Configuration.h" 51 using Hurricane::_TName;
52 using Hurricane::Record;
63 class KatabaticEngine;
72 static inline bool doDestroyBaseContact ();
73 static inline bool doDestroyBaseSegment ();
74 static inline bool doDestroyTool ();
75 static bool isInDemoMode ();
76 static bool doWarnGCellOverload ();
77 static Session*
get (
const char* message=NULL );
80 static inline const Configuration* getConfiguration ();
81 static float getSaturateRatio ();
82 static size_t getSaturateRp ();
83 static inline size_t getAllowedDepth ();
85 static inline CellGauge* getCellGauge ();
86 static inline DbU::Unit getSliceHeight ();
90 static inline size_t getDepth ();
91 static inline size_t getViaDepth (
const Layer* layer );
92 static inline size_t getLayerDepth (
const Layer* layer );
93 static inline const Layer* getRoutingLayer (
size_t );
94 static inline const Layer* getContactLayer (
size_t );
95 static unsigned int getDirection (
size_t depth );
96 static inline DbU::Unit getPitch (
size_t depth,
unsigned int flags );
97 static inline DbU::Unit getOffset (
size_t depth );
98 static inline DbU::Unit getWireWidth (
size_t depth );
99 static inline DbU::Unit getViaWidth (
size_t depth );
100 static inline unsigned int getDirection (
const Layer* );
101 static inline DbU::Unit getPitch (
const Layer*,
unsigned int flags );
106 static inline size_t getSegmentStackSize ();
107 static inline size_t getContactStackSize ();
108 static inline const vector<AutoSegment*>& getInvalidateds ();
109 static inline const vector<AutoSegment*>& getRevalidateds ();
110 static inline const set<AutoSegment*>& getDestroyeds ();
111 static inline const vector<AutoSegment*>& getDoglegs ();
112 static inline const set<Net*>& getNetsModificateds ();
114 static void close ();
115 static void setKatabaticFlags (
unsigned int );
117 static inline void doglegReset ();
118 static inline void revalidateTopology ();
119 static inline void setInvalidateMask (
unsigned int );
120 static inline void invalidate (
Net* );
123 static inline size_t revalidate ();
130 static inline void destroyRequest (
AutoSegment* );
132 bool _doDestroyBaseContact ();
133 bool _doDestroyBaseSegment ();
134 bool _doDestroyTool ();
135 virtual Configuration* _getConfiguration ();
137 inline void _doglegReset ();
138 void _invalidate (
Net* );
143 void _revalidateTopology ();
144 size_t _revalidate ();
145 DbU::Unit _getPitch (
size_t depth,
unsigned int flags )
const;
146 Record* _getRecord ()
const;
147 string _getString ()
const;
148 inline string _getTypeName ()
const;
154 CellGauge* _cellGauge;
156 vector<AutoContact*> _autoContacts;
157 vector<AutoSegment*> _doglegs;
158 vector<AutoSegment*> _segmentInvalidateds;
159 vector<AutoSegment*> _segmentRevalidateds;
160 set<Net*> _netInvalidateds;
161 set<Net*> _netRevalidateds;
162 set<AutoSegment*> _destroyedSegments;
168 virtual void _postCreate ();
169 virtual void _preDestroy ();
177 inline Technology* Session::getTechnology () {
return get(
"getTechnology()")->_technology; }
178 inline CellGauge* Session::getCellGauge () {
return get(
"getCellGauge()")->_cellGauge; }
179 inline RoutingGauge* Session::getRoutingGauge () {
return get(
"getRoutingGauge()")->_routingGauge; }
180 inline bool Session::doDestroyBaseContact () {
return get(
"doDestroyBaseContact()")->_doDestroyBaseContact(); }
181 inline bool Session::doDestroyBaseSegment () {
return get(
"doDestroyBaseSegment()")->_doDestroyBaseSegment(); }
182 inline bool Session::doDestroyTool () {
return get(
"doDestroyTool()")->_doDestroyTool(); }
183 inline const Configuration* Session::getConfiguration () {
return get(
"getConfiguration()")->_getConfiguration(); }
184 inline KatabaticEngine* Session::getKatabatic () {
return get(
"getKatabatic()")->_katabatic; }
185 inline void Session::revalidateTopology () {
return get(
"revalidateTopology()")->_revalidateTopology(); }
186 inline size_t Session::revalidate () {
return get(
"revalidate()")->_revalidate(); }
187 inline size_t Session::getSegmentStackSize () {
return get(
"getSegmentStackSize()")->_segmentInvalidateds.size(); }
188 inline size_t Session::getContactStackSize () {
return get(
"getContactStackSize()")->_autoContacts.size(); }
189 inline const vector<AutoSegment*>& Session::getInvalidateds () {
return get(
"getInvalidateds()")->_segmentInvalidateds; }
190 inline const vector<AutoSegment*>& Session::getRevalidateds () {
return get(
"getRevalidateds()")->_segmentRevalidateds; }
191 inline const set<AutoSegment*>& Session::getDestroyeds () {
return get(
"getDestroyeds()")->_destroyedSegments; }
192 inline const vector<AutoSegment*>& Session::getDoglegs () {
return get(
"getDoglegs()")->_doglegs; }
193 inline const set<Net*>& Session::getNetsModificateds () {
return get(
"getNetsModificateds()")->_netRevalidateds; }
194 inline void Session::doglegReset () {
return get(
"doglegReset()")->_doglegReset (); }
195 inline void Session::invalidate (
Net* net ) {
return get(
"invalidate(Net*)")->_invalidate(net); }
196 inline void Session::invalidate (
AutoContact* autoContact ) {
return get(
"invalidate(AutoContact*)")->_invalidate(autoContact); }
197 inline void Session::invalidate (
AutoSegment* autoSegment ) {
return get(
"invalidate(AutoSegment*)")->_invalidate(autoSegment); }
198 inline void Session::dogleg (
AutoSegment* autoSegment ) {
return get(
"dogleg(AutoSegment*)")->_dogleg(autoSegment); }
199 inline void Session::destroyRequest (
AutoSegment* autoSegment ) {
return get(
"destroyRequest(AutoSegment*)")->_destroyRequest(autoSegment); }
201 inline size_t Session::getAllowedDepth () {
return getConfiguration()->getAllowedDepth(); }
203 inline DbU::Unit Session::getSliceHeight () {
return getCellGauge()->getSliceHeight(); }
204 inline DbU::Unit Session::getSliceStep () {
return getCellGauge()->getSliceStep(); }
205 inline RoutingLayerGauge* Session::getLayerGauge (
size_t depth ) {
return getRoutingGauge()->getLayerGauge(depth); }
206 inline size_t Session::getDepth () {
return getRoutingGauge()->
getDepth(); }
207 inline size_t Session::getViaDepth (
const Layer* layer ) {
return getRoutingGauge()->getViaDepth(layer); }
208 inline size_t Session::getLayerDepth (
const Layer* layer ) {
return getRoutingGauge()->getLayerDepth(layer); }
209 inline const Layer* Session::getRoutingLayer (
size_t depth ) {
return getRoutingGauge()->getRoutingLayer(depth); }
210 inline const Layer* Session::getContactLayer (
size_t depth ) {
return getRoutingGauge()->getContactLayer(depth); }
211 inline DbU::Unit Session::getPitch (
size_t depth,
unsigned int flags=
Configuration::NoFlags ) {
return get(
"getPitch(depth,flags)")->_getPitch( depth, flags ); }
212 inline DbU::Unit Session::getOffset (
size_t depth ) {
return getRoutingGauge()->getLayerOffset(depth); }
213 inline DbU::Unit Session::getWireWidth (
size_t depth ) {
return getRoutingGauge()->getLayerWireWidth(depth); }
214 inline DbU::Unit Session::getViaWidth (
size_t depth ) {
return getRoutingGauge()->getViaWidth(depth); }
216 inline DbU::Unit Session::getOffset (
const Layer* layer ) {
return getOffset ( getLayerDepth(layer) ); }
217 inline DbU::Unit Session::getWireWidth (
const Layer* layer ) {
return getWireWidth( getLayerDepth(layer) ); }
218 inline DbU::Unit Session::getViaWidth (
const Layer* layer ) {
return getViaWidth ( getViaDepth(layer) ); }
219 inline DbU::Unit Session::getExtensionCap (
const Layer* layer ) {
return getConfiguration()->getExtensionCap(layer); }
220 inline unsigned int Session::getDirection (
const Layer* layer ) {
return getDirection( getLayerDepth(layer) ); }
222 inline void Session::_dogleg (
AutoSegment* segment ) { _doglegs.push_back(segment); }
223 inline void Session::_doglegReset () { _doglegs.clear(); }
224 inline void Session::_invalidate (
AutoContact* contact ) { _autoContacts.push_back(contact); }
225 inline void Session::_invalidate (
AutoSegment* segment ) { _segmentInvalidateds.push_back(segment); }
226 inline void Session::_destroyRequest (
AutoSegment* segment ) { _destroyedSegments.insert(segment); }
227 inline string Session::_getTypeName ()
const {
return _TName(
"Session"); }
236 #endif // KATABATIC_SESSION_H
Modification Session for Katabatic.
Definition: Session.h:69
Abstract base class for AutoSegment.
Definition: AutoSegment.h:104
unsigned int getDepth() const
Definition: LoadGrByNet.cpp:405
The namespace dedicated to Katabatic.
Definition: Katabatic.dox:13
The Katabatic Tool.
Definition: KatabaticEngine.h:91