abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
giaTsim.c File Reference
#include "gia.h"

Go to the source code of this file.

Data Structures

struct  Gia_ManTer_t_
 

Typedefs

typedef struct Gia_ManTer_t_ Gia_ManTer_t
 

Functions

static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet (unsigned *pInfo, int i)
 DECLARATIONS ///. More...
 
static void Gia_ManTerSimInfoSet (unsigned *pInfo, int i, int Value)
 
static unsigned * Gia_ManTerStateNext (unsigned *pState, int nWords)
 
static void Gia_ManTerStateSetNext (unsigned *pState, int nWords, unsigned *pNext)
 
Gia_ManTer_tGia_ManTerCreate (Gia_Man_t *pAig)
 FUNCTION DEFINITIONS ///. More...
 
void Gia_ManTerStatesFree (Vec_Ptr_t *vStates)
 
void Gia_ManTerDelete (Gia_ManTer_t *p)
 
static void Gia_ManTerSimulateCi (Gia_ManTer_t *p, Gia_Obj_t *pObj, int iCi)
 
static void Gia_ManTerSimulateCo (Gia_ManTer_t *p, int iCo, Gia_Obj_t *pObj)
 
static void Gia_ManTerSimulateNode (Gia_ManTer_t *p, Gia_Obj_t *pObj)
 
static void Gia_ManTerSimInfoInit (Gia_ManTer_t *p)
 
static void Gia_ManTerSimInfoTransfer (Gia_ManTer_t *p)
 
int Gia_ManTerStateHash (unsigned *pState, int nWords, int nTableSize)
 
unsigned * Gia_ManTerStateLookup (unsigned *pState, int nWords, unsigned **pBins, int nBins)
 
void Gia_ManTerStateInsert (unsigned *pState, int nWords, unsigned **pBins, int nBins)
 
unsigned * Gia_ManTerStateAlloc (int nWords)
 
unsigned * Gia_ManTerStateCreate (Gia_ManTer_t *p)
 
static void Gia_ManTerSimulateRound (Gia_ManTer_t *p)
 
int Gia_ManTerRetire2 (Gia_ManTer_t *p, unsigned *pState)
 
int Gia_ManTerRetire (Gia_ManTer_t *p, unsigned *pThis, unsigned *pPrev)
 
void Gia_ManTerStatePrint (unsigned *pState, int nRegs, int iNum)
 
void Gia_ManTerAnalyze2 (Vec_Ptr_t *vStates, int nRegs)
 
void Gia_ManTerAnalyze (Gia_ManTer_t *p)
 
Vec_Ptr_tGia_ManTerTranspose (Gia_ManTer_t *p)
 
int Gia_ManFindEqualFlop (Vec_Ptr_t *vFlops, int iFlop, int nFlopWords)
 
int * Gia_ManTerCreateMap (Gia_ManTer_t *p, int fVerbose)
 
Gia_ManTer_tGia_ManTerSimulate (Gia_Man_t *pAig, int fVerbose)
 
Gia_Man_tGia_ManReduceConst (Gia_Man_t *pAig, int fVerbose)
 

Typedef Documentation

typedef struct Gia_ManTer_t_ Gia_ManTer_t

Definition at line 45 of file giaTsim.c.

Function Documentation

int Gia_ManFindEqualFlop ( Vec_Ptr_t vFlops,
int  iFlop,
int  nFlopWords 
)

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

Synopsis [Transposes state vector for non-ternary registers.]

Description []

SideEffects []

SeeAlso []

Definition at line 605 of file giaTsim.c.

606 {
607  unsigned * pFlop, * pTemp;
608  int i;
609  pFlop = (unsigned *)Vec_PtrEntry( vFlops, iFlop );
610  Vec_PtrForEachEntryStop( unsigned *, vFlops, pTemp, i, iFlop )
611  if ( !memcmp( pTemp, pFlop, sizeof(unsigned) * nFlopWords ) )
612  return i;
613  return -1;
614 }
if(last==0)
Definition: sparse_int.h:34
int memcmp()
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
#define Vec_PtrForEachEntryStop(Type, vVec, pEntry, i, Stop)
Definition: vecPtr.h:59
Gia_Man_t* Gia_ManReduceConst ( Gia_Man_t pAig,
int  fVerbose 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 737 of file giaTsim.c.

738 {
739  Gia_ManTer_t * p;
740  Gia_Man_t * pNew = NULL;
741  int * pCi2Lit;
742  p = Gia_ManTerSimulate( pAig, fVerbose );
743  Gia_ManTerAnalyze( p );
744  pCi2Lit = Gia_ManTerCreateMap( p, fVerbose );
745  Gia_ManTerDelete( p );
746  pNew = Gia_ManDupDfsCiMap( pAig, pCi2Lit, NULL );
747  ABC_FREE( pCi2Lit );
748  return pNew;
749 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Gia_ManTerDelete(Gia_ManTer_t *p)
Definition: giaTsim.c:133
Gia_Man_t * Gia_ManDupDfsCiMap(Gia_Man_t *p, int *pCi2Lit, Vec_Int_t *vLits)
Definition: giaDup.c:1890
void Gia_ManTerAnalyze(Gia_ManTer_t *p)
Definition: giaTsim.c:547
#define ABC_FREE(obj)
Definition: abc_global.h:232
Definition: gia.h:95
int * Gia_ManTerCreateMap(Gia_ManTer_t *p, int fVerbose)
Definition: giaTsim.c:627
Gia_ManTer_t * Gia_ManTerSimulate(Gia_Man_t *pAig, int fVerbose)
Definition: giaTsim.c:668
void Gia_ManTerAnalyze ( Gia_ManTer_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 547 of file giaTsim.c.

548 {
549  int i, nZeros = 0, nConsts = 0;
550  for ( i = 0; i < Gia_ManRegNum(p->pAig); i++ )
551  if ( p->pCount0[i] == Vec_PtrSize(p->vStates) )
552  nZeros++;
553  else if ( p->pCountX[i] == 0 )
554  nConsts++;
555 // printf( "Found %d constant registers.\n", nZeros );
556 // printf( "Found %d non-ternary registers.\n", nConsts );
557 }
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int * pCountX
Definition: giaTsim.c:56
int * pCount0
Definition: giaTsim.c:55
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
void Gia_ManTerAnalyze2 ( Vec_Ptr_t vStates,
int  nRegs 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 505 of file giaTsim.c.

506 {
507  unsigned * pTemp, * pStates = (unsigned *)Vec_PtrPop( vStates );
508  int i, w, nZeros, nConsts, nStateWords;
509  // detect constant zero registers
510  nStateWords = Abc_BitWordNum( 2*nRegs );
511  memset( pStates, 0, sizeof(int) * nStateWords );
512  Vec_PtrForEachEntry( unsigned *, vStates, pTemp, i )
513  for ( w = 0; w < nStateWords; w++ )
514  pStates[w] |= pTemp[w];
515  // count the number of zeros
516  nZeros = 0;
517  for ( i = 0; i < nRegs; i++ )
518  if ( Gia_ManTerSimInfoGet(pStates, i) == GIA_ZER )
519  nZeros++;
520  printf( "Found %d constant registers.\n", nZeros );
521  // detect non-ternary registers
522  memset( pStates, 0, sizeof(int) * nStateWords );
523  Vec_PtrForEachEntry( unsigned *, vStates, pTemp, i )
524  for ( w = 0; w < nStateWords; w++ )
525  pStates[w] |= (~(pTemp[w] ^ (pTemp[w] >> 1)) & 0x55555555);
526  // count the nonternary registers
527  nConsts = 0;
528  for ( i = 0; i < nRegs; i++ )
529  if ( Gia_ManTerSimInfoGet(pStates, i) == 0 )
530  nConsts++;
531  printf( "Found %d non-ternary registers.\n", nConsts );
532  // return the state back
533  Vec_PtrPush( vStates, pStates );
534 }
char * memset()
#define GIA_ZER
Definition: gia.h:747
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static void * Vec_PtrPop(Vec_Ptr_t *p)
Definition: vecPtr.h:677
for(p=first;p->value< newval;p=p->next)
if(last==0)
Definition: sparse_int.h:34
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
Gia_ManTer_t* Gia_ManTerCreate ( Gia_Man_t pAig)

FUNCTION DEFINITIONS ///.

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

Synopsis [Creates fast simulation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 81 of file giaTsim.c.

82 {
83  Gia_ManTer_t * p;
84  p = ABC_CALLOC( Gia_ManTer_t, 1 );
85  p->pAig = Gia_ManFront( pAig );
86  p->nIters = 300;
87  p->pDataSim = ABC_ALLOC( unsigned, Abc_BitWordNum(2*p->pAig->nFront) );
88  p->pDataSimCis = ABC_ALLOC( unsigned, Abc_BitWordNum(2*Gia_ManCiNum(p->pAig)) );
89  p->pDataSimCos = ABC_ALLOC( unsigned, Abc_BitWordNum(2*Gia_ManCoNum(p->pAig)) );
90  // allocate storage for terminary states
92  p->vStates = Vec_PtrAlloc( 1000 );
93  p->pCount0 = ABC_CALLOC( int, Gia_ManRegNum(pAig) );
94  p->pCountX = ABC_CALLOC( int, Gia_ManRegNum(pAig) );
95  p->nBins = Abc_PrimeCudd( 500 );
96  p->pBins = ABC_CALLOC( unsigned *, p->nBins );
97  p->vRetired = Vec_IntAlloc( 100 );
98  p->pRetired = ABC_CALLOC( char, Gia_ManRegNum(pAig) );
99  return p;
100 }
static int Abc_PrimeCudd(unsigned int p)
Definition: abc_global.h:383
int nIters
Definition: giaTsim.c:49
char * pRetired
Definition: giaTsim.c:54
unsigned ** pBins
Definition: giaTsim.c:59
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int nFront
Definition: gia.h:119
unsigned * pDataSimCis
Definition: giaTsim.c:62
unsigned * pDataSim
Definition: giaTsim.c:61
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
unsigned * pDataSimCos
Definition: giaTsim.c:63
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Gia_Man_t * Gia_ManFront(Gia_Man_t *p)
Definition: giaFront.c:147
int * pCountX
Definition: giaTsim.c:56
Vec_Int_t * vRetired
Definition: giaTsim.c:53
int * pCount0
Definition: giaTsim.c:55
int nStateWords
Definition: giaTsim.c:50
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
int* Gia_ManTerCreateMap ( Gia_ManTer_t p,
int  fVerbose 
)

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

Synopsis [Creates map of registers to replace.]

Description []

SideEffects []

SeeAlso []

Definition at line 627 of file giaTsim.c.

628 {
629  int * pCi2Lit;
630  Gia_Obj_t * pObj;
631  Vec_Int_t * vMapKtoI;
632  int i, iRepr, nFlopWords, Counter0 = 0, CounterE = 0;
633  nFlopWords = Abc_BitWordNum( 2*Vec_PtrSize(p->vStates) );
634  p->vFlops = Gia_ManTerTranspose( p );
635  pCi2Lit = ABC_FALLOC( int, Gia_ManCiNum(p->pAig) );
636  vMapKtoI = Vec_IntAlloc( 100 );
637  for ( i = 0; i < Gia_ManRegNum(p->pAig); i++ )
638  if ( p->pCount0[i] == Vec_PtrSize(p->vStates) )
639  pCi2Lit[Gia_ManPiNum(p->pAig)+i] = 0, Counter0++;
640  else if ( p->pCountX[i] == 0 )
641  {
642  iRepr = Gia_ManFindEqualFlop( p->vFlops, Vec_IntSize(vMapKtoI), nFlopWords );
643  Vec_IntPush( vMapKtoI, i );
644  if ( iRepr < 0 )
645  continue;
646  pObj = Gia_ManCi( p->pAig, Gia_ManPiNum(p->pAig)+Vec_IntEntry(vMapKtoI, iRepr) );
647  pCi2Lit[Gia_ManPiNum(p->pAig)+i] = Abc_Var2Lit( Gia_ObjId( p->pAig, pObj ), 0 );
648  CounterE++;
649  }
650  Vec_IntFree( vMapKtoI );
651  if ( fVerbose )
652  printf( "Transforming %d const and %d equiv registers.\n", Counter0, CounterE );
653  return pCi2Lit;
654 }
Vec_Ptr_t * vFlops
Definition: giaTsim.c:52
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
Definition: gia.h:403
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
Definition: gia.h:75
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
int * pCountX
Definition: giaTsim.c:56
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:410
int * pCount0
Definition: giaTsim.c:55
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
int Gia_ManFindEqualFlop(Vec_Ptr_t *vFlops, int iFlop, int nFlopWords)
Definition: giaTsim.c:605
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
Vec_Ptr_t * Gia_ManTerTranspose(Gia_ManTer_t *p)
Definition: giaTsim.c:572
#define ABC_FALLOC(type, num)
Definition: abc_global.h:231
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
void Gia_ManTerDelete ( Gia_ManTer_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 133 of file giaTsim.c.

134 {
135  if ( p->vStates )
137  if ( p->vFlops )
139  Gia_ManStop( p->pAig );
140  Vec_IntFree( p->vRetired );
141  ABC_FREE( p->pRetired );
142  ABC_FREE( p->pCount0 );
143  ABC_FREE( p->pCountX );
144  ABC_FREE( p->pBins );
145  ABC_FREE( p->pDataSim );
146  ABC_FREE( p->pDataSimCis );
147  ABC_FREE( p->pDataSimCos );
148  ABC_FREE( p );
149 }
void Gia_ManTerStatesFree(Vec_Ptr_t *vStates)
Definition: giaTsim.c:113
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
Vec_Ptr_t * vFlops
Definition: giaTsim.c:52
char * pRetired
Definition: giaTsim.c:54
unsigned ** pBins
Definition: giaTsim.c:59
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
unsigned * pDataSimCis
Definition: giaTsim.c:62
unsigned * pDataSim
Definition: giaTsim.c:61
unsigned * pDataSimCos
Definition: giaTsim.c:63
int * pCountX
Definition: giaTsim.c:56
Vec_Int_t * vRetired
Definition: giaTsim.c:53
int * pCount0
Definition: giaTsim.c:55
Gia_Man_t * pAig
Definition: giaTsim.c:48
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
int Gia_ManTerRetire ( Gia_ManTer_t p,
unsigned *  pThis,
unsigned *  pPrev 
)

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

Synopsis [Retires a set of registers to speed up convergence.]

Description [Retire all non-ternary registers which has max number of ternary values so far.]

SideEffects []

SeeAlso []

Definition at line 451 of file giaTsim.c.

452 {
453  int i, Entry;
454  // find registers whose value has changed
455  Vec_IntClear( p->vRetired );
456  for ( i = 0; i < Gia_ManRegNum(p->pAig); i++ )
457  if ( Gia_ManTerSimInfoGet( pThis, i ) != Gia_ManTerSimInfoGet( pPrev, i ) )
458  Vec_IntPush( p->vRetired, i );
459  // set all of them to zero
460  Vec_IntForEachEntry( p->vRetired, Entry, i )
461  Gia_ManTerSimInfoSet( p->pDataSimCis, Gia_ManPiNum(p->pAig)+Entry, GIA_UND );
462  return Vec_IntSize(p->vRetired);
463 }
#define GIA_UND
Definition: gia.h:749
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
Vec_Int_t * vRetired
Definition: giaTsim.c:53
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
int Gia_ManTerRetire2 ( Gia_ManTer_t p,
unsigned *  pState 
)

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

Synopsis [Retires a set of registers to speed up convergence.]

Description [Retire all non-ternary registers which has max number of ternary values so far.]

SideEffects []

SeeAlso []

Definition at line 415 of file giaTsim.c.

416 {
417  int i, Entry, iMaxTerValue = -1;
418  // find non-retired register with this value
419  for ( i = 0; i < Gia_ManRegNum(p->pAig); i++ )
420  if ( Gia_ManTerSimInfoGet( pState, i ) != GIA_UND && !p->pRetired[i] && iMaxTerValue < p->pCountX[i] )
421  iMaxTerValue = p->pCountX[i];
422  assert( iMaxTerValue >= 0 );
423  // retire the first registers with this value
424  for ( i = 0; i < Gia_ManRegNum(p->pAig); i++ )
425  if ( Gia_ManTerSimInfoGet( pState, i ) != GIA_UND && !p->pRetired[i] && iMaxTerValue == p->pCountX[i] )
426  {
427  assert( p->pRetired[i] == 0 );
428  p->pRetired[i] = 1;
429  Vec_IntPush( p->vRetired, i );
430  if ( iMaxTerValue == 0 )
431  break;
432  }
433  // update all the retired registers
434  Vec_IntForEachEntry( p->vRetired, Entry, i )
435  Gia_ManTerSimInfoSet( p->pDataSimCis, Gia_ManPiNum(p->pAig)+Entry, GIA_UND );
436  return Vec_IntSize(p->vRetired);
437 }
#define GIA_UND
Definition: gia.h:749
char * pRetired
Definition: giaTsim.c:54
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
int * pCountX
Definition: giaTsim.c:56
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
Vec_Int_t * vRetired
Definition: giaTsim.c:53
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define assert(ex)
Definition: util_old.h:213
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet ( unsigned *  pInfo,
int  i 
)
inlinestatic

DECLARATIONS ///.

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

FileName [giaTsim.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Ternary simulation.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]

Definition at line 30 of file giaTsim.c.

31 {
32  return 3 & (pInfo[i >> 4] >> ((i & 15) << 1));
33 }
static void Gia_ManTerSimInfoInit ( Gia_ManTer_t p)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 213 of file giaTsim.c.

214 {
215  int i = 0;
216  for ( ; i < Gia_ManPiNum(p->pAig); i++ )
218  for ( ; i < Gia_ManCiNum(p->pAig); i++ )
220 }
#define GIA_UND
Definition: gia.h:749
unsigned * pDataSimCis
Definition: giaTsim.c:62
#define GIA_ZER
Definition: gia.h:747
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
static void Gia_ManTerSimInfoSet ( unsigned *  pInfo,
int  i,
int  Value 
)
inlinestatic

Definition at line 34 of file giaTsim.c.

35 {
36  assert( Value >= GIA_ZER && Value <= GIA_UND );
37  Value ^= Gia_ManTerSimInfoGet( pInfo, i );
38  pInfo[i >> 4] ^= (Value << ((i & 15) << 1));
39 }
#define GIA_UND
Definition: gia.h:749
#define GIA_ZER
Definition: gia.h:747
#define assert(ex)
Definition: util_old.h:213
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static void Gia_ManTerSimInfoTransfer ( Gia_ManTer_t p)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 233 of file giaTsim.c.

234 {
235  int i = 0;
236  for ( ; i < Gia_ManPiNum(p->pAig); i++ )
238  for ( ; i < Gia_ManCiNum(p->pAig); i++ )
240 }
#define GIA_UND
Definition: gia.h:749
unsigned * pDataSimCis
Definition: giaTsim.c:62
unsigned * pDataSimCos
Definition: giaTsim.c:63
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
Gia_ManTer_t* Gia_ManTerSimulate ( Gia_Man_t pAig,
int  fVerbose 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 668 of file giaTsim.c.

669 {
670  Gia_ManTer_t * p;
671  unsigned * pState, * pPrev, * pLoop;
672  int i, Counter;
673  abctime clk, clkTotal = Abc_Clock();
674  assert( Gia_ManRegNum(pAig) > 0 );
675  // create manager
676  clk = Abc_Clock();
677  p = Gia_ManTerCreate( pAig );
678  if ( 0 )
679  {
680  printf( "Obj = %8d (%8d). F = %6d. ",
681  pAig->nObjs, Gia_ManCiNum(pAig) + Gia_ManAndNum(pAig), p->pAig->nFront );
682  printf( "AIG = %7.2f MB. F-mem = %7.2f MB. Other = %7.2f MB. ",
683  12.0*Gia_ManObjNum(p->pAig)/(1<<20),
684  4.0*Abc_BitWordNum(2 * p->pAig->nFront)/(1<<20),
685  4.0*Abc_BitWordNum(2 * (Gia_ManCiNum(pAig) + Gia_ManCoNum(pAig)))/(1<<20) );
686  ABC_PRT( "Time", Abc_Clock() - clk );
687  }
688  // perform simulation
690  // hash the first state
691  pState = Gia_ManTerStateCreate( p );
692  Gia_ManTerStateInsert( pState, p->nStateWords, p->pBins, p->nBins );
693 //Gia_ManTerStatePrint( pState, Gia_ManRegNum(pAig), 0 );
694  // perform simuluation till convergence
695  pPrev = NULL;
696  for ( i = 0; ; i++ )
697  {
700  pState = Gia_ManTerStateCreate( p );
701 //Gia_ManTerStatePrint( pState, Gia_ManRegNum(pAig), i+1 );
702  if ( (pLoop = Gia_ManTerStateLookup(pState, p->nStateWords, p->pBins, p->nBins)) )
703  {
704  pAig->nTerStates = Vec_PtrSize( p->vStates );
705  pAig->nTerLoop = Vec_PtrFind( p->vStates, pLoop );
706  break;
707  }
708  Gia_ManTerStateInsert( pState, p->nStateWords, p->pBins, p->nBins );
709  if ( i >= p->nIters && i % 10 == 0 )
710  {
711  Counter = Gia_ManTerRetire( p, pState, pPrev );
712 // Counter = Gia_ManTerRetire2( p, pState );
713 // if ( fVerbose )
714 // printf( "Retired %d registers.\n", Counter );
715  }
716  pPrev = pState;
717  }
718  if ( fVerbose )
719  {
720  printf( "Ternary simulation saturated after %d iterations. ", i+1 );
721  ABC_PRT( "Time", Abc_Clock() - clkTotal );
722  }
723  return p;
724 }
int nIters
Definition: giaTsim.c:49
static void Gia_ManTerSimInfoTransfer(Gia_ManTer_t *p)
Definition: giaTsim.c:233
unsigned ** pBins
Definition: giaTsim.c:59
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int nFront
Definition: gia.h:119
int nTerStates
Definition: gia.h:126
unsigned * Gia_ManTerStateCreate(Gia_ManTer_t *p)
Definition: giaTsim.c:346
static abctime Abc_Clock()
Definition: abc_global.h:279
int nObjs
Definition: gia.h:101
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static int Vec_PtrFind(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:694
static void Gia_ManTerSimulateRound(Gia_ManTer_t *p)
Definition: giaTsim.c:374
static void Gia_ManTerSimInfoInit(Gia_ManTer_t *p)
Definition: giaTsim.c:213
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
void Gia_ManTerStateInsert(unsigned *pState, int nWords, unsigned **pBins, int nBins)
Definition: giaTsim.c:311
static int Counter
int Gia_ManTerRetire(Gia_ManTer_t *p, unsigned *pThis, unsigned *pPrev)
Definition: giaTsim.c:451
int nStateWords
Definition: giaTsim.c:50
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
#define ABC_PRT(a, t)
Definition: abc_global.h:220
Gia_ManTer_t * Gia_ManTerCreate(Gia_Man_t *pAig)
FUNCTION DEFINITIONS ///.
Definition: giaTsim.c:81
int nTerLoop
Definition: gia.h:125
unsigned * Gia_ManTerStateLookup(unsigned *pState, int nWords, unsigned **pBins, int nBins)
Definition: giaTsim.c:290
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
#define assert(ex)
Definition: util_old.h:213
ABC_INT64_T abctime
Definition: abc_global.h:278
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
static void Gia_ManTerSimulateCi ( Gia_ManTer_t p,
Gia_Obj_t pObj,
int  iCi 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 162 of file giaTsim.c.

163 {
165 }
unsigned * pDataSimCis
Definition: giaTsim.c:62
static int Gia_ObjValue(Gia_Obj_t *pObj)
Definition: gia.h:413
unsigned * pDataSim
Definition: giaTsim.c:61
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static void Gia_ManTerSimulateCo ( Gia_ManTer_t p,
int  iCo,
Gia_Obj_t pObj 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 178 of file giaTsim.c.

179 {
180  int Value = Gia_ManTerSimInfoGet( p->pDataSim, Gia_ObjDiff0(pObj) );
182 }
unsigned * pDataSim
Definition: giaTsim.c:61
static int Gia_XsimNotCond(int Value, int fCompl)
Definition: gia.h:751
unsigned * pDataSimCos
Definition: giaTsim.c:63
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
static int Gia_ObjDiff0(Gia_Obj_t *pObj)
Definition: gia.h:449
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static void Gia_ManTerSimulateNode ( Gia_ManTer_t p,
Gia_Obj_t pObj 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 195 of file giaTsim.c.

196 {
197  int Value0 = Gia_ManTerSimInfoGet( p->pDataSim, Gia_ObjDiff0(pObj) );
198  int Value1 = Gia_ManTerSimInfoGet( p->pDataSim, Gia_ObjDiff1(pObj) );
199  Gia_ManTerSimInfoSet( p->pDataSim, Gia_ObjValue(pObj), Gia_XsimAndCond( Value0, Gia_ObjFaninC0(pObj), Value1, Gia_ObjFaninC1(pObj) ) );
200 }
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
static int Gia_ObjDiff1(Gia_Obj_t *pObj)
Definition: gia.h:450
static int Gia_ObjValue(Gia_Obj_t *pObj)
Definition: gia.h:413
unsigned * pDataSim
Definition: giaTsim.c:61
static int Gia_XsimAndCond(int Value0, int fCompl0, int Value1, int fCompl1)
Definition: gia.h:759
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
static int Gia_ObjDiff0(Gia_Obj_t *pObj)
Definition: gia.h:449
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static void Gia_ManTerSimulateRound ( Gia_ManTer_t p)
inlinestatic

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

Synopsis [Performs one round of ternary simulation.]

Description []

SideEffects []

SeeAlso []

Definition at line 374 of file giaTsim.c.

375 {
376  Gia_Obj_t * pObj;
377  int i, iCis = 0, iCos = 0;
378  assert( p->pAig->nFront > 0 );
379  assert( Gia_ManConst0(p->pAig)->Value == 0 );
381  Gia_ManForEachObj1( p->pAig, pObj, i )
382  {
383  if ( Gia_ObjIsAndOrConst0(pObj) )
384  {
385  assert( Gia_ObjValue(pObj) < p->pAig->nFront );
386  Gia_ManTerSimulateNode( p, pObj );
387  }
388  else if ( Gia_ObjIsCi(pObj) )
389  {
390  assert( Gia_ObjValue(pObj) < p->pAig->nFront );
391  Gia_ManTerSimulateCi( p, pObj, iCis++ );
392  }
393  else // if ( Gia_ObjIsCo(pObj) )
394  {
395  assert( Gia_ObjValue(pObj) == GIA_NONE );
396  Gia_ManTerSimulateCo( p, iCos++, pObj );
397  }
398  }
399  assert( Gia_ManCiNum(p->pAig) == iCis );
400  assert( Gia_ManCoNum(p->pAig) == iCos );
401 }
int nFront
Definition: gia.h:119
#define GIA_ZER
Definition: gia.h:747
static int Gia_ObjValue(Gia_Obj_t *pObj)
Definition: gia.h:413
unsigned * pDataSim
Definition: giaTsim.c:61
static void Gia_ManTerSimulateCi(Gia_ManTer_t *p, Gia_Obj_t *pObj, int iCi)
Definition: giaTsim.c:162
Definition: gia.h:75
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
static int Gia_ObjIsAndOrConst0(Gia_Obj_t *pObj)
Definition: gia.h:419
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
Definition: gia.h:400
#define GIA_NONE
INCLUDES ///.
Definition: gia.h:44
#define assert(ex)
Definition: util_old.h:213
unsigned Value
Definition: gia.h:87
#define Gia_ManForEachObj1(p, pObj, i)
Definition: gia.h:986
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Definition: gia.h:420
static void Gia_ManTerSimulateNode(Gia_ManTer_t *p, Gia_Obj_t *pObj)
Definition: giaTsim.c:195
static void Gia_ManTerSimulateCo(Gia_ManTer_t *p, int iCo, Gia_Obj_t *pObj)
Definition: giaTsim.c:178
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
unsigned* Gia_ManTerStateAlloc ( int  nWords)

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

Synopsis [Allocs new ternary state.]

Description []

SideEffects []

SeeAlso []

Definition at line 330 of file giaTsim.c.

331 {
332  return (unsigned *)ABC_CALLOC( char, sizeof(unsigned) * nWords + sizeof(unsigned *) );
333 }
int nWords
Definition: abcNpn.c:127
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
unsigned* Gia_ManTerStateCreate ( Gia_ManTer_t p)

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

Synopsis [Creates new ternary state.]

Description []

SideEffects []

SeeAlso []

Definition at line 346 of file giaTsim.c.

347 {
348  int i, Value, nPis = Gia_ManPiNum(p->pAig);
349  unsigned * pRes = Gia_ManTerStateAlloc( p->nStateWords );
350  for ( i = nPis; i < Gia_ManCiNum(p->pAig); i++ )
351  {
352  Value = Gia_ManTerSimInfoGet( p->pDataSimCis, i );
353  Gia_ManTerSimInfoSet( pRes, i-nPis, Value );
354  if ( Value == GIA_ZER )
355  p->pCount0[i-nPis]++;
356  if ( Value == GIA_UND )
357  p->pCountX[i-nPis]++;
358  }
359  Vec_PtrPush( p->vStates, pRes );
360  return pRes;
361 }
#define GIA_UND
Definition: gia.h:749
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
unsigned * pDataSimCis
Definition: giaTsim.c:62
#define GIA_ZER
Definition: gia.h:747
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
unsigned * Gia_ManTerStateAlloc(int nWords)
Definition: giaTsim.c:330
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
int * pCountX
Definition: giaTsim.c:56
int * pCount0
Definition: giaTsim.c:55
int nStateWords
Definition: giaTsim.c:50
Gia_Man_t * pAig
Definition: giaTsim.c:48
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
int Gia_ManTerStateHash ( unsigned *  pState,
int  nWords,
int  nTableSize 
)

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

Synopsis [Computes hash value of the node using its simulation info.]

Description []

SideEffects []

SeeAlso []

Definition at line 254 of file giaTsim.c.

255 {
256  static int s_FPrimes[128] = {
257  1009, 1049, 1093, 1151, 1201, 1249, 1297, 1361, 1427, 1459,
258  1499, 1559, 1607, 1657, 1709, 1759, 1823, 1877, 1933, 1997,
259  2039, 2089, 2141, 2213, 2269, 2311, 2371, 2411, 2467, 2543,
260  2609, 2663, 2699, 2741, 2797, 2851, 2909, 2969, 3037, 3089,
261  3169, 3221, 3299, 3331, 3389, 3461, 3517, 3557, 3613, 3671,
262  3719, 3779, 3847, 3907, 3943, 4013, 4073, 4129, 4201, 4243,
263  4289, 4363, 4441, 4493, 4549, 4621, 4663, 4729, 4793, 4871,
264  4933, 4973, 5021, 5087, 5153, 5227, 5281, 5351, 5417, 5471,
265  5519, 5573, 5651, 5693, 5749, 5821, 5861, 5923, 6011, 6073,
266  6131, 6199, 6257, 6301, 6353, 6397, 6481, 6563, 6619, 6689,
267  6737, 6803, 6863, 6917, 6977, 7027, 7109, 7187, 7237, 7309,
268  7393, 7477, 7523, 7561, 7607, 7681, 7727, 7817, 7877, 7933,
269  8011, 8039, 8059, 8081, 8093, 8111, 8123, 8147
270  };
271  unsigned uHash;
272  int i;
273  uHash = 0;
274  for ( i = 0; i < nWords; i++ )
275  uHash ^= pState[i] * s_FPrimes[i & 0x7F];
276  return uHash % nTableSize;
277 }
int nWords
Definition: abcNpn.c:127
void Gia_ManTerStateInsert ( unsigned *  pState,
int  nWords,
unsigned **  pBins,
int  nBins 
)

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

Synopsis [Inserts value into the table.]

Description []

SideEffects []

SeeAlso []

Definition at line 311 of file giaTsim.c.

312 {
313  int Hash = Gia_ManTerStateHash( pState, nWords, nBins );
314  assert( !Gia_ManTerStateLookup( pState, nWords, pBins, nBins ) );
315  Gia_ManTerStateSetNext( pState, nWords, pBins[Hash] );
316  pBins[Hash] = pState;
317 }
int nWords
Definition: abcNpn.c:127
static void Gia_ManTerStateSetNext(unsigned *pState, int nWords, unsigned *pNext)
Definition: giaTsim.c:42
int Gia_ManTerStateHash(unsigned *pState, int nWords, int nTableSize)
Definition: giaTsim.c:254
unsigned * Gia_ManTerStateLookup(unsigned *pState, int nWords, unsigned **pBins, int nBins)
Definition: giaTsim.c:290
#define assert(ex)
Definition: util_old.h:213
unsigned* Gia_ManTerStateLookup ( unsigned *  pState,
int  nWords,
unsigned **  pBins,
int  nBins 
)

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

Synopsis [Inserts value into the table.]

Description []

SideEffects []

SeeAlso []

Definition at line 290 of file giaTsim.c.

291 {
292  unsigned * pEntry;
293  int Hash = Gia_ManTerStateHash( pState, nWords, nBins );
294  for ( pEntry = pBins[Hash]; pEntry; pEntry = Gia_ManTerStateNext(pEntry, nWords) )
295  if ( !memcmp( pEntry, pState, sizeof(unsigned) * nWords ) )
296  return pEntry;
297  return NULL;
298 }
int nWords
Definition: abcNpn.c:127
int Gia_ManTerStateHash(unsigned *pState, int nWords, int nTableSize)
Definition: giaTsim.c:254
int memcmp()
static unsigned * Gia_ManTerStateNext(unsigned *pState, int nWords)
Definition: giaTsim.c:41
static unsigned* Gia_ManTerStateNext ( unsigned *  pState,
int  nWords 
)
inlinestatic

Definition at line 41 of file giaTsim.c.

41 { return *((unsigned **)(pState + nWords)); }
int nWords
Definition: abcNpn.c:127
void Gia_ManTerStatePrint ( unsigned *  pState,
int  nRegs,
int  iNum 
)

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

Synopsis [Inserts value into the table.]

Description []

SideEffects []

SeeAlso []

Definition at line 476 of file giaTsim.c.

477 {
478  int i, nZeros = 0, nOnes = 0, nDcs = 0;
479  printf( " %4d : ", iNum );
480  for ( i = 0; i < nRegs; i++ )
481  {
482  if ( Gia_ManTerSimInfoGet(pState, i) == GIA_ZER )
483  printf( "0" ), nZeros++;
484  else if ( Gia_ManTerSimInfoGet(pState, i) == GIA_ONE )
485  printf( "1" ), nOnes++;
486  else if ( Gia_ManTerSimInfoGet(pState, i) == GIA_UND )
487  printf( "x" ), nDcs++;
488  else
489  assert( 0 );
490  }
491  printf( " (0=%4d, 1=%4d, x=%4d)\n", nZeros, nOnes, nDcs );
492 }
#define GIA_UND
Definition: gia.h:749
#define GIA_ZER
Definition: gia.h:747
#define assert(ex)
Definition: util_old.h:213
#define GIA_ONE
Definition: gia.h:748
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static void Gia_ManTerStateSetNext ( unsigned *  pState,
int  nWords,
unsigned *  pNext 
)
inlinestatic

Definition at line 42 of file giaTsim.c.

42 { *((unsigned **)(pState + nWords)) = pNext; }
int nWords
Definition: abcNpn.c:127
void Gia_ManTerStatesFree ( Vec_Ptr_t vStates)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 113 of file giaTsim.c.

114 {
115  unsigned * pTemp;
116  int i;
117  Vec_PtrForEachEntry( unsigned *, vStates, pTemp, i )
118  ABC_FREE( pTemp );
119  Vec_PtrFree( vStates );
120 }
#define ABC_FREE(obj)
Definition: abc_global.h:232
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
Vec_Ptr_t* Gia_ManTerTranspose ( Gia_ManTer_t p)

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

Synopsis [Transposes state vector for non-ternary registers.]

Description []

SideEffects []

SeeAlso []

Definition at line 572 of file giaTsim.c.

573 {
574  Vec_Ptr_t * vFlops;
575  unsigned * pState, * pFlop;
576  int i, k, nFlopWords;
577  vFlops = Vec_PtrAlloc( 100 );
578  nFlopWords = Abc_BitWordNum( 2*Vec_PtrSize(p->vStates) );
579  for ( i = 0; i < Gia_ManRegNum(p->pAig); i++ )
580  {
581  if ( p->pCount0[i] == Vec_PtrSize(p->vStates) )
582  continue;
583  if ( p->pCountX[i] > 0 )
584  continue;
585  pFlop = Gia_ManTerStateAlloc( nFlopWords );
586  Vec_PtrPush( vFlops, pFlop );
587  Vec_PtrForEachEntry( unsigned *, p->vStates, pState, k )
588  Gia_ManTerSimInfoSet( pFlop, k, Gia_ManTerSimInfoGet(pState, i) );
589 //Gia_ManTerStatePrint( pFlop, Vec_PtrSize(p->vStates), i );
590  }
591  return vFlops;
592 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
Vec_Ptr_t * vStates
Definition: giaTsim.c:51
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
unsigned * Gia_ManTerStateAlloc(int nWords)
Definition: giaTsim.c:330
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static void Gia_ManTerSimInfoSet(unsigned *pInfo, int i, int Value)
Definition: giaTsim.c:34
int * pCountX
Definition: giaTsim.c:56
int * pCount0
Definition: giaTsim.c:55
Gia_Man_t * pAig
Definition: giaTsim.c:48
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
static ABC_NAMESPACE_IMPL_START int Gia_ManTerSimInfoGet(unsigned *pInfo, int i)
DECLARATIONS ///.
Definition: giaTsim.c:30
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387