src/opt/sim/simUtils.c File Reference

#include "abc.h"
#include "sim.h"
Include dependency graph for simUtils.c:

Go to the source code of this file.

Functions

Vec_Ptr_tSim_UtilInfoAlloc (int nSize, int nWords, bool fClean)
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)
bool Sim_UtilInfoCompare (Sim_Man_t *p, Abc_Obj_t *pNode)
void Sim_UtilSimulate (Sim_Man_t *p, bool fType)
void Sim_UtilSimulateNode (Sim_Man_t *p, Abc_Obj_t *pNode, bool fType, bool fType1, bool 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)
int Sim_UtilCountPairsOne (Extra_BitMat_t *pMat, Vec_Int_t *vSupport)
int Sim_UtilCountPairsOnePrint (Extra_BitMat_t *pMat, Vec_Int_t *vSupport)
void Sim_UtilCountPairsAllPrint (Sym_Man_t *p)
void Sim_UtilCountPairsAll (Sym_Man_t *p)
int Sim_UtilMatrsAreDisjoint (Sym_Man_t *p)

Variables

static int bit_count [256]

Function Documentation

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

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

Synopsis [Counts the total number of pairs.]

Description []

SideEffects []

SeeAlso []

Definition at line 560 of file simUtils.c.

00561 {
00562     unsigned * pSupp;
00563     int Counter, nOnes, nPairs, i;
00564     Counter = 0;
00565     Vec_PtrForEachEntry( vSuppFun, pSupp, i )
00566     {
00567         nOnes  = Sim_UtilCountOnes( pSupp, nSimWords );
00568         nPairs = nOnes * (nOnes - 1) / 2;
00569         Vec_IntWriteEntry( vCounters, i, nPairs );
00570         Counter += nPairs;
00571     }
00572     return Counter;
00573 }

int Sim_UtilCountOnes ( unsigned *  pSimInfo,
int  nSimWords 
)

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 399 of file simUtils.c.

00400 {
00401     unsigned char * pBytes;
00402     int nOnes, nBytes, i;
00403     pBytes = (unsigned char *)pSimInfo;
00404     nBytes = 4 * nSimWords;
00405     nOnes  = 0;
00406     for ( i = 0; i < nBytes; i++ )
00407         nOnes += bit_count[ pBytes[i] ];
00408     return nOnes;    
00409 }

Vec_Int_t* Sim_UtilCountOnesArray ( Vec_Ptr_t vInfo,
int  nSimWords 
)

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 422 of file simUtils.c.

00423 {
00424     Vec_Int_t * vCounters;
00425     unsigned * pSimInfo;
00426     int i;
00427     vCounters = Vec_IntStart( Vec_PtrSize(vInfo) );
00428     Vec_PtrForEachEntry( vInfo, pSimInfo, i )
00429         Vec_IntWriteEntry( vCounters, i, Sim_UtilCountOnes(pSimInfo, nSimWords) );
00430     return vCounters;
00431 }

void Sim_UtilCountPairsAll ( Sym_Man_t p  ) 

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 655 of file simUtils.c.

00656 {
00657     int nPairsTotal, nPairsSym, nPairsNonSym, i, clk;
00658 clk = clock();
00659     p->nPairsSymm    = 0;
00660     p->nPairsNonSymm = 0;
00661     for ( i = 0; i < p->nOutputs; i++ )
00662     {
00663         nPairsTotal  = Vec_IntEntry(p->vPairsTotal, i);
00664         nPairsSym    = Vec_IntEntry(p->vPairsSym,   i);
00665         nPairsNonSym = Vec_IntEntry(p->vPairsNonSym,i);
00666         assert( nPairsTotal >= nPairsSym + nPairsNonSym ); 
00667         if ( nPairsTotal == nPairsSym + nPairsNonSym )
00668         {
00669             p->nPairsSymm    += nPairsSym;
00670             p->nPairsNonSymm += nPairsNonSym;
00671             continue;
00672         }
00673         nPairsSym    = Sim_UtilCountPairsOne( Vec_PtrEntry(p->vMatrSymms,   i), Vec_VecEntry(p->vSupports, i) );
00674         nPairsNonSym = Sim_UtilCountPairsOne( Vec_PtrEntry(p->vMatrNonSymms,i), Vec_VecEntry(p->vSupports, i) );
00675         assert( nPairsTotal >= nPairsSym + nPairsNonSym ); 
00676         Vec_IntWriteEntry( p->vPairsSym,    i, nPairsSym );
00677         Vec_IntWriteEntry( p->vPairsNonSym, i, nPairsNonSym );
00678         p->nPairsSymm    += nPairsSym;
00679         p->nPairsNonSymm += nPairsNonSym;
00680 //        printf( "%d ", nPairsTotal - nPairsSym - nPairsNonSym );
00681     }
00682 //printf( "\n" );
00683     p->nPairsRem = p->nPairsTotal-p->nPairsSymm-p->nPairsNonSymm;
00684 p->timeCount += clock() - clk;
00685 }

void Sim_UtilCountPairsAllPrint ( Sym_Man_t p  ) 

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 631 of file simUtils.c.

00632 {
00633     int i, clk;
00634 clk = clock();
00635     for ( i = 0; i < p->nOutputs; i++ )
00636     {
00637         printf( "Output %2d :", i );
00638         Sim_UtilCountPairsOnePrint( Vec_PtrEntry(p->vMatrSymms, i), Vec_VecEntry(p->vSupports, i) );
00639         printf( "\n" );
00640     }
00641 p->timeCount += clock() - clk;
00642 }

int Sim_UtilCountPairsOne ( Extra_BitMat_t pMat,
Vec_Int_t vSupport 
)

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 586 of file simUtils.c.

00587 {
00588     int i, k, Index1, Index2;
00589     int Counter = 0;
00590 //    int Counter2;
00591     Vec_IntForEachEntry( vSupport, i, Index1 )
00592     Vec_IntForEachEntryStart( vSupport, k, Index2, Index1+1 )
00593         Counter += Extra_BitMatrixLookup1( pMat, i, k );
00594 //    Counter2 = Extra_BitMatrixCountOnesUpper(pMat);
00595 //    assert( Counter == Counter2 );
00596     return Counter;
00597 }

int Sim_UtilCountPairsOnePrint ( Extra_BitMat_t pMat,
Vec_Int_t vSupport 
)

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 610 of file simUtils.c.

00611 {
00612     int i, k, Index1, Index2;
00613     Vec_IntForEachEntry( vSupport, i, Index1 )
00614     Vec_IntForEachEntryStart( vSupport, k, Index2, Index1+1 )
00615         if ( Extra_BitMatrixLookup1( pMat, i, k ) )
00616             printf( "(%d,%d) ", i, k );
00617     return 0;
00618 }

int Sim_UtilCountSuppSizes ( Sim_Man_t p,
int  fStruct 
)

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 368 of file simUtils.c.

00369 {
00370     Abc_Obj_t * pNode, * pNodeCi;
00371     int i, v, Counter;
00372     Counter = 0;
00373     if ( fStruct )
00374     {
00375         Abc_NtkForEachCo( p->pNtk, pNode, i )
00376             Abc_NtkForEachCi( p->pNtk, pNodeCi, v )
00377                 Counter += Sim_SuppStrHasVar( p->vSuppStr, pNode, v );
00378     }
00379     else
00380     {
00381         Abc_NtkForEachCo( p->pNtk, pNode, i )
00382             Abc_NtkForEachCi( p->pNtk, pNodeCi, v )
00383                 Counter += Sim_SuppFunHasVar( p->vSuppFun, i, v );
00384     }
00385     return Counter;
00386 }

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

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 97 of file simUtils.c.

00098 {
00099     int w;
00100     for ( w = 0; w < nWords; w++ )
00101         pInfo1[w] |= pInfo2[w];
00102 }

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

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

Synopsis [Allocates simulation information for all nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 54 of file simUtils.c.

00055 {
00056     Vec_Ptr_t * vInfo;
00057     int i;
00058     assert( nSize > 0 && nWords > 0 );
00059     vInfo = Vec_PtrAlloc( nSize );
00060     vInfo->pArray[0] = ALLOC( unsigned, nSize * nWords );
00061     if ( fClean )
00062         memset( vInfo->pArray[0], 0, sizeof(unsigned) * nSize * nWords );
00063     for ( i = 1; i < nSize; i++ )
00064         vInfo->pArray[i] = ((unsigned *)vInfo->pArray[i-1]) + nWords;
00065     vInfo->nSize = nSize;
00066     return vInfo;
00067 }

bool Sim_UtilInfoCompare ( Sim_Man_t p,
Abc_Obj_t pNode 
)

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 182 of file simUtils.c.

00183 {
00184     unsigned * pSimInfo1, * pSimInfo2;
00185     int k;
00186     pSimInfo1 = p->vSim0->pArray[pNode->Id];
00187     pSimInfo2 = p->vSim1->pArray[pNode->Id];
00188     for ( k = 0; k < p->nSimWords; k++ )
00189         if ( pSimInfo2[k] != pSimInfo1[k] )
00190             return 0;
00191     return 1;
00192 }

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

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 115 of file simUtils.c.

00116 {
00117     int w, b;
00118     unsigned uMask;
00119     vDiffs->nSize = 0;
00120     for ( w = 0; w < nWords; w++ )
00121         if ( uMask = (pInfo2[w] ^ pInfo1[w]) )
00122             for ( b = 0; b < 32; b++ )
00123                 if ( uMask & (1 << b) )
00124                     Vec_IntPush( vDiffs, 32*w + b );
00125 }

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

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 138 of file simUtils.c.

00139 {
00140     int w, b;
00141     unsigned uMask;
00142     vDiffs->nSize = 0;
00143     for ( w = 0; w < nWords; w++ )
00144         if ( uMask = (pInfo2[w] & ~pInfo1[w]) )
00145             for ( b = 0; b < 32; b++ )
00146                 if ( uMask & (1 << b) )
00147                     Vec_IntPush( vDiffs, 32*w + b );
00148 }

void Sim_UtilInfoFlip ( Sim_Man_t p,
Abc_Obj_t pNode 
)

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

Synopsis [Flips the simulation info of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 161 of file simUtils.c.

00162 {
00163     unsigned * pSimInfo1, * pSimInfo2;
00164     int k;
00165     pSimInfo1 = p->vSim0->pArray[pNode->Id];
00166     pSimInfo2 = p->vSim1->pArray[pNode->Id];
00167     for ( k = 0; k < p->nSimWords; k++ )
00168         pSimInfo2[k] = ~pSimInfo1[k];
00169 }

void Sim_UtilInfoFree ( Vec_Ptr_t p  ) 

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

Synopsis [Allocates simulation information for all nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 80 of file simUtils.c.

00081 {
00082     free( p->pArray[0] );
00083     Vec_PtrFree( p );
00084 }

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

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

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

Description []

SideEffects []

SeeAlso []

Definition at line 540 of file simUtils.c.

00541 {
00542     int k;
00543     for ( k = 0; k < nSimWords; k++ )
00544         if ( ~pPats1[k] & ~pPats2[k] )
00545             return 0;
00546     return 1;
00547 }

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

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

Synopsis [Returns 1 if equal.]

Description []

SideEffects []

SeeAlso []

Definition at line 500 of file simUtils.c.

00501 {
00502     int k;
00503     for ( k = 0; k < nSimWords; k++ )
00504         if ( pPats1[k] != pPats2[k] )
00505             return 0;
00506     return 1;
00507 }

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

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

Synopsis [Returns 1 if Node1 implies Node2.]

Description []

SideEffects []

SeeAlso []

Definition at line 520 of file simUtils.c.

00521 {
00522     int k;
00523     for ( k = 0; k < nSimWords; k++ )
00524         if ( pPats1[k] & ~pPats2[k] )
00525             return 0;
00526     return 1;
00527 }

int Sim_UtilMatrsAreDisjoint ( Sym_Man_t p  ) 

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 698 of file simUtils.c.

00699 {
00700     int i;
00701     for ( i = 0; i < p->nOutputs; i++ )
00702         if ( !Extra_BitMatrixIsDisjoint( Vec_PtrEntry(p->vMatrSymms,i), Vec_PtrEntry(p->vMatrNonSymms,i) ) )
00703             return 0;
00704     return 1;
00705 }

void Sim_UtilSetCompl ( unsigned *  pPatRand,
int  nSimWords 
)

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

Synopsis [Returns complemented patterns.]

Description []

SideEffects []

SeeAlso []

Definition at line 462 of file simUtils.c.

00463 {
00464     int k;
00465     for ( k = 0; k < nSimWords; k++ )
00466         pPatRand[k] = ~pPatRand[k];
00467 }

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

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

Synopsis [Returns constant patterns.]

Description []

SideEffects []

SeeAlso []

Definition at line 480 of file simUtils.c.

00481 {
00482     int k;
00483     for ( k = 0; k < nSimWords; k++ )
00484         pPatRand[k] = 0;
00485     if ( fConst1 )
00486         Sim_UtilSetCompl( pPatRand, nSimWords );
00487 }

void Sim_UtilSetRandom ( unsigned *  pPatRand,
int  nSimWords 
)

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

Synopsis [Returns random patterns.]

Description []

SideEffects []

SeeAlso []

Definition at line 444 of file simUtils.c.

00445 {
00446     int k;
00447     for ( k = 0; k < nSimWords; k++ )
00448         pPatRand[k] = SIM_RANDOM_UNSIGNED;
00449 }

void Sim_UtilSimulate ( Sim_Man_t p,
bool  fType 
)

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

Synopsis [Simulates the internal nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 205 of file simUtils.c.

00206 {
00207     Abc_Obj_t * pNode;
00208     int i;
00209     // simulate the internal nodes
00210     Abc_NtkForEachNode( p->pNtk, pNode, i )
00211         Sim_UtilSimulateNode( p, pNode, fType, fType, fType );
00212     // assign simulation info of the CO nodes
00213     Abc_NtkForEachCo( p->pNtk, pNode, i )
00214         Sim_UtilSimulateNode( p, pNode, fType, fType, fType );
00215 }

void Sim_UtilSimulateNode ( Sim_Man_t p,
Abc_Obj_t pNode,
bool  fType,
bool  fType1,
bool  fType2 
)

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

Synopsis [Simulates one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 228 of file simUtils.c.

00229 {
00230     unsigned * pSimmNode, * pSimmNode1, * pSimmNode2;
00231     int k, fComp1, fComp2;
00232     // simulate the internal nodes
00233     if ( Abc_ObjIsNode(pNode) )
00234     {
00235         if ( fType )
00236             pSimmNode  = p->vSim1->pArray[ pNode->Id ];
00237         else
00238             pSimmNode  = p->vSim0->pArray[ pNode->Id ];
00239 
00240         if ( fType1 )
00241             pSimmNode1 = p->vSim1->pArray[ Abc_ObjFaninId0(pNode) ];
00242         else
00243             pSimmNode1 = p->vSim0->pArray[ Abc_ObjFaninId0(pNode) ];
00244 
00245         if ( fType2 )
00246             pSimmNode2 = p->vSim1->pArray[ Abc_ObjFaninId1(pNode) ];
00247         else
00248             pSimmNode2 = p->vSim0->pArray[ Abc_ObjFaninId1(pNode) ];
00249 
00250         fComp1 = Abc_ObjFaninC0(pNode);
00251         fComp2 = Abc_ObjFaninC1(pNode);
00252         if ( fComp1 && fComp2 )
00253             for ( k = 0; k < p->nSimWords; k++ )
00254                 pSimmNode[k] = ~pSimmNode1[k] & ~pSimmNode2[k];
00255         else if ( fComp1 && !fComp2 )
00256             for ( k = 0; k < p->nSimWords; k++ )
00257                 pSimmNode[k] = ~pSimmNode1[k] &  pSimmNode2[k];
00258         else if ( !fComp1 && fComp2 )
00259             for ( k = 0; k < p->nSimWords; k++ )
00260                 pSimmNode[k] =  pSimmNode1[k] & ~pSimmNode2[k];
00261         else // if ( fComp1 && fComp2 )
00262             for ( k = 0; k < p->nSimWords; k++ )
00263                 pSimmNode[k] =  pSimmNode1[k] &  pSimmNode2[k];
00264     }
00265     else 
00266     {
00267         assert( Abc_ObjFaninNum(pNode) == 1 );
00268         if ( fType )
00269             pSimmNode  = p->vSim1->pArray[ pNode->Id ];
00270         else
00271             pSimmNode  = p->vSim0->pArray[ pNode->Id ];
00272 
00273         if ( fType1 )
00274             pSimmNode1 = p->vSim1->pArray[ Abc_ObjFaninId0(pNode) ];
00275         else
00276             pSimmNode1 = p->vSim0->pArray[ Abc_ObjFaninId0(pNode) ];
00277 
00278         fComp1 = Abc_ObjFaninC0(pNode);
00279         if ( fComp1 )
00280             for ( k = 0; k < p->nSimWords; k++ )
00281                 pSimmNode[k] = ~pSimmNode1[k];
00282         else 
00283             for ( k = 0; k < p->nSimWords; k++ )
00284                 pSimmNode[k] =  pSimmNode1[k];
00285     }
00286 }

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

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

Synopsis [Simulates one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 299 of file simUtils.c.

00300 {
00301     unsigned * pSimmNode, * pSimmNode1, * pSimmNode2;
00302     int k, fComp1, fComp2;
00303     // simulate the internal nodes
00304     assert( Abc_ObjIsNode(pNode) );
00305     pSimmNode  = Vec_PtrEntry(vSimInfo, pNode->Id);
00306     pSimmNode1 = Vec_PtrEntry(vSimInfo, Abc_ObjFaninId0(pNode));
00307     pSimmNode2 = Vec_PtrEntry(vSimInfo, Abc_ObjFaninId1(pNode));
00308     pSimmNode  += nOffset;
00309     pSimmNode1 += nOffset;
00310     pSimmNode2 += nOffset;
00311     fComp1 = Abc_ObjFaninC0(pNode);
00312     fComp2 = Abc_ObjFaninC1(pNode);
00313     if ( fComp1 && fComp2 )
00314         for ( k = 0; k < nSimWords; k++ )
00315             pSimmNode[k] = ~pSimmNode1[k] & ~pSimmNode2[k];
00316     else if ( fComp1 && !fComp2 )
00317         for ( k = 0; k < nSimWords; k++ )
00318             pSimmNode[k] = ~pSimmNode1[k] &  pSimmNode2[k];
00319     else if ( !fComp1 && fComp2 )
00320         for ( k = 0; k < nSimWords; k++ )
00321             pSimmNode[k] =  pSimmNode1[k] & ~pSimmNode2[k];
00322     else // if ( fComp1 && fComp2 )
00323         for ( k = 0; k < nSimWords; k++ )
00324             pSimmNode[k] =  pSimmNode1[k] &  pSimmNode2[k];
00325 }

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

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

Synopsis [Simulates one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 338 of file simUtils.c.

00339 {
00340     unsigned * pSimmNode, * pSimmNode1;
00341     int k, fComp1;
00342     // simulate the internal nodes
00343     assert( Abc_ObjIsCo(pNode) );
00344     pSimmNode  = Vec_PtrEntry(vSimInfo, pNode->Id);
00345     pSimmNode1 = Vec_PtrEntry(vSimInfo, Abc_ObjFaninId0(pNode));
00346     pSimmNode  += nOffset + (fShift > 0)*nSimWords;
00347     pSimmNode1 += nOffset;
00348     fComp1 = Abc_ObjFaninC0(pNode);
00349     if ( fComp1 )
00350         for ( k = 0; k < nSimWords; k++ )
00351             pSimmNode[k] = ~pSimmNode1[k];
00352     else 
00353         for ( k = 0; k < nSimWords; k++ )
00354             pSimmNode[k] =  pSimmNode1[k];
00355 }


Variable Documentation

int bit_count[256] [static]
Initial value:
 {
  0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
  1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
  1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
  2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
  1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
  2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
  2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
  3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8
}

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

FileName [simUtils.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Various simulation utilities.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

] DECLARATIONS ///

Definition at line 28 of file simUtils.c.


Generated on Tue Jan 5 12:19:36 2010 for abc70930 by  doxygen 1.6.1