diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 22 | ||||
-rw-r--r-- | src/base/abci/abcIf.c | 2 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 9f424459..86500d7a 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -15097,6 +15097,11 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) } if ( pPars->pLutStruct ) { + if ( pPars->fDsdBalance ) + { + Abc_Print( -1, "Incompatible options (-S and -x).\n" ); + return 1; + } if ( pPars->nLutSize < 6 || pPars->nLutSize > 16 ) { Abc_Print( -1, "This feature only works for [6;16]-LUTs.\n" ); @@ -15122,12 +15127,12 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->pLutLib = NULL; } // modify for delay optimization - if ( pPars->fDelayOpt || pPars->fDsdBalance ) + if ( pPars->fDelayOpt || pPars->fDsdBalance || pPars->fDelayOptLut ) { pPars->fTruth = 1; pPars->fCutMin = 1; pPars->fExpRed = 0; - pPars->fUseDsd = pPars->fDsdBalance; + pPars->fUseDsd = pPars->fDsdBalance || pPars->fDelayOptLut; pPars->pLutLib = NULL; } // modify for delay optimization @@ -15162,7 +15167,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) printf( "DSD manager has incompatible number of variables.\n" ); return 0; } - if ( p && LutSize != If_DsdManLutSize(p) ) + if ( p && LutSize != If_DsdManLutSize(p) && !pPars->fDsdBalance ) { printf( "DSD manager has different LUT size.\n" ); return 0; @@ -29859,6 +29864,11 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) } if ( pPars->pLutStruct ) { + if ( pPars->fDsdBalance ) + { + Abc_Print( -1, "Incompatible options (-S and -x).\n" ); + return 1; + } if ( pPars->nLutSize < 6 || pPars->nLutSize > 16 ) { Abc_Print( -1, "This feature only works for [6;16]-LUTs.\n" ); @@ -29886,12 +29896,12 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->pLutLib = NULL; } // modify for delay optimization - if ( pPars->fDelayOpt || pPars->fDsdBalance ) + if ( pPars->fDelayOpt || pPars->fDsdBalance || pPars->fDelayOptLut ) { pPars->fTruth = 1; pPars->fCutMin = 1; pPars->fExpRed = 0; - pPars->fUseDsd = pPars->fDsdBalance; + pPars->fUseDsd = pPars->fDsdBalance || pPars->fDelayOptLut; pPars->pLutLib = NULL; } // modify for delay optimization @@ -29926,7 +29936,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) printf( "DSD manager has incompatible number of variables.\n" ); return 0; } - if ( p && LutSize != If_DsdManLutSize(p) ) + if ( p && LutSize != If_DsdManLutSize(p) && !pPars->fDsdBalance ) { printf( "DSD manager has different LUT size.\n" ); return 0; diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c index 5bab925e..8131a64a 100644 --- a/src/base/abci/abcIf.c +++ b/src/base/abci/abcIf.c @@ -144,6 +144,8 @@ Abc_Ntk_t * Abc_NtkIf( Abc_Ntk_t * pNtk, If_Par_t * pPars ) assert( pPars->nLutSize <= If_DsdManVarNum(p) ); assert( (pPars->pLutStruct == NULL && If_DsdManLutSize(p) == 0) || (pPars->pLutStruct && pPars->pLutStruct[0] - '0' == If_DsdManLutSize(p)) ); pIfMan->pIfDsdMan = (If_DsdMan_t *)Abc_FrameReadManDsd(); + if ( pPars->fDsdBalance ) + If_DsdManAllocIsops( pIfMan->pIfDsdMan, pPars->nLutSize ); } // perform FPGA mapping |