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

Go to the source code of this file.

Data Structures

struct  Gia_ManSup_t_
 

Typedefs

typedef
typedefABC_NAMESPACE_IMPL_START
struct Gia_ManSup_t_ 
Gia_ManSup_t
 DECLARATIONS ///. More...
 

Functions

Gia_ManSup_tGia_ManSupStart (int nVarsMax)
 FUNCTION DEFINITIONS ///. More...
 
void Gia_ManSupStop (Gia_ManSup_t *p)
 
void Gia_ManSupExperimentOne (Gia_ManSup_t *p, Gia_Obj_t *pData, Gia_Obj_t *pCare)
 
void Gia_ManSupExperiment (Gia_Man_t *pGia, Vec_Int_t *vPairs)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_IMPL_START struct Gia_ManSup_t_ Gia_ManSup_t

DECLARATIONS ///.

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

FileName [giaSupMin.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Support minimization for AIGs with don't-cares.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]

Definition at line 32 of file giaSupMin.c.

Function Documentation

void Gia_ManSupExperiment ( Gia_Man_t pGia,
Vec_Int_t vPairs 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 141 of file giaSupMin.c.

142 {
143  Gia_ManSup_t * p;
144  Gia_Obj_t * pData, * pCare;
145  int i;
146  p = Gia_ManSupStart( 16 );
147  p->pGia = pGia;
148  assert( Vec_IntSize(vPairs) % 2 == 0 );
149  for ( i = 0; i < Vec_IntSize(vPairs)/2; i++ )
150  {
151  Abc_Print( 1, "%6d : ", i );
152  pData = Gia_ManPo( pGia, Vec_IntEntry(vPairs, 2*i+0) );
153  pCare = Gia_ManPo( pGia, Vec_IntEntry(vPairs, 2*i+1) );
155  }
156  Gia_ManSupStop( p );
157 }
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Definition: gia.h:457
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
Definition: gia.h:406
typedefABC_NAMESPACE_IMPL_START struct Gia_ManSup_t_ Gia_ManSup_t
DECLARATIONS ///.
Definition: giaSupMin.c:32
Gia_ManSup_t * Gia_ManSupStart(int nVarsMax)
FUNCTION DEFINITIONS ///.
Definition: giaSupMin.c:64
Definition: gia.h:75
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
void Gia_ManSupStop(Gia_ManSup_t *p)
Definition: giaSupMin.c:91
void Gia_ManSupExperimentOne(Gia_ManSup_t *p, Gia_Obj_t *pData, Gia_Obj_t *pCare)
Definition: giaSupMin.c:113
#define assert(ex)
Definition: util_old.h:213
void Gia_ManSupExperimentOne ( Gia_ManSup_t p,
Gia_Obj_t pData,
Gia_Obj_t pCare 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 113 of file giaSupMin.c.

114 {
115  int iData = Gia_ObjId( p->pGia, Gia_Regular(pData) );
116  int iCare = Gia_ObjId( p->pGia, Gia_Regular(pCare) );
117  if ( !Gia_ObjIsAnd(Gia_Regular(pCare)) )
118  {
119  Abc_Print( 1, "Enable is not an AND.\n" );
120  return;
121  }
122  Abc_Print( 1, "DataSupp = %6d. DataCone = %6d. CareSupp = %6d. CareCone = %6d.",
123  Gia_ManSuppSize( p->pGia, &iData, 1 ),
124  Gia_ManConeSize( p->pGia, &iData, 1 ),
125  Gia_ManSuppSize( p->pGia, &iCare, 1 ),
126  Gia_ManConeSize( p->pGia, &iCare, 1 ) );
127  Abc_Print( 1, "\n" );
128 }
int Gia_ManSuppSize(Gia_Man_t *p, int *pNodes, int nNodes)
Definition: giaDfs.c:300
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
Definition: gia.h:377
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:410
int Gia_ManConeSize(Gia_Man_t *p, int *pNodes, int nNodes)
Definition: giaDfs.c:351
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
Gia_ManSup_t* Gia_ManSupStart ( int  nVarsMax)

FUNCTION DEFINITIONS ///.

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

Synopsis [Starts Decmetry manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 64 of file giaSupMin.c.

65 {
66  Gia_ManSup_t * p;
67  assert( nVarsMax <= 20 );
68  p = ABC_CALLOC( Gia_ManSup_t, 1 );
69  p->nVarsMax = nVarsMax;
70  p->nWordsMax = Kit_TruthWordNum( p->nVarsMax );
71  p->vTruthVars = Vec_PtrAllocTruthTables( p->nVarsMax );
72  p->vTruthNodes = Vec_PtrAllocSimInfo( 512, p->nWordsMax );
73  p->vConeCare = Vec_IntAlloc( 512 );
74  p->vConeData = Vec_IntAlloc( 512 );
75  p->pTruthIn = ABC_ALLOC( unsigned, p->nWordsMax );
76  p->pTruthOut = ABC_ALLOC( unsigned, p->nWordsMax );
77  return p;
78 }
static int Kit_TruthWordNum(int nVars)
Definition: kit.h:224
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Gia_ManSup_t_ Gia_ManSup_t
DECLARATIONS ///.
Definition: giaSupMin.c:32
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static Vec_Ptr_t * Vec_PtrAllocTruthTables(int nVars)
Definition: vecPtr.h:1065
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
#define assert(ex)
Definition: util_old.h:213
static Vec_Ptr_t * Vec_PtrAllocSimInfo(int nEntries, int nWords)
Definition: vecPtr.h:929
void Gia_ManSupStop ( Gia_ManSup_t p)

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

Synopsis [Stops Decmetry manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 91 of file giaSupMin.c.

92 {
93  ABC_FREE( p->pTruthIn );
94  ABC_FREE( p->pTruthOut );
95  Vec_IntFreeP( &p->vConeCare );
96  Vec_IntFreeP( &p->vConeData );
97  Vec_PtrFreeP( &p->vTruthVars );
98  Vec_PtrFreeP( &p->vTruthNodes );
99  ABC_FREE( p );
100 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240