ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
ioWriteSmv.c File Reference
#include "ioAbc.h"
Include dependency graph for ioWriteSmv.c:

Go to the source code of this file.

Functions

int Io_WriteSmv (Abc_Ntk_t *pNtk, char *pFileName)
 

Function Documentation

◆ Io_WriteSmv()

int Io_WriteSmv ( Abc_Ntk_t * pNtk,
char * pFileName )

Function*************************************************************

Synopsis [Writes the network in SMV format.]

Description []

SideEffects []

SeeAlso []

Definition at line 71 of file ioWriteSmv.c.

72{
73 Abc_Ntk_t * pExdc;
74 FILE * pFile;
75 assert( Abc_NtkIsSopNetlist(pNtk) );
76 if ( !Io_WriteSmvCheckNames(pNtk) )
77 {
78 fprintf( stdout, "Io_WriteSmv(): Signal names in this benchmark contain parentheses making them impossible to reproduce in the SMV format. Use \"short_names\".\n" );
79 return 0;
80 }
81 pFile = fopen( pFileName, "w" );
82 if ( pFile == NULL )
83 {
84 fprintf( stdout, "Io_WriteSmv(): Cannot open the output file.\n" );
85 return 0;
86 }
87 fprintf( pFile, "-- benchmark \"%s\" written by ABC on %s\n", pNtk->pName, Extra_TimeStamp() );
88 // write the network
89 Io_WriteSmvOne( pFile, pNtk );
90 // write EXDC network if it exists
91 pExdc = Abc_NtkExdc( pNtk );
92 if ( pExdc )
93 printf( "Io_WriteSmv: EXDC is not written (warning).\n" );
94 // finalize the file
95 fclose( pFile );
96 return 1;
97}
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
char * Extra_TimeStamp()
char * pName
Definition abc.h:158
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function: