ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaSweep.c File Reference
#include "gia.h"
#include "giaAig.h"
#include "proof/dch/dch.h"
#include "misc/tim/tim.h"
#include "proof/cec/cec.h"
Include dependency graph for giaSweep.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Gia_ManMarkSeqGiaWithBoxes_rec (Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vRoots)
 DECLARATIONS ///.
 
void Gia_ManMarkSeqGiaWithBoxes (Gia_Man_t *p, int fSeq)
 
Gia_Man_tGia_ManDupWithBoxes (Gia_Man_t *p, int fSeq)
 
int Gia_ManFraigCheckCis (Gia_Man_t *p, Gia_Obj_t *pObj)
 
Gia_Obj_tGia_ManFraigMarkCis (Gia_Man_t *p, Gia_Obj_t *pObj, int fMark)
 
Gia_Obj_tGia_ManFraigMarkCos (Gia_Man_t *p, Gia_Obj_t *pObj, int fMark)
 
Gia_Obj_tGia_ManFraigMarkAnd (Gia_Man_t *p, Gia_Obj_t *pObj)
 
Gia_Man_tGia_ManFraigCreateGia (Gia_Man_t *p)
 
int Gia_ObjFanin0CopyRepr (Gia_Man_t *p, Gia_Obj_t *pObj, int *pReprs)
 
int Gia_ObjFanin1CopyRepr (Gia_Man_t *p, Gia_Obj_t *pObj, int *pReprs)
 
Gia_Man_tGia_ManFraigReduceGia (Gia_Man_t *p, int *pReprs)
 
Vec_Int_tGia_ManComputeCarryOuts (Gia_Man_t *p)
 
void Gia_ManCheckIntegrityWithBoxes (Gia_Man_t *p)
 
int * Gia_ManFraigSelectReprs (Gia_Man_t *p, Gia_Man_t *pClp, int fVerbose, int pFlopTypes[3])
 
void Gia_ManFraigSweepPerform (Gia_Man_t *p, void *pPars)
 
Gia_Man_tGia_ManFraigSweepSimple (Gia_Man_t *p, void *pPars)
 
void Gia_ManSweepComputeOneDomainEquivs (Gia_Man_t *p, Vec_Int_t *vRegClasses, int iDom, void *pParsS, int fConst, int fEquiv, int fVerbose)
 
Gia_Man_tGia_ManSweepWithBoxesAndDomains (Gia_Man_t *p, void *pParsS, int fConst, int fEquiv, int fVerbose, int fVerbEquivs)
 
Gia_Man_tGia_ManSweepWithBoxes (Gia_Man_t *p, void *pParsC, void *pParsS, int fConst, int fEquiv, int fVerbose, int fVerbEquivs)
 

Function Documentation

◆ Gia_ManCheckIntegrityWithBoxes()

void Gia_ManCheckIntegrityWithBoxes ( Gia_Man_t * p)

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

Synopsis [Checks integriting of complex flops and carry-chains.]

Description []

SideEffects []

SeeAlso []

Definition at line 441 of file giaSweep.c.

442{
443 Gia_Obj_t * pObj;
444 Vec_Int_t * vCarryOuts;
445 int i, nCountReg = 0, nCountCarry = 0;
446 if ( p->pManTime == NULL )
447 return;
448 ABC_FREE( p->pRefs );
450 for ( i = Gia_ManPoNum(p) - Gia_ManRegBoxNum(p); i < Gia_ManPoNum(p); i++ )
451 {
452 pObj = Gia_ObjFanin0( Gia_ManPo(p, i) );
453 assert( Gia_ObjIsCi(pObj) );
454 if ( Gia_ObjRefNum(p, pObj) > 1 )
455 nCountReg++;
456 }
457 vCarryOuts = Gia_ManComputeCarryOuts( p );
458 Gia_ManForEachObjVec( vCarryOuts, p, pObj, i )
459 if ( Gia_ObjRefNum(p, pObj) > 1 )
460 nCountCarry++;
461 Vec_IntFree( vCarryOuts );
462 if ( nCountReg || nCountCarry )
463 printf( "Warning: AIG with boxes has internal fanout in %d complex flops and %d carries.\n", nCountReg, nCountCarry );
464 ABC_FREE( p->pRefs );
465}
#define ABC_FREE(obj)
Definition abc_global.h:267
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Cube * p
Definition exorList.c:222
Vec_Int_t * Gia_ManComputeCarryOuts(Gia_Man_t *p)
Definition giaSweep.c:385
int Gia_ManRegBoxNum(Gia_Man_t *p)
Definition giaTim.c:54
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
Definition gia.h:1194
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition giaUtil.c:779
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManComputeCarryOuts()

Vec_Int_t * Gia_ManComputeCarryOuts ( Gia_Man_t * p)

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

Synopsis [Compute the set of CIs representing carry-outs of boxes.]

Description []

SideEffects []

SeeAlso []

Definition at line 385 of file giaSweep.c.

386{
387 Gia_Obj_t * pObj;
388 Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
389 int i, iLast, iBox, nBoxes = Tim_ManBoxNum( pManTime );
390 Vec_Int_t * vCarryOuts = Vec_IntAlloc( nBoxes );
391
392 // Create and populate reference count (and free later) only if not already
393 // done.
394 int createRefs = (p->pRefs == NULL);
395 if (createRefs) {
397 }
398
399 for ( i = 0; i < nBoxes; i++ )
400 {
401 iLast = Tim_ManBoxInputLast( pManTime, i );
402 pObj = Gia_ObjFanin0( Gia_ManCo(p, iLast) );
403 if ( !Gia_ObjIsCi(pObj) )
404 continue;
405 iBox = Tim_ManBoxForCi( pManTime, Gia_ObjCioId(pObj) );
406 if ( iBox == -1 )
407 continue;
408 assert( Gia_ObjIsCi(pObj) );
409 if ( Gia_ObjCioId(pObj) == Tim_ManBoxOutputLast(pManTime, iBox) ) {
410 Vec_IntPush( vCarryOuts, Gia_ObjId(p, pObj) );
411
412 // We have identified a carry connection. Check if the carry out
413 // of the destination box is unconnected. If so then add it to
414 // the carry list as well.
415 iLast = Tim_ManBoxOutputLast(pManTime, i);
416 pObj = Gia_ManCi(p, iLast);
417 if ( Gia_ObjRefNum(p, pObj) == 0 ) {
418 Vec_IntPush( vCarryOuts, Gia_ObjId(p, pObj) );
419 }
420 }
421 }
422
423 if (createRefs) {
424 ABC_FREE( p->pRefs );
425 }
426
427 return vCarryOuts;
428}
int Tim_ManBoxNum(Tim_Man_t *p)
Definition timMan.c:722
int Tim_ManBoxOutputLast(Tim_Man_t *p, int iBox)
Definition timBox.c:171
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition tim.h:92
int Tim_ManBoxForCi(Tim_Man_t *p, int iCo)
Definition timBox.c:87
int Tim_ManBoxInputLast(Tim_Man_t *p, int iBox)
Definition timBox.c:139
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManDupWithBoxes()

Gia_Man_t * Gia_ManDupWithBoxes ( Gia_Man_t * p,
int fSeq )

Definition at line 124 of file giaSweep.c.

125{
126 Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
127 Gia_Man_t * pNew;
128 Gia_Obj_t * pObj;
129 Vec_Int_t * vBoxesLeft;
130 int curCi, curCo, nBoxIns, nBoxOuts;
131 int i, k, iShift, nMarked;
132 assert( Gia_ManBoxNum(p) > 0 );
133 // mark useful boxes
135 // duplicate marked entries
136 pNew = Gia_ManStart( Gia_ManObjNum(p) );
137 pNew->pName = Abc_UtilStrsav( p->pName );
138 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
139 Gia_ManConst0(p)->Value = 0;
140 Gia_ManForEachObj1( p, pObj, i )
141 {
142 if ( !Gia_ObjIsTravIdCurrent(p, pObj) )
143 continue;
144 if ( Gia_ObjIsCi(pObj) )
145 pObj->Value = Gia_ManAppendCi(pNew);
146 else if ( Gia_ObjIsAnd(pObj) )
147 pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
148 else if ( Gia_ObjIsCo(pObj) )
149 pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
150 else assert( 0 );
151 }
152 assert( !Gia_ManHasDangling(pNew) );
153 // collect remaining flops
154 if ( fSeq )
155 {
156 pNew->vRegClasses = Vec_IntAlloc( Gia_ManRegBoxNum(p) );
157 if ( p->vRegInits )
158 pNew->vRegInits = Vec_IntAlloc( Gia_ManRegBoxNum(p) );
159 iShift = Gia_ManPoNum(p) - Gia_ManRegBoxNum(p);
160 for ( i = 0; i < Gia_ManRegBoxNum(p); i++ )
161 if ( Gia_ObjIsTravIdCurrent(p, Gia_ManCo(p, iShift + i)) )
162 {
163 Vec_IntPush( pNew->vRegClasses, Vec_IntEntry(p->vRegClasses, i) );
164 if ( p->vRegInits )
165 Vec_IntPush( pNew->vRegInits, Vec_IntEntry(p->vRegInits, i) );
166 }
167 }
168 else
169 {
170 if ( p->vRegClasses )
171 pNew->vRegClasses = Vec_IntDup( p->vRegClasses );
172 if ( p->vRegInits )
173 pNew->vRegInits = Vec_IntDup( p->vRegInits );
174 }
175 // collect remaining boxes
176 vBoxesLeft = Vec_IntAlloc( Gia_ManBoxNum(p) );
177 curCi = Tim_ManPiNum(pManTime);
178 curCo = 0;
179 for ( i = 0; i < Gia_ManBoxNum(p); i++ )
180 {
181 nBoxIns = Tim_ManBoxInputNum(pManTime, i);
182 nBoxOuts = Tim_ManBoxOutputNum(pManTime, i);
183 nMarked = 0;
184 for ( k = 0; k < nBoxIns; k++ )
185 nMarked += Gia_ObjIsTravIdCurrent( p, Gia_ManCo(p, curCo + k) );
186 for ( k = 0; k < nBoxOuts; k++ )
187 nMarked += Gia_ObjIsTravIdCurrent( p, Gia_ManCi(p, curCi + k) );
188 curCo += nBoxIns;
189 curCi += nBoxOuts;
190 // check presence
191 assert( nMarked == 0 || nMarked == nBoxIns + nBoxOuts );
192 if ( nMarked )
193 Vec_IntPush( vBoxesLeft, i );
194 }
195 curCo += Tim_ManPoNum(pManTime);
196 assert( curCi == Gia_ManCiNum(p) );
197 assert( curCo == Gia_ManCoNum(p) );
198 // update timing manager
199 pNew->pManTime = Gia_ManUpdateTimMan2( p, vBoxesLeft, Gia_ManRegBoxNum(p) - Gia_ManRegBoxNum(pNew) );
200 // update extra STG
201 assert( p->pAigExtra != NULL );
202 assert( pNew->pAigExtra == NULL );
203 pNew->pAigExtra = Gia_ManUpdateExtraAig2( p->pManTime, p->pAigExtra, vBoxesLeft );
204 assert( Gia_ManCiNum(pNew) == Tim_ManPiNum((Tim_Man_t*)pNew->pManTime) + Gia_ManCoNum(pNew->pAigExtra) );
205 Vec_IntFree( vBoxesLeft );
206 pNew->nAnd2Delay = p->nAnd2Delay;
207 return pNew;
208}
void Gia_ManMarkSeqGiaWithBoxes(Gia_Man_t *p, int fSeq)
Definition giaSweep.c:87
int Gia_ManHasDangling(Gia_Man_t *p)
Definition giaUtil.c:1353
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
int Gia_ManBoxNum(Gia_Man_t *p)
DECLARATIONS ///.
Definition giaTim.c:50
void * Gia_ManUpdateTimMan2(Gia_Man_t *p, Vec_Int_t *vBoxesLeft, int nTermsDiff)
Definition giaTim.c:675
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
#define Gia_ManForEachObj1(p, pObj, i)
Definition gia.h:1192
Gia_Man_t * Gia_ManUpdateExtraAig2(void *pTime, Gia_Man_t *pAig, Vec_Int_t *vBoxesLeft)
Definition giaTim.c:713
Gia_Man_t * pAigExtra
Definition gia.h:167
int nAnd2Delay
Definition gia.h:202
char * pSpec
Definition gia.h:100
Vec_Int_t * vRegInits
Definition gia.h:161
Vec_Int_t * vRegClasses
Definition gia.h:160
void * pManTime
Definition gia.h:194
char * pName
Definition gia.h:99
unsigned Value
Definition gia.h:89
int Tim_ManBoxOutputNum(Tim_Man_t *p, int iBox)
Definition timBox.c:203
int Tim_ManPoNum(Tim_Man_t *p)
Definition timMan.c:714
int Tim_ManBoxInputNum(Tim_Man_t *p, int iBox)
Definition timBox.c:187
int Tim_ManPiNum(Tim_Man_t *p)
Definition timMan.c:708
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManFraigCheckCis()

int Gia_ManFraigCheckCis ( Gia_Man_t * p,
Gia_Obj_t * pObj )

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

Synopsis [Mark GIA nodes that feed into POs.]

Description []

SideEffects []

SeeAlso []

Definition at line 221 of file giaSweep.c.

222{
223 for ( assert( Gia_ObjIsCi(pObj) ); Gia_ObjIsCi(pObj); pObj-- )
224 if ( Gia_ObjIsTravIdCurrent(p, pObj) )
225 return 1;
226 return 0;
227}
Here is the caller graph for this function:

◆ Gia_ManFraigCreateGia()

Gia_Man_t * Gia_ManFraigCreateGia ( Gia_Man_t * p)

Definition at line 255 of file giaSweep.c.

256{
257 Vec_Int_t * vBoxPres;
258 Gia_Man_t * pNew;
259 Gia_Obj_t * pObj;
260 int i, fLabelPos;
261 assert( p->pManTime != NULL );
262 // start marks
264 Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
265 vBoxPres = Vec_IntAlloc( 1000 );
266 // mark primary outputs
267 fLabelPos = 1;
268 pObj = Gia_ManObj( p, Gia_ManObjNum(p) - 1 );
269 assert( Gia_ObjIsCo(pObj) );
270 while ( Gia_ObjIsCo(pObj) )
271 {
272 pObj = Gia_ManFraigMarkCos( p, pObj, fLabelPos );
273 if ( Gia_ObjIsAnd(pObj) )
274 pObj = Gia_ManFraigMarkAnd( p, pObj );
275 assert( Gia_ObjIsCi(pObj) );
276 fLabelPos = Gia_ManFraigCheckCis(p, pObj);
277 pObj = Gia_ManFraigMarkCis( p, pObj, fLabelPos );
278 Vec_IntPush( vBoxPres, fLabelPos );
279 }
280 Vec_IntPop( vBoxPres );
281 Vec_IntReverseOrder( vBoxPres );
282 assert( Gia_ObjIsConst0(pObj) );
283 // mark primary inputs
284 Gia_ManForEachObj1( p, pObj, i )
285 if ( Gia_ObjIsCi(pObj) )
286 Gia_ObjSetTravIdCurrent( p, pObj );
287 else
288 break;
289 // duplicate marked entries
290 pNew = Gia_ManStart( Gia_ManObjNum(p) );
291 pNew->pName = Abc_UtilStrsav( p->pName );
292 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
293 Gia_ManConst0(p)->Value = 0;
294 Gia_ManForEachObj1( p, pObj, i )
295 {
296 if ( !Gia_ObjIsTravIdCurrent(p, pObj) )
297 continue;
298 if ( Gia_ObjIsCi(pObj) )
299 pObj->Value = Gia_ManAppendCi(pNew);
300 else if ( Gia_ObjIsAnd(pObj) )
301 pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
302 else if ( Gia_ObjIsCo(pObj) )
303 pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
304 else assert( 0 );
305 }
306 // update timing manager
307 pNew->pManTime = Gia_ManUpdateTimMan( p, vBoxPres );
308 // update extra STG
309 assert( p->pAigExtra != NULL );
310 assert( pNew->pAigExtra == NULL );
311 pNew->pAigExtra = Gia_ManUpdateExtraAig( p->pManTime, p->pAigExtra, vBoxPres );
312 Vec_IntFree( vBoxPres );
313// assert( Gia_ManPiNum(pNew) == Tim_ManCiNum(pNew->pManTime) );
314// assert( Gia_ManPoNum(pNew) == Tim_ManCoNum(pNew->pManTime) );
315// assert( Gia_ManPiNum(pNew) == Tim_ManPiNum(pNew->pManTime) + Gia_ManPoNum(pNew->pAigExtra) );
316 return pNew;
317}
int Gia_ManFraigCheckCis(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition giaSweep.c:221
Gia_Obj_t * Gia_ManFraigMarkCos(Gia_Man_t *p, Gia_Obj_t *pObj, int fMark)
Definition giaSweep.c:235
Gia_Obj_t * Gia_ManFraigMarkCis(Gia_Man_t *p, Gia_Obj_t *pObj, int fMark)
Definition giaSweep.c:228
Gia_Obj_t * Gia_ManFraigMarkAnd(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition giaSweep.c:245
void * Gia_ManUpdateTimMan(Gia_Man_t *p, Vec_Int_t *vBoxPres)
Definition giaTim.c:668
Gia_Man_t * Gia_ManUpdateExtraAig(void *pTime, Gia_Man_t *pAig, Vec_Int_t *vBoxPres)
Definition giaTim.c:694
void Gia_ManIncrementTravId(Gia_Man_t *p)
Definition giaUtil.c:190
Here is the call graph for this function:

◆ Gia_ManFraigMarkAnd()

Gia_Obj_t * Gia_ManFraigMarkAnd ( Gia_Man_t * p,
Gia_Obj_t * pObj )

Definition at line 245 of file giaSweep.c.

246{
247 for ( assert( Gia_ObjIsAnd(pObj) ); Gia_ObjIsAnd(pObj); pObj-- )
248 if ( Gia_ObjIsTravIdCurrent(p, pObj) )
249 {
250 Gia_ObjSetTravIdCurrent( p, Gia_ObjFanin0(pObj) );
251 Gia_ObjSetTravIdCurrent( p, Gia_ObjFanin1(pObj) );
252 }
253 return pObj;
254}
Here is the caller graph for this function:

◆ Gia_ManFraigMarkCis()

Gia_Obj_t * Gia_ManFraigMarkCis ( Gia_Man_t * p,
Gia_Obj_t * pObj,
int fMark )

Definition at line 228 of file giaSweep.c.

229{
230 for ( assert( Gia_ObjIsCi(pObj) ); Gia_ObjIsCi(pObj); pObj-- )
231 if ( fMark )
232 Gia_ObjSetTravIdCurrent( p, pObj );
233 return pObj;
234}
Here is the caller graph for this function:

◆ Gia_ManFraigMarkCos()

Gia_Obj_t * Gia_ManFraigMarkCos ( Gia_Man_t * p,
Gia_Obj_t * pObj,
int fMark )

Definition at line 235 of file giaSweep.c.

236{
237 for ( assert( Gia_ObjIsCo(pObj) ); Gia_ObjIsCo(pObj); pObj-- )
238 if ( fMark )
239 {
240 Gia_ObjSetTravIdCurrent( p, pObj );
241 Gia_ObjSetTravIdCurrent( p, Gia_ObjFanin0(pObj) );
242 }
243 return pObj;
244}
Here is the caller graph for this function:

◆ Gia_ManFraigReduceGia()

Gia_Man_t * Gia_ManFraigReduceGia ( Gia_Man_t * p,
int * pReprs )

Definition at line 346 of file giaSweep.c.

347{
348 Gia_Man_t * pNew;
349 Gia_Obj_t * pObj;
350 int i;
351 assert( pReprs != NULL );
352 assert( Gia_ManRegNum(p) == 0 );
353 pNew = Gia_ManStart( Gia_ManObjNum(p) );
354 pNew->pName = Abc_UtilStrsav( p->pName );
355 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
357 Gia_ManHashAlloc( pNew );
358 Gia_ManForEachObj( p, pObj, i )
359 {
360 if ( Gia_ObjIsAnd(pObj) )
361 pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0CopyRepr(p, pObj, pReprs), Gia_ObjFanin1CopyRepr(p, pObj, pReprs) );
362 else if ( Gia_ObjIsCi(pObj) )
363 pObj->Value = Gia_ManAppendCi( pNew );
364 else if ( Gia_ObjIsCo(pObj) )
365 pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0CopyRepr(p, pObj, pReprs) );
366 else if ( Gia_ObjIsConst0(pObj) )
367 pObj->Value = 0;
368 else assert( 0 );
369 }
370 Gia_ManHashStop( pNew );
371 return pNew;
372}
int Gia_ObjFanin0CopyRepr(Gia_Man_t *p, Gia_Obj_t *pObj, int *pReprs)
Definition giaSweep.c:330
int Gia_ObjFanin1CopyRepr(Gia_Man_t *p, Gia_Obj_t *pObj, int *pReprs)
Definition giaSweep.c:338
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition giaHash.c:105
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition giaHash.c:576
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition gia.h:1190
void Gia_ManHashStop(Gia_Man_t *p)
Definition giaHash.c:149
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManFraigSelectReprs()

int * Gia_ManFraigSelectReprs ( Gia_Man_t * p,
Gia_Man_t * pClp,
int fVerbose,
int pFlopTypes[3] )

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

Synopsis [Computes representatives in terms of the original objects.]

Description []

SideEffects []

SeeAlso []

Definition at line 478 of file giaSweep.c.

479{
480 Gia_Obj_t * pObj;
481 Vec_Int_t * vCarryOuts;
482 Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
483 int * pReprs = ABC_FALLOC( int, Gia_ManObjNum(p) );
484 int * pClp2Gia = ABC_FALLOC( int, Gia_ManObjNum(pClp) );
485 int i, iLitClp, iLitClp2, iReprClp, fCompl;
486 int nConsts = 0, nReprs = 0;
487 assert( pManTime != NULL );
488 // count the number of equivalent objects
489 Gia_ManForEachObj1( pClp, pObj, i )
490 {
491 if ( Gia_ObjIsCo(pObj) )
492 continue;
493 if ( i == Gia_ObjReprSelf(pClp, i) )
494 continue;
495 if ( Gia_ObjReprSelf(pClp, i) == 0 )
496 nConsts++;
497 else
498 nReprs++;
499 }
500 if ( fVerbose )
501 printf( "Computed %d const objects and %d other objects.\n", nConsts, nReprs );
502 nConsts = nReprs = 0;
503
504 // mark flop input boxes
506 for ( i = Gia_ManPoNum(p) - Gia_ManRegBoxNum(p); i < Gia_ManPoNum(p); i++ )
507 {
508 pObj = Gia_ObjFanin0( Gia_ManPo(p, i) );
509 assert( Gia_ObjIsCi(pObj) );
510 pObj->fMark0 = 1;
511 }
512 // mark connects between last box inputs and first box outputs
513 vCarryOuts = Gia_ManComputeCarryOuts( p );
514 Gia_ManForEachObjVec( vCarryOuts, p, pObj, i )
515 pObj->fMark0 = 1;
516 if ( fVerbose )
517 printf( "Fixed %d flop inputs and %d box/box connections (out of %d non-flop boxes).\n",
518 Gia_ManRegBoxNum(p), Vec_IntSize(vCarryOuts), Gia_ManNonRegBoxNum(p) );
519 Vec_IntFree( vCarryOuts );
520
521 // collect equivalent node info
522 pFlopTypes[0] = pFlopTypes[1] = pFlopTypes[2] = 0;
523 Gia_ManForEachRo( pClp, pObj, i )
524 {
525 Gia_Obj_t * pRepr = Gia_ObjReprObj(pClp, i);
526 if ( pRepr && pRepr != pObj )
527 {
528 if ( pRepr == Gia_ManConst0(pClp) )
529 pFlopTypes[0]++;
530 else if ( Gia_ObjIsRo(pClp, pRepr) )
531 pFlopTypes[1]++;
532 }
533 }
534
535 // compute representatives
536 pClp2Gia[0] = 0;
537 Gia_ManSetPhase( pClp );
538 Gia_ManForEachObj1( p, pObj, i )
539 {
540 if ( Gia_ObjIsCo(pObj) )
541 continue;
542 if ( Gia_ObjIsCi(pObj) && pObj->fMark0 ) // skip CI pointed by CO
543 continue;
544 assert( Gia_ObjIsCi(pObj) || Gia_ObjIsAnd(pObj) );
545 iLitClp = Gia_ObjValue(pObj);
546 if ( iLitClp == -1 )
547 continue;
548 iReprClp = Gia_ObjReprSelf( pClp, Abc_Lit2Var(iLitClp) );
549 if ( pClp2Gia[iReprClp] == -1 )
550 pClp2Gia[iReprClp] = i;
551 else
552 {
553 iLitClp2 = Gia_ObjValue( Gia_ManObj(p, pClp2Gia[iReprClp]) );
554 assert( Gia_ObjReprSelf(pClp, Abc_Lit2Var(iLitClp)) == Gia_ObjReprSelf(pClp, Abc_Lit2Var(iLitClp2)) );
555 fCompl = Abc_LitIsCompl(iLitClp) ^ Abc_LitIsCompl(iLitClp2);
556 fCompl ^= Gia_ManObj(pClp, Abc_Lit2Var(iLitClp))->fPhase;
557 fCompl ^= Gia_ManObj(pClp, Abc_Lit2Var(iLitClp2))->fPhase;
558 pReprs[i] = Abc_Var2Lit( pClp2Gia[iReprClp], fCompl );
559 assert( Abc_Lit2Var(pReprs[i]) < i );
560 if ( pClp2Gia[iReprClp] == 0 )
561 nConsts++;
562 else
563 nReprs++;
564 }
565 }
566 ABC_FREE( pClp2Gia );
567 Gia_ManForEachCi( p, pObj, i )
568 pObj->fMark0 = 0;
569 if ( fVerbose )
570 printf( "Found %d const objects and %d other objects.\n", nConsts, nReprs );
571 return pReprs;
572}
#define ABC_FALLOC(type, num)
Definition abc_global.h:266
#define Gia_ManForEachRo(p, pObj, i)
Definition gia.h:1252
int Gia_ManNonRegBoxNum(Gia_Man_t *p)
Definition giaTim.c:58
void Gia_ManCleanMark0(Gia_Man_t *p)
Definition giaUtil.c:256
#define Gia_ManForEachCi(p, pObj, i)
Definition gia.h:1228
void Gia_ManSetPhase(Gia_Man_t *p)
Definition giaUtil.c:420
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManFraigSweepPerform()

void Gia_ManFraigSweepPerform ( Gia_Man_t * p,
void * pPars )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 585 of file giaSweep.c.

586{
587 Aig_Man_t * pNew;
588 pNew = Gia_ManToAigSimple( p );
589 assert( Gia_ManObjNum(p) == Aig_ManObjNum(pNew) );
590 Dch_ComputeEquivalences( pNew, (Dch_Pars_t *)pPars );
591 Gia_ManReprFromAigRepr( pNew, p );
592 Aig_ManStop( pNew );
593}
void Dch_ComputeEquivalences(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition dchCore.c:136
void Aig_ManStop(Aig_Man_t *p)
Definition aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Definition dch.h:43
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
Definition giaAig.c:408
void Gia_ManReprFromAigRepr(Aig_Man_t *pAig, Gia_Man_t *pGia)
Definition giaAig.c:528
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManFraigSweepSimple()

Gia_Man_t * Gia_ManFraigSweepSimple ( Gia_Man_t * p,
void * pPars )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 606 of file giaSweep.c.

607{
608 Gia_Man_t * pNew;
609 assert( p->pManTime == NULL || Gia_ManBoxNum(p) == 0 );
610 Gia_ManFraigSweepPerform( p, pPars );
611 pNew = Gia_ManEquivReduce( p, 1, 0, 0, 0 );
612 if ( pNew == NULL )
613 pNew = Gia_ManDup(p);
614 Gia_ManTransferTiming( pNew, p );
615 return pNew;
616}
void Gia_ManFraigSweepPerform(Gia_Man_t *p, void *pPars)
Definition giaSweep.c:585
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition giaDup.c:720
Gia_Man_t * Gia_ManEquivReduce(Gia_Man_t *p, int fUseAll, int fDualOut, int fSkipPhase, int fVerbose)
Definition giaEquiv.c:677
void Gia_ManTransferTiming(Gia_Man_t *p, Gia_Man_t *pGia)
Definition giaIf.c:2370
Here is the call graph for this function:

◆ Gia_ManMarkSeqGiaWithBoxes()

void Gia_ManMarkSeqGiaWithBoxes ( Gia_Man_t * p,
int fSeq )

Definition at line 87 of file giaSweep.c.

88{
89 // CI order: real PIs + flop outputs + box outputs
90 // CO order: box inputs + real POs + flop inputs
91 Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
92 Vec_Int_t * vRoots;
93 Gia_Obj_t * pObj;
94 int nRealCis = Tim_ManPiNum(pManTime);
95 int nRealCos = Tim_ManPoNum(pManTime);
96 int i, nRegs = fSeq ? Gia_ManRegBoxNum(p) : 0;
97 assert( Gia_ManRegNum(p) == 0 );
98 assert( Gia_ManBoxNum(p) > 0 );
99 // mark the terminals
101 Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
102 for ( i = 0; i < nRealCis - nRegs; i++ )
103 Gia_ObjSetTravIdCurrent( p, Gia_ManPi(p, i) );
104 // collect flops reachable from the POs
105 vRoots = Vec_IntAlloc( Gia_ManRegBoxNum(p) );
106 for ( i = Gia_ManPoNum(p) - nRealCos; i < Gia_ManPoNum(p) - nRegs; i++ )
107 {
108 Gia_ObjSetTravIdCurrent( p, Gia_ManPo(p, i) );
109 Gia_ManMarkSeqGiaWithBoxes_rec( p, Gia_ObjFanin0(Gia_ManPo(p, i)), vRoots );
110 }
111 // collect flops reachable from roots
112 if ( fSeq )
113 {
114 Gia_ManForEachObjVec( vRoots, p, pObj, i )
115 {
116 assert( Gia_ObjIsCo(pObj) );
117 Gia_ObjSetTravIdCurrent( p, pObj );
118 Gia_ManMarkSeqGiaWithBoxes_rec( p, Gia_ObjFanin0(pObj), vRoots );
119 }
120 //printf( "Explored %d flops\n", Vec_IntSize(vRoots) );
121 }
122 Vec_IntFree( vRoots );
123}
ABC_NAMESPACE_IMPL_START void Gia_ManMarkSeqGiaWithBoxes_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vRoots)
DECLARATIONS ///.
Definition giaSweep.c:48
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManMarkSeqGiaWithBoxes_rec()

ABC_NAMESPACE_IMPL_START void Gia_ManMarkSeqGiaWithBoxes_rec ( Gia_Man_t * p,
Gia_Obj_t * pObj,
Vec_Int_t * vRoots )

DECLARATIONS ///.

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

FileName [giaSweep.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Sweeping of GIA manager.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Mark GIA nodes that feed into POs.]

Description [Returns the array of classes of remaining registers.]

SideEffects []

SeeAlso []

Definition at line 48 of file giaSweep.c.

49{
50 Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
51 int i, iBox, nBoxIns, nBoxOuts, iShift, nRealCis;
52 if ( Gia_ObjIsTravIdCurrent(p, pObj) )
53 return;
54 Gia_ObjSetTravIdCurrent(p, pObj);
55 if ( Gia_ObjIsAnd(pObj) )
56 {
57 Gia_ManMarkSeqGiaWithBoxes_rec( p, Gia_ObjFanin0(pObj), vRoots );
58 Gia_ManMarkSeqGiaWithBoxes_rec( p, Gia_ObjFanin1(pObj), vRoots );
59 return;
60 }
61 assert( Gia_ObjIsCi(pObj) );
62 nRealCis = Tim_ManPiNum(pManTime);
63 if ( Gia_ObjCioId(pObj) < nRealCis )
64 {
65 int nRegs = Gia_ManRegBoxNum(p);
66 int iFlop = Gia_ObjCioId(pObj) - (nRealCis - nRegs);
67 assert( iFlop >= 0 && iFlop < nRegs );
68 pObj = Gia_ManCo( p, Gia_ManPoNum(p) - nRegs + iFlop );
69 Vec_IntPush( vRoots, Gia_ObjId(p, pObj) );
70 return;
71 }
72 // get the box
73 iBox = Tim_ManBoxForCi( pManTime, Gia_ObjCioId(pObj) );
74 nBoxIns = Tim_ManBoxInputNum(pManTime, iBox);
75 nBoxOuts = Tim_ManBoxOutputNum(pManTime, iBox);
76 // mark all outputs
77 iShift = Tim_ManBoxOutputFirst(pManTime, iBox);
78 for ( i = 0; i < nBoxOuts; i++ )
79 Gia_ObjSetTravIdCurrent(p, Gia_ManCi(p, iShift + i));
80 // traverse from inputs
81 iShift = Tim_ManBoxInputFirst(pManTime, iBox);
82 for ( i = 0; i < nBoxIns; i++ )
83 Gia_ObjSetTravIdCurrent(p, Gia_ManCo(p, iShift + i));
84 for ( i = 0; i < nBoxIns; i++ )
85 Gia_ManMarkSeqGiaWithBoxes_rec( p, Gia_ObjFanin0(Gia_ManCo(p, iShift + i)), vRoots );
86}
int Tim_ManBoxInputFirst(Tim_Man_t *p, int iBox)
Definition timBox.c:123
int Tim_ManBoxOutputFirst(Tim_Man_t *p, int iBox)
Definition timBox.c:155
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManSweepComputeOneDomainEquivs()

void Gia_ManSweepComputeOneDomainEquivs ( Gia_Man_t * p,
Vec_Int_t * vRegClasses,
int iDom,
void * pParsS,
int fConst,
int fEquiv,
int fVerbose )

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

Synopsis [Computes equivalences for one clock domain.]

Description []

SideEffects []

SeeAlso []

Definition at line 629 of file giaSweep.c.

630{
631 Gia_Man_t * pNew;
632 Gia_Obj_t * pObj;
633 Vec_Int_t * vPerm;
634 int i, Class, nFlops;
635 int nDoms = Vec_IntFindMax(vRegClasses);
636 assert( iDom >= 1 && iDom <= nDoms );
637 assert( p->pManTime == NULL );
638 assert( Gia_ManRegNum(p) > 0 );
639 // create required flop permutation
640 vPerm = Vec_IntAlloc( Gia_ManRegNum(p) );
641 Vec_IntForEachEntry( vRegClasses, Class, i )
642 if ( Class != iDom )
643 Vec_IntPush( vPerm, i );
644 nFlops = Vec_IntSize( vPerm );
645 Vec_IntForEachEntry( vRegClasses, Class, i )
646 if ( Class == iDom )
647 Vec_IntPush( vPerm, i );
648 nFlops = Vec_IntSize(vPerm) - nFlops;
649 assert( Vec_IntSize(vPerm) == Gia_ManRegNum(p) );
650 // derive new AIG
651 pNew = Gia_ManDupPermFlop( p, vPerm );
652 assert( Gia_ManObjNum(pNew) == Gia_ManObjNum(p) );
653 Vec_IntFree( vPerm );
654 // perform computation of equivalences
655 pNew->nRegs = nFlops;
656 if ( pParsS )
658 else
659 Gia_ManSeqCleanupClasses( pNew, fConst, fEquiv, fVerbose );
660 pNew->nRegs = Gia_ManRegNum(p);
661 // make new point to old
662 Gia_ManForEachObj( p, pObj, i )
663 {
664 assert( !Abc_LitIsCompl(pObj->Value) );
665 Gia_ManObj(pNew, Abc_Lit2Var(pObj->Value))->Value = Abc_Var2Lit(i, 0);
666 }
667 // transfer
668 Gia_ManDupRemapEquiv( p, pNew );
669 Gia_ManStop( pNew );
670}
int Cec_ManLSCorrespondenceClasses(Gia_Man_t *pAig, Cec_ParCor_t *pPars)
Definition cecCorr.c:924
struct Cec_ParCor_t_ Cec_ParCor_t
Definition cec.h:145
void Gia_ManSeqCleanupClasses(Gia_Man_t *p, int fConst, int fEquiv, int fVerbose)
Definition giaAig.c:676
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
void Gia_ManDupRemapEquiv(Gia_Man_t *pNew, Gia_Man_t *p)
Definition giaDup.c:82
Gia_Man_t * Gia_ManDupPermFlop(Gia_Man_t *p, Vec_Int_t *vFfPerm)
Definition giaDup.c:962
int nRegs
Definition gia.h:101
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManSweepWithBoxes()

Gia_Man_t * Gia_ManSweepWithBoxes ( Gia_Man_t * p,
void * pParsC,
void * pParsS,
int fConst,
int fEquiv,
int fVerbose,
int fVerbEquivs )

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

Synopsis [Reduces root model with scorr.]

Description []

SideEffects []

SeeAlso []

Definition at line 739 of file giaSweep.c.

740{
741 Gia_Man_t * pClp, * pNew, * pTemp;
742 int * pReprs, pFlopTypes[3] = {0};
743 int nFlopsNew, nFlops;
744 assert( Gia_ManRegNum(p) == 0 );
745 assert( p->pAigExtra != NULL );
746 // consider seq synthesis with multiple clock domains
747 if ( pParsC == NULL && Gia_ManClockDomainNum(p) > 1 )
748 return Gia_ManSweepWithBoxesAndDomains( p, pParsS, fConst, fEquiv, fVerbose, fVerbEquivs );
749 // order AIG objects
750 pNew = Gia_ManDupUnnormalize( p );
751 if ( pNew == NULL )
752 return NULL;
753 Gia_ManTransferTiming( pNew, p );
754 nFlops = Vec_IntCountEntry(pNew->vRegClasses, 1);
755 // find global equivalences
756 pClp = Gia_ManDupCollapse( pNew, pNew->pAigExtra, NULL, pParsC ? 0 : 1 );
757 //Gia_DumpAiger( pClp, p->pSpec, 1, 1 );
758 // compute equivalences
759 if ( pParsC )
760 Gia_ManFraigSweepPerform( pClp, pParsC );
761 else if ( pParsS )
763 else
764 Gia_ManSeqCleanupClasses( pClp, fConst, fEquiv, fVerbose );
765 // transfer equivalences
766 pReprs = Gia_ManFraigSelectReprs( pNew, pClp, fVerbose, pFlopTypes );
767 Gia_ManStop( pClp );
768 // reduce AIG
769 Gia_ManTransferTiming( p, pNew );
770 pNew = Gia_ManFraigReduceGia( pTemp = pNew, pReprs );
771 Gia_ManTransferTiming( pNew, p );
772 Gia_ManStop( pTemp );
773 ABC_FREE( pReprs );
774 // derive new AIG
775 pNew = Gia_ManDupWithBoxes( pTemp = pNew, pParsC ? 0 : 1 );
776 Gia_ManStop( pTemp );
777 // report
778 nFlopsNew = Vec_IntCountEntry(pNew->vRegClasses, 1);
779 pFlopTypes[2] = nFlops - nFlopsNew - (pFlopTypes[0] + pFlopTypes[1]);
780 if ( fVerbEquivs )
781 {
782 printf( "Domain %2d : %5d -> %5d : ", 1, nFlops, nFlopsNew );
783 printf( "EqConst =%4d. EqFlop =%4d. Dangling =%4d. Unused =%4d.\n",
784 pFlopTypes[0], pFlopTypes[1], Abc_MaxInt(0, pFlopTypes[2]), Abc_MaxInt(0, -pFlopTypes[2]) );
785 }
786 // normalize the result
787 pNew = Gia_ManDupNormalize( pTemp = pNew, 0 );
788 Gia_ManTransferTiming( pNew, pTemp );
789 Gia_ManStop( pTemp );
790 // check integrity
791 //Gia_ManCheckIntegrityWithBoxes( pNew );
792 return pNew;
793}
Gia_Man_t * Gia_ManSweepWithBoxesAndDomains(Gia_Man_t *p, void *pParsS, int fConst, int fEquiv, int fVerbose, int fVerbEquivs)
Definition giaSweep.c:671
int * Gia_ManFraigSelectReprs(Gia_Man_t *p, Gia_Man_t *pClp, int fVerbose, int pFlopTypes[3])
Definition giaSweep.c:478
Gia_Man_t * Gia_ManFraigReduceGia(Gia_Man_t *p, int *pReprs)
Definition giaSweep.c:346
Gia_Man_t * Gia_ManDupWithBoxes(Gia_Man_t *p, int fSeq)
Definition giaSweep.c:124
Gia_Man_t * Gia_ManDupCollapse(Gia_Man_t *p, Gia_Man_t *pBoxes, Vec_Int_t *vBoxPres, int fSeq)
Definition giaTim.c:802
Gia_Man_t * Gia_ManDupNormalize(Gia_Man_t *p, int fHashMapping)
Definition giaTim.c:139
int Gia_ManClockDomainNum(Gia_Man_t *p)
Definition giaTim.c:74
Gia_Man_t * Gia_ManDupUnnormalize(Gia_Man_t *p)
Definition giaTim.c:382
Here is the call graph for this function:

◆ Gia_ManSweepWithBoxesAndDomains()

Gia_Man_t * Gia_ManSweepWithBoxesAndDomains ( Gia_Man_t * p,
void * pParsS,
int fConst,
int fEquiv,
int fVerbose,
int fVerbEquivs )

Definition at line 671 of file giaSweep.c.

672{
673 Gia_Man_t * pClp, * pNew, * pTemp;
674 int nDoms = Vec_IntFindMax(p->vRegClasses);
675 int * pReprs, iDom, pFlopTypes[3] = {0};
676 assert( Gia_ManRegNum(p) == 0 );
677 assert( p->pAigExtra != NULL );
678 assert( nDoms > 1 );
679 // order AIG objects
680 pNew = Gia_ManDupUnnormalize( p );
681 if ( pNew == NULL )
682 return NULL;
683 Gia_ManTransferTiming( pNew, p );
684 // iterate over domains
685 for ( iDom = 1; iDom <= nDoms; iDom++ )
686 {
687 int nFlopsNew, nFlops = Vec_IntCountEntry(pNew->vRegClasses, iDom);
688 if ( nFlops < 2 )
689 continue;
690 // find global equivalences
691 pClp = Gia_ManDupCollapse( pNew, pNew->pAigExtra, NULL, 1 );
692 //Gia_DumpAiger( pClp, p->pSpec, iDom, 2 );
693 //Gia_ManPrintStats( pClp, NULL );
694 // compute equivalences
695 Gia_ManSweepComputeOneDomainEquivs( pClp, pNew->vRegClasses, iDom, pParsS, fConst, fEquiv, fVerbose );
696 // transfer equivalences
697 pReprs = Gia_ManFraigSelectReprs( pNew, pClp, fVerbose, pFlopTypes );
698 Gia_ManStop( pClp );
699 // reduce AIG
700 Gia_ManTransferTiming( p, pNew );
701 pNew = Gia_ManFraigReduceGia( pTemp = pNew, pReprs );
702 Gia_ManTransferTiming( pNew, p );
703 Gia_ManStop( pTemp );
704 ABC_FREE( pReprs );
705 // derive new AIG
706 pNew = Gia_ManDupWithBoxes( pTemp = pNew, 1 );
707 Gia_ManStop( pTemp );
708 // report
709 nFlopsNew = Vec_IntCountEntry(pNew->vRegClasses, iDom);
710 pFlopTypes[2] = nFlops - nFlopsNew - (pFlopTypes[0] + pFlopTypes[1]);
711 if ( fVerbEquivs )
712 {
713 printf( "Domain %2d : %5d -> %5d : ", iDom, nFlops, nFlopsNew );
714 printf( "EqConst =%4d. EqFlop =%4d. Dangling =%4d. Unused =%4d.\n",
715 pFlopTypes[0], pFlopTypes[1], Abc_MaxInt(0, pFlopTypes[2]), Abc_MaxInt(0, -pFlopTypes[2]) );
716 //Gia_ManPrintStats( pNew, NULL );
717 }
718 }
719 // normalize the result
720 pNew = Gia_ManDupNormalize( pTemp = pNew, 0 );
721 Gia_ManTransferTiming( pNew, pTemp );
722 Gia_ManStop( pTemp );
723 // check integrity
724 //Gia_ManCheckIntegrityWithBoxes( pNew );
725 return pNew;
726}
void Gia_ManSweepComputeOneDomainEquivs(Gia_Man_t *p, Vec_Int_t *vRegClasses, int iDom, void *pParsS, int fConst, int fEquiv, int fVerbose)
Definition giaSweep.c:629
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ObjFanin0CopyRepr()

int Gia_ObjFanin0CopyRepr ( Gia_Man_t * p,
Gia_Obj_t * pObj,
int * pReprs )

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

Synopsis [Duplicates the AIG in the DFS order.]

Description []

SideEffects []

SeeAlso []

Definition at line 330 of file giaSweep.c.

331{
332 int fanId = Gia_ObjFaninId0p( p, pObj );
333 if ( pReprs[fanId] == -1 )
334 return Gia_ObjFanin0Copy( pObj );
335 assert( Abc_Lit2Var(pReprs[fanId]) < Gia_ObjId(p, pObj) );
336 return Abc_LitNotCond( Gia_ObjValue(Gia_ManObj(p, Abc_Lit2Var(pReprs[fanId]))), Gia_ObjFaninC0(pObj) ^ Abc_LitIsCompl(pReprs[fanId]) );
337}
Here is the caller graph for this function:

◆ Gia_ObjFanin1CopyRepr()

int Gia_ObjFanin1CopyRepr ( Gia_Man_t * p,
Gia_Obj_t * pObj,
int * pReprs )

Definition at line 338 of file giaSweep.c.

339{
340 int fanId = Gia_ObjFaninId1p( p, pObj );
341 if ( pReprs[fanId] == -1 )
342 return Gia_ObjFanin1Copy( pObj );
343 assert( Abc_Lit2Var(pReprs[fanId]) < Gia_ObjId(p, pObj) );
344 return Abc_LitNotCond( Gia_ObjValue(Gia_ManObj(p, Abc_Lit2Var(pReprs[fanId]))), Gia_ObjFaninC1(pObj) ^ Abc_LitIsCompl(pReprs[fanId]) );
345}
Here is the caller graph for this function: