Cell::flattenNets() checks for already flattened top nets.
* Change: In Hurricane, in Cell::flattenNets(), do not flatten a *top net* if at least one RoutingPad is present. In that case, we assumes that the net has already been completly flattened. * New: In Hurricane, in Entity, add an accessor to unique id counter.
This commit is contained in:
parent
2a1c7e181e
commit
2e939e5355
|
@ -212,6 +212,19 @@ void Cell::flattenNets(unsigned int flags)
|
||||||
buildRing = flags & Cell::BuildRings;
|
buildRing = flags & Cell::BuildRings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasRoutingPads = false;
|
||||||
|
forEach ( Component*, icomponent, net->getComponents() ) {
|
||||||
|
RoutingPad* rp = dynamic_cast<RoutingPad*>( *icomponent );
|
||||||
|
if (rp) {
|
||||||
|
// At least one RoutingPad is present: assumes that the net is already
|
||||||
|
// flattened (completly).
|
||||||
|
//cerr << net << " has already RoutingPads, skipped " << rp << endl;
|
||||||
|
hasRoutingPads = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasRoutingPads) continue;
|
||||||
|
|
||||||
forEach ( Component*, icomponent, net->getComponents() ) {
|
forEach ( Component*, icomponent, net->getComponents() ) {
|
||||||
Plug* primaryPlug = dynamic_cast<Plug*>( *icomponent );
|
Plug* primaryPlug = dynamic_cast<Plug*>( *icomponent );
|
||||||
if (primaryPlug) {
|
if (primaryPlug) {
|
||||||
|
|
|
@ -37,6 +37,10 @@ namespace Hurricane {
|
||||||
unsigned int Entity::_idCounter = 0;
|
unsigned int Entity::_idCounter = 0;
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int Entity::getIdCounter ()
|
||||||
|
{ return _idCounter; }
|
||||||
|
|
||||||
|
|
||||||
Entity::Entity()
|
Entity::Entity()
|
||||||
: Inherit()
|
: Inherit()
|
||||||
, _id(_idCounter++)
|
, _id(_idCounter++)
|
||||||
|
|
|
@ -40,6 +40,8 @@ namespace Hurricane {
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef DBo Inherit;
|
typedef DBo Inherit;
|
||||||
|
public:
|
||||||
|
static unsigned int getIdCounter ();
|
||||||
public:
|
public:
|
||||||
inline unsigned int getId () const;
|
inline unsigned int getId () const;
|
||||||
virtual Cell* getCell () const = 0;
|
virtual Cell* getCell () const = 0;
|
||||||
|
|
Loading…
Reference in New Issue