55 pFile = fopen( pFileName,
"w" );
58 fprintf( stdout,
"Io_WritePla(): Cannot open the output file.\n" );
67 printf(
"Io_WritePla: EXDC is not written (warning).\n" );
88 char * pCubeIn, * pCubeOut, * pCube;
89 int i, k, nProducts, nInputs, nOutputs, nFanins;
112 pCubeIn =
ABC_ALLOC(
char, nInputs + 1 );
113 pCubeOut =
ABC_ALLOC(
char, nOutputs + 1 );
114 memset( pCubeIn,
'-', nInputs ); pCubeIn[nInputs] = 0;
115 memset( pCubeOut,
'0', nOutputs ); pCubeOut[nOutputs] = 0;
118 fprintf( pFile,
".i %d\n", nInputs );
119 fprintf( pFile,
".o %d\n", nOutputs );
120 fprintf( pFile,
".ilb" );
123 fprintf( pFile,
"\n" );
124 fprintf( pFile,
".ob" );
127 fprintf( pFile,
"\n" );
128 fprintf( pFile,
".p %d\n", nProducts );
149 fprintf( pFile,
"%s %s\n", pCubeIn, pCubeOut );
150 pCubeIn[(int)(ABC_PTRUINT_T)pDriver->
pCopy] =
'-';
156 fprintf( pFile,
"%s %s\n", pCubeIn, pCubeOut );
170 assert( (
int)(ABC_PTRUINT_T)pFanin->
pCopy < nInputs );
171 pCubeIn[(int)(ABC_PTRUINT_T)pFanin->
pCopy] = pCube[k];
173 fprintf( pFile,
"%s %s\n", pCubeIn, pCubeOut );
180 pCubeIn[(int)(ABC_PTRUINT_T)pFanin->
pCopy] =
'-';
185 fprintf( pFile,
".e\n" );
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
ABC_DLL int Abc_NodeIsConst(Abc_Obj_t *pNode)
static Abc_Ntk_t * Abc_NtkExdc(Abc_Ntk_t *pNtk)
#define Abc_SopForEachCube(pSop, nFanins, pCube)
ABC_DLL int Abc_SopGetCubeNum(char *pSop)
static Abc_Obj_t * Abc_ObjFanin0Ntk(Abc_Obj_t *pObj)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define ABC_ALLOC(type, num)
#define Abc_NtkForEachCo(pNtk, pCo, i)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_START
#define Abc_NtkForEachCi(pNtk, pCi, i)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static int Abc_NtkIsSopNetlist(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NodeIsConst1(Abc_Obj_t *pNode)
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_SopIsComplement(char *pSop)
int Io_WritePla(Abc_Ntk_t *pNtk, char *pFileName)
FUNCTION DEFINITIONS ///.
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
static ABC_NAMESPACE_IMPL_START int Io_WritePlaOne(FILE *pFile, Abc_Ntk_t *pNtk)
DECLARATIONS ///.