ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abcScorr.c File Reference
#include "base/abc/abc.h"
#include "base/io/ioAbc.h"
#include "aig/saig/saig.h"
#include "proof/ssw/ssw.h"
#include "aig/gia/gia.h"
#include "proof/cec/cec.h"
#include "aig/gia/giaAig.h"
Include dependency graph for abcScorr.c:

Go to the source code of this file.

Classes

struct  Tst_Dat_t_
 

Typedefs

typedef typedefABC_NAMESPACE_IMPL_START struct Tst_Dat_t_ Tst_Dat_t
 DECLARATIONS ///.
 

Functions

Vec_Int_tAbc_NtkMapGiaIntoNameId (Abc_Ntk_t *pNetlist, Aig_Man_t *pAig, Gia_Man_t *pGia)
 FUNCTION DEFINITIONS ///.
 
char * Abc_NtkTestScorrGetName (Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id)
 
int Abc_NtkTestScorrWriteEquivPair (Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id1, int Id2, FILE *pFile, int fPol)
 
int Abc_NtkTestScorrWriteEquivConst (Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id1, FILE *pFile, int fPol)
 
char * Abc_NtkBmcFileName (char *pName)
 
int Abc_NtkTestScorrWriteEquivGia (Tst_Dat_t *pData)
 
int Abc_NtkTestScorrWriteEquivAig (Tst_Dat_t *pData)
 
Abc_Ntk_tAbc_NtkTestScorr (char *pFileNameIn, char *pFileNameOut, int nStepsMax, int nBTLimit, int fNewAlgo, int fFlopOnly, int fFfNdOnly, int fVerbose)
 
Gia_Man_tCec_ManScorrCorrespondence (Gia_Man_t *p, Cec_ParCor_t *pCorPars)
 

Typedef Documentation

◆ Tst_Dat_t

typedef typedefABC_NAMESPACE_IMPL_START struct Tst_Dat_t_ Tst_Dat_t

DECLARATIONS ///.

CFile****************************************************************

FileName [abcScorr.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Signal correspondence testing procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
abcScorr.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 36 of file abcScorr.c.

Function Documentation

◆ Abc_NtkBmcFileName()

char * Abc_NtkBmcFileName ( char * pName)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 194 of file abcScorr.c.

195{
196 static char Buffer[1000];
197 char * pNameGeneric = Extra_FileNameGeneric( pName );
198 sprintf( Buffer, "%s_bmc%s", pNameGeneric, pName + strlen(pNameGeneric) );
199 ABC_FREE( pNameGeneric );
200 return Buffer;
201}
#define ABC_FREE(obj)
Definition abc_global.h:267
char * Extra_FileNameGeneric(char *FileName)
int strlen()
char * sprintf()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkMapGiaIntoNameId()

Vec_Int_t * Abc_NtkMapGiaIntoNameId ( Abc_Ntk_t * pNetlist,
Aig_Man_t * pAig,
Gia_Man_t * pGia )

FUNCTION DEFINITIONS ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 64 of file abcScorr.c.

65{
66 Vec_Int_t * vId2Name;
67 Abc_Obj_t * pNet, * pNode, * pAnd;
68 Aig_Obj_t * pObjAig;
69 int i;
70 vId2Name = Vec_IntAlloc( 0 );
71 Vec_IntFill( vId2Name, pGia ? Gia_ManObjNum(pGia) : Aig_ManObjNumMax(pAig), ~0 );
72 // copy all names
73 Abc_NtkForEachNet( pNetlist, pNet, i )
74 {
75 pNode = Abc_ObjFanin0(pNet)->pCopy;
76 if ( pNode && (pAnd = Abc_ObjRegular(pNode->pCopy)) &&
77 (pObjAig = (Aig_Obj_t *)Abc_ObjRegular(pAnd->pCopy)) &&
78 Aig_ObjType(pObjAig) != AIG_OBJ_NONE )
79 {
80 if ( pGia == NULL )
81 Vec_IntWriteEntry( vId2Name, Aig_ObjId(pObjAig), Abc_ObjId(pNet) );
82 else
83 Vec_IntWriteEntry( vId2Name, Abc_Lit2Var(pObjAig->iData), Abc_ObjId(pNet) );
84 }
85 }
86 // overwrite CO names
87 Abc_NtkForEachCo( pNetlist, pNode, i )
88 {
89 pNet = Abc_ObjFanin0(pNode);
90 pNode = pNode->pCopy;
91 if ( pNode && (pAnd = Abc_ObjRegular(pNode->pCopy)) &&
92 (pObjAig = (Aig_Obj_t *)Abc_ObjRegular(pAnd->pCopy)) &&
93 Aig_ObjType(pObjAig) != AIG_OBJ_NONE )
94 {
95 if ( pGia == NULL )
96 Vec_IntWriteEntry( vId2Name, Aig_ObjId(pObjAig), Abc_ObjId(pNet) );
97 else
98 Vec_IntWriteEntry( vId2Name, Abc_Lit2Var(pObjAig->iData), Abc_ObjId(pNet) );
99 }
100 }
101 // overwrite CI names
102 Abc_NtkForEachCi( pNetlist, pNode, i )
103 {
104 pNet = Abc_ObjFanout0(pNode);
105 pNode = pNode->pCopy;
106 if ( pNode && (pAnd = Abc_ObjRegular(pNode->pCopy)) &&
107 (pObjAig = (Aig_Obj_t *)Abc_ObjRegular(pAnd->pCopy)) &&
108 Aig_ObjType(pObjAig) != AIG_OBJ_NONE )
109 {
110 if ( pGia == NULL )
111 Vec_IntWriteEntry( vId2Name, Aig_ObjId(pObjAig), Abc_ObjId(pNet) );
112 else
113 Vec_IntWriteEntry( vId2Name, Abc_Lit2Var(pObjAig->iData), Abc_ObjId(pNet) );
114 }
115 }
116 return vId2Name;
117}
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
#define Abc_NtkForEachNet(pNtk, pNet, i)
Definition abc.h:461
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
@ AIG_OBJ_NONE
Definition aig.h:58
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Abc_Obj_t * pCopy
Definition abc.h:148
int iData
Definition aig.h:88
Here is the caller graph for this function:

◆ Abc_NtkTestScorr()

Abc_Ntk_t * Abc_NtkTestScorr ( char * pFileNameIn,
char * pFileNameOut,
int nStepsMax,
int nBTLimit,
int fNewAlgo,
int fFlopOnly,
int fFfNdOnly,
int fVerbose )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 318 of file abcScorr.c.

319{
320 extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters );
321 extern Abc_Ntk_t * Abc_NtkFromDarSeqSweep( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan );
322
323 FILE * pFile;
324 Tst_Dat_t Data, * pData = &Data;
325 Vec_Int_t * vId2Name;
326 Abc_Ntk_t * pNetlist, * pLogic, * pStrash, * pResult;
327 Aig_Man_t * pAig, * pTempAig;
328 Gia_Man_t * pGia, * pTempGia;
329// int Counter = 0;
330 // check the files
331 pFile = fopen( pFileNameIn, "rb" );
332 if ( pFile == NULL )
333 {
334 printf( "Input file \"%s\" cannot be opened.\n", pFileNameIn );
335 return NULL;
336 }
337 fclose( pFile );
338 // check the files
339 pFile = fopen( pFileNameOut, "wb" );
340 if ( pFile == NULL )
341 {
342 printf( "Output file \"%s\" cannot be opened.\n", pFileNameOut );
343 return NULL;
344 }
345 fclose( pFile );
346 // derive AIG for signal correspondence
347 pNetlist = Io_ReadNetlist( pFileNameIn, Io_ReadFileType(pFileNameIn), 1 );
348 if ( pNetlist == NULL )
349 {
350 printf( "Reading input file \"%s\" has failed.\n", pFileNameIn );
351 return NULL;
352 }
353 pLogic = Abc_NtkToLogic( pNetlist );
354 if ( pLogic == NULL )
355 {
356 Abc_NtkDelete( pNetlist );
357 printf( "Deriving logic network from input file %s has failed.\n", pFileNameIn );
358 return NULL;
359 }
360 if ( Extra_FileIsType( pFileNameIn, ".bench", ".BENCH", NULL ) )
361 {
362 // get the init file name
363 char * pFileNameInit = Extra_FileNameGenericAppend( pLogic->pSpec, ".init" );
364 pFile = fopen( pFileNameInit, "rb" );
365 if ( pFile == NULL )
366 {
367 printf( "Init file \"%s\" cannot be opened.\n", pFileNameInit );
368 return NULL;
369 }
370 Io_ReadBenchInit( pLogic, pFileNameInit );
371 Abc_NtkConvertDcLatches( pLogic );
372 if ( fVerbose )
373 printf( "Initial state was derived from file \"%s\".\n", pFileNameInit );
374 }
375 pStrash = Abc_NtkStrash( pLogic, 0, 1, 0 );
376 if ( pStrash == NULL )
377 {
378 Abc_NtkDelete( pLogic );
379 Abc_NtkDelete( pNetlist );
380 printf( "Deriving strashed network from input file %s has failed.\n", pFileNameIn );
381 return NULL;
382 }
383 pAig = Abc_NtkToDar( pStrash, 0, 1 ); // performs "zero" internally
384 // the newer computation (&scorr)
385 if ( fNewAlgo )
386 {
387 Cec_ParCor_t CorPars, * pCorPars = &CorPars;
388 Cec_ManCorSetDefaultParams( pCorPars );
389 pCorPars->nBTLimit = nBTLimit;
390 pCorPars->nStepsMax = nStepsMax;
391 pCorPars->fVerbose = fVerbose;
392 pCorPars->fUseCSat = 1;
393 pGia = Gia_ManFromAig( pAig );
394 // prepare the data-structure
395 memset( pData, 0, sizeof(Tst_Dat_t) );
396 pData->pNetlist = pNetlist;
397 pData->pAig = NULL;
398 pData->pGia = pGia;
399 pData->vId2Name = vId2Name = Abc_NtkMapGiaIntoNameId( pNetlist, pAig, pGia );
400 pData->pFileNameOut = pFileNameOut;
401 pData->fFlopOnly = fFlopOnly;
402 pData->fFfNdOnly = fFfNdOnly;
403 pData->fDumpBmc = 1;
404 pCorPars->pData = pData;
405 pCorPars->pFunc = (void *)Abc_NtkTestScorrWriteEquivGia;
406 // call signal correspondence
407 pTempGia = Cec_ManLSCorrespondence( pGia, pCorPars );
408 pTempAig = Gia_ManToAigSimple( pTempGia );
409 Gia_ManStop( pTempGia );
410 Gia_ManStop( pGia );
411 }
412 // the older computation (scorr)
413 else
414 {
415 Ssw_Pars_t SswPars, * pSswPars = &SswPars;
416 Ssw_ManSetDefaultParams( pSswPars );
417 pSswPars->nBTLimit = nBTLimit;
418 pSswPars->nStepsMax = nStepsMax;
419 pSswPars->fVerbose = fVerbose;
420 // preSswPare the data-structure
421 memset( pData, 0, sizeof(Tst_Dat_t) );
422 pData->pNetlist = pNetlist;
423 pData->pAig = pAig;
424 pData->pGia = NULL;
425 pData->vId2Name = vId2Name = Abc_NtkMapGiaIntoNameId( pNetlist, pAig, NULL );
426 pData->pFileNameOut = pFileNameOut;
427 pData->fFlopOnly = fFlopOnly;
428 pData->fFfNdOnly = fFfNdOnly;
429 pData->fDumpBmc = 1;
430 pSswPars->pData = pData;
431 pSswPars->pFunc = (void *)Abc_NtkTestScorrWriteEquivAig;
432 // call signal correspondence
433 pTempAig = Ssw_SignalCorrespondence( pAig, pSswPars );
434 }
435 // create the resulting AIG
436 pResult = Abc_NtkFromDarSeqSweep( pStrash, pTempAig );
437 // cleanup
438 Vec_IntFree( vId2Name );
439 Aig_ManStop( pAig );
440 Aig_ManStop( pTempAig );
441 Abc_NtkDelete( pStrash );
442 Abc_NtkDelete( pLogic );
443 Abc_NtkDelete( pNetlist );
444 return pResult;
445}
Abc_Ntk_t * Abc_NtkFromDarSeqSweep(Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
Definition abcDar.c:473
Vec_Int_t * Abc_NtkMapGiaIntoNameId(Abc_Ntk_t *pNetlist, Aig_Man_t *pAig, Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
Definition abcScorr.c:64
typedefABC_NAMESPACE_IMPL_START struct Tst_Dat_t_ Tst_Dat_t
DECLARATIONS ///.
Definition abcScorr.c:36
int Abc_NtkTestScorrWriteEquivGia(Tst_Dat_t *pData)
Definition abcScorr.c:214
int Abc_NtkTestScorrWriteEquivAig(Tst_Dat_t *pData)
Definition abcScorr.c:267
ABC_DLL Abc_Ntk_t * Abc_NtkToLogic(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition abcNetlist.c:52
ABC_DLL void Abc_NtkConvertDcLatches(Abc_Ntk_t *pNtk)
Definition abcLatch.c:310
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
Definition abcStrash.c:265
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition abcNtk.c:1421
void Aig_ManStop(Aig_Man_t *p)
Definition aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
void Cec_ManCorSetDefaultParams(Cec_ParCor_t *p)
Definition cecCore.c:183
Gia_Man_t * Cec_ManLSCorrespondence(Gia_Man_t *pAig, Cec_ParCor_t *pPars)
Definition cecCorr.c:1179
struct Cec_ParCor_t_ Cec_ParCor_t
Definition cec.h:145
char * Extra_FileNameGenericAppend(char *pBase, char *pSuffix)
int Extra_FileIsType(char *pFileName, char *pS1, char *pS2, char *pS3)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
Definition giaAig.c:408
Gia_Man_t * Gia_ManFromAig(Aig_Man_t *p)
INCLUDES ///.
Definition giaAig.c:76
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
Definition abcDar.c:237
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
void Io_ReadBenchInit(Abc_Ntk_t *pNtk, char *pFileName)
Abc_Ntk_t * Io_ReadNetlist(char *pFileName, Io_FileType_t FileType, int fCheck)
Definition ioUtil.c:99
Io_FileType_t Io_ReadFileType(char *pFileName)
DECLARATIONS ///.
Definition ioUtil.c:47
void Ssw_ManSetDefaultParams(Ssw_Pars_t *p)
DECLARATIONS ///.
Definition sswCore.c:45
typedefABC_NAMESPACE_HEADER_START struct Ssw_Pars_t_ Ssw_Pars_t
INCLUDES ///.
Definition ssw.h:40
Aig_Man_t * Ssw_SignalCorrespondence(Aig_Man_t *pAig, Ssw_Pars_t *pPars)
Definition sswCore.c:436
char * pSpec
Definition abc.h:159
int fUseCSat
Definition cec.h:162
int nStepsMax
Definition cec.h:156
void * pFunc
Definition cec.h:171
void * pData
Definition cec.h:170
int nBTLimit
Definition cec.h:152
int fVerbose
Definition cec.h:168
char * memset()
Here is the call graph for this function:

◆ Abc_NtkTestScorrGetName()

char * Abc_NtkTestScorrGetName ( Abc_Ntk_t * pNetlist,
Vec_Int_t * vId2Name,
int Id )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 130 of file abcScorr.c.

131{
132// Abc_Obj_t * pObj;
133//printf( "trying to get name for %d\n", Id );
134 if ( Vec_IntEntry(vId2Name, Id) == ~0 )
135 return NULL;
136// pObj = Abc_NtkObj( pNetlist, Vec_IntEntry(vId2Name, Id) );
137// pObj = Abc_ObjFanin0(pObj);
138// assert( Abc_ObjIsCi(pObj) );
139 return Nm_ManFindNameById( pNetlist->pManName, Vec_IntEntry(vId2Name, Id) );
140}
char * Nm_ManFindNameById(Nm_Man_t *p, int ObjId)
Definition nmApi.c:199
Nm_Man_t * pManName
Definition abc.h:160
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkTestScorrWriteEquivAig()

int Abc_NtkTestScorrWriteEquivAig ( Tst_Dat_t * pData)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 267 of file abcScorr.c.

268{
269 Abc_Ntk_t * pNetlist = pData->pNetlist;
270 Vec_Int_t * vId2Name = pData->vId2Name;
271 Aig_Man_t * pAig = pData->pAig;
272 char * pFileNameOut = pData->pFileNameOut;
273 FILE * pFile;
274 Aig_Obj_t * pObj, * pRepr;
275 int i, Counter = 0;
276 if ( pData->fDumpBmc )
277 {
278 pData->fDumpBmc = 0;
279 pFileNameOut = Abc_NtkBmcFileName( pFileNameOut );
280 }
281 pFile = fopen( pFileNameOut, "wb" );
282 Aig_ManForEachObj( pAig, pObj, i )
283 {
284 if ( (pRepr = Aig_ObjRepr(pAig, pObj)) == NULL )
285 continue;
286 if ( pData->fFlopOnly )
287 {
288 if ( !Saig_ObjIsLo(pAig, pObj) || !(Saig_ObjIsLo(pAig, pRepr)||pRepr==Aig_ManConst1(pAig)) )
289 continue;
290 }
291 else if ( pData->fFfNdOnly )
292 {
293 if ( !Saig_ObjIsLo(pAig, pObj) && !(Saig_ObjIsLo(pAig, pRepr)||pRepr==Aig_ManConst1(pAig)) )
294 continue;
295 }
296 if ( pRepr == Aig_ManConst1(pAig) )
297 Counter += Abc_NtkTestScorrWriteEquivConst( pNetlist, vId2Name, Aig_ObjId(pObj), pFile, Aig_ObjPhase(pObj) );
298 else
299 Counter += Abc_NtkTestScorrWriteEquivPair( pNetlist, vId2Name, Aig_ObjId(pRepr), Aig_ObjId(pObj), pFile,
300 Aig_ObjPhase(pRepr) ^ Aig_ObjPhase(pObj) );
301 }
302 fclose( pFile );
303 printf( "%d pairs of sequentially equivalent nodes are written into file \"%s\".\n", Counter, pFileNameOut );
304 return Counter;
305}
char * Abc_NtkBmcFileName(char *pName)
Definition abcScorr.c:194
int Abc_NtkTestScorrWriteEquivPair(Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id1, int Id2, FILE *pFile, int fPol)
Definition abcScorr.c:153
int Abc_NtkTestScorrWriteEquivConst(Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id1, FILE *pFile, int fPol)
Definition abcScorr.c:174
#define Aig_ManForEachObj(p, pObj, i)
Definition aig.h:403
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkTestScorrWriteEquivConst()

int Abc_NtkTestScorrWriteEquivConst ( Abc_Ntk_t * pNetlist,
Vec_Int_t * vId2Name,
int Id1,
FILE * pFile,
int fPol )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 174 of file abcScorr.c.

175{
176 char * pName1 = Abc_NtkTestScorrGetName( pNetlist, vId2Name, Id1 );
177 if ( pName1 == NULL )
178 return 0;
179 fprintf( pFile, "%s=%s%s\n", pName1, fPol? "~": "", "const0" );
180 return 1;
181}
char * Abc_NtkTestScorrGetName(Abc_Ntk_t *pNetlist, Vec_Int_t *vId2Name, int Id)
Definition abcScorr.c:130
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkTestScorrWriteEquivGia()

int Abc_NtkTestScorrWriteEquivGia ( Tst_Dat_t * pData)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 214 of file abcScorr.c.

215{
216 Abc_Ntk_t * pNetlist = pData->pNetlist;
217 Vec_Int_t * vId2Name = pData->vId2Name;
218 Gia_Man_t * pGia = pData->pGia;
219 char * pFileNameOut = pData->pFileNameOut;
220 FILE * pFile;
221 Gia_Obj_t * pObj, * pRepr;
222 int i, Counter = 0;
223 if ( pData->fDumpBmc )
224 {
225 pData->fDumpBmc = 0;
226 pFileNameOut = Abc_NtkBmcFileName( pFileNameOut );
227 }
228 pFile = fopen( pFileNameOut, "wb" );
229 Gia_ManSetPhase( pGia );
230 Gia_ManForEachObj( pGia, pObj, i )
231 {
232 if ( !Gia_ObjHasRepr(pGia, i) )
233 continue;
234 pRepr = Gia_ManObj( pGia,Gia_ObjRepr(pGia, i) );
235 if ( pData->fFlopOnly )
236 {
237 if ( !Gia_ObjIsRo(pGia, pObj) || !(Gia_ObjIsRo(pGia, pRepr)||Gia_ObjIsConst0(pRepr)) )
238 continue;
239 }
240 else if ( pData->fFfNdOnly )
241 {
242 if ( !Gia_ObjIsRo(pGia, pObj) && !(Gia_ObjIsRo(pGia, pRepr)||Gia_ObjIsConst0(pRepr)) )
243 continue;
244 }
245 if ( Gia_ObjRepr(pGia, i) == 0 )
246 Counter += Abc_NtkTestScorrWriteEquivConst( pNetlist, vId2Name, i, pFile, Gia_ObjPhase(pObj) );
247 else
248 Counter += Abc_NtkTestScorrWriteEquivPair( pNetlist, vId2Name, Gia_ObjRepr(pGia, i), i, pFile,
249 Gia_ObjPhase(pRepr) ^ Gia_ObjPhase(pObj) );
250 }
251 fclose( pFile );
252 printf( "%d pairs of sequentially equivalent nodes are written into file \"%s\".\n", Counter, pFileNameOut );
253 return Counter;
254}
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition gia.h:1190
void Gia_ManSetPhase(Gia_Man_t *p)
Definition giaUtil.c:420
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkTestScorrWriteEquivPair()

int Abc_NtkTestScorrWriteEquivPair ( Abc_Ntk_t * pNetlist,
Vec_Int_t * vId2Name,
int Id1,
int Id2,
FILE * pFile,
int fPol )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 153 of file abcScorr.c.

154{
155 char * pName1 = Abc_NtkTestScorrGetName( pNetlist, vId2Name, Id1 );
156 char * pName2 = Abc_NtkTestScorrGetName( pNetlist, vId2Name, Id2 );
157 if ( pName1 == NULL || pName2 == NULL )
158 return 0;
159 fprintf( pFile, "%s=%s%s\n", pName1, fPol? "~": "", pName2 );
160 return 1;
161}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ManScorrCorrespondence()

Gia_Man_t * Cec_ManScorrCorrespondence ( Gia_Man_t * p,
Cec_ParCor_t * pCorPars )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 458 of file abcScorr.c.

459{
460 Gia_Man_t * pRes = NULL;
461 Aig_Man_t * pOld, * pNew;
462 Ssw_Pars_t SswPars, * pSswPars = &SswPars;
463 Ssw_ManSetDefaultParams( pSswPars );
464 pSswPars->nBTLimit = pCorPars->nBTLimit;
465 pSswPars->nFramesK = pCorPars->nFrames;
466 pSswPars->fLatchCorr = pCorPars->fLatchCorr;
467 pSswPars->fVerbose = pCorPars->fVerbose;
468 pOld = Gia_ManToAigSimple( p );
469 pNew = Ssw_SignalCorrespondence( pOld, pSswPars );
470 pRes = Gia_ManFromAigSimple( pNew );
471 Gia_ManReprFromAigRepr( pOld, p );
472 Aig_ManStop( pOld );
473 Aig_ManStop( pNew );
474 return pRes;
475}
Cube * p
Definition exorList.c:222
void Gia_ManReprFromAigRepr(Aig_Man_t *pAig, Gia_Man_t *pGia)
Definition giaAig.c:528
Gia_Man_t * Gia_ManFromAigSimple(Aig_Man_t *p)
Definition giaAig.c:212
int nFrames
Definition cec.h:150
int fLatchCorr
Definition cec.h:158
Here is the call graph for this function: