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
// derive the supergate library
if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() )
{
printf( "A simple supergate library is derived from gate library \"%s\".\n",
Mio_LibraryReadName((Mio_Library_t *)Abc_FrameReadLibGen()) );
// printf( "A simple supergate library is derived from gate library \"%s\".\n",
// Mio_LibraryReadName((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 )
// derive the supergate library
if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() )
{
printf( "A simple supergate library is derived from gate library \"%s\".\n",
Mio_LibraryReadName((Mio_Library_t *)Abc_FrameReadLibGen()) );
// printf( "A simple supergate library is derived from gate library \"%s\".\n",
// Mio_LibraryReadName((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 )
// derive the supergate library
if ( Abc_FrameReadLibSuper() == NULL && Abc_FrameReadLibGen() )
{
printf( "A simple supergate library is derived from gate library \"%s\".\n",
Mio_LibraryReadName(Abc_FrameReadLibGen()) );
// printf( "A simple supergate library is derived from gate library \"%s\".\n",
// Mio_LibraryReadName(Abc_FrameReadLibGen()) );
Map_SuperLibDeriveFromGenlib( Abc_FrameReadLibGen() );
}
p->pSuperLib = Abc_FrameReadLibSuper();
......
......@@ -218,15 +218,17 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
//#else
// unlink( FileNameGenlib );
//#endif
printf( "A simple supergate library is derived from gate library \"%s\".\n", Mio_LibraryReadName(pLib) );
fflush( stdout );
sprintf( CommandRead, "read_super %s", FileNameSuper );
if ( Cmd_CommandExecute( pAbc, CommandRead ) )
{
#ifdef WIN32
_unlink( FileNameSuper );
#else
unlink( FileNameSuper );
#endif
//#ifdef WIN32
// _unlink( FileNameSuper );
//#else
// unlink( FileNameSuper );
//#endif
fprintf( stdout, "Cannot execute command \"%s\".\n", CommandRead );
ABC_FREE( FileNameGenlib );
ABC_FREE( FileNameSuper );
......@@ -234,14 +236,11 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
ABC_FREE( CommandRead );
return 0;
}
/* // don't remove the intermediate file
#ifdef WIN32
_unlink( FileNameSuper );
#else
unlink( FileNameSuper );
#endif
*/
//#ifdef WIN32
// _unlink( FileNameSuper );
//#else
// unlink( FileNameSuper );
//#endif
ABC_FREE( FileNameGenlib );
ABC_FREE( FileNameSuper );
ABC_FREE( CommandSuper );
......
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