diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-26 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-26 08:01:00 -0800 |
commit | e3c40ed61ee3febefb002d3b929f157ccdffca81 (patch) | |
tree | db596ea13b4be6ae31617fad2cb3463190f99c90 /src/opt/cut/cutTruth.c | |
parent | 08d2b31046bfccdfe1239344eb5114ea01301f06 (diff) | |
download | abc-e3c40ed61ee3febefb002d3b929f157ccdffca81.tar.gz abc-e3c40ed61ee3febefb002d3b929f157ccdffca81.tar.bz2 abc-e3c40ed61ee3febefb002d3b929f157ccdffca81.zip |
Version abc51126
Diffstat (limited to 'src/opt/cut/cutTruth.c')
-rw-r--r-- | src/opt/cut/cutTruth.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/opt/cut/cutTruth.c b/src/opt/cut/cutTruth.c index 28984e5a..b65e5eff 100644 --- a/src/opt/cut/cutTruth.c +++ b/src/opt/cut/cutTruth.c @@ -107,6 +107,48 @@ void Cut_TruthCompute( Cut_Cut_t * pCut, Cut_Cut_t * pCut0, Cut_Cut_t * pCut1, i } } +/**Function************************************************************* + + Synopsis [Performs truth table computation.] + + Description [This procedure cannot be used while recording oracle + because it will overwrite Num0 and Num1.] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Cut_TruthCanonicize( Cut_Cut_t * pCut ) +{ + unsigned uTruth; + unsigned * uCanon2; + char * pPhases2; + assert( pCut->nVarsMax < 6 ); + + // get the direct truth table + uTruth = *Cut_CutReadTruth(pCut); + + // compute the direct truth table + Extra_TruthCanonFastN( pCut->nVarsMax, pCut->nLeaves, &uTruth, &uCanon2, &pPhases2 ); +// uCanon[0] = uCanon2[0]; +// uCanon[1] = (p->nVarsMax == 6)? uCanon2[1] : uCanon2[0]; +// uPhases[0] = pPhases2[0]; + pCut->uCanon0 = uCanon2[0]; + pCut->Num0 = pPhases2[0]; + + // get the complemented truth table + uTruth = ~*Cut_CutReadTruth(pCut); + + // compute the direct truth table + Extra_TruthCanonFastN( pCut->nVarsMax, pCut->nLeaves, &uTruth, &uCanon2, &pPhases2 ); +// uCanon[0] = uCanon2[0]; +// uCanon[1] = (p->nVarsMax == 6)? uCanon2[1] : uCanon2[0]; +// uPhases[0] = pPhases2[0]; + pCut->uCanon1 = uCanon2[0]; + pCut->Num1 = pPhases2[0]; +} + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// |