Bug, uniquification of unique cells.
* In Hurricane: In Instance::slaveAbutmentBox() and Instance::uniquify() use isUnique() instead of isUniquified(). This way we do not clone masterCells that are unique in the design. This was the reason sometimes "holes" were appearing in the visualiser, as the AB were not merged. The uniqification policy may need some refinement.
This commit is contained in:
parent
a78882fd5b
commit
bbab2d14eb
|
@ -426,6 +426,10 @@ bool Cell::isNetAlias ( const Name& name ) const
|
|||
bool Cell::isUnique() const
|
||||
// ************************
|
||||
{
|
||||
// ltrace(10) << "Cell::isUnique() " << this << endl;
|
||||
// for ( Instance* instance : getSlaveInstances() ) {
|
||||
// ltrace(10) << "| Slave instance:" << instance << endl;
|
||||
// }
|
||||
return getSlaveInstances().getSize() < 2;
|
||||
}
|
||||
|
||||
|
@ -784,7 +788,8 @@ Cell* Cell::getClone()
|
|||
void Cell::uniquify(unsigned int depth)
|
||||
// ************************************
|
||||
{
|
||||
//cerr << "Cell::uniquify() " << this << endl;
|
||||
ltrace(10) << "Cell::uniquify() " << this << endl;
|
||||
ltracein(10);
|
||||
|
||||
vector<DeepNet*> deepNets;
|
||||
for ( DeepNet* deepNet : getNets().getSubSet<DeepNet*>() ) {
|
||||
|
@ -800,6 +805,7 @@ void Cell::uniquify(unsigned int depth)
|
|||
|
||||
for ( Instance* instance : getInstances() ) {
|
||||
Cell* masterCell = instance->getMasterCell();
|
||||
ltrace(10) << "| " << instance << endl;
|
||||
if (masterCell->isTerminal()) continue;
|
||||
|
||||
if (masterCells.find(masterCell) == masterCells.end()) {
|
||||
|
@ -821,6 +827,9 @@ void Cell::uniquify(unsigned int depth)
|
|||
for ( auto cell : masterCells )
|
||||
cell->uniquify( depth-1 );
|
||||
}
|
||||
|
||||
ltraceout(10);
|
||||
ltrace(10) << "Cell::uniquify() END " << this << endl;
|
||||
}
|
||||
|
||||
void Cell::materialize()
|
||||
|
|
|
@ -428,6 +428,10 @@ void Instance::setPlacementStatus(const PlacementStatus& placementStatus)
|
|||
void Instance::setMasterCell(Cell* masterCell, bool secureFlag)
|
||||
// ************************************************************
|
||||
{
|
||||
ltrace(10) << "Instance::setMasterCell() on " << this << endl;
|
||||
ltracein(10);
|
||||
ltrace(10) << "NEW masterCell:" << masterCell << endl;
|
||||
|
||||
if (masterCell != _masterCell) {
|
||||
UpdateSession::open();
|
||||
|
||||
|
@ -472,9 +476,15 @@ void Instance::setMasterCell(Cell* masterCell, bool secureFlag)
|
|||
masterNetList.pop_front();
|
||||
}
|
||||
|
||||
ltrace(10) << "Remove " << this << " from " << _masterCell << endl;
|
||||
_masterCell->_getSlaveInstanceSet()._remove(this);
|
||||
_masterCell = masterCell;
|
||||
|
||||
ltrace(10) << "Add (before) " << this << " to " << _masterCell << endl;
|
||||
_masterCell->isUnique();
|
||||
_masterCell->_getSlaveInstanceSet()._insert(this);
|
||||
ltrace(10) << "Add (after) " << this << " to " << _masterCell << endl;
|
||||
_masterCell->isUnique();
|
||||
|
||||
for_each_net(externalNet, _masterCell->getExternalNets()) {
|
||||
if (!getPlug(externalNet)) Plug::_create(this, externalNet);
|
||||
|
@ -483,13 +493,15 @@ void Instance::setMasterCell(Cell* masterCell, bool secureFlag)
|
|||
|
||||
UpdateSession::close();
|
||||
}
|
||||
|
||||
ltraceout(10);
|
||||
}
|
||||
|
||||
void Instance::uniquify()
|
||||
// **********************
|
||||
{
|
||||
if (_masterCell->isUniquified()) {
|
||||
cerr << Warning( "Instance::uniquify(): Master Cell %s of %s is already uniquified, cancelled."
|
||||
if (_masterCell->isUnique()) {
|
||||
cerr << Warning( "Instance::uniquify(): Master Cell %s of %s is unique or already uniquified, cancelled."
|
||||
, getString(_masterCell->getName()).c_str()
|
||||
, getString(getName()).c_str()
|
||||
) << endl;
|
||||
|
@ -511,7 +523,7 @@ void Instance::uniquify()
|
|||
void Instance::slaveAbutmentBox()
|
||||
// ******************************
|
||||
{
|
||||
if (not _masterCell->isUniquified()) uniquify();
|
||||
if (not _masterCell->isUnique()) uniquify();
|
||||
_masterCell->slaveAbutmentBox( getCell() );
|
||||
//_masterCell->_setShuntedPath( Path(getCell()->getShuntedPath(),this) );
|
||||
setTransformation( Transformation() );
|
||||
|
|
|
@ -53,20 +53,25 @@ extern "C" {
|
|||
trace << "PyDebugSession_open()" << endl;
|
||||
|
||||
HTRY
|
||||
PyObject* pySymbol = NULL;
|
||||
unsigned int traceLevel = 10000;
|
||||
if (PyArg_ParseTuple( args
|
||||
, "OI:DebugSession.open"
|
||||
, &pySymbol
|
||||
, &traceLevel
|
||||
)) {
|
||||
void* symbol = PyObject_AsHurricaneSymbol( pySymbol );
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
__cs.init ("DebugSession.open");
|
||||
|
||||
if (not PyArg_ParseTuple(args,"|O&O&:DebugSession.open",
|
||||
Converter, &arg0,
|
||||
Converter, &arg1)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (__cs.getObjectIds() == INT_ARG ) { DebugSession::open( PyAny_AsLong(arg0) ); }
|
||||
else if (__cs.getObjectIds() == ":ent:int") {
|
||||
void* symbol = PyObject_AsHurricaneSymbol( arg0 );
|
||||
if (not symbol) {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
DebugSession::open( symbol, traceLevel );
|
||||
DebugSession::open( symbol, PyAny_AsLong(arg1) );
|
||||
} else {
|
||||
PyErr_SetString( ConstructorError, "Bad parameters given to DebugSession.open()." );
|
||||
PyErr_SetString(ConstructorError, "invalid number of parameters for DebugSession::open()." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
|
Loading…
Reference in New Issue