summaryrefslogtreecommitdiffstats
path: root/src/opt/dau/dau.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-11-11 13:26:36 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-11-11 13:26:36 -0800
commit21e6a59ed8574efb07b3700c0ab7ad35ff06b96d (patch)
tree26887ee90a0f19c592e442fbcf4634f141fdfa8f /src/opt/dau/dau.h
parent1bef28e6c66e80b7ed4a53464044c3e0736a8ede (diff)
downloadabc-21e6a59ed8574efb07b3700c0ab7ad35ff06b96d.tar.gz
abc-21e6a59ed8574efb07b3700c0ab7ad35ff06b96d.tar.bz2
abc-21e6a59ed8574efb07b3700c0ab7ad35ff06b96d.zip
Improved DSD.
Diffstat (limited to 'src/opt/dau/dau.h')
-rw-r--r--src/opt/dau/dau.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/opt/dau/dau.h b/src/opt/dau/dau.h
index 277da3d3..51475f27 100644
--- a/src/opt/dau/dau.h
+++ b/src/opt/dau/dau.h
@@ -39,8 +39,8 @@
ABC_NAMESPACE_HEADER_START
-#define DAU_MAX_VAR 8 // should be 6 or more
-#define DAU_MAX_STR 64
+#define DAU_MAX_VAR 16 // should be 6 or more
+#define DAU_MAX_STR 256
#define DAU_MAX_WORD (1<<(DAU_MAX_VAR-6))
////////////////////////////////////////////////////////////////////////
@@ -51,6 +51,10 @@ ABC_NAMESPACE_HEADER_START
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
+static inline int Dau_DsdIsConst( char * p ) { return (p[0] == '0' || p[0] == '1') && p[1] == 0; }
+static inline int Dau_DsdIsConst0( char * p ) { return p[0] == '0' && p[1] == 0; }
+static inline int Dau_DsdIsConst1( char * p ) { return p[0] == '1' && p[1] == 0; }
+
////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -62,6 +66,7 @@ extern int Dau_DsdDecompose( word * pTruth, int nVarsInit, int fSplitP
extern word * Dau_DsdToTruth( char * p, int nVars );
extern word Dau_Dsd6ToTruth( char * p );
extern void Dau_DsdNormalize( char * p );
+extern int Dau_DsdCountAnds( char * pDsd );
/*=== dauMerge.c ==========================================================*/
extern void Dau_DsdRemoveBraces( char * pDsd, int * pMatches );