ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
fpgaInt.h
Go to the documentation of this file.
1
18
19#ifndef ABC__map__fpga__fpgaInt_h
20#define ABC__map__fpga__fpgaInt_h
21
22
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <string.h>
30#include "misc/extra/extra.h"
31#include "fpga.h"
32
34
35
39
40// uncomment to have fanouts represented in the mapping graph
41//#define FPGA_ALLOCATE_FANOUT 1
42
46
47#ifdef _WIN32
48#define inline __inline // compatible with MS VS 6.0
49#endif
50
51// the maximum number of cut leaves (currently does not work for 7)
52#define FPGA_MAX_LEAVES 6
53
54// the bit masks
55#define FPGA_MASK(n) ((~((unsigned)0)) >> (32-(n)))
56#define FPGA_FULL (~((unsigned)0))
57#define FPGA_NO_VAR (-9999.0)
58#define FPGA_NUM_BYTES(n) (((n)/16 + (((n)%16) > 0))*16)
59
60// maximum/minimum operators
61#define FPGA_MIN(a,b) (((a) < (b))? (a) : (b))
62#define FPGA_MAX(a,b) (((a) > (b))? (a) : (b))
63
64// the small and large numbers (min/max float are 1.17e-38/3.40e+38)
65#define FPGA_FLOAT_LARGE ((float)1.0e+20)
66#define FPGA_FLOAT_SMALL ((float)1.0e-20)
67#define FPGA_INT_LARGE (10000000)
68
69// the macro to compute the signature
70#define FPGA_SEQ_SIGN(p) (1 << (((ABC_PTRUINT_T)p)%31));
71
72// internal macros to work with cuts
73#define Fpga_CutIsComplement(p) (((int)((ABC_PTRUINT_T)(p) & 01)))
74#define Fpga_CutRegular(p) ((Fpga_Cut_t *)((ABC_PTRUINT_T)(p) & ~01))
75#define Fpga_CutNot(p) ((Fpga_Cut_t *)((ABC_PTRUINT_T)(p) ^ 01))
76#define Fpga_CutNotCond(p,c) ((Fpga_Cut_t *)((ABC_PTRUINT_T)(p) ^ (c)))
77
78// the cut nodes
79#define Fpga_SeqIsComplement( p ) (((int)((ABC_PTRUINT_T) (p) & 01)))
80#define Fpga_SeqRegular( p ) ((Fpga_Node_t *)((ABC_PTRUINT_T)(p) & ~015))
81#define Fpga_SeqIndex( p ) ((((ABC_PTRUINT_T)(p)) >> 1) & 07)
82#define Fpga_SeqIndexCreate( p, Ind ) (((ABC_PTRUINT_T)(p)) | (1 << (((ABC_PTRUINT_T)(Ind)) & 07)))
83
84// internal macros for referencing of nodes
85#define Fpga_NodeReadRef(p) ((Fpga_Regular(p))->nRefs)
86#define Fpga_NodeRef(p) ((Fpga_Regular(p))->nRefs++)
87
88// returns the complemented attribute of the node
89#define Fpga_NodeIsSimComplement(p) (Fpga_IsComplement(p)? !(Fpga_Regular(p)->fInv) : (p)->fInv)
90
91// generating random unsigned (#define RAND_MAX 0x7fff)
92#define FPGA_RANDOM_UNSIGNED ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))
93
97
98// the mapping manager
100{
101 // the mapping graph
102 Fpga_Node_t ** pBins; // the table of nodes hashed by their children
103 int nBins; // the size of the table
104 Fpga_Node_t ** pInputs; // the array of inputs
105 int nInputs; // the number of inputs
106 Fpga_Node_t ** pOutputs; // the array of outputs
107 int nOutputs; // the number of outputs
108 int nNodes; // the total number of nodes
109 int nLatches; // the number of latches in the circuit
110 Fpga_Node_t * pConst1; // the constant 1 node
111 Fpga_NodeVec_t * vNodesAll; // the nodes by number
112 Fpga_NodeVec_t * vAnds; // the nodes reachable from COs
113 Fpga_NodeVec_t * vMapping; // the nodes used in the current mapping
114
115 // info about the original circuit
116 char * pFileName; // the file name
117 char ** ppOutputNames; // the primary output names
118 float * pInputArrivals;// the PI arrival times
119
120 // mapping parameters
121 int nVarsMax; // the max number of variables
122 int fAreaRecovery; // the flag to use area flow as the first parameter
123 int fVerbose; // the verbosiness flag
124 int fSwitching; // minimize the switching activity (instead of area)
125 int fLatchPaths; // optimize latch paths for delay, other paths for area
126 int nTravIds; // the counter of traversal IDs
127 float DelayTarget; // the target required times
128
129 // support of choice nodes
130 int nChoiceNodes; // the number of choice nodes
131 int nChoices; // the number of all choices
132
135
136 // the supergate library
137 Fpga_LutLib_t * pLutLib; // the current LUT library
138
139 // the memory managers
140 Extra_MmFixed_t * mmNodes; // the memory manager for nodes
141 Extra_MmFixed_t * mmCuts; // the memory manager for cuts
142
143 // resynthesis parameters
144 int fResynthesis; // the resynthesis flag
145 float fRequiredGlo; // the global required times
146 float fRequiredShift;// the shift of the required times
147 float fRequiredStart;// the starting global required times
148 float fRequiredGain; // the reduction in delay
149 float fAreaGlo; // the total area
150 float fAreaGain; // the reduction in area
151 float fEpsilon; // the epsilon used to compare floats
152 float fDelayWindow; // the delay window for delay-oriented resynthesis
153 float DelayLimit; // for resynthesis
154 float AreaLimit; // for resynthesis
155 float TimeLimit; // for resynthesis
156
157 // runtime statistics
158 clock_t timeToMap; // time to transfer to the mapping structure
159 clock_t timeCuts; // time to compute k-feasible cuts
160 clock_t timeTruth; // time to compute the truth table for each cut
161 clock_t timeMatch; // time to perform matching for each node
162 clock_t timeRecover; // time to perform area recovery
163 clock_t timeToNet; // time to transfer back to the network
164 clock_t timeTotal; // the total mapping time
165 clock_t time1; // time to transfer to the mapping structure
166 clock_t time2; // time to transfer to the mapping structure
167};
168
169// the LUT library
171{
172 char * pName; // the name of the LUT library
173 int LutMax; // the maximum LUT size
174 int fVarPinDelays; // set to 1 if variable pin delays are specified
175 float pLutAreas[FPGA_MAX_LUTSIZE+1]; // the areas of LUTs
176 float pLutDelays[FPGA_MAX_LUTSIZE+1][FPGA_MAX_LUTSIZE+1];// the delays of LUTs
177};
178
179// the mapping node
181{
182 // general information about the node
183 Fpga_Node_t * pNext; // the next node in the hash table
184 Fpga_Node_t * pLevel; // the next node in the linked list by level
185 int Num; // the unique number of this node
186 int NumA; // the unique number of this node
187 int Num2; // the temporary number of this node
188 int nRefs; // the number of references (fanouts) of the given node
189 unsigned fMark0 : 1; // the mark used for traversals
190 unsigned fMark1 : 1; // the mark used for traversals
191 unsigned fInv : 1; // the complemented attribute for the equivalent nodes
192 unsigned Value : 2; // the value of the nodes
193 unsigned fUsed : 1; // the flag indicating that the node is used in the mapping
194 unsigned fTemp : 1; // unused
195 unsigned Level :11; // the level of the given node
196 unsigned uData :14; // used to mark the fanins, for which resynthesis was tried
198
199 // the successors of this node
200 Fpga_Node_t * p1; // the first child
201 Fpga_Node_t * p2; // the second child
202 Fpga_Node_t * pNextE; // the next functionally equivalent node
203 Fpga_Node_t * pRepr; // the representative of the functionally equivalent class
204
205#ifdef FPGA_ALLOCATE_FANOUT
206 // representation of node's fanouts
207 Fpga_Node_t * pFanPivot; // the first fanout of this node
208 Fpga_Node_t * pFanFanin1; // the next fanout of p1
209 Fpga_Node_t * pFanFanin2; // the next fanout of p2
210// Fpga_NodeVec_t * vFanouts; // the array of fanouts of the gate
211#endif
212
213 // the delay information
214 float tRequired; // the best area flow
215 float aEstFanouts; // the fanout estimation
216 float Switching; // the probability of switching
217 int LValue; // the l-value of the node
218 short nLatches1; // the number of latches on the first edge
219 short nLatches2; // the number of latches on the second edge
220
221 // cut information
222 Fpga_Cut_t * pCutBest; // the best mapping
223 Fpga_Cut_t * pCutOld; // the old mapping
224 Fpga_Cut_t * pCuts; // mapping choices for the node (elementary comes first)
225 Fpga_Cut_t * pCutsN; // mapping choices for the node (elementary comes first)
226
227 // misc information
228 char * pData0; // temporary storage for the corresponding network node
229};
230
231// the cuts used for matching
233{
234 Fpga_Cut_t * pOne; // the father of this cut
235 Fpga_Cut_t * pTwo; // the mother of this cut
236 Fpga_Node_t * pRoot; // the root of the cut
237 Fpga_Node_t * ppLeaves[FPGA_MAX_LEAVES+1]; // the leaves of this cut
238 float fLevel; // the average level of the fanins
239 unsigned uSign; // signature for quick comparison
240 char fMark; // the mark to denote visited cut
241 char Phase; // the mark to denote complemented cut
242 char nLeaves; // the number of leaves of this cut
243 char nVolume; // the volume of this cut
244 float tArrival; // the arrival time
245 float aFlow; // the area flow of the cut
246 Fpga_Cut_t * pNext; // the pointer to the next cut in the list
247};
248
249// the vector of nodes
251{
252 Fpga_Node_t ** pArray; // the array of nodes
253 int nSize; // the number of entries in the array
254 int nCap; // the number of allocated entries
255};
256
257// getting hold of the next fanout of the node
258#define Fpga_NodeReadNextFanout( pNode, pFanout ) \
259 ( ( pFanout == NULL )? NULL : \
260 ((Fpga_Regular((pFanout)->p1) == (pNode))? \
261 (pFanout)->pFanFanin1 : (pFanout)->pFanFanin2) )
262
263// getting hold of the place where the next fanout will be attached
264#define Fpga_NodeReadNextFanoutPlace( pNode, pFanout ) \
265 ( (Fpga_Regular((pFanout)->p1) == (pNode))? \
266 &(pFanout)->pFanFanin1 : &(pFanout)->pFanFanin2 )
267
268// iterator through the fanouts of the node
269#define Fpga_NodeForEachFanout( pNode, pFanout ) \
270 for ( pFanout = (pNode)->pFanPivot; pFanout; \
271 pFanout = Fpga_NodeReadNextFanout(pNode, pFanout) )
272
273// safe iterator through the fanouts of the node
274#define Fpga_NodeForEachFanoutSafe( pNode, pFanout, pFanout2 ) \
275 for ( pFanout = (pNode)->pFanPivot, \
276 pFanout2 = Fpga_NodeReadNextFanout(pNode, pFanout); \
277 pFanout; \
278 pFanout = pFanout2, \
279 pFanout2 = Fpga_NodeReadNextFanout(pNode, pFanout) )
280
281static inline int Fpga_FloatMoreThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 + p->fEpsilon; }
282static inline int Fpga_FloatLessThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 < Arg2 - p->fEpsilon; }
283static inline int Fpga_FloatEqual( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 - p->fEpsilon && Arg1 < Arg2 + p->fEpsilon; }
284
288
292
293/*=== fpgaCut.c ===============================================================*/
294extern void Fpga_MappingCuts( Fpga_Man_t * p );
295extern void Fpga_MappingCreatePiCuts( Fpga_Man_t * p );
296extern int Fpga_CutCountAll( Fpga_Man_t * pMan );
297/*=== fpgaCutUtils.c ===============================================================*/
299extern Fpga_Cut_t * Fpga_CutDup( Fpga_Man_t * p, Fpga_Cut_t * pCutOld );
300extern void Fpga_CutFree( Fpga_Man_t * p, Fpga_Cut_t * pCut );
301extern void Fpga_CutPrint( Fpga_Man_t * p, Fpga_Node_t * pRoot, Fpga_Cut_t * pCut );
303extern float Fpga_CutGetRootArea( Fpga_Man_t * p, Fpga_Cut_t * pCut );
304extern Fpga_Cut_t * Fpga_CutListAppend( Fpga_Cut_t * pSetAll, Fpga_Cut_t * pSets );
305extern void Fpga_CutListRecycle( Fpga_Man_t * p, Fpga_Cut_t * pSetList, Fpga_Cut_t * pSave );
306extern int Fpga_CutListCount( Fpga_Cut_t * pSets );
307extern void Fpga_CutRemoveFanouts( Fpga_Man_t * p, Fpga_Node_t * pNode, Fpga_Cut_t * pCut );
308extern void Fpga_CutInsertFanouts( Fpga_Man_t * p, Fpga_Node_t * pNode, Fpga_Cut_t * pCut );
309extern float Fpga_CutGetAreaRefed( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
310extern float Fpga_CutGetAreaDerefed( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
311extern float Fpga_CutRef( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
312extern float Fpga_CutDeref( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
313extern float Fpga_CutGetAreaFlow( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
314extern void Fpga_CutGetParameters( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
315/*=== fraigFanout.c =============================================================*/
316extern void Fpga_NodeAddFaninFanout( Fpga_Node_t * pFanin, Fpga_Node_t * pFanout );
317extern void Fpga_NodeRemoveFaninFanout( Fpga_Node_t * pFanin, Fpga_Node_t * pFanoutToRemove );
318extern int Fpga_NodeGetFanoutNum( Fpga_Node_t * pNode );
319/*=== fpgaLib.c ============================================================*/
320extern Fpga_LutLib_t * Fpga_LutLibRead( char * FileName, int fVerbose );
321extern void Fpga_LutLibFree( Fpga_LutLib_t * p );
322extern void Fpga_LutLibPrint( Fpga_LutLib_t * pLutLib );
323extern int Fpga_LutLibDelaysAreDiscrete( Fpga_LutLib_t * pLutLib );
324/*=== fpgaMatch.c ===============================================================*/
325extern int Fpga_MappingMatches( Fpga_Man_t * p, int fDelayOriented );
326extern int Fpga_MappingMatchesArea( Fpga_Man_t * p );
328/*=== fpgaShow.c =============================================================*/
329extern void Fpga_MappingShow( Fpga_Man_t * pMan, char * pFileName );
330extern void Fpga_MappingShowNodes( Fpga_Man_t * pMan, Fpga_Node_t ** ppRoots, int nRoots, char * pFileName );
331/*=== fpgaSwitch.c =============================================================*/
332extern float Fpga_CutGetSwitchDerefed( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut );
333extern float Fpga_CutRefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
334extern float Fpga_CutDerefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
335extern float Fpga_MappingGetSwitching( Fpga_Man_t * pMan, Fpga_NodeVec_t * vMapping );
336/*=== fpgaTime.c ===============================================================*/
337extern float Fpga_TimeCutComputeArrival( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
338extern float Fpga_TimeCutComputeArrival_rec( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
339extern float Fpga_TimeComputeArrivalMax( Fpga_Man_t * p );
340extern void Fpga_TimeComputeRequiredGlobal( Fpga_Man_t * p, int fFirstTime );
341extern void Fpga_TimeComputeRequired( Fpga_Man_t * p, float fRequired );
342extern void Fpga_TimePropagateRequired( Fpga_Man_t * p, Fpga_NodeVec_t * vNodes );
343extern void Fpga_TimePropagateArrival( Fpga_Man_t * p );
344/*=== fpgaVec.c =============================================================*/
345extern Fpga_NodeVec_t * Fpga_NodeVecAlloc( int nCap );
346extern void Fpga_NodeVecFree( Fpga_NodeVec_t * p );
349extern void Fpga_NodeVecGrow( Fpga_NodeVec_t * p, int nCapMin );
350extern void Fpga_NodeVecShrink( Fpga_NodeVec_t * p, int nSizeNew );
351extern void Fpga_NodeVecClear( Fpga_NodeVec_t * p );
352extern void Fpga_NodeVecPush( Fpga_NodeVec_t * p, Fpga_Node_t * Entry );
353extern int Fpga_NodeVecPushUnique( Fpga_NodeVec_t * p, Fpga_Node_t * Entry );
355extern void Fpga_NodeVecWriteEntry( Fpga_NodeVec_t * p, int i, Fpga_Node_t * Entry );
360extern void Fpga_NodeVecPushOrder( Fpga_NodeVec_t * vNodes, Fpga_Node_t * pNode, int fIncreasing );
361extern void Fpga_NodeVecReverse( Fpga_NodeVec_t * vNodes );
362
363/*=== fpgaUtils.c ===============================================================*/
364extern Fpga_NodeVec_t * Fpga_MappingDfs( Fpga_Man_t * pMan, int fCollectEquiv );
365extern Fpga_NodeVec_t * Fpga_MappingDfsNodes( Fpga_Man_t * pMan, Fpga_Node_t ** ppNodes, int nNodes, int fEquiv );
366extern int Fpga_CountLevels( Fpga_Man_t * pMan );
367extern float Fpga_MappingGetAreaFlow( Fpga_Man_t * p );
368extern float Fpga_MappingArea( Fpga_Man_t * pMan );
369extern float Fpga_MappingAreaTrav( Fpga_Man_t * pMan );
370extern float Fpga_MappingSetRefsAndArea( Fpga_Man_t * pMan );
372extern void Fpga_MappingSetupTruthTables( unsigned uTruths[][2] );
373extern void Fpga_MappingSetupMask( unsigned uMask[], int nVarsMax );
374extern void Fpga_MappingSortByLevel( Fpga_Man_t * pMan, Fpga_NodeVec_t * vNodes, int fIncreasing );
375extern Fpga_NodeVec_t * Fpga_DfsLim( Fpga_Man_t * pMan, Fpga_Node_t * pNode, int nLevels );
377extern int Fpga_MappingMaxLevel( Fpga_Man_t * pMan );
378extern void Fpga_ManReportChoices( Fpga_Man_t * pMan );
379extern void Fpga_MappingSetChoiceLevels( Fpga_Man_t * pMan );
380
381
382
384
385#endif
386
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Cube * p
Definition exorList.c:222
struct Extra_MmFixed_t_ Extra_MmFixed_t
Definition extra.h:147
Fpga_Node_t * Fpga_NodeVecPop(Fpga_NodeVec_t *p)
Definition fpgaVec.c:213
void Fpga_LutLibPrint(Fpga_LutLib_t *pLutLib)
Definition fpgaLib.c:205
void Fpga_LutLibFree(Fpga_LutLib_t *p)
Definition fpgaLib.c:185
int Fpga_CutListCount(Fpga_Cut_t *pSets)
float Fpga_CutGetRootArea(Fpga_Man_t *p, Fpga_Cut_t *pCut)
void Fpga_CutRemoveFanouts(Fpga_Man_t *p, Fpga_Node_t *pNode, Fpga_Cut_t *pCut)
void Fpga_TimeComputeRequired(Fpga_Man_t *p, float fRequired)
Definition fpgaTime.c:168
int Fpga_LutLibDelaysAreDiscrete(Fpga_LutLib_t *pLutLib)
Definition fpgaLib.c:236
Fpga_Cut_t * Fpga_CutDup(Fpga_Man_t *p, Fpga_Cut_t *pCutOld)
void Fpga_MappingShow(Fpga_Man_t *pMan, char *pFileName)
Fpga_NodeVec_t * Fpga_MappingDfsNodes(Fpga_Man_t *pMan, Fpga_Node_t **ppNodes, int nNodes, int fEquiv)
Definition fpgaUtils.c:129
float Fpga_CutGetAreaDerefed(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
void Fpga_ManReportChoices(Fpga_Man_t *pMan)
Definition fpgaUtils.c:897
float Fpga_MappingAreaTrav(Fpga_Man_t *pMan)
Definition fpgaUtils.c:239
void Fpga_NodeVecUnion(Fpga_NodeVec_t *p, Fpga_NodeVec_t *p1, Fpga_NodeVec_t *p2)
Definition fpgaVec.c:345
float Fpga_TimeComputeArrivalMax(Fpga_Man_t *p)
Definition fpgaTime.c:89
float Fpga_TimeCutComputeArrival_rec(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
Definition fpgaTime.c:69
float Fpga_CutGetAreaRefed(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
void Fpga_NodeVecSortByLevel(Fpga_NodeVec_t *p)
Definition fpgaVec.c:289
int Fpga_NodeVecPushUnique(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
Definition fpgaVec.c:192
Fpga_Cut_t * Fpga_CutCreateSimple(Fpga_Man_t *p, Fpga_Node_t *pNode)
int Fpga_NodeVecReadSize(Fpga_NodeVec_t *p)
Definition fpgaVec.c:101
float Fpga_CutRefSwitch(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
Definition fpgaSwitch.c:63
void Fpga_NodeVecShrink(Fpga_NodeVec_t *p, int nSizeNew)
Definition fpgaVec.c:136
void Fpga_NodeVecPushOrder(Fpga_NodeVec_t *vNodes, Fpga_Node_t *pNode, int fIncreasing)
Definition fpgaVec.c:366
void Fpga_NodeRemoveFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanoutToRemove)
float Fpga_CutDerefSwitch(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
Definition fpgaSwitch.c:95
void Fpga_CutGetParameters(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
void Fpga_CutPrint(Fpga_Man_t *p, Fpga_Node_t *pRoot, Fpga_Cut_t *pCut)
int Fpga_MappingMatchesSwitch(Fpga_Man_t *p)
Definition fpgaMatch.c:349
Fpga_NodeVec_t * Fpga_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition fpgaVec.c:45
float Fpga_MappingArea(Fpga_Man_t *pMan)
Definition fpgaUtils.c:177
Fpga_NodeVec_t * Fpga_DfsLim(Fpga_Man_t *pMan, Fpga_Node_t *pNode, int nLevels)
Definition fpgaUtils.c:606
Fpga_Cut_t * Fpga_CutAlloc(Fpga_Man_t *p)
DECLARATIONS ///.
void Fpga_MappingShowNodes(Fpga_Man_t *pMan, Fpga_Node_t **ppRoots, int nRoots, char *pFileName)
float Fpga_TimeCutComputeArrival(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
DECLARATIONS ///.
Definition fpgaTime.c:44
void Fpga_NodeVecWriteEntry(Fpga_NodeVec_t *p, int i, Fpga_Node_t *Entry)
Definition fpgaVec.c:229
float Fpga_MappingSetRefsAndArea(Fpga_Man_t *pMan)
Definition fpgaUtils.c:299
void Fpga_TimePropagateArrival(Fpga_Man_t *p)
Definition fpgaTime.c:245
void Fpga_NodeAddFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanout)
void Fpga_MappingSetupTruthTables(unsigned uTruths[][2])
Definition fpgaUtils.c:449
void Fpga_MappingCreatePiCuts(Fpga_Man_t *p)
Definition fpgaCut.c:181
void Fpga_TimeComputeRequiredGlobal(Fpga_Man_t *p, int fFirstTime)
Definition fpgaTime.c:136
Fpga_NodeVec_t * Fpga_MappingLevelize(Fpga_Man_t *pMan, Fpga_NodeVec_t *vNodes)
Definition fpgaUtils.c:747
Fpga_LutLib_t * Fpga_LutLibRead(char *FileName, int fVerbose)
Definition fpgaLib.c:58
void Fpga_NodeVecFree(Fpga_NodeVec_t *p)
Definition fpgaVec.c:68
void Fpga_MappingPrintOutputArrivals(Fpga_Man_t *p)
Definition fpgaUtils.c:402
float Fpga_MappingGetAreaFlow(Fpga_Man_t *p)
Definition fpgaUtils.c:153
void Fpga_CutInsertFanouts(Fpga_Man_t *p, Fpga_Node_t *pNode, Fpga_Cut_t *pCut)
float Fpga_CutGetAreaFlow(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
void Fpga_CutListRecycle(Fpga_Man_t *p, Fpga_Cut_t *pSetList, Fpga_Cut_t *pSave)
Fpga_Node_t ** Fpga_NodeVecReadArray(Fpga_NodeVec_t *p)
Definition fpgaVec.c:85
int Fpga_MappingMatches(Fpga_Man_t *p, int fDelayOriented)
FUNCTION DEFINITIONS ///.
Definition fpgaMatch.c:67
float Fpga_CutDeref(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
void Fpga_CutFree(Fpga_Man_t *p, Fpga_Cut_t *pCut)
void Fpga_NodeVecClear(Fpga_NodeVec_t *p)
Definition fpgaVec.c:153
void Fpga_MappingSetChoiceLevels(Fpga_Man_t *pMan)
Definition fpgaUtils.c:876
int Fpga_CutCountAll(Fpga_Man_t *pMan)
Definition fpgaCut.c:767
int Fpga_CountLevels(Fpga_Man_t *pMan)
void Fpga_MappingSortByLevel(Fpga_Man_t *pMan, Fpga_NodeVec_t *vNodes, int fIncreasing)
Definition fpgaUtils.c:584
void Fpga_MappingSetupMask(unsigned uMask[], int nVarsMax)
Definition fpgaUtils.c:475
void Fpga_NodeVecReverse(Fpga_NodeVec_t *vNodes)
Definition fpgaVec.c:395
float Fpga_CutGetSwitchDerefed(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut)
DECLARATIONS ///.
Definition fpgaSwitch.c:43
void Fpga_NodeVecPush(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
Definition fpgaVec.c:169
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
int Fpga_MappingMatchesArea(Fpga_Man_t *p)
Definition fpgaMatch.c:196
float Fpga_MappingGetSwitching(Fpga_Man_t *pMan, Fpga_NodeVec_t *vMapping)
Definition fpgaSwitch.c:127
void Fpga_SortNodesByArrivalTimes(Fpga_NodeVec_t *p)
Definition fpgaVec.c:326
float Fpga_CutRef(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
void Fpga_NodeVecGrow(Fpga_NodeVec_t *p, int nCapMin)
Definition fpgaVec.c:117
int Fpga_NodeGetFanoutNum(Fpga_Node_t *pNode)
Fpga_Node_t * Fpga_NodeVecReadEntry(Fpga_NodeVec_t *p, int i)
Definition fpgaVec.c:246
Fpga_Cut_t * Fpga_CutListAppend(Fpga_Cut_t *pSetAll, Fpga_Cut_t *pSets)
void Fpga_TimePropagateRequired(Fpga_Man_t *p, Fpga_NodeVec_t *vNodes)
Definition fpgaTime.c:205
int Fpga_MappingMaxLevel(Fpga_Man_t *pMan)
Definition fpgaUtils.c:804
void Fpga_MappingCuts(Fpga_Man_t *p)
GLOBAL VARIABLES ///.
Definition fpgaCut.c:130
struct Fpga_NodeStruct_t_ Fpga_Node_t
Definition fpga.h:44
#define FPGA_MAX_LUTSIZE
INCLUDES ///.
Definition fpga.h:37
struct Fpga_NodeVecStruct_t_ Fpga_NodeVec_t
Definition fpga.h:45
struct Fpga_ManStruct_t_ Fpga_Man_t
STRUCTURE DEFINITIONS ///.
Definition fpga.h:43
struct Fpga_LutLibStruct_t_ Fpga_LutLib_t
Definition fpga.h:47
struct Fpga_CutStruct_t_ Fpga_Cut_t
Definition fpga.h:46
Fpga_Node_t * pRoot
Definition fpgaInt.h:236
Fpga_Node_t * ppLeaves[FPGA_MAX_LEAVES+1]
Definition fpgaInt.h:237
Fpga_Cut_t * pTwo
Definition fpgaInt.h:235
Fpga_Cut_t * pNext
Definition fpgaInt.h:246
unsigned uSign
Definition fpgaInt.h:239
Fpga_Cut_t * pOne
Definition fpgaInt.h:234
float pLutAreas[FPGA_MAX_LUTSIZE+1]
Definition fpgaInt.h:175
float pLutDelays[FPGA_MAX_LUTSIZE+1][FPGA_MAX_LUTSIZE+1]
Definition fpgaInt.h:176
STRUCTURE DEFINITIONS ///.
Definition fpgaInt.h:100
clock_t timeCuts
Definition fpgaInt.h:159
Fpga_Node_t ** pInputs
Definition fpgaInt.h:104
clock_t timeMatch
Definition fpgaInt.h:161
Fpga_NodeVec_t * vNodesAll
Definition fpgaInt.h:111
Fpga_LutLib_t * pLutLib
Definition fpgaInt.h:137
clock_t timeToNet
Definition fpgaInt.h:163
Fpga_NodeVec_t * vMapping
Definition fpgaInt.h:113
float * pInputArrivals
Definition fpgaInt.h:118
Fpga_Node_t * pConst1
Definition fpgaInt.h:110
char ** ppOutputNames
Definition fpgaInt.h:117
clock_t timeRecover
Definition fpgaInt.h:162
Extra_MmFixed_t * mmNodes
Definition fpgaInt.h:140
clock_t timeTotal
Definition fpgaInt.h:164
float fRequiredStart
Definition fpgaInt.h:147
Fpga_NodeVec_t * vAnds
Definition fpgaInt.h:112
Fpga_Node_t ** pOutputs
Definition fpgaInt.h:106
clock_t timeToMap
Definition fpgaInt.h:158
clock_t timeTruth
Definition fpgaInt.h:160
float fRequiredGain
Definition fpgaInt.h:148
Fpga_Node_t ** pBins
Definition fpgaInt.h:102
Extra_MmFixed_t * mmCuts
Definition fpgaInt.h:141
float fRequiredShift
Definition fpgaInt.h:146
Fpga_Cut_t * pCuts
Definition fpgaInt.h:224
unsigned fMark1
Definition fpgaInt.h:190
Fpga_Cut_t * pCutsN
Definition fpgaInt.h:225
Fpga_Node_t * pNextE
Definition fpgaInt.h:202
Fpga_Node_t * pRepr
Definition fpgaInt.h:203
Fpga_Node_t * p1
Definition fpgaInt.h:200
Fpga_Cut_t * pCutBest
Definition fpgaInt.h:222
Fpga_Cut_t * pCutOld
Definition fpgaInt.h:223
Fpga_Node_t * p2
Definition fpgaInt.h:201
Fpga_Node_t * pNext
Definition fpgaInt.h:183
Fpga_Node_t * pLevel
Definition fpgaInt.h:184
unsigned fMark0
Definition fpgaInt.h:189
Fpga_Node_t ** pArray
Definition fpgaInt.h:252