summaryrefslogtreecommitdiffstats
path: root/src/misc
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-07-14 15:04:25 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-07-14 15:04:25 -0700
commitc0ac159888963dae8dabeb2ee9215f3efdf48a1a (patch)
treed8f2d17b8d4fe30a3f0a53bee480a973440cb122 /src/misc
parentb3e0f5b2e94e5e0da72e1ec7a41f90a3f4d302d7 (diff)
downloadabc-c0ac159888963dae8dabeb2ee9215f3efdf48a1a.tar.gz
abc-c0ac159888963dae8dabeb2ee9215f3efdf48a1a.tar.bz2
abc-c0ac159888963dae8dabeb2ee9215f3efdf48a1a.zip
New technology mapper.
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/util/utilTruth.h6
-rw-r--r--src/misc/vec/vecMem.h24
2 files changed, 23 insertions, 7 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index 0072a808..65b646fa 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -128,6 +128,12 @@ static inline void Abc_TtFill( word * pOut, int nWords )
for ( w = 0; w < nWords; w++ )
pOut[w] = ~(word)0;
}
+static inline void Abc_TtUnit( word * pOut, int nWords )
+{
+ int w;
+ for ( w = 0; w < nWords; w++ )
+ pOut[w] = s_Truths6[0];
+}
static inline void Abc_TtNot( word * pOut, int nWords )
{
int w;
diff --git a/src/misc/vec/vecMem.h b/src/misc/vec/vecMem.h
index eaa9481f..cba76a59 100644
--- a/src/misc/vec/vecMem.h
+++ b/src/misc/vec/vecMem.h
@@ -268,16 +268,26 @@ static inline void Vec_MemShrink( Vec_Mem_t * p, int nEntriesNew )
SeeAlso []
***********************************************************************/
-static inline void Vec_MemPrint( Vec_Mem_t * p )
+static inline void Vec_MemDumpDigit( FILE * pFile, int HexDigit )
+{
+ assert( HexDigit >= 0 && HexDigit < 16 );
+ if ( HexDigit < 10 )
+ fprintf( pFile, "%d", HexDigit );
+ else
+ fprintf( pFile, "%c", 'A' + HexDigit-10 );
+}
+static inline void Vec_MemDump( FILE * pFile, Vec_Mem_t * pVec )
{
word * pEntry;
- int i;
- printf( "Memory vector has %d entries: ", Vec_MemEntryNum(p) );
- Vec_MemForEachEntry( p, pEntry, i )
+ int i, w, d;
+ if ( pFile == stdout )
+ printf( "Memory vector has %d entries: ", Vec_MemEntryNum(pVec) );
+ Vec_MemForEachEntry( pVec, pEntry, i )
{
- printf( "%3d : ", i );
- // add printout here
- printf( "\n" );
+ for ( w = pVec->nEntrySize - 1; w >= 0; w-- )
+ for ( d = 15; d >= 0; d-- )
+ Vec_MemDumpDigit( pFile, (int)(pEntry[w] >> (d<<2)) & 15 );
+ fprintf( pFile, "\n" );
}
}