summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amap.h2
-rw-r--r--src/map/amap/amapInt.h1
-rw-r--r--src/map/amap/amapLiberty.c4
-rw-r--r--src/map/mio/mio.c7
4 files changed, 9 insertions, 5 deletions
diff --git a/src/map/amap/amap.h b/src/map/amap/amap.h
index 0a0c7cc0..b4c8b574 100644
--- a/src/map/amap/amap.h
+++ b/src/map/amap/amap.h
@@ -78,7 +78,7 @@ extern void Amap_LibFree( Amap_Lib_t * p );
extern void Amap_LibPrintSelectedGates( Amap_Lib_t * p, int fAllGates );
extern Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, int fVerbose, int fVeryVerbose );
/*=== amapLiberty.c ==========================================================*/
-extern int Amap_LibertyParse( char * pFileName, char * pFileGenlib, int fVerbose );
+extern int Amap_LibertyParse( char * pFileName, int fVerbose );
ABC_NAMESPACE_HEADER_END
diff --git a/src/map/amap/amapInt.h b/src/map/amap/amapInt.h
index e2284ce6..7a9bef7a 100644
--- a/src/map/amap/amapInt.h
+++ b/src/map/amap/amapInt.h
@@ -26,6 +26,7 @@
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
+#include "misc/extra/extra.h"
#include "aig/aig/aig.h"
#include "amap.h"
diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c
index b8232024..20624882 100644
--- a/src/map/amap/amapLiberty.c
+++ b/src/map/amap/amapLiberty.c
@@ -914,7 +914,7 @@ void Amap_LibertyStop( Amap_Tree_t * p )
SeeAlso []
***********************************************************************/
-int Amap_LibertyParse( char * pFileName, char * pFileGenlib, int fVerbose )
+int Amap_LibertyParse( char * pFileName, int fVerbose )
{
Amap_Tree_t * p;
char * pPos;
@@ -930,7 +930,7 @@ int Amap_LibertyParse( char * pFileName, char * pFileGenlib, int fVerbose )
if ( fVerbose )
printf( "Parsing finished successfully.\n" );
// Amap_LibertyPrintLiberty( p, "temp_.lib" );
- Amap_LibertyPrintGenlib( p, "temp.genlib", fVerbose );
+ Amap_LibertyPrintGenlib( p, Extra_FileNameGenericAppend(pFileName, ".genlib"), fVerbose );
RetValue = 1;
}
else
diff --git a/src/map/mio/mio.c b/src/map/mio/mio.c
index 64a066f8..938dbf54 100644
--- a/src/map/mio/mio.c
+++ b/src/map/mio/mio.c
@@ -149,6 +149,7 @@ void Mio_End( Abc_Frame_t * pAbc )
***********************************************************************/
int Mio_CommandReadLiberty( Abc_Frame_t * pAbc, int argc, char **argv )
{
+ char Command[1000];
FILE * pFile;
FILE * pOut, * pErr;
Abc_Ntk_t * pNet;
@@ -196,9 +197,11 @@ int Mio_CommandReadLiberty( Abc_Frame_t * pAbc, int argc, char **argv )
}
fclose( pFile );
- if ( !Amap_LibertyParse( FileName, "temp.genlib", fVerbose ) )
+ if ( !Amap_LibertyParse( FileName, fVerbose ) )
return 0;
- Cmd_CommandExecute( pAbc, "read_library temp.genlib" );
+ assert( strlen(FileName) < 900 );
+ sprintf( Command, "read_library %s", Extra_FileNameGenericAppend(FileName, ".genlib") );
+ Cmd_CommandExecute( pAbc, Command );
return 0;
usage: