diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-09-19 16:49:36 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-09-19 16:49:36 -0700 |
commit | 390adc39caee1cafbeca46a92f73f349ec318e75 (patch) | |
tree | 09d55fa2b12b6315de4b75ebc0b3d79914528939 | |
parent | 3a1705e8bb336ee373345701f75c94a7a1455304 (diff) | |
download | abc-390adc39caee1cafbeca46a92f73f349ec318e75.tar.gz abc-390adc39caee1cafbeca46a92f73f349ec318e75.tar.bz2 abc-390adc39caee1cafbeca46a92f73f349ec318e75.zip |
Making &mfs work with boxes larger than 6 inputs. Adding option &if -w to print delay profile.
-rw-r--r-- | src/aig/gia/giaIf.c | 7 | ||||
-rw-r--r-- | src/aig/gia/giaMfs.c | 4 | ||||
-rw-r--r-- | src/base/abci/abc.c | 12 | ||||
-rw-r--r-- | src/map/if/if.h | 1 | ||||
-rw-r--r-- | src/misc/tim/timMan.c | 2 |
5 files changed, 20 insertions, 6 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index 53e1953c..c22a63a7 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -2331,6 +2331,13 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars ) pNew->pName = Abc_UtilStrsav( p->pName ); pNew->pSpec = Abc_UtilStrsav( p->pSpec ); Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); + // print delay trace + if ( pPars->fVerboseTrace ) + { + pNew->pLutLib = pPars->pLutLib; + Gia_ManDelayTraceLutPrint( pNew, 1 ); + pNew->pLutLib = NULL; + } return pNew; } Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp ) diff --git a/src/aig/gia/giaMfs.c b/src/aig/gia/giaMfs.c index 0ddc00ae..2d9d09e8 100644 --- a/src/aig/gia/giaMfs.c +++ b/src/aig/gia/giaMfs.c @@ -67,7 +67,7 @@ Sfm_Ntk_t * Gia_ManExtractMfs( Gia_Man_t * p ) int nRealPos = nBoxes ? Tim_ManPoNum(pManTime) : Gia_ManPoNum(p); int i, j, k, curCi, curCo, nBoxIns, nBoxOuts; int Id, iFan, nMfsVars, nBbIns = 0, nBbOuts = 0, Counter = 0; - assert( !p->pAigExtra || Gia_ManPiNum(p->pAigExtra) <= 6 ); + //assert( !p->pAigExtra || Gia_ManPiNum(p->pAigExtra) <= 6 ); if ( pManTime ) Tim_ManBlackBoxIoNum( pManTime, &nBbIns, &nBbOuts ); // skip PIs due to box outputs Counter += nBbOuts; @@ -148,7 +148,7 @@ Sfm_Ntk_t * Gia_ManExtractMfs( Gia_Man_t * p ) for ( i = 0; i < nBoxIns; i++ ) Vec_IntPush( vLeaves, Gia_ObjId(p->pAigExtra, Gia_ManCi(p->pAigExtra, i)) ); // iterate through box outputs - if ( !Tim_ManBoxIsBlack(pManTime, k) ) + if ( !Tim_ManBoxIsBlack(pManTime, k) && Tim_ManBoxInputNum(pManTime, k) <= 6 ) { for ( j = 0; j < nBoxOuts; j++ ) { diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 8af2a172..4eafa0b9 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -36539,7 +36539,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) } pPars->pLutLib = (If_LibLut_t *)pAbc->pLibLut; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRDEWSTXYqalepmrsdbgxyofuijkztncvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRDEWSTXYqalepmrsdbgxyofuijkztncvwh" ) ) != EOF ) { switch ( c ) { @@ -36766,6 +36766,9 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'v': pPars->fVerbose ^= 1; break; + case 'w': + pPars->fVerboseTrace ^= 1; + break; case 'h': pPars->fHashMapping ^= 1; break; @@ -37056,7 +37059,7 @@ usage: sprintf(LutSize, "library" ); else sprintf(LutSize, "%d", pPars->nLutSize ); - Abc_Print( -2, "usage: &if [-KCFAGRTXY num] [-DEW float] [-S str] [-qarlepmsdbgxyofuijkztnchv]\n" ); + Abc_Print( -2, "usage: &if [-KCFAGRTXY num] [-DEW float] [-S str] [-qarlepmsdbgxyofuijkztnchvw]\n" ); Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" ); Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize ); Abc_Print( -2, "\t-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]\n", pPars->nCutsMax ); @@ -37097,6 +37100,7 @@ usage: Abc_Print( -2, "\t-c : toggles computing truth tables in a new way [default = %s]\n", pPars->fUseTtPerm? "yes": "no" ); Abc_Print( -2, "\t-h : toggles rehashing AIG after mapping [default = %s]\n", pPars->fHashMapping? "yes": "no" ); Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" ); + Abc_Print( -2, "\t-w : toggles printing delay trace [default = %s]\n", pPars->fVerboseTrace? "yes": "no" ); return 1; } @@ -44452,11 +44456,13 @@ int Abc_CommandAbc9Mfs( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Abc_CommandAbc9Mfs(): The current mapping has nodes with more than 6 inputs. Cannot use \"mfs\".\n" ); return 0; } +/* if ( pAbc->pGia->pAigExtra && Gia_ManPiNum(pAbc->pGia->pAigExtra) > 6 ) { Abc_Print( -1, "Abc_CommandAbc9Mfs(): The current white-boxes have more than 6 inputs. Cannot use \"mfs\".\n" ); return 0; } +*/ pTemp = Gia_ManPerformMfs( pAbc->pGia, pPars ); Abc_FrameUpdateGia( pAbc, pTemp ); return 0; @@ -44869,7 +44875,7 @@ usage: ***********************************************************************/ int Abc_CommandAbc9AbsCreate( Abc_Frame_t * pAbc, int argc, char ** argv ) { - Gia_Man_t * pTemp = NULL; + //Gia_Man_t * pTemp = NULL; char * pStr, * pFlopNum; int c, fVerbose = 0; Extra_UtilGetoptReset(); diff --git a/src/map/if/if.h b/src/map/if/if.h index 669b3c24..eb81d64e 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -143,6 +143,7 @@ struct If_Par_t_ int fDoAverage; // optimize average rather than maximum level int fHashMapping; // perform AIG hashing after mapping int fVerbose; // the verbosity flag + int fVerboseTrace; // the verbosity flag char * pLutStruct; // LUT structure float WireDelay; // wire delay // internal parameters diff --git a/src/misc/tim/timMan.c b/src/misc/tim/timMan.c index 8cec9788..2b6ba6dc 100644 --- a/src/misc/tim/timMan.c +++ b/src/misc/tim/timMan.c @@ -738,7 +738,7 @@ void Tim_ManBlackBoxIoNum( Tim_Man_t * p, int * pnBbIns, int * pnBbOuts ) if ( Tim_ManBoxNum(p) ) Tim_ManForEachBox( p, pBox, i ) { - if ( !pBox->fBlack ) + if ( !pBox->fBlack && pBox->nInputs <= 6 ) continue; *pnBbIns += Tim_ManBoxInputNum( p, i ); *pnBbOuts += Tim_ManBoxOutputNum( p, i ); |