diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-05-10 02:42:16 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-05-10 02:42:16 +0700 |
commit | 0a79a38a4dc385d7cd76a94f349b0f1af44ae82e (patch) | |
tree | 0d5dfa856845055f165e813089cf687be9350a17 | |
parent | 2f46b56ae60bc74175f1df525c1be46a12072357 (diff) | |
download | abc-0a79a38a4dc385d7cd76a94f349b0f1af44ae82e.tar.gz abc-0a79a38a4dc385d7cd76a94f349b0f1af44ae82e.tar.bz2 abc-0a79a38a4dc385d7cd76a94f349b0f1af44ae82e.zip |
Adding duplicator of the design manager.
-rw-r--r-- | src/base/abc/abc.h | 1 | ||||
-rw-r--r-- | src/base/abc/abcLib.c | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h index 12a2024a..215d66be 100644 --- a/src/base/abc/abc.h +++ b/src/base/abc/abc.h @@ -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 ); diff --git a/src/base/abc/abcLib.c b/src/base/abc/abcLib.c index 9a8c36f2..788b0fe0 100644 --- a/src/base/abc/abcLib.c +++ b/src/base/abc/abcLib.c @@ -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 [] |