73 public:
class Flags :
public BaseFlags {
75 enum Flag { NoFlags = 0
76 , BuildRings = (1 << 1)
77 , BuildClockRings = (1 << 2)
78 , BuildSupplyRings = (1 << 3)
79 , NoClockFlatten = (1 << 4)
80 , WarnOnUnplacedInstances = (1 << 5)
81 , StayOnPlugs = (1 << 6)
82 , MaskRings = BuildRings|BuildClockRings|BuildSupplyRings
84 , CellAboutToChange = (1 << 10)
85 , CellChanged = (1 << 11)
86 , CellDestroyed = (1 << 12)
88 , TerminalNetlist = (1 << 20)
92 , PowerFeed = (1 << 24)
93 , FlattenedNets = (1 << 25)
94 , AbstractedSupply = (1 << 26)
97 , SlavedAb = (1 << 29)
98 , Materialized = (1 << 30)
99 , NoExtractConsistent = (1 << 31)
105 virtual std::string _getTypeName ()
const;
106 virtual std::string _getString ()
const;
109 class UniquifyRelation :
public Relation {
111 static UniquifyRelation* create (
Cell* );
112 static UniquifyRelation* get (
const Cell* );
113 virtual Name getName ()
const;
114 static Name staticGetName ();
115 Name getUniqueName ();
116 static std::string getTrunkName (
Name name );
117 virtual bool hasJson ()
const;
119 inline void _setOwner (
Cell* );
120 inline void _setDuplicates (
unsigned int );
121 virtual string _getTypeName ()
const;
122 virtual Record* _getRecord ()
const;
124 static const Name _name;
125 unsigned int _duplicates;
127 UniquifyRelation (
Cell* );
129 virtual void _preDestroy ();
134 static void initialize ();
135 JsonProperty (
unsigned long flags );
136 virtual string getTypeName ()
const;
137 virtual JsonProperty* clone (
unsigned long )
const;
143 static void initialize ();
144 JsonPropertyRef (
unsigned long flags );
145 virtual string getTypeName ()
const;
146 virtual JsonPropertyRef* clone (
unsigned long )
const;
158 virtual Cell* getElement ()
const;
160 virtual bool isValid ()
const;
161 virtual void progress ();
162 virtual string _getString ()
const;
168 inline ClonedSet (
const Cell*
cell );
169 inline ClonedSet (
const ClonedSet& );
172 virtual string _getString ()
const;
177 class SlavedsRelation :
public Relation {
179 static SlavedsRelation* create (
Cell* );
180 static SlavedsRelation* get (
const Cell* );
181 virtual Name getName ()
const;
182 static Name staticGetName ();
183 virtual bool hasJson ()
const;
185 inline void _setOwner (
Cell* );
186 virtual string _getTypeName ()
const;
187 virtual Record* _getRecord ()
const;
189 static const Name _name;
191 SlavedsRelation (
Cell* );
193 virtual void _preDestroy ();
198 static void initialize ();
199 JsonProperty (
unsigned long flags );
200 virtual string getTypeName ()
const;
201 virtual JsonProperty* clone (
unsigned long )
const;
207 static void initialize ();
208 JsonPropertyRef (
unsigned long flags );
209 virtual string getTypeName ()
const;
210 virtual JsonPropertyRef* clone (
unsigned long )
const;
222 virtual Cell* getElement ()
const;
224 virtual bool isValid ()
const;
225 virtual void progress ();
226 virtual string _getString ()
const;
232 inline SlavedsSet (
const Cell*
cell );
233 inline SlavedsSet (
const SlavedsSet& );
236 virtual string _getString ()
const;
241 class InstanceMap :
public IntrusiveMap<Name, Instance> {
246 public: InstanceMap();
249 public:
virtual unsigned _getHashValue(
Name name)
const;
255 public:
class SlaveInstanceSet :
public IntrusiveSet<Instance> {
260 public: SlaveInstanceSet();
268 public:
class NetMap :
public IntrusiveMapConst<Name, Net> {
275 public:
virtual const Name& _getKey(
Net*
net)
const;
276 public:
virtual unsigned _getHashValue(
const Name&
name)
const;
277 public:
virtual Net* _getNextElement(
Net*
net)
const;
282 class PinMap :
public IntrusiveMap<Name, Pin> {
290 public:
virtual unsigned _getHashValue(
Name name)
const;
291 public:
virtual Pin* _getNextElement(
Pin*
pin)
const;
296 public:
class SliceMap :
public IntrusiveMap<const Layer*, Slice> {
304 public:
virtual unsigned _getHashValue(
const Layer*
layer)
const;
310 public:
class MarkerSet :
public IntrusiveSet<Marker> {
317 public:
virtual unsigned _getHashValue(
Marker*
marker)
const;
328 private:
Path _shuntedPath;
329 private: InstanceMap _instanceMap;
331 private: SlaveInstanceSet _slaveInstanceSet;
332 private: NetMap _netMap;
333 private: PinMap _pinMap;
334 private: SliceMap* _sliceMap;
336 private: MarkerSet _markerSet;
337 private:
Box _abutmentBox;
338 private:
Box _boundingBox;
339 private:
Cell* _nextOfLibraryCellMap;
340 private:
Cell* _nextOfSymbolCellSet;
341 private: SlaveEntityMap _slaveEntityMap;
344 private: Flags _flags;
354 protected:
virtual void _postCreate();
356 protected:
virtual void _preDestroy();
358 public:
virtual string _getTypeName()
const {
return _TName(
"Cell");};
359 public:
virtual string _getString()
const;
360 public:
virtual Record* _getRecord()
const;
361 public:
static string getFlagString(
uint64_t );
362 public:
static Record* getFlagRecord(
uint64_t );
365 public: InstanceMap& _getInstanceMap() {
return _instanceMap;};
366 public:
QuadTree* _getQuadTree() {
return _quadTree;};
367 public: SlaveInstanceSet& _getSlaveInstanceSet() {
return _slaveInstanceSet;};
368 public: NetMap& _getNetMap() {
return _netMap;};
369 public: PinMap& _getPinMap() {
return _pinMap;};
370 public: SliceMap* _getSliceMap() {
return _sliceMap;};
372 public: MarkerSet& _getMarkerSet() {
return _markerSet;};
373 public:
Cell* _getNextOfLibraryCellMap()
const {
return _nextOfLibraryCellMap;};
374 public:
Cell* _getNextOfSymbolCellSet()
const {
return _nextOfSymbolCellSet;};
375 public:
AliasNameSet& _getNetAliasSet() {
return _netAliasSet; }
377 public:
void _setNextOfLibraryCellMap(
Cell*
cell) {_nextOfLibraryCellMap =
cell;};
378 public:
void _setNextOfSymbolCellSet(
Cell*
cell) {_nextOfSymbolCellSet =
cell;};
383 public:
void _fit(
const Box&
box);
384 public:
void _unfit(
const Box&
box);
388 public:
void _getSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
389 public:
void _getSlaveEntities(
Entity*
entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
392 public:
void _slaveAbutmentBox(
Cell*);
393 public:
void _setShuntedPath(
Path path) { _shuntedPath=
path; }
396 public:
virtual void _toJson(
JsonWriter*)
const;
397 public:
virtual void _toJsonCollections(
JsonWriter*)
const;
408 public:
virtual Cell* getCell()
const {
return (
Cell*)
this;};
409 public:
virtual Box getBoundingBox()
const;
411 public:
string getHierarchicalName()
const;
413 public:
const Flags& getFlags()
const {
return _flags; }
414 public: Flags& getFlags() {
return _flags; }
415 public: Path getShuntedPath()
const {
return _shuntedPath; }
416 public: Entity* getEntity(
const Signature&)
const;
419 public:
Instances getPlacedInstances()
const;
420 public:
Instances getFixedInstances()
const;
421 public:
Instances getUnplacedInstances()
const;
422 public:
Instances getNotUnplacedInstances()
const;
429 public:
Instances getTerminalInstances()
const;
431 public:
Instances getNonTerminalInstances()
const;
433 public:
Instances getTerminalNetlistInstances()
const;
435 public:
Instances getNonTerminalNetlistInstances()
const;
436 public:
Instances getNonTerminalNetlistInstancesUnder(
const Box&
area)
const;
445 public:
Nets getPowerNets()
const;
446 public:
Nets getGroundNets()
const;
447 public:
Pin* getPin(
const Name&
name)
const {
return _pinMap.getElement(
name);};
448 public:
Pins getPins()
const {
return _pinMap.getElements();};
451 public:
const ExtensionSliceMap& getExtensionSliceMap()
const {
return _extensionSlices; };
456 public:
Markers getMarkers()
const {
return _markerSet.getElements();};
465 public:
Occurrences getTerminalNetlistInstanceOccurrencesUnder(
const Box&
area)
const;
469 public:
Occurrences getHyperNetRootNetOccurrences()
const;
470 public: ExtensionSlice::Mask getExtensionSliceMask (
const Name&
name )
const;
471 public:
Gos getExtensionGos (
const Name&
name )
const;
472 public:
Gos getExtensionGos ( ExtensionSlice::Mask
mask = ~0 )
const;
474 public:
Gos getExtensionGosUnder (
const Box&
area, ExtensionSlice::Mask
mask = ~0 )
const;
475 public:
Cells getSubCells()
const;
476 public:
Cells getClonedCells()
const;
477 public:
Cell* getCloneMaster()
const;
478 public:
Pathes getRecursiveSlavePathes()
const;
485 public:
bool isTerminal()
const {
return _instanceMap.isEmpty();};
490 public:
bool isPad()
const {
return _flags.isset(Flags::Pad);};
491 public:
bool isFeed()
const {
return _flags.isset(Flags::Feed);};
492 public:
bool isDiode()
const {
return _flags.isset(Flags::Diode);};
493 public:
bool isPowerFeed()
const {
return _flags.isset(Flags::PowerFeed);};
494 public:
bool isFlattenedNets()
const {
return _flags.isset(Flags::FlattenedNets);};
495 public:
bool isAbstractedSupply()
const {
return _flags.isset(Flags::AbstractedSupply);};
496 public:
bool isPlaced()
const {
return _flags.isset(Flags::Placed);};
497 public:
bool isRouted()
const {
return _flags.isset(Flags::Routed);};
498 public:
bool isExtractConsistent()
const {
return not _flags.isset(Flags::NoExtractConsistent);};
499 public:
bool isNetAlias(
const Name& name)
const;
506 public:
void slaveAbutmentBox(
Cell*);
507 public:
void unslaveAbutmentBox(
Cell*);
509 public:
void setPad(
bool state) {_flags.set(Flags::Pad,
state);};
510 public:
void setFeed(
bool state) {_flags.set(Flags::Feed,state);};
511 public:
void setDiode(
bool state) {_flags.set(Flags::Diode,state);};
512 public:
void setPowerFeed(
bool state) {_flags.set(Flags::PowerFeed,state);};
513 public:
void setRouted(
bool state) {_flags.set(Flags::Routed,state);};
514 public:
void setAbstractedSupply(
bool state) { _flags.set(Flags::AbstractedSupply,state); };
515 public:
void setNoExtractConsistent(
bool state) { _flags.set(Flags::NoExtractConsistent,state); };
516 public:
void flattenNets(uint64_t flags=Flags::BuildRings);
517 public:
void flattenNets(
const Instance* instance, uint64_t flags=Flags::BuildRings);
518 public:
void flattenNets(
const Instance* instance,
const std::set<std::string>& excludeds, uint64_t flags=Flags::BuildRings);
519 public:
void createRoutingPadRings(uint64_t flags=Flags::BuildRings);
520 public:
void setFlags(uint64_t flags) { _flags |= flags; }
521 public:
void resetFlags(uint64_t flags) { _flags &= ~flags; }
522 public:
bool updatePlacedFlag();
527 public:
void uniquify(
unsigned int depth=std::numeric_limits<unsigned int>::max());
530 public:
void notify(
unsigned flags);
531 public:
void destroyPhysical();