From de48fd79992a5218c18da8dca62869b865a62f0e Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 28 Feb 2014 10:35:36 -0800 Subject: Changes to LUT mappers. --- src/opt/dau/dau.h | 1 + src/opt/dau/dauNonDsd.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/opt') diff --git a/src/opt/dau/dau.h b/src/opt/dau/dau.h index 051abb7d..5699962e 100644 --- a/src/opt/dau/dau.h +++ b/src/opt/dau/dau.h @@ -98,6 +98,7 @@ extern void Dau_DsdRemoveBraces( char * pDsd, int * pMatches ); extern char * Dau_DsdMerge( char * pDsd0i, int * pPerm0, char * pDsd1i, int * pPerm1, int fCompl0, int fCompl1, int nVars ); /*=== dauNonDsd.c ==========================================================*/ +extern Vec_Int_t * Dau_DecFindSets_int( word * pInit, int nVars, int * pSched[16] ); extern Vec_Int_t * Dau_DecFindSets( word * pInit, int nVars ); extern void Dau_DecSortSet( unsigned set, int nVars, int * pnUnique, int * pnShared, int * pnFree ); extern void Dau_DecPrintSets( Vec_Int_t * vSets, int nVars ); diff --git a/src/opt/dau/dauNonDsd.c b/src/opt/dau/dauNonDsd.c index 53eafe92..ec16c9ab 100644 --- a/src/opt/dau/dauNonDsd.c +++ b/src/opt/dau/dauNonDsd.c @@ -459,20 +459,17 @@ void Dau_DecMoveFreeToLSB( word * p, int nVars, int * V2P, int * P2V, int maskB, Abc_TtMoveVar( p, nVars, V2P, P2V, v, c++ ); assert( c == nVars - sizeB ); } -Vec_Int_t * Dau_DecFindSets( word * pInit, int nVars ) +Vec_Int_t * Dau_DecFindSets_int( word * pInit, int nVars, int * pSched[16] ) { Vec_Int_t * vSets = Vec_IntAlloc( 32 ); int V2P[16], P2V[16], pVarsB[16]; int Limit = (1 << nVars); int c, v, sizeB, sizeS, maskB, maskS; - int * pSched[16] = {NULL}; unsigned setMixed; word p[1<<10]; memcpy( p, pInit, sizeof(word) * Abc_TtWordNum(nVars) ); for ( v = 0; v < nVars; v++ ) assert( Abc_TtHasVar( p, nVars, v ) ); - for ( v = 2; v < nVars; v++ ) - pSched[v] = Extra_GreyCodeSchedule( v ); // initialize permutation for ( v = 0; v < nVars; v++ ) V2P[v] = P2V[v] = v; @@ -514,6 +511,15 @@ Vec_Int_t * Dau_DecFindSets( word * pInit, int nVars ) Vec_IntPush( vSets, setMixed ); } } + return vSets; +} +Vec_Int_t * Dau_DecFindSets( word * pInit, int nVars ) +{ + Vec_Int_t * vSets; + int v, * pSched[16] = {NULL}; + for ( v = 2; v < nVars; v++ ) + pSched[v] = Extra_GreyCodeSchedule( v ); + vSets = Dau_DecFindSets_int( pInit, nVars, pSched ); for ( v = 2; v < nVars; v++ ) ABC_FREE( pSched[v] ); return vSets; -- cgit v1.2.3