diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-08-14 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-08-14 08:01:00 -0700 |
commit | 9b3fa55b8a6fca4fb75e0bbc9a8d52c5ab3c11e4 (patch) | |
tree | 52895e3901def014deaa5920d92637a8171d8acd /src/misc | |
parent | f2b6b3be958e6d5629dc8a8b6c1b77195c16a2aa (diff) | |
download | abc-9b3fa55b8a6fca4fb75e0bbc9a8d52c5ab3c11e4.tar.gz abc-9b3fa55b8a6fca4fb75e0bbc9a8d52c5ab3c11e4.tar.bz2 abc-9b3fa55b8a6fca4fb75e0bbc9a8d52c5ab3c11e4.zip |
Version abc50814
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/vec/vecFan.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/misc/vec/vecFan.h b/src/misc/vec/vecFan.h index 01335da0..8698a1b7 100644 --- a/src/misc/vec/vecFan.h +++ b/src/misc/vec/vecFan.h @@ -39,8 +39,8 @@ typedef struct Abc_Fan_t_ Abc_Fan_t; struct Abc_Fan_t_ // 1 word { - unsigned iFan : 26; // the ID of the object - unsigned nLats : 5; // the number of latches (up to 31) + unsigned iFan : 24; // the ID of the object + unsigned nLats : 7; // the number of latches (up to 31) unsigned fCompl : 1; // the complemented attribute }; @@ -279,6 +279,7 @@ static inline int Vec_FanFindEntry( Vec_Fan_t * p, unsigned iFan ) ***********************************************************************/ static inline int Vec_FanDeleteEntry( Vec_Fan_t * p, unsigned iFan ) { +/* int i, k, fFound = 0; for ( i = k = 0; i < p->nSize; i++ ) { @@ -289,6 +290,17 @@ static inline int Vec_FanDeleteEntry( Vec_Fan_t * p, unsigned iFan ) } p->nSize = k; return fFound; +*/ + int i; + for ( i = 0; i < p->nSize; i++ ) + if ( p->pArray[i].iFan == iFan ) + break; + if ( i == p->nSize ) + return 0; + for ( i++; i < p->nSize; i++ ) + p->pArray[i-1] = p->pArray[i]; + p->nSize--; + return 1; } /**Function************************************************************* |