summaryrefslogtreecommitdiffstats
path: root/src/misc/util
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2022-11-09 08:42:08 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2022-11-09 08:42:08 +0100
commitbe9a35c0363174a7cef21d55ed80d92a9ef95ab1 (patch)
tree3bf5d3eee39f46d72d3196386eadd8788f742e4b /src/misc/util
parentab5b16ede2ff3a4ab5209df24db2c76700899684 (diff)
parent70cb339f869e485802159d7f2b886130793556c4 (diff)
downloadabc-be9a35c0363174a7cef21d55ed80d92a9ef95ab1.tar.gz
abc-be9a35c0363174a7cef21d55ed80d92a9ef95ab1.tar.bz2
abc-be9a35c0363174a7cef21d55ed80d92a9ef95ab1.zip
Merge remote-tracking branch 'upstream/master' into yosys-experimental
Diffstat (limited to 'src/misc/util')
-rw-r--r--src/misc/util/utilTruth.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index bc8ac3f0..1a771afa 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -1589,7 +1589,31 @@ static inline int Abc_Tt6SupportAndSize( word t, int nVars, int * pSuppSize )
Supp |= (1 << v), (*pSuppSize)++;
return Supp;
}
-
+static inline int Abc_Tt6Check1( word t, int nVars )
+{
+ int n, v, u;
+ for ( n = 0; n < 2; n++ )
+ for ( v = 0; v < nVars; v++ )
+ {
+ word Cof = n ? Abc_Tt6Cofactor1(t, v) : Abc_Tt6Cofactor0(t, v);
+ for ( u = 0; u < nVars; u++ )
+ if ( v != u && !Abc_Tt6HasVar(Cof, u) )
+ return 1;
+ }
+ return 0;
+}
+static inline int Abc_Tt6Check2( word t, int nVars )
+{
+ int n, v;
+ for ( n = 0; n < 2; n++ )
+ for ( v = 0; v < nVars; v++ )
+ {
+ word Cof = n ? Abc_Tt6Cofactor1(t, v) : Abc_Tt6Cofactor0(t, v);
+ if ( Cof == 0 || ~Cof == 0 )
+ return 1;
+ }
+ return 0;
+}
/**Function*************************************************************
Synopsis [Checks if there is a var whose both cofs have supp <= nSuppLim.]