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/mioUtils.c | |
parent | 287f9efcceb540fb09f5d81250699a9277967ec5 (diff) | |
download | abc-c696ae95d0130204bedfb9cb7209748fa6ab0f2e.tar.gz abc-c696ae95d0130204bedfb9cb7209748fa6ab0f2e.tar.bz2 abc-c696ae95d0130204bedfb9cb7209748fa6ab0f2e.zip |
Maintenance and updates.
Diffstat (limited to 'src/map/mio/mioUtils.c')
-rw-r--r-- | src/map/mio/mioUtils.c | 44 |
1 files changed, 44 insertions, 0 deletions
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 /// //////////////////////////////////////////////////////////////////////// |