diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-02-08 22:00:55 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-02-08 22:00:55 -0800 |
commit | 0f9001c956749682e002cb229264dbd6c4882fc2 (patch) | |
tree | 2b200b4ac6241ad6ff70393a5d4ddb5fc51fe51f /src | |
parent | db6afbea29b6f187eafb113652c18bfb92e2c940 (diff) | |
download | abc-0f9001c956749682e002cb229264dbd6c4882fc2.tar.gz abc-0f9001c956749682e002cb229264dbd6c4882fc2.tar.bz2 abc-0f9001c956749682e002cb229264dbd6c4882fc2.zip |
Adding switch '-p' to control pin-permutation in &nf.
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/gia/gia.h | 1 | ||||
-rw-r--r-- | src/aig/gia/giaNf.c | 4 | ||||
-rw-r--r-- | src/base/abci/abc.c | 8 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index d89888e0..bc7238d8 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -275,6 +275,7 @@ struct Jf_Par_t_ int nVerbLimit; int DelayTarget; int fAreaOnly; + int fPinPerm; int fOptEdge; int fUseMux7; int fPower; diff --git a/src/aig/gia/giaNf.c b/src/aig/gia/giaNf.c index 3dad6fb2..7c82e70d 100644 --- a/src/aig/gia/giaNf.c +++ b/src/aig/gia/giaNf.c @@ -182,7 +182,6 @@ static inline int Nf_CutConfC( int Conf, int i ) ***********************************************************************/ void Nf_StoCreateGateAdd( Nf_Man_t * pMan, word uTruth, int * pFans, int nFans, int CellId ) { - int fUsePinPermutation = 0; // set to 1 to enable pin-permutation (which is good for delay when pin-delays differ) Vec_Int_t * vArray; Pf_Mat_t Mat = Pf_Int2Mat(0); int i, GateId, Entry, fCompl = (int)(uTruth & 1); @@ -198,7 +197,7 @@ void Nf_StoCreateGateAdd( Nf_Man_t * pMan, word uTruth, int * pFans, int nFans, Mat.Perm |= (unsigned)(Abc_Lit2Var(pFans[i]) << (3*i)); Mat.Phase |= (unsigned)(Abc_LitIsCompl(pFans[i]) << i); } - if ( fUsePinPermutation ) + if ( pMan->pPars->fPinPerm ) // use pin-permutation (slower but good for delay when pin-delays differ) { Vec_IntPush( vArray, CellId ); Vec_IntPush( vArray, Pf_Mat2Int(Mat) ); @@ -2079,6 +2078,7 @@ void Nf_ManSetDefaultPars( Jf_Par_t * pPars ) pPars->nVerbLimit = 5; pPars->DelayTarget = -1; pPars->fAreaOnly = 0; + pPars->fPinPerm = 0; pPars->fOptEdge = 1; pPars->fCoarsen = 0; pPars->fCutMin = 1; diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 194c0592..7983c623 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -33233,7 +33233,7 @@ int Abc_CommandAbc9Nf( Abc_Frame_t * pAbc, int argc, char ** argv ) Gia_Man_t * pNew; int c; Nf_ManSetDefaultPars( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "KCFARLEDWakvwh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "KCFARLEDWapkvwh" ) ) != EOF ) { switch ( c ) { @@ -33345,6 +33345,9 @@ int Abc_CommandAbc9Nf( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'a': pPars->fAreaOnly ^= 1; break; + case 'p': + pPars->fPinPerm ^= 1; + break; case 'k': pPars->fCoarsen ^= 1; break; @@ -33386,7 +33389,7 @@ usage: sprintf(Buffer, "best possible" ); else sprintf(Buffer, "%d", pPars->DelayTarget ); - Abc_Print( -2, "usage: &nf [-KCFARLED num] [-akvwh]\n" ); + Abc_Print( -2, "usage: &nf [-KCFARLED num] [-akpvwh]\n" ); Abc_Print( -2, "\t performs technology mapping of the network\n" ); Abc_Print( -2, "\t-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]\n", pPars->nLutSizeMax, pPars->nLutSize ); Abc_Print( -2, "\t-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]\n", pPars->nCutNumMax, pPars->nCutNum ); @@ -33398,6 +33401,7 @@ usage: Abc_Print( -2, "\t-D num : sets the delay constraint for the mapping [default = %s]\n", Buffer ); Abc_Print( -2, "\t-a : toggles area-oriented mapping [default = %s]\n", pPars->fAreaOnly? "yes": "no" ); Abc_Print( -2, "\t-k : toggles coarsening the subject graph [default = %s]\n", pPars->fCoarsen? "yes": "no" ); + Abc_Print( -2, "\t-p : toggles pin-permutation (useful when pin-delays differ) [default = %s]\n", pPars->fPinPerm? "yes": "no" ); Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-w : toggles very verbose output [default = %s]\n", pPars->fVeryVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : prints the command usage\n"); |