abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
giaScript.c File Reference
#include "giaAig.h"
#include "base/main/main.h"
#include "base/cmd/cmd.h"
#include "proof/dch/dch.h"
#include "opt/dau/dau.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Gia_ManAigPrintPiLevels (Gia_Man_t *p)
 DECLARATIONS ///. More...
 
Gia_Man_tGia_ManAigSyn2 (Gia_Man_t *pInit, int fOldAlgo, int fCoarsen, int fCutMin, int nRelaxRatio, int fDelayMin, int fVerbose, int fVeryVerbose)
 
Gia_Man_tGia_ManAigSyn3 (Gia_Man_t *p, int fVerbose, int fVeryVerbose)
 
Gia_Man_tGia_ManAigSyn4 (Gia_Man_t *p, int fVerbose, int fVeryVerbose)
 
Vec_Ptr_tGia_ManOrderPios (Aig_Man_t *p, Gia_Man_t *pOrder)
 
Gia_Man_tGia_ManDupFromBarBufs (Gia_Man_t *p)
 
Gia_Man_tGia_ManDupToBarBufs (Gia_Man_t *p, int nBarBufs)
 
Gia_Man_tGia_ManAigSynch2Choices (Gia_Man_t *pGia1, Gia_Man_t *pGia2, Gia_Man_t *pGia3, Dch_Pars_t *pPars)
 
Gia_Man_tGia_ManAigSynch2 (Gia_Man_t *pInit, void *pPars0, int nLutSize, int nRelaxRatio)
 
void Gia_ManPerformMap (int nAnds, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
 
void Gia_ManPerformRound (int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
 
void Gia_ManPerformFlow (int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
 
void Gia_ManPerformFlow2 (int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fMinAve, int fUseMfs, int fVerbose)
 

Function Documentation

ABC_NAMESPACE_IMPL_START void Gia_ManAigPrintPiLevels ( Gia_Man_t p)

DECLARATIONS ///.

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

FileName [giaScript.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Various hardcoded scripts.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
giaScript.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

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

Synopsis [Synthesis script.]

Description []

SideEffects []

SeeAlso []

Definition at line 49 of file giaScript.c.

50 {
51  Gia_Obj_t * pObj;
52  int i;
53  Gia_ManForEachPi( p, pObj, i )
54  printf( "%d ", Gia_ObjLevel(p, pObj) );
55  printf( "\n" );
56 }
Definition: gia.h:75
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:501
#define Gia_ManForEachPi(p, pObj, i)
Definition: gia.h:1034
Gia_Man_t* Gia_ManAigSyn2 ( Gia_Man_t pInit,
int  fOldAlgo,
int  fCoarsen,
int  fCutMin,
int  nRelaxRatio,
int  fDelayMin,
int  fVerbose,
int  fVeryVerbose 
)

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

Synopsis [Synthesis script.]

Description []

SideEffects []

SeeAlso []

Definition at line 69 of file giaScript.c.

70 {
71  Gia_Man_t * p, * pNew, * pTemp;
72  Jf_Par_t Pars, * pPars = &Pars;
73  if ( fOldAlgo )
74  {
75  Jf_ManSetDefaultPars( pPars );
76  pPars->fCutMin = fCutMin;
77  }
78  else
79  {
80  Lf_ManSetDefaultPars( pPars );
81  pPars->fCutMin = fCutMin;
82  pPars->fCoarsen = fCoarsen;
83  pPars->nRelaxRatio = nRelaxRatio;
84  pPars->nAreaTuner = 1;
85  pPars->nCutNum = 4;
86  }
87  if ( fVerbose ) Gia_ManPrintStats( pInit, NULL );
88  p = Gia_ManDup( pInit );
89  Gia_ManTransferTiming( p, pInit );
90  if ( Gia_ManAndNum(p) == 0 )
91  return p;
92  // delay optimization
93  if ( fDelayMin && p->pManTime == NULL )
94  {
95  int Area0, Area1, Delay0, Delay1;
96  int fCutMin = pPars->fCutMin;
97  int fCoarsen = pPars->fCoarsen;
98  int nRelaxRatio = pPars->nRelaxRatio;
99  pPars->fCutMin = 0;
100  pPars->fCoarsen = 0;
101  pPars->nRelaxRatio = 0;
102  // perform mapping
103  if ( fOldAlgo )
104  Jf_ManPerformMapping( p, pPars );
105  else
106  Lf_ManPerformMapping( p, pPars );
107  Area0 = (int)pPars->Area;
108  Delay0 = (int)pPars->Delay;
109  // perform balancing
110  pNew = Gia_ManPerformDsdBalance( p, 6, 4, 0, 0 );
111  // perform mapping again
112  if ( fOldAlgo )
113  Jf_ManPerformMapping( pNew, pPars );
114  else
115  Lf_ManPerformMapping( pNew, pPars );
116  Area1 = (int)pPars->Area;
117  Delay1 = (int)pPars->Delay;
118  // choose the best result
119  if ( Delay1 < Delay0 - 1 || (Delay1 == Delay0 + 1 && 100.0 * (Area1 - Area0) / Area1 < 3.0) )
120  {
121  Gia_ManStop( p );
122  p = pNew;
123  }
124  else
125  {
126  Gia_ManStop( pNew );
127  Vec_IntFreeP( &p->vMapping );
128  }
129  // reset params
130  pPars->fCutMin = fCutMin;
131  pPars->fCoarsen = fCoarsen;
132  pPars->nRelaxRatio = nRelaxRatio;
133  }
134  // perform balancing
135  pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 );
136  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
137  Gia_ManStop( p );
138  // perform mapping
139  if ( fOldAlgo )
140  pNew = Jf_ManPerformMapping( pTemp = pNew, pPars );
141  else
142  pNew = Lf_ManPerformMapping( pTemp = pNew, pPars );
143  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
144  if ( pTemp != pNew )
145  Gia_ManStop( pTemp );
146  // perform balancing
147  pNew = Gia_ManAreaBalance( pTemp = pNew, 0, ABC_INFINITY, fVeryVerbose, 0 );
148  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
149  Gia_ManStop( pTemp );
150  return pNew;
151 }
Gia_Man_t * Jf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaJf.c:1712
void Lf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaLf.c:1981
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition: giaDup.c:552
int nCutNum
Definition: gia.h:268
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Gia_Man_t * Lf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaLf.c:2193
int nAreaTuner
Definition: gia.h:274
Gia_Man_t * Gia_ManPerformDsdBalance(Gia_Man_t *p, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose)
Definition: giaIf.c:2058
int nRelaxRatio
Definition: gia.h:272
word Delay
Definition: gia.h:297
word Area
Definition: gia.h:298
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
Definition: gia.h:265
void Jf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaJf.c:1679
void * pManTime
Definition: gia.h:165
void Gia_ManTransferTiming(Gia_Man_t *p, Gia_Man_t *pGia)
Definition: giaIf.c:1912
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
Definition: gia.h:95
int fCutMin
Definition: gia.h:282
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
Gia_Man_t * Gia_ManAreaBalance(Gia_Man_t *p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose)
Definition: giaBalAig.c:968
Vec_Int_t * vMapping
Definition: gia.h:131
int fCoarsen
Definition: gia.h:281
Gia_Man_t* Gia_ManAigSyn3 ( Gia_Man_t p,
int  fVerbose,
int  fVeryVerbose 
)

Definition at line 152 of file giaScript.c.

153 {
154  Gia_Man_t * pNew, * pTemp;
155  Jf_Par_t Pars, * pPars = &Pars;
156  Jf_ManSetDefaultPars( pPars );
157  pPars->nRelaxRatio = 40;
158  if ( fVerbose ) Gia_ManPrintStats( p, NULL );
159  if ( Gia_ManAndNum(p) == 0 )
160  return Gia_ManDup(p);
161  // perform balancing
162  pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 );
163  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
164  // perform mapping
165  pPars->nLutSize = 6;
166  pNew = Jf_ManPerformMapping( pTemp = pNew, pPars );
167  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
168 // Gia_ManStop( pTemp );
169  // perform balancing
170  pNew = Gia_ManAreaBalance( pTemp = pNew, 0, ABC_INFINITY, fVeryVerbose, 0 );
171  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
172  Gia_ManStop( pTemp );
173  // perform mapping
174  pPars->nLutSize = 4;
175  pNew = Jf_ManPerformMapping( pTemp = pNew, pPars );
176  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
177 // Gia_ManStop( pTemp );
178  // perform balancing
179  pNew = Gia_ManAreaBalance( pTemp = pNew, 0, ABC_INFINITY, fVeryVerbose, 0 );
180  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
181  Gia_ManStop( pTemp );
182  return pNew;
183 }
Gia_Man_t * Jf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaJf.c:1712
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition: giaDup.c:552
int nLutSize
Definition: gia.h:267
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
int nRelaxRatio
Definition: gia.h:272
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
Definition: gia.h:265
void Jf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaJf.c:1679
Definition: gia.h:95
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
Gia_Man_t * Gia_ManAreaBalance(Gia_Man_t *p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose)
Definition: giaBalAig.c:968
Gia_Man_t* Gia_ManAigSyn4 ( Gia_Man_t p,
int  fVerbose,
int  fVeryVerbose 
)

Definition at line 184 of file giaScript.c.

185 {
186  Gia_Man_t * pNew, * pTemp;
187  Jf_Par_t Pars, * pPars = &Pars;
188  Jf_ManSetDefaultPars( pPars );
189  pPars->nRelaxRatio = 40;
190  if ( fVerbose ) Gia_ManPrintStats( p, NULL );
191  if ( Gia_ManAndNum(p) == 0 )
192  return Gia_ManDup(p);
193 //Gia_ManAigPrintPiLevels( p );
194  // perform balancing
195  pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 );
196  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
197  // perform mapping
198  pPars->nLutSize = 7;
199  pNew = Jf_ManPerformMapping( pTemp = pNew, pPars );
200  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
201 // Gia_ManStop( pTemp );
202  // perform extraction
203  pNew = Gia_ManPerformFx( pTemp = pNew, ABC_INFINITY, 0, 0, fVeryVerbose, 0 );
204  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
205  Gia_ManStop( pTemp );
206  // perform balancing
207  pNew = Gia_ManAreaBalance( pTemp = pNew, 0, ABC_INFINITY, fVeryVerbose, 0 );
208  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
209  Gia_ManStop( pTemp );
210  // perform mapping
211  pPars->nLutSize = 5;
212  pNew = Jf_ManPerformMapping( pTemp = pNew, pPars );
213  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
214 // Gia_ManStop( pTemp );
215  // perform extraction
216  pNew = Gia_ManPerformFx( pTemp = pNew, ABC_INFINITY, 0, 0, fVeryVerbose, 0 );
217  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
218  Gia_ManStop( pTemp );
219  // perform balancing
220  pNew = Gia_ManAreaBalance( pTemp = pNew, 0, ABC_INFINITY, fVeryVerbose, 0 );
221  if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
222  Gia_ManStop( pTemp );
223 //Gia_ManAigPrintPiLevels( pNew );
224  return pNew;
225 }
Gia_Man_t * Jf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaJf.c:1712
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition: giaDup.c:552
int nLutSize
Definition: gia.h:267
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
Gia_Man_t * Gia_ManPerformFx(Gia_Man_t *p, int nNewNodesMax, int LitCountMax, int fReverse, int fVerbose, int fVeryVerbose)
Definition: giaFx.c:451
int nRelaxRatio
Definition: gia.h:272
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
Definition: gia.h:265
void Jf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaJf.c:1679
Definition: gia.h:95
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
Gia_Man_t * Gia_ManAreaBalance(Gia_Man_t *p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose)
Definition: giaBalAig.c:968
Gia_Man_t* Gia_ManAigSynch2 ( Gia_Man_t pInit,
void *  pPars0,
int  nLutSize,
int  nRelaxRatio 
)

Definition at line 386 of file giaScript.c.

387 {
388  extern Gia_Man_t * Gia_ManLutBalance( Gia_Man_t * p, int nLutSize, int fUseMuxes, int fRecursive, int fOptArea, int fVerbose );
389  Dch_Pars_t * pParsDch = (Dch_Pars_t *)pPars0;
390  Gia_Man_t * pGia1, * pGia2, * pGia3, * pNew, * pTemp;
391  int fVerbose = pParsDch->fVerbose;
392  Jf_Par_t Pars, * pPars = &Pars;
393  Lf_ManSetDefaultPars( pPars );
394  pPars->fCutMin = 1;
395  pPars->fCoarsen = 1;
396  pPars->nRelaxRatio = nRelaxRatio;
397  pPars->nAreaTuner = 5;
398  pPars->nCutNum = 12;
399  pPars->fVerbose = fVerbose;
400  if ( fVerbose ) Gia_ManPrintStats( pInit, NULL );
401  pGia1 = Gia_ManDup( pInit );
402  if ( Gia_ManAndNum(pGia1) == 0 )
403  {
404  Gia_ManTransferTiming( pGia1, pInit );
405  return pGia1;
406  }
407  if ( pGia1->pManTime && pGia1->vLevels == NULL )
408  Gia_ManLevelWithBoxes( pGia1 );
409  // unmap if mapped
410  if ( Gia_ManHasMapping(pInit) )
411  {
412  Gia_ManTransferMapping( pGia1, pInit );
413  pGia1 = (Gia_Man_t *)Dsm_ManDeriveGia( pTemp = pGia1, 0 );
414  Gia_ManStop( pTemp );
415  }
416  // perform balancing
417  if ( Gia_ManBufNum(pGia1) )
418  pGia2 = Gia_ManAreaBalance( pGia1, 0, ABC_INFINITY, 0, 0 );
419  else
420  {
421  pGia2 = Gia_ManLutBalance( pGia1, nLutSize, 1, 1, 1, 0 );
422  pGia2 = Gia_ManAreaBalance( pTemp = pGia2, 0, ABC_INFINITY, 0, 0 );
423  Gia_ManStop( pTemp );
424  }
425  if ( fVerbose ) Gia_ManPrintStats( pGia2, NULL );
426  // perform mapping
427  pGia2 = Lf_ManPerformMapping( pTemp = pGia2, pPars );
428  if ( fVerbose ) Gia_ManPrintStats( pGia2, NULL );
429  if ( pTemp != pGia2 )
430  Gia_ManStop( pTemp );
431  // perform balancing
432  if ( pParsDch->fLightSynth || Gia_ManBufNum(pGia2) )
433  pGia3 = Gia_ManAreaBalance( pGia2, 0, ABC_INFINITY, 0, 0 );
434  else
435  {
436  assert( Gia_ManBufNum(pGia2) == 0 );
437  pGia2 = Gia_ManAreaBalance( pTemp = pGia2, 0, ABC_INFINITY, 0, 0 );
438  if ( fVerbose ) Gia_ManPrintStats( pGia2, NULL );
439  Gia_ManStop( pTemp );
440  // perform DSD balancing
441  pGia3 = Gia_ManPerformDsdBalance( pGia2, 6, 8, 0, 0 );
442  }
443  if ( fVerbose ) Gia_ManPrintStats( pGia3, NULL );
444  // perform choice computation
445  if ( Gia_ManBufNum(pInit) )
446  {
447  assert( Gia_ManBufNum(pInit) == Gia_ManBufNum(pGia1) );
448  pGia1 = Gia_ManDupFromBarBufs( pTemp = pGia1 );
449  Gia_ManStop( pTemp );
450  assert( Gia_ManBufNum(pInit) == Gia_ManBufNum(pGia2) );
451  pGia2 = Gia_ManDupFromBarBufs( pTemp = pGia2 );
452  Gia_ManStop( pTemp );
453  assert( Gia_ManBufNum(pInit) == Gia_ManBufNum(pGia3) );
454  pGia3 = Gia_ManDupFromBarBufs( pTemp = pGia3 );
455  Gia_ManStop( pTemp );
456  }
457  pNew = Gia_ManAigSynch2Choices( pGia1, pGia2, pGia3, pParsDch );
458  Gia_ManStop( pGia1 );
459  Gia_ManStop( pGia2 );
460  Gia_ManStop( pGia3 );
461  if ( Gia_ManBufNum(pInit) )
462  {
463  pNew = Gia_ManDupToBarBufs( pTemp = pNew, Gia_ManBufNum(pInit) );
464  Gia_ManStop( pTemp );
465  }
466  // copy names
467  ABC_FREE( pNew->pName );
468  ABC_FREE( pNew->pSpec );
469  pNew->pName = Abc_UtilStrsav(pInit->pName);
470  pNew->pSpec = Abc_UtilStrsav(pInit->pSpec);
471  Gia_ManTransferTiming( pNew, pInit );
472  return pNew;
473 }
void Lf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaLf.c:1981
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition: giaDup.c:552
int nCutNum
Definition: gia.h:268
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Gia_Man_t * Lf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaLf.c:2193
int Gia_ManLevelWithBoxes(Gia_Man_t *p)
Definition: giaTim.c:469
int nAreaTuner
Definition: gia.h:274
Gia_Man_t * Gia_ManLutBalance(Gia_Man_t *p, int nLutSize, int fUseMuxes, int fRecursive, int fOptArea, int fVerbose)
Definition: giaStr.c:1377
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Definition: dch.h:43
Gia_Man_t * Gia_ManDupFromBarBufs(Gia_Man_t *p)
Definition: giaScript.c:267
Gia_Man_t * Gia_ManPerformDsdBalance(Gia_Man_t *p, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose)
Definition: giaIf.c:2058
int nRelaxRatio
Definition: gia.h:272
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
char * pName
Definition: gia.h:97
Definition: gia.h:265
char * pSpec
Definition: gia.h:98
void * pManTime
Definition: gia.h:165
void Gia_ManTransferTiming(Gia_Man_t *p, Gia_Man_t *pGia)
Definition: giaIf.c:1912
static int Gia_ManHasMapping(Gia_Man_t *p)
Definition: gia.h:951
Gia_Man_t * Gia_ManAigSynch2Choices(Gia_Man_t *pGia1, Gia_Man_t *pGia2, Gia_Man_t *pGia3, Dch_Pars_t *pPars)
Definition: giaScript.c:359
void * Dsm_ManDeriveGia(void *p, int fUseMuxes)
Definition: dauGia.c:471
#define ABC_FREE(obj)
Definition: abc_global.h:232
Definition: gia.h:95
static int Gia_ManBufNum(Gia_Man_t *p)
Definition: gia.h:392
int fCutMin
Definition: gia.h:282
int fVerbose
Definition: gia.h:174
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
void Gia_ManTransferMapping(Gia_Man_t *p, Gia_Man_t *pGia)
Definition: giaIf.c:1855
#define assert(ex)
Definition: util_old.h:213
Vec_Int_t * vLevels
Definition: gia.h:115
Gia_Man_t * Gia_ManAreaBalance(Gia_Man_t *p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose)
Definition: giaBalAig.c:968
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
Gia_Man_t * Gia_ManDupToBarBufs(Gia_Man_t *p, int nBarBufs)
Definition: giaScript.c:305
int fVerbose
Definition: gia.h:291
int fCoarsen
Definition: gia.h:281
Gia_Man_t* Gia_ManAigSynch2Choices ( Gia_Man_t pGia1,
Gia_Man_t pGia2,
Gia_Man_t pGia3,
Dch_Pars_t pPars 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 359 of file giaScript.c.

360 {
361  Aig_Man_t * pMan, * pTemp;
362  Gia_Man_t * pGia, * pMiter;
363  // derive miter
364  Vec_Ptr_t * vPios, * vGias = Vec_PtrAlloc( 3 );
365  if ( pGia3 ) Vec_PtrPush( vGias, pGia3 );
366  if ( pGia2 ) Vec_PtrPush( vGias, pGia2 );
367  if ( pGia1 ) Vec_PtrPush( vGias, pGia1 );
368  pMiter = Gia_ManChoiceMiter( vGias );
369  Vec_PtrFree( vGias );
370  // transform into an AIG
371  pMan = Gia_ManToAigSkip( pMiter, 3 );
372  Gia_ManStop( pMiter );
373  // compute choices
374  pMan = Dch_ComputeChoices( pTemp = pMan, pPars );
375  Aig_ManStop( pTemp );
376  // reconstruct the network
377  vPios = Gia_ManOrderPios( pMan, pGia1 );
378  pMan = Aig_ManDupDfsGuided( pTemp = pMan, vPios );
379  Aig_ManStop( pTemp );
380  Vec_PtrFree( vPios );
381  // convert to GIA
382  pGia = Gia_ManFromAigChoices( pMan );
383  Aig_ManStop( pMan );
384  return pGia;
385 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
Aig_Man_t * Aig_ManDupDfsGuided(Aig_Man_t *p, Vec_Ptr_t *vPios)
Definition: aigDup.c:694
Vec_Ptr_t * Gia_ManOrderPios(Aig_Man_t *p, Gia_Man_t *pOrder)
Definition: giaScript.c:238
Gia_Man_t * Gia_ManChoiceMiter(Vec_Ptr_t *vGias)
Definition: giaDup.c:2574
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
Aig_Man_t * Gia_ManToAigSkip(Gia_Man_t *p, int nOutDelta)
Definition: giaAig.c:324
Definition: gia.h:95
Aig_Man_t * Dch_ComputeChoices(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition: dchCore.c:89
Gia_Man_t * Gia_ManFromAigChoices(Aig_Man_t *p)
Definition: giaAig.c:132
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
Gia_Man_t* Gia_ManDupFromBarBufs ( Gia_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 267 of file giaScript.c.

268 {
269  Vec_Int_t * vBufObjs;
270  Gia_Man_t * pNew;
271  Gia_Obj_t * pObj;
272  int i, k = 0;
273  assert( Gia_ManBufNum(p) > 0 );
274  assert( Gia_ManRegNum(p) == 0 );
275  assert( !Gia_ManHasChoices(p) );
276  pNew = Gia_ManStart( Gia_ManObjNum(p) );
277  pNew->pName = Abc_UtilStrsav( p->pName );
278  pNew->pSpec = Abc_UtilStrsav( p->pSpec );
279  Gia_ManFillValue(p);
280  Gia_ManConst0(p)->Value = 0;
281  Gia_ManForEachCi( p, pObj, i )
282  pObj->Value = Gia_ManAppendCi( pNew );
283  vBufObjs = Vec_IntAlloc( Gia_ManBufNum(p) );
284  for ( i = 0; i < Gia_ManBufNum(p); i++ )
285  Vec_IntPush( vBufObjs, Gia_ManAppendCi(pNew) );
286  Gia_ManForEachAnd( p, pObj, i )
287  {
288  if ( Gia_ObjIsBuf(pObj) )
289  {
290  pObj->Value = Vec_IntEntry( vBufObjs, k );
291  Vec_IntWriteEntry( vBufObjs, k++, Gia_ObjFanin0Copy(pObj) );
292  }
293  else
294  pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
295  }
296  assert( k == Gia_ManBufNum(p) );
297  for ( i = 0; i < Gia_ManBufNum(p); i++ )
298  Gia_ManAppendCo( pNew, Vec_IntEntry(vBufObjs, i) );
299  Vec_IntFree( vBufObjs );
300  Gia_ManForEachCo( p, pObj, i )
301  Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
302  Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
303  return pNew;
304 }
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:592
#define Gia_ManForEachCo(p, pObj, i)
Definition: gia.h:1022
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
Definition: gia.h:703
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Gia_ManAppendCi(Gia_Man_t *p)
Definition: gia.h:583
static int Gia_ObjIsBuf(Gia_Obj_t *pObj)
Definition: gia.h:427
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition: giaMan.c:628
for(p=first;p->value< newval;p=p->next)
Definition: gia.h:75
static int Gia_ManHasChoices(Gia_Man_t *p)
Definition: gia.h:397
#define Gia_ManForEachCi(p, pObj, i)
Definition: gia.h:1016
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
char * pName
Definition: gia.h:97
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
Definition: gia.h:482
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
char * pSpec
Definition: gia.h:98
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
Definition: giaMan.c:52
#define Gia_ManForEachAnd(p, pObj, i)
Definition: gia.h:1002
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
void Gia_ManFillValue(Gia_Man_t *p)
Definition: giaUtil.c:328
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
Definition: gia.h:481
Definition: gia.h:95
static int Gia_ManBufNum(Gia_Man_t *p)
Definition: gia.h:392
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
Definition: gia.h:400
#define assert(ex)
Definition: util_old.h:213
unsigned Value
Definition: gia.h:87
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
Gia_Man_t* Gia_ManDupToBarBufs ( Gia_Man_t p,
int  nBarBufs 
)

Definition at line 305 of file giaScript.c.

306 {
307  Gia_Man_t * pNew;
308  Gia_Obj_t * pObj;
309  int nPiReal = Gia_ManCiNum(p) - nBarBufs;
310  int nPoReal = Gia_ManCoNum(p) - nBarBufs;
311  int i, k = 0;
312  assert( Gia_ManBufNum(p) == 0 );
313  assert( Gia_ManRegNum(p) == 0 );
315  pNew = Gia_ManStart( Gia_ManObjNum(p) );
316  pNew->pName = Abc_UtilStrsav( p->pName );
317  pNew->pSpec = Abc_UtilStrsav( p->pSpec );
318  if ( Gia_ManHasChoices(p) )
319  pNew->pSibls = ABC_CALLOC( int, Gia_ManObjNum(p) );
320  Gia_ManFillValue(p);
321  Gia_ManConst0(p)->Value = 0;
322  for ( i = 0; i < nPiReal; i++ )
323  Gia_ManCi(p, i)->Value = Gia_ManAppendCi( pNew );
324  Gia_ManForEachAnd( p, pObj, i )
325  {
326  for ( ; k < nBarBufs; k++ )
327  if ( ~Gia_ObjFanin0(Gia_ManCo(p, k))->Value )
328  Gia_ManCi(p, nPiReal + k)->Value = Gia_ManAppendBuf( pNew, Gia_ObjFanin0Copy(Gia_ManCo(p, k)) );
329  else
330  break;
331  pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
332  if ( Gia_ObjSibl(p, Gia_ObjId(p, pObj)) )
333  pNew->pSibls[Abc_Lit2Var(pObj->Value)] = Abc_Lit2Var(Gia_ObjSiblObj(p, Gia_ObjId(p, pObj))->Value);
334  }
335  for ( ; k < nBarBufs; k++ )
336  if ( ~Gia_ObjFanin0Copy(Gia_ManCo(p, k)) )
337  Gia_ManCi(p, nPiReal + k)->Value = Gia_ManAppendBuf( pNew, Gia_ObjFanin0Copy(Gia_ManCo(p, k)) );
338  assert( k == nBarBufs );
339  for ( i = 0; i < nPoReal; i++ )
340  Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(Gia_ManCo(p, nBarBufs+i)) );
341  Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
342  assert( Gia_ManBufNum(pNew) == nBarBufs );
343  assert( Gia_ManCiNum(pNew) == nPiReal );
344  assert( Gia_ManCoNum(pNew) == nPoReal );
345  return pNew;
346 }
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:592
static Gia_Obj_t * Gia_ObjSiblObj(Gia_Man_t *p, int Id)
Definition: gia.h:894
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
Definition: gia.h:403
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
Definition: gia.h:703
int * pSibls
Definition: gia.h:123
static int Gia_ManAppendCi(Gia_Man_t *p)
Definition: gia.h:583
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition: giaMan.c:628
Definition: gia.h:75
static int Gia_ManHasChoices(Gia_Man_t *p)
Definition: gia.h:397
static int Gia_ObjSibl(Gia_Man_t *p, int Id)
Definition: gia.h:893
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
char * pName
Definition: gia.h:97
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
Definition: gia.h:482
static int Gia_ManAppendBuf(Gia_Man_t *p, int iLit)
Definition: gia.h:694
char * pSpec
Definition: gia.h:98
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
Definition: giaMan.c:52
#define Gia_ManForEachAnd(p, pObj, i)
Definition: gia.h:1002
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:410
void Gia_ManFillValue(Gia_Man_t *p)
Definition: giaUtil.c:328
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
Definition: gia.h:481
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
Definition: gia.h:404
Definition: gia.h:95
static int Gia_ManBufNum(Gia_Man_t *p)
Definition: gia.h:392
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
Definition: gia.h:400
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
#define assert(ex)
Definition: util_old.h:213
unsigned Value
Definition: gia.h:87
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
Vec_Ptr_t* Gia_ManOrderPios ( Aig_Man_t p,
Gia_Man_t pOrder 
)

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

Synopsis [Duplicates the AIG manager.]

Description [This duplicator works for AIGs with choices.]

SideEffects []

SeeAlso []

Definition at line 238 of file giaScript.c.

239 {
240  Vec_Ptr_t * vPios;
241  Gia_Obj_t * pObj;
242  int i;
243  assert( Aig_ManCiNum(p) == Gia_ManCiNum(pOrder) );
244  assert( Aig_ManCoNum(p) == Gia_ManCoNum(pOrder) );
245  vPios = Vec_PtrAlloc( Aig_ManCiNum(p) + Aig_ManCoNum(p) );
246  Gia_ManForEachObj( pOrder, pObj, i )
247  {
248  if ( Gia_ObjIsCi(pObj) )
249  Vec_PtrPush( vPios, Aig_ManCi(p, Gia_ObjCioId(pObj)) );
250  else if ( Gia_ObjIsCo(pObj) )
251  Vec_PtrPush( vPios, Aig_ManCo(p, Gia_ObjCioId(pObj)) );
252  }
253  return vPios;
254 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
Definition: gia.h:75
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
Definition: aig.h:266
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
Definition: gia.h:421
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition: gia.h:984
#define assert(ex)
Definition: util_old.h:213
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Definition: gia.h:420
static int Gia_ObjCioId(Gia_Obj_t *pObj)
Definition: gia.h:411
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
void Gia_ManPerformFlow ( int  fIsMapped,
int  nAnds,
int  nLevels,
int  nLutSize,
int  nCutNum,
int  fMinAve,
int  fUseMfs,
int  fVerbose 
)

Definition at line 579 of file giaScript.c.

580 {
581  // remove comb equivs
582  if ( fIsMapped )
584 // if ( Abc_FrameReadGia(Abc_FrameGetGlobalFrame())->pManTime )
585 // Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&sweep" );
586 // else
587 // Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&fraig -c" );
588 
589  // perform first round
590  Gia_ManPerformRound( fIsMapped, nAnds, nLevels, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
591 
592  // perform synthesis
593  Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&st; &sopb" );
594 
595  // perform first round
596  Gia_ManPerformRound( fIsMapped, nAnds, nLevels, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
597 }
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
void Gia_ManPerformRound(int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
Definition: giaScript.c:526
void * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
void Gia_ManPerformFlow2 ( int  fIsMapped,
int  nAnds,
int  nLevels,
int  nLutSize,
int  nCutNum,
int  fBalance,
int  fMinAve,
int  fUseMfs,
int  fVerbose 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 610 of file giaScript.c.

611 {
612  char Comm1[100], Comm2[100], Comm3[100], Comm4[100];
613  sprintf( Comm1, "&synch2 -K %d -C 500; &if -m%s -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" );
614  sprintf( Comm2, "&dch -C 500; &if -m%s -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" );
615  sprintf( Comm3, "&synch2 -K %d -C 500; &lf -m%s -E 5 -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" );
616  sprintf( Comm4, "&dch -C 500; &lf -m%sk -E 5 -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" );
617 
618  // perform synthesis
619  if ( fVerbose )
620  printf( "Trying synthesis...\n" );
621  if ( fIsMapped )
624  if ( fVerbose )
626 
627  // perform synthesis
630  if ( fVerbose )
632 
633  // return the result
635  if ( fVerbose )
637 
638 
639  // perform balancing
640  if ( fBalance )
641  {
642  if ( fVerbose )
643  printf( "Trying SOP balancing...\n" );
644  Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&st; &sopb -R 10 -C 4" );
645  }
646 
647 
648  // perform synthesis
650  if ( fVerbose )
652 
653  // perform synthesis
656  if ( fVerbose )
658 
659  // return the result
661  if ( fVerbose )
663  if ( nAnds > 100000 )
664  return;
665 
666 
667  // perform balancing
668  if ( fBalance )
669  {
670  if ( fVerbose )
671  printf( "Trying SOP balancing...\n" );
672  Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&st; &sopb -R 10" );
673  }
674 
675 
676  // perform synthesis
678  if ( fVerbose )
680 
681  // perform synthesis
684  if ( fVerbose )
686 
687  // return the result
689  if ( fVerbose )
691  if ( nAnds > 50000 )
692  return;
693 
694 
695  // perform balancing
696  if ( fBalance )
697  {
698  if ( fVerbose )
699  printf( "Trying SOP balancing...\n" );
700  Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&st; &sopb -R 10" );
701  }
702 
703 
704  // perform synthesis
706  if ( fVerbose )
708 
709  // perform synthesis
712  if ( fVerbose )
714 
715  // return the result
717  if ( fVerbose )
719 }
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
void * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
char * sprintf()
void Gia_ManPerformMap ( int  nAnds,
int  nLutSize,
int  nCutNum,
int  fMinAve,
int  fUseMfs,
int  fVerbose 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 486 of file giaScript.c.

487 {
488  char Command[200];
489  sprintf( Command, "&unmap; &lf -K %d -C %d -k %s; &save", nLutSize, nCutNum, fMinAve?"-t":"" );
490 // sprintf( Command, "&unmap; &if -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?"-t":"" );
492  if ( fVerbose )
493  {
494  printf( "MAPPING:\n" );
495  printf( "Mapping with &lf -k:\n" );
497  }
498  sprintf( Command, "&unmap; &lf -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?"-t":"" );
500  if ( fVerbose )
501  {
502  printf( "Mapping with &lf:\n" );
504  }
505  if ( (nLutSize == 4 && nAnds < 100000) || (nLutSize == 6 && nAnds < 2000) )
506  {
507  sprintf( Command, "&unmap; &if -sz -S %d%d -K %d -C %d %s", nLutSize, nLutSize, 2*nLutSize-1, 2*nCutNum, fMinAve?"-t":"" );
511  if ( fVerbose )
512  {
513  printf( "Mapping with &if -sz -S %d%d -K %d -C %d %s:\n", nLutSize, nLutSize, 2*nLutSize-1, 2*nCutNum, fMinAve?"-t":"" );
515  }
516  }
518  if ( fUseMfs )
519  Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&put; mfs2 -W 4 -M 500 -C 7000; &get -m" );
520  if ( fVerbose )
521  {
522  printf( "Mapping final:\n" );
524  }
525 }
ABC_DLL Gia_Man_t * Abc_FrameReadGia(Abc_Frame_t *p)
Definition: mainFrame.c:298
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
void * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
char * sprintf()
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
void Gia_ManPerformRound ( int  fIsMapped,
int  nAnds,
int  nLevels,
int  nLutSize,
int  nCutNum,
int  fMinAve,
int  fUseMfs,
int  fVerbose 
)

Definition at line 526 of file giaScript.c.

527 {
528  char Command[200];
529 
530  // perform AIG-based synthesis
531  if ( nAnds < 50000 )
532  {
534  sprintf( Command, "&dsdb; &dch -C 500; &if -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?"-t":"" );
536  if ( fVerbose )
537  {
538  printf( "Mapping with &dch -C 500; &if -K %d -C %d %s:\n", nLutSize, nCutNum, fMinAve?"-t":"" );
540  }
542  }
543 
544  // perform AIG-based synthesis
545  if ( nAnds < 20000 )
546  {
548  sprintf( Command, "&dsdb; &dch -C 500; &if -K %d -C %d %s; &save", nLutSize, nCutNum, fMinAve?"-t":"" );
550  if ( fVerbose )
551  {
552  printf( "Mapping with &dch -C 500; &if -K %d -C %d %s:\n", nLutSize, nCutNum, fMinAve?"-t":"" );
554  }
556  }
557 
558  // perform first round of mapping
559  Gia_ManPerformMap( nAnds, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
561 
562  // perform synthesis
564 
565  // perform second round of mapping
566  Gia_ManPerformMap( nAnds, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
568 
569  // perform synthesis
570  Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&syn2 -m -R 10; &dsdb" );
571 
572  // prepare for final mapping
573  sprintf( Command, "&blut -a -K %d", nLutSize );
575 
576  // perform third round of mapping
577  Gia_ManPerformMap( nAnds, nLutSize, nCutNum, fMinAve, fUseMfs, fVerbose );
578 }
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
void Gia_ManPerformMap(int nAnds, int nLutSize, int nCutNum, int fMinAve, int fUseMfs, int fVerbose)
Definition: giaScript.c:486
void * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
char * sprintf()