Commit a0cc6215 by Alan Mishchenko

Trying to fix a mysterious bug in reading the library files.

parent 80d161af
...@@ -78,8 +78,8 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, int fRecovery, int ...@@ -78,8 +78,8 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, int fRecovery, int
// derive the supergate library // derive the supergate library
if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() ) if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() )
{ {
printf( "A simple supergate library is derived from gate library \"%s\".\n", // printf( "A simple supergate library is derived from gate library \"%s\".\n",
Mio_LibraryReadName((Mio_Library_t *)Abc_FrameReadLibGen()) ); // Mio_LibraryReadName((Mio_Library_t *)Abc_FrameReadLibGen()) );
Map_SuperLibDeriveFromGenlib( (Mio_Library_t *)Abc_FrameReadLibGen() ); Map_SuperLibDeriveFromGenlib( (Mio_Library_t *)Abc_FrameReadLibGen() );
} }
...@@ -432,8 +432,8 @@ Abc_Ntk_t * Abc_NtkSuperChoice( Abc_Ntk_t * pNtk ) ...@@ -432,8 +432,8 @@ Abc_Ntk_t * Abc_NtkSuperChoice( Abc_Ntk_t * pNtk )
// derive the supergate library // derive the supergate library
if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() ) if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() )
{ {
printf( "A simple supergate library is derived from gate library \"%s\".\n", // printf( "A simple supergate library is derived from gate library \"%s\".\n",
Mio_LibraryReadName((Mio_Library_t *)Abc_FrameReadLibGen()) ); // Mio_LibraryReadName((Mio_Library_t *)Abc_FrameReadLibGen()) );
Map_SuperLibDeriveFromGenlib( (Mio_Library_t *)Abc_FrameReadLibGen() ); Map_SuperLibDeriveFromGenlib( (Mio_Library_t *)Abc_FrameReadLibGen() );
} }
......
...@@ -67,8 +67,8 @@ Abc_Ntk_t * Seq_MapRetime( Abc_Ntk_t * pNtk, int nMaxIters, int fVerbose ) ...@@ -67,8 +67,8 @@ Abc_Ntk_t * Seq_MapRetime( Abc_Ntk_t * pNtk, int nMaxIters, int fVerbose )
// derive the supergate library // derive the supergate library
if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() ) if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() )
{ {
printf( "A simple supergate library is derived from gate library \"%s\".\n", // printf( "A simple supergate library is derived from gate library \"%s\".\n",
Mio_LibraryReadName(Abc_FrameReadLibGen()) ); // Mio_LibraryReadName(Abc_FrameReadLibGen()) );
Map_SuperLibDeriveFromGenlib( Abc_FrameReadLibGen() ); Map_SuperLibDeriveFromGenlib( Abc_FrameReadLibGen() );
} }
p->pSuperLib = Abc_FrameReadLibSuper(); p->pSuperLib = Abc_FrameReadLibSuper();
......
...@@ -202,7 +202,7 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) ...@@ -202,7 +202,7 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
pNameGeneric = Extra_FileNameGeneric( Mio_LibraryReadName(pLib) ); pNameGeneric = Extra_FileNameGeneric( Mio_LibraryReadName(pLib) );
sprintf( FileNameSuper, "%s.super", pNameGeneric ); sprintf( FileNameSuper, "%s.super", pNameGeneric );
ABC_FREE( pNameGeneric ); ABC_FREE( pNameGeneric );
sprintf( CommandSuper, "super -l 1 -i 5 -d 10000000 -a 10000000 -t 100 %s", FileNameGenlib ); sprintf( CommandSuper, "super -l 1 -i 5 -d 10000000 -a 10000000 -t 100 %s", FileNameGenlib );
if ( Cmd_CommandExecute( pAbc, CommandSuper ) ) if ( Cmd_CommandExecute( pAbc, CommandSuper ) )
{ {
...@@ -218,15 +218,17 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) ...@@ -218,15 +218,17 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
//#else //#else
// unlink( FileNameGenlib ); // unlink( FileNameGenlib );
//#endif //#endif
printf( "A simple supergate library is derived from gate library \"%s\".\n", Mio_LibraryReadName(pLib) );
fflush( stdout );
sprintf( CommandRead, "read_super %s", FileNameSuper ); sprintf( CommandRead, "read_super %s", FileNameSuper );
if ( Cmd_CommandExecute( pAbc, CommandRead ) ) if ( Cmd_CommandExecute( pAbc, CommandRead ) )
{ {
#ifdef WIN32 //#ifdef WIN32
_unlink( FileNameSuper ); // _unlink( FileNameSuper );
#else //#else
unlink( FileNameSuper ); // unlink( FileNameSuper );
#endif //#endif
fprintf( stdout, "Cannot execute command \"%s\".\n", CommandRead ); fprintf( stdout, "Cannot execute command \"%s\".\n", CommandRead );
ABC_FREE( FileNameGenlib ); ABC_FREE( FileNameGenlib );
ABC_FREE( FileNameSuper ); ABC_FREE( FileNameSuper );
...@@ -234,19 +236,16 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) ...@@ -234,19 +236,16 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
ABC_FREE( CommandRead ); ABC_FREE( CommandRead );
return 0; return 0;
} }
//#ifdef WIN32
/* // don't remove the intermediate file // _unlink( FileNameSuper );
#ifdef WIN32 //#else
_unlink( FileNameSuper ); // unlink( FileNameSuper );
#else //#endif
unlink( FileNameSuper );
#endif
*/
ABC_FREE( FileNameGenlib ); ABC_FREE( FileNameGenlib );
ABC_FREE( FileNameSuper ); ABC_FREE( FileNameSuper );
ABC_FREE( CommandSuper ); ABC_FREE( CommandSuper );
ABC_FREE( CommandRead ); ABC_FREE( CommandRead );
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment