ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
sim.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Sym_Man_t_
 
struct  Sim_Man_t_
 
struct  Sim_Pat_t_
 

Macros

#define SIM_NUM_WORDS(n)
 MACRO DEFINITIONS ///.
 
#define SIM_LAST_BITS(n)
 
#define SIM_MASK_FULL   (0xFFFFFFFF)
 
#define SIM_MASK_BEG(n)
 
#define SIM_MASK_END(n)
 
#define SIM_SET_0_FROM(m, n)
 
#define SIM_SET_1_FROM(m, n)
 
#define SIM_RANDOM_UNSIGNED   ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))
 
#define Sim_SetBit(p, i)
 
#define Sim_XorBit(p, i)
 
#define Sim_HasBit(p, i)
 
#define Sim_SuppStrSetVar(vSupps, pNode, v)
 
#define Sim_SuppStrHasVar(vSupps, pNode, v)
 
#define Sim_SuppFunSetVar(vSupps, Output, v)
 
#define Sim_SuppFunHasVar(vSupps, Output, v)
 
#define Sim_SimInfoSetVar(vSupps, pNode, v)
 
#define Sim_SimInfoHasVar(vSupps, pNode, v)
 
#define Sim_SimInfoGet(vInfo, pNode)
 

Typedefs

typedef typedefABC_NAMESPACE_HEADER_START struct Sym_Man_t_ Sym_Man_t
 INCLUDES ///.
 
typedef struct Sim_Man_t_ Sim_Man_t
 
typedef struct Sim_Pat_t_ Sim_Pat_t
 

Functions

Sym_Man_tSym_ManStart (Abc_Ntk_t *pNtk, int fVerbose)
 FUNCTION DECLARATIONS ///.
 
void Sym_ManStop (Sym_Man_t *p)
 
void Sym_ManPrintStats (Sym_Man_t *p)
 
Sim_Man_tSim_ManStart (Abc_Ntk_t *pNtk, int fLightweight)
 
void Sim_ManStop (Sim_Man_t *p)
 
void Sim_ManPrintStats (Sim_Man_t *p)
 
Sim_Pat_tSim_ManPatAlloc (Sim_Man_t *p)
 
void Sim_ManPatFree (Sim_Man_t *p, Sim_Pat_t *pPat)
 
Vec_Ptr_tSim_SimulateSeqRandom (Abc_Ntk_t *pNtk, int nFrames, int nWords)
 FUNCTION DEFINITIONS ///.
 
Vec_Ptr_tSim_SimulateSeqModel (Abc_Ntk_t *pNtk, int nFrames, int *pModel)
 
Vec_Ptr_tSim_ComputeStrSupp (Abc_Ntk_t *pNtk)
 FUNCTION DEFINITIONS ///.
 
Vec_Ptr_tSim_ComputeFunSupp (Abc_Ntk_t *pNtk, int fVerbose)
 
int Sim_ComputeTwoVarSymms (Abc_Ntk_t *pNtk, int fVerbose)
 DECLARATIONS ///.
 
int Sim_SymmsGetPatternUsingSat (Sym_Man_t *p, unsigned *pPattern)
 FUNCTION DEFINITIONS ///.
 
void Sim_SymmsStructCompute (Abc_Ntk_t *pNtk, Vec_Ptr_t *vMatrs, Vec_Ptr_t *vSuppFun)
 FUNCTION DEFINITIONS ///.
 
void Sim_SymmsSimulate (Sym_Man_t *p, unsigned *pPatRand, Vec_Ptr_t *vMatrsNonSym)
 FUNCTION DEFINITIONS ///.
 
Vec_Ptr_tSim_UtilInfoAlloc (int nSize, int nWords, int fClean)
 FUNCTION DEFINITIONS ///.
 
void Sim_UtilInfoFree (Vec_Ptr_t *p)
 
void Sim_UtilInfoAdd (unsigned *pInfo1, unsigned *pInfo2, int nWords)
 
void Sim_UtilInfoDetectDiffs (unsigned *pInfo1, unsigned *pInfo2, int nWords, Vec_Int_t *vDiffs)
 
void Sim_UtilInfoDetectNews (unsigned *pInfo1, unsigned *pInfo2, int nWords, Vec_Int_t *vDiffs)
 
void Sim_UtilInfoFlip (Sim_Man_t *p, Abc_Obj_t *pNode)
 
int Sim_UtilInfoCompare (Sim_Man_t *p, Abc_Obj_t *pNode)
 
void Sim_UtilSimulate (Sim_Man_t *p, int fFirst)
 
void Sim_UtilSimulateNode (Sim_Man_t *p, Abc_Obj_t *pNode, int fType, int fType1, int fType2)
 
void Sim_UtilSimulateNodeOne (Abc_Obj_t *pNode, Vec_Ptr_t *vSimInfo, int nSimWords, int nOffset)
 
void Sim_UtilTransferNodeOne (Abc_Obj_t *pNode, Vec_Ptr_t *vSimInfo, int nSimWords, int nOffset, int fShift)
 
int Sim_UtilCountSuppSizes (Sim_Man_t *p, int fStruct)
 
int Sim_UtilCountOnes (unsigned *pSimInfo, int nSimWords)
 
Vec_Int_tSim_UtilCountOnesArray (Vec_Ptr_t *vInfo, int nSimWords)
 
void Sim_UtilSetRandom (unsigned *pPatRand, int nSimWords)
 
void Sim_UtilSetCompl (unsigned *pPatRand, int nSimWords)
 
void Sim_UtilSetConst (unsigned *pPatRand, int nSimWords, int fConst1)
 
int Sim_UtilInfoIsEqual (unsigned *pPats1, unsigned *pPats2, int nSimWords)
 
int Sim_UtilInfoIsImp (unsigned *pPats1, unsigned *pPats2, int nSimWords)
 
int Sim_UtilInfoIsClause (unsigned *pPats1, unsigned *pPats2, int nSimWords)
 
int Sim_UtilCountAllPairs (Vec_Ptr_t *vSuppFun, int nSimWords, Vec_Int_t *vCounters)
 
void Sim_UtilCountPairsAll (Sym_Man_t *p)
 
int Sim_UtilMatrsAreDisjoint (Sym_Man_t *p)
 

Macro Definition Documentation

◆ Sim_HasBit

#define Sim_HasBit ( p,
i )
Value:
(((p)[(i)>>5] & (1<<((i) & 31))) > 0)
Cube * p
Definition exorList.c:222

Definition at line 163 of file sim.h.

◆ SIM_LAST_BITS

#define SIM_LAST_BITS ( n)
Value:
((((n)&31) > 0)? (n)&31 : 32)

Definition at line 149 of file sim.h.

◆ SIM_MASK_BEG

#define SIM_MASK_BEG ( n)
Value:
(SIM_MASK_FULL >> (32-n))
#define SIM_MASK_FULL
Definition sim.h:151

Definition at line 152 of file sim.h.

◆ SIM_MASK_END

#define SIM_MASK_END ( n)
Value:
(SIM_MASK_FULL << (n))

Definition at line 153 of file sim.h.

◆ SIM_MASK_FULL

#define SIM_MASK_FULL   (0xFFFFFFFF)

Definition at line 151 of file sim.h.

◆ SIM_NUM_WORDS

#define SIM_NUM_WORDS ( n)
Value:
(((n)>>5) + (((n)&31) > 0))

MACRO DEFINITIONS ///.

Definition at line 148 of file sim.h.

◆ SIM_RANDOM_UNSIGNED

#define SIM_RANDOM_UNSIGNED   ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))

Definition at line 158 of file sim.h.

◆ SIM_SET_0_FROM

#define SIM_SET_0_FROM ( m,
n )
Value:
((m) & ~SIM_MASK_BEG(n))
#define SIM_MASK_BEG(n)
Definition sim.h:152

Definition at line 154 of file sim.h.

◆ SIM_SET_1_FROM

#define SIM_SET_1_FROM ( m,
n )
Value:
((m) | SIM_MASK_END(n))
#define SIM_MASK_END(n)
Definition sim.h:153

Definition at line 155 of file sim.h.

◆ Sim_SetBit

#define Sim_SetBit ( p,
i )
Value:
((p)[(i)>>5] |= (1<<((i) & 31)))

Definition at line 161 of file sim.h.

◆ Sim_SimInfoGet

#define Sim_SimInfoGet ( vInfo,
pNode )
Value:
((unsigned *)((vInfo)->pArray[(pNode)->Id]))

Definition at line 172 of file sim.h.

◆ Sim_SimInfoHasVar

#define Sim_SimInfoHasVar ( vSupps,
pNode,
v )
Value:
Sim_HasBit((unsigned*)(vSupps)->pArray[(pNode)->Id],(v))
#define Sim_HasBit(p, i)
Definition sim.h:163

Definition at line 171 of file sim.h.

◆ Sim_SimInfoSetVar

#define Sim_SimInfoSetVar ( vSupps,
pNode,
v )
Value:
Sim_SetBit((unsigned*)(vSupps)->pArray[(pNode)->Id],(v))
#define Sim_SetBit(p, i)
Definition sim.h:161

Definition at line 170 of file sim.h.

◆ Sim_SuppFunHasVar

#define Sim_SuppFunHasVar ( vSupps,
Output,
v )
Value:
Sim_HasBit((unsigned*)(vSupps)->pArray[Output],(v))

Definition at line 169 of file sim.h.

◆ Sim_SuppFunSetVar

#define Sim_SuppFunSetVar ( vSupps,
Output,
v )
Value:
Sim_SetBit((unsigned*)(vSupps)->pArray[Output],(v))

Definition at line 168 of file sim.h.

◆ Sim_SuppStrHasVar

#define Sim_SuppStrHasVar ( vSupps,
pNode,
v )
Value:
Sim_HasBit((unsigned*)(vSupps)->pArray[(pNode)->Id],(v))

Definition at line 167 of file sim.h.

◆ Sim_SuppStrSetVar

#define Sim_SuppStrSetVar ( vSupps,
pNode,
v )
Value:
Sim_SetBit((unsigned*)(vSupps)->pArray[(pNode)->Id],(v))

Definition at line 166 of file sim.h.

◆ Sim_XorBit

#define Sim_XorBit ( p,
i )
Value:
((p)[(i)>>5] ^= (1<<((i) & 31)))

Definition at line 162 of file sim.h.

Typedef Documentation

◆ Sim_Man_t

typedef struct Sim_Man_t_ Sim_Man_t

Definition at line 100 of file sim.h.

◆ Sim_Pat_t

typedef struct Sim_Pat_t_ Sim_Pat_t

Definition at line 136 of file sim.h.

◆ Sym_Man_t

typedef typedefABC_NAMESPACE_HEADER_START struct Sym_Man_t_ Sym_Man_t

INCLUDES ///.

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

FileName [sim.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Simulation package.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
sim.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

] PARAMETERS /// BASIC TYPES ///

Definition at line 48 of file sim.h.

Function Documentation

◆ Sim_ComputeFunSupp()

Vec_Ptr_t * Sim_ComputeFunSupp ( Abc_Ntk_t * pNtk,
int fVerbose )
extern

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

Synopsis [Compute functional supports.]

Description [Supports are returned as an array of bit strings, one for each CO.]

SideEffects []

SeeAlso []

Definition at line 103 of file simSupp.c.

104{
105 Sim_Man_t * p;
106 Vec_Ptr_t * vResult;
107 int nSolved, i;
108 abctime clk = Abc_Clock();
109
110 srand( 0xABC );
111
112 // start the simulation manager
113 p = Sim_ManStart( pNtk, 0 );
114
115 // compute functional support using one round of random simulation
116 Sim_UtilAssignRandom( p );
117 Sim_ComputeSuppRound( p, 0 );
118
119 // set the support targets
120 Sim_ComputeSuppSetTargets( p );
121 if ( fVerbose )
122 printf( "Number of support targets after simulation = %5d.\n", Vec_VecSizeSize(p->vSuppTargs) );
123 if ( Vec_VecSizeSize(p->vSuppTargs) == 0 )
124 goto exit;
125
126 for ( i = 0; i < 1; i++ )
127 {
128 // compute patterns using one round of random simulation
129 Sim_UtilAssignRandom( p );
130 nSolved = Sim_ComputeSuppRound( p, 1 );
131 if ( Vec_VecSizeSize(p->vSuppTargs) == 0 )
132 goto exit;
133
134 if ( fVerbose )
135 printf( "Targets = %5d. Solved = %5d. Fifo = %5d.\n",
136 Vec_VecSizeSize(p->vSuppTargs), nSolved, Vec_PtrSize(p->vFifo) );
137 }
138
139 // try to solve the support targets
140 while ( Vec_VecSizeSize(p->vSuppTargs) > 0 )
141 {
142 // solve targets until the first disproved one (which gives counter-example)
143 Sim_SolveTargetsUsingSat( p, p->nSimWords/p->nSuppWords );
144 // compute additional functional support
145 Sim_UtilAssignFromFifo( p );
146 nSolved = Sim_ComputeSuppRound( p, 1 );
147
148if ( fVerbose )
149 printf( "Targets = %5d. Solved = %5d. Fifo = %5d. SAT runs = %3d.\n",
150 Vec_VecSizeSize(p->vSuppTargs), nSolved, Vec_PtrSize(p->vFifo), p->nSatRuns );
151 }
152
153exit:
154p->timeTotal = Abc_Clock() - clk;
155 vResult = p->vSuppFun;
156 // p->vSuppFun = NULL;
157 Sim_ManStop( p );
158 return vResult;
159}
ABC_INT64_T abctime
Definition abc_global.h:332
struct Sim_Man_t_ Sim_Man_t
Definition sim.h:100
Sim_Man_t * Sim_ManStart(Abc_Ntk_t *pNtk, int fLightweight)
Definition simMan.c:166
void Sim_ManStop(Sim_Man_t *p)
Definition simMan.c:208
VOID_HACK exit()
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_ComputeStrSupp()

Vec_Ptr_t * Sim_ComputeStrSupp ( Abc_Ntk_t * pNtk)
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Computes structural supports.]

Description [Supports are returned as an array of bit strings, one for each CO.]

SideEffects []

SeeAlso []

Definition at line 57 of file simSupp.c.

58{
59 Vec_Ptr_t * vSuppStr;
60 Abc_Obj_t * pNode;
61 unsigned * pSimmNode, * pSimmNode1, * pSimmNode2;
62 int nSuppWords, i, k;
63 // allocate room for structural supports
64 nSuppWords = SIM_NUM_WORDS( Abc_NtkCiNum(pNtk) );
65 vSuppStr = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), nSuppWords, 1 );
66 // assign the structural support to the PIs
67 Abc_NtkForEachCi( pNtk, pNode, i )
68 Sim_SuppStrSetVar( vSuppStr, pNode, i );
69 // derive the structural supports of the internal nodes
70 Abc_NtkForEachNode( pNtk, pNode, i )
71 {
72// if ( Abc_NodeIsConst(pNode) )
73// continue;
74 pSimmNode = (unsigned *)vSuppStr->pArray[ pNode->Id ];
75 pSimmNode1 = (unsigned *)vSuppStr->pArray[ Abc_ObjFaninId0(pNode) ];
76 pSimmNode2 = (unsigned *)vSuppStr->pArray[ Abc_ObjFaninId1(pNode) ];
77 for ( k = 0; k < nSuppWords; k++ )
78 pSimmNode[k] = pSimmNode1[k] | pSimmNode2[k];
79 }
80 // set the structural supports of the PO nodes
81 Abc_NtkForEachCo( pNtk, pNode, i )
82 {
83 pSimmNode = (unsigned *)vSuppStr->pArray[ pNode->Id ];
84 pSimmNode1 = (unsigned *)vSuppStr->pArray[ Abc_ObjFaninId0(pNode) ];
85 for ( k = 0; k < nSuppWords; k++ )
86 pSimmNode[k] = pSimmNode1[k];
87 }
88 return vSuppStr;
89}
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition abc.h:464
Vec_Ptr_t * Sim_UtilInfoAlloc(int nSize, int nWords, int fClean)
FUNCTION DEFINITIONS ///.
Definition simUtils.c:57
#define SIM_NUM_WORDS(n)
MACRO DEFINITIONS ///.
Definition sim.h:148
#define Sim_SuppStrSetVar(vSupps, pNode, v)
Definition sim.h:166
int Id
Definition abc.h:132
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_ComputeTwoVarSymms()

int Sim_ComputeTwoVarSymms ( Abc_Ntk_t * pNtk,
int fVerbose )
extern

DECLARATIONS ///.

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

FileName [simSym.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Simulation to determine two-variable symmetries.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Computes two variable symmetries.]

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file simSym.c.

47{
48 Sym_Man_t * p;
49 Vec_Ptr_t * vResult;
50 int Result;
51 int i;
52 abctime clk, clkTotal = Abc_Clock();
53
54 srand( 0xABC );
55
56 // start the simulation manager
57 p = Sym_ManStart( pNtk, fVerbose );
58 p->nPairsTotal = p->nPairsRem = Sim_UtilCountAllPairs( p->vSuppFun, p->nSimWords, p->vPairsTotal );
59 if ( fVerbose )
60 printf( "Total = %8d. Sym = %8d. NonSym = %8d. Remaining = %8d.\n",
61 p->nPairsTotal, p->nPairsSymm, p->nPairsNonSymm, p->nPairsRem );
62
63 // detect symmetries using circuit structure
64clk = Abc_Clock();
65 Sim_SymmsStructCompute( pNtk, p->vMatrSymms, p->vSuppFun );
66p->timeStruct = Abc_Clock() - clk;
67
69 p->nPairsSymmStr = p->nPairsSymm;
70 if ( fVerbose )
71 printf( "Total = %8d. Sym = %8d. NonSym = %8d. Remaining = %8d.\n",
72 p->nPairsTotal, p->nPairsSymm, p->nPairsNonSymm, p->nPairsRem );
73
74 // detect symmetries using simulation
75 for ( i = 1; i <= 1000; i++ )
76 {
77 // simulate this pattern
78 Sim_UtilSetRandom( p->uPatRand, p->nSimWords );
79 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
80 if ( i % 50 != 0 )
81 continue;
82 // check disjointness
84 // count the number of pairs
86 if ( i % 500 != 0 )
87 continue;
88 if ( fVerbose )
89 printf( "Total = %8d. Sym = %8d. NonSym = %8d. Remaining = %8d.\n",
90 p->nPairsTotal, p->nPairsSymm, p->nPairsNonSymm, p->nPairsRem );
91 }
92
93 // detect symmetries using SAT
94 for ( i = 1; Sim_SymmsGetPatternUsingSat( p, p->uPatRand ); i++ )
95 {
96 // simulate this pattern in four polarities
97 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
98 Sim_XorBit( p->uPatRand, p->iVar1 );
99 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
100 Sim_XorBit( p->uPatRand, p->iVar2 );
101 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
102 Sim_XorBit( p->uPatRand, p->iVar1 );
103 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
104 Sim_XorBit( p->uPatRand, p->iVar2 );
105/*
106 // try the previuos pair
107 Sim_XorBit( p->uPatRand, p->iVar1Old );
108 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
109 Sim_XorBit( p->uPatRand, p->iVar2Old );
110 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
111 Sim_XorBit( p->uPatRand, p->iVar1Old );
112 Sim_SymmsSimulate( p, p->uPatRand, p->vMatrNonSymms );
113*/
114 if ( i % 10 != 0 )
115 continue;
116 // check disjointness
118 // count the number of pairs
120 if ( i % 50 != 0 )
121 continue;
122 if ( fVerbose )
123 printf( "Total = %8d. Sym = %8d. NonSym = %8d. Remaining = %8d.\n",
124 p->nPairsTotal, p->nPairsSymm, p->nPairsNonSymm, p->nPairsRem );
125 }
126
127 // count the number of pairs
129 if ( fVerbose )
130 printf( "Total = %8d. Sym = %8d. NonSym = %8d. Remaining = %8d.\n",
131 p->nPairsTotal, p->nPairsSymm, p->nPairsNonSymm, p->nPairsRem );
132// Sim_UtilCountPairsAllPrint( p );
133
134 Result = p->nPairsSymm;
135 vResult = p->vMatrSymms;
136p->timeTotal = Abc_Clock() - clkTotal;
137 // p->vMatrSymms = NULL;
138 Sym_ManStop( p );
139 return Result;
140}
void Sim_UtilSetRandom(unsigned *pPatRand, int nSimWords)
Definition simUtils.c:448
void Sim_SymmsStructCompute(Abc_Ntk_t *pNtk, Vec_Ptr_t *vMatrs, Vec_Ptr_t *vSuppFun)
FUNCTION DEFINITIONS ///.
Definition simSymStr.c:61
Sym_Man_t * Sym_ManStart(Abc_Ntk_t *pNtk, int fVerbose)
FUNCTION DECLARATIONS ///.
Definition simMan.c:46
void Sim_SymmsSimulate(Sym_Man_t *p, unsigned *pPatRand, Vec_Ptr_t *vMatrsNonSym)
FUNCTION DEFINITIONS ///.
Definition simSymSim.c:49
int Sim_UtilMatrsAreDisjoint(Sym_Man_t *p)
Definition simUtils.c:704
void Sym_ManStop(Sym_Man_t *p)
Definition simMan.c:98
int Sim_SymmsGetPatternUsingSat(Sym_Man_t *p, unsigned *pPattern)
FUNCTION DEFINITIONS ///.
Definition simSymSat.c:51
#define Sim_XorBit(p, i)
Definition sim.h:162
int Sim_UtilCountAllPairs(Vec_Ptr_t *vSuppFun, int nSimWords, Vec_Int_t *vCounters)
Definition simUtils.c:564
typedefABC_NAMESPACE_HEADER_START struct Sym_Man_t_ Sym_Man_t
INCLUDES ///.
Definition sim.h:48
void Sim_UtilCountPairsAll(Sym_Man_t *p)
Definition simUtils.c:660
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:

◆ Sim_ManPatAlloc()

Sim_Pat_t * Sim_ManPatAlloc ( Sim_Man_t * p)
extern

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

Synopsis [Returns one simulation pattern.]

Description []

SideEffects []

SeeAlso []

Definition at line 261 of file simMan.c.

262{
263 Sim_Pat_t * pPat;
264 pPat = (Sim_Pat_t *)Extra_MmFixedEntryFetch( p->pMmPat );
265 pPat->Output = -1;
266 pPat->pData = (unsigned *)((char *)pPat + sizeof(Sim_Pat_t));
267 memset( pPat->pData, 0, p->nSuppWords * sizeof(unsigned) );
268 return pPat;
269}
char * Extra_MmFixedEntryFetch(Extra_MmFixed_t *p)
struct Sim_Pat_t_ Sim_Pat_t
Definition sim.h:136
int Output
Definition sim.h:140
unsigned * pData
Definition sim.h:141
char * memset()
Here is the call graph for this function:

◆ Sim_ManPatFree()

void Sim_ManPatFree ( Sim_Man_t * p,
Sim_Pat_t * pPat )
extern

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

Synopsis [Returns one simulation pattern.]

Description []

SideEffects []

SeeAlso []

Definition at line 282 of file simMan.c.

283{
284 Extra_MmFixedEntryRecycle( p->pMmPat, (char *)pPat );
285}
void Extra_MmFixedEntryRecycle(Extra_MmFixed_t *p, char *pEntry)
Here is the call graph for this function:

◆ Sim_ManPrintStats()

void Sim_ManPrintStats ( Sim_Man_t * p)
extern

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

Synopsis [Prints the manager statisticis.]

Description []

SideEffects []

SeeAlso []

Definition at line 233 of file simMan.c.

234{
235// printf( "Inputs = %5d. Outputs = %5d. Sim words = %5d.\n",
236// Abc_NtkCiNum(p->pNtk), Abc_NtkCoNum(p->pNtk), p->nSimWords );
237 printf( "Total func supps = %8d.\n", Sim_UtilCountSuppSizes(p, 0) );
238 printf( "Total struct supps = %8d.\n", Sim_UtilCountSuppSizes(p, 1) );
239 printf( "Sat runs SAT = %8d.\n", p->nSatRunsSat );
240 printf( "Sat runs UNSAT = %8d.\n", p->nSatRunsUnsat );
241 ABC_PRT( "Simulation ", p->timeSim );
242 ABC_PRT( "Traversal ", p->timeTrav );
243 ABC_PRT( "Fraiging ", p->timeFraig );
244 ABC_PRT( "SAT ", p->timeSat );
245 ABC_PRT( "TOTAL ", p->timeTotal );
246}
#define ABC_PRT(a, t)
Definition abc_global.h:255
int Sim_UtilCountSuppSizes(Sim_Man_t *p, int fStruct)
Definition simUtils.c:372
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_ManStart()

Sim_Man_t * Sim_ManStart ( Abc_Ntk_t * pNtk,
int fLightweight )
extern

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

Synopsis [Starts the simulation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 166 of file simMan.c.

167{
168 Sim_Man_t * p;
169 // start the manager
170 p = ABC_ALLOC( Sim_Man_t, 1 );
171 memset( p, 0, sizeof(Sim_Man_t) );
172 p->pNtk = pNtk;
173 p->nInputs = Abc_NtkCiNum(p->pNtk);
174 p->nOutputs = Abc_NtkCoNum(p->pNtk);
175 // internal simulation information
176 p->nSimBits = 2048;
177 p->nSimWords = SIM_NUM_WORDS(p->nSimBits);
178 p->vSim0 = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), p->nSimWords, 0 );
179 p->fLightweight = fLightweight;
180 if (!p->fLightweight) {
181 p->vSim1 = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), p->nSimWords, 0 );
182 // support information
183 p->nSuppBits = Abc_NtkCiNum(pNtk);
184 p->nSuppWords = SIM_NUM_WORDS(p->nSuppBits);
185 p->vSuppStr = Sim_ComputeStrSupp( pNtk );
186 p->vSuppFun = Sim_UtilInfoAlloc( Abc_NtkCoNum(p->pNtk), p->nSuppWords, 1 );
187 // other data
188 p->pMmPat = Extra_MmFixedStart( sizeof(Sim_Pat_t) + p->nSuppWords * sizeof(unsigned) );
189 p->vFifo = Vec_PtrAlloc( 100 );
190 p->vDiffs = Vec_IntAlloc( 100 );
191 // allocate support targets (array of unresolved outputs for each input)
192 p->vSuppTargs = Vec_VecStart( p->nInputs );
193 }
194 return p;
195}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
Vec_Ptr_t * Sim_ComputeStrSupp(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition simSupp.c:57
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_ManStop()

void Sim_ManStop ( Sim_Man_t * p)
extern

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

Synopsis [Stops the simulation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 208 of file simMan.c.

209{
211 if ( p->vSim0 ) Sim_UtilInfoFree( p->vSim0 );
212 if ( p->vSim1 ) Sim_UtilInfoFree( p->vSim1 );
213 if ( p->vSuppStr ) Sim_UtilInfoFree( p->vSuppStr );
214// if ( p->vSuppFun ) Sim_UtilInfoFree( p->vSuppFun );
215 if ( p->vSuppTargs ) Vec_VecFree( p->vSuppTargs );
216 if ( p->pMmPat ) Extra_MmFixedStop( p->pMmPat );
217 if ( p->vFifo ) Vec_PtrFree( p->vFifo );
218 if ( p->vDiffs ) Vec_IntFree( p->vDiffs );
219 ABC_FREE( p );
220}
#define ABC_FREE(obj)
Definition abc_global.h:267
void Extra_MmFixedStop(Extra_MmFixed_t *p)
void Sim_ManPrintStats(Sim_Man_t *p)
Definition simMan.c:233
void Sim_UtilInfoFree(Vec_Ptr_t *p)
Definition simUtils.c:84
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_SimulateSeqModel()

Vec_Ptr_t * Sim_SimulateSeqModel ( Abc_Ntk_t * pNtk,
int nFrames,
int * pModel )
extern

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

Synopsis [Simulates sequential circuit.]

Description [Takes sequential circuit (pNtk). Simulates the given number (nFrames) of the circuit with the given model. The model is assumed to contain values of PIs for each frame. The latches are initialized to the initial state. One word of data is simulated.]

SideEffects []

SeeAlso []

Definition at line 92 of file simSeq.c.

93{
94 Vec_Ptr_t * vInfo;
95 Abc_Obj_t * pNode;
96 unsigned * pUnsigned;
97 int i, k;
98 vInfo = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), nFrames, 0 );
99 // set the constant data
100 pNode = Abc_AigConst1(pNtk);
101 Sim_UtilSetConst( Sim_SimInfoGet(vInfo,pNode), nFrames, 1 );
102 // set the random PI data
103 Abc_NtkForEachPi( pNtk, pNode, i )
104 {
105 pUnsigned = Sim_SimInfoGet(vInfo,pNode);
106 for ( k = 0; k < nFrames; k++ )
107 pUnsigned[k] = pModel[k * Abc_NtkPiNum(pNtk) + i] ? ~((unsigned)0) : 0;
108 }
109 // set the initial state data
110 Abc_NtkForEachLatch( pNtk, pNode, i )
111 {
112 pUnsigned = Sim_SimInfoGet(vInfo,pNode);
113 if ( Abc_LatchIsInit0(pNode) )
114 pUnsigned[0] = 0;
115 else if ( Abc_LatchIsInit1(pNode) )
116 pUnsigned[0] = ~((unsigned)0);
117 else
118 pUnsigned[0] = SIM_RANDOM_UNSIGNED;
119 }
120 // simulate the nodes for the given number of timeframes
121 for ( i = 0; i < nFrames; i++ )
122 Sim_SimulateSeqFrame( vInfo, pNtk, i, 1, (int)(i < nFrames-1) );
123/*
124 // print the simulated values
125 for ( i = 0; i < nFrames; i++ )
126 {
127 printf( "Frame %d : ", i+1 );
128 Abc_NtkForEachPi( pNtk, pNode, k )
129 printf( "%d", Sim_SimInfoGet(vInfo,pNode)[i] > 0 );
130 printf( " " );
131 Abc_NtkForEachLatch( pNtk, pNode, k )
132 printf( "%d", Sim_SimInfoGet(vInfo,pNode)[i] > 0 );
133 printf( " " );
134 Abc_NtkForEachPo( pNtk, pNode, k )
135 printf( "%d", Sim_SimInfoGet(vInfo,pNode)[i] > 0 );
136 printf( "\n" );
137 }
138 printf( "\n" );
139*/
140 return vInfo;
141}
#define Abc_NtkForEachLatch(pNtk, pObj, i)
Definition abc.h:500
#define Abc_NtkForEachPi(pNtk, pPi, i)
Definition abc.h:516
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition abcAig.c:683
#define SIM_RANDOM_UNSIGNED
Definition sim.h:158
void Sim_UtilSetConst(unsigned *pPatRand, int nSimWords, int fConst1)
Definition simUtils.c:484
#define Sim_SimInfoGet(vInfo, pNode)
Definition sim.h:172
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_SimulateSeqRandom()

Vec_Ptr_t * Sim_SimulateSeqRandom ( Abc_Ntk_t * pNtk,
int nFrames,
int nWords )
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Simulates sequential circuit.]

Description [Takes sequential circuit (pNtk). Simulates the given number (nFrames) of the circuit with the given number of machine words (nWords) of random simulation data, starting from the initial state. If the initial state of some latches is a don't-care, uses random input for that latch.]

SideEffects []

SeeAlso []

Definition at line 51 of file simSeq.c.

52{
53 Vec_Ptr_t * vInfo;
54 Abc_Obj_t * pNode;
55 int i;
56 assert( Abc_NtkIsStrash(pNtk) );
57 vInfo = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), nWords * nFrames, 0 );
58 // set the constant data
59 pNode = Abc_AigConst1(pNtk);
60 Sim_UtilSetConst( Sim_SimInfoGet(vInfo,pNode), nWords * nFrames, 1 );
61 // set the random PI data
62 Abc_NtkForEachPi( pNtk, pNode, i )
63 Sim_UtilSetRandom( Sim_SimInfoGet(vInfo,pNode), nWords * nFrames );
64 // set the initial state data
65 Abc_NtkForEachLatch( pNtk, pNode, i )
66 if ( Abc_LatchIsInit0(pNode) )
67 Sim_UtilSetConst( Sim_SimInfoGet(vInfo,pNode), nWords, 0 );
68 else if ( Abc_LatchIsInit1(pNode) )
69 Sim_UtilSetConst( Sim_SimInfoGet(vInfo,pNode), nWords, 1 );
70 else
72 // simulate the nodes for the given number of timeframes
73 for ( i = 0; i < nFrames; i++ )
74 Sim_SimulateSeqFrame( vInfo, pNtk, i, nWords, (int)(i < nFrames-1) );
75 return vInfo;
76}
int nWords
Definition abcNpn.c:127
Here is the call graph for this function:

◆ Sim_SymmsGetPatternUsingSat()

int Sim_SymmsGetPatternUsingSat ( Sym_Man_t * p,
unsigned * pPattern )
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Tries to prove the remaining pairs using SAT.]

Description [Continues to prove as long as it encounters symmetric pairs. Returns 1 if a non-symmetric pair is found (which gives a counter-example). Returns 0 if it finishes considering all pairs for all outputs.]

SideEffects []

SeeAlso []

Definition at line 51 of file simSymSat.c.

52{
53 Vec_Int_t * vSupport;
54 Extra_BitMat_t * pMatSym, * pMatNonSym;
55 int Index1, Index2, Index3, IndexU, IndexV;
56 int v, u, i, k, b, out;
57
58 // iterate through outputs
59 for ( out = p->iOutput; out < p->nOutputs; out++ )
60 {
61 pMatSym = (Extra_BitMat_t *)Vec_PtrEntry( p->vMatrSymms, out );
62 pMatNonSym = (Extra_BitMat_t *)Vec_PtrEntry( p->vMatrNonSymms, out );
63
64 // go through the remaining variable pairs
65 vSupport = Vec_VecEntryInt( p->vSupports, out );
66 Vec_IntForEachEntry( vSupport, v, Index1 )
67 Vec_IntForEachEntryStart( vSupport, u, Index2, Index1+1 )
68 {
69 if ( Extra_BitMatrixLookup1( pMatSym, v, u ) || Extra_BitMatrixLookup1( pMatNonSym, v, u ) )
70 continue;
71 p->nSatRuns++;
72
73 // collect the support variables that are symmetric with u and v
74 Vec_IntClear( p->vVarsU );
75 Vec_IntClear( p->vVarsV );
76 Vec_IntForEachEntry( vSupport, b, Index3 )
77 {
78 if ( Extra_BitMatrixLookup1( pMatSym, u, b ) )
79 Vec_IntPush( p->vVarsU, b );
80 if ( Extra_BitMatrixLookup1( pMatSym, v, b ) )
81 Vec_IntPush( p->vVarsV, b );
82 }
83
84 if ( Sim_SymmsSatProveOne( p, out, v, u, pPattern ) )
85 { // update the symmetric variable info
86 p->nSatRunsUnsat++;
87 Vec_IntForEachEntry( p->vVarsU, i, IndexU )
88 Vec_IntForEachEntry( p->vVarsV, k, IndexV )
89 {
90 Extra_BitMatrixInsert1( pMatSym, i, k ); // Theorem 1
91 Extra_BitMatrixInsert2( pMatSym, i, k ); // Theorem 1
92 Extra_BitMatrixOrTwo( pMatNonSym, i, k ); // Theorem 2
93 }
94 }
95 else
96 { // update the assymmetric variable info
97 p->nSatRunsSat++;
98 Vec_IntForEachEntry( p->vVarsU, i, IndexU )
99 Vec_IntForEachEntry( p->vVarsV, k, IndexV )
100 {
101 Extra_BitMatrixInsert1( pMatNonSym, i, k ); // Theorem 3
102 Extra_BitMatrixInsert2( pMatNonSym, i, k ); // Theorem 3
103 }
104
105 // remember the out
106 p->iOutput = out;
107 p->iVar1Old = p->iVar1;
108 p->iVar2Old = p->iVar2;
109 p->iVar1 = v;
110 p->iVar2 = u;
111 return 1;
112
113 }
114 }
115 // make sure that the symmetry matrix contains only cliques
116 assert( Extra_BitMatrixIsClique( pMatSym ) );
117 }
118
119 // mark that we finished all outputs
120 p->iOutput = p->nOutputs;
121 return 0;
122}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Extra_BitMat_t_ Extra_BitMat_t
Definition extra.h:81
void Extra_BitMatrixInsert1(Extra_BitMat_t *p, int i, int k)
void Extra_BitMatrixOrTwo(Extra_BitMat_t *p, int i, int j)
void Extra_BitMatrixInsert2(Extra_BitMat_t *p, int i, int k)
int Extra_BitMatrixIsClique(Extra_BitMat_t *p)
int Extra_BitMatrixLookup1(Extra_BitMat_t *p, int i, int k)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
Definition vecInt.h:56
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_SymmsSimulate()

void Sim_SymmsSimulate ( Sym_Man_t * p,
unsigned * pPat,
Vec_Ptr_t * vMatrsNonSym )
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Detects non-symmetric pairs using one pattern.]

Description []

SideEffects []

SeeAlso []

Definition at line 49 of file simSymSim.c.

50{
51 Abc_Obj_t * pNode;
52 int i, nPairsTotal, nPairsSym, nPairsNonSym;
53 abctime clk;
54
55 // create the simulation matrix
56 Sim_SymmsCreateSquare( p, pPat );
57 // simulate each node in the DFS order
58clk = Abc_Clock();
59 Vec_PtrForEachEntry( Abc_Obj_t *, p->vNodes, pNode, i )
60 {
61// if ( Abc_NodeIsConst(pNode) )
62// continue;
63 Sim_UtilSimulateNodeOne( pNode, p->vSim, p->nSimWords, 0 );
64 }
65p->timeSim += Abc_Clock() - clk;
66 // collect info into the CO matrices
67clk = Abc_Clock();
68 Abc_NtkForEachCo( p->pNtk, pNode, i )
69 {
70 pNode = Abc_ObjFanin0(pNode);
71// if ( Abc_ObjIsCi(pNode) || Abc_AigNodeIsConst(pNode) )
72// continue;
73 nPairsTotal = Vec_IntEntry(p->vPairsTotal, i);
74 nPairsSym = Vec_IntEntry(p->vPairsSym, i);
75 nPairsNonSym = Vec_IntEntry(p->vPairsNonSym,i);
76 assert( nPairsTotal >= nPairsSym + nPairsNonSym );
77 if ( nPairsTotal == nPairsSym + nPairsNonSym )
78 continue;
79 Sim_SymmsDeriveInfo( p, pPat, pNode, vMatrsNonSym, i );
80 }
81p->timeMatr += Abc_Clock() - clk;
82}
void Sim_UtilSimulateNodeOne(Abc_Obj_t *pNode, Vec_Ptr_t *vSimInfo, int nSimWords, int nOffset)
Definition simUtils.c:303
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_SymmsStructCompute()

void Sim_SymmsStructCompute ( Abc_Ntk_t * pNtk,
Vec_Ptr_t * vMatrs,
Vec_Ptr_t * vSuppFun )
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Computes symmetries for a single output function.]

Description []

SideEffects []

SeeAlso []

Definition at line 61 of file simSymStr.c.

62{
63 Vec_Ptr_t * vNodes;
64 Abc_Obj_t * pTemp;
65 int * pMap, i;
66
67 assert( Abc_NtkCiNum(pNtk) + 10 < (1<<16) );
68
69 // get the structural support
70 pNtk->vSupps = Sim_ComputeStrSupp( pNtk );
71 // set elementary info for the CIs
72 Abc_NtkForEachCi( pNtk, pTemp, i )
73 SIM_SET_SYMMS( pTemp, Vec_IntAlloc(0) );
74 // create the map of CI ids into their numbers
75 pMap = Sim_SymmsCreateMap( pNtk );
76 // collect the nodes in the TFI cone of this output
77 vNodes = Abc_NtkDfs( pNtk, 0 );
78 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pTemp, i )
79 {
80// if ( Abc_NodeIsConst(pTemp) )
81// continue;
82 Sim_SymmsStructComputeOne( pNtk, pTemp, pMap );
83 }
84 // collect the results for the COs;
85 Abc_NtkForEachCo( pNtk, pTemp, i )
86 {
87//printf( "Output %d:\n", i );
88 pTemp = Abc_ObjFanin0(pTemp);
89 if ( Abc_ObjIsCi(pTemp) || Abc_AigNodeIsConst(pTemp) )
90 continue;
91 Sim_SymmsTransferToMatrix( (Extra_BitMat_t *)Vec_PtrEntry(vMatrs, i), SIM_READ_SYMMS(pTemp), (unsigned *)Vec_PtrEntry(vSuppFun, i) );
92 }
93 // clean the intermediate results
94 Sim_UtilInfoFree( pNtk->vSupps );
95 pNtk->vSupps = NULL;
96 Abc_NtkForEachCi( pNtk, pTemp, i )
97 Vec_IntFree( SIM_READ_SYMMS(pTemp) );
98 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pTemp, i )
99// if ( !Abc_NodeIsConst(pTemp) )
100 Vec_IntFree( SIM_READ_SYMMS(pTemp) );
101 Vec_PtrFree( vNodes );
102 ABC_FREE( pMap );
103}
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
Definition abcDfs.c:82
#define SIM_SET_SYMMS(pNode, vVect)
Definition simSymStr.c:32
#define SIM_READ_SYMMS(pNode)
DECLARATIONS ///.
Definition simSymStr.c:31
Vec_Ptr_t * vSupps
Definition abc.h:197
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_UtilCountAllPairs()

int Sim_UtilCountAllPairs ( Vec_Ptr_t * vSuppFun,
int nSimWords,
Vec_Int_t * vCounters )
extern

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

Synopsis [Counts the total number of pairs.]

Description []

SideEffects []

SeeAlso []

Definition at line 564 of file simUtils.c.

565{
566 unsigned * pSupp;
567 int Counter, nOnes, nPairs, i;
568 Counter = 0;
569 Vec_PtrForEachEntry( unsigned *, vSuppFun, pSupp, i )
570 {
571 nOnes = Sim_UtilCountOnes( pSupp, nSimWords );
572 nPairs = nOnes * (nOnes - 1) / 2;
573 Vec_IntWriteEntry( vCounters, i, nPairs );
574 Counter += nPairs;
575 }
576 return Counter;
577}
int Sim_UtilCountOnes(unsigned *pSimInfo, int nSimWords)
Definition simUtils.c:403
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_UtilCountOnes()

int Sim_UtilCountOnes ( unsigned * pSimInfo,
int nSimWords )
extern

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

Synopsis [Counts the number of 1's in the bitstring.]

Description []

SideEffects []

SeeAlso []

Definition at line 403 of file simUtils.c.

404{
405 unsigned char * pBytes;
406 int nOnes, nBytes, i;
407 pBytes = (unsigned char *)pSimInfo;
408 nBytes = 4 * nSimWords;
409 nOnes = 0;
410 for ( i = 0; i < nBytes; i++ )
411 nOnes += bit_count[ pBytes[i] ];
412 return nOnes;
413}
Here is the caller graph for this function:

◆ Sim_UtilCountOnesArray()

Vec_Int_t * Sim_UtilCountOnesArray ( Vec_Ptr_t * vInfo,
int nSimWords )
extern

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

Synopsis [Counts the number of 1's in the bitstring.]

Description []

SideEffects []

SeeAlso []

Definition at line 426 of file simUtils.c.

427{
428 Vec_Int_t * vCounters;
429 unsigned * pSimInfo;
430 int i;
431 vCounters = Vec_IntStart( Vec_PtrSize(vInfo) );
432 Vec_PtrForEachEntry( unsigned *, vInfo, pSimInfo, i )
433 Vec_IntWriteEntry( vCounters, i, Sim_UtilCountOnes(pSimInfo, nSimWords) );
434 return vCounters;
435}
Here is the call graph for this function:

◆ Sim_UtilCountPairsAll()

void Sim_UtilCountPairsAll ( Sym_Man_t * p)
extern

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

Synopsis [Counts the number of entries in the array of matrices.]

Description []

SideEffects []

SeeAlso []

Definition at line 660 of file simUtils.c.

661{
662 int nPairsTotal, nPairsSym, nPairsNonSym, i;
663 abctime clk;
664clk = Abc_Clock();
665 p->nPairsSymm = 0;
666 p->nPairsNonSymm = 0;
667 for ( i = 0; i < p->nOutputs; i++ )
668 {
669 nPairsTotal = Vec_IntEntry(p->vPairsTotal, i);
670 nPairsSym = Vec_IntEntry(p->vPairsSym, i);
671 nPairsNonSym = Vec_IntEntry(p->vPairsNonSym,i);
672 assert( nPairsTotal >= nPairsSym + nPairsNonSym );
673 if ( nPairsTotal == nPairsSym + nPairsNonSym )
674 {
675 p->nPairsSymm += nPairsSym;
676 p->nPairsNonSymm += nPairsNonSym;
677 continue;
678 }
679 nPairsSym = Sim_UtilCountPairsOne( (Extra_BitMat_t *)Vec_PtrEntry(p->vMatrSymms, i), Vec_VecEntryInt(p->vSupports, i) );
680 nPairsNonSym = Sim_UtilCountPairsOne( (Extra_BitMat_t *)Vec_PtrEntry(p->vMatrNonSymms,i), Vec_VecEntryInt(p->vSupports, i) );
681 assert( nPairsTotal >= nPairsSym + nPairsNonSym );
682 Vec_IntWriteEntry( p->vPairsSym, i, nPairsSym );
683 Vec_IntWriteEntry( p->vPairsNonSym, i, nPairsNonSym );
684 p->nPairsSymm += nPairsSym;
685 p->nPairsNonSymm += nPairsNonSym;
686// printf( "%d ", nPairsTotal - nPairsSym - nPairsNonSym );
687 }
688//printf( "\n" );
689 p->nPairsRem = p->nPairsTotal-p->nPairsSymm-p->nPairsNonSymm;
690p->timeCount += Abc_Clock() - clk;
691}
int Sim_UtilCountPairsOne(Extra_BitMat_t *pMat, Vec_Int_t *vSupport)
Definition simUtils.c:590
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_UtilCountSuppSizes()

int Sim_UtilCountSuppSizes ( Sim_Man_t * p,
int fStruct )
extern

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

Synopsis [Returns 1 if the simulation infos are equal.]

Description []

SideEffects []

SeeAlso []

Definition at line 372 of file simUtils.c.

373{
374 Abc_Obj_t * pNode, * pNodeCi;
375 int i, v, Counter;
376 Counter = 0;
377 if ( fStruct )
378 {
379 Abc_NtkForEachCo( p->pNtk, pNode, i )
380 Abc_NtkForEachCi( p->pNtk, pNodeCi, v )
381 Counter += Sim_SuppStrHasVar( p->vSuppStr, pNode, v );
382 }
383 else
384 {
385 Abc_NtkForEachCo( p->pNtk, pNode, i )
386 Abc_NtkForEachCi( p->pNtk, pNodeCi, v )
387 Counter += Sim_SuppFunHasVar( p->vSuppFun, i, v );
388 }
389 return Counter;
390}
#define Sim_SuppFunHasVar(vSupps, Output, v)
Definition sim.h:169
#define Sim_SuppStrHasVar(vSupps, pNode, v)
Definition sim.h:167
Here is the caller graph for this function:

◆ Sim_UtilInfoAdd()

void Sim_UtilInfoAdd ( unsigned * pInfo1,
unsigned * pInfo2,
int nWords )
extern

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

Synopsis [Adds the second supp-info the first.]

Description []

SideEffects []

SeeAlso []

Definition at line 101 of file simUtils.c.

102{
103 int w;
104 for ( w = 0; w < nWords; w++ )
105 pInfo1[w] |= pInfo2[w];
106}

◆ Sim_UtilInfoAlloc()

Vec_Ptr_t * Sim_UtilInfoAlloc ( int nSize,
int nWords,
int fClean )
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Allocates simulation information for all nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 57 of file simUtils.c.

58{
59 Vec_Ptr_t * vInfo;
60 int i;
61 assert( nSize > 0 && nWords > 0 );
62 vInfo = Vec_PtrAlloc( nSize );
63 vInfo->pArray[0] = ABC_ALLOC( unsigned, (long)nSize * (long)nWords );
64 assert( vInfo->pArray[0]);
65 if ( fClean )
66 memset( vInfo->pArray[0], 0, sizeof(unsigned) * nSize * nWords );
67 for ( i = 1; i < nSize; i++ )
68 vInfo->pArray[i] = ((unsigned *)vInfo->pArray[i-1]) + nWords;
69 vInfo->nSize = nSize;
70 return vInfo;
71}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_UtilInfoCompare()

int Sim_UtilInfoCompare ( Sim_Man_t * p,
Abc_Obj_t * pNode )
extern

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

Synopsis [Returns 1 if the simulation infos are equal.]

Description []

SideEffects []

SeeAlso []

Definition at line 186 of file simUtils.c.

187{
188 unsigned * pSimInfo1, * pSimInfo2;
189 int k;
190 pSimInfo1 = (unsigned *)p->vSim0->pArray[pNode->Id];
191 pSimInfo2 = (unsigned *)p->vSim1->pArray[pNode->Id];
192 for ( k = 0; k < p->nSimWords; k++ )
193 if ( pSimInfo2[k] != pSimInfo1[k] )
194 return 0;
195 return 1;
196}

◆ Sim_UtilInfoDetectDiffs()

void Sim_UtilInfoDetectDiffs ( unsigned * pInfo1,
unsigned * pInfo2,
int nWords,
Vec_Int_t * vDiffs )
extern

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

Synopsis [Returns the positions where pInfo2 is 1 while pInfo1 is 0.]

Description []

SideEffects []

SeeAlso []

Definition at line 119 of file simUtils.c.

120{
121 int w, b;
122 unsigned uMask;
123 vDiffs->nSize = 0;
124 for ( w = 0; w < nWords; w++ )
125 if ( (uMask = (pInfo2[w] ^ pInfo1[w])) )
126 for ( b = 0; b < 32; b++ )
127 if ( uMask & (1 << b) )
128 Vec_IntPush( vDiffs, 32*w + b );
129}

◆ Sim_UtilInfoDetectNews()

void Sim_UtilInfoDetectNews ( unsigned * pInfo1,
unsigned * pInfo2,
int nWords,
Vec_Int_t * vDiffs )
extern

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

Synopsis [Returns the positions where pInfo2 is 1 while pInfo1 is 0.]

Description []

SideEffects []

SeeAlso []

Definition at line 142 of file simUtils.c.

143{
144 int w, b;
145 unsigned uMask;
146 vDiffs->nSize = 0;
147 for ( w = 0; w < nWords; w++ )
148 if ( (uMask = (pInfo2[w] & ~pInfo1[w])) )
149 for ( b = 0; b < 32; b++ )
150 if ( uMask & (1 << b) )
151 Vec_IntPush( vDiffs, 32*w + b );
152}

◆ Sim_UtilInfoFlip()

void Sim_UtilInfoFlip ( Sim_Man_t * p,
Abc_Obj_t * pNode )
extern

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

Synopsis [Flips the simulation info of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 165 of file simUtils.c.

166{
167 unsigned * pSimInfo1, * pSimInfo2;
168 int k;
169 pSimInfo1 = (unsigned *)p->vSim0->pArray[pNode->Id];
170 pSimInfo2 = (unsigned *)p->vSim1->pArray[pNode->Id];
171 for ( k = 0; k < p->nSimWords; k++ )
172 pSimInfo2[k] = ~pSimInfo1[k];
173}

◆ Sim_UtilInfoFree()

void Sim_UtilInfoFree ( Vec_Ptr_t * p)
extern

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

Synopsis [Allocates simulation information for all nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 84 of file simUtils.c.

85{
86 ABC_FREE( p->pArray[0] );
87 Vec_PtrFree( p );
88}
Here is the caller graph for this function:

◆ Sim_UtilInfoIsClause()

int Sim_UtilInfoIsClause ( unsigned * pPats1,
unsigned * pPats2,
int nSimWords )
extern

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

Synopsis [Returns 1 if Node1 v Node2 is always true.]

Description []

SideEffects []

SeeAlso []

Definition at line 544 of file simUtils.c.

545{
546 int k;
547 for ( k = 0; k < nSimWords; k++ )
548 if ( ~pPats1[k] & ~pPats2[k] )
549 return 0;
550 return 1;
551}

◆ Sim_UtilInfoIsEqual()

int Sim_UtilInfoIsEqual ( unsigned * pPats1,
unsigned * pPats2,
int nSimWords )
extern

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

Synopsis [Returns 1 if equal.]

Description []

SideEffects []

SeeAlso []

Definition at line 504 of file simUtils.c.

505{
506 int k;
507 for ( k = 0; k < nSimWords; k++ )
508 if ( pPats1[k] != pPats2[k] )
509 return 0;
510 return 1;
511}

◆ Sim_UtilInfoIsImp()

int Sim_UtilInfoIsImp ( unsigned * pPats1,
unsigned * pPats2,
int nSimWords )
extern

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

Synopsis [Returns 1 if Node1 implies Node2.]

Description []

SideEffects []

SeeAlso []

Definition at line 524 of file simUtils.c.

525{
526 int k;
527 for ( k = 0; k < nSimWords; k++ )
528 if ( pPats1[k] & ~pPats2[k] )
529 return 0;
530 return 1;
531}

◆ Sim_UtilMatrsAreDisjoint()

int Sim_UtilMatrsAreDisjoint ( Sym_Man_t * p)
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 704 of file simUtils.c.

705{
706 int i;
707 for ( i = 0; i < p->nOutputs; i++ )
708 if ( !Extra_BitMatrixIsDisjoint( (Extra_BitMat_t *)Vec_PtrEntry(p->vMatrSymms,i), (Extra_BitMat_t *)Vec_PtrEntry(p->vMatrNonSymms,i) ) )
709 return 0;
710 return 1;
711}
int Extra_BitMatrixIsDisjoint(Extra_BitMat_t *p1, Extra_BitMat_t *p2)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_UtilSetCompl()

void Sim_UtilSetCompl ( unsigned * pPatRand,
int nSimWords )
extern

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

Synopsis [Returns complemented patterns.]

Description []

SideEffects []

SeeAlso []

Definition at line 466 of file simUtils.c.

467{
468 int k;
469 for ( k = 0; k < nSimWords; k++ )
470 pPatRand[k] = ~pPatRand[k];
471}
Here is the caller graph for this function:

◆ Sim_UtilSetConst()

void Sim_UtilSetConst ( unsigned * pPatRand,
int nSimWords,
int fConst1 )
extern

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

Synopsis [Returns constant patterns.]

Description []

SideEffects []

SeeAlso []

Definition at line 484 of file simUtils.c.

485{
486 int k;
487 for ( k = 0; k < nSimWords; k++ )
488 pPatRand[k] = 0;
489 if ( fConst1 )
490 Sim_UtilSetCompl( pPatRand, nSimWords );
491}
void Sim_UtilSetCompl(unsigned *pPatRand, int nSimWords)
Definition simUtils.c:466
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sim_UtilSetRandom()

void Sim_UtilSetRandom ( unsigned * pPatRand,
int nSimWords )
extern

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

Synopsis [Returns random patterns.]

Description []

SideEffects []

SeeAlso []

Definition at line 448 of file simUtils.c.

449{
450 int k;
451 for ( k = 0; k < nSimWords; k++ )
452 pPatRand[k] = SIM_RANDOM_UNSIGNED;
453}
Here is the caller graph for this function:

◆ Sim_UtilSimulate()

void Sim_UtilSimulate ( Sim_Man_t * p,
int fType )
extern

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

Synopsis [Simulates the internal nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 209 of file simUtils.c.

210{
211 Abc_Obj_t * pNode;
212 int i;
213 // simulate the internal nodes
214 Abc_NtkForEachNode( p->pNtk, pNode, i )
215 Sim_UtilSimulateNode( p, pNode, fType, fType, fType );
216 // assign simulation info of the CO nodes
217 Abc_NtkForEachCo( p->pNtk, pNode, i )
218 Sim_UtilSimulateNode( p, pNode, fType, fType, fType );
219}
void Sim_UtilSimulateNode(Sim_Man_t *p, Abc_Obj_t *pNode, int fType, int fType1, int fType2)
Definition simUtils.c:232
Here is the call graph for this function:

◆ Sim_UtilSimulateNode()

void Sim_UtilSimulateNode ( Sim_Man_t * p,
Abc_Obj_t * pNode,
int fType,
int fType1,
int fType2 )
extern

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

Synopsis [Simulates one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 232 of file simUtils.c.

233{
234 unsigned * pSimmNode, * pSimmNode1, * pSimmNode2;
235 int k, fComp1, fComp2;
236 // simulate the internal nodes
237 if ( Abc_ObjIsNode(pNode) )
238 {
239 if ( fType )
240 pSimmNode = (unsigned *)p->vSim1->pArray[ pNode->Id ];
241 else
242 pSimmNode = (unsigned *)p->vSim0->pArray[ pNode->Id ];
243
244 if ( fType1 )
245 pSimmNode1 = (unsigned *)p->vSim1->pArray[ Abc_ObjFaninId0(pNode) ];
246 else
247 pSimmNode1 = (unsigned *)p->vSim0->pArray[ Abc_ObjFaninId0(pNode) ];
248
249 if ( fType2 )
250 pSimmNode2 = (unsigned *)p->vSim1->pArray[ Abc_ObjFaninId1(pNode) ];
251 else
252 pSimmNode2 = (unsigned *)p->vSim0->pArray[ Abc_ObjFaninId1(pNode) ];
253
254 fComp1 = Abc_ObjFaninC0(pNode);
255 fComp2 = Abc_ObjFaninC1(pNode);
256 if ( fComp1 && fComp2 )
257 for ( k = 0; k < p->nSimWords; k++ )
258 pSimmNode[k] = ~pSimmNode1[k] & ~pSimmNode2[k];
259 else if ( fComp1 && !fComp2 )
260 for ( k = 0; k < p->nSimWords; k++ )
261 pSimmNode[k] = ~pSimmNode1[k] & pSimmNode2[k];
262 else if ( !fComp1 && fComp2 )
263 for ( k = 0; k < p->nSimWords; k++ )
264 pSimmNode[k] = pSimmNode1[k] & ~pSimmNode2[k];
265 else // if ( fComp1 && fComp2 )
266 for ( k = 0; k < p->nSimWords; k++ )
267 pSimmNode[k] = pSimmNode1[k] & pSimmNode2[k];
268 }
269 else
270 {
271 assert( Abc_ObjFaninNum(pNode) == 1 );
272 if ( fType )
273 pSimmNode = (unsigned *)p->vSim1->pArray[ pNode->Id ];
274 else
275 pSimmNode = (unsigned *)p->vSim0->pArray[ pNode->Id ];
276
277 if ( fType1 )
278 pSimmNode1 = (unsigned *)p->vSim1->pArray[ Abc_ObjFaninId0(pNode) ];
279 else
280 pSimmNode1 = (unsigned *)p->vSim0->pArray[ Abc_ObjFaninId0(pNode) ];
281
282 fComp1 = Abc_ObjFaninC0(pNode);
283 if ( fComp1 )
284 for ( k = 0; k < p->nSimWords; k++ )
285 pSimmNode[k] = ~pSimmNode1[k];
286 else
287 for ( k = 0; k < p->nSimWords; k++ )
288 pSimmNode[k] = pSimmNode1[k];
289 }
290}
Here is the caller graph for this function:

◆ Sim_UtilSimulateNodeOne()

void Sim_UtilSimulateNodeOne ( Abc_Obj_t * pNode,
Vec_Ptr_t * vSimInfo,
int nSimWords,
int nOffset )
extern

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

Synopsis [Simulates one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 303 of file simUtils.c.

304{
305 unsigned * pSimmNode, * pSimmNode1, * pSimmNode2;
306 int k, fComp1, fComp2;
307 // simulate the internal nodes
308 assert( Abc_ObjIsNode(pNode) );
309 pSimmNode = (unsigned *)Vec_PtrEntry(vSimInfo, pNode->Id);
310 pSimmNode1 = (unsigned *)Vec_PtrEntry(vSimInfo, Abc_ObjFaninId0(pNode));
311 pSimmNode2 = (unsigned *)Vec_PtrEntry(vSimInfo, Abc_ObjFaninId1(pNode));
312 pSimmNode += nOffset;
313 pSimmNode1 += nOffset;
314 pSimmNode2 += nOffset;
315 fComp1 = Abc_ObjFaninC0(pNode);
316 fComp2 = Abc_ObjFaninC1(pNode);
317 if ( fComp1 && fComp2 )
318 for ( k = 0; k < nSimWords; k++ )
319 pSimmNode[k] = ~pSimmNode1[k] & ~pSimmNode2[k];
320 else if ( fComp1 && !fComp2 )
321 for ( k = 0; k < nSimWords; k++ )
322 pSimmNode[k] = ~pSimmNode1[k] & pSimmNode2[k];
323 else if ( !fComp1 && fComp2 )
324 for ( k = 0; k < nSimWords; k++ )
325 pSimmNode[k] = pSimmNode1[k] & ~pSimmNode2[k];
326 else // if ( fComp1 && fComp2 )
327 for ( k = 0; k < nSimWords; k++ )
328 pSimmNode[k] = pSimmNode1[k] & pSimmNode2[k];
329}
Here is the caller graph for this function:

◆ Sim_UtilTransferNodeOne()

void Sim_UtilTransferNodeOne ( Abc_Obj_t * pNode,
Vec_Ptr_t * vSimInfo,
int nSimWords,
int nOffset,
int fShift )
extern

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

Synopsis [Simulates one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 342 of file simUtils.c.

343{
344 unsigned * pSimmNode, * pSimmNode1;
345 int k, fComp1;
346 // simulate the internal nodes
347 assert( Abc_ObjIsCo(pNode) );
348 pSimmNode = (unsigned *)Vec_PtrEntry(vSimInfo, pNode->Id);
349 pSimmNode1 = (unsigned *)Vec_PtrEntry(vSimInfo, Abc_ObjFaninId0(pNode));
350 pSimmNode += nOffset + (fShift > 0)*nSimWords;
351 pSimmNode1 += nOffset;
352 fComp1 = Abc_ObjFaninC0(pNode);
353 if ( fComp1 )
354 for ( k = 0; k < nSimWords; k++ )
355 pSimmNode[k] = ~pSimmNode1[k];
356 else
357 for ( k = 0; k < nSimWords; k++ )
358 pSimmNode[k] = pSimmNode1[k];
359}

◆ Sym_ManPrintStats()

void Sym_ManPrintStats ( Sym_Man_t * p)
extern

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

Synopsis [Prints the manager statisticis.]

Description []

SideEffects []

SeeAlso []

Definition at line 135 of file simMan.c.

136{
137// printf( "Inputs = %5d. Outputs = %5d. Sim words = %5d.\n",
138// Abc_NtkCiNum(p->pNtk), Abc_NtkCoNum(p->pNtk), p->nSimWords );
139 printf( "Total symm = %8d.\n", p->nPairsSymm );
140 printf( "Structural symm = %8d.\n", p->nPairsSymmStr );
141 printf( "Total non-sym = %8d.\n", p->nPairsNonSymm );
142 printf( "Total var pairs = %8d.\n", p->nPairsTotal );
143 printf( "Sat runs SAT = %8d.\n", p->nSatRunsSat );
144 printf( "Sat runs UNSAT = %8d.\n", p->nSatRunsUnsat );
145 ABC_PRT( "Structural ", p->timeStruct );
146 ABC_PRT( "Simulation ", p->timeSim );
147 ABC_PRT( "Matrix ", p->timeMatr );
148 ABC_PRT( "Counting ", p->timeCount );
149 ABC_PRT( "Fraiging ", p->timeFraig );
150 ABC_PRT( "SAT ", p->timeSat );
151 ABC_PRT( "TOTAL ", p->timeTotal );
152}
Here is the caller graph for this function:

◆ Sym_ManStart()

Sym_Man_t * Sym_ManStart ( Abc_Ntk_t * pNtk,
int fVerbose )
extern

FUNCTION DECLARATIONS ///.

FUNCTION DECLARATIONS ///.

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

FileName [simMan.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Simulation manager.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Starts the simulation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file simMan.c.

47{
48 Sym_Man_t * p;
49 int i, v;
50 // start the manager
51 p = ABC_ALLOC( Sym_Man_t, 1 );
52 memset( p, 0, sizeof(Sym_Man_t) );
53 p->pNtk = pNtk;
54 p->vNodes = Abc_NtkDfs( pNtk, 0 );
55 p->nInputs = Abc_NtkCiNum(p->pNtk);
56 p->nOutputs = Abc_NtkCoNum(p->pNtk);
57 // internal simulation information
58 p->nSimWords = SIM_NUM_WORDS(p->nInputs);
59 p->vSim = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), p->nSimWords, 0 );
60 // symmetry info for each output
61 p->vMatrSymms = Vec_PtrStart( p->nOutputs );
62 p->vMatrNonSymms = Vec_PtrStart( p->nOutputs );
63 p->vPairsTotal = Vec_IntStart( p->nOutputs );
64 p->vPairsSym = Vec_IntStart( p->nOutputs );
65 p->vPairsNonSym = Vec_IntStart( p->nOutputs );
66 for ( i = 0; i < p->nOutputs; i++ )
67 {
68 p->vMatrSymms->pArray[i] = Extra_BitMatrixStart( p->nInputs );
69 p->vMatrNonSymms->pArray[i] = Extra_BitMatrixStart( p->nInputs );
70 }
71 // temporary patterns
72 p->uPatRand = ABC_ALLOC( unsigned, p->nSimWords );
73 p->uPatCol = ABC_ALLOC( unsigned, p->nSimWords );
74 p->uPatRow = ABC_ALLOC( unsigned, p->nSimWords );
75 p->vVarsU = Vec_IntStart( 100 );
76 p->vVarsV = Vec_IntStart( 100 );
77 // compute supports
78 p->vSuppFun = Sim_ComputeFunSupp( pNtk, fVerbose );
79 p->vSupports = Vec_VecStart( p->nOutputs );
80 for ( i = 0; i < p->nOutputs; i++ )
81 for ( v = 0; v < p->nInputs; v++ )
82 if ( Sim_SuppFunHasVar( p->vSuppFun, i, v ) )
83 Vec_VecPushInt( p->vSupports, i, v );
84 return p;
85}
Extra_BitMat_t * Extra_BitMatrixStart(int nSize)
Vec_Ptr_t * Sim_ComputeFunSupp(Abc_Ntk_t *pNtk, int fVerbose)
Definition simSupp.c:103
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sym_ManStop()

void Sym_ManStop ( Sym_Man_t * p)
extern

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

Synopsis [Stops the simulation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 98 of file simMan.c.

99{
100 int i;
102 if ( p->vSuppFun ) Sim_UtilInfoFree( p->vSuppFun );
103 if ( p->vSim ) Sim_UtilInfoFree( p->vSim );
104 if ( p->vNodes ) Vec_PtrFree( p->vNodes );
105 if ( p->vSupports ) Vec_VecFree( p->vSupports );
106 for ( i = 0; i < p->nOutputs; i++ )
107 {
108 Extra_BitMatrixStop( (Extra_BitMat_t *)p->vMatrSymms->pArray[i] );
109 Extra_BitMatrixStop( (Extra_BitMat_t *)p->vMatrNonSymms->pArray[i] );
110 }
111 Vec_IntFree( p->vVarsU );
112 Vec_IntFree( p->vVarsV );
113 Vec_PtrFree( p->vMatrSymms );
114 Vec_PtrFree( p->vMatrNonSymms );
115 Vec_IntFree( p->vPairsTotal );
116 Vec_IntFree( p->vPairsSym );
117 Vec_IntFree( p->vPairsNonSym );
118 ABC_FREE( p->uPatRand );
119 ABC_FREE( p->uPatCol );
120 ABC_FREE( p->uPatRow );
121 ABC_FREE( p );
122}
void Extra_BitMatrixStop(Extra_BitMat_t *p)
void Sym_ManPrintStats(Sym_Man_t *p)
Definition simMan.c:135
Here is the call graph for this function:
Here is the caller graph for this function: