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

Go to the source code of this file.

Classes

struct  Agi_Man_t_
 

Macros

#define AGI_PI   ABC_CONST(0xFFFFFFFF00000000)
 DECLARATIONS ///.
 
#define AGI_RO   ABC_CONST(0xFFFFFFFE00000000)
 
#define AGI_PO   ABC_CONST(0xFFFFFFFD00000000)
 
#define AGI_RI   ABC_CONST(0xFFFFFFFC00000000)
 
#define AGI_C0   ABC_CONST(0xFFFFFFFBFFFFFFFA)
 
#define AGI_M0   ABC_CONST(0x00000000FFFFFFFF)
 
#define AGI_M1   ABC_CONST(0xFFFFFFFF00000000)
 
#define Agi_ManForEachCi(p, iCi, i)
 
#define Agi_ManForEachCo(p, iCo, i)
 
#define Agi_ManForEachObj(p, i)
 
#define Agi_ManForEachObj1(p, i)
 
#define Agi_ManForEachNode(p, i)
 

Typedefs

typedef struct Agi_Man_t_ Agi_Man_t
 

Functions

Agi_Man_tAgi_ManAlloc (int nCap)
 FUNCTION DEFINITIONS ///.
 
void Agi_ManFree (Agi_Man_t *p)
 
Agi_Man_tAgi_ManFromGia (Gia_Man_t *p)
 
int Agi_ManSuppSize_rec (Agi_Man_t *p, int i)
 
int Agi_ManSuppSizeOne (Agi_Man_t *p, int i)
 
int Agi_ManSuppSizeTest (Agi_Man_t *p)
 
void Agi_ManTest (Gia_Man_t *pGia)
 

Macro Definition Documentation

◆ AGI_C0

#define AGI_C0   ABC_CONST(0xFFFFFFFBFFFFFFFA)

Definition at line 34 of file giaAgi.c.

◆ AGI_M0

#define AGI_M0   ABC_CONST(0x00000000FFFFFFFF)

Definition at line 35 of file giaAgi.c.

◆ AGI_M1

#define AGI_M1   ABC_CONST(0xFFFFFFFF00000000)

Definition at line 36 of file giaAgi.c.

◆ Agi_ManForEachCi

#define Agi_ManForEachCi ( p,
iCi,
i )
Value:
Vec_IntForEachEntry( &p->vCis, iCi, i )
Cube * p
Definition exorList.c:222
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54

Definition at line 115 of file giaAgi.c.

◆ Agi_ManForEachCo

#define Agi_ManForEachCo ( p,
iCo,
i )
Value:
Vec_IntForEachEntry( &p->vCos, iCo, i )

Definition at line 116 of file giaAgi.c.

◆ Agi_ManForEachNode

#define Agi_ManForEachNode ( p,
i )
Value:
for ( i = 1; i < Agi_ManObjNum(p); i++ ) if ( !Agi_ObjIsNode(p, i) ) {} else

Definition at line 119 of file giaAgi.c.

◆ Agi_ManForEachObj

#define Agi_ManForEachObj ( p,
i )
Value:
for ( i = 0; i < Agi_ManObjNum(p); i++ )

Definition at line 117 of file giaAgi.c.

◆ Agi_ManForEachObj1

#define Agi_ManForEachObj1 ( p,
i )
Value:
for ( i = 1; i < Agi_ManObjNum(p); i++ )

Definition at line 118 of file giaAgi.c.

◆ AGI_PI

#define AGI_PI   ABC_CONST(0xFFFFFFFF00000000)

DECLARATIONS ///.

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

FileName [giaAig.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis []

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]

Definition at line 30 of file giaAgi.c.

◆ AGI_PO

#define AGI_PO   ABC_CONST(0xFFFFFFFD00000000)

Definition at line 32 of file giaAgi.c.

◆ AGI_RI

#define AGI_RI   ABC_CONST(0xFFFFFFFC00000000)

Definition at line 33 of file giaAgi.c.

◆ AGI_RO

#define AGI_RO   ABC_CONST(0xFFFFFFFE00000000)

Definition at line 31 of file giaAgi.c.

Typedef Documentation

◆ Agi_Man_t

typedef struct Agi_Man_t_ Agi_Man_t

Definition at line 38 of file giaAgi.c.

Function Documentation

◆ Agi_ManAlloc()

Agi_Man_t * Agi_ManAlloc ( int nCap)

FUNCTION DEFINITIONS ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 136 of file giaAgi.c.

137{
138 Agi_Man_t * p;
139 nCap = Abc_MaxInt( nCap, 16 );
140 p = ABC_CALLOC( Agi_Man_t, 1 );
141 p->nCap = nCap;
142 p->pObjs = ABC_CALLOC( word, nCap );
143 p->pTravIds = ABC_CALLOC( unsigned, nCap );
144 p->pObjs[0] = AGI_C0;
145 p->nObjs = 1;
146 return p;
147}
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define AGI_C0
Definition giaAgi.c:34
struct Agi_Man_t_ Agi_Man_t
Definition giaAgi.c:38
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
Here is the caller graph for this function:

◆ Agi_ManFree()

void Agi_ManFree ( Agi_Man_t * p)

Definition at line 148 of file giaAgi.c.

149{
150 ABC_FREE( p->pObjs );
151 ABC_FREE( p->pTravIds );
152 ABC_FREE( p->vCis.pArray );
153 ABC_FREE( p->vCos.pArray );
154 ABC_FREE( p );
155}
#define ABC_FREE(obj)
Definition abc_global.h:267
Here is the caller graph for this function:

◆ Agi_ManFromGia()

Agi_Man_t * Agi_ManFromGia ( Gia_Man_t * p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 168 of file giaAgi.c.

169{
170 Agi_Man_t * pNew;
171 Gia_Obj_t * pObj;
172 int i;
173 pNew = Agi_ManAlloc( Gia_ManObjNum(p) );
174 Gia_ManForEachObj1( p, pObj, i )
175 if ( Gia_ObjIsAnd(pObj) )
176 pObj->Value = Agi_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
177 else if ( Gia_ObjIsCo(pObj) )
178 pObj->Value = Agi_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
179 else if ( Gia_ObjIsCi(pObj) )
180 pObj->Value = Agi_ManAppendCi( pNew );
181 else assert( 0 );
182 return pNew;
183}
Agi_Man_t * Agi_ManAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition giaAgi.c:136
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
#define Gia_ManForEachObj1(p, pObj, i)
Definition gia.h:1192
unsigned Value
Definition gia.h:89
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Agi_ManSuppSize_rec()

int Agi_ManSuppSize_rec ( Agi_Man_t * p,
int i )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 196 of file giaAgi.c.

197{
198 if ( p->pTravIds[i] == p->nTravIds )
199 return 0;
200 p->pTravIds[i] = p->nTravIds;
201 if ( Agi_ObjIsCi(p, i) )
202 return 1;
203 assert( Agi_ObjIsAnd(p, i) );
204 return Agi_ManSuppSize_rec( p, Agi_ObjVar0(p, i) ) + Agi_ManSuppSize_rec( p, Agi_ObjVar1(p, i) );
205}
int Agi_ManSuppSize_rec(Agi_Man_t *p, int i)
Definition giaAgi.c:196
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Agi_ManSuppSizeOne()

int Agi_ManSuppSizeOne ( Agi_Man_t * p,
int i )

Definition at line 206 of file giaAgi.c.

207{
208 p->nTravIds++;
209 return Agi_ManSuppSize_rec( p, i );
210}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Agi_ManSuppSizeTest()

int Agi_ManSuppSizeTest ( Agi_Man_t * p)

Definition at line 211 of file giaAgi.c.

212{
213 abctime clk = Abc_Clock();
214 int i, Counter = 0;
216 Counter += (Agi_ManSuppSizeOne(p, i) <= 16);
217 printf( "Nodes with small support %d (out of %d)\n", Counter, Agi_ManNodeNum(p) );
218 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
219 return Counter;
220
221}
ABC_INT64_T abctime
Definition abc_global.h:332
#define Agi_ManForEachNode(p, i)
Definition giaAgi.c:119
int Agi_ManSuppSizeOne(Agi_Man_t *p, int i)
Definition giaAgi.c:206
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Agi_ManTest()

void Agi_ManTest ( Gia_Man_t * pGia)

Definition at line 222 of file giaAgi.c.

223{
224 extern int Gia_ManSuppSizeTest( Gia_Man_t * p );
225 Agi_Man_t * p;
226 Gia_ManSuppSizeTest( pGia );
227 p = Agi_ManFromGia( pGia );
229 Agi_ManFree( p );
230}
int Agi_ManSuppSizeTest(Agi_Man_t *p)
Definition giaAgi.c:211
void Agi_ManFree(Agi_Man_t *p)
Definition giaAgi.c:148
Agi_Man_t * Agi_ManFromGia(Gia_Man_t *p)
Definition giaAgi.c:168
int Gia_ManSuppSizeTest(Gia_Man_t *p)
Definition giaDfs.c:300
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
Here is the call graph for this function: