Preserving internal signal names when 'strash' is not used.

This commit is contained in:
Alan Mishchenko 2016-02-03 13:56:27 -08:00
parent 8bcf8fd3c9
commit be35a13a4c
2 changed files with 7 additions and 0 deletions

View File

@ -66,7 +66,10 @@ Abc_Ntk_t * Abc_NtkToLogic( Abc_Ntk_t * pNtk )
pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, pNtk->ntkFunc );
// duplicate the nodes
Abc_NtkForEachNode( pNtk, pObj, i )
{
Abc_NtkDupObj(pNtkNew, pObj, 0);
Abc_ObjAssignName( pObj->pCopy, Abc_ObjName(Abc_ObjFanout0(pObj)), NULL );
}
// reconnect the internal nodes in the new network
Abc_NtkForEachNode( pNtk, pObj, i )
Abc_ObjForEachFanin( pObj, pFanin, k )
@ -195,6 +198,9 @@ Abc_Ntk_t * Abc_NtkLogicToNetlist( Abc_Ntk_t * pNtk )
if ( pDriver->pCopy->pCopy == NULL )
{
// create the CO net and connect it to CO
//if ( Abc_NtkFindNet(pNtkNew, Abc_ObjName(pDriver)) == NULL )
// pNet = Abc_NtkFindOrCreateNet( pNtkNew, Abc_ObjName(pDriver) );
//else
pNet = Abc_NtkFindOrCreateNet( pNtkNew, Abc_ObjName(pObj) );
Abc_ObjAddFanin( pObj->pCopy, pNet );
// connect the CO net to the new driver and remember it in the new driver

View File

@ -1212,6 +1212,7 @@ int Abc_NtkLogicMakeSimpleCos( Abc_Ntk_t * pNtk, int fDuplicate )
else // add buffer
{
pDriverNew = Abc_NtkCreateNodeBuf( pNtk, pDriver );
Abc_ObjAssignName( pDriverNew, Abc_ObjName(pDriver), "_buf" );
nDupBufs++;
}
// swing the PO