31 #define IF_MAX_CUBES 70
50 int i, k, Entry, Literal, Count, CountMax = 0;
54 for ( k = 0; k < nVars; k++ )
56 Literal = (3 & (Entry >> (k << 1)));
57 if ( Literal == 1 || Literal == 2 )
68 static double GateDelays[20] = { 1.00, 1.00, 2.00, 2.58, 3.00, 3.32, 3.58, 3.81, 4.00, 4.17, 4.32, 4.46, 4.58, 4.70, 4.81, 4.91, 5.00, 5.09, 5.17, 5.25 };
71 int i, nLitMax, Delay, DelayMax;
100 Delay = (int)(GateDelays[
If_CutLeaveNum(pCut)] + GateDelays[nLitMax] + 0.5);
125 int i, k, Entry, Literal, Delay = 0;
133 for ( k = 0; k < nSuppAll; k++ )
135 Literal = 3 & (Entry >> (k << 1));
136 if ( Literal == 1 || Literal == 2 )
137 Delay =
If_LogCounterPinDelays( pCounterAnd, &nCounterAnd, pPinDelsAnd, pTimes[k], pFaninRes[k], nSuppAll, 0 );
138 else if ( Literal != 0 )
141 assert( nCounterAnd > 0 );
153 for ( i = 0; i < nSuppAll; i++ )
196 int i, k, Entry, Literal, nLits, Delay = 0, iRes = 0;
202 nCounterAnd = nLits = 0;
203 for ( k = 0; k < nSuppAll; k++ )
205 Literal = 3 & (Entry >> (k << 1));
207 nLits++, Delay =
If_LogCounterAddAig( pCounterAnd, &nCounterAnd, pFaninLitsAnd, pTimes[k],
Abc_LitNot(pFaninLits[k]), vAig, nSuppAll, 0, 0 );
208 else if ( Literal == 2 )
209 nLits++, Delay =
If_LogCounterAddAig( pCounterAnd, &nCounterAnd, pFaninLitsAnd, pTimes[k], pFaninLits[k], vAig, nSuppAll, 0, 0 );
210 else if ( Literal != 0 )
213 assert( nCounterAnd > 0 );
218 *pArea += nLits == 1 ? 0 : nLits - 1;
225 if ( ((vCover->nCap >> 16) & 1) )
235 int iRes = 0, Res, k;
237 for ( k = 0; k < nLeaves; k++ )
277 if ( vCover == NULL )
286 int Max = 0, Two = 0;
290 if ( pTimes[i] != Max )
292 if ( Two + 2 < Max && Max + 3 < Delay )
295 printf(
"%3d ", pTimes[i] );
298 printf(
"-> %3d ", Delay );
305 vIsop.pArray = pIsop;
306 printf(
"ESOP (%d -> %d)\n",
Vec_IntSize(vCover), vIsop.nSize );
340 int i, Delay, DelayMax = -1;
352 DelayMax =
Abc_MaxInt( DelayMax, Delay + (
int)pPerm[i] );
389 int DelayMax = -1, nLeafMax = 0;
390 unsigned uLeafMask = 0;
394 if ( DelayMax < pTimes[i] )
395 DelayMax = pTimes[i], nLeafMax = 1, uLeafMask = (1 << (i << 1));
396 else if ( DelayMax == pTimes[i] )
397 nLeafMax++, uLeafMask |= (1 << (i << 1));
402 if ( nLeafMax <= LutSize - 1 )
static int If_LogCounterAddAig(int *pTimes, int *pnTimes, int *pFaninLits, int Num, int iLit, Vec_Int_t *vAig, int nSuppAll, int fXor, int fXorFunc)
int If_CutDelaySop(If_Man_t *p, If_Cut_t *pCut)
static word If_CutPinDelayInit(int v)
Vec_Wec_t * vTtIsops[IF_MAX_FUNC_LUTSIZE+1]
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
unsigned If_DsdManCheckXY(If_DsdMan_t *p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fHighEffort, int fVerbose)
#define If_CutForEachLeaf(p, pCut, pLeaf, i)
static int If_CutLeaveNum(If_Cut_t *pCut)
static int Abc_Var2Lit(int Var, int fCompl)
static char * If_CutPerm(If_Cut_t *pCut)
void Dau_DsdPrintFromTruth(word *pTruth, int nVarsInit)
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
static word If_LogPinDelaysMulti(word *pPinDels, int nFanins, int nSuppAll, int fXor)
static int Abc_MaxInt(int a, int b)
int If_CutSopBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
int If_CutLutBalanceEval(If_Man_t *p, If_Cut_t *pCut)
static int If_LogCounterPinDelays(int *pTimes, int *pnTimes, word *pPinDels, int Num, word PinDel, int nSuppAll, int fXor)
static word * If_CutTruthW(If_Man_t *p, If_Cut_t *pCut)
#define IF_MAX_CUBES
DECLARATIONS ///.
int If_CutSopBalancePinDelaysIntInt(Vec_Int_t *vCover, int *pTimes, int nSuppAll, char *pPerm)
static int Abc_LitIsCompl(int Lit)
void Kit_TruthIsopPrintCover(Vec_Int_t *vCover, int nVars, int fCompl)
int If_CutSopBalanceEvalIntInt(Vec_Int_t *vCover, int nLeaves, int *pTimes, Vec_Int_t *vAig, int fCompl, int *pArea)
static int If_CutTruthLit(If_Cut_t *pCut)
static If_Obj_t * If_CutLeaf(If_Man_t *p, If_Cut_t *pCut, int i)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
#define IF_MAX_FUNC_LUTSIZE
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define ABC_NAMESPACE_IMPL_START
static Vec_Int_t * Vec_WecEntry(Vec_Wec_t *p, int i)
static int If_LogCreateAndXorMulti(Vec_Int_t *vAig, int *pFaninLits, int nFanins, int nSuppAll, int fXor)
int If_CutSopBalancePinDelaysInt(Vec_Int_t *vCover, int *pTimes, word *pFaninRes, int nSuppAll, word *pRes)
static int Abc_LitNot(int Lit)
static int If_CutDsdLit(If_Man_t *p, If_Cut_t *pCut)
static int Vec_IntSize(Vec_Int_t *p)
int If_CutSopBalanceEvalInt(Vec_Int_t *vCover, int *pTimes, int *pFaninLits, Vec_Int_t *vAig, int *piRes, int nSuppAll, int *pArea)
static void If_CutPinDelayTranslate(word D, int nVars, char *pPerm)
static int Abc_Lit2Var(int Lit)
int If_CutLutBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
int If_CutSopBalanceEval(If_Man_t *p, If_Cut_t *pCut, Vec_Int_t *vAig)
static int If_CutMaxCubeSize(Vec_Int_t *vCover, int nVars)
FUNCTION DEFINITIONS ///.
static void Vec_IntClear(Vec_Int_t *p)
static char * If_CutDsdPerm(If_Man_t *p, If_Cut_t *pCut)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Abc_Tt6Esop(word t, int nVars, int *pCover)