From 32868822295cf11cde1628aeed27cb59b67c450c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 23 Sep 2013 10:41:28 -0700 Subject: Experiments with exact matching into LUT structures. --- src/map/if/if.h | 1 + src/map/if/ifDec07.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) (limited to 'src/map') 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 @@ -664,6 +664,54 @@ int If_Dec7PickBestMux( word t[2], word c0r[2], word c1r[2] ) } +/**Function************************************************************* + + Synopsis [Performs additional check.] + + Description [] + + SideEffects [] + + 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.] -- cgit v1.2.3