ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
fpga.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FPGA_MAX_LUTSIZE   32
 INCLUDES ///.
 
#define Fpga_IsComplement(p)
 GLOBAL VARIABLES ///.
 
#define Fpga_Regular(p)
 
#define Fpga_Not(p)
 
#define Fpga_NotCond(p, c)
 
#define Fpga_Ref(p)
 
#define Fpga_Deref(p)
 
#define Fpga_RecursiveDeref(p, c)
 

Typedefs

typedef struct Fpga_ManStruct_t_ Fpga_Man_t
 STRUCTURE DEFINITIONS ///.
 
typedef struct Fpga_NodeStruct_t_ Fpga_Node_t
 
typedef struct Fpga_NodeVecStruct_t_ Fpga_NodeVec_t
 
typedef struct Fpga_CutStruct_t_ Fpga_Cut_t
 
typedef struct Fpga_LutLibStruct_t_ Fpga_LutLib_t
 

Functions

Fpga_Man_tFpga_ManCreate (int nInputs, int nOutputs, int fVerbose)
 FUNCTION DEFINITIONS ///.
 
Fpga_Node_tFpga_NodeCreate (Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
 
void Fpga_ManFree (Fpga_Man_t *pMan)
 
void Fpga_ManPrintTimeStats (Fpga_Man_t *p)
 
int Fpga_ManReadInputNum (Fpga_Man_t *p)
 FUNCTION DEFINITIONS ///.
 
int Fpga_ManReadOutputNum (Fpga_Man_t *p)
 
Fpga_Node_t ** Fpga_ManReadInputs (Fpga_Man_t *p)
 
Fpga_Node_t ** Fpga_ManReadOutputs (Fpga_Man_t *p)
 
Fpga_Node_tFpga_ManReadConst1 (Fpga_Man_t *p)
 
float * Fpga_ManReadInputArrivals (Fpga_Man_t *p)
 
int Fpga_ManReadVerbose (Fpga_Man_t *p)
 
int Fpga_ManReadVarMax (Fpga_Man_t *p)
 
float * Fpga_ManReadLutAreas (Fpga_Man_t *p)
 
Fpga_NodeVec_tFpga_ManReadMapping (Fpga_Man_t *p)
 
void Fpga_ManSetOutputNames (Fpga_Man_t *p, char **ppNames)
 
void Fpga_ManSetInputArrivals (Fpga_Man_t *p, float *pArrivals)
 
void Fpga_ManSetAreaRecovery (Fpga_Man_t *p, int fAreaRecovery)
 
void Fpga_ManSetDelayLimit (Fpga_Man_t *p, float DelayLimit)
 
void Fpga_ManSetAreaLimit (Fpga_Man_t *p, float AreaLimit)
 
void Fpga_ManSetObeyFanoutLimits (Fpga_Man_t *p, int fObeyFanoutLimits)
 
void Fpga_ManSetNumIterations (Fpga_Man_t *p, int nNumIterations)
 
int Fpga_ManReadFanoutViolations (Fpga_Man_t *p)
 
void Fpga_ManSetFanoutViolations (Fpga_Man_t *p, int nVio)
 
void Fpga_ManSetChoiceNodeNum (Fpga_Man_t *p, int nChoiceNodes)
 
void Fpga_ManSetChoiceNum (Fpga_Man_t *p, int nChoices)
 
void Fpga_ManSetVerbose (Fpga_Man_t *p, int fVerbose)
 
void Fpga_ManSetSwitching (Fpga_Man_t *p, int fSwitching)
 
void Fpga_ManSetLatchPaths (Fpga_Man_t *p, int fLatchPaths)
 
void Fpga_ManSetLatchNum (Fpga_Man_t *p, int nLatches)
 
void Fpga_ManSetDelayTarget (Fpga_Man_t *p, float DelayTarget)
 
void Fpga_ManSetName (Fpga_Man_t *p, char *pFileName)
 
int Fpga_LibReadLutMax (Fpga_LutLib_t *pLib)
 
char * Fpga_NodeReadData0 (Fpga_Node_t *p)
 
Fpga_Node_tFpga_NodeReadData1 (Fpga_Node_t *p)
 
int Fpga_NodeReadRefs (Fpga_Node_t *p)
 
int Fpga_NodeReadNum (Fpga_Node_t *p)
 
int Fpga_NodeReadLevel (Fpga_Node_t *p)
 
Fpga_Cut_tFpga_NodeReadCuts (Fpga_Node_t *p)
 
Fpga_Cut_tFpga_NodeReadCutBest (Fpga_Node_t *p)
 
Fpga_Node_tFpga_NodeReadOne (Fpga_Node_t *p)
 
Fpga_Node_tFpga_NodeReadTwo (Fpga_Node_t *p)
 
void Fpga_NodeSetLevel (Fpga_Node_t *p, Fpga_Node_t *pNode)
 
void Fpga_NodeSetData0 (Fpga_Node_t *p, char *pData)
 
void Fpga_NodeSetData1 (Fpga_Node_t *p, Fpga_Node_t *pNode)
 
void Fpga_NodeSetArrival (Fpga_Node_t *p, float Time)
 
void Fpga_NodeSetNextE (Fpga_Node_t *p, Fpga_Node_t *pNextE)
 
void Fpga_NodeSetRepr (Fpga_Node_t *p, Fpga_Node_t *pRepr)
 
void Fpga_NodeSetSwitching (Fpga_Node_t *p, float Switching)
 
int Fpga_NodeIsConst (Fpga_Node_t *p)
 
int Fpga_NodeIsVar (Fpga_Node_t *p)
 
int Fpga_NodeIsAnd (Fpga_Node_t *p)
 
int Fpga_NodeComparePhase (Fpga_Node_t *p1, Fpga_Node_t *p2)
 
int Fpga_CutReadLeavesNum (Fpga_Cut_t *p)
 
Fpga_Node_t ** Fpga_CutReadLeaves (Fpga_Cut_t *p)
 
Fpga_Node_tFpga_NodeAnd (Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
 
Fpga_Node_tFpga_NodeOr (Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
 
Fpga_Node_tFpga_NodeExor (Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
 
Fpga_Node_tFpga_NodeMux (Fpga_Man_t *p, Fpga_Node_t *pNode, Fpga_Node_t *pNodeT, Fpga_Node_t *pNodeE)
 
void Fpga_NodeSetChoice (Fpga_Man_t *pMan, Fpga_Node_t *pNodeOld, Fpga_Node_t *pNodeNew)
 
void Fpga_ManStats (Fpga_Man_t *p)
 
int Fpga_Mapping (Fpga_Man_t *p)
 FUNCTION DEFINITIONS ///.
 
void Fpga_MappingCreatePiCuts (Fpga_Man_t *p)
 
void Fpga_CutsCleanSign (Fpga_Man_t *pMan)
 
void Fpga_CutsCleanRoot (Fpga_Man_t *pMan)
 
void Fpga_CutCreateFromNode (Fpga_Man_t *p, int iRoot, int *pLeaves, int nLeaves)
 
void Fpga_MappingSetUsedCuts (Fpga_Man_t *p)
 
Fpga_LutLib_tFpga_LutLibDup (Fpga_LutLib_t *p)
 
int Fpga_LutLibReadVarMax (Fpga_LutLib_t *p)
 DECLARATIONS ///.
 
float * Fpga_LutLibReadLutAreas (Fpga_LutLib_t *p)
 
float * Fpga_LutLibReadLutDelays (Fpga_LutLib_t *p)
 
float Fpga_LutLibReadLutArea (Fpga_LutLib_t *p, int Size)
 
float Fpga_LutLibReadLutDelay (Fpga_LutLib_t *p, int Size)
 
void * Fpga_TruthsCutBdd (void *dd, Fpga_Cut_t *pCut)
 
int Fpga_CutVolume (Fpga_Cut_t *pCut)
 
int Fpga_ManCheckConsistency (Fpga_Man_t *p)
 
void Fpga_ManCleanData0 (Fpga_Man_t *pMan)
 
Fpga_NodeVec_tFpga_CollectNodeTfo (Fpga_Man_t *pMan, Fpga_Node_t *pNode)
 
void Fpga_SetSimpleLutLib (int nLutSize)
 

Macro Definition Documentation

◆ Fpga_Deref

#define Fpga_Deref ( p)

Definition at line 63 of file fpga.h.

◆ Fpga_IsComplement

#define Fpga_IsComplement ( p)
Value:
(((int)((ABC_PTRUINT_T) (p) & 01)))
Cube * p
Definition exorList.c:222

GLOBAL VARIABLES ///.

MACRO DEFINITIONS ///

Definition at line 57 of file fpga.h.

◆ FPGA_MAX_LUTSIZE

#define FPGA_MAX_LUTSIZE   32

INCLUDES ///.

CFile****************************************************************

FileName [fpga.h]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Technology mapping for variable-size-LUT FPGAs.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 2.0. Started - August 18, 2004.]

Revision [

Id
fpga.h,v 1.7 2004/09/30 21:18:09 satrajit Exp

] PARAMETERS ///

Definition at line 37 of file fpga.h.

◆ Fpga_Not

#define Fpga_Not ( p)
Value:
((Fpga_Node_t *)((ABC_PTRUINT_T)(p) ^ 01))
struct Fpga_NodeStruct_t_ Fpga_Node_t
Definition fpga.h:44

Definition at line 59 of file fpga.h.

◆ Fpga_NotCond

#define Fpga_NotCond ( p,
c )
Value:
((Fpga_Node_t *)((ABC_PTRUINT_T)(p) ^ (c)))

Definition at line 60 of file fpga.h.

◆ Fpga_RecursiveDeref

#define Fpga_RecursiveDeref ( p,
c )

Definition at line 64 of file fpga.h.

◆ Fpga_Ref

#define Fpga_Ref ( p)

Definition at line 62 of file fpga.h.

◆ Fpga_Regular

#define Fpga_Regular ( p)
Value:
((Fpga_Node_t *)((ABC_PTRUINT_T)(p) & ~01))

Definition at line 58 of file fpga.h.

Typedef Documentation

◆ Fpga_Cut_t

typedef struct Fpga_CutStruct_t_ Fpga_Cut_t

Definition at line 46 of file fpga.h.

◆ Fpga_LutLib_t

Definition at line 47 of file fpga.h.

◆ Fpga_Man_t

typedef struct Fpga_ManStruct_t_ Fpga_Man_t

STRUCTURE DEFINITIONS ///.

Definition at line 43 of file fpga.h.

◆ Fpga_Node_t

Definition at line 44 of file fpga.h.

◆ Fpga_NodeVec_t

Definition at line 45 of file fpga.h.

Function Documentation

◆ Fpga_CollectNodeTfo()

Fpga_NodeVec_t * Fpga_CollectNodeTfo ( Fpga_Man_t * pMan,
Fpga_Node_t * pNode )
extern

Function*************************************************************

Synopsis [Collects the TFO of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 675 of file fpgaUtils.c.

676{
677 Fpga_NodeVec_t * vVisited, * vTfo;
678 int i;
679 // perform the traversal
680 vVisited = Fpga_NodeVecAlloc( 100 );
681 vTfo = Fpga_NodeVecAlloc( 100 );
682 for ( i = 0; i < pMan->nOutputs; i++ )
683 Fpga_CollectNodeTfo_rec( Fpga_Regular(pMan->pOutputs[i]), pNode, vVisited, vTfo );
684 for ( i = 0; i < vVisited->nSize; i++ )
685 vVisited->pArray[i]->fMark0 = vVisited->pArray[i]->fMark1 = 0;
686 Fpga_NodeVecFree( vVisited );
687 return vTfo;
688}
Fpga_NodeVec_t * Fpga_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition fpgaVec.c:45
void Fpga_NodeVecFree(Fpga_NodeVec_t *p)
Definition fpgaVec.c:68
struct Fpga_NodeVecStruct_t_ Fpga_NodeVec_t
Definition fpga.h:45
#define Fpga_Regular(p)
Definition fpga.h:58
Fpga_Node_t ** pOutputs
Definition fpgaInt.h:106
unsigned fMark1
Definition fpgaInt.h:190
unsigned fMark0
Definition fpgaInt.h:189
Fpga_Node_t ** pArray
Definition fpgaInt.h:252
Here is the call graph for this function:

◆ Fpga_CutCreateFromNode()

void Fpga_CutCreateFromNode ( Fpga_Man_t * p,
int iRoot,
int * pLeaves,
int nLeaves )
extern

◆ Fpga_CutReadLeaves()

Fpga_Node_t ** Fpga_CutReadLeaves ( Fpga_Cut_t * p)
extern

Definition at line 142 of file fpgaCreate.c.

142{ return p->ppLeaves; }

◆ Fpga_CutReadLeavesNum()

int Fpga_CutReadLeavesNum ( Fpga_Cut_t * p)
extern

Function*************************************************************

Synopsis [Reads parameters from the cut.]

Description []

SideEffects []

SeeAlso []

Definition at line 141 of file fpgaCreate.c.

141{ return p->nLeaves; }

◆ Fpga_CutsCleanRoot()

void Fpga_CutsCleanRoot ( Fpga_Man_t * pMan)
extern

Function*************************************************************

Synopsis [Clean the signatures.]

Description []

SideEffects []

SeeAlso []

Definition at line 819 of file fpgaCut.c.

820{
821 Fpga_Node_t * pNode;
822 Fpga_Cut_t * pCut;
823 int i;
824 for ( i = 0; i < pMan->nBins; i++ )
825 for ( pNode = pMan->pBins[i]; pNode; pNode = pNode->pNext )
826 for ( pCut = pNode->pCuts; pCut; pCut = pCut->pNext )
827 pCut->pRoot = NULL;
828}
struct Fpga_CutStruct_t_ Fpga_Cut_t
Definition fpga.h:46
Fpga_Node_t * pRoot
Definition fpgaInt.h:236
Fpga_Cut_t * pNext
Definition fpgaInt.h:246
Fpga_Node_t ** pBins
Definition fpgaInt.h:102
Fpga_Cut_t * pCuts
Definition fpgaInt.h:224
Fpga_Node_t * pNext
Definition fpgaInt.h:183

◆ Fpga_CutsCleanSign()

void Fpga_CutsCleanSign ( Fpga_Man_t * pMan)
extern

Function*************************************************************

Synopsis [Clean the signatures.]

Description []

SideEffects []

SeeAlso []

Definition at line 797 of file fpgaCut.c.

798{
799 Fpga_Node_t * pNode;
800 Fpga_Cut_t * pCut;
801 int i;
802 for ( i = 0; i < pMan->nBins; i++ )
803 for ( pNode = pMan->pBins[i]; pNode; pNode = pNode->pNext )
804 for ( pCut = pNode->pCuts; pCut; pCut = pCut->pNext )
805 pCut->uSign = 0;
806}
unsigned uSign
Definition fpgaInt.h:239

◆ Fpga_CutVolume()

int Fpga_CutVolume ( Fpga_Cut_t * pCut)
extern

Function*************************************************************

Synopsis [Derives the truth table for one cut.]

Description []

SideEffects []

SeeAlso []

Definition at line 140 of file fpgaTruth.c.

141{
142 Fpga_NodeVec_t * vVisited;
143 int Volume, i;
144 assert( pCut->nLeaves > 1 );
145 // set the leaf variables
146 for ( i = 0; i < pCut->nLeaves; i++ )
147 pCut->ppLeaves[i]->pCuts->fMark = 1;
148 // recursively compute the function
149 vVisited = Fpga_NodeVecAlloc( 10 );
150 Fpga_CutVolume_rec( pCut, vVisited );
151 // clean the marks
152 for ( i = 0; i < pCut->nLeaves; i++ )
153 pCut->ppLeaves[i]->pCuts->fMark = 0;
154 for ( i = 0; i < vVisited->nSize; i++ )
155 {
156 pCut = (Fpga_Cut_t *)vVisited->pArray[i];
157 pCut->fMark = 0;
158 }
159 Volume = vVisited->nSize;
160 printf( "%d ", Volume );
161 Fpga_NodeVecFree( vVisited );
162 return Volume;
163}
void Fpga_CutVolume_rec(Fpga_Cut_t *pCut, Fpga_NodeVec_t *vVisited)
Definition fpgaTruth.c:118
Fpga_Node_t * ppLeaves[FPGA_MAX_LEAVES+1]
Definition fpgaInt.h:237
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:

◆ Fpga_LibReadLutMax()

int Fpga_LibReadLutMax ( Fpga_LutLib_t * pLib)
extern

Function*************************************************************

Synopsis [Reads the parameters of the LUT library.]

Description []

SideEffects []

SeeAlso []

Definition at line 86 of file fpgaCreate.c.

86{ return pLib->LutMax; }

◆ Fpga_LutLibDup()

Fpga_LutLib_t * Fpga_LutLibDup ( Fpga_LutLib_t * p)
extern

Function*************************************************************

Synopsis [Duplicates the LUT library.]

Description []

SideEffects []

SeeAlso []

Definition at line 165 of file fpgaLib.c.

166{
167 Fpga_LutLib_t * pNew;
168 pNew = ABC_ALLOC( Fpga_LutLib_t, 1 );
169 *pNew = *p;
170 pNew->pName = Extra_UtilStrsav( pNew->pName );
171 return pNew;
172}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
char * Extra_UtilStrsav(const char *s)
struct Fpga_LutLibStruct_t_ Fpga_LutLib_t
Definition fpga.h:47
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fpga_LutLibReadLutArea()

float Fpga_LutLibReadLutArea ( Fpga_LutLib_t * p,
int Size )
extern

Definition at line 45 of file fpgaLib.c.

45{ assert( Size <= p->LutMax ); return p->pLutAreas[Size]; }

◆ Fpga_LutLibReadLutAreas()

float * Fpga_LutLibReadLutAreas ( Fpga_LutLib_t * p)
extern

Definition at line 44 of file fpgaLib.c.

44{ return p->pLutAreas; }

◆ Fpga_LutLibReadLutDelay()

float Fpga_LutLibReadLutDelay ( Fpga_LutLib_t * p,
int Size )
extern

◆ Fpga_LutLibReadLutDelays()

float * Fpga_LutLibReadLutDelays ( Fpga_LutLib_t * p)
extern

◆ Fpga_LutLibReadVarMax()

int Fpga_LutLibReadVarMax ( Fpga_LutLib_t * p)
extern

DECLARATIONS ///.

CFile****************************************************************

FileName [fpgaLib.c]

PackageName [MVSIS 1.3: Multi-valued logic synthesis system.]

Synopsis [Technology mapping for variable-size-LUT FPGAs.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 2.0. Started - August 18, 2004.]

Revision [

Id
fpgaLib.c,v 1.4 2005/01/23 06:59:41 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [APIs to access LUT library.]

Description []

SideEffects []

SeeAlso []

Definition at line 43 of file fpgaLib.c.

43{ return p->LutMax; }

◆ Fpga_ManCheckConsistency()

int Fpga_ManCheckConsistency ( Fpga_Man_t * p)
extern

Function*************************************************************

Synopsis [Verify one useful property.]

Description [This procedure verifies one useful property. After the FRAIG construction with choice nodes is over, each primary node should have fanins that are primary nodes. The primary nodes is the one that does not have pNode->pRepr set to point to another node.]

SideEffects []

SeeAlso []

Definition at line 500 of file fpgaUtils.c.

501{
502 Fpga_Node_t * pNode;
503 Fpga_NodeVec_t * pVec;
504 int i;
505 pVec = Fpga_MappingDfs( p, 0 );
506 for ( i = 0; i < pVec->nSize; i++ )
507 {
508 pNode = pVec->pArray[i];
509 if ( Fpga_NodeIsVar(pNode) )
510 {
511 if ( pNode->pRepr )
512 printf( "Primary input %d is a secondary node.\n", pNode->Num );
513 }
514 else if ( Fpga_NodeIsConst(pNode) )
515 {
516 if ( pNode->pRepr )
517 printf( "Constant 1 %d is a secondary node.\n", pNode->Num );
518 }
519 else
520 {
521 if ( pNode->pRepr )
522 printf( "Internal node %d is a secondary node.\n", pNode->Num );
523 if ( Fpga_Regular(pNode->p1)->pRepr )
524 printf( "Internal node %d has first fanin that is a secondary node.\n", pNode->Num );
525 if ( Fpga_Regular(pNode->p2)->pRepr )
526 printf( "Internal node %d has second fanin that is a secondary node.\n", pNode->Num );
527 }
528 }
529 Fpga_NodeVecFree( pVec );
530 return 1;
531}
Fpga_NodeVec_t * Fpga_MappingDfs(Fpga_Man_t *pMan, int fCollectEquiv)
FUNCTION DEFINITIONS ///.
Definition fpgaUtils.c:54
int Fpga_NodeIsConst(Fpga_Node_t *p)
Definition fpgaCreate.c:125
int Fpga_NodeIsVar(Fpga_Node_t *p)
Definition fpgaCreate.c:126
Fpga_Node_t * pRepr
Definition fpgaInt.h:203
Fpga_Node_t * p1
Definition fpgaInt.h:200
Fpga_Node_t * p2
Definition fpgaInt.h:201
Here is the call graph for this function:

◆ Fpga_ManCleanData0()

void Fpga_ManCleanData0 ( Fpga_Man_t * pMan)
extern

Function*************************************************************

Synopsis [Computes the limited DFS ordering for one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 657 of file fpgaUtils.c.

658{
659 int i;
660 for ( i = 0; i < pMan->vNodesAll->nSize; i++ )
661 pMan->vNodesAll->pArray[i]->pData0 = 0;
662}
Fpga_NodeVec_t * vNodesAll
Definition fpgaInt.h:111

◆ Fpga_ManCreate()

Fpga_Man_t * Fpga_ManCreate ( int nInputs,
int nOutputs,
int fVerbose )
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Create the mapping manager.]

Description [The number of inputs and outputs is assumed to be known is advance. It is much simpler to have them fixed upfront. When it comes to representing the object graph in the form of AIG, the resulting manager is similar to the regular AIG manager, except that it does not use reference counting (and therefore does not have garbage collections). It does have table resizing. The data structure is more flexible to represent additional information needed for mapping.]

SideEffects []

SeeAlso []

Definition at line 163 of file fpgaCreate.c.

164{
165 Fpga_Man_t * p;
166 int i;
167
168 // start the manager
169 p = ABC_ALLOC( Fpga_Man_t, 1 );
170 memset( p, 0, sizeof(Fpga_Man_t) );
171 p->pLutLib = (Fpga_LutLib_t *)Abc_FrameReadLibLut();
172 p->nVarsMax = p->pLutLib->LutMax;
173 p->fVerbose = fVerbose;
174 p->fAreaRecovery = 1;
175 p->fEpsilon = (float)0.001;
176
177 Fpga_TableCreate( p );
178//if ( p->fVerbose )
179// printf( "Node = %d (%d) bytes. Cut = %d bytes.\n", sizeof(Fpga_Node_t), FPGA_NUM_BYTES(sizeof(Fpga_Node_t)), sizeof(Fpga_Cut_t) );
180 p->mmNodes = Extra_MmFixedStart( FPGA_NUM_BYTES(sizeof(Fpga_Node_t)) );
181 p->mmCuts = Extra_MmFixedStart( sizeof(Fpga_Cut_t) );
182
183 assert( p->nVarsMax > 0 );
184// Fpga_MappingSetupTruthTables( p->uTruths );
185
186 // make sure the constant node will get index -1
187 p->nNodes = -1;
188 // create the constant node
189 p->pConst1 = Fpga_NodeCreate( p, NULL, NULL );
190 p->vNodesAll = Fpga_NodeVecAlloc( 1000 );
191 p->vMapping = Fpga_NodeVecAlloc( 1000 );
192
193 // create the PI nodes
194 p->nInputs = nInputs;
195 p->pInputs = ABC_ALLOC( Fpga_Node_t *, nInputs );
196 for ( i = 0; i < nInputs; i++ )
197 p->pInputs[i] = Fpga_NodeCreate( p, NULL, NULL );
198
199 // create the place for the output nodes
200 p->nOutputs = nOutputs;
201 p->pOutputs = ABC_ALLOC( Fpga_Node_t *, nOutputs );
202 memset( p->pOutputs, 0, sizeof(Fpga_Node_t *) * nOutputs );
203 return p;
204}
ABC_DLL void * Abc_FrameReadLibLut()
Definition mainFrame.c:57
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
Fpga_Node_t * Fpga_NodeCreate(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition fpgaCreate.c:293
#define FPGA_NUM_BYTES(n)
Definition fpgaInt.h:58
struct Fpga_ManStruct_t_ Fpga_Man_t
STRUCTURE DEFINITIONS ///.
Definition fpga.h:43
Fpga_Node_t * Fpga_NodeCreate(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition fpgaCreate.c:293
char * memset()
Here is the call graph for this function:

◆ Fpga_ManFree()

void Fpga_ManFree ( Fpga_Man_t * p)
extern

Function*************************************************************

Synopsis [Deallocates the mapping manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 217 of file fpgaCreate.c.

218{
219// Fpga_ManStats( p );
220// int i;
221// for ( i = 0; i < p->vNodesAll->nSize; i++ )
222// Fpga_NodeVecFree( p->vNodesAll->pArray[i]->vFanouts );
223// Fpga_NodeVecFree( p->pConst1->vFanouts );
224 if ( p->vMapping )
225 Fpga_NodeVecFree( p->vMapping );
226 if ( p->vAnds )
227 Fpga_NodeVecFree( p->vAnds );
228 if ( p->vNodesAll )
229 Fpga_NodeVecFree( p->vNodesAll );
230 Extra_MmFixedStop( p->mmNodes );
231 Extra_MmFixedStop( p->mmCuts );
232 ABC_FREE( p->ppOutputNames );
233 ABC_FREE( p->pInputArrivals );
234 ABC_FREE( p->pInputs );
235 ABC_FREE( p->pOutputs );
236 ABC_FREE( p->pBins );
237 ABC_FREE( p );
238}
#define ABC_FREE(obj)
Definition abc_global.h:267
void Extra_MmFixedStop(Extra_MmFixed_t *p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fpga_ManPrintTimeStats()

void Fpga_ManPrintTimeStats ( Fpga_Man_t * p)
extern

Function*************************************************************

Synopsis [Prints runtime statistics of the mapping manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 252 of file fpgaCreate.c.

253{
254// extern char * pNetName;
255// extern int TotalLuts;
256// FILE * pTable;
257
258
259/*
260 pTable = fopen( "stats.txt", "a+" );
261 fprintf( pTable, "%s ", pNetName );
262 fprintf( pTable, "%.0f ", p->fRequiredGlo );
263// fprintf( pTable, "%.0f ", p->fAreaGlo );//+ (float)nOutputInvs );
264 fprintf( pTable, "%.0f ", (float)TotalLuts );
265 fprintf( pTable, "%4.2f\n", (float)(p->timeTotal-p->timeToMap)/(float)(CLOCKS_PER_SEC) );
266 fclose( pTable );
267*/
268
269// printf( "N-canonical = %d. Matchings = %d. ", p->nCanons, p->nMatches );
270// printf( "Choice nodes = %d. Choices = %d.\n", p->nChoiceNodes, p->nChoices );
271 ABC_PRT( "ToMap", p->timeToMap );
272 ABC_PRT( "Cuts ", p->timeCuts );
273 ABC_PRT( "Match", p->timeMatch );
274 ABC_PRT( "Area ", p->timeRecover );
275 ABC_PRT( "ToNet", p->timeToNet );
276 ABC_PRT( "TOTAL", p->timeTotal );
277 if ( p->time1 ) { ABC_PRT( "time1", p->time1 ); }
278 if ( p->time2 ) { ABC_PRT( "time2", p->time2 ); }
279}
#define ABC_PRT(a, t)
Definition abc_global.h:255

◆ Fpga_ManReadConst1()

Fpga_Node_t * Fpga_ManReadConst1 ( Fpga_Man_t * p)
extern

Definition at line 55 of file fpgaCreate.c.

55{ return p->pConst1; }

◆ Fpga_ManReadFanoutViolations()

int Fpga_ManReadFanoutViolations ( Fpga_Man_t * p)
extern

◆ Fpga_ManReadInputArrivals()

float * Fpga_ManReadInputArrivals ( Fpga_Man_t * p)
extern

Definition at line 56 of file fpgaCreate.c.

56{ return p->pInputArrivals;}

◆ Fpga_ManReadInputNum()

int Fpga_ManReadInputNum ( Fpga_Man_t * p)
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Reads parameters of the mapping manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 51 of file fpgaCreate.c.

51{ return p->nInputs; }

◆ Fpga_ManReadInputs()

Fpga_Node_t ** Fpga_ManReadInputs ( Fpga_Man_t * p)
extern

Definition at line 53 of file fpgaCreate.c.

53{ return p->pInputs; }

◆ Fpga_ManReadLutAreas()

float * Fpga_ManReadLutAreas ( Fpga_Man_t * p)
extern

Definition at line 59 of file fpgaCreate.c.

59{ return p->pLutLib->pLutAreas; }

◆ Fpga_ManReadMapping()

Fpga_NodeVec_t * Fpga_ManReadMapping ( Fpga_Man_t * p)
extern

Definition at line 60 of file fpgaCreate.c.

60{ return p->vMapping; }

◆ Fpga_ManReadOutputNum()

int Fpga_ManReadOutputNum ( Fpga_Man_t * p)
extern

Definition at line 52 of file fpgaCreate.c.

52{ return p->nOutputs; }

◆ Fpga_ManReadOutputs()

Fpga_Node_t ** Fpga_ManReadOutputs ( Fpga_Man_t * p)
extern

Definition at line 54 of file fpgaCreate.c.

54{ return p->pOutputs; }

◆ Fpga_ManReadVarMax()

int Fpga_ManReadVarMax ( Fpga_Man_t * p)
extern

Definition at line 58 of file fpgaCreate.c.

58{ return p->pLutLib->LutMax; }

◆ Fpga_ManReadVerbose()

int Fpga_ManReadVerbose ( Fpga_Man_t * p)
extern

Definition at line 57 of file fpgaCreate.c.

57{ return p->fVerbose; }

◆ Fpga_ManSetAreaLimit()

void Fpga_ManSetAreaLimit ( Fpga_Man_t * p,
float AreaLimit )
extern

Definition at line 65 of file fpgaCreate.c.

65{ p->AreaLimit = AreaLimit; }

◆ Fpga_ManSetAreaRecovery()

void Fpga_ManSetAreaRecovery ( Fpga_Man_t * p,
int fAreaRecovery )
extern

Definition at line 63 of file fpgaCreate.c.

63{ p->fAreaRecovery = fAreaRecovery;}

◆ Fpga_ManSetChoiceNodeNum()

void Fpga_ManSetChoiceNodeNum ( Fpga_Man_t * p,
int nChoiceNodes )
extern

Definition at line 66 of file fpgaCreate.c.

66{ p->nChoiceNodes = nChoiceNodes; }

◆ Fpga_ManSetChoiceNum()

void Fpga_ManSetChoiceNum ( Fpga_Man_t * p,
int nChoices )
extern

Definition at line 67 of file fpgaCreate.c.

67{ p->nChoices = nChoices; }

◆ Fpga_ManSetDelayLimit()

void Fpga_ManSetDelayLimit ( Fpga_Man_t * p,
float DelayLimit )
extern

Definition at line 64 of file fpgaCreate.c.

64{ p->DelayLimit = DelayLimit; }

◆ Fpga_ManSetDelayTarget()

void Fpga_ManSetDelayTarget ( Fpga_Man_t * p,
float DelayTarget )
extern

Definition at line 72 of file fpgaCreate.c.

72{ p->DelayTarget = DelayTarget; }
Here is the caller graph for this function:

◆ Fpga_ManSetFanoutViolations()

void Fpga_ManSetFanoutViolations ( Fpga_Man_t * p,
int nVio )
extern

◆ Fpga_ManSetInputArrivals()

void Fpga_ManSetInputArrivals ( Fpga_Man_t * p,
float * pArrivals )
extern

Definition at line 62 of file fpgaCreate.c.

62{ p->pInputArrivals = pArrivals; }

◆ Fpga_ManSetLatchNum()

void Fpga_ManSetLatchNum ( Fpga_Man_t * p,
int nLatches )
extern

Definition at line 71 of file fpgaCreate.c.

71{ p->nLatches = nLatches; }
Here is the caller graph for this function:

◆ Fpga_ManSetLatchPaths()

void Fpga_ManSetLatchPaths ( Fpga_Man_t * p,
int fLatchPaths )
extern

Definition at line 70 of file fpgaCreate.c.

70{ p->fLatchPaths = fLatchPaths; }
Here is the caller graph for this function:

◆ Fpga_ManSetName()

void Fpga_ManSetName ( Fpga_Man_t * p,
char * pFileName )
extern

Definition at line 73 of file fpgaCreate.c.

73{ p->pFileName = pFileName; }

◆ Fpga_ManSetNumIterations()

void Fpga_ManSetNumIterations ( Fpga_Man_t * p,
int nNumIterations )
extern

◆ Fpga_ManSetObeyFanoutLimits()

void Fpga_ManSetObeyFanoutLimits ( Fpga_Man_t * p,
int fObeyFanoutLimits )
extern

◆ Fpga_ManSetOutputNames()

void Fpga_ManSetOutputNames ( Fpga_Man_t * p,
char ** ppNames )
extern

Definition at line 61 of file fpgaCreate.c.

61{ p->ppOutputNames = ppNames; }

◆ Fpga_ManSetSwitching()

void Fpga_ManSetSwitching ( Fpga_Man_t * p,
int fSwitching )
extern

Definition at line 69 of file fpgaCreate.c.

69{ p->fSwitching = fSwitching; }
Here is the caller graph for this function:

◆ Fpga_ManSetVerbose()

void Fpga_ManSetVerbose ( Fpga_Man_t * p,
int fVerbose )
extern

Definition at line 68 of file fpgaCreate.c.

68{ p->fVerbose = fVerbose; }

◆ Fpga_ManStats()

void Fpga_ManStats ( Fpga_Man_t * p)
extern

Function*************************************************************

Synopsis [Prints some interesting stats.]

Description []

SideEffects []

SeeAlso []

Definition at line 564 of file fpgaCreate.c.

565{
566 FILE * pTable;
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 );
573 fprintf( pTable, "%7d ", Fpga_CutCountAll(p) );
574 fprintf( pTable, "%2d\n", (int)p->fRequiredGlo );
575 fclose( pTable );
576}
int Fpga_CutCountAll(Fpga_Man_t *pMan)
Definition fpgaCut.c:767
Here is the call graph for this function:

◆ Fpga_Mapping()

int Fpga_Mapping ( Fpga_Man_t * p)
extern

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Performs technology mapping for the given object graph.]

Description [The object graph is stored in the mapping manager. First, all the AND-nodes, which fanout into the POs, are collected in the DFS fashion. Next, three steps are performed: the k-feasible cuts are computed for each node, the truth tables are computed for each cut, and the delay-optimal matches are assigned for each node.]

SideEffects []

SeeAlso []

Definition at line 53 of file fpgaCore.c.

54{
55 clock_t clk, clkTotal = clock();
56
57 // collect the nodes reachable from POs in the DFS order (including the choices)
58 p->vAnds = Fpga_MappingDfs( p, 1 );
59 Fpga_ManReportChoices( p ); // recomputes levels
61
62 // compute the cuts of nodes in the DFS order
63 clk = clock();
65 p->timeCuts = clock() - clk;
66
67 // match the truth tables to the supergates
68 clk = clock();
69 if ( !Fpga_MappingMatches( p, 1 ) )
70 return 0;
71 p->timeMatch = clock() - clk;
72
73 // perform area recovery
74 clk = clock();
75 if ( !Fpga_MappingPostProcess( p ) )
76 return 0;
77 p->timeRecover = clock() - clk;
78//ABC_PRT( "Total mapping time", clock() - clkTotal );
79
80 s_MappingTime = clock() - clkTotal;
81 s_MappingMem = Fpga_CutCountAll(p) * (sizeof(Fpga_Cut_t) - sizeof(int) * (FPGA_MAX_LEAVES - p->nVarsMax));
82
83 // print the AI-graph used for mapping
84 //Fpga_ManShow( p, "test" );
85// if ( p->fVerbose )
86// Fpga_MappingPrintOutputArrivals( p );
87 if ( p->fVerbose )
88 {
89 ABC_PRT( "Total time", clock() - clkTotal );
90 }
91 return 1;
92}
void Fpga_MappingCuts(Fpga_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition fpgaCut.c:130
void Fpga_ManReportChoices(Fpga_Man_t *pMan)
Definition fpgaUtils.c:897
int Fpga_MappingMatches(Fpga_Man_t *p, int fDelayOriented)
FUNCTION DEFINITIONS ///.
Definition fpgaMatch.c:67
void Fpga_MappingSetChoiceLevels(Fpga_Man_t *pMan)
Definition fpgaUtils.c:876
Fpga_NodeVec_t * Fpga_MappingDfs(Fpga_Man_t *pMan, int fCollectEquiv)
FUNCTION DEFINITIONS ///.
Definition fpgaUtils.c:54
#define FPGA_MAX_LEAVES
INCLUDES ///.
Definition fpgaInt.h:52
abctime s_MappingTime
DECLARATIONS ///.
Definition abcPrint.c:47
int s_MappingMem
Definition abcPrint.c:48
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fpga_MappingCreatePiCuts()

void Fpga_MappingCreatePiCuts ( Fpga_Man_t * p)
extern

Function*************************************************************

Synopsis [Performs technology mapping for variable-size-LUTs.]

Description []

SideEffects []

SeeAlso []

Definition at line 181 of file fpgaCut.c.

182{
183 Fpga_Cut_t * pCut;
184 int i;
185
186 // set the elementary cuts for the PI variables
187 for ( i = 0; i < p->nInputs; i++ )
188 {
189 pCut = Fpga_CutAlloc( p );
190 pCut->nLeaves = 1;
191 pCut->ppLeaves[0] = p->pInputs[i];
192 pCut->uSign = (1 << (i%31));
193 p->pInputs[i]->pCuts = pCut;
194 p->pInputs[i]->pCutBest = pCut;
195 // set the input arrival times
196// p->pInputs[i]->pCut[1]->tArrival = p->pInputArrivals[i];
197 }
198}
Fpga_Cut_t * Fpga_CutAlloc(Fpga_Man_t *p)
DECLARATIONS ///.
Here is the call graph for this function:

◆ Fpga_MappingSetUsedCuts()

void Fpga_MappingSetUsedCuts ( Fpga_Man_t * pMan)
extern

Function*************************************************************

Synopsis [Sets the used cuts to be the currently selected ones.]

Description []

SideEffects []

SeeAlso []

Definition at line 459 of file fpgaCutUtils.c.

460{
461 int i;
462 for ( i = 0; i < pMan->vNodesAll->nSize; i++ )
463 if ( pMan->vNodesAll->pArray[i]->pCutOld )
464 {
465 pMan->vNodesAll->pArray[i]->pCutBest = pMan->vNodesAll->pArray[i]->pCutOld;
466 pMan->vNodesAll->pArray[i]->pCutOld = NULL;
467 }
468}
Fpga_Cut_t * pCutBest
Definition fpgaInt.h:222
Fpga_Cut_t * pCutOld
Definition fpgaInt.h:223

◆ Fpga_NodeAnd()

Fpga_Node_t * Fpga_NodeAnd ( Fpga_Man_t * p,
Fpga_Node_t * p1,
Fpga_Node_t * p2 )
extern

Function*************************************************************

Synopsis [Elementary AND operation on the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 470 of file fpgaCreate.c.

471{
472 Fpga_Node_t * pNode;
473 pNode = Fpga_TableLookup( p, p1, p2 );
474 return pNode;
475}

◆ Fpga_NodeComparePhase()

int Fpga_NodeComparePhase ( Fpga_Node_t * p1,
Fpga_Node_t * p2 )
extern

Definition at line 128 of file fpgaCreate.c.

128{ assert( !Fpga_IsComplement(p1) ); assert( !Fpga_IsComplement(p2) ); return p1->fInv ^ p2->fInv; }
#define Fpga_IsComplement(p)
GLOBAL VARIABLES ///.
Definition fpga.h:57

◆ Fpga_NodeCreate()

Fpga_Node_t * Fpga_NodeCreate ( Fpga_Man_t * p,
Fpga_Node_t * p1,
Fpga_Node_t * p2 )
extern

Function*************************************************************

Synopsis [Creates a new node.]

Description [This procedure should be called to create the constant node and the PI nodes first.]

SideEffects []

SeeAlso []

Definition at line 293 of file fpgaCreate.c.

294{
295 Fpga_Node_t * pNode;
296 // create the node
297 pNode = (Fpga_Node_t *)Extra_MmFixedEntryFetch( p->mmNodes );
298 memset( pNode, 0, sizeof(Fpga_Node_t) );
299 // set very large required time
301 pNode->aEstFanouts = -1;
302 pNode->p1 = p1;
303 pNode->p2 = p2;
304 // set the number of this node
305 pNode->Num = p->nNodes++;
306 // place to store the fanouts
307// pNode->vFanouts = Fpga_NodeVecAlloc( 5 );
308 // store this node in the internal array
309 if ( pNode->Num >= 0 )
310 Fpga_NodeVecPush( p->vNodesAll, pNode );
311 else
312 pNode->fInv = 1;
313 // set the level of this node
314 if ( p1 )
315 {
316#ifdef FPGA_ALLOCATE_FANOUT
317 // create the fanout info
320#endif
321 // compute the level
322 pNode->Level = 1 + FPGA_MAX(Fpga_Regular(p1)->Level, Fpga_Regular(p2)->Level);
324 }
325 // reference the inputs
326 if ( p1 ) Fpga_NodeRef(p1);
327 if ( p2 ) Fpga_NodeRef(p2);
328 return pNode;
329}
char * Extra_MmFixedEntryFetch(Extra_MmFixed_t *p)
void Fpga_NodeAddFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanout)
#define FPGA_MAX(a, b)
Definition fpgaInt.h:62
void Fpga_NodeVecPush(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
Definition fpgaVec.c:169
#define Fpga_NodeIsSimComplement(p)
Definition fpgaInt.h:89
#define FPGA_FLOAT_LARGE
Definition fpgaInt.h:65
#define Fpga_NodeRef(p)
Definition fpgaInt.h:86
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fpga_NodeExor()

Fpga_Node_t * Fpga_NodeExor ( Fpga_Man_t * p,
Fpga_Node_t * p1,
Fpga_Node_t * p2 )
extern

Function*************************************************************

Synopsis [Elementary EXOR operation on the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 506 of file fpgaCreate.c.

507{
508 return Fpga_NodeMux( p, p1, Fpga_Not(p2), p2 );
509}
Fpga_Node_t * Fpga_NodeMux(Fpga_Man_t *p, Fpga_Node_t *pC, Fpga_Node_t *pT, Fpga_Node_t *pE)
Definition fpgaCreate.c:522
#define Fpga_Not(p)
Definition fpga.h:59
Here is the call graph for this function:

◆ Fpga_NodeIsAnd()

int Fpga_NodeIsAnd ( Fpga_Node_t * p)
extern

Definition at line 127 of file fpgaCreate.c.

127{ return (Fpga_Regular(p))->p1 != NULL; }
Here is the caller graph for this function:

◆ Fpga_NodeIsConst()

int Fpga_NodeIsConst ( Fpga_Node_t * p)
extern

Function*************************************************************

Synopsis [Checks the type of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 125 of file fpgaCreate.c.

125{ return (Fpga_Regular(p))->Num == -1; }
Here is the caller graph for this function:

◆ Fpga_NodeIsVar()

int Fpga_NodeIsVar ( Fpga_Node_t * p)
extern

Definition at line 126 of file fpgaCreate.c.

126{ return (Fpga_Regular(p))->p1 == NULL && (Fpga_Regular(p))->Num >= 0; }
Here is the caller graph for this function:

◆ Fpga_NodeMux()

Fpga_Node_t * Fpga_NodeMux ( Fpga_Man_t * p,
Fpga_Node_t * pC,
Fpga_Node_t * pT,
Fpga_Node_t * pE )
extern

Function*************************************************************

Synopsis [Elementary MUX operation on the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 522 of file fpgaCreate.c.

523{
524 Fpga_Node_t * pAnd1, * pAnd2, * pRes;
525 pAnd1 = Fpga_TableLookup( p, pC, pT );
526 pAnd2 = Fpga_TableLookup( p, Fpga_Not(pC), pE );
527 pRes = Fpga_NodeOr( p, pAnd1, pAnd2 );
528 return pRes;
529}
Fpga_Node_t * Fpga_NodeOr(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition fpgaCreate.c:488
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fpga_NodeOr()

Fpga_Node_t * Fpga_NodeOr ( Fpga_Man_t * p,
Fpga_Node_t * p1,
Fpga_Node_t * p2 )
extern

Function*************************************************************

Synopsis [Elementary OR operation on the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 488 of file fpgaCreate.c.

489{
490 Fpga_Node_t * pNode;
491 pNode = Fpga_Not( Fpga_TableLookup( p, Fpga_Not(p1), Fpga_Not(p2) ) );
492 return pNode;
493}
Here is the caller graph for this function:

◆ Fpga_NodeReadCutBest()

Fpga_Cut_t * Fpga_NodeReadCutBest ( Fpga_Node_t * p)
extern

Definition at line 105 of file fpgaCreate.c.

105{ return p->pCutBest; }

◆ Fpga_NodeReadCuts()

Fpga_Cut_t * Fpga_NodeReadCuts ( Fpga_Node_t * p)
extern

Definition at line 104 of file fpgaCreate.c.

104{ return p->pCuts; }

◆ Fpga_NodeReadData0()

char * Fpga_NodeReadData0 ( Fpga_Node_t * p)
extern

Function*************************************************************

Synopsis [Reads parameters of the mapping node.]

Description []

SideEffects []

SeeAlso []

Definition at line 99 of file fpgaCreate.c.

99{ return p->pData0; }

◆ Fpga_NodeReadData1()

Fpga_Node_t * Fpga_NodeReadData1 ( Fpga_Node_t * p)
extern

Definition at line 100 of file fpgaCreate.c.

100{ return p->pLevel; }

◆ Fpga_NodeReadLevel()

int Fpga_NodeReadLevel ( Fpga_Node_t * p)
extern

Definition at line 103 of file fpgaCreate.c.

103{ return Fpga_Regular(p)->Level; }

◆ Fpga_NodeReadNum()

int Fpga_NodeReadNum ( Fpga_Node_t * p)
extern

Definition at line 102 of file fpgaCreate.c.

102{ return p->Num; }

◆ Fpga_NodeReadOne()

Fpga_Node_t * Fpga_NodeReadOne ( Fpga_Node_t * p)
extern

Definition at line 106 of file fpgaCreate.c.

106{ return p->p1; }

◆ Fpga_NodeReadRefs()

int Fpga_NodeReadRefs ( Fpga_Node_t * p)
extern

Definition at line 101 of file fpgaCreate.c.

101{ return p->nRefs; }

◆ Fpga_NodeReadTwo()

Fpga_Node_t * Fpga_NodeReadTwo ( Fpga_Node_t * p)
extern

Definition at line 107 of file fpgaCreate.c.

107{ return p->p2; }

◆ Fpga_NodeSetArrival()

void Fpga_NodeSetArrival ( Fpga_Node_t * p,
float Time )
extern

◆ Fpga_NodeSetChoice()

void Fpga_NodeSetChoice ( Fpga_Man_t * pMan,
Fpga_Node_t * pNodeOld,
Fpga_Node_t * pNodeNew )
extern

Function*************************************************************

Synopsis [Sets the node to be equivalent to the given one.]

Description [This procedure is a work-around for the equivalence check. Does not verify the equivalence. Use at the user's risk.]

SideEffects []

SeeAlso []

Definition at line 544 of file fpgaCreate.c.

545{
546 pNodeNew->pNextE = pNodeOld->pNextE;
547 pNodeOld->pNextE = pNodeNew;
548 pNodeNew->pRepr = pNodeOld;
549}
Fpga_Node_t * pNextE
Definition fpgaInt.h:202

◆ Fpga_NodeSetData0()

void Fpga_NodeSetData0 ( Fpga_Node_t * p,
char * pData )
extern

Definition at line 108 of file fpgaCreate.c.

108{ p->pData0 = pData; }

◆ Fpga_NodeSetData1()

void Fpga_NodeSetData1 ( Fpga_Node_t * p,
Fpga_Node_t * pNode )
extern

Definition at line 109 of file fpgaCreate.c.

109{ p->pLevel = pNode; }

◆ Fpga_NodeSetLevel()

void Fpga_NodeSetLevel ( Fpga_Node_t * p,
Fpga_Node_t * pNode )
extern

◆ Fpga_NodeSetNextE()

void Fpga_NodeSetNextE ( Fpga_Node_t * p,
Fpga_Node_t * pNextE )
extern

Definition at line 110 of file fpgaCreate.c.

110{ p->pNextE = pNextE; }

◆ Fpga_NodeSetRepr()

void Fpga_NodeSetRepr ( Fpga_Node_t * p,
Fpga_Node_t * pRepr )
extern

Definition at line 111 of file fpgaCreate.c.

111{ p->pRepr = pRepr; }

◆ Fpga_NodeSetSwitching()

void Fpga_NodeSetSwitching ( Fpga_Node_t * p,
float Switching )
extern

Definition at line 112 of file fpgaCreate.c.

112{ p->Switching = Switching; }

◆ Fpga_SetSimpleLutLib()

void Fpga_SetSimpleLutLib ( int nLutSize)
extern

Function*************************************************************

Synopsis [Sets simple LUT library.]

Description []

SideEffects []

SeeAlso []

Definition at line 252 of file fpga.c.

253{
254 Fpga_LutLib_t s_LutLib10= { "lutlib",10, 0, {0,1,1,1,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1}} };
255 Fpga_LutLib_t s_LutLib9 = { "lutlib", 9, 0, {0,1,1,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1},{1},{1}} };
256 Fpga_LutLib_t s_LutLib8 = { "lutlib", 8, 0, {0,1,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1},{1}} };
257 Fpga_LutLib_t s_LutLib7 = { "lutlib", 7, 0, {0,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1}} };
258 Fpga_LutLib_t s_LutLib6 = { "lutlib", 6, 0, {0,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1}} };
259 Fpga_LutLib_t s_LutLib5 = { "lutlib", 5, 0, {0,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1}} };
260 Fpga_LutLib_t s_LutLib4 = { "lutlib", 4, 0, {0,1,1,1,1}, {{0},{1},{1},{1},{1}} };
261 Fpga_LutLib_t s_LutLib3 = { "lutlib", 3, 0, {0,1,1,1}, {{0},{1},{1},{1}} };
262 Fpga_LutLib_t * pLutLib;
263 assert( nLutSize >= 3 && nLutSize <= 10 );
264 switch ( nLutSize )
265 {
266 case 3: pLutLib = &s_LutLib3; break;
267 case 4: pLutLib = &s_LutLib4; break;
268 case 5: pLutLib = &s_LutLib5; break;
269 case 6: pLutLib = &s_LutLib6; break;
270 case 7: pLutLib = &s_LutLib7; break;
271 case 8: pLutLib = &s_LutLib8; break;
272 case 9: pLutLib = &s_LutLib9; break;
273 case 10: pLutLib = &s_LutLib10; break;
274 default: pLutLib = NULL; break;
275 }
276 if ( pLutLib == NULL )
277 return;
280}
ABC_DLL void Abc_FrameSetLibLut(void *pLib)
Definition mainFrame.c:93
void Fpga_LutLibFree(Fpga_LutLib_t *p)
Definition fpgaLib.c:185
Fpga_LutLib_t * Fpga_LutLibDup(Fpga_LutLib_t *p)
Definition fpgaLib.c:165
Here is the call graph for this function:

◆ Fpga_TruthsCutBdd()

void * Fpga_TruthsCutBdd ( void * dd,
Fpga_Cut_t * pCut )
extern

Function*************************************************************

Synopsis [Derives the truth table for one cut.]

Description []

SideEffects []

SeeAlso []

Definition at line 79 of file fpgaTruth.c.

80{
81 Fpga_NodeVec_t * vVisited;
82 DdNode * bFunc;
83 int i;
84 assert( pCut->nLeaves > 1 );
85 // set the leaf variables
86 for ( i = 0; i < pCut->nLeaves; i++ )
87 pCut->ppLeaves[i]->pCuts->uSign = (unsigned)(ABC_PTRUINT_T)Cudd_bddIthVar( (DdManager *)dd, i );
88 // recursively compute the function
89 vVisited = Fpga_NodeVecAlloc( 10 );
90 bFunc = Fpga_TruthsCutBdd_rec( (DdManager *)dd, pCut, vVisited ); Cudd_Ref( bFunc );
91 // clean the intermediate BDDs
92 for ( i = 0; i < pCut->nLeaves; i++ )
93 pCut->ppLeaves[i]->pCuts->uSign = 0;
94 for ( i = 0; i < vVisited->nSize; i++ )
95 {
96 pCut = (Fpga_Cut_t *)vVisited->pArray[i];
97 Cudd_RecursiveDeref( (DdManager *)dd, (DdNode*)(ABC_PTRUINT_T)pCut->uSign );
98 pCut->uSign = 0;
99 }
100// printf( "%d ", vVisited->nSize );
101 Fpga_NodeVecFree( vVisited );
102 Cudd_Deref( bFunc );
103 return bFunc;
104}
ABC_NAMESPACE_IMPL_START DdNode * Fpga_TruthsCutBdd_rec(DdManager *dd, Fpga_Cut_t *pCut, Fpga_NodeVec_t *vVisited)
DECLARATIONS ///.
Definition fpgaTruth.c:44
Here is the call graph for this function: