21 #include "hurricane/Go.h"
22 #include "hurricane/Plug.h"
23 #include "hurricane/SharedPath.h"
56 public:
operator const Code&()
const {
return _code;};
60 public:
string _getTypeName()
const {
return _TName(
"Instance::PlacementStatus"); };
61 public:
string _getString()
const;
62 public: Record* _getRecord()
const;
66 public:
class PlugMap :
public IntrusiveMap<const Net*, Plug> {
69 public:
typedef IntrusiveMap<const Net*, Plug>
Inherit;
73 public:
virtual const Net* _getKey(Plug* plug)
const;
74 public:
virtual unsigned _getHashValue(
const Net* masterNet)
const;
75 public:
virtual Plug* _getNextElement(Plug* plug)
const;
76 public:
virtual void _setNextElement(Plug* plug, Plug* nextPlug)
const;
80 public:
class SharedPathMap :
public IntrusiveMap<const SharedPath*, SharedPath> {
83 public:
typedef IntrusiveMap<const SharedPath*, SharedPath>
Inherit;
85 public: SharedPathMap();
87 public:
virtual const SharedPath* _getKey(SharedPath* sharedPath)
const;
88 public:
virtual unsigned _getHashValue(
const SharedPath* tailSharedPath)
const;
89 public:
virtual SharedPath* _getNextElement(SharedPath* sharedPath)
const;
90 public:
virtual void _setNextElement(SharedPath* sharedPath, SharedPath* nextSharedPath)
const;
99 private: Cell* _masterCell;
100 private: Transformation _transformation;
101 private: PlacementStatus _placementStatus;
102 private: PlugMap _plugMap;
103 private: SharedPathMap _sharedPathMap;
104 private: Instance* _nextOfCellInstanceMap;
105 private: Instance* _nextOfCellSlaveInstanceSet;
110 protected: Instance(Cell* cell,
const Name& name, Cell* masterCell,
const Transformation& transformation,
const PlacementStatus& placementstatus,
bool secureFlag);
118 public:
virtual Cell* getCell()
const {
return _cell;};
119 public:
virtual Box getBoundingBox()
const;
123 public:
const PlacementStatus& getPlacementStatus()
const {
return _placementStatus;};
124 public:
Plug*
getPlug(
const Net* masterNet)
const {
return _plugMap.getElement(masterNet);};
137 public:
bool isTerminal()
const;
138 public:
bool isTerminalNetlist()
const;
139 public:
bool isUnique()
const;
140 public:
bool isUniquified()
const;
141 public:
bool isUniquifyMaster()
const;
158 public:
virtual void materialize();
159 public:
virtual void unmaterialize();
160 public:
virtual void invalidate(
bool propagateFlag =
true);
165 public:
void setPlacementStatus(
const PlacementStatus& placementstatus);
168 public:
void slaveAbutmentBox();
174 protected:
virtual void _postCreate();
176 protected:
virtual void _preDestroy();
178 public:
virtual string _getTypeName()
const {
return _TName(
"Instance");};
179 public:
virtual string _getString()
const;
180 public:
virtual Record* _getRecord()
const;
181 public:
virtual void _toJson(JsonWriter*)
const;
182 public:
virtual void _toJsonCollections(JsonWriter*)
const;
183 public: PlugMap& _getPlugMap() {
return _plugMap;};
184 public: SharedPath* _getSharedPath(
const SharedPath* tailSharedPath)
const {
return _sharedPathMap.getElement(tailSharedPath);}
185 public: SharedPathes _getSharedPathes()
const {
return _sharedPathMap.getElements();};
186 public: SharedPathMap& _getSharedPathMap() {
return _sharedPathMap;};
187 public: Instance* _getNextOfCellInstanceMap()
const {
return _nextOfCellInstanceMap;};
188 public: Instance* _getNextOfCellSlaveInstanceSet()
const {
return _nextOfCellSlaveInstanceSet;};
190 public:
void _setNextOfCellInstanceMap(Instance* instance) {_nextOfCellInstanceMap = instance;};
191 public:
void _setNextOfCellSlaveInstanceSet(Instance* instance) {_nextOfCellSlaveInstanceSet = instance;};
196 class JsonInstance :
public JsonEntity {
199 public:
static void initialize();
200 public: JsonInstance(
unsigned long flags);
201 public:
virtual string getTypeName()
const;
202 public:
virtual JsonInstance* clone(
unsigned long)
const;
203 public:
virtual void toData(JsonStack&);
213 inline std::string getString<const Hurricane::Instance::PlacementStatus::Code*>
225 inline std::string getString<Hurricane::Instance::PlacementStatus::Code>
237 inline Hurricane::Record* getRecord<const Hurricane::Instance::PlacementStatus::Code*>
240 Hurricane::Record* record =
new Hurricane::Record(getString(
object));
241 record->add(getSlot(
"Code", (
unsigned int*)
object));
257 INSPECTOR_P_SUPPORT(Hurricane::Instance::PlugMap);
258 INSPECTOR_P_SUPPORT(Hurricane::Instance::SharedPathMap);
263 w->write( getString(status.
getCode()) );
Box description (API)
Definition: Box.h:31
The model (API).
Definition: Cell.h:64
std::int64_t Unit
Definition: DbU.h:67
Generic Collection auto-pointer.
Definition: Collection.h:235
Generic Filter auto-pointer.
Definition: Filter.h:86
Go description (API)
Definition: Go.h:34
Instance Placement Status (API)
Definition: Instance.h:43
PlacementStatus(const PlacementStatus &placementstatus)
PlacementStatus(const Code &code=UNPLACED)
const Code & getCode() const
Definition: Instance.h:58
Code
Definition: Instance.h:46
@ UNPLACED
Definition: Instance.h:46
@ FIXED
Definition: Instance.h:46
@ PLACED
Definition: Instance.h:46
Instance description (API)
Definition: Instance.h:35
Plugs getConnectedPlugs() const
Plug * getPlug(const Net *masterNet) const
Definition: Instance.h:124
Go Inherit
Definition: Instance.h:41
Box getAbutmentBox() const
Path getPath(const Path &tailPath=Path()) const
const Transformation & getTransformation() const
Definition: Instance.h:122
Plugs getPlugs() const
Definition: Instance.h:125
void setTransformation(const Transformation &transformation)
Plugs getUnconnectedPlugs() const
void setMasterCell(Cell *masterCell, bool secureFlag=true)
const Name & getName() const
Definition: Instance.h:120
Instance * getClone(Cell *cloneCell) const
Cell * getMasterCell() const
Definition: Instance.h:121
static Instance * create(Cell *cell, const Name &name, Cell *masterCell, const Transformation &transformation, const PlacementStatus &placementstatus, bool secureFlag=true)
static Instance * create(Cell *cell, const Name &name, Cell *masterCell, bool secureFlag=true)
static InstanceFilter getIsUnderFilter(const Box &area)
void setName(const Name &name)
Name description (API)
Definition: Name.h:35
Net description (API)
Definition: Net.h:48
Path description (API)
Definition: Path.h:35
Plug description (API)
Definition: Plug.h:37
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5