diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-09-24 23:38:01 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-09-24 23:38:01 -0700 |
commit | c696ae95d0130204bedfb9cb7209748fa6ab0f2e (patch) | |
tree | 7822cba08644f83bc76e6dd9fe42f7bb7758fb0a /src/map/mio | |
parent | 287f9efcceb540fb09f5d81250699a9277967ec5 (diff) | |
download | abc-c696ae95d0130204bedfb9cb7209748fa6ab0f2e.tar.gz abc-c696ae95d0130204bedfb9cb7209748fa6ab0f2e.tar.bz2 abc-c696ae95d0130204bedfb9cb7209748fa6ab0f2e.zip |
Maintenance and updates.
Diffstat (limited to 'src/map/mio')
-rw-r--r-- | src/map/mio/mio.h | 4 | ||||
-rw-r--r-- | src/map/mio/mioInt.h | 6 | ||||
-rw-r--r-- | src/map/mio/mioUtils.c | 44 |
3 files changed, 54 insertions, 0 deletions
diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index 0704a8d5..5f04029a 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -222,6 +222,10 @@ extern void Mio_LibraryMatchesStop( Mio_Library_t * pLib ); extern void Mio_LibraryMatchesStart( Mio_Library_t * pLib, int fPinFilter, int fPinPerm, int fPinQuick ); extern void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_t ** pvTtMem, Vec_Wec_t ** pvTt2Match, Mio_Cell2_t ** ppCells, int * pnCells, int fPinFilter, int fPinPerm, int fPinQuick ); +extern void Mio_LibraryMatches2Stop( Mio_Library_t * pLib ); +extern void Mio_LibraryMatches2Start( Mio_Library_t * pLib ); +extern void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs ); + /*=== sclUtil.c =========================================================*/ extern Mio_Library_t * Abc_SclDeriveGenlibSimple( void * pScl ); extern Mio_Library_t * Abc_SclDeriveGenlib( void * pScl, void * pMio, float Slew, float Gain, int nGatesMin, int fVerbose ); diff --git a/src/map/mio/mioInt.h b/src/map/mio/mioInt.h index 23f48b2f..6c754c18 100644 --- a/src/map/mio/mioInt.h +++ b/src/map/mio/mioInt.h @@ -84,6 +84,12 @@ struct Mio_LibraryStruct_t_ Vec_Wec_t * vTt2Match; // matches for truth tables Mio_Cell2_t * pCells; // library gates int nCells; // library gate count + Vec_Ptr_t * vNames; + Vec_Wrd_t * vTruths; + Vec_Mem_t * vTtMem_; + Vec_Int_t * vTt2Match_; + Vec_Int_t * vTt2Match4; + Vec_Int_t * vConfigs; }; struct Mio_GateStruct_t_ diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c index 22ce244a..70306b5e 100644 --- a/src/map/mio/mioUtils.c +++ b/src/map/mio/mioUtils.c @@ -54,6 +54,7 @@ void Mio_LibraryDelete( Mio_Library_t * pLib ) if ( pLib == NULL ) return; Mio_LibraryMatchesStop( pLib ); + Mio_LibraryMatches2Stop( pLib ); // free the bindings of nodes to gates from this library for all networks Abc_FrameUnmapAllNetworks( Abc_FrameGetGlobalFrame() ); // free the library @@ -1691,6 +1692,49 @@ void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_t ** pvTtMem, Vec_We *pnCells = pLib->nCells; // library gate count } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Mio_LibraryMatches2Stop( Mio_Library_t * pLib ) +{ + if ( !pLib->vNames ) + return; + Vec_PtrFree( pLib->vNames ); + Vec_WrdFree( pLib->vTruths ); + Vec_MemHashFree( pLib->vTtMem_ ); + Vec_MemFree( pLib->vTtMem_ ); + Vec_IntFree( pLib->vTt2Match_ ); + Vec_IntFree( pLib->vTt2Match4 ); + Vec_IntFree( pLib->vConfigs ); +} +void Mio_LibraryMatches2Start( Mio_Library_t * pLib ) +{ + extern int Gia_ManDeriveMatches( Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs ); + if ( pLib->vNames ) + return; + if ( pLib->vTtMem ) + Mio_LibraryMatches2Stop( pLib ); + Gia_ManDeriveMatches( &pLib->vNames, &pLib->vTruths, &pLib->vTtMem_, &pLib->vTt2Match_, &pLib->vTt2Match4, &pLib->vConfigs ); +} +void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs ) +{ + Mio_LibraryMatches2Start( pLib ); + *pvNames = pLib->vNames; + *pvTruths = pLib->vTruths; + *pvTtMem = pLib->vTtMem_; + *pvTt2Match = pLib->vTt2Match_; + *pvTt2Match4 = pLib->vTt2Match4; + *pvConfigs = pLib->vConfigs; +} + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// |