Reusing switch "-j" in "if" and "&if".

This commit is contained in:
Alan Mishchenko 2025-10-24 10:59:56 -07:00
parent 6fb4f739b0
commit 4c6b082463
4 changed files with 69 additions and 7 deletions

View File

@ -21845,7 +21845,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "This feature only works for {6,7}-LUTs.\n" );
return 1;
}
pPars->pFuncCell = If_CutPerformCheck07;
pPars->pFuncCell = If_CutPerformCheckJ;
pPars->fCutMin = 1;
}
if ( pPars->fUseCofVars )
@ -43180,12 +43180,12 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
//pPars->fUseCofVars ^= 1;
pPars->fUseCheck2 ^= 1;
break;
// case 'j':
// pPars->fEnableCheck07 ^= 1;
// break;
case 'j':
pPars->fUseAndVars ^= 1;
pPars->fEnableCheck07 ^= 1;
break;
//case 'j':
// pPars->fUseAndVars ^= 1;
// break;
case 'k':
pPars->fUseDsdTune ^= 1;
break;
@ -43288,7 +43288,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "This feature only works for {6,7}-LUTs.\n" );
return 1;
}
pPars->pFuncCell = If_CutPerformCheck07;
pPars->pFuncCell = If_CutPerformCheckJ;
pPars->fCutMin = 1;
}
if ( pPars->fUseCheck1 || pPars->fUseCheck2 )
@ -43569,7 +43569,7 @@ usage:
Abc_Print( -2, "\t-f : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck75? "yes": "no" );
Abc_Print( -2, "\t-u : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck75u? "yes": "no" );
Abc_Print( -2, "\t-i : toggles using cofactoring variables [default = %s]\n", pPars->fUseCofVars? "yes": "no" );
// Abc_Print( -2, "\t-j : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck07? "yes": "no" );
Abc_Print( -2, "\t-j : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck07? "yes": "no" );
Abc_Print( -2, "\t-j : toggles using AND bi-decomposition [default = %s]\n", pPars->fUseAndVars? "yes": "no" );
Abc_Print( -2, "\t-k : toggles matching based on precomputed DSD manager [default = %s]\n", pPars->fUseDsdTune? "yes": "no" );
Abc_Print( -2, "\t-z : toggles deriving LUTs when mapping into LUT structures [default = %s]\n", pPars->fDeriveLuts? "yes": "no" );

View File

@ -560,6 +560,7 @@ extern int If_CutPerformCheckXX( If_Man_t * p, unsigned * pTruth, in
extern int If_CutPerformCheck45( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
extern int If_CutPerformCheck54( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
extern int If_CutPerformCheck75( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
extern int If_CutPerformCheckJ( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
extern float If_CutDelayLutStruct( If_Man_t * p, If_Cut_t * pCut, char * pStr, float WireDelay );
// extern int If_CutPerformAcd( If_Man_t * p, unsigned nVars, int lutSize, unsigned * pdelay, int use_late_arrival, unsigned * cost );
extern int If_CluCheckExt( void * p, word * pTruth, int nVars, int nLutLeaf, int nLutRoot,

60
src/map/if/ifDecJ.c Normal file
View File

@ -0,0 +1,60 @@
/**CFile****************************************************************
FileName [ifDec07.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [FPGA mapping based on priority cuts.]
Synopsis [Performs additional check.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - November 21, 2006.]
Revision [$Id: ifDec07.c,v 1.00 2006/11/21 00:00:00 alanmi Exp $]
***********************************************************************/
#include "if.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Performs additional check.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int If_CutPerformCheckJ( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr )
{
int v;
// skip non-support minimal
for ( v = 0; v < nLeaves; v++ )
if ( !Abc_TtHasVar( (word *)pTruth, nVars, v ) )
return 0;
return 1;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END

View File

@ -9,6 +9,7 @@ SRC += src/map/if/ifCom.c \
src/map/if/ifDec16.c \
src/map/if/ifDec66.c \
src/map/if/ifDec75.c \
src/map/if/ifDecJ.c \
src/map/if/ifDelay.c \
src/map/if/ifDsd.c \
src/map/if/ifLibBox.c \