17 #ifndef KATABATIC_KATABATIC_ENGINE_H 18 #define KATABATIC_KATABATIC_ENGINE_H 25 #include "hurricane/DbU.h" 26 #include "hurricane/Torus.h" 27 #include "hurricane/Layer.h" 28 #include "hurricane/Net.h" 29 #include "hurricane/NetRoutingProperty.h" 37 #include "crlcore/ToolEngine.h" 41 class RoutingLayerGauge;
44 #include "katabatic/Constants.h" 45 #include "katabatic/Configuration.h" 46 #include "katabatic/GCell.h" 47 #include "katabatic/AutoSegments.h" 48 #include "katabatic/AutoContact.h" 49 #include "katabatic/ChipTools.h" 58 using Hurricane::Timer;
61 using Hurricane::Torus;
66 using Hurricane::NetRoutingExtension;
67 using Hurricane::NetRoutingState;
78 struct NetCompareByName {
79 inline bool operator() (
const Net* lhs,
const Net* rhs )
const;
82 inline bool NetCompareByName::operator() (
const Net* lhs,
const Net* rhs )
const 83 {
return lhs->getName() < rhs->getName(); }
89 typedef map<Name,NetRoutingState*> NetRoutingStates;
94 typedef set<Net*,NetCompareByName>
NetSet;
103 inline bool isGContact (
const Layer* )
const;
104 inline bool isChip ()
const;
112 inline unsigned int getFlags (
unsigned int mask )
const;
115 inline CellGauge* getCellGauge ()
const;
127 inline const NetRoutingStates& getNetRoutingStates ()
const;
132 inline void setFlags (
unsigned int );
141 void findSpecialNets ();
150 void balanceGlobalDensity ();
152 void updateNetTopology (
Net* );
157 NetRoutingState* getRoutingState (
Net*,
unsigned int flags=KbNoFlags );
158 void _computeNetOptimals (
Net* );
159 void _computeNetTerminals (
Net* );
160 bool _check (
const char* message=NULL )
const;
161 void _check (
Net* )
const;
162 void _gutKatabatic ();
169 void _destroyAutoSegments ();
170 void _destroyAutoContacts ();
171 void _loadGrByNet ();
172 void _loadNetGlobalRouting (
Net* );
173 void _alignate (
Net* );
174 void _balanceGlobalDensity (
unsigned int depth );
175 void _desaturate (
unsigned int depth, set<Net*>&,
unsigned long& total,
unsigned long& globals );
176 void _layerAssignByLength (
unsigned long& total,
unsigned long& global, set<Net*>& );
177 void _layerAssignByLength (
Net*,
unsigned long& total,
unsigned long& global, set<Net*>& );
178 void _layerAssignByTrunk (
unsigned long& total,
unsigned long& global, set<Net*>& );
179 void _layerAssignByTrunk (
Net*, set<Net*>&,
unsigned long& total,
unsigned long& global );
180 void _saveNet (
Net* );
181 void _print ()
const;
182 void _print (
Net* )
const;
183 inline const AutoContactLut& _getAutoContactLut ()
const;
184 inline const AutoSegmentLut& _getAutoSegmentLut ()
const;
186 virtual Record* _getRecord ()
const;
187 virtual string _getString ()
const;
188 virtual string _getTypeName ()
const;
192 static Name _toolName;
195 Configuration* _configuration;
198 AutoSegmentLut _autoSegmentLut;
199 AutoContactLut _autoContactLut;
200 NetRoutingStates _netRoutingStates;
206 virtual void _postCreate ();
207 virtual void _preDestroy ();
222 inline bool KatabaticEngine::isGContact (
const Layer* layer )
const {
return _configuration->isGContact(layer); }
230 inline CellGauge* KatabaticEngine::getCellGauge ()
const {
return _configuration->getCellGauge(); }
239 inline const AutoContactLut& KatabaticEngine::_getAutoContactLut ()
const {
return _autoContactLut; }
240 inline const AutoSegmentLut& KatabaticEngine::_getAutoSegmentLut ()
const {
return _autoSegmentLut; }
244 inline const NetRoutingStates& KatabaticEngine::getNetRoutingStates ()
const {
return _netRoutingStates; }
251 extern const char* missingKTBT;
252 extern const char* badMethod;
257 #endif // KATABATIC_KATABATIC_ENGINE_H const NetSet & getRoutingNets() const
const Layer * getRoutingLayer(size_t depth) const
Definition: KatabaticEngine.h:233
bool doDestroyBaseSegment() const
Definition: KatabaticEngine.h:216
bool isGMetal(const Layer *) const
Definition: KatabaticEngine.h:221
bool isInDemoMode() const
Definition: KatabaticEngine.h:219
set< Net *, NetCompareByName > NetSet
Definition: KatabaticEngine.h:94
Definition: Constants.h:23
size_t getSaturateRp() const
Definition: KatabaticEngine.h:238
static KatabaticEngine * create(Cell *)
Definition: KatabaticEngine.cpp:204
virtual void loadGlobalRouting(unsigned int method)
Definition: KatabaticEngine.cpp:491
const ChipTools & getChipTools() const
Definition: KatabaticEngine.h:243
float getSaturateRatio() const
Definition: KatabaticEngine.h:237
bool doWarnOnGCellOverload() const
Definition: KatabaticEngine.h:218
void slackenBlockIos(Instance *core)
Definition: ChipTools.cpp:180
void setFlags(unsigned int)
Definition: KatabaticEngine.h:223
Configuration * getKatabaticConfiguration()
Definition: KatabaticEngine.h:220
Hurricane::Mask< unsigned long long > Mask
RoutingGauge * getRoutingGauge() const
Definition: KatabaticEngine.h:231
bool doDestroyTool() const
Definition: KatabaticEngine.h:217
GCell Grid.
Definition: GCellGrid.h:42
static const Name & staticGetName()
Definition: KatabaticEngine.cpp:138
Abstract base class for AutoSegment.
Definition: AutoSegment.h:104
set< GCell *, CompareByIndex > SetIndex
Definition: GCell.h:105
void layerAssign(unsigned int method)
DbU::Unit getGlobalThreshold() const
Definition: KatabaticEngine.h:236
void setState(EngineState state)
Definition: KatabaticEngine.h:241
void refresh(unsigned int flags=KbOpenSession)
Definition: KatabaticEngine.cpp:401
The namespace dedicated to Katabatic.
Definition: Katabatic.dox:13
The Katabatic Tool.
Definition: KatabaticEngine.h:91
void setGlobalThreshold(DbU::Unit)
Definition: KatabaticEngine.h:227
unsigned int getFlags(unsigned int mask) const
Definition: KatabaticEngine.h:228
void setSaturateRp(size_t)
Definition: KatabaticEngine.h:226
bool isChip() const
Definition: KatabaticEngine.h:242
void computeNetConstraints(Net *)
void unsetFlags(unsigned int)
Definition: KatabaticEngine.h:224
bool moveUpNetTrunk(AutoSegment *, set< Net *> &globalNets, GCell::SetIndex &invalidateds)
RoutingLayerGauge * getLayerGauge(size_t depth) const
Definition: KatabaticEngine.h:232
void xmlWriteGCellGrid(ostream &)
Definition: KatabaticEngine.cpp:354
virtual Configuration * getConfiguration()
Definition: KatabaticEngine.cpp:437
virtual const Name & getName() const
Definition: KatabaticEngine.cpp:142
bool doDestroyBaseContact() const
Definition: KatabaticEngine.h:215
Definition: Constants.h:59
DbU::Unit getExtensionCap() const
void slackenBorder(Box bb, Layer::Mask, unsigned int flags)
Definition: ChipTools.cpp:164
EngineState getState() const
Definition: KatabaticEngine.h:229
virtual void createDetailedGrid()
Definition: KatabaticEngine.cpp:167
void setSaturateRatio(float)
Definition: KatabaticEngine.h:225
void printMeasures(const string &) const
Definition: KatabaticEngine.cpp:363
Layer * getContactLayer(size_t depth) const
Definition: KatabaticEngine.h:234
EngineState
Definition: Constants.h:54
GCellGrid * getGCellGrid() const
Definition: KatabaticEngine.h:235
virtual void finalizeLayout()
Definition: KatabaticEngine.cpp:514