summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-04-24 10:43:24 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-04-24 10:43:24 -0700
commitaffb43e2a376a776c71b20a665b6332dea9022a4 (patch)
treea7c564224248322b84c28da3f57594699c2f33f1 /src
parent2becb24a325aafa659b0608379d5c22f7fffe16b (diff)
downloadabc-affb43e2a376a776c71b20a665b6332dea9022a4.tar.gz
abc-affb43e2a376a776c71b20a665b6332dea9022a4.tar.bz2
abc-affb43e2a376a776c71b20a665b6332dea9022a4.zip
Added switch to control duplication of logic after mapping.
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abc.c8
-rw-r--r--src/base/abci/abcIf.c2
-rw-r--r--src/map/if/if.h1
3 files changed, 8 insertions, 3 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 03fd2854..0e1d7b21 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -12682,7 +12682,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
fLutMux = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "KCFADEqaflepmrsdbugvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "KCFADEqaflepmrsdbugovh" ) ) != EOF )
{
switch ( c )
{
@@ -12793,6 +12793,9 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'g':
pPars->fDelayOpt ^= 1;
break;
+ case 'o':
+ pPars->fUseBuffs ^= 1;
+ break;
case 'v':
pPars->fVerbose ^= 1;
break;
@@ -12949,7 +12952,7 @@ usage:
sprintf( LutSize, "library" );
else
sprintf( LutSize, "%d", pPars->nLutSize );
- Abc_Print( -2, "usage: if [-KCFA num] [-DE float] [-qarlepmsdbugvh]\n" );
+ Abc_Print( -2, "usage: if [-KCFA num] [-DE float] [-qarlepmsdbugovh]\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 );
@@ -12970,6 +12973,7 @@ usage:
Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" );
Abc_Print( -2, "\t-u : toggles the use of MUXes along with LUTs [default = %s]\n", fLutMux? "yes": "no" );
Abc_Print( -2, "\t-g : toggles global delay optimization [default = %s]\n", pPars->fDelayOpt? "yes": "no" );
+ Abc_Print( -2, "\t-o : toggles using buffers to decouple combinational outputs [default = %s]\n", pPars->fUseBuffs? "yes": "no" );
Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : prints the command usage\n");
return 1;
diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c
index 7f7c68c4..77f7805c 100644
--- a/src/base/abci/abcIf.c
+++ b/src/base/abci/abcIf.c
@@ -282,7 +282,7 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
if ( pIfMan->pPars->fUseBdds )
Abc_NtkBddReorder( pNtkNew, 0 );
// decouple the PO driver nodes to reduce the number of levels
- nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, 1 );
+ nDupGates = Abc_NtkLogicMakeSimpleCos( pNtkNew, !pIfMan->pPars->fUseBuffs );
if ( nDupGates && pIfMan->pPars->fVerbose )
printf( "Duplicated %d gates to decouple the CO drivers.\n", nDupGates );
return pNtkNew;
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 96f6f109..ff2e9541 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -95,6 +95,7 @@ struct If_Par_t_
int fSeqMap; // sequential mapping
int fBidec; // use bi-decomposition
int fUseBat; // use one specialized feature
+ int fUseBuffs; // use buffers to decouple outputs
int fVerbose; // the verbosity flag
// internal parameters
int fDelayOpt; // special delay optimization