2008-02-05 15:26:22 -06:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
|
|
|
|
namespace Hurricane {
|
|
|
|
|
|
|
|
/*! \class Instance
|
|
|
|
* \brief Instance description (\b API)
|
|
|
|
*
|
|
|
|
* \section secInstanceIntro Introduction
|
|
|
|
*
|
|
|
|
* Instances provide the capability to build hierarchical
|
|
|
|
* assemblies. An instance belongs to a cell (the "<b>owner
|
|
|
|
* cell</b>") and references (calls) a model cell which we will
|
|
|
|
* call the "<b>mater cell</b>". Seen from the other hand, a
|
|
|
|
* cell may be the master cell of many instances belonging to
|
|
|
|
* other cells, this set of instances is named the "<b>slave
|
|
|
|
* instances</b>" of this cell (it is empty for the top most
|
|
|
|
* cell of a hierachical assembly, as well as for all cells from
|
|
|
|
* the library which are not instanciated in the current
|
|
|
|
* design).
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \section secInstancePredefinedFilters Predefined filters
|
|
|
|
*
|
2008-07-25 08:29:26 -05:00
|
|
|
* <b>Hurricane::Instance::getIsUnderFilter</b>
|
2008-02-05 15:26:22 -06:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \typedef Instance::Inherit
|
|
|
|
* Useful for calling upon methods of the base class without
|
|
|
|
* knowing it.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Instance* Instance::create(Cell* cell, const Name& name, Cell* masterCell, bool secureFlag = true);
|
2008-02-05 15:26:22 -06:00
|
|
|
* No description.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Instance* Instance::create(Cell* cell, const Name& name, Cell* masterCell,const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag = true);
|
2008-02-05 15:26:22 -06:00
|
|
|
* Create and return a pointer to a new instance of name
|
|
|
|
* \c \<name\> belonging to the cell \c \<cell\> and refering
|
|
|
|
* the cell \c \<masterCell\> through a transformation
|
|
|
|
* \c \<transformation\> if it is provided (else the identity
|
|
|
|
* transform is assumed).
|
|
|
|
*
|
|
|
|
* \caution Throws an exception if the cell \c \<cell\> is null, if the
|
|
|
|
* \c \<masterCell\> is null, if an instance of same name
|
|
|
|
* already exists or if a cyclic assembly is detected.
|
|
|
|
*
|
|
|
|
* \remark If the \c \<secureFlag\> is set to \false the verification of
|
|
|
|
* the lack of cyclic assembly is skipped (you save some cpu
|
|
|
|
* time, but at your own risks).
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function const Name& Instance::getName() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the instance name.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Cell* Instance::getMasterCell() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the cell model referenced by the instance.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function const Transformation& Instance::getTransformation() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the transformation associated to the instance.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Plug* Instance::getPlug(const Net* masterNet) const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the plug associated to the \c \<masterNet\> if it exists or
|
|
|
|
* else NULL (if the net is not external).
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Plugs Instance::getPlugs() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the collection of instance plugs.
|
|
|
|
*
|
|
|
|
* \important Each external net of the master cell of the instance has by
|
|
|
|
* construction an associated plug. This one may be connected or
|
|
|
|
* not to a net in the owner cell of the instance.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Plugs Instance::getConnectedPlugs() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the collection of instance plugs which are effectively
|
|
|
|
* connected.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Plugs Instance::getUnconnectedPlugs() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the collection of instance plugs which are not connected.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Path Instance::getPath(const Path& tailPath=Path()) const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the path composed of the instance solely.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Path Instance::getPath(const Path& tailPath) const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the path resulting of the concatenation of the instance and
|
|
|
|
* the tail path (possibly empty).
|
|
|
|
*
|
|
|
|
* \caution An exception will be thrown if the tail path is not
|
|
|
|
* consistent with the instance (that is if the owner cell of
|
|
|
|
* the tail path is not the master cell of the instance).
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function Box Instance::getAbutmentBox() const;
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the abutment box of the instance, that is the abutment box of
|
|
|
|
* the master cell to which has been applied the instance
|
|
|
|
* transformation.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function InstanceFilter Instance::getIsUnderFilter(const Box& area);
|
2008-02-05 15:26:22 -06:00
|
|
|
* \Return the filter selecting instances which intersect the given
|
|
|
|
* area.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function void Instance::setName(const Name& name);
|
2008-02-05 15:26:22 -06:00
|
|
|
* Allows to change the instance name.
|
|
|
|
*
|
|
|
|
* \remark Throws an exception if the name is empty or if an instance
|
|
|
|
* with the same name exists in the owner cell.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function void Instance::setTransformation(const Transformation& transformation);
|
2008-02-05 15:26:22 -06:00
|
|
|
* Allows to modify the instance transformation.
|
|
|
|
*/
|
|
|
|
|
2008-07-25 08:29:26 -05:00
|
|
|
/*! \function void Instance::setMasterCell(Cell* masterCell, bool secureFlag = true);
|
2008-02-05 15:26:22 -06:00
|
|
|
* Allows to change the cell referenced by this instance.
|
|
|
|
*
|
|
|
|
* \caution Throws an exception if either the cell is null, a cyclic
|
|
|
|
* assembly is detected or the substitution can't succeed.
|
|
|
|
*
|
|
|
|
* \remark If the \c \<secureFlag\> is set to \false the verification of
|
|
|
|
* the lack of cyclic assembly is skipped (you save some cpu
|
|
|
|
* time, but at your own risks).
|
|
|
|
*
|
|
|
|
* \important In order to succeed with the substitution, it is necessary
|
|
|
|
* that for each connected plug, refering an external net of the
|
|
|
|
* old master cell, a net of same name can be found in the new
|
|
|
|
* master cell.
|
|
|
|
*
|
|
|
|
* The properties of the instance, of its existing plugs and of
|
|
|
|
* the different occurences of those ones are preserved. On the
|
|
|
|
* other hand, all the hierarchical pathes going through that
|
|
|
|
* instance and not ending on it, as well as all associated
|
|
|
|
* occurences, become obsolete. The properties attached to those
|
|
|
|
* occurences are therefore deleted.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
//! \name Instance Collection
|
2008-02-05 15:26:22 -06:00
|
|
|
// \{
|
|
|
|
|
|
|
|
/*! \typedef Instances
|
|
|
|
* Generic collection representing a set of instances.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \typedef InstanceLocator
|
|
|
|
* Generic locator for traversing a collection of instances.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \typedef InstanceFilter
|
|
|
|
* Generic filter allowing to select a subset of instances
|
|
|
|
* matching some criteria.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \def for_each_instance(instance, instances)
|
|
|
|
* Macro for visiting all the instances of a collection of
|
|
|
|
* instances.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// \}
|
|
|
|
|
|
|
|
}
|