diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-23 10:41:28 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-23 10:41:28 -0700 |
commit | 32868822295cf11cde1628aeed27cb59b67c450c (patch) | |
tree | 07de5a42c6e11265e18ce1c1f4b92d787f29a260 /src/map | |
parent | eec94a70f1a63faefc7db2d7afccb2fd187e5d47 (diff) | |
download | abc-32868822295cf11cde1628aeed27cb59b67c450c.tar.gz abc-32868822295cf11cde1628aeed27cb59b67c450c.tar.bz2 abc-32868822295cf11cde1628aeed27cb59b67c450c.zip |
Experiments with exact matching into LUT structures.
Diffstat (limited to 'src/map')
-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; |