diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-09-25 01:34:26 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-09-25 01:34:26 -0700 |
commit | aed3b3a13acf9113cc4ec254933efce6114519be (patch) | |
tree | 44f656ff54b814a1b768599a9d6ae770cddbd422 /src/map/amap/amapLib.c | |
parent | d0197d83782fd016358360c305d5d4dcd7ef95d8 (diff) | |
download | abc-aed3b3a13acf9113cc4ec254933efce6114519be.tar.gz abc-aed3b3a13acf9113cc4ec254933efce6114519be.tar.bz2 abc-aed3b3a13acf9113cc4ec254933efce6114519be.zip |
Cleaned up interfaces of genlib/liberty/supergate reading/writing.
Diffstat (limited to 'src/map/amap/amapLib.c')
-rw-r--r-- | src/map/amap/amapLib.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c index 002386ad..de02c872 100644 --- a/src/map/amap/amapLib.c +++ b/src/map/amap/amapLib.c @@ -85,6 +85,7 @@ void Amap_LibFree( Amap_Lib_t * p ) ABC_FREE( p->pRules ); ABC_FREE( p->pRulesX ); ABC_FREE( p->pNodes ); + ABC_FREE( p->pName ); ABC_FREE( p ); } @@ -325,11 +326,18 @@ void Amap_LibPrintSelectedGates( Amap_Lib_t * p, int fAllGates ) SeeAlso [] ***********************************************************************/ -Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, int fVerbose, int fVeryVerbose ) +Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, char * pBuffer, int fVerbose, int fVeryVerbose ) { Amap_Lib_t * p; clock_t clk = clock(); - p = Amap_LibReadFile( pFileName, fVerbose ); + if ( pBuffer == NULL ) + p = Amap_LibReadFile( pFileName, fVerbose ); + else + { + p = Amap_LibReadBuffer( pBuffer, fVerbose ); + if ( p ) + p->pName = Abc_UtilStrsav( pFileName ); + } if ( fVerbose ) printf( "Read %d gates from file \"%s\".\n", Vec_PtrSize(p->vGates), pFileName ); if ( p == NULL ) |