105 pNode = pNode->
pCopy;
157 if ( pName1 == NULL || pName2 == NULL )
159 fprintf( pFile,
"%s=%s%s\n", pName1, fPol?
"~":
"", pName2 );
177 if ( pName1 == NULL )
179 fprintf( pFile,
"%s=%s%s\n", pName1, fPol?
"~":
"",
"const0" );
196 static char Buffer[1000];
198 sprintf( Buffer,
"%s_bmc%s", pNameGeneric, pName +
strlen(pNameGeneric) );
219 char * pFileNameOut = pData->pFileNameOut;
223 if ( pData->fDumpBmc )
228 pFile = fopen( pFileNameOut,
"wb" );
235 if ( pData->fFlopOnly )
240 else if ( pData->fFfNdOnly )
252 printf(
"%d pairs of sequentially equivalent nodes are written into file \"%s\".\n", Counter, pFileNameOut );
272 char * pFileNameOut = pData->pFileNameOut;
276 if ( pData->fDumpBmc )
281 pFile = fopen( pFileNameOut,
"wb" );
286 if ( pData->fFlopOnly )
291 else if ( pData->fFfNdOnly )
303 printf(
"%d pairs of sequentially equivalent nodes are written into file \"%s\".\n", Counter, pFileNameOut );
318 Abc_Ntk_t *
Abc_NtkTestScorr(
char * pFileNameIn,
char * pFileNameOut,
int nStepsMax,
int nBTLimit,
int fNewAlgo,
int fFlopOnly,
int fFfNdOnly,
int fVerbose )
326 Abc_Ntk_t * pNetlist, * pLogic, * pStrash, * pResult;
331 pFile = fopen( pFileNameIn,
"rb" );
334 printf(
"Input file \"%s\" cannot be opened.\n", pFileNameIn );
339 pFile = fopen( pFileNameOut,
"wb" );
342 printf(
"Output file \"%s\" cannot be opened.\n", pFileNameOut );
348 if ( pNetlist == NULL )
350 printf(
"Reading input file \"%s\" has failed.\n", pFileNameIn );
354 if ( pLogic == NULL )
357 printf(
"Deriving logic network from input file %s has failed.\n", pFileNameIn );
364 pFile = fopen( pFileNameInit,
"rb" );
367 printf(
"Init file \"%s\" cannot be opened.\n", pFileNameInit );
373 printf(
"Initial state was derived from file \"%s\".\n", pFileNameInit );
376 if ( pStrash == NULL )
380 printf(
"Deriving strashed network from input file %s has failed.\n", pFileNameIn );
396 pData->pNetlist = pNetlist;
400 pData->pFileNameOut = pFileNameOut;
401 pData->fFlopOnly = fFlopOnly;
402 pData->fFfNdOnly = fFfNdOnly;
404 pCorPars->
pData = pData;
417 pSswPars->nBTLimit = nBTLimit;
418 pSswPars->nStepsMax = nStepsMax;
419 pSswPars->fVerbose = fVerbose;
422 pData->pNetlist = pNetlist;
426 pData->pFileNameOut = pFileNameOut;
427 pData->fFlopOnly = fFlopOnly;
428 pData->fFfNdOnly = fFfNdOnly;
430 pSswPars->pData = pData;
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
char * Abc_NtkTestScorrGetName(Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id)
void Cec_ManCorSetDefaultParams(Cec_ParCor_t *p)
Abc_Ntk_t * Abc_NtkTestScorr(char *pFileNameIn, char *pFileNameOut, int nStepsMax, int nBTLimit, int fNewAlgo, int fFlopOnly, int fFfNdOnly, int fVerbose)
static int Aig_ObjPhase(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ObjRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Gia_ObjPhase(Gia_Obj_t *pObj)
static Aig_Type_t Aig_ObjType(Aig_Obj_t *pObj)
void Gia_ManStop(Gia_Man_t *p)
Vec_Int_t * Abc_NtkMapGiaIntoNameId(Abc_Ntk_t *pNetlist, Aig_Man_t *pAig, Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Ssw_Pars_t_ Ssw_Pars_t
INCLUDES ///.
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
typedefABC_NAMESPACE_IMPL_START struct Tst_Dat_t_ Tst_Dat_t
DECLARATIONS ///.
Abc_Ntk_t * Io_ReadNetlist(char *pFileName, Io_FileType_t FileType, int fCheck)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
Aig_Man_t * Ssw_SignalCorrespondence(Aig_Man_t *pAig, Ssw_Pars_t *pPars)
ABC_DLL void Abc_NtkConvertDcLatches(Abc_Ntk_t *pNtk)
char * Abc_NtkBmcFileName(char *pName)
#define Abc_NtkForEachCo(pNtk, pCo, i)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
int Abc_NtkTestScorrWriteEquivGia(Tst_Dat_t *pData)
ABC_DLL Abc_Ntk_t * Abc_NtkToLogic(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Gia_Man_t * Gia_ManFromAig(Aig_Man_t *p)
INCLUDES ///.
Io_FileType_t Io_ReadFileType(char *pFileName)
DECLARATIONS ///.
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
void Ssw_ManSetDefaultParams(Ssw_Pars_t *p)
DECLARATIONS ///.
int Abc_NtkTestScorrWriteEquivAig(Tst_Dat_t *pData)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Gia_Man_t * Cec_ManLSCorrespondence(Gia_Man_t *pAig, Cec_ParCor_t *pPars)
char * Nm_ManFindNameById(Nm_Man_t *p, int ObjId)
#define Abc_NtkForEachNet(pNtk, pNet, i)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
Abc_Ntk_t * Abc_NtkFromDarSeqSweep(Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
#define Aig_ManForEachObj(p, pObj, i)
#define Abc_NtkForEachCi(pNtk, pCi, i)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static int Abc_Lit2Var(int Lit)
static int Aig_ObjId(Aig_Obj_t *pObj)
void Gia_ManSetPhase(Gia_Man_t *p)
void Io_ReadBenchInit(Abc_Ntk_t *pNtk, char *pFileName)
static void Vec_IntFree(Vec_Int_t *p)
int Abc_NtkTestScorrWriteEquivPair(Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id1, int Id2, FILE *pFile, int fPol)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ObjRepr(Gia_Man_t *p, int Id)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
int Abc_NtkTestScorrWriteEquivConst(Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id1, FILE *pFile, int fPol)
static int Gia_ObjHasRepr(Gia_Man_t *p, int Id)