diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-03-31 23:09:51 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-03-31 23:09:51 -0700 |
commit | 2650f945986192f78af049fc8c11e4be0b327f8b (patch) | |
tree | 465a6a8bd54717bf578818778d6523163a46c481 /src/bool/rsb/rsbMan.c | |
parent | 017c35baf22da739f29bcafbda2063640bd1e82d (diff) | |
download | abc-2650f945986192f78af049fc8c11e4be0b327f8b.tar.gz abc-2650f945986192f78af049fc8c11e4be0b327f8b.tar.bz2 abc-2650f945986192f78af049fc8c11e4be0b327f8b.zip |
Shrink for 6-LUTs.
Diffstat (limited to 'src/bool/rsb/rsbMan.c')
-rw-r--r-- | src/bool/rsb/rsbMan.c | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/src/bool/rsb/rsbMan.c b/src/bool/rsb/rsbMan.c new file mode 100644 index 00000000..0d91cca4 --- /dev/null +++ b/src/bool/rsb/rsbMan.c @@ -0,0 +1,99 @@ +/**CFile**************************************************************** + + FileName [rsbMan.c] + + SystemName [ABC: Logic synthesis and verification system.] + + PackageName [Truth-table based resubstitution.] + + Synopsis [Manager maintenance.] + + Author [Alan Mishchenko] + + Affiliation [UC Berkeley] + + Date [Ver. 1.0. Started - June 20, 2005.] + + Revision [$Id: rsbMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $] + +***********************************************************************/ + +#include "rsbInt.h" + +ABC_NAMESPACE_IMPL_START + + +//////////////////////////////////////////////////////////////////////// +/// DECLARATIONS /// +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +/// FUNCTION DEFINITIONS /// +//////////////////////////////////////////////////////////////////////// + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Rsb_Man_t * Rsb_ManAlloc( int nLeafMax, int nDivMax, int nDecMax, int fVerbose ) +{ + Rsb_Man_t * p; + assert( nLeafMax <= 20 ); + assert( nDivMax <= 200 ); + p = ABC_CALLOC( Rsb_Man_t, 1 ); + p->nLeafMax = nLeafMax; + p->nDivMax = nDivMax; + p->nDecMax = nDecMax; + p->fVerbose = fVerbose; + // decomposition + p->vCexes = Vec_WrdAlloc( nDivMax + 150 ); + p->vDecPats = Vec_IntAlloc( Abc_TtWordNum(nLeafMax) ); + p->vFanins = Vec_IntAlloc( 10 ); + p->vFaninsOld = Vec_IntAlloc( 10 ); + p->vTries = Vec_IntAlloc( 10 ); + return p; +} +void Rsb_ManFree( Rsb_Man_t * p ) +{ + Vec_WrdFree( p->vCexes ); + Vec_IntFree( p->vDecPats ); + Vec_IntFree( p->vFanins ); + Vec_IntFree( p->vFaninsOld ); + Vec_IntFree( p->vTries ); + ABC_FREE( p ); +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Vec_Int_t * Rsb_ManGetFanins( Rsb_Man_t * p ) +{ + return p->vFanins; +} +Vec_Int_t * Rsb_ManGetFaninsOld( Rsb_Man_t * p ) +{ + return p->vFaninsOld; +} + +//////////////////////////////////////////////////////////////////////// +/// END OF FILE /// +//////////////////////////////////////////////////////////////////////// + + +ABC_NAMESPACE_IMPL_END + |