ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
dchAig.c File Reference
#include "dchInt.h"
Include dependency graph for dchAig.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Dch_DeriveTotalAig_rec (Aig_Man_t *p, Aig_Obj_t *pObj)
 DECLARATIONS ///.
 
Aig_Man_tDch_DeriveTotalAig (Vec_Ptr_t *vAigs)
 MACRO DEFINITIONS ///.
 

Function Documentation

◆ Dch_DeriveTotalAig()

Aig_Man_t * Dch_DeriveTotalAig ( Vec_Ptr_t * vAigs)

MACRO DEFINITIONS ///.

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

Synopsis [Derives the cumulative AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 65 of file dchAig.c.

66{
67 Aig_Man_t * pAig, * pAig2, * pAigTotal;
68 Aig_Obj_t * pObj, * pObjPi, * pObjPo;
69 int i, k, nNodes;
70 assert( Vec_PtrSize(vAigs) > 0 );
71 // make sure they have the same number of PIs/POs
72 nNodes = 0;
73 pAig = (Aig_Man_t *)Vec_PtrEntry( vAigs, 0 );
74 Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, i )
75 {
76 assert( Aig_ManCiNum(pAig) == Aig_ManCiNum(pAig2) );
77 assert( Aig_ManCoNum(pAig) == Aig_ManCoNum(pAig2) );
78 nNodes += Aig_ManNodeNum(pAig2);
79 Aig_ManCleanData( pAig2 );
80 }
81 // map constant nodes
82 pAigTotal = Aig_ManStart( nNodes );
83 Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, k )
84 Aig_ManConst1(pAig2)->pData = Aig_ManConst1(pAigTotal);
85 // map primary inputs
86 Aig_ManForEachCi( pAig, pObj, i )
87 {
88 pObjPi = Aig_ObjCreateCi( pAigTotal );
89 Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, k )
90 Aig_ManCi( pAig2, i )->pData = pObjPi;
91 }
92 // construct the AIG in the order of POs
93 Aig_ManForEachCo( pAig, pObj, i )
94 {
95 Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, k )
96 {
97 pObjPo = Aig_ManCo( pAig2, i );
98 Dch_DeriveTotalAig_rec( pAigTotal, Aig_ObjFanin0(pObjPo) );
99 }
100 Aig_ObjCreateCo( pAigTotal, Aig_ObjChild0Copy(pObj) );
101 }
102/*
103 // mark the cone of the first AIG
104 Aig_ManIncrementTravId( pAigTotal );
105 Aig_ManForEachObj( pAig, pObj, i )
106 if ( pObj->pData )
107 Aig_ObjSetTravIdCurrent( pAigTotal, pObj->pData );
108*/
109 // cleanup should not be done
110 return pAigTotal;
111}
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition aig.h:393
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition aigObj.c:66
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition aigMan.c:47
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
#define Aig_ManForEachCo(p, pObj, i)
Definition aig.h:398
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition aigObj.c:45
void Aig_ManCleanData(Aig_Man_t *p)
Definition aigUtil.c:205
ABC_NAMESPACE_IMPL_START void Dch_DeriveTotalAig_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
DECLARATIONS ///.
Definition dchAig.c:45
#define assert(ex)
Definition util_old.h:213
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dch_DeriveTotalAig_rec()

ABC_NAMESPACE_IMPL_START void Dch_DeriveTotalAig_rec ( Aig_Man_t * p,
Aig_Obj_t * pObj )

DECLARATIONS ///.

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

FileName [dchAig.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Choice computation for tech-mapping.]

Synopsis [AIG manipulation.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 29, 2008.]

Revision [

Id
dchAig.c,v 1.00 2008/07/29 00:00:00 alanmi Exp

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

Synopsis [Derives the cumulative AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file dchAig.c.

46{
47 if ( pObj->pData )
48 return;
49 Dch_DeriveTotalAig_rec( p, Aig_ObjFanin0(pObj) );
50 Dch_DeriveTotalAig_rec( p, Aig_ObjFanin1(pObj) );
51 pObj->pData = Aig_And( p, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
52}
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition aigOper.c:104
Cube * p
Definition exorList.c:222
void * pData
Definition aig.h:87
Here is the call graph for this function:
Here is the caller graph for this function: