abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
giaIso3.c File Reference
#include "gia.h"

Go to the source code of this file.

Functions

static unsigned Gia_Iso3Node (Gia_Obj_t *pObj)
 FUNCTION DEFINITIONS ///. More...
 
void Gia_Iso3Init (Gia_Man_t *p)
 
static void Gia_Iso3ComputeEdge (Gia_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pFanin, int fCompl, Vec_Int_t *vSign)
 
void Gia_Iso3Compute (Gia_Man_t *p, Vec_Int_t *vSign)
 
static Vec_Int_tGia_Iso3Save (Gia_Man_t *p)
 
int Gia_Iso3Unique (Vec_Int_t *vSign)
 
void Gia_Iso3Test (Gia_Man_t *p)
 

Variables

static
ABC_NAMESPACE_IMPL_START
unsigned 
Iso_Nodes [6] = { 0x04892ed6, 0xc2523d7d, 0xdc36cd2e, 0xf2db64f8, 0xde3126bb, 0xdebbdff0 }
 DECLARATIONS ///. More...
 
static unsigned Iso_Fanio [2] = { 0x855ee0cf, 0x946e1b5f }
 
static unsigned Iso_Compl [2] = { 0x8ba63e50, 0x14d87f02 }
 

Function Documentation

void Gia_Iso3Compute ( Gia_Man_t p,
Vec_Int_t vSign 
)

Definition at line 83 of file giaIso3.c.

84 {
85  Gia_Obj_t * pObj;
86  int i;
87  Gia_ManForEachObj( p, pObj, i )
88  {
89  if ( Gia_ObjIsAnd(pObj) || Gia_ObjIsCo(pObj) )
90  Gia_Iso3ComputeEdge( p, pObj, Gia_ObjFanin0(pObj), Gia_ObjFaninC0(pObj), vSign );
91  if ( Gia_ObjIsAnd(pObj) )
92  Gia_Iso3ComputeEdge( p, pObj, Gia_ObjFanin1(pObj), Gia_ObjFaninC1(pObj), vSign );
93  }
94 }
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
Definition: gia.h:75
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
Definition: gia.h:421
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition: gia.h:984
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static void Gia_Iso3ComputeEdge(Gia_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pFanin, int fCompl, Vec_Int_t *vSign)
Definition: giaIso3.c:78
static void Gia_Iso3ComputeEdge ( Gia_Man_t p,
Gia_Obj_t pObj,
Gia_Obj_t pFanin,
int  fCompl,
Vec_Int_t vSign 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 78 of file giaIso3.c.

79 {
80  pObj->Value += Vec_IntEntry(vSign, Gia_ObjId(p, pFanin)) + Iso_Compl[fCompl] + Iso_Fanio[0];
81  pFanin->Value += Vec_IntEntry(vSign, Gia_ObjId(p, pObj)) + Iso_Compl[fCompl] + Iso_Fanio[1];
82 }
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:410
static unsigned Iso_Fanio[2]
Definition: giaIso3.c:31
static unsigned Iso_Compl[2]
Definition: giaIso3.c:32
unsigned Value
Definition: gia.h:87
void Gia_Iso3Init ( Gia_Man_t p)

Definition at line 59 of file giaIso3.c.

60 {
61  Gia_Obj_t * pObj;
62  int i;
63  Gia_ManForEachObj( p, pObj, i )
64  pObj->Value = Gia_Iso3Node( pObj );
65 }
Definition: gia.h:75
static unsigned Gia_Iso3Node(Gia_Obj_t *pObj)
FUNCTION DEFINITIONS ///.
Definition: giaIso3.c:49
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition: gia.h:984
static unsigned Gia_Iso3Node ( Gia_Obj_t pObj)
inlinestatic

FUNCTION DEFINITIONS ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 49 of file giaIso3.c.

50 {
51  if ( Gia_ObjIsAnd(pObj) )
52  return Iso_Nodes[Gia_ObjFaninC0(pObj) + Gia_ObjFaninC1(pObj)];
53  if ( Gia_ObjIsCi(pObj) )
54  return Iso_Nodes[3];
55  if ( Gia_ObjIsCo(pObj) )
56  return Iso_Nodes[4];
57  return Iso_Nodes[5];
58 }
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
Definition: gia.h:421
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Definition: gia.h:420
static ABC_NAMESPACE_IMPL_START unsigned Iso_Nodes[6]
DECLARATIONS ///.
Definition: giaIso3.c:30
static Vec_Int_t* Gia_Iso3Save ( Gia_Man_t p)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 107 of file giaIso3.c.

108 {
109  Vec_Int_t * vSign;
110  Gia_Obj_t * pObj;
111  int i;
112  vSign = Vec_IntAlloc( Gia_ManObjNum(p) );
113  Gia_ManForEachObj( p, pObj, i )
114  Vec_IntPush( vSign, pObj->Value );
115  return vSign;
116 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Definition: gia.h:75
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition: gia.h:984
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
void Gia_Iso3Test ( Gia_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 138 of file giaIso3.c.

139 {
140  int nIterMax = 500;
141  int i, Prev = -1, This;
142  abctime clk = Abc_Clock();
143  Vec_Int_t * vSign = NULL;
144  Gia_Iso3Init( p );
145  for ( i = 0; i < nIterMax; i++ )
146  {
147  vSign = Gia_Iso3Save( p );
148 // This = Gia_Iso3Unique( vSign );
149  This = Vec_IntUniqueCount( vSign, 1, NULL );
150  printf( "Iter %3d : %6d out of %6d ", i, This, Vec_IntSize(vSign) );
151  Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
152  if ( This == Prev )
153  break;
154  Prev = This;
155  Gia_Iso3Compute( p, vSign );
156  Vec_IntFreeP( &vSign );
157  }
158  Vec_IntFreeP( &vSign );
159 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static abctime Abc_Clock()
Definition: abc_global.h:279
static Vec_Int_t * Gia_Iso3Save(Gia_Man_t *p)
Definition: giaIso3.c:107
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
void Gia_Iso3Compute(Gia_Man_t *p, Vec_Int_t *vSign)
Definition: giaIso3.c:83
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Vec_IntUniqueCount(Vec_Int_t *vData, int nIntSize, Vec_Int_t **pvMap)
Definition: vecInt.h:1437
ABC_INT64_T abctime
Definition: abc_global.h:278
void Gia_Iso3Init(Gia_Man_t *p)
Definition: giaIso3.c:59
int Gia_Iso3Unique ( Vec_Int_t vSign)

Definition at line 117 of file giaIso3.c.

118 {
119  int nUnique;
120  Vec_Int_t * vCopy = Vec_IntDup( vSign );
121  Vec_IntUniqify( vCopy );
122  nUnique = Vec_IntSize(vCopy);
123  Vec_IntFree( vCopy );
124  return nUnique;
125 }
static Vec_Int_t * Vec_IntDup(Vec_Int_t *pVec)
Definition: vecInt.h:214
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Vec_IntUniqify(Vec_Int_t *p)
Definition: vecInt.h:1314
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235

Variable Documentation

unsigned Iso_Compl[2] = { 0x8ba63e50, 0x14d87f02 }
static

Definition at line 32 of file giaIso3.c.

unsigned Iso_Fanio[2] = { 0x855ee0cf, 0x946e1b5f }
static

Definition at line 31 of file giaIso3.c.

ABC_NAMESPACE_IMPL_START unsigned Iso_Nodes[6] = { 0x04892ed6, 0xc2523d7d, 0xdc36cd2e, 0xf2db64f8, 0xde3126bb, 0xdebbdff0 }
static

DECLARATIONS ///.

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

FileName [giaIso3.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:
giaIso3.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 30 of file giaIso3.c.