abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fpgaInt.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [fpgaInt.h]
4 
5  PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]
6 
7  Synopsis [Technology mapping for variable-size-LUT FPGAs.]
8 
9  Author [MVSIS Group]
10 
11  Affiliation [UC Berkeley]
12 
13  Date [Ver. 2.0. Started - August 18, 2004.]
14 
15  Revision [$Id: fpgaInt.h,v 1.8 2004/09/30 21:18:10 satrajit Exp $]
16 
17 ***********************************************************************/
18 
19 #ifndef ABC__map__fpga__fpgaInt_h
20 #define ABC__map__fpga__fpgaInt_h
21 
22 
23 ////////////////////////////////////////////////////////////////////////
24 /// INCLUDES ///
25 ////////////////////////////////////////////////////////////////////////
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 
36 ////////////////////////////////////////////////////////////////////////
37 /// PARAMETERS ///
38 ////////////////////////////////////////////////////////////////////////
39 
40 // uncomment to have fanouts represented in the mapping graph
41 //#define FPGA_ALLOCATE_FANOUT 1
42 
43 ////////////////////////////////////////////////////////////////////////
44 /// MACRO DEFINITIONS ///
45 ////////////////////////////////////////////////////////////////////////
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 
94 ////////////////////////////////////////////////////////////////////////
95 /// STRUCTURE DEFINITIONS ///
96 ////////////////////////////////////////////////////////////////////////
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 
133  int nCanons;
134  int nMatches;
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
197  int TravId;
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 
281 static inline int Fpga_FloatMoreThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 + p->fEpsilon; }
282 static inline int Fpga_FloatLessThan( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 < Arg2 - p->fEpsilon; }
283 static inline int Fpga_FloatEqual( Fpga_Man_t * p, float Arg1, float Arg2 ) { return Arg1 > Arg2 - p->fEpsilon && Arg1 < Arg2 + p->fEpsilon; }
284 
285 ////////////////////////////////////////////////////////////////////////
286 /// GLOBAL VARIABLES ///
287 ////////////////////////////////////////////////////////////////////////
288 
289 ////////////////////////////////////////////////////////////////////////
290 /// FUNCTION DEFINITIONS ///
291 ////////////////////////////////////////////////////////////////////////
292 
293 /*=== fpgaCut.c ===============================================================*/
294 extern void Fpga_MappingCuts( Fpga_Man_t * p );
295 extern void Fpga_MappingCreatePiCuts( Fpga_Man_t * p );
296 extern int Fpga_CutCountAll( Fpga_Man_t * pMan );
297 /*=== fpgaCutUtils.c ===============================================================*/
298 extern Fpga_Cut_t * Fpga_CutAlloc( Fpga_Man_t * p );
299 extern Fpga_Cut_t * Fpga_CutDup( Fpga_Man_t * p, Fpga_Cut_t * pCutOld );
300 extern void Fpga_CutFree( Fpga_Man_t * p, Fpga_Cut_t * pCut );
301 extern void Fpga_CutPrint( Fpga_Man_t * p, Fpga_Node_t * pRoot, Fpga_Cut_t * pCut );
303 extern float Fpga_CutGetRootArea( Fpga_Man_t * p, Fpga_Cut_t * pCut );
304 extern Fpga_Cut_t * Fpga_CutListAppend( Fpga_Cut_t * pSetAll, Fpga_Cut_t * pSets );
305 extern void Fpga_CutListRecycle( Fpga_Man_t * p, Fpga_Cut_t * pSetList, Fpga_Cut_t * pSave );
306 extern int Fpga_CutListCount( Fpga_Cut_t * pSets );
307 extern void Fpga_CutRemoveFanouts( Fpga_Man_t * p, Fpga_Node_t * pNode, Fpga_Cut_t * pCut );
308 extern void Fpga_CutInsertFanouts( Fpga_Man_t * p, Fpga_Node_t * pNode, Fpga_Cut_t * pCut );
309 extern float Fpga_CutGetAreaRefed( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
310 extern float Fpga_CutGetAreaDerefed( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
311 extern float Fpga_CutRef( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
312 extern float Fpga_CutDeref( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
313 extern float Fpga_CutGetAreaFlow( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
314 extern void Fpga_CutGetParameters( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
315 /*=== fraigFanout.c =============================================================*/
316 extern void Fpga_NodeAddFaninFanout( Fpga_Node_t * pFanin, Fpga_Node_t * pFanout );
317 extern void Fpga_NodeRemoveFaninFanout( Fpga_Node_t * pFanin, Fpga_Node_t * pFanoutToRemove );
318 extern int Fpga_NodeGetFanoutNum( Fpga_Node_t * pNode );
319 /*=== fpgaLib.c ============================================================*/
320 extern Fpga_LutLib_t * Fpga_LutLibRead( char * FileName, int fVerbose );
321 extern void Fpga_LutLibFree( Fpga_LutLib_t * p );
322 extern void Fpga_LutLibPrint( Fpga_LutLib_t * pLutLib );
323 extern int Fpga_LutLibDelaysAreDiscrete( Fpga_LutLib_t * pLutLib );
324 /*=== fpgaMatch.c ===============================================================*/
325 extern int Fpga_MappingMatches( Fpga_Man_t * p, int fDelayOriented );
326 extern int Fpga_MappingMatchesArea( Fpga_Man_t * p );
327 extern int Fpga_MappingMatchesSwitch( Fpga_Man_t * p );
328 /*=== fpgaShow.c =============================================================*/
329 extern void Fpga_MappingShow( Fpga_Man_t * pMan, char * pFileName );
330 extern void Fpga_MappingShowNodes( Fpga_Man_t * pMan, Fpga_Node_t ** ppRoots, int nRoots, char * pFileName );
331 /*=== fpgaSwitch.c =============================================================*/
332 extern float Fpga_CutGetSwitchDerefed( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut );
333 extern float Fpga_CutRefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
334 extern float Fpga_CutDerefSwitch( Fpga_Man_t * pMan, Fpga_Node_t * pNode, Fpga_Cut_t * pCut, int fFanouts );
335 extern float Fpga_MappingGetSwitching( Fpga_Man_t * pMan, Fpga_NodeVec_t * vMapping );
336 /*=== fpgaTime.c ===============================================================*/
337 extern float Fpga_TimeCutComputeArrival( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
338 extern float Fpga_TimeCutComputeArrival_rec( Fpga_Man_t * pMan, Fpga_Cut_t * pCut );
339 extern float Fpga_TimeComputeArrivalMax( Fpga_Man_t * p );
340 extern void Fpga_TimeComputeRequiredGlobal( Fpga_Man_t * p, int fFirstTime );
341 extern void Fpga_TimeComputeRequired( Fpga_Man_t * p, float fRequired );
342 extern void Fpga_TimePropagateRequired( Fpga_Man_t * p, Fpga_NodeVec_t * vNodes );
343 extern void Fpga_TimePropagateArrival( Fpga_Man_t * p );
344 /*=== fpgaVec.c =============================================================*/
345 extern Fpga_NodeVec_t * Fpga_NodeVecAlloc( int nCap );
346 extern void Fpga_NodeVecFree( Fpga_NodeVec_t * p );
348 extern int Fpga_NodeVecReadSize( Fpga_NodeVec_t * p );
349 extern void Fpga_NodeVecGrow( Fpga_NodeVec_t * p, int nCapMin );
350 extern void Fpga_NodeVecShrink( Fpga_NodeVec_t * p, int nSizeNew );
351 extern void Fpga_NodeVecClear( Fpga_NodeVec_t * p );
352 extern void Fpga_NodeVecPush( Fpga_NodeVec_t * p, Fpga_Node_t * Entry );
353 extern int Fpga_NodeVecPushUnique( Fpga_NodeVec_t * p, Fpga_Node_t * Entry );
355 extern void Fpga_NodeVecWriteEntry( Fpga_NodeVec_t * p, int i, Fpga_Node_t * Entry );
357 extern void Fpga_NodeVecSortByLevel( Fpga_NodeVec_t * p );
359 extern void Fpga_NodeVecUnion( Fpga_NodeVec_t * p, Fpga_NodeVec_t * p1, Fpga_NodeVec_t * p2 );
360 extern void Fpga_NodeVecPushOrder( Fpga_NodeVec_t * vNodes, Fpga_Node_t * pNode, int fIncreasing );
361 extern void Fpga_NodeVecReverse( Fpga_NodeVec_t * vNodes );
362 
363 /*=== fpgaUtils.c ===============================================================*/
364 extern Fpga_NodeVec_t * Fpga_MappingDfs( Fpga_Man_t * pMan, int fCollectEquiv );
365 extern Fpga_NodeVec_t * Fpga_MappingDfsNodes( Fpga_Man_t * pMan, Fpga_Node_t ** ppNodes, int nNodes, int fEquiv );
366 extern int Fpga_CountLevels( Fpga_Man_t * pMan );
367 extern float Fpga_MappingGetAreaFlow( Fpga_Man_t * p );
368 extern float Fpga_MappingArea( Fpga_Man_t * pMan );
369 extern float Fpga_MappingAreaTrav( Fpga_Man_t * pMan );
370 extern float Fpga_MappingSetRefsAndArea( Fpga_Man_t * pMan );
372 extern void Fpga_MappingSetupTruthTables( unsigned uTruths[][2] );
373 extern void Fpga_MappingSetupMask( unsigned uMask[], int nVarsMax );
374 extern void Fpga_MappingSortByLevel( Fpga_Man_t * pMan, Fpga_NodeVec_t * vNodes, int fIncreasing );
375 extern Fpga_NodeVec_t * Fpga_DfsLim( Fpga_Man_t * pMan, Fpga_Node_t * pNode, int nLevels );
376 extern Fpga_NodeVec_t * Fpga_MappingLevelize( Fpga_Man_t * pMan, Fpga_NodeVec_t * vNodes );
377 extern int Fpga_MappingMaxLevel( Fpga_Man_t * pMan );
378 extern void Fpga_ManReportChoices( Fpga_Man_t * pMan );
379 extern void Fpga_MappingSetChoiceLevels( Fpga_Man_t * pMan );
380 
381 
382 
384 
385 #endif
386 
387 ////////////////////////////////////////////////////////////////////////
388 /// END OF FILE ///
389 ////////////////////////////////////////////////////////////////////////
Fpga_LutLib_t * Fpga_LutLibRead(char *FileName, int fVerbose)
Definition: fpgaLib.c:58
int Fpga_MappingMatchesSwitch(Fpga_Man_t *p)
Definition: fpgaMatch.c:349
float * pInputArrivals
Definition: fpgaInt.h:118
float Fpga_MappingSetRefsAndArea(Fpga_Man_t *pMan)
Definition: fpgaUtils.c:299
unsigned fMark1
Definition: fpgaInt.h:190
void Fpga_CutInsertFanouts(Fpga_Man_t *p, Fpga_Node_t *pNode, Fpga_Cut_t *pCut)
void Fpga_NodeVecUnion(Fpga_NodeVec_t *p, Fpga_NodeVec_t *p1, Fpga_NodeVec_t *p2)
Definition: fpgaVec.c:345
float Fpga_MappingAreaTrav(Fpga_Man_t *pMan)
Definition: fpgaUtils.c:239
Fpga_Node_t ** pInputs
Definition: fpgaInt.h:104
void Fpga_MappingSetupMask(unsigned uMask[], int nVarsMax)
Definition: fpgaUtils.c:475
void Fpga_TimeComputeRequiredGlobal(Fpga_Man_t *p, int fFirstTime)
Definition: fpgaTime.c:136
static int Fpga_FloatLessThan(Fpga_Man_t *p, float Arg1, float Arg2)
Definition: fpgaInt.h:282
void Fpga_LutLibPrint(Fpga_LutLib_t *pLutLib)
Definition: fpgaLib.c:205
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Fpga_NodeVec_t * Fpga_DfsLim(Fpga_Man_t *pMan, Fpga_Node_t *pNode, int nLevels)
Definition: fpgaUtils.c:606
#define FPGA_MAX_LEAVES
INCLUDES ///.
Definition: fpgaInt.h:52
void Fpga_CutListRecycle(Fpga_Man_t *p, Fpga_Cut_t *pSetList, Fpga_Cut_t *pSave)
Definition: fpgaCutUtils.c:190
Fpga_Cut_t * pCutsN
Definition: fpgaInt.h:225
float pLutDelays[FPGA_MAX_LUTSIZE+1][FPGA_MAX_LUTSIZE+1]
Definition: fpgaInt.h:176
unsigned fUsed
Definition: fpgaInt.h:193
clock_t timeToMap
Definition: fpgaInt.h:158
unsigned Level
Definition: fpgaInt.h:195
void Fpga_MappingCreatePiCuts(Fpga_Man_t *p)
Definition: fpgaCut.c:181
Fpga_Cut_t * Fpga_CutListAppend(Fpga_Cut_t *pSetAll, Fpga_Cut_t *pSets)
Definition: fpgaCutUtils.c:162
Fpga_Node_t ** pOutputs
Definition: fpgaInt.h:106
void Fpga_CutGetParameters(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:279
Fpga_Node_t ** Fpga_NodeVecReadArray(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:85
float Fpga_CutGetSwitchDerefed(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut)
DECLARATIONS ///.
Definition: fpgaSwitch.c:43
void Fpga_NodeVecGrow(Fpga_NodeVec_t *p, int nCapMin)
Definition: fpgaVec.c:117
int Fpga_MappingMatchesArea(Fpga_Man_t *p)
Definition: fpgaMatch.c:196
clock_t timeTotal
Definition: fpgaInt.h:164
clock_t timeCuts
Definition: fpgaInt.h:159
void Fpga_LutLibFree(Fpga_LutLib_t *p)
Definition: fpgaLib.c:185
float Fpga_CutRefSwitch(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
Definition: fpgaSwitch.c:63
Fpga_NodeVec_t * vMapping
Definition: fpgaInt.h:113
Fpga_Node_t * pLevel
Definition: fpgaInt.h:184
char ** ppOutputNames
Definition: fpgaInt.h:117
float Fpga_CutGetAreaRefed(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:340
Fpga_Cut_t * pTwo
Definition: fpgaInt.h:235
unsigned fMark0
Definition: fpgaInt.h:189
float pLutAreas[FPGA_MAX_LUTSIZE+1]
Definition: fpgaInt.h:175
static int Fpga_FloatEqual(Fpga_Man_t *p, float Arg1, float Arg2)
Definition: fpgaInt.h:283
void Fpga_CutRemoveFanouts(Fpga_Man_t *p, Fpga_Node_t *pNode, Fpga_Cut_t *pCut)
Fpga_Node_t * Fpga_NodeVecPop(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:213
int Fpga_CutCountAll(Fpga_Man_t *pMan)
Definition: fpgaCut.c:767
Fpga_Cut_t * pCuts
Definition: fpgaInt.h:224
void Fpga_MappingPrintOutputArrivals(Fpga_Man_t *p)
Definition: fpgaUtils.c:402
void Fpga_MappingSortByLevel(Fpga_Man_t *pMan, Fpga_NodeVec_t *vNodes, int fIncreasing)
Definition: fpgaUtils.c:584
Fpga_NodeVec_t * Fpga_MappingLevelize(Fpga_Man_t *pMan, Fpga_NodeVec_t *vNodes)
Definition: fpgaUtils.c:747
int Fpga_NodeVecPushUnique(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
Definition: fpgaVec.c:192
Fpga_Node_t * ppLeaves[FPGA_MAX_LEAVES+1]
Definition: fpgaInt.h:237
void Fpga_NodeVecReverse(Fpga_NodeVec_t *vNodes)
Definition: fpgaVec.c:395
void Fpga_TimePropagateRequired(Fpga_Man_t *p, Fpga_NodeVec_t *vNodes)
Definition: fpgaTime.c:205
Fpga_Cut_t * pCutOld
Definition: fpgaInt.h:223
clock_t time1
Definition: fpgaInt.h:165
void Fpga_NodeAddFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanout)
float DelayLimit
Definition: fpgaInt.h:153
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_Node_t * p1
Definition: fpgaInt.h:200
float Fpga_MappingArea(Fpga_Man_t *pMan)
Definition: fpgaUtils.c:177
Fpga_NodeVec_t * vNodesAll
Definition: fpgaInt.h:111
void Fpga_NodeVecShrink(Fpga_NodeVec_t *p, int nSizeNew)
Definition: fpgaVec.c:136
Fpga_Cut_t * pOne
Definition: fpgaInt.h:234
int Fpga_LutLibDelaysAreDiscrete(Fpga_LutLib_t *pLutLib)
Definition: fpgaLib.c:236
int Fpga_CutListCount(Fpga_Cut_t *pSets)
Definition: fpgaCutUtils.c:211
Fpga_NodeVec_t * Fpga_MappingDfs(Fpga_Man_t *pMan, int fCollectEquiv)
FUNCTION DEFINITIONS ///.
Definition: fpgaUtils.c:54
Fpga_NodeVec_t * Fpga_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: fpgaVec.c:45
void Fpga_NodeVecFree(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:68
unsigned uSign
Definition: fpgaInt.h:239
void Fpga_TimeComputeRequired(Fpga_Man_t *p, float fRequired)
Definition: fpgaTime.c:168
clock_t timeRecover
Definition: fpgaInt.h:162
void Fpga_SortNodesByArrivalTimes(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:326
unsigned Value
Definition: fpgaInt.h:192
Fpga_Node_t * pNext
Definition: fpgaInt.h:183
int Fpga_NodeVecReadSize(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:101
Fpga_Node_t * pRepr
Definition: fpgaInt.h:203
float Fpga_CutGetAreaDerefed(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:362
void Fpga_ManReportChoices(Fpga_Man_t *pMan)
Definition: fpgaUtils.c:897
void Fpga_MappingSetupTruthTables(unsigned uTruths[][2])
Definition: fpgaUtils.c:449
static int Fpga_FloatMoreThan(Fpga_Man_t *p, float Arg1, float Arg2)
Definition: fpgaInt.h:281
void Fpga_TimePropagateArrival(Fpga_Man_t *p)
Definition: fpgaTime.c:245
Fpga_Node_t * pConst1
Definition: fpgaInt.h:110
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
void Fpga_CutFree(Fpga_Man_t *p, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:85
void Fpga_NodeRemoveFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanoutToRemove)
float Fpga_CutDeref(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
Definition: fpgaCutUtils.c:421
float fRequiredGain
Definition: fpgaInt.h:148
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
int Fpga_MappingMaxLevel(Fpga_Man_t *pMan)
Definition: fpgaUtils.c:804
#define FPGA_MAX_LUTSIZE
INCLUDES ///.
Definition: fpga.h:37
void Fpga_CutPrint(Fpga_Man_t *p, Fpga_Node_t *pRoot, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:102
float Fpga_TimeCutComputeArrival_rec(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
Definition: fpgaTime.c:69
unsigned fInv
Definition: fpgaInt.h:191
Fpga_Cut_t * Fpga_CutDup(Fpga_Man_t *p, Fpga_Cut_t *pCutOld)
Definition: fpgaCutUtils.c:62
clock_t timeTruth
Definition: fpgaInt.h:160
void Fpga_NodeVecSortByLevel(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:289
Extra_MmFixed_t * mmNodes
Definition: fpgaInt.h:140
Extra_MmFixed_t * mmCuts
Definition: fpgaInt.h:141
STRUCTURE DEFINITIONS ///.
Definition: fpgaInt.h:99
float Fpga_CutRef(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
Definition: fpgaCutUtils.c:384
Fpga_Cut_t * Fpga_CutCreateSimple(Fpga_Man_t *p, Fpga_Node_t *pNode)
Definition: fpgaCutUtils.c:123
Fpga_Node_t * pRoot
Definition: fpgaInt.h:236
float fDelayWindow
Definition: fpgaInt.h:152
float Fpga_TimeCutComputeArrival(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
DECLARATIONS ///.
Definition: fpgaTime.c:44
Fpga_Node_t * Fpga_NodeVecReadEntry(Fpga_NodeVec_t *p, int i)
Definition: fpgaVec.c:246
void Fpga_MappingShow(Fpga_Man_t *pMan, char *pFileName)
void Fpga_NodeVecWriteEntry(Fpga_NodeVec_t *p, int i, Fpga_Node_t *Entry)
Definition: fpgaVec.c:229
Fpga_Cut_t * Fpga_CutAlloc(Fpga_Man_t *p)
DECLARATIONS ///.
Definition: fpgaCutUtils.c:43
Fpga_LutLib_t * pLutLib
Definition: fpgaInt.h:137
unsigned fTemp
Definition: fpgaInt.h:194
float fRequiredStart
Definition: fpgaInt.h:147
Fpga_Node_t ** pArray
Definition: fpgaInt.h:252
Fpga_Cut_t * pCutBest
Definition: fpgaInt.h:222
void Fpga_MappingShowNodes(Fpga_Man_t *pMan, Fpga_Node_t **ppRoots, int nRoots, char *pFileName)
Fpga_Node_t * p2
Definition: fpgaInt.h:201
Fpga_Cut_t * pNext
Definition: fpgaInt.h:246
clock_t timeToNet
Definition: fpgaInt.h:163
float DelayTarget
Definition: fpgaInt.h:127
Fpga_Node_t ** pBins
Definition: fpgaInt.h:102
Fpga_Node_t * pNextE
Definition: fpgaInt.h:202
clock_t time2
Definition: fpgaInt.h:166
void Fpga_NodeVecClear(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:153
void Fpga_NodeVecPushOrder(Fpga_NodeVec_t *vNodes, Fpga_Node_t *pNode, int fIncreasing)
Definition: fpgaVec.c:366
Fpga_NodeVec_t * vAnds
Definition: fpgaInt.h:112
clock_t timeMatch
Definition: fpgaInt.h:161
float fRequiredGlo
Definition: fpgaInt.h:145
float Fpga_TimeComputeArrivalMax(Fpga_Man_t *p)
Definition: fpgaTime.c:89
float Fpga_MappingGetAreaFlow(Fpga_Man_t *p)
Definition: fpgaUtils.c:153
void Fpga_MappingCuts(Fpga_Man_t *p)
GLOBAL VARIABLES ///.
Definition: fpgaCut.c:130
float fRequiredShift
Definition: fpgaInt.h:146
float Fpga_CutDerefSwitch(Fpga_Man_t *pMan, Fpga_Node_t *pNode, Fpga_Cut_t *pCut, int fFanouts)
Definition: fpgaSwitch.c:95
void Fpga_NodeVecPush(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
Definition: fpgaVec.c:169
int Fpga_NodeGetFanoutNum(Fpga_Node_t *pNode)
float Fpga_CutGetAreaFlow(Fpga_Man_t *pMan, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:314
char * pFileName
Definition: fpgaInt.h:116
float Fpga_CutGetRootArea(Fpga_Man_t *p, Fpga_Cut_t *pCut)
Definition: fpgaCutUtils.c:146
int Fpga_CountLevels(Fpga_Man_t *pMan)
float Fpga_MappingGetSwitching(Fpga_Man_t *pMan, Fpga_NodeVec_t *vMapping)
Definition: fpgaSwitch.c:127
unsigned uData
Definition: fpgaInt.h:196
Fpga_NodeVec_t * Fpga_MappingDfsNodes(Fpga_Man_t *pMan, Fpga_Node_t **ppNodes, int nNodes, int fEquiv)
Definition: fpgaUtils.c:129