Commit 89e8e500 by Alan Mishchenko

Improving new X-valued simulation in 'pdr'.

parent f34029dd
...@@ -467,10 +467,10 @@ void Pdr_ManReportInvariant( Pdr_Man_t * p ) ...@@ -467,10 +467,10 @@ void Pdr_ManReportInvariant( Pdr_Man_t * p )
Vec_Ptr_t * vCubes; Vec_Ptr_t * vCubes;
int kStart = Pdr_ManFindInvariantStart( p ); int kStart = Pdr_ManFindInvariantStart( p );
vCubes = Pdr_ManCollectCubes( p, kStart ); vCubes = Pdr_ManCollectCubes( p, kStart );
// Abc_Print( 1, "Invariant F[%d] : %d clauses with %d flops (out of %d) (%.2f)\n", Abc_Print( 1, "Invariant F[%d] : %d clauses with %d flops (out of %d) (%.2f)\n",
// kStart, Vec_PtrSize(vCubes), Pdr_ManCountVariables(p, kStart), Aig_ManRegNum(p->pAig), 1.0*p->nXsimLits/p->nXsimRuns ); kStart, Vec_PtrSize(vCubes), Pdr_ManCountVariables(p, kStart), Aig_ManRegNum(p->pAig), 1.0*p->nXsimLits/p->nXsimRuns );
Abc_Print( 1, "Invariant F[%d] : %d clauses with %d flops (out of %d)\n", // Abc_Print( 1, "Invariant F[%d] : %d clauses with %d flops (out of %d)\n",
kStart, Vec_PtrSize(vCubes), Pdr_ManCountVariables(p, kStart), Aig_ManRegNum(p->pAig) ); // kStart, Vec_PtrSize(vCubes), Pdr_ManCountVariables(p, kStart), Aig_ManRegNum(p->pAig) );
Vec_PtrFree( vCubes ); Vec_PtrFree( vCubes );
} }
......
...@@ -271,7 +271,9 @@ Pdr_Man_t * Pdr_ManStart( Aig_Man_t * pAig, Pdr_Par_t * pPars, Vec_Int_t * vPrio ...@@ -271,7 +271,9 @@ Pdr_Man_t * Pdr_ManStart( Aig_Man_t * pAig, Pdr_Par_t * pPars, Vec_Int_t * vPrio
p->vPrio = vPrioInit; p->vPrio = vPrioInit;
else if ( pPars->fFlopPrio ) else if ( pPars->fFlopPrio )
p->vPrio = Pdr_ManDeriveFlopPriorities(pAig, 1); p->vPrio = Pdr_ManDeriveFlopPriorities(pAig, 1);
else else if ( p->pPars->fNewXSim )
p->vPrio = Vec_IntStartNatural( Aig_ManRegNum(pAig) );
else
p->vPrio = Vec_IntStart( Aig_ManRegNum(pAig) ); p->vPrio = Vec_IntStart( Aig_ManRegNum(pAig) );
p->vLits = Vec_IntAlloc( 100 ); // array of literals p->vLits = Vec_IntAlloc( 100 ); // array of literals
p->vCiObjs = Vec_IntAlloc( 100 ); // cone leaves p->vCiObjs = Vec_IntAlloc( 100 ); // cone leaves
......
...@@ -158,7 +158,7 @@ void Bmc_CexCarePropagateFwd( Gia_Man_t * p, Abc_Cex_t * pCex, int fGrow, Vec_In ...@@ -158,7 +158,7 @@ void Bmc_CexCarePropagateFwd( Gia_Man_t * p, Abc_Cex_t * pCex, int fGrow, Vec_In
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
void Bmc_CexCarePropagateBwdOne( Gia_Man_t * p, Abc_Cex_t * pCex, int f, Abc_Cex_t * pCexMin ) void Bmc_CexCarePropagateBwdOne( Gia_Man_t * p, Abc_Cex_t * pCex, int f, int fGrow, Abc_Cex_t * pCexMin )
{ {
Gia_Obj_t * pObj; Gia_Obj_t * pObj;
int i, Phase0, Phase1; int i, Phase0, Phase1;
...@@ -184,10 +184,33 @@ void Bmc_CexCarePropagateBwdOne( Gia_Man_t * p, Abc_Cex_t * pCex, int f, Abc_Cex ...@@ -184,10 +184,33 @@ void Bmc_CexCarePropagateBwdOne( Gia_Man_t * p, Abc_Cex_t * pCex, int f, Abc_Cex
Gia_ObjFanin0(pObj)->fPhase = 1; Gia_ObjFanin0(pObj)->fPhase = 1;
else // if ( !Phase0 && !Phase1 ) else // if ( !Phase0 && !Phase1 )
{ {
if ( Abc_Lit2Var(Gia_ObjFanin0(pObj)->Value) <= Abc_Lit2Var(Gia_ObjFanin1(pObj)->Value) ) if ( Gia_ObjFanin0(pObj)->fPhase || Gia_ObjFanin1(pObj)->fPhase )
continue;
if ( Gia_ObjIsPi(p, Gia_ObjFanin0(pObj)) )
Gia_ObjFanin0(pObj)->fPhase = 1; Gia_ObjFanin0(pObj)->fPhase = 1;
else else if ( Gia_ObjIsPi(p, Gia_ObjFanin1(pObj)) )
Gia_ObjFanin1(pObj)->fPhase = 1; Gia_ObjFanin1(pObj)->fPhase = 1;
// else if ( Gia_ObjIsAnd(Gia_ObjFanin0(pObj)) && Txs_ObjIsJust(p, Gia_ObjFanin0(pObj)) )
// Gia_ObjFanin0(pObj)->fPhase = 1;
// else if ( Gia_ObjIsAnd(Gia_ObjFanin1(pObj)) && Txs_ObjIsJust(p, Gia_ObjFanin1(pObj)) )
// Gia_ObjFanin1(pObj)->fPhase = 1;
else
{
if ( fGrow & 1 )
{
if ( Abc_Lit2Var(Gia_ObjFanin0(pObj)->Value) >= Abc_Lit2Var(Gia_ObjFanin1(pObj)->Value) )
Gia_ObjFanin0(pObj)->fPhase = 1;
else
Gia_ObjFanin1(pObj)->fPhase = 1;
}
else
{
if ( Abc_Lit2Var(Gia_ObjFanin0(pObj)->Value) <= Abc_Lit2Var(Gia_ObjFanin1(pObj)->Value) )
Gia_ObjFanin0(pObj)->fPhase = 1;
else
Gia_ObjFanin1(pObj)->fPhase = 1;
}
}
} }
} }
Gia_ManForEachPi( p, pObj, i ) Gia_ManForEachPi( p, pObj, i )
...@@ -210,7 +233,7 @@ Abc_Cex_t * Bmc_CexCarePropagateBwd( Gia_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t ...@@ -210,7 +233,7 @@ Abc_Cex_t * Bmc_CexCarePropagateBwd( Gia_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t
Gia_ManForEachRo( p, pObj, i ) Gia_ManForEachRo( p, pObj, i )
pObj->Value = Vec_IntEntry( vPrios, f * pCex->nRegs + i ); pObj->Value = Vec_IntEntry( vPrios, f * pCex->nRegs + i );
Bmc_CexCarePropagateFwdOne( p, pCex, f, fGrow ); Bmc_CexCarePropagateFwdOne( p, pCex, f, fGrow );
Bmc_CexCarePropagateBwdOne( p, pCex, f, pCexMin ); Bmc_CexCarePropagateBwdOne( p, pCex, f, fGrow, pCexMin );
Gia_ManForEachRiRo( p, pObjRi, pObjRo, i ) Gia_ManForEachRiRo( p, pObjRi, pObjRo, i )
pObjRi->fPhase = pObjRo->fPhase; pObjRi->fPhase = pObjRo->fPhase;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment