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

Go to the source code of this file.

Functions

void Io_WriteEqn (Abc_Ntk_t *pNtk, char *pFileName)
 FUNCTION DEFINITIONS ///.
 
char * Io_NamePrepro (char *pName)
 

Function Documentation

◆ Io_NamePrepro()

char * Io_NamePrepro ( char * pName)

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

Synopsis [Write one network.]

Description []

SideEffects []

SeeAlso []

Definition at line 88 of file ioWriteEqn.c.

89{
90 return strncmp(pName, "new_", 4) ? pName : pName + 4;
91}
int strncmp()
Here is the call graph for this function:

◆ Io_WriteEqn()

void Io_WriteEqn ( Abc_Ntk_t * pNtk,
char * pFileName )

FUNCTION DEFINITIONS ///.

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

Synopsis [Writes the logic network in the equation format.]

Description []

SideEffects []

SeeAlso []

Definition at line 50 of file ioWriteEqn.c.

51{
52 FILE * pFile;
53
54 assert( Abc_NtkIsAigNetlist(pNtk) );
55 if ( Abc_NtkLatchNum(pNtk) > 0 )
56 printf( "Warning: only combinational portion is being written.\n" );
57
58 // check that the names are fine for the EQN format
59 if ( !Io_NtkWriteEqnCheck(pNtk) )
60 return;
61
62 // start the output stream
63 pFile = fopen( pFileName, "w" );
64 if ( pFile == NULL )
65 {
66 fprintf( stdout, "Io_WriteEqn(): Cannot open the output file \"%s\".\n", pFileName );
67 return;
68 }
69 fprintf( pFile, "# Equations for \"%s\" written by ABC on %s\n", pNtk->pName, Extra_TimeStamp() );
70
71 // write the equations for the network
72 Io_NtkWriteEqnOne( pFile, pNtk );
73 fprintf( pFile, "\n" );
74 fclose( pFile );
75}
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: