Commit 0a79a38a by Alan Mishchenko

Adding duplicator of the design manager.

parent 2f46b56a
......@@ -673,6 +673,7 @@ extern ABC_DLL Vec_Ptr_t * Abc_NtkConverLatchNamesIntoNumbers( Abc_Ntk_t
extern ABC_DLL Abc_Des_t * Abc_DesCreate( char * pName );
extern ABC_DLL void Abc_DesCleanManPointer( Abc_Des_t * p, void * pMan );
extern ABC_DLL void Abc_DesFree( Abc_Des_t * p, Abc_Ntk_t * pNtk );
extern ABC_DLL Abc_Des_t * Abc_DesDup( Abc_Des_t * p );
extern ABC_DLL void Abc_DesPrint( Abc_Des_t * p );
extern ABC_DLL int Abc_DesAddModel( Abc_Des_t * p, Abc_Ntk_t * pNtk );
extern ABC_DLL Abc_Ntk_t * Abc_DesFindModelByName( Abc_Des_t * p, char * pName );
......
......@@ -121,6 +121,30 @@ void Abc_DesFree( Abc_Des_t * p, Abc_Ntk_t * pNtkSave )
/**Function*************************************************************
Synopsis [Duplicated the library.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Des_t * Abc_DesDup( Abc_Des_t * p )
{
Abc_Des_t * pNew;
Abc_Ntk_t * pTemp;
int i;
pNew = Abc_DesCreate( p->pName );
Vec_PtrForEachEntry( Abc_Ntk_t *, p->vModules, pTemp, i )
Abc_DesAddModel( pNew, Abc_NtkDup(pTemp) );
Vec_PtrForEachEntry( Abc_Ntk_t *, p->vTops, pTemp, i )
Vec_PtrPush( pNew->vTops, pTemp->pCopy );
return pNew;
}
/**Function*************************************************************
Synopsis [Frees the library.]
Description []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment