93 if ( fDelayMin && p->
pManTime == NULL )
95 int Area0, Area1, Delay0, Delay1;
107 Area0 = (int)pPars->
Area;
108 Delay0 = (
int)pPars->
Delay;
116 Area1 = (int)pPars->
Area;
117 Delay1 = (
int)pPars->
Delay;
119 if ( Delay1 < Delay0 - 1 || (Delay1 == Delay0 + 1 && 100.0 * (Area1 - Area0) / Area1 < 3.0) )
322 for ( i = 0; i < nPiReal; i++ )
326 for ( ; k < nBarBufs; k++ )
335 for ( ; k < nBarBufs; k++ )
339 for ( i = 0; i < nPoReal; i++ )
390 Gia_Man_t * pGia1, * pGia2, * pGia3, * pNew, * pTemp;
429 if ( pTemp != pGia2 )
486 void Gia_ManPerformMap(
int nAnds,
int nLutSize,
int nCutNum,
int fMinAve,
int fUseMfs,
int fVerbose )
489 sprintf( Command,
"&unmap; &lf -K %d -C %d -k %s; &save", nLutSize, nCutNum, fMinAve?
"-t":
"" );
494 printf(
"MAPPING:\n" );
495 printf(
"Mapping with &lf -k:\n" );
498 sprintf( Command,
"&unmap; &lf -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?
"-t":
"" );
502 printf(
"Mapping with &lf:\n" );
505 if ( (nLutSize == 4 && nAnds < 100000) || (nLutSize == 6 && nAnds < 2000) )
507 sprintf( Command,
"&unmap; &if -sz -S %d%d -K %d -C %d %s", nLutSize, nLutSize, 2*nLutSize-1, 2*nCutNum, fMinAve?
"-t":
"" );
513 printf(
"Mapping with &if -sz -S %d%d -K %d -C %d %s:\n", nLutSize, nLutSize, 2*nLutSize-1, 2*nCutNum, fMinAve?
"-t":
"" );
522 printf(
"Mapping final:\n" );
526 void Gia_ManPerformRound(
int fIsMapped,
int nAnds,
int nLevels,
int nLutSize,
int nCutNum,
int fMinAve,
int fUseMfs,
int fVerbose )
534 sprintf( Command,
"&dsdb; &dch -C 500; &if -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?
"-t":
"" );
538 printf(
"Mapping with &dch -C 500; &if -K %d -C %d %s:\n", nLutSize, nCutNum, fMinAve?
"-t":
"" );
548 sprintf( Command,
"&dsdb; &dch -C 500; &if -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?
"-t":
"" );
552 printf(
"Mapping with &dch -C 500; &if -K %d -C %d %s:\n", nLutSize, nCutNum, fMinAve?
"-t":
"" );
573 sprintf( Command,
"&blut -a -K %d", nLutSize );
579 void Gia_ManPerformFlow(
int fIsMapped,
int nAnds,
int nLevels,
int nLutSize,
int nCutNum,
int fMinAve,
int fUseMfs,
int fVerbose )
590 Gia_ManPerformRound( fIsMapped, nAnds, nLevels, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
596 Gia_ManPerformRound( fIsMapped, nAnds, nLevels, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
610 void Gia_ManPerformFlow2(
int fIsMapped,
int nAnds,
int nLevels,
int nLutSize,
int nCutNum,
int fBalance,
int fMinAve,
int fUseMfs,
int fVerbose )
612 char Comm1[100], Comm2[100], Comm3[100], Comm4[100];
613 sprintf( Comm1,
"&synch2 -K %d -C 500; &if -m%s -K %d -C %d; %s &save", nLutSize, fMinAve?
"t":
"", nLutSize, nCutNum, fUseMfs ?
"&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":
"" );
614 sprintf( Comm2,
"&dch -C 500; &if -m%s -K %d -C %d; %s &save", fMinAve?
"t":
"", nLutSize, nCutNum+4, fUseMfs ?
"&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":
"" );
615 sprintf( Comm3,
"&synch2 -K %d -C 500; &lf -m%s -E 5 -K %d -C %d; %s &save", nLutSize, fMinAve?
"t":
"", nLutSize, nCutNum, fUseMfs ?
"&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":
"" );
616 sprintf( Comm4,
"&dch -C 500; &lf -m%sk -E 5 -K %d -C %d; %s &save", fMinAve?
"t":
"", nLutSize, nCutNum+4, fUseMfs ?
"&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":
"" );
620 printf(
"Trying synthesis...\n" );
643 printf(
"Trying SOP balancing...\n" );
663 if ( nAnds > 100000 )
671 printf(
"Trying SOP balancing...\n" );
699 printf(
"Trying SOP balancing...\n" );
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
ABC_DLL Gia_Man_t * Abc_FrameReadGia(Abc_Frame_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Gia_Man_t * Jf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
void Lf_ManSetDefaultPars(Jf_Par_t *pPars)
static Gia_Obj_t * Gia_ObjSiblObj(Gia_Man_t *p, int Id)
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
void Gia_ManStop(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
Gia_Man_t * Gia_ManAigSyn3(Gia_Man_t *p, int fVerbose, int fVeryVerbose)
Gia_Man_t * Lf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
static int Gia_ManAppendCi(Gia_Man_t *p)
int Gia_ManLevelWithBoxes(Gia_Man_t *p)
Gia_Man_t * Gia_ManLutBalance(Gia_Man_t *p, int nLutSize, int fUseMuxes, int fRecursive, int fOptArea, int fVerbose)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Gia_ObjIsBuf(Gia_Obj_t *pObj)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Gia_Man_t * Gia_ManPerformFx(Gia_Man_t *p, int nNewNodesMax, int LitCountMax, int fReverse, int fVerbose, int fVeryVerbose)
ABC_NAMESPACE_IMPL_START void Gia_ManAigPrintPiLevels(Gia_Man_t *p)
DECLARATIONS ///.
void Gia_ManPerformRound(int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
Gia_Man_t * Gia_ManDupFromBarBufs(Gia_Man_t *p)
Gia_Man_t * Gia_ManPerformDsdBalance(Gia_Man_t *p, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose)
static int Gia_ManHasChoices(Gia_Man_t *p)
#define Gia_ManForEachCi(p, pObj, i)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Gia_ManAndNum(Gia_Man_t *p)
static int Aig_ManCoNum(Aig_Man_t *p)
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Gia_ObjSibl(Gia_Man_t *p, int Id)
Aig_Man_t * Aig_ManDupDfsGuided(Aig_Man_t *p, Vec_Ptr_t *vPios)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
void Gia_ManPerformMap(int nAnds, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
void Jf_ManSetDefaultPars(Jf_Par_t *pPars)
static int Gia_ManAppendBuf(Gia_Man_t *p, int iLit)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Aig_ManCiNum(Aig_Man_t *p)
Gia_Man_t * Gia_ManAigSyn2(Gia_Man_t *pInit, int fOldAlgo, int fCoarsen, int fCutMin, int nRelaxRatio, int fDelayMin, int fVerbose, int fVeryVerbose)
#define ABC_NAMESPACE_IMPL_END
void * Abc_FrameGetGlobalFrame()
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
Vec_Ptr_t * Gia_ManOrderPios(Aig_Man_t *p, Gia_Man_t *pOrder)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManFillValue(Gia_Man_t *p)
void Gia_ManPerformFlow2(int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fMinAve, int fUseMfs, int fVerbose)
void Gia_ManTransferTiming(Gia_Man_t *p, Gia_Man_t *pGia)
static void Vec_IntFreeP(Vec_Int_t **p)
#define Gia_ManForEachPi(p, pObj, i)
Gia_Man_t * Gia_ManChoiceMiter(Vec_Ptr_t *vGias)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
static int Gia_ManCiNum(Gia_Man_t *p)
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
static int Gia_ManHasMapping(Gia_Man_t *p)
Gia_Man_t * Gia_ManAigSynch2Choices(Gia_Man_t *pGia1, Gia_Man_t *pGia2, Gia_Man_t *pGia3, Dch_Pars_t *pPars)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void * Dsm_ManDeriveGia(void *p, int fUseMuxes)
Aig_Man_t * Gia_ManToAigSkip(Gia_Man_t *p, int nOutDelta)
static int Gia_ManBufNum(Gia_Man_t *p)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
void Gia_ManTransferMapping(Gia_Man_t *p, Gia_Man_t *pGia)
Aig_Man_t * Dch_ComputeChoices(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Gia_Man_t * Gia_ManAreaBalance(Gia_Man_t *p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose)
static void Vec_IntFree(Vec_Int_t *p)
Gia_Man_t * Gia_ManAigSynch2(Gia_Man_t *pInit, void *pPars0, int nLutSize, int nRelaxRatio)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
char * Abc_UtilStrsav(char *s)
void Gia_ManPerformFlow(int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
Gia_Man_t * Gia_ManAigSyn4(Gia_Man_t *p, int fVerbose, int fVeryVerbose)
Gia_Man_t * Gia_ManDupToBarBufs(Gia_Man_t *p, int nBarBufs)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static int Gia_ManObjNum(Gia_Man_t *p)
Gia_Man_t * Gia_ManFromAigChoices(Aig_Man_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Gia_ManCoNum(Gia_Man_t *p)
static int Gia_ManRegNum(Gia_Man_t *p)