Go to the source code of this file.
void Fsim_ManFront |
( |
Fsim_Man_t * |
p, |
|
|
int |
fCompressAig |
|
) |
| |
FUNCTION DECLARATIONS ///.
Function*************************************************************
Synopsis [Determine the frontier.]
Description []
SideEffects []
SeeAlso []
Definition at line 245 of file fsimFront.c.
250 int i, iVar0, iVar1, nCrossCut = 0, nCrossCutMax = 0;
266 p->nDataAig =
p->nObjs * 6;
267 p->pDataAig =
ABC_ALLOC(
unsigned char,
p->nDataAig );
268 p->pDataCur =
p->pDataAig;
274 p->pDataCur2 =
p->pDataAig2 + 6;
277 for ( i = 2; i <
p->nObjs; i++ )
279 if (
p->pFans0[i] == 0 )
283 pObj->iNode = pIdToFront[i];
288 if (
p->pRefs[i] == 0 )
290 pFront[pIdToFront[i] %
p->nFront] = 0;
294 else if (
p->pFans1[i] == 0 )
299 assert( pIdToFront[iVar0] > 0 );
306 if ( --
p->pRefs[iVar0] == 0 )
308 pFront[pIdToFront[iVar0] %
p->nFront] = 0;
309 pIdToFront[iVar0] = -1;
317 assert( pIdToFront[iVar0] > 0 );
319 assert( pIdToFront[iVar1] > 0 );
322 pObj->iNode = pIdToFront[i];
327 if ( --
p->pRefs[iVar0] == 0 )
329 pFront[pIdToFront[iVar0] %
p->nFront] = 0;
330 pIdToFront[iVar0] = -1;
333 if ( --
p->pRefs[iVar1] == 0 )
335 pFront[pIdToFront[iVar1] %
p->nFront] = 0;
336 pIdToFront[iVar1] = -1;
340 if (
p->pRefs[i] == 0 )
342 pFront[pIdToFront[i] %
p->nFront] = 0;
347 if ( nCrossCutMax < ++nCrossCut )
348 nCrossCutMax = nCrossCut;
350 assert(
p->pDataAig2 == NULL ||
p->pDataCur2 -
p->pDataAig2 == (3 *
p->nObjs) );
352 assert( nCrossCutMax ==
p->nCrossCutMax );
353 for ( i = 0; i <
p->nFront; i++ )
#define ABC_ALLOC(type, num)
static void Fsim_ManStoreObj(Fsim_Man_t *p, Fsim_Obj_t *pObj)
static int Fsim_ManFrontFindNext(Fsim_Man_t *p, char *pFront)
static int Fsim_LitIsCompl(int Lit)
static int Fsim_Lit2Var(int Lit)
static int Fsim_Var2Lit(int Var, int fCompl)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Fsim_Obj_t_ Fsim_Obj_t
INCLUDES ///.
#define ABC_CALLOC(type, num)
static int Fsim_ManFrontFindNext |
( |
Fsim_Man_t * |
p, |
|
|
char * |
pFront |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Determine the frontier.]
Description []
SideEffects []
SeeAlso []
Definition at line 174 of file fsimFront.c.
176 assert(
p->iNumber < (1 << 30) -
p->nFront );
179 if (
p->iNumber %
p->nFront == 0 )
181 if ( pFront[
p->iNumber %
p->nFront] == 0 )
183 pFront[
p->iNumber %
p->nFront] = 1;
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 69 of file fsimFront.c.
72 for ( i = 0; (ch = *
p->pDataCur++) & 0x80; i++ )
73 x |= (ch & 0x7f) << (7 * i);
74 assert(
p->pDataCur -
p->pDataAig <
p->nDataAig );
75 return x | (ch << (7 * i));
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 137 of file fsimFront.c.
140 if ( (iValue & 3) == 3 )
142 pObj->iNode = (iValue >> 2) +
p->iNodePrev;
145 p->iNodePrev = pObj->iNode;
147 else if ( (iValue & 3) == 1 )
149 pObj->iNode = (iValue >> 2) +
p->iNodePrev;
152 p->iNodePrev = pObj->iNode;
157 pObj->iFan0 = ((
p->iNodePrev << 1) | 1) - (iValue >> 1);
static int Fsim_ManRestoreNum(Fsim_Man_t *p)
DECLARATIONS ///.
CFile****************************************************************
FileName [fsimFront.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Fast sequential AIG simulator.]
Synopsis [Simulation frontier.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
- Id:
- fsimFront.c,v 1.00 2005/06/20 00:00:00 alanmi Exp
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file fsimFront.c.
47 unsigned x = (unsigned)Num;
51 *
p->pDataCur++ = (x & 0x7f) | 0x80;
55 assert(
p->pDataCur -
p->pDataAig <
p->nDataAig );
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 89 of file fsimFront.c.
93 *
p->pDataCur2++ = pObj->iNode;
94 *
p->pDataCur2++ = pObj->iFan0;
95 *
p->pDataCur2++ = pObj->iFan1;
98 if ( pObj->iFan0 && pObj->iFan1 )
101 assert( pObj->iNode >=
p->iNodePrev );
102 assert( (pObj->iNode << 1) > pObj->iFan0 );
103 assert( pObj->iFan0 > pObj->iFan1 );
107 p->iNodePrev = pObj->iNode;
109 else if ( !pObj->iFan0 && !pObj->iFan1 )
112 assert( pObj->iNode >=
p->iNodePrev );
114 p->iNodePrev = pObj->iNode;
118 assert( pObj->iNode == 0 );
119 assert( pObj->iFan0 != 0 );
120 assert( pObj->iFan1 == 0 );
121 assert( ((
p->iNodePrev << 1) | 1) >= pObj->iFan0 );
static ABC_NAMESPACE_IMPL_START void Fsim_ManStoreNum(Fsim_Man_t *p, int Num)
DECLARATIONS ///.
Function*************************************************************
Synopsis [Verifies the frontier.]
Description []
SideEffects []
SeeAlso []
Definition at line 202 of file fsimFront.c.
205 int * pFans0, * pFans1;
210 pFans0[0] = pFans1[0] = 0;
211 pFans0[1] = pFans1[1] = 0;
218 pFrontToId[pObj->iNode %
p->nFront] = i;
224 for ( i = 0; i <
p->nObjs; i++ )
226 assert( pFans0[i] ==
p->pFans0[i] );
227 assert( pFans1[i] ==
p->pFans1[i] );
#define ABC_ALLOC(type, num)
static int Fsim_LitIsCompl(int Lit)
static int Fsim_Lit2Var(int Lit)
static int Fsim_Var2Lit(int Var, int fCompl)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Fsim_Obj_t_ Fsim_Obj_t
INCLUDES ///.
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define Fsim_ManForEachObj(p, pObj, i)
#define ABC_CALLOC(type, num)
static int Aig_ObjRefs(Aig_Obj_t *pObj)