diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-08-08 12:45:28 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-08-08 12:45:28 -0700 |
commit | 68ce0bc1c1a642495358e8e5d96e9212236a517b (patch) | |
tree | ab5264ec26d4bdc5fe0822f09061782d85f8821b /src/aig/gia/giaIf.c | |
parent | 35b816dd57f0ce6667f1fad7e4e37780aa6384aa (diff) | |
download | abc-68ce0bc1c1a642495358e8e5d96e9212236a517b.tar.gz abc-68ce0bc1c1a642495358e8e5d96e9212236a517b.tar.bz2 abc-68ce0bc1c1a642495358e8e5d96e9212236a517b.zip |
Adding delay optimization to synthesis script &syn2.
Diffstat (limited to 'src/aig/gia/giaIf.c')
-rw-r--r-- | src/aig/gia/giaIf.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index a3ebf305..61b40117 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -1758,6 +1758,38 @@ Gia_Man_t * Gia_ManPerformSopBalance( Gia_Man_t * p, int nCutNum, int nRelaxRati Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); return pNew; } +Gia_Man_t * Gia_ManPerformDsdBalance( Gia_Man_t * p, int nCutNum, int nRelaxRatio, int fVerbose ) +{ + Gia_Man_t * pNew; + If_Man_t * pIfMan; + If_Par_t Pars, * pPars = &Pars; + If_ManSetDefaultPars( pPars ); + pPars->nCutsMax = nCutNum; + pPars->nRelaxRatio = nRelaxRatio; + pPars->fVerbose = fVerbose; + pPars->nLutSize = 6; + pPars->fDsdBalance = 1; + pPars->fUseDsd = 1; + pPars->fCutMin = 1; + pPars->fTruth = 1; + pPars->fExpRed = 0; + if ( Abc_FrameReadManDsd() == NULL ) + Abc_FrameSetManDsd( If_DsdManAlloc(pPars->nLutSize, 0) ); + // perform mapping + pIfMan = Gia_ManToIf( p, pPars ); + pIfMan->pIfDsdMan = (If_DsdMan_t *)Abc_FrameReadManDsd(); + if ( pPars->fDsdBalance ) + If_DsdManAllocIsops( pIfMan->pIfDsdMan, pPars->nLutSize ); + If_ManPerformMapping( pIfMan ); + pNew = Gia_ManFromIfAig( pIfMan ); + If_ManStop( pIfMan ); + // transfer name + assert( pNew->pName == NULL ); + pNew->pName = Abc_UtilStrsav( p->pName ); + pNew->pSpec = Abc_UtilStrsav( p->pSpec ); + Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); + return pNew; +} /**Function************************************************************* |