34static inline unsigned Fpga_HashKey2(
Fpga_Node_t * p0,
Fpga_Node_t * p1,
int TableSize ) {
return (
unsigned)(((ABC_PTRUINT_T)(p0) + (ABC_PTRUINT_T)(p1) * 12582917) % TableSize); }
172 p->nVarsMax =
p->pLutLib->LutMax;
173 p->fVerbose = fVerbose;
174 p->fAreaRecovery = 1;
175 p->fEpsilon = (float)0.001;
177 Fpga_TableCreate(
p );
194 p->nInputs = nInputs;
196 for ( i = 0; i < nInputs; i++ )
200 p->nOutputs = nOutputs;
277 if (
p->time1 ) {
ABC_PRT(
"time1",
p->time1 ); }
278 if (
p->time2 ) {
ABC_PRT(
"time2",
p->time2 ); }
305 pNode->
Num =
p->nNodes++;
309 if ( pNode->
Num >= 0 )
316#ifdef FPGA_ALLOCATE_FANOUT
345 pMan->
nBins = Abc_PrimeCudd(50000);
388 pEnt = p1, p1 = p2, p2 = pEnt;
390 Key = Fpga_HashKey2( p1, p2, pMan->
nBins );
391 for ( pEnt = pMan->
pBins[Key]; pEnt; pEnt = pEnt->
pNext )
392 if ( pEnt->
p1 == p1 && pEnt->
p2 == p2 )
397 Fpga_TableResize( pMan );
398 Key = Fpga_HashKey2( p1, p2, pMan->
nBins );
404 pMan->
pBins[Key] = pEnt;
424 int nBinsNew, Counter, i;
430 nBinsNew = Abc_PrimeCudd(2 * pMan->
nBins);
436 for ( i = 0; i < pMan->
nBins; i++ )
437 for ( pEnt = pMan->
pBins[i], pEnt2 = pEnt? pEnt->
pNext: NULL; pEnt;
438 pEnt = pEnt2, pEnt2 = pEnt? pEnt->
pNext: NULL )
440 Key = Fpga_HashKey2( pEnt->
p1, pEnt->
p2, nBinsNew );
441 pEnt->
pNext = pBinsNew[Key];
442 pBinsNew[Key] = pEnt;
453 pMan->
pBins = pBinsNew;
454 pMan->
nBins = nBinsNew;
473 pNode = Fpga_TableLookup(
p, p1, p2 );
525 pAnd1 = Fpga_TableLookup(
p, pC, pT );
526 pAnd2 = Fpga_TableLookup(
p,
Fpga_Not(pC), pE );
547 pNodeOld->
pNextE = pNodeNew;
548 pNodeNew->
pRepr = pNodeOld;
567 pTable = fopen(
"stats.txt",
"a+" );
568 fprintf( pTable,
"%s ",
p->pFileName );
569 fprintf( pTable,
"%4d ",
p->nInputs -
p->nLatches );
570 fprintf( pTable,
"%4d ",
p->nOutputs -
p->nLatches );
571 fprintf( pTable,
"%4d ",
p->nLatches );
572 fprintf( pTable,
"%7d ",
p->vAnds->nSize );
574 fprintf( pTable,
"%2d\n", (
int)
p->fRequiredGlo );
#define ABC_ALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL void * Abc_FrameReadLibLut()
void Fpga_NodeSetData1(Fpga_Node_t *p, Fpga_Node_t *pNode)
void Fpga_ManFree(Fpga_Man_t *p)
void Fpga_ManSetAreaLimit(Fpga_Man_t *p, float AreaLimit)
Fpga_Node_t * Fpga_NodeMux(Fpga_Man_t *p, Fpga_Node_t *pC, Fpga_Node_t *pT, Fpga_Node_t *pE)
int Fpga_NodeIsConst(Fpga_Node_t *p)
Fpga_Node_t * Fpga_ManReadConst1(Fpga_Man_t *p)
Fpga_NodeVec_t * Fpga_ManReadMapping(Fpga_Man_t *p)
void Fpga_ManSetDelayLimit(Fpga_Man_t *p, float DelayLimit)
Fpga_Cut_t * Fpga_NodeReadCutBest(Fpga_Node_t *p)
int Fpga_CutReadLeavesNum(Fpga_Cut_t *p)
int Fpga_ManReadOutputNum(Fpga_Man_t *p)
Fpga_Node_t * Fpga_NodeReadOne(Fpga_Node_t *p)
int Fpga_LibReadLutMax(Fpga_LutLib_t *pLib)
char * Fpga_NodeReadData0(Fpga_Node_t *p)
void Fpga_ManSetName(Fpga_Man_t *p, char *pFileName)
Fpga_Node_t ** Fpga_CutReadLeaves(Fpga_Cut_t *p)
Fpga_Node_t * Fpga_NodeCreate(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
void Fpga_ManSetDelayTarget(Fpga_Man_t *p, float DelayTarget)
void Fpga_ManSetVerbose(Fpga_Man_t *p, int fVerbose)
float * Fpga_ManReadInputArrivals(Fpga_Man_t *p)
int Fpga_NodeComparePhase(Fpga_Node_t *p1, Fpga_Node_t *p2)
Fpga_Node_t ** Fpga_ManReadInputs(Fpga_Man_t *p)
void Fpga_NodeSetRepr(Fpga_Node_t *p, Fpga_Node_t *pRepr)
int Fpga_NodeReadRefs(Fpga_Node_t *p)
float * Fpga_ManReadLutAreas(Fpga_Man_t *p)
void Fpga_ManSetInputArrivals(Fpga_Man_t *p, float *pArrivals)
Fpga_Cut_t * Fpga_NodeReadCuts(Fpga_Node_t *p)
Fpga_Node_t ** Fpga_ManReadOutputs(Fpga_Man_t *p)
void Fpga_NodeSetNextE(Fpga_Node_t *p, Fpga_Node_t *pNextE)
void Fpga_ManSetOutputNames(Fpga_Man_t *p, char **ppNames)
Fpga_Node_t * Fpga_NodeReadData1(Fpga_Node_t *p)
void Fpga_ManSetChoiceNodeNum(Fpga_Man_t *p, int nChoiceNodes)
void Fpga_ManSetSwitching(Fpga_Man_t *p, int fSwitching)
void Fpga_ManSetChoiceNum(Fpga_Man_t *p, int nChoices)
Fpga_Node_t * Fpga_NodeReadTwo(Fpga_Node_t *p)
int Fpga_ManReadVerbose(Fpga_Man_t *p)
int Fpga_NodeReadLevel(Fpga_Node_t *p)
int Fpga_ManReadInputNum(Fpga_Man_t *p)
FUNCTION DEFINITIONS ///.
Fpga_Node_t * Fpga_NodeOr(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
void Fpga_ManSetAreaRecovery(Fpga_Man_t *p, int fAreaRecovery)
void Fpga_NodeSetData0(Fpga_Node_t *p, char *pData)
void Fpga_ManStats(Fpga_Man_t *p)
int Fpga_NodeIsAnd(Fpga_Node_t *p)
void Fpga_NodeSetChoice(Fpga_Man_t *pMan, Fpga_Node_t *pNodeOld, Fpga_Node_t *pNodeNew)
Fpga_Man_t * Fpga_ManCreate(int nInputs, int nOutputs, int fVerbose)
FUNCTION DEFINITIONS ///.
void Fpga_ManSetLatchPaths(Fpga_Man_t *p, int fLatchPaths)
int Fpga_NodeIsVar(Fpga_Node_t *p)
int Fpga_ManReadVarMax(Fpga_Man_t *p)
void Fpga_NodeSetSwitching(Fpga_Node_t *p, float Switching)
void Fpga_ManPrintTimeStats(Fpga_Man_t *p)
Fpga_Node_t * Fpga_NodeExor(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
void Fpga_ManSetLatchNum(Fpga_Man_t *p, int nLatches)
Fpga_Node_t * Fpga_NodeAnd(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
int Fpga_NodeReadNum(Fpga_Node_t *p)
int Fpga_CutCountAll(Fpga_Man_t *pMan)
#define FPGA_NUM_BYTES(n)
Fpga_NodeVec_t * Fpga_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Fpga_NodeAddFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanout)
void Fpga_NodeVecFree(Fpga_NodeVec_t *p)
void Fpga_NodeVecPush(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
#define Fpga_NodeIsSimComplement(p)
struct Fpga_NodeStruct_t_ Fpga_Node_t
struct Fpga_NodeVecStruct_t_ Fpga_NodeVec_t
struct Fpga_ManStruct_t_ Fpga_Man_t
STRUCTURE DEFINITIONS ///.
Fpga_Node_t * Fpga_NodeCreate(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
struct Fpga_LutLibStruct_t_ Fpga_LutLib_t
struct Fpga_CutStruct_t_ Fpga_Cut_t
#define Fpga_IsComplement(p)
GLOBAL VARIABLES ///.