diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-15 18:23:49 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-15 18:23:49 -0700 |
commit | ff5d3591d1e7d90199d7395cde9fc6d902ed4b41 (patch) | |
tree | 26a2307c387d50bcd1a01e007bfe370ca8a5a9e3 /src/map/mio | |
parent | d1fed2dd89bc0549655f8375832628b18b35edd9 (diff) | |
download | abc-ff5d3591d1e7d90199d7395cde9fc6d902ed4b41.tar.gz abc-ff5d3591d1e7d90199d7395cde9fc6d902ed4b41.tar.bz2 abc-ff5d3591d1e7d90199d7395cde9fc6d902ed4b41.zip |
Infrastructure to support full Liberty format and unitification of library representations.
Diffstat (limited to 'src/map/mio')
-rw-r--r-- | src/map/mio/mio.c | 4 | ||||
-rw-r--r-- | src/map/mio/mio.h | 2 | ||||
-rw-r--r-- | src/map/mio/mioParse.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/map/mio/mio.c b/src/map/mio/mio.c index 9f79ca1b..d05a9129 100644 --- a/src/map/mio/mio.c +++ b/src/map/mio/mio.c @@ -220,7 +220,7 @@ int Mio_CommandReadLiberty( Abc_Frame_t * pAbc, int argc, char **argv ) if ( (pFile = Io_FileOpen( pFileName, "open_path", "r", 0 )) == NULL ) { fprintf( pErr, "Cannot open input file \"%s\". ", pFileName ); - if ( (pFileName = Extra_FileGetSimilarName( pFileName, ".genlib", ".lib", ".gen", ".g", NULL )) ) + if ( (pFileName = Extra_FileGetSimilarName( pFileName, ".genlib", ".lib", ".scl", ".g", NULL )) ) fprintf( pErr, "Did you mean \"%s\"?", pFileName ); fprintf( pErr, "\n" ); return 1; @@ -338,7 +338,7 @@ int Mio_CommandReadGenlib( Abc_Frame_t * pAbc, int argc, char **argv ) if ( (pFile = Io_FileOpen( pFileName, "open_path", "r", 0 )) == NULL ) { fprintf( pErr, "Cannot open input file \"%s\". ", pFileName ); - if ( (pFileName = Extra_FileGetSimilarName( pFileName, ".genlib", ".lib", ".gen", ".g", NULL )) ) + if ( (pFileName = Extra_FileGetSimilarName( pFileName, ".genlib", ".lib", ".scl", ".g", NULL )) ) fprintf( pErr, "Did you mean \"%s\"?", pFileName ); fprintf( pErr, "\n" ); return 1; diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index 1175406c..2b4876ad 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -82,7 +82,7 @@ static inline char * Mio_UtilStrsav( char * s ) { return s ? strcpy(ABC_A /*=== mio.c =============================================================*/ extern void Mio_UpdateGenlib( Mio_Library_t * pLib ); extern int Mio_UpdateGenlib2( Vec_Str_t * vStr, Vec_Str_t * vStr2, char * pFileName, int fVerbose ); -extern void Mio_SclDeriveGenlib( void * pScl, float Slew, float Gain, int nGatesMin ); +extern void Abc_SclDeriveGenlib( void * pScl, float Slew, float Gain, int nGatesMin ); /*=== mioApi.c =============================================================*/ extern char * Mio_LibraryReadName ( Mio_Library_t * pLib ); extern int Mio_LibraryReadGateNum ( Mio_Library_t * pLib ); diff --git a/src/map/mio/mioParse.c b/src/map/mio/mioParse.c index dd633443..11b2a708 100644 --- a/src/map/mio/mioParse.c +++ b/src/map/mio/mioParse.c @@ -399,6 +399,8 @@ Vec_Wrd_t * Mio_ParseFormulaTruth( char * pFormInit, char ** ppVarNames, int nVa Vec_Wrd_t * vTruth; // derive expression vExpr = Mio_ParseFormula( pFormInit, ppVarNames, nVars ); + if ( vExpr == NULL ) + return NULL; // convert it into a truth table vTruth = Vec_WrdStart( Abc_Truth6WordNum(nVars) ); Exp_Truth( nVars, vExpr, Vec_WrdArray(vTruth) ); |