66 pFile = fopen( FileName,
"w" );
69 fprintf( stdout,
"Io_WriteBlifMv(): Cannot open the output file.\n" );
80 if ( pNtkTemp == pNtk )
82 fprintf( pFile,
"\n\n" );
104 fprintf( pFile,
".model %s\n",
Abc_NtkName(pNtk) );
109 printf(
"Io_NtkWriteBlifMv(): EXDC is not written.\n" );
111 fprintf( pFile,
".end\n\n\n" );
132 fprintf( pFile,
".inputs" );
134 fprintf( pFile,
"\n" );
137 fprintf( pFile,
".outputs" );
139 fprintf( pFile,
"\n" );
142 fprintf( pFile,
"\n" );
153 fprintf( pFile,
".blackbox\n" );
163 fprintf( pFile,
"\n" );
166 fprintf( pFile,
"\n" );
181 fprintf( pFile,
"\n" );
188 fprintf( pFile,
"\n" );
231 fprintf( pFile,
" \\\n" );
237 LineLength += AddedLength;
271 fprintf( pFile,
" \\\n" );
277 LineLength += AddedLength;
301 fprintf( pFile,
".latch" );
304 fprintf( pFile,
"\n" );
306 fprintf( pFile,
".reset %s\n",
Abc_ObjName(pNetLo) );
307 fprintf( pFile,
"%d\n", Reset-1 );
327 fprintf( pFile,
"\n" );
349 fprintf( pFile,
"\n" );
368 int nValues, iFanin, i;
371 fprintf( pFile,
"\n" );
377 fprintf( pFile,
".mv %s %d\n",
Abc_ObjName(pFanin), nValues );
389 fprintf( pFile,
".table" );
391 fprintf( pFile,
"\n" );
397 fprintf( pFile,
".default " );
401 for ( ; *pCur; pCur++ )
403 fprintf( pFile,
"%c", *pCur );
407 iFanin = atoi( pCur+1 );
410 while ( *pCur !=
' ' && *pCur !=
'\n' )
443 AddedLength =
strlen(pName) + 1;
446 fprintf( pFile,
" \\\n" );
451 fprintf( pFile,
" %s", pName );
452 LineLength += AddedLength;
459 AddedLength =
strlen(pName) + 1;
460 if ( NameCounter && LineLength + AddedLength > 75 )
462 fprintf( pFile,
" \\\n" );
467 fprintf( pFile,
" %s", pName );
static void Io_NtkWriteBlifMvLatch(FILE *pFile, Abc_Obj_t *pLatch)
static int Abc_NtkIsComb(Abc_Ntk_t *pNtk)
static void Io_NtkWriteBlifMvNode(FILE *pFile, Abc_Obj_t *pNode)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
static Abc_Ntk_t * Abc_NtkExdc(Abc_Ntk_t *pNtk)
static int Abc_NtkIsNetlist(Abc_Ntk_t *pNtk)
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
static void Io_NtkWriteBlifMvOne(FILE *pFile, Abc_Ntk_t *pNtk)
static void Io_NtkWriteBlifMvSubckt(FILE *pFile, Abc_Obj_t *pNode)
static ABC_NAMESPACE_IMPL_START void Io_NtkWriteBlifMv(FILE *pFile, Abc_Ntk_t *pNtk)
DECLARATIONS ///.
#define Abc_NtkForEachCo(pNtk, pCo, i)
static int Abc_NtkHasBlifMv(Abc_Ntk_t *pNtk)
static int Abc_NtkWhiteboxNum(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_NtkHasBlackbox(Abc_Ntk_t *pNtk)
#define IO_WRITE_LINE_LENGTH
MACRO DEFINITIONS ///.
static void Io_NtkWriteBlifMvNodeFanins(FILE *pFile, Abc_Obj_t *pNode)
static void Io_NtkWriteBlifMvAsserts(FILE *pFile, Abc_Ntk_t *pNtk)
void Io_WriteBlifMv(Abc_Ntk_t *pNtk, char *FileName)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
#define Abc_NtkForEachLatch(pNtk, pObj, i)
#define Abc_NtkForEachBox(pNtk, pObj, i)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static char * Abc_NtkName(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static void Io_NtkWriteBlifMvValues(FILE *pFile, Abc_Obj_t *pNode)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static int Abc_ObjMvVarNum(Abc_Obj_t *pObj)
static void * Abc_ObjData(Abc_Obj_t *pObj)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static int Abc_NtkBlackboxNum(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanout(Abc_Obj_t *pObj, int i)
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
static void Io_NtkWriteBlifMvPis(FILE *pFile, Abc_Ntk_t *pNtk)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static void Io_NtkWriteBlifMvPos(FILE *pFile, Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
#define Abc_NtkForEachPi(pNtk, pPi, i)