diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-10-10 14:45:19 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-10-10 14:45:19 -0700 |
commit | 2c7f39026a12da14874b2d418d9aa8610e0ab726 (patch) | |
tree | d978487c7f69b5b04e0c364ac1be0de4332aeb12 /src/misc/util | |
parent | 33695bed11237e8b2e04e75daa0659070d5605a6 (diff) | |
download | abc-2c7f39026a12da14874b2d418d9aa8610e0ab726.tar.gz abc-2c7f39026a12da14874b2d418d9aa8610e0ab726.tar.bz2 abc-2c7f39026a12da14874b2d418d9aa8610e0ab726.zip |
Extending truth table support in &jf for more than 6 inputs.
Diffstat (limited to 'src/misc/util')
-rw-r--r-- | src/misc/util/utilTruth.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h index 7010bf2d..28646fc4 100644 --- a/src/misc/util/utilTruth.h +++ b/src/misc/util/utilTruth.h @@ -1146,17 +1146,18 @@ static inline int Abc_TtMinimumBase( word * t, int * pSupp, int nVarsAll, int * SeeAlso [] ***********************************************************************/ -static inline int Abc_TtMinBase( word * pTruth, int * pVars, int nVars ) +static inline int Abc_TtMinBase( word * pTruth, int * pVars, int nVars, int nVarsAll ) { int i, k; + assert( nVars <= nVarsAll ); for ( i = k = 0; i < nVars; i++ ) { - if ( !Abc_TtHasVar( pTruth, nVars, i ) ) + if ( !Abc_TtHasVar( pTruth, nVarsAll, i ) ) continue; if ( k < i ) { pVars[k] = pVars[i]; - Abc_TtSwapVars( pTruth, nVars, k, i ); + Abc_TtSwapVars( pTruth, nVarsAll, k, i ); } k++; } |