summaryrefslogtreecommitdiffstats
path: root/src/base/abc/abcLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abc/abcLib.c')
-rw-r--r--src/base/abc/abcLib.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/base/abc/abcLib.c b/src/base/abc/abcLib.c
index b31fed6b..247f3915 100644
--- a/src/base/abc/abcLib.c
+++ b/src/base/abc/abcLib.c
@@ -81,6 +81,7 @@ void Abc_LibFree( Abc_Lib_t * pLib, Abc_Ntk_t * pNtkSave )
// pNtk->pManFunc = NULL;
if ( pNtk == pNtkSave )
continue;
+ pNtk->pManFunc = NULL;
Abc_NtkDelete( pNtk );
}
Vec_PtrFree( pLib->vModules );
@@ -92,6 +93,32 @@ void Abc_LibFree( Abc_Lib_t * pLib, Abc_Ntk_t * pNtkSave )
/**Function*************************************************************
+ Synopsis [Frees the library.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Abc_Lib_t * Abc_LibDupBlackboxes( Abc_Lib_t * pLib, Abc_Ntk_t * pNtkSave )
+{
+ Abc_Lib_t * pLibNew;
+ Abc_Ntk_t * pNtkTemp;
+ int i;
+ pLibNew = Abc_LibCreate( pLib->pName );
+// pLibNew->pManFunc = pNtkSave->pManFunc;
+ Vec_PtrPush( pLibNew->vModules, pNtkSave );
+ Vec_PtrForEachEntry( pLib->vModules, pNtkTemp, i )
+ if ( Abc_NtkHasBlackbox( pNtkTemp ) )
+ Vec_PtrPush( pLibNew->vModules, Abc_NtkDup(pNtkTemp) );
+ return pLibNew;
+}
+
+
+/**Function*************************************************************
+
Synopsis [Prints the library.]
Description []