summaryrefslogtreecommitdiffstats
path: root/src/misc/extra
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-02-17 18:06:48 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2015-02-17 18:06:48 -0800
commit525137926db6a6c4dce90d35d1ce233d6a0cf27a (patch)
tree5b5f3233434cddd2cc52eb634914bb494d80da4e /src/misc/extra
parente7b467f96ba372029e4bea1a9680297d11949f71 (diff)
downloadabc-525137926db6a6c4dce90d35d1ce233d6a0cf27a.tar.gz
abc-525137926db6a6c4dce90d35d1ce233d6a0cf27a.tar.bz2
abc-525137926db6a6c4dce90d35d1ce233d6a0cf27a.zip
Several improvements to CBA data-structure.
Diffstat (limited to 'src/misc/extra')
-rw-r--r--src/misc/extra/extraUtilMisc.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/misc/extra/extraUtilMisc.c b/src/misc/extra/extraUtilMisc.c
index 51bd887e..479045f9 100644
--- a/src/misc/extra/extraUtilMisc.c
+++ b/src/misc/extra/extraUtilMisc.c
@@ -2532,6 +2532,40 @@ void Extra_NpnTest()
}
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Extra_NtkPrintBin( word * pT, int nBits )
+{
+ int i;
+ for ( i = nBits - 1; i >= 0; i-- )
+ printf( "%d", (*pT >> (word)i) & 1 );
+}
+void Extra_NtkPowerTest()
+{
+ int i, j, k, n = 4;
+ for ( i = 0; i < (1<<n); i++ )
+ for ( j = 0; j < (1<<n); j++ )
+ {
+ word t = (word)i;
+ for ( k = 1; k < j; k++ )
+ t *= (word)i;
+ Extra_NtkPrintBin( (word *)&i, n );
+ Extra_NtkPrintBin( (word *)&j, n );
+ printf( " " );
+ Extra_NtkPrintBin( (word *)&t, 64 );
+ printf( "\n" );
+ }
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////