ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
sswSimSat.c File Reference
#include "sswInt.h"
Include dependency graph for sswSimSat.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Ssw_ManResimulateBit (Ssw_Man_t *p, Aig_Obj_t *pCand, Aig_Obj_t *pRepr)
 DECLARATIONS ///.
 
void Ssw_ManResimulateWord (Ssw_Man_t *p, Aig_Obj_t *pCand, Aig_Obj_t *pRepr, int f)
 

Function Documentation

◆ Ssw_ManResimulateBit()

ABC_NAMESPACE_IMPL_START void Ssw_ManResimulateBit ( Ssw_Man_t * p,
Aig_Obj_t * pCand,
Aig_Obj_t * pRepr )

DECLARATIONS ///.

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

FileName [sswSimSat.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Inductive prover with constraints.]

Synopsis [Performs resimulation using counter-examples.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - September 1, 2008.]

Revision [

Id
sswSimSat.c,v 1.00 2008/09/01 00:00:00 alanmi Exp

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

Synopsis [Handle the counter-example.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file sswSimSat.c.

46{
47 Aig_Obj_t * pObj;
48 int i, RetValue1, RetValue2;
49 abctime clk = Abc_Clock();
50 // set the PI simulation information
51 Aig_ManConst1(p->pAig)->fMarkB = 1;
52 Aig_ManForEachCi( p->pAig, pObj, i )
53 pObj->fMarkB = Abc_InfoHasBit( p->pPatWords, i );
54 // simulate internal nodes
55 Aig_ManForEachNode( p->pAig, pObj, i )
56 pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) )
57 & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) );
58 // if repr is given, perform refinement
59 if ( pRepr )
60 {
61 // check equivalence classes
62 RetValue1 = Ssw_ClassesRefineConst1( p->ppClasses, 0 );
63 RetValue2 = Ssw_ClassesRefine( p->ppClasses, 0 );
64 // make sure refinement happened
65 if ( Aig_ObjIsConst1(pRepr) )
66 {
67 assert( RetValue1 );
68 if ( RetValue1 == 0 )
69 Abc_Print( 1, "\nSsw_ManResimulateBit() Error: RetValue1 does not hold.\n" );
70 }
71 else
72 {
73 assert( RetValue2 );
74 if ( RetValue2 == 0 )
75 Abc_Print( 1, "\nSsw_ManResimulateBit() Error: RetValue2 does not hold.\n" );
76 }
77 }
78p->timeSimSat += Abc_Clock() - clk;
79}
ABC_INT64_T abctime
Definition abc_global.h:332
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition aig.h:393
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
#define Aig_ManForEachNode(p, pObj, i)
Definition aig.h:413
Cube * p
Definition exorList.c:222
int Ssw_ClassesRefineConst1(Ssw_Cla_t *p, int fRecursive)
Definition sswClass.c:1119
int Ssw_ClassesRefine(Ssw_Cla_t *p, int fRecursive)
Definition sswClass.c:1034
unsigned int fMarkB
Definition aig.h:80
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ssw_ManResimulateWord()

void Ssw_ManResimulateWord ( Ssw_Man_t * p,
Aig_Obj_t * pCand,
Aig_Obj_t * pRepr,
int f )

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

Synopsis [Handle the counter-example.]

Description []

SideEffects []

SeeAlso []

Definition at line 92 of file sswSimSat.c.

93{
94 int RetValue1, RetValue2;
95 abctime clk = Abc_Clock();
96 // set the PI simulation information
97 Ssw_SmlAssignDist1Plus( p->pSml, p->pPatWords );
98 // simulate internal nodes
99 Ssw_SmlSimulateOne( p->pSml );
100 // check equivalence classes
101 RetValue1 = Ssw_ClassesRefineConst1( p->ppClasses, 1 );
102 RetValue2 = Ssw_ClassesRefine( p->ppClasses, 1 );
103 // make sure refinement happened
104 if ( Aig_ObjIsConst1(pRepr) )
105 {
106 assert( RetValue1 );
107 if ( RetValue1 == 0 )
108 Abc_Print( 1, "\nSsw_ManResimulateWord() Error: RetValue1 does not hold.\n" );
109 }
110 else
111 {
112 assert( RetValue2 );
113 if ( RetValue2 == 0 )
114 Abc_Print( 1, "\nSsw_ManResimulateWord() Error: RetValue2 does not hold.\n" );
115 }
116p->timeSimSat += Abc_Clock() - clk;
117}
void Ssw_SmlSimulateOne(Ssw_Sml_t *p)
Definition sswSim.c:1005
void Ssw_SmlAssignDist1Plus(Ssw_Sml_t *p, unsigned *pPat)
Definition sswSim.c:674
Here is the call graph for this function:
Here is the caller graph for this function: