diff options
Diffstat (limited to 'src/map/if')
-rw-r--r-- | src/map/if/if.h | 1 | ||||
-rw-r--r-- | src/map/if/ifDec07.c | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index e2dd3352..aac141fd 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -491,6 +491,7 @@ extern float If_CutPowerRef( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * extern float If_CutPowerDerefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot ); extern float If_CutPowerRefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot ); /*=== ifDec.c =============================================================*/ +extern word If_CutPerformDerive07( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ); extern int If_CutPerformCheck07( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ); extern int If_CutPerformCheck08( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ); extern int If_CutPerformCheck10( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ); diff --git a/src/map/if/ifDec07.c b/src/map/if/ifDec07.c index 4c586ed8..c987eae1 100644 --- a/src/map/if/ifDec07.c +++ b/src/map/if/ifDec07.c @@ -675,6 +675,54 @@ int If_Dec7PickBestMux( word t[2], word c0r[2], word c1r[2] ) SeeAlso [] ***********************************************************************/ +word If_CutPerformDerive07( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ) +{ + if ( nLeaves < 5 ) + return 1; + if ( nLeaves == 5 ) + { + word z, t = ((word *)pTruth)[0]; +// if ( If_Dec6CheckMux(t) >= 0 ) +// return 1; + z = If_Dec6Perform( t, 1 ); + If_Dec6Verify( t, z ); + return z; + } + if ( nLeaves == 6 ) + { + word z, t = ((word *)pTruth)[0]; +// if ( If_Dec6CheckMux(t) >= 0 ) +// return 1; + z = If_Dec6Perform( t, 1 ); + If_Dec6Verify( t, z ); + return z; + } + if ( nLeaves == 7 ) + { + word z, t[2]; + t[0] = ((word *)pTruth)[0]; + t[1] = ((word *)pTruth)[1]; + if ( If_Dec7CheckMux(t) >= 0 ) + return 1; + z = If_Dec7Perform( t, 1 ); + If_Dec7Verify( t, z ); + return z; + } + assert( 0 ); + return 0; +} + +/**Function************************************************************* + + Synopsis [Performs additional check.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ int If_CutPerformCheck07( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr ) { int fDerive = 0; |