abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fpgaCreate.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [fpgaCreate.c]
4 
5  PackageName [MVSIS 1.3: 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: fpgaCreate.c,v 1.8 2004/09/30 21:18:09 satrajit Exp $]
16 
17 ***********************************************************************/
18 
19 #include "fpgaInt.h"
20 #include "base/main/main.h"
21 
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// DECLARATIONS ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 static void Fpga_TableCreate( Fpga_Man_t * p );
30 static void Fpga_TableResize( Fpga_Man_t * p );
32 
33 // hash key for the structural hash table
34 static inline unsigned Fpga_HashKey2( Fpga_Node_t * p0, Fpga_Node_t * p1, int TableSize ) { return (unsigned)(((ABC_PTRUINT_T)(p0) + (ABC_PTRUINT_T)(p1) * 12582917) % TableSize); }
35 
36 ////////////////////////////////////////////////////////////////////////
37 /// FUNCTION DEFINITIONS ///
38 ////////////////////////////////////////////////////////////////////////
39 
40 /**Function*************************************************************
41 
42  Synopsis [Reads parameters of the mapping manager.]
43 
44  Description []
45 
46  SideEffects []
47 
48  SeeAlso []
49 
50 ***********************************************************************/
51 int Fpga_ManReadInputNum( Fpga_Man_t * p ) { return p->nInputs; }
52 int Fpga_ManReadOutputNum( Fpga_Man_t * p ) { return p->nOutputs; }
57 int Fpga_ManReadVerbose( Fpga_Man_t * p ) { return p->fVerbose; }
58 int Fpga_ManReadVarMax( Fpga_Man_t * p ) { return p->pLutLib->LutMax; }
59 float * Fpga_ManReadLutAreas( Fpga_Man_t * p ) { return p->pLutLib->pLutAreas; }
61 void Fpga_ManSetOutputNames( Fpga_Man_t * p, char ** ppNames ) { p->ppOutputNames = ppNames; }
62 void Fpga_ManSetInputArrivals( Fpga_Man_t * p, float * pArrivals ) { p->pInputArrivals = pArrivals; }
63 void Fpga_ManSetAreaRecovery( Fpga_Man_t * p, int fAreaRecovery ) { p->fAreaRecovery = fAreaRecovery;}
64 void Fpga_ManSetDelayLimit( Fpga_Man_t * p, float DelayLimit ) { p->DelayLimit = DelayLimit; }
65 void Fpga_ManSetAreaLimit( Fpga_Man_t * p, float AreaLimit ) { p->AreaLimit = AreaLimit; }
66 void Fpga_ManSetChoiceNodeNum( Fpga_Man_t * p, int nChoiceNodes ) { p->nChoiceNodes = nChoiceNodes; }
67 void Fpga_ManSetChoiceNum( Fpga_Man_t * p, int nChoices ) { p->nChoices = nChoices; }
68 void Fpga_ManSetVerbose( Fpga_Man_t * p, int fVerbose ) { p->fVerbose = fVerbose; }
69 void Fpga_ManSetSwitching( Fpga_Man_t * p, int fSwitching ) { p->fSwitching = fSwitching; }
70 void Fpga_ManSetLatchPaths( Fpga_Man_t * p, int fLatchPaths ) { p->fLatchPaths = fLatchPaths; }
71 void Fpga_ManSetLatchNum( Fpga_Man_t * p, int nLatches ) { p->nLatches = nLatches; }
72 void Fpga_ManSetDelayTarget( Fpga_Man_t * p, float DelayTarget ) { p->DelayTarget = DelayTarget; }
73 void Fpga_ManSetName( Fpga_Man_t * p, char * pFileName ) { p->pFileName = pFileName; }
74 
75 /**Function*************************************************************
76 
77  Synopsis [Reads the parameters of the LUT library.]
78 
79  Description []
80 
81  SideEffects []
82 
83  SeeAlso []
84 
85 ***********************************************************************/
86 int Fpga_LibReadLutMax( Fpga_LutLib_t * pLib ) { return pLib->LutMax; }
87 
88 /**Function*************************************************************
89 
90  Synopsis [Reads parameters of the mapping node.]
91 
92  Description []
93 
94  SideEffects []
95 
96  SeeAlso []
97 
98 ***********************************************************************/
99 char * Fpga_NodeReadData0( Fpga_Node_t * p ) { return p->pData0; }
101 int Fpga_NodeReadRefs( Fpga_Node_t * p ) { return p->nRefs; }
102 int Fpga_NodeReadNum( Fpga_Node_t * p ) { return p->Num; }
103 int Fpga_NodeReadLevel( Fpga_Node_t * p ) { return Fpga_Regular(p)->Level; }
108 void Fpga_NodeSetData0( Fpga_Node_t * p, char * pData ) { p->pData0 = pData; }
109 void Fpga_NodeSetData1( Fpga_Node_t * p, Fpga_Node_t * pNode ) { p->pLevel = pNode; }
110 void Fpga_NodeSetNextE( Fpga_Node_t * p, Fpga_Node_t * pNextE ) { p->pNextE = pNextE; }
111 void Fpga_NodeSetRepr( Fpga_Node_t * p, Fpga_Node_t * pRepr ) { p->pRepr = pRepr; }
112 void Fpga_NodeSetSwitching( Fpga_Node_t * p, float Switching ) { p->Switching = Switching; }
113 
114 /**Function*************************************************************
115 
116  Synopsis [Checks the type of the node.]
117 
118  Description []
119 
120  SideEffects []
121 
122  SeeAlso []
123 
124 ***********************************************************************/
125 int Fpga_NodeIsConst( Fpga_Node_t * p ) { return (Fpga_Regular(p))->Num == -1; }
126 int Fpga_NodeIsVar( Fpga_Node_t * p ) { return (Fpga_Regular(p))->p1 == NULL && (Fpga_Regular(p))->Num >= 0; }
127 int Fpga_NodeIsAnd( Fpga_Node_t * p ) { return (Fpga_Regular(p))->p1 != NULL; }
128 int Fpga_NodeComparePhase( Fpga_Node_t * p1, Fpga_Node_t * p2 ) { assert( !Fpga_IsComplement(p1) ); assert( !Fpga_IsComplement(p2) ); return p1->fInv ^ p2->fInv; }
129 
130 /**Function*************************************************************
131 
132  Synopsis [Reads parameters from the cut.]
133 
134  Description []
135 
136  SideEffects []
137 
138  SeeAlso []
139 
140 ***********************************************************************/
141 int Fpga_CutReadLeavesNum( Fpga_Cut_t * p ) { return p->nLeaves; }
143 
144 
145 /**Function*************************************************************
146 
147  Synopsis [Create the mapping manager.]
148 
149  Description [The number of inputs and outputs is assumed to be
150  known is advance. It is much simpler to have them fixed upfront.
151  When it comes to representing the object graph in the form of
152  AIG, the resulting manager is similar to the regular AIG manager,
153  except that it does not use reference counting (and therefore
154  does not have garbage collections). It does have table resizing.
155  The data structure is more flexible to represent additional
156  information needed for mapping.]
157 
158  SideEffects []
159 
160  SeeAlso []
161 
162 ***********************************************************************/
163 Fpga_Man_t * Fpga_ManCreate( int nInputs, int nOutputs, int fVerbose )
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) );
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) );
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 }
205 
206 /**Function*************************************************************
207 
208  Synopsis [Deallocates the mapping manager.]
209 
210  Description []
211 
212  SideEffects []
213 
214  SeeAlso []
215 
216 ***********************************************************************/
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 )
226  if ( p->vAnds )
227  Fpga_NodeVecFree( p->vAnds );
228  if ( p->vNodesAll )
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 }
239 
240 
241 /**Function*************************************************************
242 
243  Synopsis [Prints runtime statistics of the mapping manager.]
244 
245  Description []
246 
247  SideEffects []
248 
249  SeeAlso []
250 
251 ***********************************************************************/
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 }
280 
281 /**Function*************************************************************
282 
283  Synopsis [Creates a new node.]
284 
285  Description [This procedure should be called to create the constant
286  node and the PI nodes first.]
287 
288  SideEffects []
289 
290  SeeAlso []
291 
292 ***********************************************************************/
294 {
295  Fpga_Node_t * pNode;
296  // create the node
298  memset( pNode, 0, sizeof(Fpga_Node_t) );
299  // set very large required time
300  pNode->tRequired = FPGA_FLOAT_LARGE;
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 }
330 
331 /**Function*************************************************************
332 
333  Synopsis [Create the unique table of AND gates.]
334 
335  Description []
336 
337  SideEffects []
338 
339  SeeAlso []
340 
341 ***********************************************************************/
343 {
344  assert( pMan->pBins == NULL );
345  pMan->nBins = Abc_PrimeCudd(50000);
346  pMan->pBins = ABC_ALLOC( Fpga_Node_t *, pMan->nBins );
347  memset( pMan->pBins, 0, sizeof(Fpga_Node_t *) * pMan->nBins );
348  pMan->nNodes = 0;
349 }
350 
351 /**Function*************************************************************
352 
353  Synopsis [Looks up the AND2 node in the unique table.]
354 
355  Description [This procedure implements one-level hashing. All the nodes
356  are hashed by their children. If the node with the same children was already
357  created, it is returned by the call to this procedure. If it does not exist,
358  this procedure creates a new node with these children. ]
359 
360  SideEffects []
361 
362  SeeAlso []
363 
364 ***********************************************************************/
366 {
367  Fpga_Node_t * pEnt;
368  unsigned Key;
369 
370  if ( p1 == p2 )
371  return p1;
372  if ( p1 == Fpga_Not(p2) )
373  return Fpga_Not(pMan->pConst1);
374  if ( Fpga_NodeIsConst(p1) )
375  {
376  if ( p1 == pMan->pConst1 )
377  return p2;
378  return Fpga_Not(pMan->pConst1);
379  }
380  if ( Fpga_NodeIsConst(p2) )
381  {
382  if ( p2 == pMan->pConst1 )
383  return p1;
384  return Fpga_Not(pMan->pConst1);
385  }
386 
387  if ( Fpga_Regular(p1)->Num > Fpga_Regular(p2)->Num )
388  pEnt = p1, p1 = p2, p2 = pEnt;
389 
390  Key = Fpga_HashKey2( p1, p2, pMan->nBins );
391  for ( pEnt = pMan->pBins[Key]; pEnt; pEnt = pEnt->pNext )
392  if ( pEnt->p1 == p1 && pEnt->p2 == p2 )
393  return pEnt;
394  // resize the table
395  if ( pMan->nNodes >= 2 * pMan->nBins )
396  {
397  Fpga_TableResize( pMan );
398  Key = Fpga_HashKey2( p1, p2, pMan->nBins );
399  }
400  // create the new node
401  pEnt = Fpga_NodeCreate( pMan, p1, p2 );
402  // add the node to the corresponding linked list in the table
403  pEnt->pNext = pMan->pBins[Key];
404  pMan->pBins[Key] = pEnt;
405  return pEnt;
406 }
407 
408 
409 /**Function*************************************************************
410 
411  Synopsis [Resizes the table.]
412 
413  Description []
414 
415  SideEffects []
416 
417  SeeAlso []
418 
419 ***********************************************************************/
421 {
422  Fpga_Node_t ** pBinsNew;
423  Fpga_Node_t * pEnt, * pEnt2;
424  int nBinsNew, Counter, i;
425  clock_t clk;
426  unsigned Key;
427 
428 clk = clock();
429  // get the new table size
430  nBinsNew = Abc_PrimeCudd(2 * pMan->nBins);
431  // allocate a new array
432  pBinsNew = ABC_ALLOC( Fpga_Node_t *, nBinsNew );
433  memset( pBinsNew, 0, sizeof(Fpga_Node_t *) * nBinsNew );
434  // rehash the entries from the old table
435  Counter = 0;
436  for ( i = 0; i < pMan->nBins; i++ )
437  for ( pEnt = pMan->pBins[i], pEnt2 = pEnt? pEnt->pNext: NULL; pEnt;
438  pEnt = pEnt2, pEnt2 = pEnt? pEnt->pNext: NULL )
439  {
440  Key = Fpga_HashKey2( pEnt->p1, pEnt->p2, nBinsNew );
441  pEnt->pNext = pBinsNew[Key];
442  pBinsNew[Key] = pEnt;
443  Counter++;
444  }
445  assert( Counter == pMan->nNodes - pMan->nInputs );
446  if ( pMan->fVerbose )
447  {
448 // printf( "Increasing the unique table size from %6d to %6d. ", pMan->nBins, nBinsNew );
449 // ABC_PRT( "Time", clock() - clk );
450  }
451  // replace the table and the parameters
452  ABC_FREE( pMan->pBins );
453  pMan->pBins = pBinsNew;
454  pMan->nBins = nBinsNew;
455 }
456 
457 
458 
459 /**Function*************************************************************
460 
461  Synopsis [Elementary AND operation on the AIG.]
462 
463  Description []
464 
465  SideEffects []
466 
467  SeeAlso []
468 
469 ***********************************************************************/
471 {
472  Fpga_Node_t * pNode;
473  pNode = Fpga_TableLookup( p, p1, p2 );
474  return pNode;
475 }
476 
477 /**Function*************************************************************
478 
479  Synopsis [Elementary OR operation on the AIG.]
480 
481  Description []
482 
483  SideEffects []
484 
485  SeeAlso []
486 
487 ***********************************************************************/
489 {
490  Fpga_Node_t * pNode;
491  pNode = Fpga_Not( Fpga_TableLookup( p, Fpga_Not(p1), Fpga_Not(p2) ) );
492  return pNode;
493 }
494 
495 /**Function*************************************************************
496 
497  Synopsis [Elementary EXOR operation on the AIG.]
498 
499  Description []
500 
501  SideEffects []
502 
503  SeeAlso []
504 
505 ***********************************************************************/
507 {
508  return Fpga_NodeMux( p, p1, Fpga_Not(p2), p2 );
509 }
510 
511 /**Function*************************************************************
512 
513  Synopsis [Elementary MUX operation on the AIG.]
514 
515  Description []
516 
517  SideEffects []
518 
519  SeeAlso []
520 
521 ***********************************************************************/
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 }
530 
531 
532 /**Function*************************************************************
533 
534  Synopsis [Sets the node to be equivalent to the given one.]
535 
536  Description [This procedure is a work-around for the equivalence check.
537  Does not verify the equivalence. Use at the user's risk.]
538 
539  SideEffects []
540 
541  SeeAlso []
542 
543 ***********************************************************************/
544 void Fpga_NodeSetChoice( Fpga_Man_t * pMan, Fpga_Node_t * pNodeOld, Fpga_Node_t * pNodeNew )
545 {
546  pNodeNew->pNextE = pNodeOld->pNextE;
547  pNodeOld->pNextE = pNodeNew;
548  pNodeNew->pRepr = pNodeOld;
549 }
550 
551 
552 
553 /**Function*************************************************************
554 
555  Synopsis [Prints some interesting stats.]
556 
557  Description []
558 
559  SideEffects []
560 
561  SeeAlso []
562 
563 ***********************************************************************/
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 }
577 
578 
579 ////////////////////////////////////////////////////////////////////////
580 /// END OF FILE ///
581 ////////////////////////////////////////////////////////////////////////
582 
584 
char * memset()
Fpga_Node_t * Fpga_NodeReadData1(Fpga_Node_t *p)
Definition: fpgaCreate.c:100
float * pInputArrivals
Definition: fpgaInt.h:118
void Fpga_NodeSetNextE(Fpga_Node_t *p, Fpga_Node_t *pNextE)
Definition: fpgaCreate.c:110
Fpga_Node_t ** Fpga_CutReadLeaves(Fpga_Cut_t *p)
Definition: fpgaCreate.c:142
static int Abc_PrimeCudd(unsigned int p)
Definition: abc_global.h:383
float * Fpga_ManReadInputArrivals(Fpga_Man_t *p)
Definition: fpgaCreate.c:56
Fpga_Node_t ** pInputs
Definition: fpgaInt.h:104
Fpga_Node_t ** Fpga_ManReadInputs(Fpga_Man_t *p)
Definition: fpgaCreate.c:53
Fpga_Cut_t * Fpga_NodeReadCutBest(Fpga_Node_t *p)
Definition: fpgaCreate.c:105
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Fpga_Node_t * Fpga_TableLookup(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition: fpgaCreate.c:365
void Fpga_ManSetSwitching(Fpga_Man_t *p, int fSwitching)
Definition: fpgaCreate.c:69
int Fpga_ManReadOutputNum(Fpga_Man_t *p)
Definition: fpgaCreate.c:52
void Fpga_ManSetName(Fpga_Man_t *p, char *pFileName)
Definition: fpgaCreate.c:73
void Fpga_ManSetChoiceNum(Fpga_Man_t *p, int nChoices)
Definition: fpgaCreate.c:67
char * Fpga_NodeReadData0(Fpga_Node_t *p)
Definition: fpgaCreate.c:99
int Fpga_CutReadLeavesNum(Fpga_Cut_t *p)
Definition: fpgaCreate.c:141
int Fpga_ManReadInputNum(Fpga_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: fpgaCreate.c:51
clock_t timeToMap
Definition: fpgaInt.h:158
unsigned Level
Definition: fpgaInt.h:195
Fpga_Node_t ** pOutputs
Definition: fpgaInt.h:106
static void Fpga_TableResize(Fpga_Man_t *p)
Definition: fpgaCreate.c:420
int Fpga_NodeReadNum(Fpga_Node_t *p)
Definition: fpgaCreate.c:102
void Fpga_ManSetAreaRecovery(Fpga_Man_t *p, int fAreaRecovery)
Definition: fpgaCreate.c:63
void Extra_MmFixedStop(Extra_MmFixed_t *p)
#define FPGA_FLOAT_LARGE
Definition: fpgaInt.h:65
Fpga_Node_t * Fpga_NodeCreate(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition: fpgaCreate.c:293
int Fpga_NodeIsAnd(Fpga_Node_t *p)
Definition: fpgaCreate.c:127
Fpga_Node_t * Fpga_NodeReadOne(Fpga_Node_t *p)
Definition: fpgaCreate.c:106
void Fpga_ManSetDelayTarget(Fpga_Man_t *p, float DelayTarget)
Definition: fpgaCreate.c:72
clock_t timeTotal
Definition: fpgaInt.h:164
clock_t timeCuts
Definition: fpgaInt.h:159
Fpga_Node_t * Fpga_ManReadConst1(Fpga_Man_t *p)
Definition: fpgaCreate.c:55
Fpga_NodeVec_t * vMapping
Definition: fpgaInt.h:113
Fpga_Node_t * pLevel
Definition: fpgaInt.h:184
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
char ** ppOutputNames
Definition: fpgaInt.h:117
#define FPGA_MAX(a, b)
Definition: fpgaInt.h:62
void Fpga_ManSetDelayLimit(Fpga_Man_t *p, float DelayLimit)
Definition: fpgaCreate.c:64
#define Fpga_Not(p)
Definition: fpga.h:59
float pLutAreas[FPGA_MAX_LUTSIZE+1]
Definition: fpgaInt.h:175
void Fpga_NodeSetChoice(Fpga_Man_t *pMan, Fpga_Node_t *pNodeOld, Fpga_Node_t *pNodeNew)
Definition: fpgaCreate.c:544
Fpga_Cut_t * pCuts
Definition: fpgaInt.h:224
char * Extra_MmFixedEntryFetch(Extra_MmFixed_t *p)
int Fpga_CutCountAll(Fpga_Man_t *pMan)
Definition: fpgaCut.c:767
Fpga_Node_t * ppLeaves[FPGA_MAX_LEAVES+1]
Definition: fpgaInt.h:237
clock_t time1
Definition: fpgaInt.h:165
#define Fpga_NodeRef(p)
Definition: fpgaInt.h:86
void Fpga_NodeAddFaninFanout(Fpga_Node_t *pFanin, Fpga_Node_t *pFanout)
float DelayLimit
Definition: fpgaInt.h:153
void Fpga_ManSetVerbose(Fpga_Man_t *p, int fVerbose)
Definition: fpgaCreate.c:68
void Fpga_ManSetChoiceNodeNum(Fpga_Man_t *p, int nChoiceNodes)
Definition: fpgaCreate.c:66
Fpga_Node_t * p1
Definition: fpgaInt.h:200
void Fpga_NodeSetSwitching(Fpga_Node_t *p, float Switching)
Definition: fpgaCreate.c:112
Fpga_Node_t * Fpga_NodeOr(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition: fpgaCreate.c:488
Fpga_Cut_t * Fpga_NodeReadCuts(Fpga_Node_t *p)
Definition: fpgaCreate.c:104
void Fpga_NodeSetData0(Fpga_Node_t *p, char *pData)
Definition: fpgaCreate.c:108
Fpga_NodeVec_t * vNodesAll
Definition: fpgaInt.h:111
Fpga_NodeVec_t * Fpga_NodeVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: fpgaVec.c:45
void Fpga_NodeVecFree(Fpga_NodeVec_t *p)
Definition: fpgaVec.c:68
int Fpga_NodeReadRefs(Fpga_Node_t *p)
Definition: fpgaCreate.c:101
Fpga_Node_t * Fpga_NodeExor(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition: fpgaCreate.c:506
int Fpga_NodeIsConst(Fpga_Node_t *p)
Definition: fpgaCreate.c:125
clock_t timeRecover
Definition: fpgaInt.h:162
Fpga_Node_t * pNext
Definition: fpgaInt.h:183
Fpga_Node_t * pRepr
Definition: fpgaInt.h:203
void Fpga_ManSetLatchNum(Fpga_Man_t *p, int nLatches)
Definition: fpgaCreate.c:71
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
int Fpga_ManReadVerbose(Fpga_Man_t *p)
Definition: fpgaCreate.c:57
static int Counter
Fpga_Node_t * pConst1
Definition: fpgaInt.h:110
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
void Fpga_NodeSetRepr(Fpga_Node_t *p, Fpga_Node_t *pRepr)
Definition: fpgaCreate.c:111
void Fpga_ManFree(Fpga_Man_t *p)
Definition: fpgaCreate.c:217
static unsigned Fpga_HashKey2(Fpga_Node_t *p0, Fpga_Node_t *p1, int TableSize)
Definition: fpgaCreate.c:34
Fpga_Node_t * Fpga_NodeReadTwo(Fpga_Node_t *p)
Definition: fpgaCreate.c:107
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
int Fpga_ManReadVarMax(Fpga_Man_t *p)
Definition: fpgaCreate.c:58
unsigned fInv
Definition: fpgaInt.h:191
void Fpga_ManSetInputArrivals(Fpga_Man_t *p, float *pArrivals)
Definition: fpgaCreate.c:62
int Fpga_NodeIsVar(Fpga_Node_t *p)
Definition: fpgaCreate.c:126
Extra_MmFixed_t * mmNodes
Definition: fpgaInt.h:140
Extra_MmFixed_t * mmCuts
Definition: fpgaInt.h:141
STRUCTURE DEFINITIONS ///.
Definition: fpgaInt.h:99
#define Fpga_Regular(p)
Definition: fpga.h:58
#define ABC_FREE(obj)
Definition: abc_global.h:232
#define ABC_PRT(a, t)
Definition: abc_global.h:220
void Fpga_ManSetAreaLimit(Fpga_Man_t *p, float AreaLimit)
Definition: fpgaCreate.c:65
void Fpga_NodeSetData1(Fpga_Node_t *p, Fpga_Node_t *pNode)
Definition: fpgaCreate.c:109
#define Fpga_NodeIsSimComplement(p)
Definition: fpgaInt.h:89
void Fpga_ManStats(Fpga_Man_t *p)
Definition: fpgaCreate.c:564
static ABC_NAMESPACE_IMPL_START void Fpga_TableCreate(Fpga_Man_t *p)
DECLARATIONS ///.
Definition: fpgaCreate.c:342
int Fpga_NodeReadLevel(Fpga_Node_t *p)
Definition: fpgaCreate.c:103
void Fpga_ManPrintTimeStats(Fpga_Man_t *p)
Definition: fpgaCreate.c:252
Fpga_Node_t * Fpga_NodeAnd(Fpga_Man_t *p, Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition: fpgaCreate.c:470
#define assert(ex)
Definition: util_old.h:213
#define FPGA_NUM_BYTES(n)
Definition: fpgaInt.h:58
void Fpga_ManSetLatchPaths(Fpga_Man_t *p, int fLatchPaths)
Definition: fpgaCreate.c:70
Fpga_LutLib_t * pLutLib
Definition: fpgaInt.h:137
int Fpga_LibReadLutMax(Fpga_LutLib_t *pLib)
Definition: fpgaCreate.c:86
Fpga_Cut_t * pCutBest
Definition: fpgaInt.h:222
Fpga_Man_t * Fpga_ManCreate(int nInputs, int nOutputs, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition: fpgaCreate.c:163
Fpga_Node_t * p2
Definition: fpgaInt.h:201
Fpga_NodeVec_t * Fpga_ManReadMapping(Fpga_Man_t *p)
Definition: fpgaCreate.c:60
clock_t timeToNet
Definition: fpgaInt.h:163
float DelayTarget
Definition: fpgaInt.h:127
Fpga_Node_t ** pBins
Definition: fpgaInt.h:102
void Fpga_ManSetOutputNames(Fpga_Man_t *p, char **ppNames)
Definition: fpgaCreate.c:61
Fpga_Node_t * pNextE
Definition: fpgaInt.h:202
clock_t time2
Definition: fpgaInt.h:166
float * Fpga_ManReadLutAreas(Fpga_Man_t *p)
Definition: fpgaCreate.c:59
Fpga_NodeVec_t * vAnds
Definition: fpgaInt.h:112
clock_t timeMatch
Definition: fpgaInt.h:161
float fRequiredGlo
Definition: fpgaInt.h:145
Fpga_Node_t ** Fpga_ManReadOutputs(Fpga_Man_t *p)
Definition: fpgaCreate.c:54
ABC_DLL void * Abc_FrameReadLibLut()
Definition: mainFrame.c:54
#define Fpga_IsComplement(p)
GLOBAL VARIABLES ///.
Definition: fpga.h:57
int Fpga_NodeComparePhase(Fpga_Node_t *p1, Fpga_Node_t *p2)
Definition: fpgaCreate.c:128
void Fpga_NodeVecPush(Fpga_NodeVec_t *p, Fpga_Node_t *Entry)
Definition: fpgaVec.c:169
char * pFileName
Definition: fpgaInt.h:116