From 714ab458b7519e5d4d8c723eb6622937f8f3588b Mon Sep 17 00:00:00 2001 From: aletempiac Date: Thu, 2 May 2024 10:23:11 +0200 Subject: [PATCH] Adding deriving LUTs to if --- src/base/abci/abc.c | 6 +++--- src/base/abci/abcIf.c | 4 ++-- src/map/if/if.h | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index d2701d52d..5ff1f3fd1 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -19813,7 +19813,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->fVerbose ^= 1; break; case 'z': - pPars->fReturnDec ^= 1; + pPars->fDeriveLuts ^= 1; break; case 'h': default: @@ -19936,7 +19936,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) } else { - pPars->fReturnDec = 0; + pPars->fDeriveLuts = 0; } if ( pPars->fUserLutDec || pPars->fUserLut2D ) @@ -20160,7 +20160,7 @@ usage: Abc_Print( -2, "\t-t : toggles optimizing average rather than maximum level [default = %s]\n", pPars->fDoAverage? "yes": "no" ); Abc_Print( -2, "\t-n : toggles computing DSDs of the cut functions [default = %s]\n", pPars->fUseDsd? "yes": "no" ); Abc_Print( -2, "\t-c : toggles computing truth tables in a new way [default = %s]\n", pPars->fUseTtPerm? "yes": "no" ); - Abc_Print( -2, "\t-z : toggles decomposing LUT structure on the final network [default = %s]\n", pPars->fReturnDec? "yes": "no" ); + Abc_Print( -2, "\t-z : toggles deriving LUTs when mapping into LUT structures [default = %s]\n", pPars->fDeriveLuts? "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 db0da36f9..6c71c9ec2 100644 --- a/src/base/abci/abcIf.c +++ b/src/base/abci/abcIf.c @@ -597,7 +597,7 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t If_CutForEachLeafReverse( pIfMan, pCutBest, pIfLeaf, i ) Abc_ObjAddFanin( pNodeNew, Abc_NodeFromIf_rec(pNtkNew, pIfMan, pIfLeaf, vCover) ); } - else if ( pIfMan->pPars->fUserLutDec || pIfMan->pPars->fUserLut2D || pIfMan->pPars->fReturnDec ) + else if ( pIfMan->pPars->fUserLutDec || pIfMan->pPars->fUserLut2D || pIfMan->pPars->fDeriveLuts ) { If_CutForEachLeaf( pIfMan, pCutBest, pIfLeaf, i ) Abc_NodeFromIf_rec(pNtkNew, pIfMan, pIfLeaf, vCover); @@ -655,7 +655,7 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t extern Hop_Obj_t * Abc_RecToHop3( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_t * pIfObj ); pNodeNew->pData = Abc_RecToHop3( (Hop_Man_t *)pNtkNew->pManFunc, pIfMan, pCutBest, pIfObj ); } - else if ( pIfMan->pPars->fUserLutDec || pIfMan->pPars->fUserLut2D || pIfMan->pPars->fReturnDec ) + else if ( pIfMan->pPars->fUserLutDec || pIfMan->pPars->fUserLut2D || pIfMan->pPars->fDeriveLuts ) { extern void Abc_DecRecordToHop( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_t * pIfObj, Vec_Int_t * vMemory, Abc_Obj_t * pNodeTop ); Abc_DecRecordToHop( pNtkNew, pIfMan, pCutBest, pIfObj, vCover, pNodeNew ); diff --git a/src/map/if/if.h b/src/map/if/if.h index cb288e99b..136e61573 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -149,7 +149,6 @@ struct If_Par_t_ int fHashMapping; // perform AIG hashing after mapping int fUserLutDec; // perform Boolean decomposition during mapping int fUserLut2D; // perform Boolean decomposition during mapping - int fReturnDec; // perform Boolean decomposition during mapping int fVerbose; // the verbosity flag int fVerboseTrace; // the verbosity flag char * pLutStruct; // LUT structure