From ff5d3591d1e7d90199d7395cde9fc6d902ed4b41 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 15 Sep 2013 18:23:49 -0700 Subject: Infrastructure to support full Liberty format and unitification of library representations. --- src/map/mio/mio.c | 4 ++-- src/map/mio/mio.h | 2 +- src/map/mio/mioParse.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/map/mio') 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) ); -- cgit v1.2.3