Correct the SPICE driver in case a Net is missing Spice::BitExtension.
* Change: In Spice::Entity::toEntity(), add an error message if the Spice::Bit extension is missing.
This commit is contained in:
parent
51ca8ab4af
commit
0d7e0fa88b
|
@ -1658,6 +1658,7 @@ namespace {
|
||||||
<< "\" in " << layer
|
<< "\" in " << layer
|
||||||
<< " @" << ref._position
|
<< " @" << ref._position
|
||||||
<< endl;
|
<< endl;
|
||||||
|
cdebug_log(101,0) << "| In " << net->getCell() << endl;
|
||||||
if (not layer) continue;
|
if (not layer) continue;
|
||||||
|
|
||||||
vector<Component*> toDestroy;
|
vector<Component*> toDestroy;
|
||||||
|
@ -1675,6 +1676,7 @@ namespace {
|
||||||
);
|
);
|
||||||
NetExternalComponents::setExternal( h );
|
NetExternalComponents::setExternal( h );
|
||||||
toDestroy.push_back( component );
|
toDestroy.push_back( component );
|
||||||
|
cdebug_log(101,0) << "> external duplicate " << h << endl;
|
||||||
} else {
|
} else {
|
||||||
Vertical* vref = dynamic_cast<Vertical*>( component );
|
Vertical* vref = dynamic_cast<Vertical*>( component );
|
||||||
if (vref) {
|
if (vref) {
|
||||||
|
@ -1687,6 +1689,7 @@ namespace {
|
||||||
);
|
);
|
||||||
NetExternalComponents::setExternal( v );
|
NetExternalComponents::setExternal( v );
|
||||||
toDestroy.push_back( component );
|
toDestroy.push_back( component );
|
||||||
|
cdebug_log(101,0) << "> external duplicate " << v << endl;
|
||||||
} else {
|
} else {
|
||||||
Pad* pref = dynamic_cast<Pad*>( component );
|
Pad* pref = dynamic_cast<Pad*>( component );
|
||||||
if (pref) {
|
if (pref) {
|
||||||
|
@ -1696,6 +1699,7 @@ namespace {
|
||||||
);
|
);
|
||||||
NetExternalComponents::setExternal( p );
|
NetExternalComponents::setExternal( p );
|
||||||
toDestroy.push_back( component );
|
toDestroy.push_back( component );
|
||||||
|
cdebug_log(101,0) << "> external duplicate " << p << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace {
|
||||||
namespace Spice {
|
namespace Spice {
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using Hurricane::Error;
|
||||||
using Hurricane::Warning;
|
using Hurricane::Warning;
|
||||||
using Hurricane::Property;
|
using Hurricane::Property;
|
||||||
using Hurricane::_TName;
|
using Hurricane::_TName;
|
||||||
|
@ -167,15 +168,37 @@ namespace Spice {
|
||||||
for ( Plug* plug : sortedPlugs ) {
|
for ( Plug* plug : sortedPlugs ) {
|
||||||
Net* plugNet = plug->getNet();
|
Net* plugNet = plug->getNet();
|
||||||
if (plugNet) {
|
if (plugNet) {
|
||||||
out << " " << BitExtension::getName(plugNet);
|
Bit* bit = BitExtension::get( plugNet );
|
||||||
|
if (bit)
|
||||||
|
out << " " << bit->getName();
|
||||||
|
else {
|
||||||
|
cerr << Error( "SpiceEntity::toEntity(): In %s, Net \"%s\" is missing a Spice::Bit extension.\n"
|
||||||
|
, getString(getCell()).c_str()
|
||||||
|
, getString(plugNet).c_str()
|
||||||
|
) << endl;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (plug->getMasterNet()->isPower()) {
|
Net* masterNet = plug->getMasterNet();
|
||||||
out << " " << _powerNode;
|
if (masterNet->isGlobal()) {
|
||||||
} else {
|
plugNet = getCell()->getNet( masterNet->getName() );
|
||||||
if (plug->getMasterNet()->isGround()) {
|
if (plugNet) {
|
||||||
out << " " << _groundNode;
|
Bit* bit = BitExtension::get( plugNet );
|
||||||
} else
|
if (bit)
|
||||||
|
out << " " << bit->getName();
|
||||||
|
else {
|
||||||
|
cerr << Error( "SpiceEntity::toEntity(): In %s, Net \"%s\" is missing a Spice::Bit extension.\n"
|
||||||
|
, getString(getCell()).c_str()
|
||||||
|
, getString(plugNet).c_str()
|
||||||
|
) << endl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cerr << Error( "SpiceEntity::toEntity(): In %s, unconnected Plug,\n"
|
||||||
|
" %s"
|
||||||
|
, getString(getCell()).c_str()
|
||||||
|
, getString(plug).c_str()
|
||||||
|
) << endl;
|
||||||
out << " ?";
|
out << " ?";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue