Go to the source code of this file.
◆ Io_WriteBench()
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Writes the network in BENCH format.]
Description []
SideEffects []
SeeAlso []
Definition at line 53 of file ioWriteBench.c.
54{
56 FILE * pFile;
57 assert( Abc_NtkIsSopNetlist(pNtk) );
58 if ( !Io_WriteBenchCheckNames(pNtk) )
59 {
60 fprintf( stdout, "Io_WriteBench(): Signal names in this benchmark contain parentheses making them impossible to reproduce in the BENCH format. Use \"short_names\".\n" );
61 return 0;
62 }
63 pFile = fopen( pFileName, "w" );
64 if ( pFile == NULL )
65 {
66 fprintf( stdout, "Io_WriteBench(): Cannot open the output file.\n" );
67 return 0;
68 }
70
71 Io_WriteBenchOne( pFile, pNtk );
72
73 pExdc = Abc_NtkExdc( pNtk );
74 if ( pExdc )
75 printf( "Io_WriteBench: EXDC is not written (warning).\n" );
76
77 fclose( pFile );
78 return 1;
79}
struct Abc_Ntk_t_ Abc_Ntk_t
◆ Io_WriteBenchLut()
| int Io_WriteBenchLut |
( |
Abc_Ntk_t * | pNtk, |
|
|
char * | pFileName ) |
Function*************************************************************
Synopsis [Writes the network in BENCH format with LUTs and DFFRSE.]
Description []
SideEffects []
SeeAlso []
Definition at line 175 of file ioWriteBench.c.
176{
178 FILE * pFile;
179 assert( Abc_NtkIsAigNetlist(pNtk) );
180 if ( !Io_WriteBenchCheckNames(pNtk) )
181 {
182 fprintf( stdout, "Io_WriteBenchLut(): Signal names in this benchmark contain parentheses making them impossible to reproduce in the BENCH format. Use \"short_names\".\n" );
183 return 0;
184 }
185 pFile = fopen( pFileName, "w" );
186 if ( pFile == NULL )
187 {
188 fprintf( stdout, "Io_WriteBench(): Cannot open the output file.\n" );
189 return 0;
190 }
192
193 Io_WriteBenchLutOne( pFile, pNtk );
194
195 pExdc = Abc_NtkExdc( pNtk );
196 if ( pExdc )
197 printf( "Io_WriteBench: EXDC is not written (warning).\n" );
198
199 fclose( pFile );
200 return 1;
201}