ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abcDar.c File Reference
#include "base/abc/abc.h"
#include "base/main/main.h"
#include "aig/gia/giaAig.h"
#include "opt/dar/dar.h"
#include "sat/cnf/cnf.h"
#include "proof/fra/fra.h"
#include "proof/fraig/fraig.h"
#include "proof/int/int.h"
#include "proof/dch/dch.h"
#include "proof/ssw/ssw.h"
#include "opt/cgt/cgt.h"
#include "bdd/bbr/bbr.h"
#include "aig/gia/gia.h"
#include "proof/cec/cec.h"
#include "opt/csw/csw.h"
#include "proof/pdr/pdr.h"
#include "sat/bmc/bmc.h"
#include "map/mio/mio.h"
#include "misc/vec/vecMem.h"
#include "map/amap/amap.h"
#include "abcDarUnfold2.c"
Include dependency graph for abcDar.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int Abc_ObjCompareById (Abc_Obj_t **pp1, Abc_Obj_t **pp2)
 DECLARATIONS ///.
 
void Abc_CollectTopOr_rec (Abc_Obj_t *pObj, Vec_Ptr_t *vSuper)
 
void Abc_CollectTopOr (Abc_Obj_t *pObj, Vec_Ptr_t *vSuper)
 
Aig_Man_tAbc_NtkToDarBmc (Abc_Ntk_t *pNtk, Vec_Int_t **pvMap)
 
Vec_Int_tAbc_NtkFindDcLatches (Abc_Ntk_t *pNtk)
 
Aig_Man_tAbc_NtkToDar (Abc_Ntk_t *pNtk, int fExors, int fRegisters)
 DECLARATIONS ///.
 
Aig_Man_tAbc_NtkToDarChoices (Abc_Ntk_t *pNtk)
 
Abc_Ntk_tAbc_NtkFromDar (Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
 
Abc_Ntk_tAbc_NtkFromDarSeqSweep (Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
 
Abc_Ntk_tAbc_NtkFromAigPhase (Aig_Man_t *pMan)
 DECLARATIONS ///.
 
int Abc_NtkFromGiaCollapse (Gia_Man_t *pGia)
 
Hop_Obj_tAbc_ObjHopFromGia_rec (Hop_Man_t *pHopMan, Gia_Man_t *p, int Id, Vec_Ptr_t *vCopies)
 
Hop_Obj_tAbc_ObjHopFromGia (Hop_Man_t *pHopMan, Gia_Man_t *p, int GiaId, Vec_Ptr_t *vCopies)
 
Abc_Obj_tAbc_NtkFromMappedGia_rec (Abc_Ntk_t *pNtkNew, Gia_Man_t *p, int iObj, int fAddInv)
 
Abc_Ntk_tAbc_NtkFromMappedGia (Gia_Man_t *p, int fFindEnables, int fUseBuffs)
 
Abc_Ntk_tAbc_NtkFromCellMappedGia (Gia_Man_t *p, int fUseBuffs)
 
Abc_Ntk_tAbc_NtkAfterTrim (Aig_Man_t *pMan, Abc_Ntk_t *pNtkOld)
 
Abc_Ntk_tAbc_NtkFromDarChoices (Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
 
Abc_Ntk_tAbc_NtkFromDarSeq (Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
 
Vec_Ptr_tAbc_NtkCollectCiNames (Abc_Ntk_t *pNtk)
 
Vec_Ptr_tAbc_NtkCollectCoNames (Abc_Ntk_t *pNtk)
 
Vec_Int_tAbc_NtkGetLatchValues (Abc_Ntk_t *pNtk)
 
Abc_Ntk_tAbc_NtkDar (Abc_Ntk_t *pNtk)
 
Abc_Ntk_tAbc_NtkDarFraig (Abc_Ntk_t *pNtk, int nConfLimit, int fDoSparse, int fProve, int fTransfer, int fSpeculate, int fChoicing, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarFraigPart (Abc_Ntk_t *pNtk, int nPartSize, int nConfLimit, int nLevelMax, int fVerbose)
 
Abc_Ntk_tAbc_NtkCSweep (Abc_Ntk_t *pNtk, int nCutsMax, int nLeafMax, int fVerbose)
 
Abc_Ntk_tAbc_NtkDRewrite (Abc_Ntk_t *pNtk, Dar_RwrPar_t *pPars)
 
Abc_Ntk_tAbc_NtkDRefactor (Abc_Ntk_t *pNtk, Dar_RefPar_t *pPars)
 
Abc_Ntk_tAbc_NtkDC2 (Abc_Ntk_t *pNtk, int fBalance, int fUpdateLevel, int fFanout, int fPower, int fVerbose)
 
Abc_Ntk_tAbc_NtkDChoice (Abc_Ntk_t *pNtk, int fBalance, int fUpdateLevel, int fConstruct, int nConfMax, int nLevelMax, int fVerbose)
 
Abc_Ntk_tAbc_NtkDch (Abc_Ntk_t *pNtk, Dch_Pars_t *pPars)
 
Abc_Ntk_tAbc_NtkDrwsat (Abc_Ntk_t *pNtk, int fBalance, int fVerbose)
 
Abc_Ntk_tAbc_NtkConstructFromCnf (Abc_Ntk_t *pNtk, Cnf_Man_t *p, Vec_Ptr_t *vMapped)
 
Abc_Ntk_tAbc_NtkDarToCnf (Abc_Ntk_t *pNtk, char *pFileName, int fFastAlgo, int fChangePol, int fVerbose)
 
int Abc_NtkDSat (Abc_Ntk_t *pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fAlignPol, int fAndOuts, int fNewSolver, int fVerbose)
 
int Abc_NtkPartitionedSat (Abc_Ntk_t *pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose)
 
int Abc_NtkDarCec (Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int nConfLimit, int fPartition, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarSeqSweep (Abc_Ntk_t *pNtk, Fra_Ssw_t *pPars)
 
void Abc_NtkPrintLatchEquivClasses (Abc_Ntk_t *pNtk, Aig_Man_t *pAig)
 
Abc_Ntk_tAbc_NtkDarSeqSweep2 (Abc_Ntk_t *pNtk, Ssw_Pars_t *pPars)
 
Abc_Ntk_tAbc_NtkDarLcorr (Abc_Ntk_t *pNtk, int nFramesP, int nConfMax, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarLcorrNew (Abc_Ntk_t *pNtk, int nVarsMax, int nConfMax, int nLimitMax, int fVerbose)
 
int Abc_NtkDarBmc (Abc_Ntk_t *pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int *piFrames, int fUseSatoko)
 
int Abc_NtkDarBmc3 (Abc_Ntk_t *pNtk, Saig_ParBmc_t *pPars, int fOrDecomp)
 
int Abc_NtkDarBmcInter_int (Aig_Man_t *pMan, Inter_ManParams_t *pPars, Aig_Man_t **ppNtkRes)
 
int Abc_NtkDarBmcInter (Abc_Ntk_t *pNtk, Inter_ManParams_t *pPars, Abc_Ntk_t **ppNtkRes)
 
int Abc_NtkDarDemiter (Abc_Ntk_t *pNtk)
 
int Abc_NtkDarDemiterNew (Abc_Ntk_t *pNtk)
 
int Abc_NtkDarDemiterDual (Abc_Ntk_t *pNtk, int fVerbose)
 
int Abc_NtkDarProve (Abc_Ntk_t *pNtk, Fra_Sec_t *pSecPar, int nBmcFramesMax, int nBmcConfMax)
 
int Abc_NtkDarSec (Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, Fra_Sec_t *pSecPar)
 
int Abc_NtkDarPdr (Abc_Ntk_t *pNtk, Pdr_Par_t *pPars)
 
int Abc_NtkDarAbSec (Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int nFrames, int fVerbose)
 
int Abc_NtkDarSimSec (Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, Ssw_Pars_t *pPars)
 
Abc_Ntk_tAbc_NtkDarMatch (Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int nDist, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarLatchSweep (Abc_Ntk_t *pNtk, int fLatchConst, int fLatchEqual, int fSaveNames, int fUseMvSweep, int nFramesSymb, int nFramesSatur, int fVerbose, int fVeryVerbose)
 
Abc_Ntk_tAbc_NtkDarRetime (Abc_Ntk_t *pNtk, int nStepsMax, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarRetimeF (Abc_Ntk_t *pNtk, int nStepsMax, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarRetimeMostFwd (Abc_Ntk_t *pNtk, int nMaxIters, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarRetimeMinArea (Abc_Ntk_t *pNtk, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarRetimeStep (Abc_Ntk_t *pNtk, int fVerbose)
 
int Abc_NtkDarSeqSim (Abc_Ntk_t *pNtk, int nFrames, int nWords, int TimeOut, int fNew, int fMiter, int fVerbose, char *pFileSim)
 
int Abc_NtkDarSeqSim3 (Abc_Ntk_t *pNtk, Ssw_RarPars_t *pPars)
 
int Abc_NtkDarClau (Abc_Ntk_t *pNtk, int nFrames, int nPref, int nClauses, int nLutSize, int nLevels, int nCutsMax, int nBatches, int fStepUp, int fBmc, int fRefs, int fTarget, int fVerbose, int fVeryVerbose)
 
Abc_Ntk_tAbc_NtkDarEnlarge (Abc_Ntk_t *pNtk, int nFrames, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarTempor (Abc_Ntk_t *pNtk, int nFrames, int TimeOut, int nConfLimit, int fUseBmc, int fUseTransSigs, int fVerbose, int fVeryVerbose)
 
int Abc_NtkDarInduction (Abc_Ntk_t *pNtk, int nTimeOut, int nFramesMax, int nConfMax, int fUnique, int fUniqueAll, int fGetCex, int fVerbose, int fVeryVerbose)
 
Abc_Ntk_tAbc_NtkInterOne (Abc_Ntk_t *pNtkOn, Abc_Ntk_t *pNtkOff, int fRelation, int fVerbose)
 
Gia_Man_tGia_ManInterOne (Gia_Man_t *pNtkOn, Gia_Man_t *pNtkOff, int fVerbose)
 
void Abc_NtkInterFast (Abc_Ntk_t *pNtkOn, Abc_Ntk_t *pNtkOff, int fVerbose)
 
Abc_Ntk_tAbc_NtkInter (Abc_Ntk_t *pNtkOn, Abc_Ntk_t *pNtkOff, int fRelation, int fVerbose)
 
void Abc_NtkPrintSccs (Abc_Ntk_t *pNtk, int fVerbose)
 
int Abc_NtkDarPrintCone (Abc_Ntk_t *pNtk)
 
Abc_Ntk_tAbc_NtkBalanceExor (Abc_Ntk_t *pNtk, int fUpdateLevel, int fVerbose)
 
Abc_Ntk_tAbc_NtkPhaseAbstract (Abc_Ntk_t *pNtk, int nFrames, int nPref, int fIgnore, int fPrint, int fVerbose)
 
int Abc_NtkPhaseFrameNum (Abc_Ntk_t *pNtk)
 
Abc_Ntk_tAbc_NtkDarSynchOne (Abc_Ntk_t *pNtk, int nWords, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarSynch (Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int nWords, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarClockGate (Abc_Ntk_t *pNtk, Abc_Ntk_t *pCare, Cgt_Par_t *pPars)
 
Abc_Ntk_tAbc_NtkDarExtWin (Abc_Ntk_t *pNtk, int nObjId, int nDist, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarInsWin (Abc_Ntk_t *pNtk, Abc_Ntk_t *pCare, int nObjId, int nDist, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarFrames (Abc_Ntk_t *pNtk, int nPrefix, int nFrames, int fInit, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarCleanupAig (Abc_Ntk_t *pNtk, int fCleanupPis, int fCleanupPos, int fVerbose)
 
int Abc_NtkDarReach (Abc_Ntk_t *pNtk, Saig_ParBbr_t *pPars)
 
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START Abc_Ntk_tAmap_ManProduceNetwork (Abc_Ntk_t *pNtk, Vec_Ptr_t *vMapping)
 
Abc_Ntk_tAbc_NtkDarAmap (Abc_Ntk_t *pNtk, Amap_Par_t *pPars)
 
void Abc_NtkDarConstr (Abc_Ntk_t *pNtk, int nFrames, int nConfs, int nProps, int fStruct, int fOldAlgo, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarOutdec (Abc_Ntk_t *pNtk, int nLits, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarUnfold (Abc_Ntk_t *pNtk, int nFrames, int nConfs, int nProps, int fStruct, int fOldAlgo, int fVerbose)
 
Abc_Ntk_tAbc_NtkDarFold (Abc_Ntk_t *pNtk, int fCompl, int fVerbose, int fSeqCleanup)
 
void Abc_NtkDarConstrProfile (Abc_Ntk_t *pNtk, int fVerbose)
 
void Abc_NtkDarTest (Abc_Ntk_t *pNtk, int Num)
 
Abc_Ntk_tAbc_NtkDarTestNtk (Abc_Ntk_t *pNtk)
 

Variables

abctime timeCnf
 DECLARATIONS ///.
 
abctime timeSat
 
abctime timeInt
 

Function Documentation

◆ Abc_CollectTopOr()

void Abc_CollectTopOr ( Abc_Obj_t * pObj,
Vec_Ptr_t * vSuper )

Definition at line 92 of file abcDar.c.

93{
94 Vec_PtrClear( vSuper );
95 if ( Abc_ObjIsComplement(pObj) )
96 {
97 Abc_CollectTopOr_rec( Abc_ObjNot(pObj), vSuper );
98 Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Abc_ObjCompareById );
99 }
100 else
101 Vec_PtrPush( vSuper, Abc_ObjNot(pObj) );
102}
ABC_NAMESPACE_IMPL_START int Abc_ObjCompareById(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
DECLARATIONS ///.
Definition abcDar.c:65
void Abc_CollectTopOr_rec(Abc_Obj_t *pObj, Vec_Ptr_t *vSuper)
Definition abcDar.c:81
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_CollectTopOr_rec()

void Abc_CollectTopOr_rec ( Abc_Obj_t * pObj,
Vec_Ptr_t * vSuper )

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

Synopsis [Collects the supergate.]

Description []

SideEffects []

SeeAlso []

Definition at line 81 of file abcDar.c.

82{
83 if ( Abc_ObjIsComplement(pObj) || !Abc_ObjIsNode(pObj) )
84 {
85 Vec_PtrPush( vSuper, pObj );
86 return;
87 }
88 // go through the branches
89 Abc_CollectTopOr_rec( Abc_ObjChild0(pObj), vSuper );
90 Abc_CollectTopOr_rec( Abc_ObjChild1(pObj), vSuper );
91}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkAfterTrim()

Abc_Ntk_t * Abc_NtkAfterTrim ( Aig_Man_t * pMan,
Abc_Ntk_t * pNtkOld )

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description [This procedure should be called after seq sweeping, which changes the number of registers.]

SideEffects []

SeeAlso []

Definition at line 1120 of file abcDar.c.

1121{
1122 Vec_Ptr_t * vNodes;
1123 Abc_Ntk_t * pNtkNew;
1124 Abc_Obj_t * pObjNew, * pObjOld;
1125 Aig_Obj_t * pObj, * pObjLo, * pObjLi;
1126 int i;
1127 assert( pMan->nAsserts == 0 );
1128 assert( pNtkOld->nBarBufs == 0 );
1129 assert( Aig_ManRegNum(pMan) <= Abc_NtkLatchNum(pNtkOld) );
1130 assert( Saig_ManPiNum(pMan) <= Abc_NtkCiNum(pNtkOld) );
1131 assert( Saig_ManPoNum(pMan) == Abc_NtkPoNum(pNtkOld) );
1132 assert( pMan->vCiNumsOrig != NULL );
1133 // perform strashing
1134 pNtkNew = Abc_NtkAlloc( ABC_NTK_STRASH, ABC_FUNC_AIG, 1 );
1135 pNtkNew->nConstrs = pMan->nConstrs;
1136 pNtkNew->nBarBufs = pMan->nBarBufs;
1137 // duplicate the name and the spec
1138// pNtkNew->pName = Extra_UtilStrsav(pMan->pName);
1139// pNtkNew->pSpec = Extra_UtilStrsav(pMan->pSpec);
1140 Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
1141 // create PIs
1142 Aig_ManForEachPiSeq( pMan, pObj, i )
1143 {
1144 pObjNew = Abc_NtkCreatePi( pNtkNew );
1145 pObj->pData = pObjNew;
1146 // find the name
1147 pObjOld = Abc_NtkCi( pNtkOld, Vec_IntEntry(pMan->vCiNumsOrig, i) );
1148 Abc_ObjAssignName( pObjNew, Abc_ObjName(pObjOld), NULL );
1149 }
1150 // create POs
1151 Aig_ManForEachPoSeq( pMan, pObj, i )
1152 {
1153 pObjNew = Abc_NtkCreatePo( pNtkNew );
1154 pObj->pData = pObjNew;
1155 // find the name
1156 pObjOld = Abc_NtkCo( pNtkOld, i );
1157 Abc_ObjAssignName( pObjNew, Abc_ObjName(pObjOld), NULL );
1158 }
1159 assert( Abc_NtkCiNum(pNtkNew) == Aig_ManCiNum(pMan) - Aig_ManRegNum(pMan) );
1160 assert( Abc_NtkCoNum(pNtkNew) == Aig_ManCoNum(pMan) - Aig_ManRegNum(pMan) );
1161 // create as many latches as there are registers in the manager
1162 Aig_ManForEachLiLoSeq( pMan, pObjLi, pObjLo, i )
1163 {
1164 pObjNew = Abc_NtkCreateLatch( pNtkNew );
1165 pObjLi->pData = Abc_NtkCreateBi( pNtkNew );
1166 pObjLo->pData = Abc_NtkCreateBo( pNtkNew );
1167 Abc_ObjAddFanin( pObjNew, (Abc_Obj_t *)pObjLi->pData );
1168 Abc_ObjAddFanin( (Abc_Obj_t *)pObjLo->pData, pObjNew );
1169 Abc_LatchSetInit0( pObjNew );
1170 // find the name
1171 pObjOld = Abc_NtkCi( pNtkOld, Vec_IntEntry(pMan->vCiNumsOrig, Saig_ManPiNum(pMan)+i) );
1172 Abc_ObjAssignName( (Abc_Obj_t *)pObjLo->pData, Abc_ObjName(pObjOld), NULL );
1173 // find the name
1174 pObjOld = Abc_NtkCo( pNtkOld, Saig_ManPoNum(pMan)+i );
1175 Abc_ObjAssignName( (Abc_Obj_t *)pObjLi->pData, Abc_ObjName(pObjOld), NULL );
1176 }
1177 // rebuild the AIG
1178 vNodes = Aig_ManDfs( pMan, 1 );
1179 Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
1180 if ( Aig_ObjIsBuf(pObj) )
1181 pObj->pData = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
1182 else
1183 pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) );
1184 Vec_PtrFree( vNodes );
1185 // connect the PO nodes
1186 Aig_ManForEachCo( pMan, pObj, i )
1187 {
1188 pObjNew = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
1189 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew );
1190 }
1191 // check the resulting AIG
1192 if ( !Abc_NtkCheck( pNtkNew ) )
1193 Abc_Print( 1, "Abc_NtkAfterTrim(): Network check has failed.\n" );
1194 return pNtkNew;
1195}
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
Definition abcNtk.c:53
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition abcFanio.c:84
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition abcCheck.c:64
struct Abc_Aig_t_ Abc_Aig_t
Definition abc.h:117
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
Definition abcNames.c:49
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
Definition abcNames.c:69
@ ABC_NTK_STRASH
Definition abc.h:58
ABC_DLL Abc_Obj_t * Abc_AigAnd(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
Definition abcAig.c:700
@ ABC_FUNC_AIG
Definition abc.h:67
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition abcAig.c:683
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
#define Aig_ManForEachPiSeq(p, pObj, i)
SEQUENTIAL ITERATORS ///.
Definition aig.h:438
#define Aig_ManForEachCo(p, pObj, i)
Definition aig.h:398
Vec_Ptr_t * Aig_ManDfs(Aig_Man_t *p, int fNodesOnly)
Definition aigDfs.c:145
#define Aig_ManForEachPoSeq(p, pObj, i)
Definition aig.h:444
#define Aig_ManForEachLiLoSeq(p, pObjLi, pObjLo, k)
Definition aig.h:450
int nBarBufs
Definition abc.h:174
int nConstrs
Definition abc.h:173
void * pManFunc
Definition abc.h:191
void * pData
Definition aig.h:87
#define assert(ex)
Definition util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
Here is the call graph for this function:

◆ Abc_NtkBalanceExor()

Abc_Ntk_t * Abc_NtkBalanceExor ( Abc_Ntk_t * pNtk,
int fUpdateLevel,
int fVerbose )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 4078 of file abcDar.c.

4079{
4080 extern void Dar_BalancePrintStats( Aig_Man_t * p );
4081 Abc_Ntk_t * pNtkAig;
4082 Aig_Man_t * pMan, * pTemp;//, * pTemp2;
4083 assert( Abc_NtkIsStrash(pNtk) );
4084 // derive AIG with EXORs
4085 pMan = Abc_NtkToDar( pNtk, 1, 0 );
4086 if ( pMan == NULL )
4087 return NULL;
4088// Aig_ManPrintStats( pMan );
4089 if ( fVerbose )
4090 Dar_BalancePrintStats( pMan );
4091 // perform balancing
4092 pTemp = Dar_ManBalance( pMan, fUpdateLevel );
4093// Aig_ManPrintStats( pTemp );
4094 // create logic network
4095 pNtkAig = Abc_NtkFromDar( pNtk, pTemp );
4096 Aig_ManStop( pTemp );
4097 Aig_ManStop( pMan );
4098 return pNtkAig;
4099}
Abc_Ntk_t * Abc_NtkFromDar(Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
Definition abcDar.c:419
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
DECLARATIONS ///.
Definition abcDar.c:237
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
Aig_Man_t * Dar_ManBalance(Aig_Man_t *p, int fUpdateLevel)
Definition darBalance.c:554
void Dar_BalancePrintStats(Aig_Man_t *p)
Definition darBalance.c:716
Cube * p
Definition exorList.c:222
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkCollectCiNames()

Vec_Ptr_t * Abc_NtkCollectCiNames ( Abc_Ntk_t * pNtk)

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

Synopsis [Collects CI of the network.]

Description []

SideEffects []

SeeAlso []

Definition at line 1348 of file abcDar.c.

1349{
1350 Abc_Obj_t * pObj;
1351 int i;
1352 Vec_Ptr_t * vNames;
1353 vNames = Vec_PtrAlloc( 100 );
1354 Abc_NtkForEachCi( pNtk, pObj, i )
1355 Vec_PtrPush( vNames, Extra_UtilStrsav(Abc_ObjName(pObj)) );
1356 return vNames;
1357}
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
char * Extra_UtilStrsav(const char *s)
Here is the call graph for this function:

◆ Abc_NtkCollectCoNames()

Vec_Ptr_t * Abc_NtkCollectCoNames ( Abc_Ntk_t * pNtk)

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

Synopsis [Collects CO of the network.]

Description []

SideEffects []

SeeAlso []

Definition at line 1370 of file abcDar.c.

1371{
1372 Abc_Obj_t * pObj;
1373 int i;
1374 Vec_Ptr_t * vNames;
1375 vNames = Vec_PtrAlloc( 100 );
1376 Abc_NtkForEachCo( pNtk, pObj, i )
1377 Vec_PtrPush( vNames, Extra_UtilStrsav(Abc_ObjName(pObj)) );
1378 return vNames;
1379}
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
Here is the call graph for this function:

◆ Abc_NtkConstructFromCnf()

Abc_Ntk_t * Abc_NtkConstructFromCnf ( Abc_Ntk_t * pNtk,
Cnf_Man_t * p,
Vec_Ptr_t * vMapped )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1775 of file abcDar.c.

1776{
1777 Abc_Ntk_t * pNtkNew;
1778 Abc_Obj_t * pNode, * pNodeNew;
1779 Aig_Obj_t * pObj, * pLeaf;
1780 Cnf_Cut_t * pCut;
1781 Vec_Int_t * vCover;
1782 unsigned uTruth;
1783 int i, k, nDupGates;
1784 // create the new network
1785 pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP );
1786 // make the mapper point to the new network
1787 Aig_ManConst1(p->pManAig)->pData = Abc_NtkCreateNodeConst1(pNtkNew);
1788 Abc_NtkForEachCi( pNtk, pNode, i )
1789 Aig_ManCi(p->pManAig, i)->pData = pNode->pCopy;
1790 // process the nodes in topological order
1791 vCover = Vec_IntAlloc( 1 << 16 );
1792 Vec_PtrForEachEntry( Aig_Obj_t *, vMapped, pObj, i )
1793 {
1794 // create new node
1795 pNodeNew = Abc_NtkCreateNode( pNtkNew );
1796 // add fanins according to the cut
1797 pCut = (Cnf_Cut_t *)pObj->pData;
1798 Cnf_CutForEachLeaf( p->pManAig, pCut, pLeaf, k )
1799 Abc_ObjAddFanin( pNodeNew, (Abc_Obj_t *)pLeaf->pData );
1800 // add logic function
1801 if ( pCut->nFanins < 5 )
1802 {
1803 uTruth = 0xFFFF & *Cnf_CutTruth(pCut);
1804 Cnf_SopConvertToVector( p->pSops[uTruth], p->pSopSizes[uTruth], vCover );
1805 pNodeNew->pData = Abc_SopCreateFromIsop( (Mem_Flex_t *)pNtkNew->pManFunc, pCut->nFanins, vCover );
1806 }
1807 else
1808 pNodeNew->pData = Abc_SopCreateFromIsop( (Mem_Flex_t *)pNtkNew->pManFunc, pCut->nFanins, pCut->vIsop[1] );
1809 // save the node
1810 pObj->pData = pNodeNew;
1811 }
1812 Vec_IntFree( vCover );
1813 // add the CO drivers
1814 Abc_NtkForEachCo( pNtk, pNode, i )
1815 {
1816 pObj = Aig_ManCo(p->pManAig, i);
1817 pNodeNew = Abc_ObjNotCond( (Abc_Obj_t *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0(pObj) );
1818 Abc_ObjAddFanin( pNode->pCopy, pNodeNew );
1819 }
1820
1821 // remove the constant node if not used
1822 pNodeNew = (Abc_Obj_t *)Aig_ManConst1(p->pManAig)->pData;
1823 if ( Abc_ObjFanoutNum(pNodeNew) == 0 )
1824 Abc_NtkDeleteObj( pNodeNew );
1825 // minimize the node
1826// Abc_NtkSweep( pNtkNew, 0 );
1827 // decouple the PO driver nodes to reduce the number of levels
1828 nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, 1 );
1829// if ( nDupGates && If_ManReadVerbose(pIfMan) )
1830// Abc_Print( 1, "Duplicated %d gates to decouple the CO drivers.\n", nDupGates );
1831 if ( !Abc_NtkCheck( pNtkNew ) )
1832 Abc_Print( 1, "Abc_NtkConstructFromCnf(): Network check has failed.\n" );
1833 return pNtkNew;
1834}
ABC_DLL void Abc_NtkDeleteObj(Abc_Obj_t *pObj)
Definition abcObj.c:170
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst1(Abc_Ntk_t *pNtk)
Definition abcObj.c:643
@ ABC_NTK_LOGIC
Definition abc.h:57
ABC_DLL int Abc_NtkLogicMakeSimpleCos(Abc_Ntk_t *pNtk, int fDuplicate)
Definition abcUtil.c:1080
ABC_DLL char * Abc_SopCreateFromIsop(Mem_Flex_t *pMan, int nVars, Vec_Int_t *vCover)
Definition abcSop.c:424
@ ABC_FUNC_SOP
Definition abc.h:65
ABC_DLL Abc_Ntk_t * Abc_NtkStartFrom(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
Definition abcNtk.c:157
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
void Cnf_SopConvertToVector(char *pSop, int nCubes, Vec_Int_t *vCover)
Definition cnfWrite.c:82
struct Cnf_Cut_t_ Cnf_Cut_t
Definition cnf.h:53
#define Cnf_CutForEachLeaf(p, pCut, pLeaf, i)
Definition cnf.h:121
struct Mem_Flex_t_ Mem_Flex_t
Definition mem.h:34
void * pData
Definition abc.h:145
Abc_Obj_t * pCopy
Definition abc.h:148
Vec_Int_t * vIsop[2]
Definition cnf.h:76
char nFanins
Definition cnf.h:73
Here is the call graph for this function:

◆ Abc_NtkCSweep()

Abc_Ntk_t * Abc_NtkCSweep ( Abc_Ntk_t * pNtk,
int nCutsMax,
int nLeafMax,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1523 of file abcDar.c.

1524{
1525// extern Aig_Man_t * Csw_Sweep( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, int fVerbose );
1526 Abc_Ntk_t * pNtkAig;
1527 Aig_Man_t * pMan, * pTemp;
1528 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1529 if ( pMan == NULL )
1530 return NULL;
1531 pMan = Csw_Sweep( pTemp = pMan, nCutsMax, nLeafMax, fVerbose );
1532 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1533 Aig_ManStop( pTemp );
1534 Aig_ManStop( pMan );
1535 return pNtkAig;
1536}
ABC_NAMESPACE_HEADER_START Aig_Man_t * Csw_Sweep(Aig_Man_t *pAig, int nCutsMax, int nLeafMax, int fVerbose)
INCLUDES ///.
Definition cswCore.c:45
Here is the call graph for this function:

◆ Abc_NtkDar()

Abc_Ntk_t * Abc_NtkDar ( Abc_Ntk_t * pNtk)

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1423 of file abcDar.c.

1424{
1425 Abc_Ntk_t * pNtkAig = NULL;
1426 Aig_Man_t * pMan;
1427 extern void Fra_ManPartitionTest( Aig_Man_t * p, int nComLim );
1428
1429 assert( Abc_NtkIsStrash(pNtk) );
1430 // convert to the AIG manager
1431 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1432 if ( pMan == NULL )
1433 return NULL;
1434
1435 // perform computation
1436// Fra_ManPartitionTest( pMan, 4 );
1437 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1438 Aig_ManStop( pMan );
1439
1440 // make sure everything is okay
1441 if ( pNtkAig && !Abc_NtkCheck( pNtkAig ) )
1442 {
1443 Abc_Print( 1, "Abc_NtkDar: The network check has failed.\n" );
1444 Abc_NtkDelete( pNtkAig );
1445 return NULL;
1446 }
1447 return pNtkAig;
1448}
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition abcNtk.c:1421
ABC_NAMESPACE_IMPL_START void Fra_ManPartitionTest(Aig_Man_t *p, int nComLim)
DECLARATIONS ///.
Definition fraPart.c:45
Here is the call graph for this function:

◆ Abc_NtkDarAbSec()

int Abc_NtkDarAbSec ( Abc_Ntk_t * pNtk1,
Abc_Ntk_t * pNtk2,
int nFrames,
int fVerbose )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 3157 of file abcDar.c.

3158{
3159 Aig_Man_t * pMan1, * pMan2 = NULL;
3160 int RetValue;
3161 // derive AIG manager
3162 pMan1 = Abc_NtkToDar( pNtk1, 0, 1 );
3163 if ( pMan1 == NULL )
3164 {
3165 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3166 return -1;
3167 }
3168 assert( Aig_ManRegNum(pMan1) > 0 );
3169 // derive AIG manager
3170 if ( pNtk2 )
3171 {
3172 pMan2 = Abc_NtkToDar( pNtk2, 0, 1 );
3173 if ( pMan2 == NULL )
3174 {
3175 Aig_ManStop( pMan1 );
3176 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3177 return -1;
3178 }
3179 assert( Aig_ManRegNum(pMan2) > 0 );
3180 if ( Saig_ManPiNum(pMan1) != Saig_ManPiNum(pMan2) )
3181 {
3182 Aig_ManStop( pMan1 );
3183 Aig_ManStop( pMan2 );
3184 Abc_Print( 1, "The networks have different number of PIs.\n" );
3185 return -1;
3186 }
3187 if ( Saig_ManPoNum(pMan1) != Saig_ManPoNum(pMan2) )
3188 {
3189 Aig_ManStop( pMan1 );
3190 Aig_ManStop( pMan2 );
3191 Abc_Print( 1, "The networks have different number of POs.\n" );
3192 return -1;
3193 }
3194 if ( Aig_ManRegNum(pMan1) != Aig_ManRegNum(pMan2) )
3195 {
3196 Aig_ManStop( pMan1 );
3197 Aig_ManStop( pMan2 );
3198 Abc_Print( 1, "The networks have different number of flops.\n" );
3199 return -1;
3200 }
3201 }
3202 // perform verification
3203 RetValue = Ssw_SecSpecialMiter( pMan1, pMan2, nFrames, fVerbose );
3204 Aig_ManStop( pMan1 );
3205 if ( pMan2 )
3206 Aig_ManStop( pMan2 );
3207 return RetValue;
3208}
int Ssw_SecSpecialMiter(Aig_Man_t *p0, Aig_Man_t *p1, int nFrames, int fVerbose)
Definition saigMiter.c:1161
Here is the call graph for this function:

◆ Abc_NtkDarAmap()

Abc_Ntk_t * Abc_NtkDarAmap ( Abc_Ntk_t * pNtk,
Amap_Par_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 4558 of file abcDar.c.

4559{
4560 extern Vec_Ptr_t * Amap_ManTest( Aig_Man_t * pAig, Amap_Par_t * pPars );
4561 Vec_Ptr_t * vMapping;
4562 Abc_Ntk_t * pNtkAig = NULL;
4563 Aig_Man_t * pMan;
4564 Aig_MmFlex_t * pMem;
4565
4566 assert( Abc_NtkIsStrash(pNtk) );
4567 // convert to the AIG manager
4568 pMan = Abc_NtkToDarChoices( pNtk );
4569 if ( pMan == NULL )
4570 return NULL;
4571
4572 // perform computation
4573 vMapping = Amap_ManTest( pMan, pPars );
4574 Aig_ManStop( pMan );
4575 if ( vMapping == NULL )
4576 return NULL;
4577 pMem = (Aig_MmFlex_t *)Vec_PtrPop( vMapping );
4578 pNtkAig = Amap_ManProduceNetwork( pNtk, vMapping );
4579 Aig_MmFlexStop( pMem, 0 );
4580 Vec_PtrFree( vMapping );
4581
4582 // make sure everything is okay
4583 if ( pNtkAig && !Abc_NtkCheck( pNtkAig ) )
4584 {
4585 Abc_Print( 1, "Abc_NtkDar: The network check has failed.\n" );
4586 Abc_NtkDelete( pNtkAig );
4587 return NULL;
4588 }
4589 return pNtkAig;
4590}
Aig_Man_t * Abc_NtkToDarChoices(Abc_Ntk_t *pNtk)
Definition abcDar.c:359
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START Abc_Ntk_t * Amap_ManProduceNetwork(Abc_Ntk_t *pNtk, Vec_Ptr_t *vMapping)
Definition abcDar.c:4498
void Aig_MmFlexStop(Aig_MmFlex_t *p, int fVerbose)
Definition aigMem.c:337
struct Aig_MmFlex_t_ Aig_MmFlex_t
Definition aig.h:53
Vec_Ptr_t * Amap_ManTest(Aig_Man_t *pAig, Amap_Par_t *pPars)
Definition amapCore.c:70
struct Amap_Par_t_ Amap_Par_t
Definition amap.h:44
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkDarBmc()

int Abc_NtkDarBmc ( Abc_Ntk_t * pNtk,
int nStart,
int nFrames,
int nSizeMax,
int nNodeDelta,
int nTimeOut,
int nBTLimit,
int nBTLimitAll,
int fRewrite,
int fNewAlgo,
int fOrDecomp,
int nCofFanLit,
int fVerbose,
int * piFrames,
int fUseSatoko )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2367 of file abcDar.c.

2368{
2369 Aig_Man_t * pMan;
2370 Vec_Int_t * vMap = NULL;
2371 int status, RetValue = -1;
2372 abctime clk = Abc_Clock();
2373 abctime nTimeLimit = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
2374 // derive the AIG manager
2375 if ( fOrDecomp )
2376 pMan = Abc_NtkToDarBmc( pNtk, &vMap );
2377 else
2378 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2379 if ( pMan == NULL )
2380 {
2381 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
2382 return RetValue;
2383 }
2384 assert( pMan->nRegs > 0 );
2385 assert( vMap == NULL || Vec_IntSize(vMap) == Saig_ManPoNum(pMan) );
2386 if ( fVerbose && vMap && Abc_NtkPoNum(pNtk) != Saig_ManPoNum(pMan) )
2387 Abc_Print( 1, "Expanded %d outputs into %d outputs using OR decomposition.\n", Abc_NtkPoNum(pNtk), Saig_ManPoNum(pMan) );
2388
2389 // perform verification
2390 if ( fNewAlgo ) // command 'bmc'
2391 {
2392 int iFrame;
2393 RetValue = Saig_ManBmcSimple( pMan, nFrames, nSizeMax, nBTLimit, fRewrite, fVerbose, &iFrame, nCofFanLit, fUseSatoko );
2394 if ( piFrames )
2395 *piFrames = iFrame;
2396 ABC_FREE( pNtk->pModel );
2397 ABC_FREE( pNtk->pSeqModel );
2398 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
2399 if ( RetValue == 1 )
2400 Abc_Print( 1, "Incorrect return value. " );
2401 else if ( RetValue == -1 )
2402 {
2403 Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(iFrame+1,0) );
2404 if ( nTimeLimit && Abc_Clock() > nTimeLimit )
2405 Abc_Print( 1, "(timeout %d sec). ", nTimeLimit );
2406 else
2407 Abc_Print( 1, "(conf limit %d). ", nBTLimit );
2408 }
2409 else // if ( RetValue == 0 )
2410 {
2411 Abc_Cex_t * pCex = pNtk->pSeqModel;
2412 Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pCex->iPo, pNtk->pName, pCex->iFrame );
2413 }
2414ABC_PRT( "Time", Abc_Clock() - clk );
2415 }
2416 else
2417 {
2418 RetValue = Saig_BmcPerform( pMan, nStart, nFrames, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fVerbose, 0, piFrames, 0, fUseSatoko );
2419 ABC_FREE( pNtk->pModel );
2420 ABC_FREE( pNtk->pSeqModel );
2421 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
2422 }
2423 // verify counter-example
2424 if ( pNtk->pSeqModel )
2425 {
2426 status = Saig_ManVerifyCex( pMan, pNtk->pSeqModel );
2427 if ( status == 0 )
2428 Abc_Print( 1, "Abc_NtkDarBmc(): Counter-example verification has FAILED.\n" );
2429 }
2430 Aig_ManStop( pMan );
2431 // update the counter-example
2432 if ( pNtk->pSeqModel && vMap )
2433 pNtk->pSeqModel->iPo = Vec_IntEntry( vMap, pNtk->pSeqModel->iPo );
2434 Vec_IntFreeP( &vMap );
2435 return RetValue;
2436}
Aig_Man_t * Abc_NtkToDarBmc(Abc_Ntk_t *pNtk, Vec_Int_t **pvMap)
Definition abcDar.c:115
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_PRT(a, t)
Definition abc_global.h:255
#define ABC_FREE(obj)
Definition abc_global.h:267
int Saig_BmcPerform(Aig_Man_t *pAig, int nStart, int nFramesMax, int nNodesMax, int nTimeOut, int nConfMaxOne, int nConfMaxAll, int fVerbose, int fVerbOverwrite, int *piFrames, int fSilent, int fUseSatoko)
Definition bmcBmc2.c:811
int Saig_ManBmcSimple(Aig_Man_t *pAig, int nFrames, int nSizeMax, int nBTLimit, int fRewrite, int fVerbose, int *piFrame, int nCofFanLit, int fUseSatoko)
Definition bmcBmc.c:207
int Saig_ManVerifyCex(Aig_Man_t *pAig, Abc_Cex_t *p)
Definition saigDup.c:281
char * pName
Definition abc.h:158
Abc_Cex_t * pSeqModel
Definition abc.h:199
int * pModel
Definition abc.h:198
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition utilCex.h:39
Here is the call graph for this function:

◆ Abc_NtkDarBmc3()

int Abc_NtkDarBmc3 ( Abc_Ntk_t * pNtk,
Saig_ParBmc_t * pPars,
int fOrDecomp )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 2449 of file abcDar.c.

2450{
2451 Aig_Man_t * pMan;
2452 Vec_Int_t * vMap = NULL;
2453 int status, RetValue = -1;
2454 abctime clk = Abc_Clock();
2455 abctime nTimeOut = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
2456 if ( fOrDecomp && !pPars->fSolveAll )
2457 pMan = Abc_NtkToDarBmc( pNtk, &vMap );
2458 else
2459 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2460 if ( pMan == NULL )
2461 {
2462 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
2463 return RetValue;
2464 }
2465 assert( pMan->nRegs > 0 );
2466 if ( pPars->fVerbose && vMap && Abc_NtkPoNum(pNtk) != Saig_ManPoNum(pMan) )
2467 Abc_Print( 1, "Expanded %d outputs into %d outputs using OR decomposition.\n", Abc_NtkPoNum(pNtk), Saig_ManPoNum(pMan) );
2468
2469 RetValue = Saig_ManBmcScalable( pMan, pPars );
2470 ABC_FREE( pNtk->pModel );
2471 ABC_FREE( pNtk->pSeqModel );
2472 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
2473 if ( !pPars->fSilent )
2474 {
2475 if ( RetValue == 1 )
2476 {
2477 Abc_Print( 1, "Explored all reachable states after completing %d frames. ", 1<<Aig_ManRegNum(pMan) );
2478 }
2479 else if ( RetValue == -1 )
2480 {
2481 if ( pPars->nFailOuts == 0 )
2482 {
2483 Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(pPars->iFrame+1,0) );
2484 if ( nTimeOut && Abc_Clock() > nTimeOut )
2485 Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
2486 else
2487 Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
2488 }
2489 else
2490 {
2491 Abc_Print( 1, "The total of %d outputs asserted in %d frames. Resource limit reached ", pPars->nFailOuts, pPars->iFrame );
2492 if ( Abc_Clock() > nTimeOut )
2493 Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
2494 else
2495 Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
2496 }
2497 }
2498 else // if ( RetValue == 0 )
2499 {
2500 if ( !pPars->fSolveAll )
2501 {
2502 Abc_Cex_t * pCex = pNtk->pSeqModel;
2503 Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pCex->iPo, pNtk->pName, pCex->iFrame );
2504 }
2505 else
2506 {
2507 int nOutputs = Saig_ManPoNum(pMan) - Saig_ManConstrNum(pMan);
2508 if ( pMan->vSeqModelVec == NULL || Vec_PtrCountZero(pMan->vSeqModelVec) == nOutputs )
2509 Abc_Print( 1, "None of the %d outputs is found to be SAT", nOutputs );
2510 else if ( Vec_PtrCountZero(pMan->vSeqModelVec) == 0 )
2511 Abc_Print( 1, "All %d outputs are found to be SAT", nOutputs );
2512 else
2513 {
2514 Abc_Print( 1, "Some outputs are SAT (%d out of %d)", nOutputs - Vec_PtrCountZero(pMan->vSeqModelVec), nOutputs );
2515 if ( pPars->nDropOuts )
2516 Abc_Print( 1, " while others timed out (%d out of %d)", pPars->nDropOuts, nOutputs );
2517 }
2518 Abc_Print( 1, " after %d frames", pPars->iFrame+2 );
2519 Abc_Print( 1, ". " );
2520 }
2521 }
2522 ABC_PRT( "Time", Abc_Clock() - clk );
2523 }
2524 if ( RetValue == 0 && pPars->fSolveAll )
2525 {
2526 if ( pNtk->vSeqModelVec )
2527 Vec_PtrFreeFree( pNtk->vSeqModelVec );
2528 pNtk->vSeqModelVec = pMan->vSeqModelVec; pMan->vSeqModelVec = NULL;
2529 }
2530 if ( pNtk->pSeqModel )
2531 {
2532 status = Saig_ManVerifyCex( pMan, pNtk->pSeqModel );
2533 if ( status == 0 )
2534 Abc_Print( 1, "Abc_NtkDarBmc3(): Counter-example verification has FAILED.\n" );
2535 }
2536 Aig_ManStop( pMan );
2537 // update the counter-example
2538 if ( pNtk->pSeqModel && vMap )
2539 pNtk->pSeqModel->iPo = Vec_IntEntry( vMap, pNtk->pSeqModel->iPo );
2540 Vec_IntFreeP( &vMap );
2541 return RetValue;
2542}
int Saig_ManBmcScalable(Aig_Man_t *pAig, Saig_ParBmc_t *pPars)
Definition bmcBmc3.c:1461
Vec_Ptr_t * vSeqModelVec
Definition abc.h:200
int nTimeOut
Definition bmc.h:113
int fVerbose
Definition bmc.h:129
int nConfLimit
Definition bmc.h:110
int fSolveAll
Definition bmc.h:117
int nDropOuts
Definition bmc.h:135
int nFailOuts
Definition bmc.h:134
int fSilent
Definition bmc.h:132
int iFrame
Definition bmc.h:133
Here is the call graph for this function:

◆ Abc_NtkDarBmcInter()

int Abc_NtkDarBmcInter ( Abc_Ntk_t * pNtk,
Inter_ManParams_t * pPars,
Abc_Ntk_t ** ppNtkRes )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2664 of file abcDar.c.

2665{
2666 Aig_Man_t * pMan;
2667 int RetValue;
2668 if ( ppNtkRes )
2669 *ppNtkRes = NULL;
2670 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2671 if ( pMan == NULL )
2672 {
2673 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
2674 return -1;
2675 }
2676 if ( pPars->fUseSeparate && ppNtkRes )
2677 {
2678 Aig_Man_t * pManNew;
2679 RetValue = Abc_NtkDarBmcInter_int( pMan, pPars, &pManNew );
2680 *ppNtkRes = Abc_NtkFromAigPhase( pManNew );
2681 Aig_ManStop( pManNew );
2682 }
2683 else
2684 {
2685 RetValue = Abc_NtkDarBmcInter_int( pMan, pPars, NULL );
2686 }
2687 ABC_FREE( pNtk->pModel );
2688 ABC_FREE( pNtk->pSeqModel );
2689 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
2690 Aig_ManStop( pMan );
2691 return RetValue;
2692}
int Abc_NtkDarBmcInter_int(Aig_Man_t *pMan, Inter_ManParams_t *pPars, Aig_Man_t **ppNtkRes)
Definition abcDar.c:2555
Abc_Ntk_t * Abc_NtkFromAigPhase(Aig_Man_t *pMan)
DECLARATIONS ///.
Definition abcDar.c:595
Here is the call graph for this function:

◆ Abc_NtkDarBmcInter_int()

int Abc_NtkDarBmcInter_int ( Aig_Man_t * pMan,
Inter_ManParams_t * pPars,
Aig_Man_t ** ppNtkRes )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2555 of file abcDar.c.

2556{
2557 int RetValue = -1, iFrame;
2558 abctime clk = Abc_Clock();
2559 int nTotalProvedSat = 0;
2560 assert( pMan->nRegs > 0 );
2561 if ( ppNtkRes )
2562 *ppNtkRes = NULL;
2563 if ( pPars->fUseSeparate )
2564 {
2565 Aig_Man_t * pTemp, * pAux;
2566 Aig_Obj_t * pObjPo;
2567 int i, Counter = 0;
2568 Saig_ManForEachPo( pMan, pObjPo, i )
2569 {
2570 if ( Aig_ObjFanin0(pObjPo) == Aig_ManConst1(pMan) )
2571 continue;
2572 if ( pPars->fVerbose )
2573 Abc_Print( 1, "Solving output %2d (out of %2d):\n", i, Saig_ManPoNum(pMan) );
2574 pTemp = Aig_ManDupOneOutput( pMan, i, 1 );
2575 pTemp = Aig_ManScl( pAux = pTemp, 1, 1, 0, -1, -1, 0, 0 );
2576 Aig_ManStop( pAux );
2577 if ( Aig_ManRegNum(pTemp) == 0 )
2578 {
2579 pTemp->pSeqModel = NULL;
2580 RetValue = Fra_FraigSat( pTemp, pPars->nBTLimit, 0, 0, 0, 0, 0, 0, 0, 0 );
2581 if ( pTemp->pData )
2582 pTemp->pSeqModel = Abc_CexCreate( Aig_ManRegNum(pMan), Saig_ManPiNum(pMan), (int *)pTemp->pData, 0, i, 1 );
2583// pNtk->pModel = pTemp->pData, pTemp->pData = NULL;
2584 }
2585 else
2586 RetValue = Inter_ManPerformInterpolation( pTemp, pPars, &iFrame );
2587 if ( pTemp->pSeqModel )
2588 {
2589 if ( pPars->fDropSatOuts )
2590 {
2591 Abc_Print( 1, "Output %d proved SAT in frame %d (replacing by const 0 and continuing...)\n", i, pTemp->pSeqModel->iFrame );
2592 Aig_ObjPatchFanin0( pMan, pObjPo, Aig_ManConst0(pMan) );
2593 Aig_ManStop( pTemp );
2594 nTotalProvedSat++;
2595 continue;
2596 }
2597 else
2598 {
2599 Abc_Cex_t * pCex;
2600 pCex = pMan->pSeqModel = pTemp->pSeqModel; pTemp->pSeqModel = NULL;
2601 pCex->iPo = i;
2602 Aig_ManStop( pTemp );
2603 break;
2604 }
2605 }
2606 // if solved, remove the output
2607 if ( RetValue == 1 )
2608 {
2609 Aig_ObjPatchFanin0( pMan, pObjPo, Aig_ManConst0(pMan) );
2610// Abc_Print( 1, "Output %3d : Solved ", i );
2611 }
2612 else
2613 {
2614 Counter++;
2615// Abc_Print( 1, "Output %3d : Undec ", i );
2616 }
2617// Aig_ManPrintStats( pTemp );
2618 Aig_ManStop( pTemp );
2619 Abc_Print( 1, "Solving output %3d (out of %3d) using interpolation.\r", i, Saig_ManPoNum(pMan) );
2620 }
2621 Aig_ManCleanup( pMan );
2622 if ( pMan->pSeqModel == NULL )
2623 {
2624 Abc_Print( 1, "Interpolation left %d (out of %d) outputs unsolved \n", Counter, Saig_ManPoNum(pMan) );
2625 if ( Counter )
2626 RetValue = -1;
2627 }
2628 if ( ppNtkRes )
2629 {
2630 pTemp = Aig_ManDupUnsolvedOutputs( pMan, 1 );
2631 *ppNtkRes = Aig_ManScl( pTemp, 1, 1, 0, -1, -1, 0, 0 );
2632 Aig_ManStop( pTemp );
2633 }
2634 }
2635 else
2636 {
2637 RetValue = Inter_ManPerformInterpolation( pMan, pPars, &iFrame );
2638 }
2639 if ( nTotalProvedSat )
2640 Abc_Print( 1, "The total of %d outputs proved SAT and replaced by const 0 in this run.\n", nTotalProvedSat );
2641 if ( RetValue == 1 )
2642 Abc_Print( 1, "Property proved. " );
2643 else if ( RetValue == 0 )
2644 Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pMan->pSeqModel ? pMan->pSeqModel->iPo : -1, pMan->pName, iFrame );
2645 else if ( RetValue == -1 )
2646 Abc_Print( 1, "Property UNDECIDED. " );
2647 else
2648 assert( 0 );
2649ABC_PRT( "Time", Abc_Clock() - clk );
2650 return RetValue;
2651}
int Aig_ManCleanup(Aig_Man_t *p)
Definition aigMan.c:265
void Aig_ObjPatchFanin0(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pFaninNew)
Definition aigObj.c:282
Aig_Man_t * Aig_ManDupUnsolvedOutputs(Aig_Man_t *p, int fAddRegs)
Definition aigDup.c:1199
Aig_Man_t * Aig_ManDupOneOutput(Aig_Man_t *p, int iPoNum, int fAddRegs)
Definition aigDup.c:1152
Aig_Man_t * Aig_ManScl(Aig_Man_t *pAig, int fLatchConst, int fLatchEqual, int fUseMvSweep, int nFramesSymb, int nFramesSatur, int fVerbose, int fVeryVerbose)
Definition aigScl.c:650
int Fra_FraigSat(Aig_Man_t *pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fFlipBits, int fAndOuts, int fNewSolver, int fVerbose)
ITERATORS ///.
Definition fraCec.c:47
int Inter_ManPerformInterpolation(Aig_Man_t *pAig, Inter_ManParams_t *pPars, int *piFrame)
Definition intCore.c:79
#define Saig_ManForEachPo(p, pObj, i)
Definition saig.h:93
Abc_Cex_t * Abc_CexCreate(int nRegs, int nPis, int *pArray, int iFrame, int iPo, int fSkipRegs)
Definition utilCex.c:110
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkDarCec()

int Abc_NtkDarCec ( Abc_Ntk_t * pNtk1,
Abc_Ntk_t * pNtk2,
int nConfLimit,
int fPartition,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1965 of file abcDar.c.

1966{
1967 Aig_Man_t * pMan, * pMan1, * pMan2;
1968 Abc_Ntk_t * pMiter;
1969 int RetValue;
1970 abctime clkTotal = Abc_Clock();
1971/*
1972 {
1973 extern void Cec_ManVerifyTwoAigs( Aig_Man_t * pAig0, Aig_Man_t * pAig1, int fVerbose );
1974 Aig_Man_t * pAig0 = Abc_NtkToDar( pNtk1, 0, 0 );
1975 Aig_Man_t * pAig1 = Abc_NtkToDar( pNtk2, 0, 0 );
1976 Cec_ManVerifyTwoAigs( pAig0, pAig1, 1 );
1977 Aig_ManStop( pAig0 );
1978 Aig_ManStop( pAig1 );
1979 return 1;
1980 }
1981*/
1982 // cannot partition if it is already a miter
1983 if ( pNtk2 == NULL && fPartition == 1 )
1984 {
1985 Abc_Print( 1, "Abc_NtkDarCec(): Switching to non-partitioned CEC for the miter.\n" );
1986 fPartition = 0;
1987 }
1988
1989 // if partitioning is selected, call partitioned CEC
1990 if ( fPartition )
1991 {
1992 pMan1 = Abc_NtkToDar( pNtk1, 0, 0 );
1993 pMan2 = Abc_NtkToDar( pNtk2, 0, 0 );
1994 RetValue = Fra_FraigCecPartitioned( pMan1, pMan2, nConfLimit, 100, 1, fVerbose );
1995 Aig_ManStop( pMan1 );
1996 Aig_ManStop( pMan2 );
1997 goto finish;
1998 }
1999
2000 if ( pNtk2 != NULL )
2001 {
2002 // get the miter of the two networks
2003 pMiter = Abc_NtkMiter( pNtk1, pNtk2, 0, 0, 0, 0 );
2004 if ( pMiter == NULL )
2005 {
2006 Abc_Print( 1, "Miter computation has failed.\n" );
2007 return 0;
2008 }
2009 }
2010 else
2011 {
2012 pMiter = Abc_NtkDup( pNtk1 );
2013 }
2014 RetValue = Abc_NtkMiterIsConstant( pMiter );
2015 if ( RetValue == 0 )
2016 {
2017// extern void Abc_NtkVerifyReportErrorSeq( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int * pModel, int nFrames );
2018 Abc_Print( 1, "Networks are NOT EQUIVALENT after structural hashing.\n" );
2019 // report the error
2020 if ( pNtk2 == NULL )
2021 pNtk1->pModel = Abc_NtkVerifyGetCleanModel( pNtk1, 1 );
2022// pMiter->pModel = Abc_NtkVerifyGetCleanModel( pMiter, nFrames );
2023// Abc_NtkVerifyReportErrorSeq( pNtk1, pNtk2, pMiter->pModel, nFrames );
2024// ABC_FREE( pMiter->pModel );
2025 Abc_NtkDelete( pMiter );
2026 return 0;
2027 }
2028 if ( RetValue == 1 )
2029 {
2030 Abc_NtkDelete( pMiter );
2031 Abc_Print( 1, "Networks are equivalent after structural hashing.\n" );
2032 return 1;
2033 }
2034
2035 // derive the AIG manager
2036 pMan = Abc_NtkToDar( pMiter, 0, 0 );
2037 Abc_NtkDelete( pMiter );
2038 if ( pMan == NULL )
2039 {
2040 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
2041 return -1;
2042 }
2043 // perform verification
2044 RetValue = Fra_FraigCec( &pMan, 100000, fVerbose );
2045 // transfer model if given
2046 if ( pNtk2 == NULL )
2047 pNtk1->pModel = (int *)pMan->pData, pMan->pData = NULL;
2048 Aig_ManStop( pMan );
2049
2050finish:
2051 // report the miter
2052 if ( RetValue == 1 )
2053 {
2054 Abc_Print( 1, "Networks are equivalent. " );
2055ABC_PRT( "Time", Abc_Clock() - clkTotal );
2056 }
2057 else if ( RetValue == 0 )
2058 {
2059 Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
2060ABC_PRT( "Time", Abc_Clock() - clkTotal );
2061 }
2062 else
2063 {
2064 Abc_Print( 1, "Networks are UNDECIDED. " );
2065ABC_PRT( "Time", Abc_Clock() - clkTotal );
2066 }
2067 fflush( stdout );
2068 return RetValue;
2069}
ABC_DLL int * Abc_NtkVerifyGetCleanModel(Abc_Ntk_t *pNtk, int nFrames)
Definition abcVerify.c:678
ABC_DLL Abc_Ntk_t * Abc_NtkMiter(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int fComb, int nPartSize, int fImplic, int fMulti)
FUNCTION DEFINITIONS ///.
Definition abcMiter.c:59
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
Definition abcNtk.c:472
ABC_DLL int Abc_NtkMiterIsConstant(Abc_Ntk_t *pMiter)
Definition abcMiter.c:682
int Fra_FraigCecPartitioned(Aig_Man_t *pMan1, Aig_Man_t *pMan2, int nConfLimit, int nPartSize, int fSmart, int fVerbose)
Definition fraCec.c:451
int Fra_FraigCec(Aig_Man_t **ppAig, int nConfLimit, int fVerbose)
Definition fraCec.c:320
Here is the call graph for this function:

◆ Abc_NtkDarClau()

int Abc_NtkDarClau ( Abc_Ntk_t * pNtk,
int nFrames,
int nPref,
int nClauses,
int nLutSize,
int nLevels,
int nCutsMax,
int nBatches,
int fStepUp,
int fBmc,
int fRefs,
int fTarget,
int fVerbose,
int fVeryVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3707 of file abcDar.c.

3708{
3709 extern int Fra_Clau( Aig_Man_t * pMan, int nIters, int fVerbose, int fVeryVerbose );
3710 extern int Fra_Claus( Aig_Man_t * pAig, int nFrames, int nPref, int nClauses, int nLutSize, int nLevels, int nCutsMax, int nBatches, int fStepUp, int fBmc, int fRefs, int fTarget, int fVerbose, int fVeryVerbose );
3711 Aig_Man_t * pMan;
3712 if ( fTarget && Abc_NtkPoNum(pNtk) != 1 )
3713 {
3714 Abc_Print( 1, "The number of outputs should be 1.\n" );
3715 return 1;
3716 }
3717 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3718 if ( pMan == NULL )
3719 return 1;
3720// Aig_ManReduceLachesCount( pMan );
3721 if ( pMan->vFlopNums )
3722 Vec_IntFree( pMan->vFlopNums );
3723 pMan->vFlopNums = NULL;
3724
3725// Fra_Clau( pMan, nStepsMax, fVerbose, fVeryVerbose );
3726 Fra_Claus( pMan, nFrames, nPref, nClauses, nLutSize, nLevels, nCutsMax, nBatches, fStepUp, fBmc, fRefs, fTarget, fVerbose, fVeryVerbose );
3727 Aig_ManStop( pMan );
3728 return 1;
3729}
int Fra_Clau(Aig_Man_t *pMan, int nIters, int fVerbose, int fVeryVerbose)
Definition fraClau.c:637
int Fra_Claus(Aig_Man_t *pAig, int nFrames, int nPref, int nClausesMax, int nLutSize, int nLevels, int nCutsMax, int nBatches, int fStepUp, int fBmc, int fRefs, int fTarget, int fVerbose, int fVeryVerbose)
Definition fraClaus.c:1682
Here is the call graph for this function:

◆ Abc_NtkDarCleanupAig()

Abc_Ntk_t * Abc_NtkDarCleanupAig ( Abc_Ntk_t * pNtk,
int fCleanupPis,
int fCleanupPos,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4427 of file abcDar.c.

4428{
4429 Abc_Ntk_t * pNtkAig;
4430 Aig_Man_t * pMan;
4431 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4432 if ( pMan == NULL )
4433 return NULL;
4434 if ( fCleanupPis )
4435 {
4436 int Temp = Aig_ManCiCleanup( pMan );
4437 if ( fVerbose )
4438 Abc_Print( 1, "Cleanup removed %d primary inputs without fanout.\n", Temp );
4439 }
4440 if ( fCleanupPos )
4441 {
4442 int Temp = Aig_ManCoCleanup( pMan );
4443 if ( fVerbose )
4444 Abc_Print( 1, "Cleanup removed %d primary outputs driven by const-0.\n", Temp );
4445 }
4446 pNtkAig = Abc_NtkFromAigPhase( pMan );
4447 pNtkAig->pName = Extra_UtilStrsav(pNtk->pName);
4448 pNtkAig->pSpec = Extra_UtilStrsav(pNtk->pSpec);
4449 Aig_ManStop( pMan );
4450 return pNtkAig;
4451}
int Aig_ManCoCleanup(Aig_Man_t *p)
Definition aigMan.c:345
int Aig_ManCiCleanup(Aig_Man_t *p)
Definition aigMan.c:314
char * pSpec
Definition abc.h:159
Here is the call graph for this function:

◆ Abc_NtkDarClockGate()

Abc_Ntk_t * Abc_NtkDarClockGate ( Abc_Ntk_t * pNtk,
Abc_Ntk_t * pCare,
Cgt_Par_t * pPars )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4237 of file abcDar.c.

4238{
4239 Abc_Ntk_t * pNtkAig;
4240 Aig_Man_t * pMan1, * pMan2 = NULL, * pMan;
4241 pMan1 = Abc_NtkToDar( pNtk, 0, 1 );
4242 if ( pMan1 == NULL )
4243 return NULL;
4244 if ( pCare )
4245 {
4246 pMan2 = Abc_NtkToDar( pCare, 0, 0 );
4247 if ( pMan2 == NULL )
4248 {
4249 Aig_ManStop( pMan1 );
4250 return NULL;
4251 }
4252 }
4253 pMan = Cgt_ClockGating( pMan1, pMan2, pPars );
4254 Aig_ManStop( pMan1 );
4255 if ( pMan2 )
4256 Aig_ManStop( pMan2 );
4257 if ( pMan == NULL )
4258 return NULL;
4259 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
4260 Aig_ManStop( pMan );
4261 return pNtkAig;
4262}
Aig_Man_t * Cgt_ClockGating(Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars)
Definition cgtCore.c:298
Here is the call graph for this function:

◆ Abc_NtkDarConstr()

void Abc_NtkDarConstr ( Abc_Ntk_t * pNtk,
int nFrames,
int nConfs,
int nProps,
int fStruct,
int fOldAlgo,
int fVerbose )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4603 of file abcDar.c.

4604{
4605 Aig_Man_t * pMan;//, * pMan2;//, * pTemp;
4606 assert( Abc_NtkIsStrash(pNtk) );
4607 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4608 if ( pMan == NULL )
4609 return;
4610 if ( fStruct )
4612 else
4613 Saig_ManDetectConstrFuncTest( pMan, nFrames, nConfs, nProps, fOldAlgo, fVerbose );
4614 Aig_ManStop( pMan );
4615}
int Saig_ManDetectConstrTest(Aig_Man_t *p)
Definition saigConstr.c:469
void Saig_ManDetectConstrFuncTest(Aig_Man_t *p, int nFrames, int nConfs, int nProps, int fOldAlgo, int fVerbose)
Here is the call graph for this function:

◆ Abc_NtkDarConstrProfile()

void Abc_NtkDarConstrProfile ( Abc_Ntk_t * pNtk,
int fVerbose )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4719 of file abcDar.c.

4720{
4721 extern int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerbose );
4722 extern Vec_Int_t * Saig_ManComputeSwitchProbs( Aig_Man_t * p, int nFrames, int nPref, int fProbOne );
4723 Aig_Man_t * pMan;
4724// Vec_Int_t * vProbOne;
4725// Aig_Obj_t * pObj;
4726// int i, Entry;
4727 assert( Abc_NtkIsStrash(pNtk) );
4728 assert( Abc_NtkConstrNum(pNtk) );
4729 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4730 if ( pMan == NULL )
4731 return;
4732 // value in the init state
4733// Abc_AigSetNodePhases( pNtk );
4734/*
4735 // derive probabilities
4736 vProbOne = Saig_ManComputeSwitchProbs( pMan, 48, 16, 1 );
4737 // iterate over the constraint outputs
4738 Saig_ManForEachPo( pMan, pObj, i )
4739 {
4740 Entry = Vec_IntEntry( vProbOne, Aig_ObjId(pObj) );
4741 if ( i < Saig_ManPoNum(pMan) - Saig_ManConstrNum(pMan) )
4742 Abc_Print( 1, "Primary output : ", i );
4743 else
4744 Abc_Print( 1, "Constraint %3d : ", i-(Saig_ManPoNum(pMan) - Saig_ManConstrNum(pMan)) );
4745 Abc_Print( 1, "ProbOne = %f ", Abc_Int2Float(Entry) );
4746 Abc_Print( 1, "AllZeroValue = %d ", Aig_ObjPhase(pObj) );
4747 Abc_Print( 1, "\n" );
4748 }
4749*/
4750 // double-check
4751 Ssw_ManProfileConstraints( pMan, 16, 64, 1 );
4752 Abc_Print( 1, "TwoFrameSatValue = %d.\n", Ssw_ManSetConstrPhases(pMan, 2, NULL) );
4753 // clean up
4754// Vec_IntFree( vProbOne );
4755 Aig_ManStop( pMan );
4756}
int nWords
Definition abcNpn.c:127
Vec_Int_t * Saig_ManComputeSwitchProbs(Aig_Man_t *pAig, int nFrames, int nPref, int fProbOne)
Definition giaSwitch.c:711
int Ssw_ManProfileConstraints(Aig_Man_t *p, int nWords, int nFrames, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition saigConstr2.c:56
int Ssw_ManSetConstrPhases(Aig_Man_t *p, int nFrames, Vec_Int_t **pvInits)
Definition sswConstr.c:100
Here is the call graph for this function:

◆ Abc_NtkDarDemiter()

int Abc_NtkDarDemiter ( Abc_Ntk_t * pNtk)

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2705 of file abcDar.c.

2706{
2707 char * pFileNameGeneric, pFileName0[1000], pFileName1[1000];
2708 Aig_Man_t * pMan, * pPart0, * pPart1;//, * pMiter;
2709 // derive the AIG manager
2710 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2711 if ( pMan == NULL )
2712 {
2713 Abc_Print( 1, "Converting network into AIG has failed.\n" );
2714 return 0;
2715 }
2716// if ( !Saig_ManDemiterSimple( pMan, &pPart0, &pPart1 ) )
2717 if ( !Saig_ManDemiterSimpleDiff( pMan, &pPart0, &pPart1 ) )
2718 {
2719 Aig_ManStop( pMan );
2720 Abc_Print( 1, "Demitering has failed.\n" );
2721 return 0;
2722 }
2723 // create file names
2724 pFileNameGeneric = Extra_FileNameGeneric( pNtk->pSpec ? pNtk->pSpec : pNtk->pName );
2725// sprintf( pFileName0, "%s%s", pFileNameGeneric, "_part0.aig" );
2726// sprintf( pFileName1, "%s%s", pFileNameGeneric, "_part1.aig" );
2727 sprintf( pFileName0, "%s", "part0.aig" );
2728 sprintf( pFileName1, "%s", "part1.aig" );
2729 ABC_FREE( pFileNameGeneric );
2730 // dump files
2731 Ioa_WriteAiger( pPart0, pFileName0, 0, 0 );
2732 Ioa_WriteAiger( pPart1, pFileName1, 0, 0 );
2733 Abc_Print( 1, "Demitering produced two files \"%s\" and \"%s\".\n", pFileName0, pFileName1 );
2734 // create two-level miter
2735// pMiter = Saig_ManCreateMiterTwo( pPart0, pPart1, 2 );
2736// Aig_ManDumpBlif( pMiter, "miter01.blif", NULL, NULL );
2737// Aig_ManStop( pMiter );
2738// Abc_Print( 1, "The new miter is written into file \"%s\".\n", "miter01.blif" );
2739 Aig_ManStop( pPart0 );
2740 Aig_ManStop( pPart1 );
2741 Aig_ManStop( pMan );
2742 return 1;
2743}
char * Extra_FileNameGeneric(char *FileName)
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
int Saig_ManDemiterSimpleDiff(Aig_Man_t *p, Aig_Man_t **ppAig0, Aig_Man_t **ppAig1)
Definition saigMiter.c:660
char * sprintf()
Here is the call graph for this function:

◆ Abc_NtkDarDemiterDual()

int Abc_NtkDarDemiterDual ( Abc_Ntk_t * pNtk,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2809 of file abcDar.c.

2810{
2811 char * pFileNameGeneric, pFileName0[1000], pFileName1[1000];
2812 Aig_Man_t * pMan, * pPart0, * pPart1;//, * pMiter;
2813 if ( (Abc_NtkPoNum(pNtk) & 1) )
2814 {
2815 Abc_Print( 1, "The number of POs should be even.\n" );
2816 return 0;
2817 }
2818 // derive the AIG manager
2819 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2820 if ( pMan == NULL )
2821 {
2822 Abc_Print( 1, "Converting network into AIG has failed.\n" );
2823 return 0;
2824 }
2825// if ( !Saig_ManDemiterSimple( pMan, &pPart0, &pPart1 ) )
2826 if ( !Saig_ManDemiterDual( pMan, &pPart0, &pPart1 ) )
2827 {
2828 Abc_Print( 1, "Demitering has failed.\n" );
2829 return 0;
2830 }
2831 // create new AIG
2832 ABC_FREE( pPart0->pName );
2833 pPart0->pName = Abc_UtilStrsav( "part0" );
2834 // create new AIGs
2835 ABC_FREE( pPart1->pName );
2836 pPart1->pName = Abc_UtilStrsav( "part1" );
2837 // create file names
2838 pFileNameGeneric = Extra_FileNameGeneric( pNtk->pSpec );
2839// sprintf( pFileName0, "%s%s", pFileNameGeneric, "_part0.aig" );
2840// sprintf( pFileName1, "%s%s", pFileNameGeneric, "_part1.aig" );
2841 sprintf( pFileName0, "%s", "part0.aig" );
2842 sprintf( pFileName1, "%s", "part1.aig" );
2843 ABC_FREE( pFileNameGeneric );
2844 Ioa_WriteAiger( pPart0, pFileName0, 0, 0 );
2845 Ioa_WriteAiger( pPart1, pFileName1, 0, 0 );
2846 Abc_Print( 1, "Demitering produced two files \"%s\" and \"%s\".\n", pFileName0, pFileName1 );
2847 // dump files
2848 if ( fVerbose )
2849 {
2850// Abc_Print( 1, "Init: " );
2851 Aig_ManPrintStats( pMan );
2852// Abc_Print( 1, "Part1: " );
2853 Aig_ManPrintStats( pPart0 );
2854// Abc_Print( 1, "Part2: " );
2855 Aig_ManPrintStats( pPart1 );
2856 }
2857 // create two-level miter
2858// pMiter = Saig_ManCreateMiterTwo( pPart0, pPart1, 2 );
2859// Aig_ManDumpBlif( pMiter, "miter01.blif", NULL, NULL );
2860// Aig_ManStop( pMiter );
2861// Abc_Print( 1, "The new miter is written into file \"%s\".\n", "miter01.blif" );
2862 Aig_ManStop( pPart0 );
2863 Aig_ManStop( pPart1 );
2864 Aig_ManStop( pMan );
2865 return 1;
2866}
void Aig_ManPrintStats(Aig_Man_t *p)
Definition aigMan.c:379
int Saig_ManDemiterDual(Aig_Man_t *p, Aig_Man_t **ppAig0, Aig_Man_t **ppAig1)
Definition saigMiter.c:708
Here is the call graph for this function:

◆ Abc_NtkDarDemiterNew()

int Abc_NtkDarDemiterNew ( Abc_Ntk_t * pNtk)

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2756 of file abcDar.c.

2757{
2758 char * pFileNameGeneric, pFileName0[1000], pFileName1[1000];
2759 Aig_Man_t * pMan, * pPart0, * pPart1;//, * pMiter;
2760 // derive the AIG manager
2761 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2762 if ( pMan == NULL )
2763 {
2764 Abc_Print( 1, "Converting network into AIG has failed.\n" );
2765 return 0;
2766 }
2767
2768 Saig_ManDemiterNew( pMan );
2769 Aig_ManStop( pMan );
2770 return 1;
2771
2772// if ( !Saig_ManDemiterSimple( pMan, &pPart0, &pPart1 ) )
2773 if ( !Saig_ManDemiterSimpleDiff( pMan, &pPart0, &pPart1 ) )
2774 {
2775 Abc_Print( 1, "Demitering has failed.\n" );
2776 return 0;
2777 }
2778 // create file names
2779 pFileNameGeneric = Extra_FileNameGeneric( pNtk->pSpec );
2780 sprintf( pFileName0, "%s%s", pFileNameGeneric, "_part0.aig" );
2781 sprintf( pFileName1, "%s%s", pFileNameGeneric, "_part1.aig" );
2782 ABC_FREE( pFileNameGeneric );
2783 // dump files
2784 Ioa_WriteAiger( pPart0, pFileName0, 0, 0 );
2785 Ioa_WriteAiger( pPart1, pFileName1, 0, 0 );
2786 Abc_Print( 1, "Demitering produced two files \"%s\" and \"%s\".\n", pFileName0, pFileName1 );
2787 // create two-level miter
2788// pMiter = Saig_ManCreateMiterTwo( pPart0, pPart1, 2 );
2789// Aig_ManDumpBlif( pMiter, "miter01.blif", NULL, NULL );
2790// Aig_ManStop( pMiter );
2791// Abc_Print( 1, "The new miter is written into file \"%s\".\n", "miter01.blif" );
2792 Aig_ManStop( pPart0 );
2793 Aig_ManStop( pPart1 );
2794 Aig_ManStop( pMan );
2795 return 1;
2796}
int Saig_ManDemiterNew(Aig_Man_t *pMan)
Definition saigMiter.c:1230
Here is the call graph for this function:

◆ Abc_NtkDarEnlarge()

Abc_Ntk_t * Abc_NtkDarEnlarge ( Abc_Ntk_t * pNtk,
int nFrames,
int fVerbose )

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

Synopsis [Performs targe enlargement.]

Description []

SideEffects []

SeeAlso []

Definition at line 3742 of file abcDar.c.

3743{
3744 Abc_Ntk_t * pNtkAig;
3745 Aig_Man_t * pMan, * pTemp;
3746 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3747 if ( pMan == NULL )
3748 return NULL;
3749 pMan = Aig_ManFrames( pTemp = pMan, nFrames, 0, 1, 1, 1, NULL );
3750 Aig_ManStop( pTemp );
3751 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3752 Aig_ManStop( pMan );
3753 return pNtkAig;
3754}
Abc_Ntk_t * Abc_NtkFromDarSeqSweep(Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
Definition abcDar.c:473
Aig_Man_t * Aig_ManFrames(Aig_Man_t *pAig, int nFs, int fInit, int fOuts, int fRegs, int fEnlarge, Aig_Obj_t ***ppObjMap)
FUNCTION DEFINITIONS ///.
Definition aigFrames.c:51
Here is the call graph for this function:

◆ Abc_NtkDarExtWin()

Abc_Ntk_t * Abc_NtkDarExtWin ( Abc_Ntk_t * pNtk,
int nObjId,
int nDist,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4275 of file abcDar.c.

4276{
4277 Abc_Ntk_t * pNtkAig;
4278 Aig_Man_t * pMan1, * pMan;
4279 Aig_Obj_t * pObj;
4280 pMan1 = Abc_NtkToDar( pNtk, 0, 1 );
4281 if ( pMan1 == NULL )
4282 return NULL;
4283 if ( nObjId == -1 )
4284 {
4285 pObj = Saig_ManFindPivot( pMan1 );
4286 Abc_Print( 1, "Selected object %d as a window pivot.\n", pObj->Id );
4287 }
4288 else
4289 {
4290 if ( nObjId >= Aig_ManObjNumMax(pMan1) )
4291 {
4292 Aig_ManStop( pMan1 );
4293 Abc_Print( 1, "The ID is too large.\n" );
4294 return NULL;
4295 }
4296 pObj = Aig_ManObj( pMan1, nObjId );
4297 if ( pObj == NULL )
4298 {
4299 Aig_ManStop( pMan1 );
4300 Abc_Print( 1, "Object with ID %d does not exist.\n", nObjId );
4301 return NULL;
4302 }
4303 if ( !Saig_ObjIsLo(pMan1, pObj) && !Aig_ObjIsNode(pObj) )
4304 {
4305 Aig_ManStop( pMan1 );
4306 Abc_Print( 1, "Object with ID %d is not a node or reg output.\n", nObjId );
4307 return NULL;
4308 }
4309 }
4310 pMan = Saig_ManWindowExtract( pMan1, pObj, nDist );
4311 Aig_ManStop( pMan1 );
4312 if ( pMan == NULL )
4313 return NULL;
4314 pNtkAig = Abc_NtkFromAigPhase( pMan );
4315 pNtkAig->pName = Extra_UtilStrsav(pNtk->pName);
4316 pNtkAig->pSpec = Extra_UtilStrsav(pNtk->pSpec);
4317 Aig_ManStop( pMan );
4318 return pNtkAig;
4319}
Aig_Obj_t * Saig_ManFindPivot(Aig_Man_t *p)
Definition saigWnd.c:427
Aig_Man_t * Saig_ManWindowExtract(Aig_Man_t *p, Aig_Obj_t *pObj, int nDist)
Definition saigWnd.c:465
int Id
Definition aig.h:85
Here is the call graph for this function:

◆ Abc_NtkDarFold()

Abc_Ntk_t * Abc_NtkDarFold ( Abc_Ntk_t * pNtk,
int fCompl,
int fVerbose,
int fSeqCleanup )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4691 of file abcDar.c.

4692{
4693 Abc_Ntk_t * pNtkAig;
4694 Aig_Man_t * pMan, * pTemp;
4695 assert( Abc_NtkIsStrash(pNtk) );
4696 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4697 if ( pMan == NULL )
4698 return NULL;
4699 pMan = Saig_ManDupFoldConstrsFunc( pTemp = pMan, fCompl, fVerbose, fSeqCleanup );
4700 Aig_ManStop( pTemp );
4701 pNtkAig = Abc_NtkFromAigPhase( pMan );
4702 pNtkAig->pName = Extra_UtilStrsav(pMan->pName);
4703 pNtkAig->pSpec = Extra_UtilStrsav(pMan->pSpec);
4704 Aig_ManStop( pMan );
4705 return pNtkAig;
4706}
Aig_Man_t * Saig_ManDupFoldConstrsFunc(Aig_Man_t *pAig, int fCompl, int fVerbose, int fSeqCleanup)
Here is the call graph for this function:

◆ Abc_NtkDarFraig()

Abc_Ntk_t * Abc_NtkDarFraig ( Abc_Ntk_t * pNtk,
int nConfLimit,
int fDoSparse,
int fProve,
int fTransfer,
int fSpeculate,
int fChoicing,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1462 of file abcDar.c.

1463{
1464 Fra_Par_t Pars, * pPars = &Pars;
1465 Abc_Ntk_t * pNtkAig;
1466 Aig_Man_t * pMan, * pTemp;
1467 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1468 if ( pMan == NULL )
1469 return NULL;
1470 Fra_ParamsDefault( pPars );
1471 pPars->nBTLimitNode = nConfLimit;
1472 pPars->fChoicing = fChoicing;
1473 pPars->fDoSparse = fDoSparse;
1474 pPars->fSpeculate = fSpeculate;
1475 pPars->fProve = fProve;
1476 pPars->fVerbose = fVerbose;
1477 pMan = Fra_FraigPerform( pTemp = pMan, pPars );
1478 if ( fChoicing )
1479 pNtkAig = Abc_NtkFromDarChoices( pNtk, pMan );
1480 else
1481 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1482 Aig_ManStop( pTemp );
1483 Aig_ManStop( pMan );
1484 return pNtkAig;
1485}
Abc_Ntk_t * Abc_NtkFromDarChoices(Abc_Ntk_t *pNtkOld, Aig_Man_t *pMan)
Definition abcDar.c:1208
typedefABC_NAMESPACE_HEADER_START struct Fra_Par_t_ Fra_Par_t
INCLUDES ///.
Definition fra.h:53
Aig_Man_t * Fra_FraigPerform(Aig_Man_t *pManAig, Fra_Par_t *pPars)
Definition fraCore.c:375
void Fra_ParamsDefault(Fra_Par_t *pParams)
DECLARATIONS ///.
Definition fraMan.c:45
Here is the call graph for this function:

◆ Abc_NtkDarFraigPart()

Abc_Ntk_t * Abc_NtkDarFraigPart ( Abc_Ntk_t * pNtk,
int nPartSize,
int nConfLimit,
int nLevelMax,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1498 of file abcDar.c.

1499{
1500 Abc_Ntk_t * pNtkAig;
1501 Aig_Man_t * pMan, * pTemp;
1502 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1503 if ( pMan == NULL )
1504 return NULL;
1505 pMan = Aig_ManFraigPartitioned( pTemp = pMan, nPartSize, nConfLimit, nLevelMax, fVerbose );
1506 Aig_ManStop( pTemp );
1507 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1508 Aig_ManStop( pMan );
1509 return pNtkAig;
1510}
Aig_Man_t * Aig_ManFraigPartitioned(Aig_Man_t *pAig, int nPartSize, int nConfMax, int nLevelMax, int fVerbose)
Definition aigPart.c:1379
Here is the call graph for this function:

◆ Abc_NtkDarFrames()

Abc_Ntk_t * Abc_NtkDarFrames ( Abc_Ntk_t * pNtk,
int nPrefix,
int nFrames,
int fInit,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4398 of file abcDar.c.

4399{
4400 Abc_Ntk_t * pNtkAig;
4401 Aig_Man_t * pMan, * pTemp;
4402 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4403 if ( pMan == NULL )
4404 return NULL;
4405 pMan = Saig_ManTimeframeSimplify( pTemp = pMan, nPrefix, nFrames, fInit, fVerbose );
4406 Aig_ManStop( pTemp );
4407 if ( pMan == NULL )
4408 return NULL;
4409 pNtkAig = Abc_NtkFromAigPhase( pMan );
4410 pNtkAig->pName = Extra_UtilStrsav(pNtk->pName);
4411 pNtkAig->pSpec = Extra_UtilStrsav(pNtk->pSpec);
4412 Aig_ManStop( pMan );
4413 return pNtkAig;
4414}
Aig_Man_t * Saig_ManTimeframeSimplify(Aig_Man_t *pAig, int nFrames, int nFramesMax, int fInit, int fVerbose)
Definition saigTrans.c:378
Here is the call graph for this function:

◆ Abc_NtkDarInduction()

int Abc_NtkDarInduction ( Abc_Ntk_t * pNtk,
int nTimeOut,
int nFramesMax,
int nConfMax,
int fUnique,
int fUniqueAll,
int fGetCex,
int fVerbose,
int fVeryVerbose )

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

Synopsis [Performs induction for property only.]

Description []

SideEffects []

SeeAlso []

Definition at line 3795 of file abcDar.c.

3796{
3797 Aig_Man_t * pMan;
3798 abctime clkTotal = Abc_Clock();
3799 int RetValue;
3800 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3801 if ( pMan == NULL )
3802 return -1;
3803 RetValue = Saig_ManInduction( pMan, nTimeOut, nFramesMax, nConfMax, fUnique, fUniqueAll, fGetCex, fVerbose, fVeryVerbose );
3804 if ( RetValue == 1 )
3805 {
3806 Abc_Print( 1, "Networks are equivalent. " );
3807ABC_PRT( "Time", Abc_Clock() - clkTotal );
3808 }
3809 else if ( RetValue == 0 )
3810 {
3811 Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
3812ABC_PRT( "Time", Abc_Clock() - clkTotal );
3813 }
3814 else
3815 {
3816 Abc_Print( 1, "Networks are UNDECIDED. " );
3817ABC_PRT( "Time", Abc_Clock() - clkTotal );
3818 }
3819 if ( fGetCex )
3820 {
3821 ABC_FREE( pNtk->pModel );
3822 ABC_FREE( pNtk->pSeqModel );
3823 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
3824 }
3825 Aig_ManStop( pMan );
3826 return RetValue;
3827}
int Saig_ManInduction(Aig_Man_t *p, int nTimeOut, int nFramesMax, int nConfMax, int fUnique, int fUniqueAll, int fGetCex, int fVerbose, int fVeryVerbose)
Definition saigInd.c:149
Here is the call graph for this function:

◆ Abc_NtkDarInsWin()

Abc_Ntk_t * Abc_NtkDarInsWin ( Abc_Ntk_t * pNtk,
Abc_Ntk_t * pCare,
int nObjId,
int nDist,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4332 of file abcDar.c.

4333{
4334 Abc_Ntk_t * pNtkAig;
4335 Aig_Man_t * pMan1, * pMan2 = NULL, * pMan;
4336 Aig_Obj_t * pObj;
4337 pMan1 = Abc_NtkToDar( pNtk, 0, 1 );
4338 if ( pMan1 == NULL )
4339 return NULL;
4340 if ( nObjId == -1 )
4341 {
4342 pObj = Saig_ManFindPivot( pMan1 );
4343 Abc_Print( 1, "Selected object %d as a window pivot.\n", pObj->Id );
4344 }
4345 else
4346 {
4347 if ( nObjId >= Aig_ManObjNumMax(pMan1) )
4348 {
4349 Aig_ManStop( pMan1 );
4350 Abc_Print( 1, "The ID is too large.\n" );
4351 return NULL;
4352 }
4353 pObj = Aig_ManObj( pMan1, nObjId );
4354 if ( pObj == NULL )
4355 {
4356 Aig_ManStop( pMan1 );
4357 Abc_Print( 1, "Object with ID %d does not exist.\n", nObjId );
4358 return NULL;
4359 }
4360 if ( !Saig_ObjIsLo(pMan1, pObj) && !Aig_ObjIsNode(pObj) )
4361 {
4362 Aig_ManStop( pMan1 );
4363 Abc_Print( 1, "Object with ID %d is not a node or reg output.\n", nObjId );
4364 return NULL;
4365 }
4366 }
4367 if ( pCare )
4368 {
4369 pMan2 = Abc_NtkToDar( pCare, 0, 0 );
4370 if ( pMan2 == NULL )
4371 {
4372 Aig_ManStop( pMan1 );
4373 return NULL;
4374 }
4375 }
4376 pMan = Saig_ManWindowInsert( pMan1, pObj, nDist, pMan2 );
4377 Aig_ManStop( pMan1 );
4378 if ( pMan2 )
4379 Aig_ManStop( pMan2 );
4380 if ( pMan == NULL )
4381 return NULL;
4382 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
4383 Aig_ManStop( pMan );
4384 return pNtkAig;
4385}
Aig_Man_t * Saig_ManWindowInsert(Aig_Man_t *p, Aig_Obj_t *pObj, int nDist, Aig_Man_t *pWnd)
Definition saigWnd.c:488
Here is the call graph for this function:

◆ Abc_NtkDarLatchSweep()

Abc_Ntk_t * Abc_NtkDarLatchSweep ( Abc_Ntk_t * pNtk,
int fLatchConst,
int fLatchEqual,
int fSaveNames,
int fUseMvSweep,
int nFramesSymb,
int nFramesSatur,
int fVerbose,
int fVeryVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3317 of file abcDar.c.

3318{
3319 extern void Aig_ManPrintControlFanouts( Aig_Man_t * p );
3320 Abc_Ntk_t * pNtkAig;
3321 Aig_Man_t * pMan, * pTemp;
3322 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3323 if ( pMan == NULL )
3324 return NULL;
3325 if ( fSaveNames )
3326 {
3327 Aig_ManSeqCleanup( pMan );
3328 if ( fLatchConst && pMan->nRegs )
3329 pMan = Aig_ManConstReduce( pMan, fUseMvSweep, nFramesSymb, nFramesSatur, fVerbose, fVeryVerbose );
3330 if ( fLatchEqual && pMan->nRegs )
3331 pMan = Aig_ManReduceLaches( pMan, fVerbose );
3332 }
3333 else
3334 {
3335 if ( pMan->vFlopNums )
3336 Vec_IntFree( pMan->vFlopNums );
3337 pMan->vFlopNums = NULL;
3338 pMan = Aig_ManScl( pTemp = pMan, fLatchConst, fLatchEqual, fUseMvSweep, nFramesSymb, nFramesSatur, fVerbose, fVeryVerbose );
3339 Aig_ManStop( pTemp );
3340 }
3341
3342 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3343//Aig_ManPrintControlFanouts( pMan );
3344 Aig_ManStop( pMan );
3345 return pNtkAig;
3346}
void Aig_ManPrintControlFanouts(Aig_Man_t *p)
Definition aigUtil.c:1040
int Aig_ManSeqCleanup(Aig_Man_t *p)
Definition aigScl.c:158
Aig_Man_t * Aig_ManReduceLaches(Aig_Man_t *p, int fVerbose)
Definition aigScl.c:455
Aig_Man_t * Aig_ManConstReduce(Aig_Man_t *p, int fUseMvSweep, int nFramesSymb, int nFramesSatur, int fVerbose, int fVeryVerbose)
Definition aigTsim.c:498
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkDarLcorr()

Abc_Ntk_t * Abc_NtkDarLcorr ( Abc_Ntk_t * pNtk,
int nFramesP,
int nConfMax,
int fVerbose )

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

Synopsis [Computes latch correspondence.]

Description []

SideEffects []

SeeAlso []

Definition at line 2274 of file abcDar.c.

2275{
2276 Aig_Man_t * pMan, * pTemp;
2277 Abc_Ntk_t * pNtkAig = NULL;
2278 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2279 if ( pMan == NULL )
2280 return NULL;
2281 pMan = Fra_FraigLatchCorrespondence( pTemp = pMan, nFramesP, nConfMax, 0, fVerbose, NULL, 0.0 );
2282 Aig_ManStop( pTemp );
2283 if ( pMan )
2284 {
2285 if ( Aig_ManRegNum(pMan) < Abc_NtkLatchNum(pNtk) )
2286 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
2287 else
2288 {
2289 Abc_Obj_t * pObj;
2290 int i;
2291 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
2292 Abc_NtkForEachLatch( pNtkAig, pObj, i )
2293 Abc_LatchSetInit0( pObj );
2294 }
2295 Aig_ManStop( pMan );
2296 }
2297 return pNtkAig;
2298}
#define Abc_NtkForEachLatch(pNtk, pObj, i)
Definition abc.h:500
Aig_Man_t * Fra_FraigLatchCorrespondence(Aig_Man_t *pAig, int nFramesP, int nConfMax, int fProve, int fVerbose, int *pnIter, float TimeLimit)
Definition fraLcr.c:531
Here is the call graph for this function:

◆ Abc_NtkDarLcorrNew()

Abc_Ntk_t * Abc_NtkDarLcorrNew ( Abc_Ntk_t * pNtk,
int nVarsMax,
int nConfMax,
int nLimitMax,
int fVerbose )

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

Synopsis [Computes latch correspondence.]

Description []

SideEffects []

SeeAlso []

Definition at line 2311 of file abcDar.c.

2312{
2313 Ssw_Pars_t Pars, * pPars = &Pars;
2314 Aig_Man_t * pMan, * pTemp;
2315 Abc_Ntk_t * pNtkAig = NULL;
2316 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2317 if ( pMan == NULL )
2318 return NULL;
2319 Ssw_ManSetDefaultParams( pPars );
2320 pPars->fLatchCorrOpt = 1;
2321 pPars->nBTLimit = nConfMax;
2322 pPars->nSatVarMax = nVarsMax;
2323 pPars->nLimitMax = nLimitMax;
2324 pPars->fVerbose = fVerbose;
2325 pMan = Ssw_SignalCorrespondence( pTemp = pMan, pPars );
2326 Aig_ManStop( pTemp );
2327 if ( pMan )
2328 {
2329 if ( Aig_ManRegNum(pMan) < Abc_NtkLatchNum(pNtk) )
2330 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
2331 else
2332 {
2333 Abc_Obj_t * pObj;
2334 int i;
2335 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
2336 Abc_NtkForEachLatch( pNtkAig, pObj, i )
2337 Abc_LatchSetInit0( pObj );
2338 }
2339 Aig_ManStop( pMan );
2340 }
2341 return pNtkAig;
2342}
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
Here is the call graph for this function:

◆ Abc_NtkDarMatch()

Abc_Ntk_t * Abc_NtkDarMatch ( Abc_Ntk_t * pNtk1,
Abc_Ntk_t * pNtk2,
int nDist,
int fVerbose )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 3265 of file abcDar.c.

3266{
3267 extern Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDist, int fVerbose, Aig_Man_t ** ppMiter );
3268 Abc_Ntk_t * pNtkAig;
3269 Aig_Man_t * pMan1, * pMan2 = NULL, * pManRes;
3270 Vec_Int_t * vPairs;
3271 assert( Abc_NtkIsStrash(pNtk1) );
3272 // derive AIG manager
3273 pMan1 = Abc_NtkToDar( pNtk1, 0, 1 );
3274 if ( pMan1 == NULL )
3275 {
3276 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3277 return NULL;
3278 }
3279 assert( Aig_ManRegNum(pMan1) > 0 );
3280 // derive AIG manager
3281 if ( pNtk2 )
3282 {
3283 pMan2 = Abc_NtkToDar( pNtk2, 0, 1 );
3284 if ( pMan2 == NULL )
3285 {
3286 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3287 return NULL;
3288 }
3289 assert( Aig_ManRegNum(pMan2) > 0 );
3290 }
3291
3292 // perform verification
3293 vPairs = Saig_StrSimPerformMatching( pMan1, pMan2, nDist, 1, &pManRes );
3294 pNtkAig = Abc_NtkFromAigPhase( pManRes );
3295 if ( vPairs )
3296 Vec_IntFree( vPairs );
3297 if ( pManRes )
3298 Aig_ManStop( pManRes );
3299 Aig_ManStop( pMan1 );
3300 if ( pMan2 )
3301 Aig_ManStop( pMan2 );
3302 return pNtkAig;
3303}
Vec_Int_t * Saig_StrSimPerformMatching(Aig_Man_t *p0, Aig_Man_t *p1, int nDist, int fVerbose, Aig_Man_t **ppMiter)
Definition saigStrSim.c:873
Here is the call graph for this function:

◆ Abc_NtkDarOutdec()

Abc_Ntk_t * Abc_NtkDarOutdec ( Abc_Ntk_t * pNtk,
int nLits,
int fVerbose )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4628 of file abcDar.c.

4629{
4630 Abc_Ntk_t * pNtkAig;
4631 Aig_Man_t * pMan, * pTemp;
4632 assert( Abc_NtkIsStrash(pNtk) );
4633 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4634 if ( pMan == NULL )
4635 return NULL;
4636 pMan = Saig_ManDecPropertyOutput( pTemp = pMan, nLits, fVerbose );
4637 Aig_ManStop( pTemp );
4638 if ( pMan == NULL )
4639 return NULL;
4640 pNtkAig = Abc_NtkFromAigPhase( pMan );
4641 pNtkAig->pName = Extra_UtilStrsav(pMan->pName);
4642 pNtkAig->pSpec = Extra_UtilStrsav(pMan->pSpec);
4643 Aig_ManStop( pMan );
4644 return pNtkAig;
4645}
Aig_Man_t * Saig_ManDecPropertyOutput(Aig_Man_t *pAig, int nLits, int fVerbose)
Definition saigOutDec.c:150
Here is the call graph for this function:

◆ Abc_NtkDarPdr()

int Abc_NtkDarPdr ( Abc_Ntk_t * pNtk,
Pdr_Par_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3079 of file abcDar.c.

3080{
3081 int RetValue = -1;
3082 abctime clk = Abc_Clock();
3083 Aig_Man_t * pMan;
3084 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3085 if ( pMan == NULL )
3086 {
3087 Abc_Print( 1, "Converting network into AIG has failed.\n" );
3088 return -1;
3089 }
3090 RetValue = Pdr_ManSolve( pMan, pPars );
3091 pPars->nDropOuts = Saig_ManPoNum(pMan) - pPars->nProveOuts - pPars->nFailOuts;
3092 if ( !pPars->fSilent )
3093 {
3094 if ( pPars->fSolveAll )
3095 Abc_Print( 1, "Properties: All = %d. Proved = %d. Disproved = %d. Undecided = %d. ",
3096 Saig_ManPoNum(pMan), pPars->nProveOuts, pPars->nFailOuts, pPars->nDropOuts );
3097 else if ( RetValue == 1 )
3098 Abc_Print( 1, "Property proved. " );
3099 else
3100 {
3101 if ( RetValue == 0 )
3102 {
3103 if ( pMan->pSeqModel == NULL )
3104 Abc_Print( 1, "Abc_NtkDarPdr(): Counter-example is not available.\n" );
3105 else
3106 {
3107 Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pMan->pSeqModel->iPo, pNtk->pName, pMan->pSeqModel->iFrame );
3108 if ( !Saig_ManVerifyCex( pMan, pMan->pSeqModel ) )
3109 Abc_Print( 1, "Abc_NtkDarPdr(): Counter-example verification has FAILED.\n" );
3110 }
3111 }
3112 else if ( RetValue == -1 )
3113 Abc_Print( 1, "Property UNDECIDED. " );
3114 else
3115 assert( 0 );
3116 }
3117 ABC_PRT( "Time", Abc_Clock() - clk );
3118/*
3119 Abc_Print( 1, "Status: " );
3120 if ( pPars->pOutMap )
3121 {
3122 int i;
3123 for ( i = 0; i < Saig_ManPoNum(pMan); i++ )
3124 if ( pPars->pOutMap[i] == 1 )
3125 Abc_Print( 1, "%d=%s ", i, "unsat" );
3126 else if ( pPars->pOutMap[i] == 0 )
3127 Abc_Print( 1, "%d=%s ", i, "sat" );
3128 else if ( pPars->pOutMap[i] < 0 )
3129 Abc_Print( 1, "%d=%s ", i, "undec" );
3130 else assert( 0 );
3131 }
3132 Abc_Print( 1, "\n" );
3133*/
3134 }
3135 ABC_FREE( pNtk->pSeqModel );
3136 pNtk->pSeqModel = pMan->pSeqModel;
3137 pMan->pSeqModel = NULL;
3138 if ( pNtk->vSeqModelVec )
3139 Vec_PtrFreeFree( pNtk->vSeqModelVec );
3140 pNtk->vSeqModelVec = pMan->vSeqModelVec;
3141 pMan->vSeqModelVec = NULL;
3142 Aig_ManStop( pMan );
3143 return RetValue;
3144}
int Pdr_ManSolve(Aig_Man_t *p, Pdr_Par_t *pPars)
Definition pdrCore.c:1765
Here is the call graph for this function:

◆ Abc_NtkDarPrintCone()

int Abc_NtkDarPrintCone ( Abc_Ntk_t * pNtk)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 4054 of file abcDar.c.

4055{
4056 extern void Saig_ManPrintCones( Aig_Man_t * pAig );
4057 Aig_Man_t * pMan;
4058 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4059 if ( pMan == NULL )
4060 return 0;
4061 assert( Aig_ManRegNum(pMan) > 0 );
4062 Saig_ManPrintCones( pMan );
4063 Aig_ManStop( pMan );
4064 return 1;
4065}
void Saig_ManPrintCones(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition saigCone.c:159
Here is the call graph for this function:

◆ Abc_NtkDarProve()

int Abc_NtkDarProve ( Abc_Ntk_t * pNtk,
Fra_Sec_t * pSecPar,
int nBmcFramesMax,
int nBmcConfMax )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2879 of file abcDar.c.

2880{
2881 Aig_Man_t * pMan;
2882 int iFrame = -1, RetValue = -1;
2883 abctime clkTotal = Abc_Clock();
2884 if ( pSecPar->fTryComb || Abc_NtkLatchNum(pNtk) == 0 )
2885 {
2886 Prove_Params_t Params, * pParams = &Params;
2887 Abc_Ntk_t * pNtkComb;
2888 int RetValue;
2889 if ( Abc_NtkLatchNum(pNtk) == 0 )
2890 Abc_Print( 1, "The network has no latches. Running CEC.\n" );
2891 // create combinational network
2892 pNtkComb = Abc_NtkDup( pNtk );
2893 Abc_NtkMakeComb( pNtkComb, 1 );
2894 // solve it using combinational equivalence checking
2895 Prove_ParamsSetDefault( pParams );
2896 pParams->fVerbose = 1;
2897 RetValue = Abc_NtkIvyProve( &pNtkComb, pParams );
2898 // transfer model if given
2899// pNtk->pModel = pNtkComb->pModel; pNtkComb->pModel = NULL;
2900 if ( RetValue == 0 && (Abc_NtkLatchNum(pNtk) == 0) )
2901 {
2902 pNtk->pModel = pNtkComb->pModel; pNtkComb->pModel = NULL;
2903 if ( pSecPar->fReportSolution )
2904 Abc_Print( 1, "SOLUTION: FAIL " );
2905 else
2906 Abc_Print( 1, "SATISFIABLE " );
2907 ABC_PRT( "Time", Abc_Clock() - clkTotal );
2908 return RetValue;
2909 }
2910 Abc_NtkDelete( pNtkComb );
2911 // return the result, if solved
2912 if ( RetValue == 1 )
2913 {
2914 if ( pSecPar->fReportSolution )
2915 Abc_Print( 1, "SOLUTION: PASS " );
2916 else
2917 Abc_Print( 1, "UNSATISFIABLE " );
2918 ABC_PRT( "Time", Abc_Clock() - clkTotal );
2919 return RetValue;
2920 }
2921 // return undecided, if the miter is combinational
2922 if ( Abc_NtkLatchNum(pNtk) == 0 )
2923 {
2924 Abc_Print( 1, "UNDECIDED " );
2925 ABC_PRT( "Time", Abc_Clock() - clkTotal );
2926 return RetValue;
2927 }
2928 }
2929 // derive the AIG manager
2930 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2931 if ( pMan == NULL )
2932 {
2933 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
2934 return -1;
2935 }
2936 assert( pMan->nRegs > 0 );
2937
2938 if ( pSecPar->fTryBmc )
2939 {
2940 RetValue = Saig_BmcPerform( pMan, 0, nBmcFramesMax, 2000, 0, nBmcConfMax, 0, pSecPar->fVerbose, 0, &iFrame, 0, 0 );
2941 if ( RetValue == 0 )
2942 {
2943 Abc_Print( 1, "Networks are not equivalent.\n" );
2944 if ( pSecPar->fReportSolution )
2945 {
2946 Abc_Print( 1, "SOLUTION: FAIL " );
2947 ABC_PRT( "Time", Abc_Clock() - clkTotal );
2948 }
2949 // return the counter-example generated
2950 ABC_FREE( pNtk->pModel );
2951 ABC_FREE( pNtk->pSeqModel );
2952 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
2953 Aig_ManStop( pMan );
2954 return RetValue;
2955 }
2956 }
2957 // perform verification
2958 if ( pSecPar->fUseNewProver )
2959 {
2960 RetValue = Ssw_SecGeneralMiter( pMan, NULL );
2961 }
2962 else
2963 {
2964 RetValue = Fra_FraigSec( pMan, pSecPar, NULL );
2965 ABC_FREE( pNtk->pModel );
2966 ABC_FREE( pNtk->pSeqModel );
2967 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
2968 if ( pNtk->pSeqModel )
2969 {
2970 Abc_Cex_t * pCex = pNtk->pSeqModel;
2971 Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d.\n", pCex->iPo, pNtk->pName, pCex->iFrame );
2972 if ( !Saig_ManVerifyCex( pMan, pNtk->pSeqModel ) )
2973 Abc_Print( 1, "Abc_NtkDarProve(): Counter-example verification has FAILED.\n" );
2974 }
2975 }
2976 Aig_ManStop( pMan );
2977 return RetValue;
2978}
ABC_DLL int Abc_NtkIvyProve(Abc_Ntk_t **ppNtk, void *pPars)
Definition abcIvy.c:503
ABC_DLL void Abc_NtkMakeComb(Abc_Ntk_t *pNtk, int fRemoveLatches)
Definition abcNtk.c:1637
int Fra_FraigSec(Aig_Man_t *p, Fra_Sec_t *pParSec, Aig_Man_t **ppResult)
Definition fraSec.c:118
void Prove_ParamsSetDefault(Prove_Params_t *pParams)
FUNCTION DEFINITIONS ///.
Definition fraigMan.c:46
struct Prove_ParamsStruct_t_ Prove_Params_t
Definition ivyFraig.c:108
int Ssw_SecGeneralMiter(Aig_Man_t *pMiter, Ssw_Pars_t *pPars)
Definition sswPairs.c:452
int fVerbose
Definition fra.h:139
int fTryBmc
Definition fra.h:117
int fUseNewProver
Definition fra.h:136
int fReportSolution
Definition fra.h:146
int fTryComb
Definition fra.h:116
Here is the call graph for this function:

◆ Abc_NtkDarReach()

int Abc_NtkDarReach ( Abc_Ntk_t * pNtk,
Saig_ParBbr_t * pPars )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4464 of file abcDar.c.

4465{
4466 Aig_Man_t * pMan;
4467 int RetValue;
4468 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4469 if ( pMan == NULL )
4470 return -1;
4471 RetValue = Aig_ManVerifyUsingBdds( pMan, pPars );
4472 ABC_FREE( pNtk->pModel );
4473 ABC_FREE( pNtk->pSeqModel );
4474 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
4475 Aig_ManStop( pMan );
4476 return RetValue;
4477}
int Aig_ManVerifyUsingBdds(Aig_Man_t *pInit, Saig_ParBbr_t *pPars)
Definition saigDup.c:592
Here is the call graph for this function:

◆ Abc_NtkDarRetime()

Abc_Ntk_t * Abc_NtkDarRetime ( Abc_Ntk_t * pNtk,
int nStepsMax,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3359 of file abcDar.c.

3360{
3361 Abc_Ntk_t * pNtkAig;
3362 Aig_Man_t * pMan, * pTemp;
3363 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3364 if ( pMan == NULL )
3365 return NULL;
3366// Aig_ManReduceLachesCount( pMan );
3367 if ( pMan->vFlopNums )
3368 Vec_IntFree( pMan->vFlopNums );
3369 pMan->vFlopNums = NULL;
3370
3371 pMan = Rtm_ManRetime( pTemp = pMan, 1, nStepsMax, fVerbose );
3372 Aig_ManStop( pTemp );
3373
3374// pMan = Aig_ManReduceLaches( pMan, 1 );
3375// pMan = Aig_ManConstReduce( pMan, 1, 0 );
3376
3377 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3378 Aig_ManStop( pMan );
3379 return pNtkAig;
3380}
Aig_Man_t * Rtm_ManRetime(Aig_Man_t *p, int fForward, int nStepsMax, int fVerbose)
Definition aigRet.c:834
Here is the call graph for this function:

◆ Abc_NtkDarRetimeF()

Abc_Ntk_t * Abc_NtkDarRetimeF ( Abc_Ntk_t * pNtk,
int nStepsMax,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3393 of file abcDar.c.

3394{
3395 Abc_Ntk_t * pNtkAig;
3396 Aig_Man_t * pMan, * pTemp;
3397 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3398 if ( pMan == NULL )
3399 return NULL;
3400// Aig_ManReduceLachesCount( pMan );
3401 if ( pMan->vFlopNums )
3402 Vec_IntFree( pMan->vFlopNums );
3403 pMan->vFlopNums = NULL;
3404
3405 pMan = Aig_ManRetimeFrontier( pTemp = pMan, nStepsMax );
3406 Aig_ManStop( pTemp );
3407
3408// pMan = Aig_ManReduceLaches( pMan, 1 );
3409// pMan = Aig_ManConstReduce( pMan, 1, 0 );
3410
3411 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3412 Aig_ManStop( pMan );
3413 return pNtkAig;
3414}
Aig_Man_t * Aig_ManRetimeFrontier(Aig_Man_t *p, int nStepsMax)
Definition aigRetF.c:125
Here is the call graph for this function:

◆ Abc_NtkDarRetimeMinArea()

Abc_Ntk_t * Abc_NtkDarRetimeMinArea ( Abc_Ntk_t * pNtk,
int nMaxIters,
int fForwardOnly,
int fBackwardOnly,
int fInitial,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3463 of file abcDar.c.

3464{
3465 extern Aig_Man_t * Saig_ManRetimeMinArea( Aig_Man_t * p, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose );
3466 Abc_Ntk_t * pNtkAig;
3467 Aig_Man_t * pMan, * pTemp;
3468 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3469 if ( pMan == NULL )
3470 return NULL;
3471 if ( pMan->vFlopNums )
3472 Vec_IntFree( pMan->vFlopNums );
3473 pMan->vFlopNums = NULL;
3474
3475 pMan = Saig_ManRetimeMinArea( pTemp = pMan, nMaxIters, fForwardOnly, fBackwardOnly, fInitial, fVerbose );
3476 Aig_ManStop( pTemp );
3477
3478 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3479 Aig_ManStop( pMan );
3480 return pNtkAig;
3481}
Aig_Man_t * Saig_ManRetimeMinArea(Aig_Man_t *p, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose)
Definition saigRetMin.c:623
Here is the call graph for this function:

◆ Abc_NtkDarRetimeMostFwd()

Abc_Ntk_t * Abc_NtkDarRetimeMostFwd ( Abc_Ntk_t * pNtk,
int nMaxIters,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3427 of file abcDar.c.

3428{
3429 extern Aig_Man_t * Saig_ManRetimeForward( Aig_Man_t * p, int nIters, int fVerbose );
3430
3431 Abc_Ntk_t * pNtkAig;
3432 Aig_Man_t * pMan, * pTemp;
3433 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3434 if ( pMan == NULL )
3435 return NULL;
3436// Aig_ManReduceLachesCount( pMan );
3437 if ( pMan->vFlopNums )
3438 Vec_IntFree( pMan->vFlopNums );
3439 pMan->vFlopNums = NULL;
3440
3441 pMan = Saig_ManRetimeForward( pTemp = pMan, nMaxIters, fVerbose );
3442 Aig_ManStop( pTemp );
3443
3444// pMan = Aig_ManReduceLaches( pMan, 1 );
3445// pMan = Aig_ManConstReduce( pMan, 1, 0 );
3446
3447 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3448 Aig_ManStop( pMan );
3449 return pNtkAig;
3450}
Aig_Man_t * Saig_ManRetimeForward(Aig_Man_t *p, int nMaxIters, int fVerbose)
Definition saigRetFwd.c:213
Here is the call graph for this function:

◆ Abc_NtkDarRetimeStep()

Abc_Ntk_t * Abc_NtkDarRetimeStep ( Abc_Ntk_t * pNtk,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3494 of file abcDar.c.

3495{
3496 Abc_Ntk_t * pNtkAig;
3497 Aig_Man_t * pMan;
3498 assert( Abc_NtkIsStrash(pNtk) );
3499 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3500 if ( pMan == NULL )
3501 return NULL;
3502 if ( pMan->vFlopNums )
3503 Vec_IntFree( pMan->vFlopNums );
3504 pMan->vFlopNums = NULL;
3505
3506 Aig_ManPrintStats(pMan);
3507 Saig_ManRetimeSteps( pMan, 1000, 1, 0 );
3508 Aig_ManPrintStats(pMan);
3509
3510 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
3511 Aig_ManStop( pMan );
3512 return pNtkAig;
3513}
int Saig_ManRetimeSteps(Aig_Man_t *p, int nSteps, int fForward, int fAddBugs)
Here is the call graph for this function:

◆ Abc_NtkDarSec()

int Abc_NtkDarSec ( Abc_Ntk_t * pNtk1,
Abc_Ntk_t * pNtk2,
Fra_Sec_t * pSecPar )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2991 of file abcDar.c.

2992{
2993// Fraig_Params_t Params;
2994 Aig_Man_t * pMan;
2995 Abc_Ntk_t * pMiter;//, * pTemp;
2996 int RetValue;
2997
2998 // get the miter of the two networks
2999 pMiter = Abc_NtkMiter( pNtk1, pNtk2, 0, 0, 0, 0 );
3000 if ( pMiter == NULL )
3001 {
3002 Abc_Print( 1, "Miter computation has failed.\n" );
3003 return -1;
3004 }
3005 RetValue = Abc_NtkMiterIsConstant( pMiter );
3006 if ( RetValue == 0 )
3007 {
3008 extern void Abc_NtkVerifyReportErrorSeq( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int * pModel, int nFrames );
3009 Abc_Print( 1, "Networks are NOT EQUIVALENT after structural hashing.\n" );
3010 // report the error
3011 pMiter->pModel = Abc_NtkVerifyGetCleanModel( pMiter, pSecPar->nFramesMax );
3012// Abc_NtkVerifyReportErrorSeq( pNtk1, pNtk2, pMiter->pModel, pSecPar->nFramesMax );
3013 ABC_FREE( pMiter->pModel );
3014 Abc_NtkDelete( pMiter );
3015 return 0;
3016 }
3017 if ( RetValue == 1 )
3018 {
3019 Abc_NtkDelete( pMiter );
3020 Abc_Print( 1, "Networks are equivalent after structural hashing.\n" );
3021 return 1;
3022 }
3023
3024 // commented out because sometimes the problem became non-inductive
3025/*
3026 // preprocess the miter by fraiging it
3027 // (note that for each functional class, fraiging leaves one representative;
3028 // so fraiging does not reduce the number of functions represented by nodes
3029 Fraig_ParamsSetDefault( &Params );
3030 Params.nBTLimit = 100000;
3031 pMiter = Abc_NtkFraig( pTemp = pMiter, &Params, 0, 0 );
3032 Abc_NtkDelete( pTemp );
3033 RetValue = Abc_NtkMiterIsConstant( pMiter );
3034 if ( RetValue == 0 )
3035 {
3036 extern void Abc_NtkVerifyReportErrorSeq( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int * pModel, int nFrames );
3037 Abc_Print( 1, "Networks are NOT EQUIVALENT after structural hashing.\n" );
3038 // report the error
3039 pMiter->pModel = Abc_NtkVerifyGetCleanModel( pMiter, nFrames );
3040 Abc_NtkVerifyReportErrorSeq( pNtk1, pNtk2, pMiter->pModel, nFrames );
3041 ABC_FREE( pMiter->pModel );
3042 Abc_NtkDelete( pMiter );
3043 return 0;
3044 }
3045 if ( RetValue == 1 )
3046 {
3047 Abc_NtkDelete( pMiter );
3048 Abc_Print( 1, "Networks are equivalent after structural hashing.\n" );
3049 return 1;
3050 }
3051*/
3052 // derive the AIG manager
3053 pMan = Abc_NtkToDar( pMiter, 0, 1 );
3054 Abc_NtkDelete( pMiter );
3055 if ( pMan == NULL )
3056 {
3057 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3058 return -1;
3059 }
3060 assert( pMan->nRegs > 0 );
3061
3062 // perform verification
3063 RetValue = Fra_FraigSec( pMan, pSecPar, NULL );
3064 Aig_ManStop( pMan );
3065 return RetValue;
3066}
void Abc_NtkVerifyReportErrorSeq(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int *pModel, int nFrames)
Definition abcVerify.c:866
int nFramesMax
Definition fra.h:118
Here is the call graph for this function:

◆ Abc_NtkDarSeqSim()

int Abc_NtkDarSeqSim ( Abc_Ntk_t * pNtk,
int nFrames,
int nWords,
int TimeOut,
int fNew,
int fMiter,
int fVerbose,
char * pFileSim )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso [] Function*************************************************************

Synopsis [Performs random simulation.]

Description []

SideEffects []

SeeAlso []

Definition at line 3558 of file abcDar.c.

3559{
3560 Aig_Man_t * pMan;
3561 Abc_Cex_t * pCex;
3562 int status, RetValue = -1;
3563 abctime clk = Abc_Clock();
3564 if ( Abc_NtkGetChoiceNum(pNtk) )
3565 {
3566 Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
3568 }
3569 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3570 if ( fNew )
3571 {
3572 Gia_Man_t * pGia;
3573 Gia_ParSim_t Pars, * pPars = &Pars;
3575 pPars->nWords = nWords;
3576 pPars->nIters = nFrames;
3577 pPars->TimeLimit = TimeOut;
3578 pPars->fCheckMiter = fMiter;
3579 pPars->fVerbose = fVerbose;
3580 pGia = Gia_ManFromAig( pMan );
3581 if ( Gia_ManSimSimulate( pGia, pPars ) )
3582 {
3583 if ( pGia->pCexSeq )
3584 {
3585 Abc_Print( 1, "Simulation of %d frames with %d words asserted output %d in frame %d. ",
3586 nFrames, nWords, pGia->pCexSeq->iPo, pGia->pCexSeq->iFrame );
3587 status = Saig_ManVerifyCex( pMan, pGia->pCexSeq );
3588 if ( status == 0 )
3589 Abc_Print( 1, "Abc_NtkDarSeqSim(): Counter-example verification has FAILED.\n" );
3590 }
3591 ABC_FREE( pNtk->pModel );
3592 ABC_FREE( pNtk->pSeqModel );
3593 pNtk->pSeqModel = pGia->pCexSeq; pGia->pCexSeq = NULL;
3594 RetValue = 0;
3595 }
3596 else
3597 {
3598 Abc_Print( 1, "Simulation of %d frames with %d words did not assert the outputs. ",
3599 nFrames, nWords );
3600 }
3601 Gia_ManStop( pGia );
3602 }
3603 else // comb/seq simulator
3604 {
3605 Fra_Sml_t * pSml;
3606 if ( pFileSim != NULL )
3607 {
3608 assert( Abc_NtkLatchNum(pNtk) == 0 );
3609 pSml = Fra_SmlSimulateCombGiven( pMan, pFileSim, fMiter, fVerbose );
3610 }
3611 else if ( Abc_NtkLatchNum(pNtk) == 0 )
3612 pSml = Fra_SmlSimulateComb( pMan, nWords, fMiter );
3613 else
3614 pSml = Fra_SmlSimulateSeq( pMan, 0, nFrames, nWords, fMiter );
3615 if ( pSml->fNonConstOut )
3616 {
3617 pCex = Fra_SmlGetCounterExample( pSml );
3618 if ( pCex )
3619 {
3620 Abc_Print( 1, "Simulation of %d frame%s with %d word%s asserted output %d in frame %d. ",
3621 pSml->nFrames, pSml->nFrames == 1 ? "": "s",
3622 pSml->nWordsFrame, pSml->nWordsFrame == 1 ? "": "s",
3623 pCex->iPo, pCex->iFrame );
3624 status = Saig_ManVerifyCex( pMan, pCex );
3625 if ( status == 0 )
3626 Abc_Print( 1, "Abc_NtkDarSeqSim(): Counter-example verification has FAILED.\n" );
3627 }
3628 ABC_FREE( pNtk->pModel );
3629 ABC_FREE( pNtk->pSeqModel );
3630 pNtk->pSeqModel = pCex;
3631 RetValue = 0;
3632 }
3633 else
3634 {
3635 Abc_Print( 1, "Simulation of %d frames with %d words did not assert the outputs. ",
3636 nFrames, nWords );
3637 }
3638 Fra_SmlStop( pSml );
3639 }
3640 ABC_PRT( "Time", Abc_Clock() - clk );
3641 Aig_ManStop( pMan );
3642 return RetValue;
3643}
ABC_DLL int Abc_NtkGetChoiceNum(Abc_Ntk_t *pNtk)
Definition abcUtil.c:463
ABC_DLL int Abc_AigCleanup(Abc_Aig_t *pMan)
Definition abcAig.c:194
void Fra_SmlStop(Fra_Sml_t *p)
Definition fraSim.c:839
struct Fra_Sml_t_ Fra_Sml_t
Definition fra.h:58
Fra_Sml_t * Fra_SmlSimulateComb(Aig_Man_t *pAig, int nWords, int fCheckMiter)
Definition fraSim.c:856
Fra_Sml_t * Fra_SmlSimulateCombGiven(Aig_Man_t *pAig, char *pFileName, int fCheckMiter, int fVerbose)
Definition fraSim.c:987
Fra_Sml_t * Fra_SmlSimulateSeq(Aig_Man_t *pAig, int nPref, int nFrames, int nWords, int fCheckMiter)
Definition fraSim.c:1027
Abc_Cex_t * Fra_SmlGetCounterExample(Fra_Sml_t *p)
Definition fraSim.c:1049
Gia_Man_t * Gia_ManFromAig(Aig_Man_t *p)
INCLUDES ///.
Definition giaAig.c:76
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
void Gia_ManSimSetDefaultParams(Gia_ParSim_t *p)
Definition giaSim.c:165
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
int Gia_ManSimSimulate(Gia_Man_t *pAig, Gia_ParSim_t *pPars)
Definition giaSim.c:599
struct Gia_ParSim_t_ Gia_ParSim_t
Definition gia.h:306
int fNonConstOut
Definition fra.h:179
int nWordsFrame
Definition fra.h:176
int nFrames
Definition fra.h:175
Abc_Cex_t * pCexSeq
Definition gia.h:150
int nWords
Definition gia.h:310
int fCheckMiter
Definition gia.h:314
int TimeLimit
Definition gia.h:313
int nIters
Definition gia.h:311
int fVerbose
Definition gia.h:315
Here is the call graph for this function:

◆ Abc_NtkDarSeqSim3()

int Abc_NtkDarSeqSim3 ( Abc_Ntk_t * pNtk,
Ssw_RarPars_t * pPars )

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

Synopsis [Performs random simulation.]

Description []

SideEffects []

SeeAlso []

Definition at line 3656 of file abcDar.c.

3657{
3658 Aig_Man_t * pMan;
3659 int status, RetValue = -1;
3660// abctime clk = Abc_Clock();
3661 if ( Abc_NtkGetChoiceNum(pNtk) )
3662 {
3663 Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
3665 }
3666 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3667 if ( Ssw_RarSimulate( pMan, pPars ) == 0 )
3668 {
3669 if ( pMan->pSeqModel )
3670 {
3671// Abc_Print( 1, "Simulation of %d frames with %d words asserted output %d in frame %d. ",
3672// nFrames, nWords, pMan->pSeqModel->iPo, pMan->pSeqModel->iFrame );
3673 status = Saig_ManVerifyCex( pMan, pMan->pSeqModel );
3674 if ( status == 0 )
3675 Abc_Print( 1, "Abc_NtkDarSeqSim(): Counter-example verification has FAILED.\n" );
3676 }
3677 ABC_FREE( pNtk->pModel );
3678 ABC_FREE( pNtk->pSeqModel );
3679 pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
3680 RetValue = 0;
3681 }
3682 else
3683 {
3684// Abc_Print( 1, "Simulation of %d frames with %d words did not assert the outputs. ",
3685// nFrames, nWords );
3686 }
3687 if ( pNtk->vSeqModelVec )
3688 Vec_PtrFreeFree( pNtk->vSeqModelVec );
3689 pNtk->vSeqModelVec = pMan->vSeqModelVec; pMan->vSeqModelVec = NULL;
3690// ABC_PRT( "Time", Abc_Clock() - clk );
3691 pNtk->pData = pMan->pData; pMan->pData = NULL;
3692 Aig_ManStop( pMan );
3693 return RetValue;
3694}
int Ssw_RarSimulate(Aig_Man_t *pAig, Ssw_RarPars_t *pPars)
Definition sswRarity.c:973
void * pData
Definition abc.h:203
Here is the call graph for this function:

◆ Abc_NtkDarSeqSweep()

Abc_Ntk_t * Abc_NtkDarSeqSweep ( Abc_Ntk_t * pNtk,
Fra_Ssw_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2082 of file abcDar.c.

2083{
2084 Fraig_Params_t Params;
2085 Abc_Ntk_t * pNtkAig = NULL, * pNtkFraig;
2086 Aig_Man_t * pMan, * pTemp;
2087 abctime clk = Abc_Clock();
2088
2089 // preprocess the miter by fraiging it
2090 // (note that for each functional class, fraiging leaves one representative;
2091 // so fraiging does not reduce the number of functions represented by nodes
2092 Fraig_ParamsSetDefault( &Params );
2093 Params.nBTLimit = 100000;
2094 if ( pPars->fFraiging && pPars->nPartSize == 0 )
2095 {
2096 pNtkFraig = Abc_NtkFraig( pNtk, &Params, 0, 0 );
2097if ( pPars->fVerbose )
2098{
2099ABC_PRT( "Initial fraiging time", Abc_Clock() - clk );
2100}
2101 }
2102 else
2103 pNtkFraig = Abc_NtkDup( pNtk );
2104
2105 pMan = Abc_NtkToDar( pNtkFraig, 0, 1 );
2106 Abc_NtkDelete( pNtkFraig );
2107 if ( pMan == NULL )
2108 return NULL;
2109
2110// pPars->TimeLimit = 5.0;
2111 pMan = Fra_FraigInduction( pTemp = pMan, pPars );
2112 Aig_ManStop( pTemp );
2113 if ( pMan )
2114 {
2115 if ( Aig_ManRegNum(pMan) < Abc_NtkLatchNum(pNtk) )
2116 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
2117 else
2118 {
2119 Abc_Obj_t * pObj;
2120 int i;
2121 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
2122 Abc_NtkForEachLatch( pNtkAig, pObj, i )
2123 Abc_LatchSetInit0( pObj );
2124 }
2125 Aig_ManStop( pMan );
2126 }
2127 return pNtkAig;
2128}
ABC_DLL Abc_Ntk_t * Abc_NtkFraig(Abc_Ntk_t *pNtk, void *pParams, int fAllNodes, int fExdc)
FUNCTION DEFINITIONS ///.
Definition abcFraig.c:58
Aig_Man_t * Fra_FraigInduction(Aig_Man_t *p, Fra_Ssw_t *pPars)
Definition fraInd.c:344
void Fraig_ParamsSetDefault(Fraig_Params_t *pParams)
Definition fraigMan.c:122
struct Fraig_ParamsStruct_t_ Fraig_Params_t
Definition fraig.h:44
int nPartSize
Definition fra.h:94
int fFraiging
Definition fra.h:103
int fVerbose
Definition fra.h:107
Here is the call graph for this function:

◆ Abc_NtkDarSeqSweep2()

Abc_Ntk_t * Abc_NtkDarSeqSweep2 ( Abc_Ntk_t * pNtk,
Ssw_Pars_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 2231 of file abcDar.c.

2232{
2233 Abc_Ntk_t * pNtkAig;
2234 Aig_Man_t * pMan, * pTemp;
2235
2236 pMan = Abc_NtkToDar( pNtk, 0, 1 );
2237 if ( pMan == NULL )
2238 return NULL;
2239
2240 pMan = Ssw_SignalCorrespondence( pTemp = pMan, pPars );
2241
2242 if ( pPars->fFlopVerbose )
2243 Abc_NtkPrintLatchEquivClasses(pNtk, pTemp);
2244
2245 Aig_ManStop( pTemp );
2246 if ( pMan == NULL )
2247 return NULL;
2248
2249 if ( Aig_ManRegNum(pMan) < Abc_NtkLatchNum(pNtk) )
2250 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );
2251 else
2252 {
2253 Abc_Obj_t * pObj;
2254 int i;
2255 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
2256 Abc_NtkForEachLatch( pNtkAig, pObj, i )
2257 Abc_LatchSetInit0( pObj );
2258 }
2259 Aig_ManStop( pMan );
2260 return pNtkAig;
2261}
void Abc_NtkPrintLatchEquivClasses(Abc_Ntk_t *pNtk, Aig_Man_t *pAig)
Definition abcDar.c:2141
Here is the call graph for this function:

◆ Abc_NtkDarSimSec()

int Abc_NtkDarSimSec ( Abc_Ntk_t * pNtk1,
Abc_Ntk_t * pNtk2,
Ssw_Pars_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 3222 of file abcDar.c.

3223{
3224 Aig_Man_t * pMan1, * pMan2 = NULL;
3225 int RetValue;
3226 // derive AIG manager
3227 pMan1 = Abc_NtkToDar( pNtk1, 0, 1 );
3228 if ( pMan1 == NULL )
3229 {
3230 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3231 return -1;
3232 }
3233 assert( Aig_ManRegNum(pMan1) > 0 );
3234 // derive AIG manager
3235 if ( pNtk2 )
3236 {
3237 pMan2 = Abc_NtkToDar( pNtk2, 0, 1 );
3238 if ( pMan2 == NULL )
3239 {
3240 Abc_Print( 1, "Converting miter into AIG has failed.\n" );
3241 return -1;
3242 }
3243 assert( Aig_ManRegNum(pMan2) > 0 );
3244 }
3245
3246 // perform verification
3247 RetValue = Ssw_SecWithSimilarity( pMan1, pMan2, pPars );
3248 Aig_ManStop( pMan1 );
3249 if ( pMan2 )
3250 Aig_ManStop( pMan2 );
3251 return RetValue;
3252}
int Ssw_SecWithSimilarity(Aig_Man_t *p0, Aig_Man_t *p1, Ssw_Pars_t *pPars)
Definition sswIslands.c:542
Here is the call graph for this function:

◆ Abc_NtkDarSynch()

Abc_Ntk_t * Abc_NtkDarSynch ( Abc_Ntk_t * pNtk1,
Abc_Ntk_t * pNtk2,
int nWords,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4200 of file abcDar.c.

4201{
4202 extern Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords, int fVerbose );
4203 Abc_Ntk_t * pNtkAig;
4204 Aig_Man_t * pMan1, * pMan2, * pMan;
4205 pMan1 = Abc_NtkToDar( pNtk1, 0, 1 );
4206 if ( pMan1 == NULL )
4207 return NULL;
4208 pMan2 = Abc_NtkToDar( pNtk2, 0, 1 );
4209 if ( pMan2 == NULL )
4210 {
4211 Aig_ManStop( pMan1 );
4212 return NULL;
4213 }
4214 pMan = Saig_Synchronize( pMan1, pMan2, nWords, fVerbose );
4215 Aig_ManStop( pMan1 );
4216 Aig_ManStop( pMan2 );
4217 if ( pMan == NULL )
4218 return NULL;
4219 pNtkAig = Abc_NtkFromAigPhase( pMan );
4220// pNtkAig->pName = Extra_UtilStrsav("miter");
4221// pNtkAig->pSpec = NULL;
4222 Aig_ManStop( pMan );
4223 return pNtkAig;
4224}
Aig_Man_t * Saig_Synchronize(Aig_Man_t *pAig1, Aig_Man_t *pAig2, int nWords, int fVerbose)
Definition saigSynch.c:556
Here is the call graph for this function:

◆ Abc_NtkDarSynchOne()

Abc_Ntk_t * Abc_NtkDarSynchOne ( Abc_Ntk_t * pNtk,
int nWords,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4172 of file abcDar.c.

4173{
4174 extern Aig_Man_t * Saig_SynchSequenceApply( Aig_Man_t * pAig, int nWords, int fVerbose );
4175 Abc_Ntk_t * pNtkAig;
4176 Aig_Man_t * pMan, * pTemp;
4177 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4178 if ( pMan == NULL )
4179 return NULL;
4180 pMan = Saig_SynchSequenceApply( pTemp = pMan, nWords, fVerbose );
4181 Aig_ManStop( pTemp );
4182 if ( pMan == NULL )
4183 return NULL;
4184 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
4185 Aig_ManStop( pMan );
4186 return pNtkAig;
4187}
Aig_Man_t * Saig_SynchSequenceApply(Aig_Man_t *pAig, int nWords, int fVerbose)
Definition saigSynch.c:502
Here is the call graph for this function:

◆ Abc_NtkDarTempor()

Abc_Ntk_t * Abc_NtkDarTempor ( Abc_Ntk_t * pNtk,
int nFrames,
int TimeOut,
int nConfLimit,
int fUseBmc,
int fUseTransSigs,
int fVerbose,
int fVeryVerbose )

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

Synopsis [Performs targe enlargement.]

Description []

SideEffects []

SeeAlso []

Definition at line 3767 of file abcDar.c.

3768{
3769 extern Aig_Man_t * Saig_ManTempor( Aig_Man_t * pAig, int nFrames, int TimeOut, int nConfLimit, int fUseBmc, int fUseTransSigs, int fVerbose, int fVeryVerbose );
3770 Abc_Ntk_t * pNtkAig;
3771 Aig_Man_t * pMan, * pTemp;
3772 pMan = Abc_NtkToDar( pNtk, 0, 1 );
3773 if ( pMan == NULL )
3774 return NULL;
3775 pTemp = Saig_ManTempor( pMan, nFrames, TimeOut, nConfLimit, fUseBmc, fUseTransSigs, fVerbose, fVeryVerbose );
3776 Aig_ManStop( pMan );
3777 if ( pTemp == NULL )
3778 return Abc_NtkDup( pNtk );
3779 pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pTemp );
3780 Aig_ManStop( pTemp );
3781 return pNtkAig;
3782}
Aig_Man_t * Saig_ManTempor(Aig_Man_t *pAig, int nFrames, int TimeOut, int nConfLimit, int fUseBmc, int fUseTransSigs, int fVerbose, int fVeryVerbose)
Definition saigTempor.c:186
Here is the call graph for this function:

◆ Abc_NtkDarTest()

void Abc_NtkDarTest ( Abc_Ntk_t * pNtk,
int Num )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4769 of file abcDar.c.

4770{
4771// extern void Saig_ManDetectConstr( Aig_Man_t * p );
4772// extern void Saig_ManDetectConstrFuncTest( Aig_Man_t * p );
4773// extern void Saig_ManFoldConstrTest( Aig_Man_t * pAig );
4774 extern void Llb_ManComputeDomsTest( Aig_Man_t * pAig, int Num );
4775
4776
4777
4778// extern void Fsim_ManTest( Aig_Man_t * pAig );
4779 extern Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDist, int fVerbose, Aig_Man_t ** ppMiter );
4780// Vec_Int_t * vPairs;
4781 Aig_Man_t * pMan;//, * pMan2;//, * pTemp;
4782 assert( Abc_NtkIsStrash(pNtk) );
4783 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4784 if ( pMan == NULL )
4785 return;
4786/*
4787Aig_ManSetRegNum( pMan, pMan->nRegs );
4788Aig_ManPrintStats( pMan );
4789Saig_ManDumpBlif( pMan, "_temp_.blif" );
4790Aig_ManStop( pMan );
4791pMan = Saig_ManReadBlif( "_temp_.blif" );
4792Aig_ManPrintStats( pMan );
4793*/
4794/*
4795 Aig_ManSetRegNum( pMan, pMan->nRegs );
4796 pTemp = Ssw_SignalCorrespondeceTestPairs( pMan );
4797 Aig_ManStop( pTemp );
4798*/
4799
4800/*
4801// Ssw_SecSpecialMiter( pMan, NULL, 2, 1 );
4802 pMan2 = Aig_ManDupSimple(pMan);
4803 vPairs = Saig_StrSimPerformMatching( pMan, pMan2, 0, 1, NULL );
4804 Vec_IntFree( vPairs );
4805 Aig_ManStop( pMan );
4806 Aig_ManStop( pMan2 );
4807*/
4808// Ioa_WriteAigerBufferTest( pMan, "test.aig", 0, 0 );
4809// Saig_ManFoldConstrTest( pMan );
4810 {
4811 extern void Saig_ManBmcSectionsTest( Aig_Man_t * p );
4812 extern void Saig_ManBmcTerSimTest( Aig_Man_t * p );
4813 extern void Saig_ManBmcSupergateTest( Aig_Man_t * p );
4814 extern void Saig_ManBmcMappingTest( Aig_Man_t * p );
4815// Saig_ManBmcSectionsTest( pMan );
4816// Saig_ManBmcTerSimTest( pMan );
4817// Saig_ManBmcSupergateTest( pMan );
4818// Saig_ManBmcMappingTest( pMan );
4819 }
4820
4821 {
4822// void Pdr_ManEquivClasses( Aig_Man_t * pMan );
4823// Pdr_ManEquivClasses( pMan );
4824 }
4825
4826// Llb_ManComputeDomsTest( pMan, Num );
4827 {
4828 extern void Llb_ManMinCutTest( Aig_Man_t * pMan, int Num );
4829 extern void Llb_BddStructAnalysis( Aig_Man_t * pMan );
4830 extern void Llb_NonlinExperiment( Aig_Man_t * pAig, int Num );
4831// Llb_BddStructAnalysis( pMan );
4832// Llb_ManMinCutTest( pMan, Num );
4833// Llb_NonlinExperiment( pMan, Num );
4834 }
4835
4836// Saig_MvManSimulate( pMan, 1 );
4837// Saig_ManDetectConstr( pMan );
4838// Saig_ManDetectConstrFuncTest( pMan );
4839
4840// Fsim_ManTest( pMan );
4841 Aig_ManStop( pMan );
4842
4843}
void Saig_ManBmcMappingTest(Aig_Man_t *p)
Definition bmcBmc3.c:670
void Saig_ManBmcTerSimTest(Aig_Man_t *p)
Definition bmcBmc3.c:242
void Saig_ManBmcSupergateTest(Aig_Man_t *p)
Definition bmcBmc3.c:559
void Saig_ManBmcSectionsTest(Aig_Man_t *p)
Definition bmcBmc3.c:453
void Llb_ManMinCutTest(Aig_Man_t *pAig, int Num)
Definition llb2Flow.c:1335
void Llb_NonlinExperiment(Aig_Man_t *pAig, int Num)
Definition llb3Nonlin.c:806
Here is the call graph for this function:

◆ Abc_NtkDarTestNtk()

Abc_Ntk_t * Abc_NtkDarTestNtk ( Abc_Ntk_t * pNtk)

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4856 of file abcDar.c.

4857{
4858// extern Aig_Man_t * Saig_ManDualRail( Aig_Man_t * p, int fMiter );
4859
4860/*
4861 extern Aig_Man_t * Ssw_SignalCorrespondeceTestPairs( Aig_Man_t * pAig );
4862
4863 Abc_Ntk_t * pNtkAig;
4864 Aig_Man_t * pMan, * pTemp;
4865 assert( Abc_NtkIsStrash(pNtk) );
4866 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4867 if ( pMan == NULL )
4868 return NULL;
4869
4870 Aig_ManSetRegNum( pMan, pMan->nRegs );
4871 pMan = Ssw_SignalCorrespondeceTestPairs( pTemp = pMan );
4872 Aig_ManStop( pTemp );
4873 if ( pMan == NULL )
4874 return NULL;
4875
4876 pNtkAig = Abc_NtkFromAigPhase( pMan );
4877 pNtkAig->pName = Extra_UtilStrsav(pNtk->pName);
4878 pNtkAig->pSpec = Extra_UtilStrsav(pNtk->pSpec);
4879 Aig_ManStop( pMan );
4880 return pNtkAig;
4881*/
4882 Abc_Ntk_t * pNtkAig;
4883 Aig_Man_t * pMan;//, * pTemp;
4884 assert( Abc_NtkIsStrash(pNtk) );
4885 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4886 if ( pMan == NULL )
4887 return NULL;
4888
4889/*
4890 Aig_ManSetRegNum( pMan, pMan->nRegs );
4891 pMan = Saig_ManDualRail( pTemp = pMan, 1 );
4892 Aig_ManStop( pTemp );
4893 if ( pMan == NULL )
4894 return NULL;
4895
4896 pNtkAig = Abc_NtkFromAigPhase( pMan );
4897 pNtkAig->pName = Extra_UtilStrsav(pNtk->pName);
4898 pNtkAig->pSpec = Extra_UtilStrsav(pNtk->pSpec);
4899 Aig_ManStop( pMan );
4900*/
4901
4902 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
4903 Aig_ManStop( pMan );
4904
4905 return pNtkAig;
4906
4907}
Here is the call graph for this function:

◆ Abc_NtkDarToCnf()

Abc_Ntk_t * Abc_NtkDarToCnf ( Abc_Ntk_t * pNtk,
char * pFileName,
int fFastAlgo,
int fChangePol,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1847 of file abcDar.c.

1848{
1849// Vec_Ptr_t * vMapped = NULL;
1850 Aig_Man_t * pMan;
1851// Cnf_Man_t * pManCnf = NULL;
1852 Cnf_Dat_t * pCnf;
1853 Abc_Ntk_t * pNtkNew = NULL;
1854 abctime clk = Abc_Clock();
1855 assert( Abc_NtkIsStrash(pNtk) );
1856
1857 // convert to the AIG manager
1858 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1859 if ( pMan == NULL )
1860 return NULL;
1861 if ( !Aig_ManCheck( pMan ) )
1862 {
1863 Abc_Print( 1, "Abc_NtkDarToCnf: AIG check has failed.\n" );
1864 Aig_ManStop( pMan );
1865 return NULL;
1866 }
1867 // perform balance
1868 if ( fVerbose )
1869 Aig_ManPrintStats( pMan );
1870
1871 // derive CNF
1872 if ( fFastAlgo )
1873 pCnf = Cnf_DeriveFast( pMan, 0 );
1874 else
1875 pCnf = Cnf_Derive( pMan, 0 );
1876
1877 // adjust polarity
1878 if ( fChangePol )
1879 Cnf_DataTranformPolarity( pCnf, 0 );
1880
1881 // print stats
1882// if ( fVerbose )
1883 {
1884 Abc_Print( 1, "CNF stats: Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->nVars, pCnf->nClauses, pCnf->nLiterals );
1885 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
1886 }
1887
1888/*
1889 // write the network for verification
1890 pManCnf = Cnf_ManRead();
1891 vMapped = Cnf_ManScanMapping( pManCnf, 1, 0 );
1892 pNtkNew = Abc_NtkConstructFromCnf( pNtk, pManCnf, vMapped );
1893 Vec_PtrFree( vMapped );
1894*/
1895 // write CNF into a file
1896 Cnf_DataWriteIntoFile( pCnf, pFileName, 0, NULL, NULL );
1897 Cnf_DataFree( pCnf );
1898 Cnf_ManFree();
1899 Aig_ManStop( pMan );
1900 return pNtkNew;
1901}
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition aigCheck.c:45
Cnf_Dat_t * Cnf_DeriveFast(Aig_Man_t *p, int nOutputs)
Definition cnfFast.c:666
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
Definition cnfCore.c:165
void Cnf_DataTranformPolarity(Cnf_Dat_t *pCnf, int fTransformPos)
Definition cnfMan.c:768
void Cnf_ManFree()
Definition cnfCore.c:58
struct Cnf_Dat_t_ Cnf_Dat_t
Definition cnf.h:52
void Cnf_DataFree(Cnf_Dat_t *p)
Definition cnfMan.c:207
void Cnf_DataWriteIntoFile(Cnf_Dat_t *p, char *pFileName, int fReadable, Vec_Int_t *vForAlls, Vec_Int_t *vExists)
Definition cnfMan.c:387
int nVars
Definition cnf.h:59
int nLiterals
Definition cnf.h:60
int nClauses
Definition cnf.h:61
Here is the call graph for this function:

◆ Abc_NtkDarUnfold()

Abc_Ntk_t * Abc_NtkDarUnfold ( Abc_Ntk_t * pNtk,
int nFrames,
int nConfs,
int nProps,
int fStruct,
int fOldAlgo,
int fVerbose )

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

Synopsis [Performs BDD-based reachability analysis.]

Description []

SideEffects []

SeeAlso []

Definition at line 4658 of file abcDar.c.

4659{
4660 Abc_Ntk_t * pNtkAig;
4661 Aig_Man_t * pMan, * pTemp;
4662 assert( Abc_NtkIsStrash(pNtk) );
4663 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4664 if ( pMan == NULL )
4665 return NULL;
4666 if ( fStruct )
4667 pMan = Saig_ManDupUnfoldConstrs( pTemp = pMan );
4668 else
4669 pMan = Saig_ManDupUnfoldConstrsFunc( pTemp = pMan, nFrames, nConfs, nProps, fOldAlgo, fVerbose );
4670 Aig_ManStop( pTemp );
4671 if ( pMan == NULL )
4672 return NULL;
4673 pNtkAig = Abc_NtkFromAigPhase( pMan );
4674 pNtkAig->pName = Extra_UtilStrsav(pMan->pName);
4675 pNtkAig->pSpec = Extra_UtilStrsav(pMan->pSpec);
4676 Aig_ManStop( pMan );
4677 return pNtkAig;
4678}
Aig_Man_t * Saig_ManDupUnfoldConstrsFunc(Aig_Man_t *pAig, int nFrames, int nConfs, int nProps, int fOldAlgo, int fVerbose)
Aig_Man_t * Saig_ManDupUnfoldConstrs(Aig_Man_t *pAig)
Definition saigConstr.c:282
Here is the call graph for this function:

◆ Abc_NtkDC2()

Abc_Ntk_t * Abc_NtkDC2 ( Abc_Ntk_t * pNtk,
int fBalance,
int fUpdateLevel,
int fFanout,
int fPower,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1630 of file abcDar.c.

1631{
1632 Aig_Man_t * pMan, * pTemp;
1633 Abc_Ntk_t * pNtkAig;
1634 abctime clk;
1635 assert( Abc_NtkIsStrash(pNtk) );
1636 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1637 if ( pMan == NULL )
1638 return NULL;
1639// Aig_ManPrintStats( pMan );
1640
1641clk = Abc_Clock();
1642 pMan = Dar_ManCompress2( pTemp = pMan, fBalance, fUpdateLevel, fFanout, fPower, fVerbose );
1643 Aig_ManStop( pTemp );
1644//ABC_PRT( "time", Abc_Clock() - clk );
1645
1646// Aig_ManPrintStats( pMan );
1647 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1648 Aig_ManStop( pMan );
1649 return pNtkAig;
1650}
Aig_Man_t * Dar_ManCompress2(Aig_Man_t *pAig, int fBalance, int fUpdateLevel, int fFanout, int fPower, int fVerbose)
Definition darScript.c:235
Here is the call graph for this function:

◆ Abc_NtkDch()

Abc_Ntk_t * Abc_NtkDch ( Abc_Ntk_t * pNtk,
Dch_Pars_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1689 of file abcDar.c.

1690{
1691 extern Aig_Man_t * Dar_ManChoiceNew( Aig_Man_t * pAig, Dch_Pars_t * pPars );
1692 extern Gia_Man_t * Dar_NewChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fPower, int fLightSynth, int fVerbose );
1693 extern Aig_Man_t * Cec_ComputeChoices( Gia_Man_t * pGia, Dch_Pars_t * pPars );
1694
1695 Aig_Man_t * pMan, * pTemp;
1696 Abc_Ntk_t * pNtkAig;
1697 Gia_Man_t * pGia;
1698 abctime clk;
1699 assert( Abc_NtkIsStrash(pNtk) );
1700 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1701 if ( pMan == NULL )
1702 return NULL;
1703 if ( pPars->fUseNew )
1704 pMan = Dar_ManChoiceNew( pMan, pPars );
1705 else
1706 {
1707clk = Abc_Clock();
1708 if ( pPars->fSynthesis )
1709 pGia = Dar_NewChoiceSynthesis( pMan, 1, 1, pPars->fPower, pPars->fLightSynth, pPars->fVerbose );
1710 else
1711 {
1712 pGia = Gia_ManFromAig( pMan );
1713 Aig_ManStop( pMan );
1714 }
1715pPars->timeSynth = Abc_Clock() - clk;
1716 if ( pPars->fUseGia )
1717 pMan = Cec_ComputeChoices( pGia, pPars );
1718 else
1719 {
1720 pMan = Gia_ManToAigSkip( pGia, 3 );
1721 Gia_ManStop( pGia );
1722 pMan = Dch_ComputeChoices( pTemp = pMan, pPars );
1723 Aig_ManStop( pTemp );
1724 }
1725 }
1726 pNtkAig = Abc_NtkFromDarChoices( pNtk, pMan );
1727 Aig_ManStop( pMan );
1728 return pNtkAig;
1729}
Aig_Man_t * Cec_ComputeChoices(Gia_Man_t *pGia, Dch_Pars_t *pPars)
Definition cecChoice.c:385
Gia_Man_t * Dar_NewChoiceSynthesis(Aig_Man_t *pAig, int fBalance, int fUpdateLevel, int fPower, int fLightSynth, int fVerbose)
Definition darScript.c:632
Aig_Man_t * Dar_ManChoiceNew(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition darScript.c:849
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Definition dch.h:43
Aig_Man_t * Dch_ComputeChoices(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition dchCore.c:89
Aig_Man_t * Gia_ManToAigSkip(Gia_Man_t *p, int nOutDelta)
Definition giaAig.c:365
Here is the call graph for this function:

◆ Abc_NtkDChoice()

Abc_Ntk_t * Abc_NtkDChoice ( Abc_Ntk_t * pNtk,
int fBalance,
int fUpdateLevel,
int fConstruct,
int nConfMax,
int nLevelMax,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1663 of file abcDar.c.

1664{
1665 Aig_Man_t * pMan, * pTemp;
1666 Abc_Ntk_t * pNtkAig;
1667 assert( Abc_NtkIsStrash(pNtk) );
1668 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1669 if ( pMan == NULL )
1670 return NULL;
1671 pMan = Dar_ManChoice( pTemp = pMan, fBalance, fUpdateLevel, fConstruct, nConfMax, nLevelMax, fVerbose );
1672 Aig_ManStop( pTemp );
1673 pNtkAig = Abc_NtkFromDarChoices( pNtk, pMan );
1674 Aig_ManStop( pMan );
1675 return pNtkAig;
1676}
Aig_Man_t * Dar_ManChoice(Aig_Man_t *pAig, int fBalance, int fUpdateLevel, int fConstruct, int nConfMax, int nLevelMax, int fVerbose)
Definition darScript.c:378
Here is the call graph for this function:

◆ Abc_NtkDRefactor()

Abc_Ntk_t * Abc_NtkDRefactor ( Abc_Ntk_t * pNtk,
Dar_RefPar_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1593 of file abcDar.c.

1594{
1595 Aig_Man_t * pMan, * pTemp;
1596 Abc_Ntk_t * pNtkAig;
1597 abctime clk;
1598 assert( Abc_NtkIsStrash(pNtk) );
1599 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1600 if ( pMan == NULL )
1601 return NULL;
1602// Aig_ManPrintStats( pMan );
1603
1604 Dar_ManRefactor( pMan, pPars );
1605// pMan = Dar_ManBalance( pTemp = pMan, pPars->fUpdateLevel );
1606// Aig_ManStop( pTemp );
1607
1608clk = Abc_Clock();
1609 pMan = Aig_ManDupDfs( pTemp = pMan );
1610 Aig_ManStop( pTemp );
1611//ABC_PRT( "time", Abc_Clock() - clk );
1612
1613// Aig_ManPrintStats( pMan );
1614 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1615 Aig_ManStop( pMan );
1616 return pNtkAig;
1617}
Aig_Man_t * Aig_ManDupDfs(Aig_Man_t *p)
Definition aigDup.c:563
int Dar_ManRefactor(Aig_Man_t *pAig, Dar_RefPar_t *pPars)
Definition darRefact.c:496
Here is the call graph for this function:

◆ Abc_NtkDRewrite()

Abc_Ntk_t * Abc_NtkDRewrite ( Abc_Ntk_t * pNtk,
Dar_RwrPar_t * pPars )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1549 of file abcDar.c.

1550{
1551 Aig_Man_t * pMan, * pTemp;
1552 Abc_Ntk_t * pNtkAig;
1553 abctime clk;
1554 assert( Abc_NtkIsStrash(pNtk) );
1555 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1556 if ( pMan == NULL )
1557 return NULL;
1558// Aig_ManPrintStats( pMan );
1559/*
1560// Aig_ManSupports( pMan );
1561 {
1562 Vec_Vec_t * vParts;
1563 vParts = Aig_ManPartitionSmart( pMan, 50, 1, NULL );
1564 Vec_VecFree( vParts );
1565 }
1566*/
1567 Dar_ManRewrite( pMan, pPars );
1568// pMan = Dar_ManBalance( pTemp = pMan, pPars->fUpdateLevel );
1569// Aig_ManStop( pTemp );
1570
1571clk = Abc_Clock();
1572 pMan = Aig_ManDupDfs( pTemp = pMan );
1573 Aig_ManStop( pTemp );
1574//ABC_PRT( "time", Abc_Clock() - clk );
1575
1576// Aig_ManPrintStats( pMan );
1577 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1578 Aig_ManStop( pMan );
1579 return pNtkAig;
1580}
int Dar_ManRewrite(Aig_Man_t *pAig, Dar_RwrPar_t *pPars)
Definition darCore.c:79
Here is the call graph for this function:

◆ Abc_NtkDrwsat()

Abc_Ntk_t * Abc_NtkDrwsat ( Abc_Ntk_t * pNtk,
int fBalance,
int fVerbose )

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

Synopsis [Gives the current ABC network to AIG manager for processing.]

Description []

SideEffects []

SeeAlso []

Definition at line 1742 of file abcDar.c.

1743{
1744 Aig_Man_t * pMan, * pTemp;
1745 Abc_Ntk_t * pNtkAig;
1746 abctime clk;
1747 assert( Abc_NtkIsStrash(pNtk) );
1748 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1749 if ( pMan == NULL )
1750 return NULL;
1751// Aig_ManPrintStats( pMan );
1752
1753clk = Abc_Clock();
1754 pMan = Dar_ManRwsat( pTemp = pMan, fBalance, fVerbose );
1755 Aig_ManStop( pTemp );
1756//ABC_PRT( "time", Abc_Clock() - clk );
1757
1758// Aig_ManPrintStats( pMan );
1759 pNtkAig = Abc_NtkFromDar( pNtk, pMan );
1760 Aig_ManStop( pMan );
1761 return pNtkAig;
1762}
ABC_NAMESPACE_IMPL_START Aig_Man_t * Dar_ManRwsat(Aig_Man_t *pAig, int fBalance, int fVerbose)
DECLARATIONS ///.
Definition darScript.c:71
Here is the call graph for this function:

◆ Abc_NtkDSat()

int Abc_NtkDSat ( Abc_Ntk_t * pNtk,
ABC_INT64_T nConfLimit,
ABC_INT64_T nInsLimit,
int nLearnedStart,
int nLearnedDelta,
int nLearnedPerce,
int fAlignPol,
int fAndOuts,
int fNewSolver,
int fVerbose )

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

Synopsis [Solves combinational miter using a SAT solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 1915 of file abcDar.c.

1916{
1917 Aig_Man_t * pMan;
1918 int RetValue;//, clk = Abc_Clock();
1919 assert( Abc_NtkIsStrash(pNtk) );
1920 assert( Abc_NtkLatchNum(pNtk) == 0 );
1921// assert( Abc_NtkPoNum(pNtk) == 1 );
1922 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1923 RetValue = Fra_FraigSat( pMan, nConfLimit, nInsLimit, nLearnedStart, nLearnedDelta, nLearnedPerce, fAlignPol, fAndOuts, fNewSolver, fVerbose );
1924 pNtk->pModel = (int *)pMan->pData, pMan->pData = NULL;
1925 Aig_ManStop( pMan );
1926 return RetValue;
1927}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkFindDcLatches()

Vec_Int_t * Abc_NtkFindDcLatches ( Abc_Ntk_t * pNtk)

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

Synopsis [Collects information about what flops have unknown values.]

Description []

SideEffects []

SeeAlso []

Definition at line 211 of file abcDar.c.

212{
213 Vec_Int_t * vUnknown;
214 Abc_Obj_t * pObj;
215 int i;
216 vUnknown = Vec_IntStart( Abc_NtkLatchNum(pNtk) );
217 Abc_NtkForEachLatch( pNtk, pObj, i )
218 if ( Abc_LatchIsInitDc(pObj) )
219 {
220 Vec_IntWriteEntry( vUnknown, i, 1 );
221 Abc_LatchSetInit0(pObj);
222 }
223 return vUnknown;
224}

◆ Abc_NtkFromAigPhase()

Abc_Ntk_t * Abc_NtkFromAigPhase ( Aig_Man_t * pMan)

DECLARATIONS ///.

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description [This procedure should be called after seq sweeping, which changes the number of registers.]

SideEffects []

SeeAlso []

Definition at line 595 of file abcDar.c.

596{
597 Vec_Ptr_t * vNodes;
598 Abc_Ntk_t * pNtkNew;
599 Abc_Obj_t * pObjNew;
600 Aig_Obj_t * pObj, * pObjLo, * pObjLi;
601 int i;
602 assert( pMan->nAsserts == 0 );
603 // perform strashing
605 pNtkNew->nConstrs = pMan->nConstrs;
606 pNtkNew->nBarBufs = pMan->nBarBufs;
607 // duplicate the name and the spec
608// pNtkNew->pName = Extra_UtilStrsav(pMan->pName);
609// pNtkNew->pSpec = Extra_UtilStrsav(pMan->pSpec);
610 Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
611 // create PIs
612 Aig_ManForEachPiSeq( pMan, pObj, i )
613 {
614 pObjNew = Abc_NtkCreatePi( pNtkNew );
615// Abc_ObjAssignName( pObjNew, Abc_ObjName(pObjNew), NULL );
616 pObj->pData = pObjNew;
617 }
618 // create POs
619 Aig_ManForEachPoSeq( pMan, pObj, i )
620 {
621 pObjNew = Abc_NtkCreatePo( pNtkNew );
622// Abc_ObjAssignName( pObjNew, Abc_ObjName(pObjNew), NULL );
623 pObj->pData = pObjNew;
624 }
625 assert( Abc_NtkCiNum(pNtkNew) == Aig_ManCiNum(pMan) - Aig_ManRegNum(pMan) );
626 assert( Abc_NtkCoNum(pNtkNew) == Aig_ManCoNum(pMan) - Aig_ManRegNum(pMan) );
627 // create as many latches as there are registers in the manager
628 Aig_ManForEachLiLoSeq( pMan, pObjLi, pObjLo, i )
629 {
630 pObjNew = Abc_NtkCreateLatch( pNtkNew );
631 pObjLi->pData = Abc_NtkCreateBi( pNtkNew );
632 pObjLo->pData = Abc_NtkCreateBo( pNtkNew );
633 Abc_ObjAddFanin( pObjNew, (Abc_Obj_t *)pObjLi->pData );
634 Abc_ObjAddFanin( (Abc_Obj_t *)pObjLo->pData, pObjNew );
635 Abc_LatchSetInit0( pObjNew );
636// Abc_ObjAssignName( (Abc_Obj_t *)pObjLi->pData, Abc_ObjName((Abc_Obj_t *)pObjLi->pData), NULL );
637// Abc_ObjAssignName( (Abc_Obj_t *)pObjLo->pData, Abc_ObjName((Abc_Obj_t *)pObjLo->pData), NULL );
638 }
639 // rebuild the AIG
640 vNodes = Aig_ManDfs( pMan, 1 );
641 Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
642 if ( Aig_ObjIsBuf(pObj) )
643 pObj->pData = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
644 else
645 pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) );
646 Vec_PtrFree( vNodes );
647 // connect the PO nodes
648 Aig_ManForEachCo( pMan, pObj, i )
649 {
650 pObjNew = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
651 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew );
652 }
653
654 Abc_NtkAddDummyPiNames( pNtkNew );
655 Abc_NtkAddDummyPoNames( pNtkNew );
656 Abc_NtkAddDummyBoxNames( pNtkNew );
657
658 // check the resulting AIG
659 if ( !Abc_NtkCheck( pNtkNew ) )
660 Abc_Print( 1, "Abc_NtkFromAigPhase(): Network check has failed.\n" );
661 return pNtkNew;
662}
ABC_DLL void Abc_NtkAddDummyBoxNames(Abc_Ntk_t *pNtk)
Definition abcNames.c:547
ABC_DLL void Abc_NtkAddDummyPoNames(Abc_Ntk_t *pNtk)
Definition abcNames.c:521
ABC_DLL void Abc_NtkAddDummyPiNames(Abc_Ntk_t *pNtk)
Definition abcNames.c:495
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkFromCellMappedGia()

Abc_Ntk_t * Abc_NtkFromCellMappedGia ( Gia_Man_t * p,
int fUseBuffs )

Definition at line 967 of file abcDar.c.

968{
969 int fFixDrivers = 1;
970 int fVerbose = 0;
971 Abc_Ntk_t * pNtkNew;
972 Vec_Int_t * vCopyLits;
973 Abc_Obj_t * pObjNew, * pObjNewLi, * pObjNewLo;
974 Gia_Obj_t * pObj, * pObjLi, * pObjLo;
975 int i, k, iLit, iFanLit, nCells, fNeedConst[2] = {0};
976 Mio_Cell2_t * pCells = Mio_CollectRootsNewDefault2( 6, &nCells, 0 );
977 assert( Gia_ManHasCellMapping(p) );
978 // start network
979 pNtkNew = Abc_NtkAlloc( ABC_NTK_LOGIC, ABC_FUNC_MAP, 1 );
980 pNtkNew->pName = Extra_UtilStrsav(p->pName);
981 pNtkNew->pSpec = Extra_UtilStrsav(p->pSpec);
982 assert( pNtkNew->pManFunc == Abc_FrameReadLibGen() );
983 vCopyLits = Vec_IntStartFull( 2*Gia_ManObjNum(p) );
984 // create PIs
985 Gia_ManForEachPi( p, pObj, i )
986 Abc_NtkFromCellWrite( vCopyLits, Gia_ObjId(p, pObj), 0, Abc_ObjId( Abc_NtkCreatePi( pNtkNew ) ) );
987 // create POs
988 Gia_ManForEachPo( p, pObj, i )
989 Abc_NtkFromCellWrite( vCopyLits, Gia_ObjId(p, pObj), 0, Abc_ObjId( Abc_NtkCreatePo( pNtkNew ) ) );
990 // create as many latches as there are registers in the manager
991 Gia_ManForEachRiRo( p, pObjLi, pObjLo, i )
992 {
993 pObjNew = Abc_NtkCreateLatch( pNtkNew );
994 pObjNewLi = Abc_NtkCreateBi( pNtkNew );
995 pObjNewLo = Abc_NtkCreateBo( pNtkNew );
996 Abc_ObjAddFanin( pObjNew, pObjNewLi );
997 Abc_ObjAddFanin( pObjNewLo, pObjNew );
998// pObjLi->Value = Abc_ObjId( pObjNewLi );
999// pObjLo->Value = Abc_ObjId( pObjNewLo );
1000 Abc_NtkFromCellWrite( vCopyLits, Gia_ObjId(p, pObjLi), 0, Abc_ObjId( pObjNewLi ) );
1001 Abc_NtkFromCellWrite( vCopyLits, Gia_ObjId(p, pObjLo), 0, Abc_ObjId( pObjNewLo ) );
1002 Abc_LatchSetInit0( pObjNew );
1003 }
1004
1005 // create constants
1006 Gia_ManForEachCo( p, pObj, i )
1007 if ( Gia_ObjFaninId0p(p, pObj) == 0 )
1008 fNeedConst[Gia_ObjFaninC0(pObj)] = 1;
1009 Gia_ManForEachBuf( p, pObj, i )
1010 if ( Gia_ObjFaninId0p(p, pObj) == 0 )
1011 fNeedConst[Gia_ObjFaninC0(pObj)] = 1;
1012 if ( fNeedConst[0] )
1013 Abc_NtkFromCellWrite( vCopyLits, 0, 0, Abc_ObjId(Abc_NtkCreateNodeConst0(pNtkNew)) );
1014 if ( fNeedConst[1] )
1015 Abc_NtkFromCellWrite( vCopyLits, 0, 1, Abc_ObjId(Abc_NtkCreateNodeConst1(pNtkNew)) );
1016
1017 // rebuild the AIG
1018 Gia_ManForEachCell( p, iLit )
1019 {
1020 int fSkip = 0;
1021 if ( Gia_ObjIsCellBuf(p, iLit) )
1022 {
1023 assert( !Abc_LitIsCompl(iLit) );
1024 // build buffer
1025 pObjNew = Abc_NtkCreateNode( pNtkNew );
1026 iFanLit = Gia_ObjFaninLit0p( p, Gia_ManObj(p, Abc_Lit2Var(iLit)) );
1027 Abc_ObjAddFanin( pObjNew, Abc_NtkFromCellRead(pNtkNew, vCopyLits, Abc_Lit2Var(iFanLit), Abc_LitIsCompl(iFanLit)) );
1028 pObjNew->pData = NULL; // barrier buffer
1029 assert( Abc_ObjIsBarBuf(pObjNew) );
1030 pNtkNew->nBarBufs2++;
1031 }
1032 else if ( Gia_ObjIsCellInv(p, iLit) )
1033 {
1034 int iLitNot = Abc_LitNot(iLit);
1035 if ( !Abc_LitIsCompl(iLit) ) // positive phase
1036 {
1037 // build negative phase
1038 assert( Vec_IntEntry(vCopyLits, iLitNot) == -1 );
1039 assert( Gia_ObjCellId(p, iLitNot) > 0 );
1040 pObjNew = Abc_NtkCreateNode( pNtkNew );
1041 Gia_CellForEachFanin( p, iLitNot, iFanLit, k )
1042 Abc_ObjAddFanin( pObjNew, Abc_NtkFromCellRead(pNtkNew, vCopyLits, Abc_Lit2Var(iFanLit), Abc_LitIsCompl(iFanLit)) );
1043 pObjNew->pData = Mio_LibraryReadGateByName( (Mio_Library_t *)pNtkNew->pManFunc, pCells[Gia_ObjCellId(p, iLitNot)].pName, NULL );
1044 Abc_NtkFromCellWrite( vCopyLits, Abc_Lit2Var(iLitNot), Abc_LitIsCompl(iLitNot), Abc_ObjId(pObjNew) );
1045 fSkip = 1;
1046 }
1047 else // negative phase
1048 {
1049 // positive phase is available
1050 assert( Vec_IntEntry(vCopyLits, iLitNot) != -1 );
1051 }
1052 // build inverter
1053 pObjNew = Abc_NtkCreateNode( pNtkNew );
1054 Abc_ObjAddFanin( pObjNew, Abc_NtkFromCellRead(pNtkNew, vCopyLits, Abc_Lit2Var(iLit), Abc_LitIsCompl(iLitNot)) );
1055 pObjNew->pData = Mio_LibraryReadGateByName( (Mio_Library_t *)pNtkNew->pManFunc, pCells[3].pName, NULL );
1056 }
1057 else
1058 {
1059 assert( Gia_ObjCellId(p, iLit) >= 0 );
1060 pObjNew = Abc_NtkCreateNode( pNtkNew );
1061 Gia_CellForEachFanin( p, iLit, iFanLit, k )
1062 Abc_ObjAddFanin( pObjNew, Abc_NtkFromCellRead(pNtkNew, vCopyLits, Abc_Lit2Var(iFanLit), Abc_LitIsCompl(iFanLit)) );
1063 pObjNew->pData = Mio_LibraryReadGateByName( (Mio_Library_t *)pNtkNew->pManFunc, pCells[Gia_ObjCellId(p, iLit)].pName, NULL );
1064 }
1065 assert( Vec_IntEntry(vCopyLits, iLit) == -1 );
1066 Abc_NtkFromCellWrite( vCopyLits, Abc_Lit2Var(iLit), Abc_LitIsCompl(iLit), Abc_ObjId(pObjNew) );
1067 // skip next
1068 iLit += fSkip;
1069 }
1070
1071 // connect the PO nodes
1072 Gia_ManForEachCo( p, pObj, i )
1073 {
1074 pObjNew = Abc_NtkFromCellRead( pNtkNew, vCopyLits, Gia_ObjFaninId0p(p, pObj), Gia_ObjFaninC0(pObj) );
1075 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew );
1076 }
1077 // create names
1078 Abc_NtkAddDummyPiNames( pNtkNew );
1079 Abc_NtkAddDummyPoNames( pNtkNew );
1080 Abc_NtkAddDummyBoxNames( pNtkNew );
1081
1082 // decouple the PO driver nodes to reduce the number of levels
1083 if ( fFixDrivers )
1084 {
1085 int nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, !fUseBuffs );
1086 if ( fVerbose && nDupGates && !Abc_FrameReadFlag("silentmode") )
1087 {
1088 if ( fUseBuffs )
1089 printf( "Added %d buffers/inverters to decouple the CO drivers.\n", nDupGates );
1090 else
1091 printf( "Duplicated %d gates to decouple the CO drivers.\n", nDupGates );
1092 }
1093 }
1094
1095 assert( Gia_ManPiNum(p) == Abc_NtkPiNum(pNtkNew) );
1096 assert( Gia_ManPoNum(p) == Abc_NtkPoNum(pNtkNew) );
1097 assert( Gia_ManRegNum(p) == Abc_NtkLatchNum(pNtkNew) );
1098 Vec_IntFree( vCopyLits );
1099 ABC_FREE( pCells );
1100
1101 // check the resulting AIG
1102 if ( !Abc_NtkCheck( pNtkNew ) )
1103 Abc_Print( 1, "Abc_NtkFromMappedGia(): Network check has failed.\n" );
1104 return pNtkNew;
1105}
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst0(Abc_Ntk_t *pNtk)
Definition abcObj.c:612
@ ABC_FUNC_MAP
Definition abc.h:68
ABC_DLL char * Abc_FrameReadFlag(char *pFlag)
Definition mainFrame.c:69
ABC_DLL void * Abc_FrameReadLibGen()
Definition mainFrame.c:59
#define Gia_ManForEachBuf(p, pObj, i)
Definition gia.h:1210
#define Gia_ManForEachPo(p, pObj, i)
Definition gia.h:1250
#define Gia_ManForEachCell(p, i)
Definition gia.h:1181
#define Gia_ManForEachPi(p, pObj, i)
Definition gia.h:1248
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
Definition gia.h:1256
#define Gia_CellForEachFanin(p, i, iFanLit, k)
Definition gia.h:1183
struct Mio_LibraryStruct_t_ Mio_Library_t
Definition mio.h:42
Mio_Cell2_t * Mio_CollectRootsNewDefault2(int nInputs, int *pnGates, int fVerbose)
Definition mioUtils.c:877
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
Definition mioApi.c:105
struct Mio_Cell2_t_ Mio_Cell2_t
Definition mio.h:57
int nBarBufs2
Definition abc.h:175
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkFromDar()

Abc_Ntk_t * Abc_NtkFromDar ( Abc_Ntk_t * pNtkOld,
Aig_Man_t * pMan )

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description []

SideEffects []

SeeAlso []

Definition at line 419 of file abcDar.c.

420{
421 Vec_Ptr_t * vNodes;
422 Abc_Ntk_t * pNtkNew;
423 Aig_Obj_t * pObj;
424 int i;
425 assert( pMan->nAsserts == 0 );
426// assert( Aig_ManRegNum(pMan) == Abc_NtkLatchNum(pNtkOld) );
427 // perform strashing
428 pNtkNew = Abc_NtkStartFrom( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG );
429 pNtkNew->nConstrs = pMan->nConstrs;
430 pNtkNew->nBarBufs = pNtkOld->nBarBufs;
431 // transfer the pointers to the basic nodes
432 Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
433 Aig_ManForEachCi( pMan, pObj, i )
434 {
435 pObj->pData = Abc_NtkCi(pNtkNew, i);
436 // initialize logic level of the CIs
437 ((Abc_Obj_t *)pObj->pData)->Level = pObj->Level;
438 }
439 // rebuild the AIG
440 vNodes = Aig_ManDfs( pMan, 1 );
441 Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
442 if ( Aig_ObjIsBuf(pObj) )
443 pObj->pData = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
444 else
445 pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) );
446 Vec_PtrFree( vNodes );
447 // connect the PO nodes
448 Aig_ManForEachCo( pMan, pObj, i )
449 {
450 if ( pMan->nAsserts && i == Aig_ManCoNum(pMan) - pMan->nAsserts )
451 break;
452 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), (Abc_Obj_t *)Aig_ObjChild0Copy(pObj) );
453 }
454 // if there are assertions, add them
455 if ( !Abc_NtkCheck( pNtkNew ) )
456 Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed.\n" );
457//Abc_NtkPrintCiLevels( pNtkNew );
458 return pNtkNew;
459}
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition aig.h:393
unsigned Level
Definition aig.h:82
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkFromDarChoices()

Abc_Ntk_t * Abc_NtkFromDarChoices ( Abc_Ntk_t * pNtkOld,
Aig_Man_t * pMan )

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description []

SideEffects []

SeeAlso []

Definition at line 1208 of file abcDar.c.

1209{
1210 Abc_Ntk_t * pNtkNew;
1211 Aig_Obj_t * pObj, * pTemp;
1212 int i;
1213 assert( pMan->pEquivs != NULL );
1214 assert( Aig_ManBufNum(pMan) == 0 );
1215 // perform strashing
1216 pNtkNew = Abc_NtkStartFrom( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG );
1217 pNtkNew->nConstrs = pMan->nConstrs;
1218 pNtkNew->nBarBufs = pNtkOld->nBarBufs;
1219 // transfer the pointers to the basic nodes
1220 Aig_ManCleanData( pMan );
1221 Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
1222 Aig_ManForEachCi( pMan, pObj, i )
1223 pObj->pData = Abc_NtkCi(pNtkNew, i);
1224 // rebuild the AIG
1225 Aig_ManForEachNode( pMan, pObj, i )
1226 {
1227 pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) );
1228 }
1229 Aig_ManForEachNode( pMan, pObj, i ) {
1230 if ( (pTemp = Aig_ObjEquiv(pMan, pObj)) )
1231 {
1232 assert( pTemp->pData != NULL );
1233 ((Abc_Obj_t *)pObj->pData)->pData = ((Abc_Obj_t *)pTemp->pData);
1234 }
1235 }
1236 // connect the PO nodes
1237 Aig_ManForEachCo( pMan, pObj, i )
1238 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), (Abc_Obj_t *)Aig_ObjChild0Copy(pObj) );
1239 if ( !Abc_NtkCheck( pNtkNew ) )
1240 {
1241 Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed. Returning original network.\n" );
1242 Abc_NtkDelete( pNtkNew );
1243 pNtkNew = Abc_NtkDup( pNtkOld );
1244 }
1245
1246 // verify topological order
1247 if ( 0 )
1248 {
1249 Abc_Obj_t * pNode;
1250 Abc_NtkForEachNode( pNtkNew, pNode, i )
1251 if ( Abc_AigNodeIsChoice( pNode ) )
1252 {
1253 int Counter = 0;
1254 for ( pNode = Abc_ObjEquiv(pNode); pNode; pNode = Abc_ObjEquiv(pNode) )
1255 Counter++;
1256 printf( "%d ", Counter );
1257 }
1258 printf( "\n" );
1259 }
1260 return pNtkNew;
1261}
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition abc.h:464
#define Aig_ManForEachNode(p, pObj, i)
Definition aig.h:413
void Aig_ManCleanData(Aig_Man_t *p)
Definition aigUtil.c:205
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkFromDarSeq()

Abc_Ntk_t * Abc_NtkFromDarSeq ( Abc_Ntk_t * pNtkOld,
Aig_Man_t * pMan )

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description []

SideEffects []

SeeAlso []

Definition at line 1274 of file abcDar.c.

1275{
1276 Vec_Ptr_t * vNodes;
1277 Abc_Ntk_t * pNtkNew;
1278 Abc_Obj_t * pObjNew, * pFaninNew, * pFaninNew0, * pFaninNew1;
1279 Aig_Obj_t * pObj;
1280 int i;
1281// assert( Aig_ManLatchNum(pMan) > 0 );
1282 assert( pNtkOld->nBarBufs == 0 );
1283 // perform strashing
1285 pNtkNew->nConstrs = pMan->nConstrs;
1286 pNtkNew->nBarBufs = pMan->nBarBufs;
1287 // transfer the pointers to the basic nodes
1288 Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
1289 Aig_ManForEachCi( pMan, pObj, i )
1290 pObj->pData = Abc_NtkPi(pNtkNew, i);
1291 // create latches of the new network
1292 Aig_ManForEachObj( pMan, pObj, i )
1293 {
1294 pObjNew = Abc_NtkCreateLatch( pNtkNew );
1295 pFaninNew0 = Abc_NtkCreateBi( pNtkNew );
1296 pFaninNew1 = Abc_NtkCreateBo( pNtkNew );
1297 Abc_ObjAddFanin( pObjNew, pFaninNew0 );
1298 Abc_ObjAddFanin( pFaninNew1, pObjNew );
1299 Abc_LatchSetInit0( pObjNew );
1300 pObj->pData = Abc_ObjFanout0( pObjNew );
1301 }
1302 Abc_NtkAddDummyBoxNames( pNtkNew );
1303 // rebuild the AIG
1304 vNodes = Aig_ManDfs( pMan, 1 );
1305 Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
1306 {
1307 // add the first fanin
1308 pObj->pData = pFaninNew0 = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
1309 if ( Aig_ObjIsBuf(pObj) )
1310 continue;
1311 // add the second fanin
1312 pFaninNew1 = (Abc_Obj_t *)Aig_ObjChild1Copy(pObj);
1313 // create the new node
1314 if ( Aig_ObjIsExor(pObj) )
1315 pObj->pData = pObjNew = Abc_AigXor( (Abc_Aig_t *)pNtkNew->pManFunc, pFaninNew0, pFaninNew1 );
1316 else
1317 pObj->pData = pObjNew = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, pFaninNew0, pFaninNew1 );
1318 }
1319 Vec_PtrFree( vNodes );
1320 // connect the PO nodes
1321 Aig_ManForEachCo( pMan, pObj, i )
1322 {
1323 pFaninNew = (Abc_Obj_t *)Aig_ObjChild0Copy( pObj );
1324 Abc_ObjAddFanin( Abc_NtkPo(pNtkNew, i), pFaninNew );
1325 }
1326 // connect the latches
1327 Aig_ManForEachObj( pMan, pObj, i )
1328 {
1329 pFaninNew = (Abc_Obj_t *)Aig_ObjChild0Copy( pObj );
1330 Abc_ObjAddFanin( Abc_ObjFanin0(Abc_ObjFanin0((Abc_Obj_t *)pObj->pData)), pFaninNew );
1331 }
1332 if ( !Abc_NtkCheck( pNtkNew ) )
1333 Abc_Print( 1, "Abc_NtkFromIvySeq(): Network check has failed.\n" );
1334 return pNtkNew;
1335}
ABC_DLL Abc_Obj_t * Abc_AigXor(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
Definition abcAig.c:735
ABC_DLL Abc_Ntk_t * Abc_NtkStartFromNoLatches(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
Definition abcNtk.c:301
#define Aig_ManForEachObj(p, pObj, i)
Definition aig.h:403
Here is the call graph for this function:

◆ Abc_NtkFromDarSeqSweep()

Abc_Ntk_t * Abc_NtkFromDarSeqSweep ( Abc_Ntk_t * pNtkOld,
Aig_Man_t * pMan )

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description [This procedure should be called after seq sweeping, which changes the number of registers.]

SideEffects []

SeeAlso []

Definition at line 473 of file abcDar.c.

474{
475 Vec_Ptr_t * vNodes;
476 Abc_Ntk_t * pNtkNew;
477 Abc_Obj_t * pObjNew, * pLatch;
478 Aig_Obj_t * pObj, * pObjLo, * pObjLi;
479 int i, iNodeId, nDigits;
480 assert( pMan->nAsserts == 0 );
481 assert( pNtkOld->nBarBufs == 0 );
482// assert( Aig_ManRegNum(pMan) != Abc_NtkLatchNum(pNtkOld) );
483 // perform strashing
485 pNtkNew->nConstrs = pMan->nConstrs;
486 pNtkNew->nBarBufs = pMan->nBarBufs;
487 // consider the case of target enlargement
488 if ( Abc_NtkCiNum(pNtkNew) < Aig_ManCiNum(pMan) - Aig_ManRegNum(pMan) )
489 {
490 for ( i = Aig_ManCiNum(pMan) - Aig_ManRegNum(pMan) - Abc_NtkCiNum(pNtkNew); i > 0; i-- )
491 {
492 pObjNew = Abc_NtkCreatePi( pNtkNew );
493 Abc_ObjAssignName( pObjNew, Abc_ObjName(pObjNew), NULL );
494 }
495 Abc_NtkOrderCisCos( pNtkNew );
496 }
497 assert( Abc_NtkCiNum(pNtkNew) == Aig_ManCiNum(pMan) - Aig_ManRegNum(pMan) );
498 assert( Abc_NtkCoNum(pNtkNew) == Aig_ManCoNum(pMan) - Aig_ManRegNum(pMan) );
499 // transfer the pointers to the basic nodes
500 Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
501 Aig_ManForEachPiSeq( pMan, pObj, i )
502 pObj->pData = Abc_NtkCi(pNtkNew, i);
503 // create as many latches as there are registers in the manager
504 Aig_ManForEachLiLoSeq( pMan, pObjLi, pObjLo, i )
505 {
506 pObjNew = Abc_NtkCreateLatch( pNtkNew );
507 pObjLi->pData = Abc_NtkCreateBi( pNtkNew );
508 pObjLo->pData = Abc_NtkCreateBo( pNtkNew );
509 Abc_ObjAddFanin( pObjNew, (Abc_Obj_t *)pObjLi->pData );
510 Abc_ObjAddFanin( (Abc_Obj_t *)pObjLo->pData, pObjNew );
511 Abc_LatchSetInit0( pObjNew );
512 }
513 // rebuild the AIG
514 vNodes = Aig_ManDfs( pMan, 1 );
515 Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
516 if ( Aig_ObjIsBuf(pObj) )
517 pObj->pData = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
518 else
519 pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) );
520 Vec_PtrFree( vNodes );
521 // connect the PO nodes
522 Aig_ManForEachCo( pMan, pObj, i )
523 {
524// if ( pMan->nAsserts && i == Aig_ManCoNum(pMan) - pMan->nAsserts )
525// break;
526 iNodeId = Nm_ManFindIdByNameTwoTypes( pNtkNew->pManName, Abc_ObjName(Abc_NtkCo(pNtkNew, i)), ABC_OBJ_PI, ABC_OBJ_BO );
527 if ( iNodeId >= 0 )
528 pObjNew = Abc_NtkObj( pNtkNew, iNodeId );
529 else
530 pObjNew = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj);
531 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew );
532 }
533 if ( pMan->vFlopNums == NULL )
534 Abc_NtkAddDummyBoxNames( pNtkNew );
535 else
536 {
537/*
538 {
539 int i, k, iFlop, Counter = 0;
540 FILE * pFile;
541 pFile = fopen( "out.txt", "w" );
542 fAbc_Print( 1, pFile, "The total of %d registers were removed (out of %d):\n",
543 Abc_NtkLatchNum(pNtkOld)-Vec_IntSize(pMan->vFlopNums), Abc_NtkLatchNum(pNtkOld) );
544 for ( i = 0; i < Abc_NtkLatchNum(pNtkOld); i++ )
545 {
546 Vec_IntForEachEntry( pMan->vFlopNums, iFlop, k )
547 {
548 if ( i == iFlop )
549 break;
550 }
551 if ( k == Vec_IntSize(pMan->vFlopNums) )
552 fAbc_Print( 1, pFile, "%6d (%6d) : %s\n", ++Counter, i, Abc_ObjName( Abc_ObjFanout0(Abc_NtkBox(pNtkOld, i)) ) );
553 }
554 fclose( pFile );
555 //Abc_Print( 1, "\n" );
556 }
557*/
558 assert( Abc_NtkBoxNum(pNtkOld) == Abc_NtkLatchNum(pNtkOld) );
559 nDigits = Abc_Base10Log( Abc_NtkLatchNum(pNtkNew) );
560 Abc_NtkForEachLatch( pNtkNew, pObjNew, i )
561 {
562 pLatch = Abc_NtkBox( pNtkOld, Vec_IntEntry( pMan->vFlopNums, i ) );
563 iNodeId = Nm_ManFindIdByName( pNtkNew->pManName, Abc_ObjName(Abc_ObjFanout0(pLatch)), ABC_OBJ_PO );
564 if ( iNodeId >= 0 )
565 {
566 Abc_ObjAssignName( pObjNew, Abc_ObjNameDummy("l", i, nDigits), NULL );
567 Abc_ObjAssignName( Abc_ObjFanin0(pObjNew), Abc_ObjNameDummy("li", i, nDigits), NULL );
568 Abc_ObjAssignName( Abc_ObjFanout0(pObjNew), Abc_ObjNameDummy("lo", i, nDigits), NULL );
569//Abc_Print( 1, "happening %s -> %s\n", Abc_ObjName(Abc_ObjFanin0(pObjNew)), Abc_ObjName(Abc_ObjFanout0(pObjNew)) );
570 continue;
571 }
572 Abc_ObjAssignName( pObjNew, Abc_ObjName(pLatch), NULL );
573 Abc_ObjAssignName( Abc_ObjFanin0(pObjNew), Abc_ObjName(Abc_ObjFanin0(pLatch)), NULL );
574 Abc_ObjAssignName( Abc_ObjFanout0(pObjNew), Abc_ObjName(Abc_ObjFanout0(pLatch)), NULL );
575 }
576 }
577 // if there are assertions, add them
578 if ( !Abc_NtkCheck( pNtkNew ) )
579 Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed.\n" );
580 return pNtkNew;
581}
@ ABC_OBJ_BO
Definition abc.h:92
@ ABC_OBJ_PI
Definition abc.h:89
@ ABC_OBJ_PO
Definition abc.h:90
ABC_DLL char * Abc_ObjNameDummy(char *pPrefix, int Num, int nDigits)
Definition abcNames.c:122
ABC_DLL void Abc_NtkOrderCisCos(Abc_Ntk_t *pNtk)
Definition abcUtil.c:76
int Nm_ManFindIdByNameTwoTypes(Nm_Man_t *p, char *pName, int Type1, int Type2)
Definition nmApi.c:239
int Nm_ManFindIdByName(Nm_Man_t *p, char *pName, int Type)
Definition nmApi.c:219
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_NtkFromGiaCollapse()

int Abc_NtkFromGiaCollapse ( Gia_Man_t * pGia)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 676 of file abcDar.c.

677{
678 Aig_Man_t * pMan = Gia_ManToAig( pGia, 0 ); int Res;
679 Abc_Ntk_t * pNtk = Abc_NtkFromAigPhase( pMan ), * pTemp;
680 //pNtk->pName = Extra_UtilStrsav(pGia->pName);
681 Aig_ManStop( pMan );
682 // collapse the network
683 pNtk = Abc_NtkCollapse( pTemp = pNtk, 10000, 0, 1, 0, 0, 0 );
684 Abc_NtkDelete( pTemp );
685 if ( pNtk == NULL )
686 return 0;
687 Res = Abc_NtkGetBddNodeNum( pNtk );
688 Abc_NtkDelete( pNtk );
689 return Res == 0;
690}
ABC_DLL Abc_Ntk_t * Abc_NtkCollapse(Abc_Ntk_t *pNtk, int fBddSizeMax, int fDualRail, int fReorder, int fReverse, int fDumpOrder, int fVerbose)
DECLARATIONS ///.
ABC_DLL int Abc_NtkGetBddNodeNum(Abc_Ntk_t *pNtk)
Definition abcUtil.c:247
Aig_Man_t * Gia_ManToAig(Gia_Man_t *p, int fChoices)
Definition giaAig.c:318
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkFromMappedGia()

Abc_Ntk_t * Abc_NtkFromMappedGia ( Gia_Man_t * p,
int fFindEnables,
int fUseBuffs )

Definition at line 768 of file abcDar.c.

769{
770 int fVerbose = 0;
771 int fDuplicate = 0;
772 Abc_Ntk_t * pNtkNew;
773 Abc_Obj_t * pObjNew, * pObjNewLi, * pObjNewLo, * pConst0 = NULL;
774 Gia_Obj_t * pObj, * pObjLi, * pObjLo;
775 Vec_Ptr_t * vReflect;
776 int i, k, iFan, nDupGates, nCountMux = 0;
777 assert( Gia_ManHasMapping(p) || p->pMuxes || fFindEnables );
778 assert( !fFindEnables || !p->pMuxes );
779 pNtkNew = Abc_NtkAlloc( ABC_NTK_LOGIC, Gia_ManHasMapping(p) ? ABC_FUNC_AIG : ABC_FUNC_SOP, 1 );
780 // duplicate the name and the spec
781 pNtkNew->pName = Extra_UtilStrsav(p->pName);
782 pNtkNew->pSpec = Extra_UtilStrsav(p->pSpec);
784 // create constant
785 pConst0 = Abc_NtkCreateNodeConst0( pNtkNew );
786 Gia_ManConst0(p)->Value = Abc_ObjId(pConst0);
787 // create PIs
788 Gia_ManForEachPi( p, pObj, i )
789 pObj->Value = Abc_ObjId( Abc_NtkCreatePi( pNtkNew ) );
790 // create POs
791 Gia_ManForEachPo( p, pObj, i )
792 pObj->Value = Abc_ObjId( Abc_NtkCreatePo( pNtkNew ) );
793 // create as many latches as there are registers in the manager
794 Gia_ManForEachRiRo( p, pObjLi, pObjLo, i )
795 {
796 pObjNew = Abc_NtkCreateLatch( pNtkNew );
797 pObjNewLi = Abc_NtkCreateBi( pNtkNew );
798 pObjNewLo = Abc_NtkCreateBo( pNtkNew );
799 Abc_ObjAddFanin( pObjNew, pObjNewLi );
800 Abc_ObjAddFanin( pObjNewLo, pObjNew );
801 pObjLi->Value = Abc_ObjId( pObjNewLi );
802 pObjLo->Value = Abc_ObjId( pObjNewLo );
803 Abc_LatchSetInit0( pObjNew );
804 }
805 // rebuild the AIG
806 if ( fFindEnables )
807 {
808 Gia_ManForEachCo( p, pObj, i )
809 {
810 pObjNew = NULL;
811 if ( Gia_ObjIsRi(p, pObj) && Gia_ObjIsMuxType(Gia_ObjFanin0(pObj)) )
812 {
813 int iObjRo = Gia_ObjRiToRoId( p, Gia_ObjId(p, pObj) );
814 int iLitE, iLitT, iCtrl = Gia_ObjRecognizeMuxLits( p, Gia_ObjFanin0(pObj), &iLitT, &iLitE );
815 iLitE = Abc_LitNotCond( iLitE, Gia_ObjFaninC0(pObj) );
816 iLitT = Abc_LitNotCond( iLitT, Gia_ObjFaninC0(pObj) );
817 if ( Abc_Lit2Var(iLitT) == iObjRo )
818 {
819 int iTemp = iLitE;
820 iLitE = iLitT;
821 iLitT = iTemp;
822 iCtrl = Abc_LitNot( iCtrl );
823 }
824 if ( Abc_Lit2Var(iLitE) == iObjRo )
825 {
826 Abc_Obj_t * pObjCtrl = Abc_NtkFromMappedGia_rec( pNtkNew, p, Abc_Lit2Var(iCtrl), Abc_LitIsCompl(iCtrl) );
827 Abc_Obj_t * pObjNodeT = Abc_NtkFromMappedGia_rec( pNtkNew, p, Abc_Lit2Var(iLitT), Abc_LitIsCompl(iLitT) );
828 Abc_Obj_t * pObjNodeE = Abc_NtkFromMappedGia_rec( pNtkNew, p, Abc_Lit2Var(iLitE), Abc_LitIsCompl(iLitE) );
829 pObjNew = Abc_NtkCreateNode( pNtkNew );
830 Abc_ObjAddFanin( pObjNew, pObjCtrl );
831 Abc_ObjAddFanin( pObjNew, pObjNodeT );
832 Abc_ObjAddFanin( pObjNew, pObjNodeE );
833 pObjNew->pData = Abc_SopCreateMux( (Mem_Flex_t *)pNtkNew->pManFunc );
834 nCountMux++;
835 }
836 }
837 if ( pObjNew == NULL )
838 pObjNew = Abc_NtkFromMappedGia_rec( pNtkNew, p, Gia_ObjFaninId0p(p, pObj), Gia_ObjFaninC0(pObj) );
839 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew );
840 }
841 }
842 else if ( p->pMuxes )
843 {
844 Gia_ManForEachAnd( p, pObj, i )
845 {
846 pObjNew = Abc_NtkCreateNode( pNtkNew );
847 if ( Gia_ObjIsMuxId(p, i) )
848 {
849 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin2(p, pObj))) );
850 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin1(pObj))) );
851 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin0(pObj))) );
852 pObjNew->pData = Abc_SopCreateMux( (Mem_Flex_t *)pNtkNew->pManFunc );
853 if ( Gia_ObjFaninC2(p, pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 0 );
854 if ( Gia_ObjFaninC1(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 1 );
855 if ( Gia_ObjFaninC0(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 2 );
856 }
857 else if ( Gia_ObjIsXor(pObj) )
858 {
859 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin0(pObj))) );
860 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin1(pObj))) );
861 pObjNew->pData = Abc_SopCreateXor( (Mem_Flex_t *)pNtkNew->pManFunc, 2 );
862 if ( Gia_ObjFaninC0(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 0 );
863 if ( Gia_ObjFaninC1(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 1 );
864 }
865 else
866 {
867 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin0(pObj))) );
868 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin1(pObj))) );
869 pObjNew->pData = Abc_SopCreateAnd( (Mem_Flex_t *)pNtkNew->pManFunc, 2, NULL );
870 if ( Gia_ObjFaninC0(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 0 );
871 if ( Gia_ObjFaninC1(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 1 );
872 }
873 pObj->Value = Abc_ObjId( pObjNew );
874 }
875 }
876 else
877 {
878 vReflect = Vec_PtrStart( Gia_ManObjNum(p) );
879 Gia_ManForEachLut( p, i )
880 {
881 pObj = Gia_ManObj(p, i);
882 assert( pObj->Value == ~0 );
883 if ( Gia_ObjLutSize(p, i) == 0 )
884 {
885 pObj->Value = Abc_ObjId(pConst0);
886 continue;
887 }
888 pObjNew = Abc_NtkCreateNode( pNtkNew );
889 Gia_LutForEachFanin( p, i, iFan, k )
890 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ManObj(p, iFan))) );
891 pObjNew->pData = Abc_ObjHopFromGia( (Hop_Man_t *)pNtkNew->pManFunc, p, i, vReflect );
892 pObjNew->fPersist = Gia_ObjLutIsMux(p, i) && Gia_ObjLutSize(p, i) == 3;
893 pObj->Value = Abc_ObjId( pObjNew );
894 }
895 Vec_PtrFree( vReflect );
896 }
897 //if ( fFindEnables )
898 // printf( "Extracted %d flop enable signals.\n", nCountMux );
899 // connect the PO nodes
900 if ( !fFindEnables )
901 Gia_ManForEachCo( p, pObj, i )
902 {
903 pObjNew = Abc_NtkObj( pNtkNew, Gia_ObjValue(Gia_ObjFanin0(pObj)) );
904 Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), Abc_ObjNotCond( pObjNew, Gia_ObjFaninC0(pObj) ) );
905 }
906 // create names
907 Abc_NtkAddDummyPiNames( pNtkNew );
908 Abc_NtkAddDummyPoNames( pNtkNew );
909 Abc_NtkAddDummyBoxNames( pNtkNew );
910
911 // decouple the PO driver nodes to reduce the number of levels
912 nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, !fUseBuffs );
913 if ( fVerbose && nDupGates && !Abc_FrameReadFlag("silentmode") )
914 {
915 if ( !fDuplicate )
916 printf( "Added %d buffers/inverters to decouple the CO drivers.\n", nDupGates );
917 else
918 printf( "Duplicated %d gates to decouple the CO drivers.\n", nDupGates );
919 }
920 // remove const node if it is not used
921 if ( !Abc_ObjIsNone(pConst0) && Abc_ObjFanoutNum(pConst0) == 0 )
922 Abc_NtkDeleteObj( pConst0 );
923
924 assert( Gia_ManPiNum(p) == Abc_NtkPiNum(pNtkNew) );
925 assert( Gia_ManPoNum(p) == Abc_NtkPoNum(pNtkNew) );
926 assert( Gia_ManRegNum(p) == Abc_NtkLatchNum(pNtkNew) );
927
928 // check the resulting AIG
929 if ( !Abc_NtkCheck( pNtkNew ) )
930 Abc_Print( 1, "Abc_NtkFromMappedGia(): Network check has failed.\n" );
931 return pNtkNew;
932}
Abc_Obj_t * Abc_NtkFromMappedGia_rec(Abc_Ntk_t *pNtkNew, Gia_Man_t *p, int iObj, int fAddInv)
Definition abcDar.c:746
Hop_Obj_t * Abc_ObjHopFromGia(Hop_Man_t *pHopMan, Gia_Man_t *p, int GiaId, Vec_Ptr_t *vCopies)
Definition abcDar.c:721
ABC_DLL char * Abc_SopCreateAnd(Mem_Flex_t *pMan, int nVars, int *pfCompl)
Definition abcSop.c:168
ABC_DLL void Abc_SopComplementVar(char *pSop, int iVar)
Definition abcSop.c:678
ABC_DLL char * Abc_SopCreateXor(Mem_Flex_t *pMan, int nVars)
Definition abcSop.c:280
ABC_DLL char * Abc_SopCreateMux(Mem_Flex_t *pMan)
Definition abcSop.c:335
#define Gia_ManForEachAnd(p, pObj, i)
Definition gia.h:1214
int Gia_ObjRecognizeMuxLits(Gia_Man_t *p, Gia_Obj_t *pNode, int *iLitT, int *iLitE)
Definition giaUtil.c:1133
#define Gia_ManForEachLut(p, i)
Definition gia.h:1157
#define Gia_LutForEachFanin(p, i, iFan, k)
Definition gia.h:1161
int Gia_ObjIsMuxType(Gia_Obj_t *pNode)
Definition giaUtil.c:982
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Definition hop.h:49
unsigned fPersist
Definition abc.h:139
unsigned Value
Definition gia.h:89
Here is the call graph for this function:

◆ Abc_NtkFromMappedGia_rec()

Abc_Obj_t * Abc_NtkFromMappedGia_rec ( Abc_Ntk_t * pNtkNew,
Gia_Man_t * p,
int iObj,
int fAddInv )

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

Synopsis [Converts the network from the mapped GIA manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 746 of file abcDar.c.

747{
748 Abc_Obj_t * pObjNew;
749 Gia_Obj_t * pObj = Gia_ManObj(p, iObj);
750 if ( Gia_ObjValue(pObj) >= 0 )
751 pObjNew = Abc_NtkObj( pNtkNew, Gia_ObjValue(pObj) );
752 else
753 {
754 Abc_NtkFromMappedGia_rec( pNtkNew, p, Gia_ObjFaninId0(pObj, iObj), 0 );
755 Abc_NtkFromMappedGia_rec( pNtkNew, p, Gia_ObjFaninId1(pObj, iObj), 0 );
756 pObjNew = Abc_NtkCreateNode( pNtkNew );
757 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin0(pObj))) );
758 Abc_ObjAddFanin( pObjNew, Abc_NtkObj(pNtkNew, Gia_ObjValue(Gia_ObjFanin1(pObj))) );
759 pObjNew->pData = Abc_SopCreateAnd( (Mem_Flex_t *)pNtkNew->pManFunc, 2, NULL );
760 if ( Gia_ObjFaninC0(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 0 );
761 if ( Gia_ObjFaninC1(pObj) ) Abc_SopComplementVar( (char *)pObjNew->pData, 1 );
762 pObj->Value = Abc_ObjId( pObjNew );
763 }
764 if ( fAddInv )
765 pObjNew = Abc_NtkCreateNodeInv(pNtkNew, pObjNew);
766 return pObjNew;
767}
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
Definition abcObj.c:674
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkGetLatchValues()

Vec_Int_t * Abc_NtkGetLatchValues ( Abc_Ntk_t * pNtk)

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

Synopsis [Collect latch values.]

Description []

SideEffects []

SeeAlso []

Definition at line 1392 of file abcDar.c.

1393{
1394 Vec_Int_t * vInits;
1395 Abc_Obj_t * pLatch;
1396 int i;
1397 vInits = Vec_IntAlloc( Abc_NtkLatchNum(pNtk) );
1398 Abc_NtkForEachLatch( pNtk, pLatch, i )
1399 {
1400 if ( Abc_LatchIsInit0(pLatch) )
1401 Vec_IntPush( vInits, 0 );
1402 else if ( Abc_LatchIsInit1(pLatch) )
1403 Vec_IntPush( vInits, 1 );
1404 else if ( Abc_LatchIsInitDc(pLatch) )
1405 Vec_IntPush( vInits, 2 );
1406 else
1407 assert( 0 );
1408 }
1409 return vInits;
1410}
Here is the caller graph for this function:

◆ Abc_NtkInter()

Abc_Ntk_t * Abc_NtkInter ( Abc_Ntk_t * pNtkOn,
Abc_Ntk_t * pNtkOff,
int fRelation,
int fVerbose )

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

Synopsis [Interplates two networks.]

Description []

SideEffects []

SeeAlso []

Definition at line 3956 of file abcDar.c.

3957{
3958 Abc_Ntk_t * pNtkOn1, * pNtkOff1, * pNtkInter1, * pNtkInter;
3959 Abc_Obj_t * pObj;
3960 int i; //, clk = Abc_Clock();
3961 if ( Abc_NtkCoNum(pNtkOn) != Abc_NtkCoNum(pNtkOff) )
3962 {
3963 Abc_Print( 1, "Currently works only for networks with equal number of POs.\n" );
3964 return NULL;
3965 }
3966 // compute the fast interpolation time
3967// Abc_NtkInterFast( pNtkOn, pNtkOff, fVerbose );
3968 // consider the case of one output
3969 if ( Abc_NtkCoNum(pNtkOn) == 1 )
3970 return Abc_NtkInterOne( pNtkOn, pNtkOff, fRelation, fVerbose );
3971 // start the new network
3972 pNtkInter = Abc_NtkAlloc( ABC_NTK_STRASH, ABC_FUNC_AIG, 1 );
3973 pNtkInter->pName = Extra_UtilStrsav(pNtkOn->pName);
3974 Abc_NtkForEachPi( pNtkOn, pObj, i )
3975 Abc_NtkDupObj( pNtkInter, pObj, 1 );
3976 // process each POs separately
3977timeCnf = 0;
3978timeSat = 0;
3979timeInt = 0;
3980 Abc_NtkForEachCo( pNtkOn, pObj, i )
3981 {
3982 pNtkOn1 = Abc_NtkCreateCone( pNtkOn, Abc_ObjFanin0(pObj), Abc_ObjName(pObj), 1 );
3983 if ( Abc_ObjFaninC0(pObj) )
3984 Abc_ObjXorFaninC( Abc_NtkPo(pNtkOn1, 0), 0 );
3985
3986 pObj = Abc_NtkCo(pNtkOff, i);
3987 pNtkOff1 = Abc_NtkCreateCone( pNtkOff, Abc_ObjFanin0(pObj), Abc_ObjName(pObj), 1 );
3988 if ( Abc_ObjFaninC0(pObj) )
3989 Abc_ObjXorFaninC( Abc_NtkPo(pNtkOff1, 0), 0 );
3990
3991 if ( Abc_NtkNodeNum(pNtkOn1) == 0 )
3992 pNtkInter1 = Abc_NtkDup( pNtkOn1 );
3993 else if ( Abc_NtkNodeNum(pNtkOff1) == 0 )
3994 {
3995 pNtkInter1 = Abc_NtkDup( pNtkOff1 );
3996 Abc_ObjXorFaninC( Abc_NtkPo(pNtkInter1, 0), 0 );
3997 }
3998 else
3999 pNtkInter1 = Abc_NtkInterOne( pNtkOn1, pNtkOff1, 0, fVerbose );
4000 if ( pNtkInter1 )
4001 {
4002 Abc_NtkAppend( pNtkInter, pNtkInter1, 1 );
4003 Abc_NtkDelete( pNtkInter1 );
4004 }
4005
4006 Abc_NtkDelete( pNtkOn1 );
4007 Abc_NtkDelete( pNtkOff1 );
4008 }
4009// ABC_PRT( "CNF", timeCnf );
4010// ABC_PRT( "SAT", timeSat );
4011// ABC_PRT( "Int", timeInt );
4012// ABC_PRT( "Slow interpolation time", Abc_Clock() - clk );
4013
4014 // return the network
4015 if ( !Abc_NtkCheck( pNtkInter ) )
4016 Abc_Print( 1, "Abc_NtkAttachBottom(): Network check has failed.\n" );
4017 return pNtkInter;
4018}
Abc_Ntk_t * Abc_NtkInterOne(Abc_Ntk_t *pNtkOn, Abc_Ntk_t *pNtkOff, int fRelation, int fVerbose)
Definition abcDar.c:3841
ABC_DLL Abc_Ntk_t * Abc_NtkCreateCone(Abc_Ntk_t *pNtk, Abc_Obj_t *pNode, char *pNodeName, int fUseAllCis)
Definition abcNtk.c:925
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
Definition abcObj.c:342
#define Abc_NtkForEachPi(pNtk, pPi, i)
Definition abc.h:516
ABC_DLL int Abc_NtkAppend(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int fAddPos)
Definition abcStrash.c:320
abctime timeInt
Definition abcDar.c:3943
ABC_NAMESPACE_IMPL_START abctime timeCnf
DECLARATIONS ///.
Definition abcDar.c:3941
abctime timeSat
Definition abcDar.c:3942
Here is the call graph for this function:

◆ Abc_NtkInterFast()

void Abc_NtkInterFast ( Abc_Ntk_t * pNtkOn,
Abc_Ntk_t * pNtkOff,
int fVerbose )

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

Synopsis [Fast interpolation.]

Description []

SideEffects []

SeeAlso []

Definition at line 3925 of file abcDar.c.

3926{
3927 extern void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose );
3928 Aig_Man_t * pManOn, * pManOff;
3929 // create internal AIGs
3930 pManOn = Abc_NtkToDar( pNtkOn, 0, 0 );
3931 if ( pManOn == NULL )
3932 return;
3933 pManOff = Abc_NtkToDar( pNtkOff, 0, 0 );
3934 if ( pManOff == NULL )
3935 return;
3936 Aig_ManInterFast( pManOn, pManOff, fVerbose );
3937 Aig_ManStop( pManOn );
3938 Aig_ManStop( pManOff );
3939}
void Aig_ManInterFast(Aig_Man_t *pManOn, Aig_Man_t *pManOff, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition aigInter.c:51
Here is the call graph for this function:

◆ Abc_NtkInterOne()

Abc_Ntk_t * Abc_NtkInterOne ( Abc_Ntk_t * pNtkOn,
Abc_Ntk_t * pNtkOff,
int fRelation,
int fVerbose )

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

Synopsis [Interplates two networks.]

Description []

SideEffects []

SeeAlso []

Definition at line 3841 of file abcDar.c.

3842{
3843 extern Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fRelation, int fVerbose );
3844 Abc_Ntk_t * pNtkAig;
3845 Aig_Man_t * pManOn, * pManOff, * pManAig;
3846 if ( Abc_NtkCoNum(pNtkOn) != 1 || Abc_NtkCoNum(pNtkOff) != 1 )
3847 {
3848 Abc_Print( 1, "Currently works only for single-output networks.\n" );
3849 return NULL;
3850 }
3851 if ( Abc_NtkCiNum(pNtkOn) != Abc_NtkCiNum(pNtkOff) )
3852 {
3853 Abc_Print( 1, "The number of PIs should be the same.\n" );
3854 return NULL;
3855 }
3856 // create internal AIGs
3857 pManOn = Abc_NtkToDar( pNtkOn, 0, 0 );
3858 if ( pManOn == NULL )
3859 return NULL;
3860 pManOff = Abc_NtkToDar( pNtkOff, 0, 0 );
3861 if ( pManOff == NULL )
3862 return NULL;
3863 // derive the interpolant
3864 pManAig = Aig_ManInter( pManOn, pManOff, fRelation, fVerbose );
3865 if ( pManAig == NULL )
3866 {
3867 Abc_Print( 1, "Interpolant computation failed.\n" );
3868 return NULL;
3869 }
3870 Aig_ManStop( pManOn );
3871 Aig_ManStop( pManOff );
3872 // for the relation, add an extra input
3873 if ( fRelation )
3874 {
3875 Abc_Obj_t * pObj;
3876 pObj = Abc_NtkCreatePi( pNtkOff );
3877 Abc_ObjAssignName( pObj, "New", NULL );
3878 }
3879 // create logic network
3880 pNtkAig = Abc_NtkFromDar( pNtkOff, pManAig );
3881 Aig_ManStop( pManAig );
3882 return pNtkAig;
3883}
Aig_Man_t * Aig_ManInter(Aig_Man_t *pManOn, Aig_Man_t *pManOff, int fRelation, int fVerbose)
Definition aigInter.c:149
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkPartitionedSat()

int Abc_NtkPartitionedSat ( Abc_Ntk_t * pNtk,
int nAlgo,
int nPartSize,
int nConfPart,
int nConfTotal,
int fAlignPol,
int fSynthesize,
int fVerbose )

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

Synopsis [Solves combinational miter using a SAT solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 1940 of file abcDar.c.

1941{
1942 extern int Aig_ManPartitionedSat( Aig_Man_t * pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose );
1943 Aig_Man_t * pMan;
1944 int RetValue;//, clk = Abc_Clock();
1945 assert( Abc_NtkIsStrash(pNtk) );
1946 assert( Abc_NtkLatchNum(pNtk) == 0 );
1947 pMan = Abc_NtkToDar( pNtk, 0, 0 );
1948 RetValue = Aig_ManPartitionedSat( pMan, nAlgo, nPartSize, nConfPart, nConfTotal, fAlignPol, fSynthesize, fVerbose );
1949 pNtk->pModel = (int *)pMan->pData, pMan->pData = NULL;
1950 Aig_ManStop( pMan );
1951 return RetValue;
1952}
int Aig_ManPartitionedSat(Aig_Man_t *p, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose)
Definition aigPartSat.c:491
Here is the call graph for this function:

◆ Abc_NtkPhaseAbstract()

Abc_Ntk_t * Abc_NtkPhaseAbstract ( Abc_Ntk_t * pNtk,
int nFrames,
int nPref,
int fIgnore,
int fPrint,
int fVerbose )

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4112 of file abcDar.c.

4113{
4114 extern Aig_Man_t * Saig_ManPhaseAbstract( Aig_Man_t * p, Vec_Int_t * vInits, int nFrames, int nPref, int fIgnore, int fPrint, int fVerbose );
4115 Vec_Int_t * vInits;
4116 Abc_Ntk_t * pNtkAig;
4117 Aig_Man_t * pMan, * pTemp;
4118 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4119 if ( pMan == NULL )
4120 return NULL;
4121 vInits = Abc_NtkGetLatchValues(pNtk);
4122 pMan = Saig_ManPhaseAbstract( pTemp = pMan, vInits, nFrames, nPref, fIgnore, fPrint, fVerbose );
4123 Vec_IntFree( vInits );
4124 Aig_ManStop( pTemp );
4125 if ( pMan == NULL )
4126 return NULL;
4127 pNtkAig = Abc_NtkFromAigPhase( pMan );
4128// pNtkAig->pName = Extra_UtilStrsav(pNtk->pName);
4129// pNtkAig->pSpec = Extra_UtilStrsav(pNtk->pSpec);
4130 Aig_ManStop( pMan );
4131 return pNtkAig;
4132}
Vec_Int_t * Abc_NtkGetLatchValues(Abc_Ntk_t *pNtk)
Definition abcDar.c:1392
Aig_Man_t * Saig_ManPhaseAbstract(Aig_Man_t *p, Vec_Int_t *vInits, int nFrames, int nPref, int fIgnore, int fPrint, int fVerbose)
Definition saigPhase.c:911
Here is the call graph for this function:

◆ Abc_NtkPhaseFrameNum()

int Abc_NtkPhaseFrameNum ( Abc_Ntk_t * pNtk)

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

Synopsis [Performs phase abstraction.]

Description []

SideEffects []

SeeAlso []

Definition at line 4145 of file abcDar.c.

4146{
4147 extern int Saig_ManPhaseFrameNum( Aig_Man_t * p, Vec_Int_t * vInits );
4148 Vec_Int_t * vInits;
4149 Aig_Man_t * pMan;
4150 int nFrames;
4151 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4152 if ( pMan == NULL )
4153 return 1;
4154 vInits = Abc_NtkGetLatchValues(pNtk);
4155 nFrames = Saig_ManPhaseFrameNum( pMan, vInits );
4156 Vec_IntFree( vInits );
4157 Aig_ManStop( pMan );
4158 return nFrames;
4159}
int Saig_ManPhaseFrameNum(Aig_Man_t *p, Vec_Int_t *vInits)
Definition saigPhase.c:841
Here is the call graph for this function:

◆ Abc_NtkPrintLatchEquivClasses()

void Abc_NtkPrintLatchEquivClasses ( Abc_Ntk_t * pNtk,
Aig_Man_t * pAig )

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

Synopsis [Print Latch Equivalence Classes.]

Description []

SideEffects []

SeeAlso []

Definition at line 2141 of file abcDar.c.

2142{
2143 int header_dumped = 0;
2144 int num_orig_latches = Abc_NtkLatchNum(pNtk);
2145 char **pNames = ABC_ALLOC( char *, num_orig_latches );
2146 int *p_irrelevant = ABC_ALLOC( int, num_orig_latches );
2147 char * pFlopName, * pReprName;
2148 Aig_Obj_t * pFlop, * pRepr;
2149 Abc_Obj_t * pNtkFlop;
2150 int repr_idx;
2151 int i;
2152
2153 Abc_NtkForEachLatch( pNtk, pNtkFlop, i )
2154 {
2155 char *temp_name = Abc_ObjName( Abc_ObjFanout0(pNtkFlop) );
2156 pNames[i] = ABC_ALLOC( char , strlen(temp_name)+1);
2157 strcpy(pNames[i], temp_name);
2158 }
2159 i = 0;
2160
2161 Aig_ManSetCioIds( pAig );
2162 Saig_ManForEachLo( pAig, pFlop, i )
2163 {
2164 p_irrelevant[i] = false;
2165
2166 pFlopName = pNames[i];
2167
2168 pRepr = Aig_ObjRepr(pAig, pFlop);
2169
2170 if ( pRepr == NULL )
2171 {
2172 // Abc_Print( 1, "Nothing equivalent to flop %s\n", pFlopName);
2173// p_irrelevant[i] = true;
2174 continue;
2175 }
2176
2177 if (!header_dumped)
2178 {
2179 Abc_Print( 1, "Here are the flop equivalences:\n");
2180 header_dumped = true;
2181 }
2182
2183 // pRepr is representative of the equivalence class, to which pFlop belongs
2184 if ( Aig_ObjIsConst1(pRepr) )
2185 {
2186 Abc_Print( 1, "Original flop %s is proved equivalent to constant.\n", pFlopName );
2187 // Abc_Print( 1, "Original flop # %d is proved equivalent to constant.\n", i );
2188 continue;
2189 }
2190
2191 assert( Saig_ObjIsLo( pAig, pRepr ) );
2192 repr_idx = Aig_ObjCioId(pRepr) - Saig_ManPiNum(pAig);
2193 pReprName = pNames[repr_idx];
2194 Abc_Print( 1, "Original flop %s is proved equivalent to flop %s.\n", pFlopName, pReprName );
2195 // Abc_Print( 1, "Original flop # %d is proved equivalent to flop # %d.\n", i, repr_idx );
2196 }
2197
2198 header_dumped = false;
2199 for (i=0; i<num_orig_latches; ++i)
2200 {
2201 if (p_irrelevant[i])
2202 {
2203 if (!header_dumped)
2204 {
2205 Abc_Print( 1, "The following flops have been deemed irrelevant:\n");
2206 header_dumped = true;
2207 }
2208 Abc_Print( 1, "%s ", pNames[i]);
2209 }
2210
2211 ABC_FREE(pNames[i]);
2212 }
2213 if (header_dumped)
2214 Abc_Print( 1, "\n");
2215
2216 ABC_FREE(pNames);
2217 ABC_FREE(p_irrelevant);
2218}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
void Aig_ManSetCioIds(Aig_Man_t *p)
Definition aigUtil.c:978
#define Saig_ManForEachLo(p, pObj, i)
Definition saig.h:96
int strlen()
char * strcpy()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkPrintSccs()

void Abc_NtkPrintSccs ( Abc_Ntk_t * pNtk,
int fVerbose )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 4031 of file abcDar.c.

4032{
4033// extern Vec_Ptr_t * Aig_ManRegPartitionLinear( Aig_Man_t * pAig, int nPartSize );
4034 Aig_Man_t * pMan;
4035 pMan = Abc_NtkToDar( pNtk, 0, 1 );
4036 if ( pMan == NULL )
4037 return;
4038 Aig_ManComputeSccs( pMan );
4039// Aig_ManRegPartitionLinear( pMan, 1000 );
4040 Aig_ManStop( pMan );
4041}
void Aig_ManComputeSccs(Aig_Man_t *p)
Definition aigScl.c:489
Here is the call graph for this function:

◆ Abc_NtkToDar()

Aig_Man_t * Abc_NtkToDar ( Abc_Ntk_t * pNtk,
int fExors,
int fRegisters )

DECLARATIONS ///.

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description [Assumes that registers are ordered after PIs/POs.]

SideEffects []

SeeAlso []

Definition at line 237 of file abcDar.c.

238{
239 Vec_Ptr_t * vNodes;
240 Aig_Man_t * pMan;
241 Aig_Obj_t * pObjNew;
242 Abc_Obj_t * pObj;
243 int i, nNodes, nDontCares;
244 // make sure the latches follow PIs/POs
245 if ( fRegisters )
246 {
247 assert( Abc_NtkBoxNum(pNtk) == Abc_NtkLatchNum(pNtk) );
248 Abc_NtkForEachCi( pNtk, pObj, i )
249 if ( i < Abc_NtkPiNum(pNtk) )
250 {
251 assert( Abc_ObjIsPi(pObj) );
252 if ( !Abc_ObjIsPi(pObj) )
253 Abc_Print( 1, "Abc_NtkToDar(): Temporary bug: The PI ordering is wrong!\n" );
254 }
255 else
256 assert( Abc_ObjIsBo(pObj) );
257 Abc_NtkForEachCo( pNtk, pObj, i )
258 if ( i < Abc_NtkPoNum(pNtk) )
259 {
260 assert( Abc_ObjIsPo(pObj) );
261 if ( !Abc_ObjIsPo(pObj) )
262 Abc_Print( 1, "Abc_NtkToDar(): Temporary bug: The PO ordering is wrong!\n" );
263 }
264 else
265 assert( Abc_ObjIsBi(pObj) );
266 // print warning about initial values
267 nDontCares = 0;
268 Abc_NtkForEachLatch( pNtk, pObj, i )
269 if ( Abc_LatchIsInitDc(pObj) )
270 {
271 Abc_LatchSetInit0(pObj);
272 nDontCares++;
273 }
274 if ( nDontCares )
275 {
276 Abc_Print( 1, "Warning: %d registers in this network have don't-care init values.\n", nDontCares );
277 Abc_Print( 1, "The don't-care are assumed to be 0. The result may not verify.\n" );
278 Abc_Print( 1, "Use command \"print_latch\" to see the init values of registers.\n" );
279 Abc_Print( 1, "Use command \"zero\" to convert or \"init\" to change the values.\n" );
280 }
281 }
282 // create the manager
283 pMan = Aig_ManStart( Abc_NtkNodeNum(pNtk) + 100 );
284 pMan->fCatchExor = fExors;
285 pMan->nConstrs = pNtk->nConstrs;
286 pMan->nBarBufs = pNtk->nBarBufs;
287 pMan->pName = Extra_UtilStrsav( pNtk->pName );
288 pMan->pSpec = Extra_UtilStrsav( pNtk->pSpec );
289 // transfer the pointers to the basic nodes
290 Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)Aig_ManConst1(pMan);
291 Abc_NtkForEachCi( pNtk, pObj, i )
292 {
293 pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreateCi(pMan);
294 // initialize logic level of the CIs
295 ((Aig_Obj_t *)pObj->pCopy)->Level = pObj->Level;
296 }
297
298 // complement the 1-values registers
299 if ( fRegisters ) {
300 Abc_NtkForEachLatch( pNtk, pObj, i )
301 if ( Abc_LatchIsInit1(pObj) )
302 Abc_ObjFanout0(pObj)->pCopy = Abc_ObjNot(Abc_ObjFanout0(pObj)->pCopy);
303 }
304 // perform the conversion of the internal nodes (assumes DFS ordering)
305// pMan->fAddStrash = 1;
306 vNodes = Abc_NtkDfs( pNtk, 0 );
307 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
308// Abc_NtkForEachNode( pNtk, pObj, i )
309 {
310 pObj->pCopy = (Abc_Obj_t *)Aig_And( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj), (Aig_Obj_t *)Abc_ObjChild1Copy(pObj) );
311// Abc_Print( 1, "%d->%d ", pObj->Id, ((Aig_Obj_t *)pObj->pCopy)->Id );
312 }
313 Vec_PtrFree( vNodes );
314 pMan->fAddStrash = 0;
315 // create the POs
316 Abc_NtkForEachCo( pNtk, pObj, i )
317 Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj) );
318 // complement the 1-valued registers
319 Aig_ManSetRegNum( pMan, Abc_NtkLatchNum(pNtk) );
320 if ( fRegisters )
321 Aig_ManForEachLiSeq( pMan, pObjNew, i )
322 if ( Abc_LatchIsInit1(Abc_ObjFanout0(Abc_NtkCo(pNtk,i))) )
323 pObjNew->pFanin0 = Aig_Not(pObjNew->pFanin0);
324 // remove dangling nodes
325 nNodes = (Abc_NtkGetChoiceNum(pNtk) == 0)? Aig_ManCleanup( pMan ) : 0;
326 if ( !fExors && nNodes )
327 Abc_Print( 1, "Abc_NtkToDar(): Unexpected %d dangling nodes when converting to AIG!\n", nNodes );
328//Aig_ManDumpVerilog( pMan, "test.v" );
329 // save the number of registers
330 if ( fRegisters )
331 {
332 Aig_ManSetRegNum( pMan, Abc_NtkLatchNum(pNtk) );
333 pMan->vFlopNums = Vec_IntStartNatural( pMan->nRegs );
334// pMan->vFlopNums = NULL;
335// pMan->vOnehots = Abc_NtkConverLatchNamesIntoNumbers( pNtk );
336 if ( pNtk->vOnehots )
337 pMan->vOnehots = (Vec_Ptr_t *)Vec_VecDupInt( (Vec_Vec_t *)pNtk->vOnehots );
338 }
339 if ( !Aig_ManCheck( pMan ) )
340 {
341 Abc_Print( 1, "Abc_NtkToDar: AIG check has failed.\n" );
342 Aig_ManStop( pMan );
343 return NULL;
344 }
345 return pMan;
346}
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
Definition abcDfs.c:82
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Definition aigMan.c:438
#define Aig_ManForEachLiSeq(p, pObj, i)
Definition aig.h:447
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition aigOper.c:104
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition aigObj.c:66
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition aigMan.c:47
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition aigObj.c:45
Vec_Ptr_t * vOnehots
Definition abc.h:211
unsigned Level
Definition abc.h:142
Aig_Obj_t * pFanin0
Definition aig.h:75
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition vecVec.h:42
Here is the call graph for this function:

◆ Abc_NtkToDarBmc()

Aig_Man_t * Abc_NtkToDarBmc ( Abc_Ntk_t * pNtk,
Vec_Int_t ** pvMap )

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description [The returned map maps new PO IDs into old ones.]

SideEffects []

SeeAlso []

Definition at line 115 of file abcDar.c.

116{
117 Aig_Man_t * pMan;
118 Abc_Obj_t * pObj, * pTemp;
119 Vec_Ptr_t * vDrivers;
120 Vec_Ptr_t * vSuper;
121 int i, k, nDontCares;
122
123 // print warning about initial values
124 nDontCares = 0;
125 Abc_NtkForEachLatch( pNtk, pObj, i )
126 if ( Abc_LatchIsInitDc(pObj) )
127 {
128 Abc_LatchSetInit0(pObj);
129 nDontCares++;
130 }
131 if ( nDontCares )
132 {
133 Abc_Print( 1, "Warning: %d registers in this network have don't-care init values.\n", nDontCares );
134 Abc_Print( 1, "The don't-care are assumed to be 0. The result may not verify.\n" );
135 Abc_Print( 1, "Use command \"print_latch\" to see the init values of registers.\n" );
136 Abc_Print( 1, "Use command \"zero\" to convert or \"init\" to change the values.\n" );
137 }
138
139 // collect the drivers
140 vSuper = Vec_PtrAlloc( 100 );
141 vDrivers = Vec_PtrAlloc( 100 );
142 if ( pvMap )
143 *pvMap = Vec_IntAlloc( 100 );
144 Abc_NtkForEachPo( pNtk, pObj, i )
145 {
146 if ( pNtk->nConstrs && i >= pNtk->nConstrs )
147 {
148 Vec_PtrPush( vDrivers, Abc_ObjNot(Abc_ObjChild0(pObj)) );
149 if ( pvMap )
150 Vec_IntPush( *pvMap, i );
151 continue;
152 }
153 Abc_CollectTopOr( Abc_ObjChild0(pObj), vSuper );
154 Vec_PtrForEachEntry( Abc_Obj_t *, vSuper, pTemp, k )
155 {
156 Vec_PtrPush( vDrivers, pTemp );
157 if ( pvMap )
158 Vec_IntPush( *pvMap, i );
159 }
160 }
161 Vec_PtrFree( vSuper );
162
163 // create network
164 pMan = Aig_ManStart( Abc_NtkNodeNum(pNtk) + 100 );
165 pMan->nConstrs = pNtk->nConstrs;
166 pMan->nBarBufs = pNtk->nBarBufs;
167 pMan->pName = Extra_UtilStrsav( pNtk->pName );
168 pMan->pSpec = Extra_UtilStrsav( pNtk->pSpec );
169 // transfer the pointers to the basic nodes
170 Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)Aig_ManConst1(pMan);
171 Abc_NtkForEachCi( pNtk, pObj, i )
172 pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreateCi(pMan);
173 // create flops
174 Abc_NtkForEachLatch( pNtk, pObj, i )
175 Abc_ObjFanout0(pObj)->pCopy = Abc_ObjNotCond( Abc_ObjFanout0(pObj)->pCopy, Abc_LatchIsInit1(pObj) );
176 // copy internal nodes
177 Abc_NtkForEachNode( pNtk, pObj, i )
178 pObj->pCopy = (Abc_Obj_t *)Aig_And( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj), (Aig_Obj_t *)Abc_ObjChild1Copy(pObj) );
179 // create the POs
180 Vec_PtrForEachEntry( Abc_Obj_t *, vDrivers, pTemp, k )
181 Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjNotCond(Abc_ObjRegular(pTemp)->pCopy, !Abc_ObjIsComplement(pTemp)) );
182 Vec_PtrFree( vDrivers );
183 // create flops
184 Abc_NtkForEachLatchInput( pNtk, pObj, i )
185 Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjNotCond(Abc_ObjChild0Copy(pObj), Abc_LatchIsInit1(Abc_ObjFanout0(pObj))) );
186
187 // remove dangling nodes
188 Aig_ManSetRegNum( pMan, Abc_NtkLatchNum(pNtk) );
189 Aig_ManCleanup( pMan );
190 if ( !Aig_ManCheck( pMan ) )
191 {
192 Abc_Print( 1, "Abc_NtkToDarBmc: AIG check has failed.\n" );
193 Aig_ManStop( pMan );
194 return NULL;
195 }
196 return pMan;
197}
void Abc_CollectTopOr(Abc_Obj_t *pObj, Vec_Ptr_t *vSuper)
Definition abcDar.c:92
#define Abc_NtkForEachPo(pNtk, pPo, i)
Definition abc.h:520
#define Abc_NtkForEachLatchInput(pNtk, pObj, i)
Definition abc.h:503
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_NtkToDarChoices()

Aig_Man_t * Abc_NtkToDarChoices ( Abc_Ntk_t * pNtk)

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

Synopsis [Converts the network from the AIG manager into ABC.]

Description [Assumes that registers are ordered after PIs/POs.]

SideEffects []

SeeAlso []

Definition at line 359 of file abcDar.c.

360{
361 Aig_Man_t * pMan;
362 Abc_Obj_t * pObj, * pPrev, * pFanin;
363 Vec_Ptr_t * vNodes;
364 int i;
365 vNodes = Abc_AigDfs( pNtk, 0, 0 );
366 // create the manager
367 pMan = Aig_ManStart( Abc_NtkNodeNum(pNtk) + 100 );
368 pMan->nConstrs = pNtk->nConstrs;
369 pMan->nBarBufs = pNtk->nBarBufs;
370 pMan->pName = Extra_UtilStrsav( pNtk->pName );
371 pMan->pSpec = Extra_UtilStrsav( pNtk->pSpec );
372 if ( Abc_NtkGetChoiceNum(pNtk) )
373 {
374 pMan->pEquivs = ABC_ALLOC( Aig_Obj_t *, Abc_NtkObjNum(pNtk) );
375 memset( pMan->pEquivs, 0, sizeof(Aig_Obj_t *) * Abc_NtkObjNum(pNtk) );
376 }
377 // transfer the pointers to the basic nodes
378 Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)Aig_ManConst1(pMan);
379 Abc_NtkForEachCi( pNtk, pObj, i )
380 pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreateCi(pMan);
381 // perform the conversion of the internal nodes (assumes DFS ordering)
382 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
383 {
384 pObj->pCopy = (Abc_Obj_t *)Aig_And( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj), (Aig_Obj_t *)Abc_ObjChild1Copy(pObj) );
385// Abc_Print( 1, "%d->%d ", pObj->Id, ((Aig_Obj_t *)pObj->pCopy)->Id );
386 if ( Abc_AigNodeIsChoice( pObj ) )
387 {
388 for ( pPrev = pObj, pFanin = (Abc_Obj_t *)pObj->pData; pFanin; pPrev = pFanin, pFanin = (Abc_Obj_t *)pFanin->pData )
389 Aig_ObjSetEquiv( pMan, (Aig_Obj_t *)pPrev->pCopy, (Aig_Obj_t *)pFanin->pCopy );
390// Aig_ManCreateChoice( pIfMan, (Aig_Obj_t *)pNode->pCopy );
391 }
392 }
393 Vec_PtrFree( vNodes );
394 // create the POs
395 Abc_NtkForEachCo( pNtk, pObj, i )
396 Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj) );
397 // complement the 1-valued registers
398 Aig_ManSetRegNum( pMan, 0 );
399 if ( !Aig_ManCheck( pMan ) )
400 {
401 Abc_Print( 1, "Abc_NtkToDar: AIG check has failed.\n" );
402 Aig_ManStop( pMan );
403 return NULL;
404 }
405 return pMan;
406}
ABC_DLL Vec_Ptr_t * Abc_AigDfs(Abc_Ntk_t *pNtk, int fCollectAll, int fCollectCos)
Definition abcDfs.c:1198
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_ObjCompareById()

ABC_NAMESPACE_IMPL_START int Abc_ObjCompareById ( Abc_Obj_t ** pp1,
Abc_Obj_t ** pp2 )

DECLARATIONS ///.

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

FileName [abcDar.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [DAG-aware rewriting.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 65 of file abcDar.c.

66{
67 return Abc_ObjId(Abc_ObjRegular(*pp1)) - Abc_ObjId(Abc_ObjRegular(*pp2));
68}
Here is the caller graph for this function:

◆ Abc_ObjHopFromGia()

Hop_Obj_t * Abc_ObjHopFromGia ( Hop_Man_t * pHopMan,
Gia_Man_t * p,
int GiaId,
Vec_Ptr_t * vCopies )

Definition at line 721 of file abcDar.c.

722{
723 int k, iFan;
724 assert( Gia_ObjIsLut(p, GiaId) );
725 assert( Gia_ObjLutSize(p, GiaId) > 0 );
727 Gia_LutForEachFanin( p, GiaId, iFan, k )
728 {
729 Gia_ObjSetTravIdCurrentId(p, iFan);
730 Vec_PtrWriteEntry( vCopies, iFan, Hop_IthVar(pHopMan, k) );
731 }
732 return Abc_ObjHopFromGia_rec( pHopMan, p, GiaId, vCopies );
733}
Hop_Obj_t * Abc_ObjHopFromGia_rec(Hop_Man_t *pHopMan, Gia_Man_t *p, int Id, Vec_Ptr_t *vCopies)
Definition abcDar.c:704
void Gia_ManIncrementTravId(Gia_Man_t *p)
Definition giaUtil.c:190
Hop_Obj_t * Hop_IthVar(Hop_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition hopOper.c:63
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_ObjHopFromGia_rec()

Hop_Obj_t * Abc_ObjHopFromGia_rec ( Hop_Man_t * pHopMan,
Gia_Man_t * p,
int Id,
Vec_Ptr_t * vCopies )

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

Synopsis [Creates local function of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 704 of file abcDar.c.

705{
706 Gia_Obj_t * pObj;
707 Hop_Obj_t * gFunc, * gFunc0, * gFunc1;
708 if ( Gia_ObjIsTravIdCurrentId(p, Id) )
709 return (Hop_Obj_t *)Vec_PtrEntry( vCopies, Id );
710 Gia_ObjSetTravIdCurrentId(p, Id);
711 pObj = Gia_ManObj(p, Id);
712 assert( Gia_ObjIsAnd(pObj) );
713 // compute the functions of the children
714 gFunc0 = Abc_ObjHopFromGia_rec( pHopMan, p, Gia_ObjFaninId0(pObj, Id), vCopies );
715 gFunc1 = Abc_ObjHopFromGia_rec( pHopMan, p, Gia_ObjFaninId1(pObj, Id), vCopies );
716 // get the function of the cut
717 gFunc = Hop_And( pHopMan, Hop_NotCond(gFunc0, Gia_ObjFaninC0(pObj)), Hop_NotCond(gFunc1, Gia_ObjFaninC1(pObj)) );
718 Vec_PtrWriteEntry( vCopies, Id, gFunc );
719 return gFunc;
720}
Hop_Obj_t * Hop_And(Hop_Man_t *p, Hop_Obj_t *p0, Hop_Obj_t *p1)
Definition hopOper.c:104
struct Hop_Obj_t_ Hop_Obj_t
Definition hop.h:50
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_ManProduceNetwork()

ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START Abc_Ntk_t * Amap_ManProduceNetwork ( Abc_Ntk_t * pNtk,
Vec_Ptr_t * vMapping )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 4498 of file abcDar.c.

4499{
4500// extern void * Abc_FrameReadLibGen();
4502 Amap_Out_t * pRes;
4503 Vec_Ptr_t * vNodesNew;
4504 Abc_Ntk_t * pNtkNew;
4505 Abc_Obj_t * pNodeNew, * pFaninNew;
4506 int i, k, iPis, iPos, nDupGates;
4507 // make sure gates exist in the current library
4508 Vec_PtrForEachEntry( Amap_Out_t *, vMapping, pRes, i )
4509 if ( pRes->pName && Mio_LibraryReadGateByName( pLib, pRes->pName, NULL ) == NULL )
4510 {
4511 Abc_Print( 1, "Current library does not contain gate \"%s\".\n", pRes->pName );
4512 return NULL;
4513 }
4514 // create the network
4515 pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_MAP );
4516 pNtkNew->pManFunc = pLib;
4517 iPis = iPos = 0;
4518 vNodesNew = Vec_PtrAlloc( Vec_PtrSize(vMapping) );
4519 Vec_PtrForEachEntry( Amap_Out_t *, vMapping, pRes, i )
4520 {
4521 if ( pRes->Type == -1 )
4522 pNodeNew = Abc_NtkCi( pNtkNew, iPis++ );
4523 else if ( pRes->Type == 1 )
4524 pNodeNew = Abc_NtkCo( pNtkNew, iPos++ );
4525 else
4526 {
4527 pNodeNew = Abc_NtkCreateNode( pNtkNew );
4528 pNodeNew->pData = Mio_LibraryReadGateByName( pLib, pRes->pName, NULL );
4529 }
4530 for ( k = 0; k < pRes->nFans; k++ )
4531 {
4532 pFaninNew = (Abc_Obj_t *)Vec_PtrEntry( vNodesNew, pRes->pFans[k] );
4533 Abc_ObjAddFanin( pNodeNew, pFaninNew );
4534 }
4535 Vec_PtrPush( vNodesNew, pNodeNew );
4536 }
4537 Vec_PtrFree( vNodesNew );
4538 assert( iPis == Abc_NtkCiNum(pNtkNew) );
4539 assert( iPos == Abc_NtkCoNum(pNtkNew) );
4540 // decouple the PO driver nodes to reduce the number of levels
4541 nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, 0 );
4542// if ( nDupGates && Map_ManReadVerbose(pMan) )
4543// Abc_Print( 1, "Duplicated %d gates to decouple the CO drivers.\n", nDupGates );
4544 return pNtkNew;
4545}
struct Amap_Out_t_ Amap_Out_t
Definition amap.h:58
int pFans[0]
Definition amap.h:64
short Type
Definition amap.h:62
char * pName
Definition amap.h:61
short nFans
Definition amap.h:63
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManInterOne()

Gia_Man_t * Gia_ManInterOne ( Gia_Man_t * pNtkOn,
Gia_Man_t * pNtkOff,
int fVerbose )

Definition at line 3884 of file abcDar.c.

3885{
3886 extern Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fRelation, int fVerbose );
3887 Gia_Man_t * pNtkAig;
3888 Aig_Man_t * pManOn, * pManOff, * pManAig;
3889 assert( Gia_ManCiNum(pNtkOn) == Gia_ManCiNum(pNtkOff) );
3890 assert( Gia_ManCoNum(pNtkOn) == 1 );
3891 assert( Gia_ManCoNum(pNtkOff) == 1 );
3892 // create internal AIGs
3893 pManOn = Gia_ManToAigSimple( pNtkOn );
3894 if ( pManOn == NULL )
3895 return NULL;
3896 pManOff = Gia_ManToAigSimple( pNtkOff );
3897 if ( pManOff == NULL )
3898 return NULL;
3899 // derive the interpolant
3900 pManAig = Aig_ManInter( pManOn, pManOff, 0, fVerbose );
3901 if ( pManAig == NULL )
3902 {
3903 Abc_Print( 1, "Interpolant computation failed.\n" );
3904 return NULL;
3905 }
3906 Aig_ManStop( pManOn );
3907 Aig_ManStop( pManOff );
3908 // create logic network
3909 pNtkAig = Gia_ManFromAigSimple( pManAig );
3910 Aig_ManStop( pManAig );
3911 return pNtkAig;
3912}
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
Definition giaAig.c:408
Gia_Man_t * Gia_ManFromAigSimple(Aig_Man_t *p)
Definition giaAig.c:212
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ timeCnf

abctime timeCnf

DECLARATIONS ///.

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

FileName [aigInter.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [AIG package.]

Synopsis [Interpolate two AIGs.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - April 28, 2007.]

Revision [

Id
aigInter.c,v 1.00 2007/04/28 00:00:00 alanmi Exp

]

Definition at line 3941 of file abcDar.c.

◆ timeInt

abctime timeInt

Definition at line 3943 of file abcDar.c.

◆ timeSat

abctime timeSat

Definition at line 3942 of file abcDar.c.