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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Cgt_Man_t
Cgt_ManCreate (Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars)
 DECLARATIONS ///. More...
 
void Cgt_ManClean (Cgt_Man_t *p)
 
void Cgt_ManPrintStats (Cgt_Man_t *p)
 
void Cgt_ManStop (Cgt_Man_t *p)
 

Function Documentation

void Cgt_ManClean ( Cgt_Man_t p)

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

Synopsis [Creates the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 86 of file cgtMan.c.

87 {
88  if ( p->pPart )
89  {
90  Aig_ManStop( p->pPart );
91  p->pPart = NULL;
92  }
93  if ( p->pCnf )
94  {
95  Cnf_DataFree( p->pCnf );
96  p->pCnf = NULL;
97  }
98  if ( p->pSat )
99  {
100  sat_solver_delete( p->pSat );
101  p->pSat = NULL;
102  }
103  if ( p->vPatts )
104  {
105  Vec_PtrFree( p->vPatts );
106  p->vPatts = NULL;
107  }
108 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
void sat_solver_delete(sat_solver *s)
Definition: satSolver.c:1141
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
ABC_NAMESPACE_IMPL_START Cgt_Man_t* Cgt_ManCreate ( Aig_Man_t pAig,
Aig_Man_t pCare,
Cgt_Par_t pPars 
)

DECLARATIONS ///.

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

FileName [cgtMan.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Clock gating package.]

Synopsis [Manipulation of clock gating manager.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Creates the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file cgtMan.c.

46 {
47  Cgt_Man_t * p;
48  // prepare the sequential AIG
49  assert( Saig_ManRegNum(pAig) > 0 );
50  Aig_ManFanoutStart( pAig );
51  Aig_ManSetCioIds( pAig );
52  // create interpolation manager
53  p = ABC_ALLOC( Cgt_Man_t, 1 );
54  memset( p, 0, sizeof(Cgt_Man_t) );
55  p->pPars = pPars;
56  p->pAig = pAig;
57  p->vGatesAll = Vec_VecStart( Saig_ManRegNum(pAig) );
58  p->vFanout = Vec_PtrAlloc( 1000 );
59  p->vVisited = Vec_PtrAlloc( 1000 );
60  p->nPattWords = 16;
61  if ( pCare == NULL )
62  return p;
63  // check out the constraints
64  if ( Aig_ManCiNum(pCare) != Aig_ManCiNum(pAig) )
65  {
66  printf( "The PI count of care (%d) and AIG (%d) differ. Careset is not used.\n",
67  Aig_ManCiNum(pCare), Aig_ManCiNum(pAig) );
68  return p;
69  }
70  p->pCare = pCare;
71  p->vSuppsInv = (Vec_Vec_t *)Aig_ManSupportsInverse( p->pCare );
72  return p;
73 }
char * memset()
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
void Aig_ManFanoutStart(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: aigFanout.c:56
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
static Vec_Vec_t * Vec_VecStart(int nSize)
Definition: vecVec.h:168
void Aig_ManSetCioIds(Aig_Man_t *p)
Definition: aigUtil.c:965
static int Saig_ManRegNum(Aig_Man_t *p)
Definition: saig.h:77
Vec_Ptr_t * Aig_ManSupportsInverse(Aig_Man_t *p)
Definition: aigPart.c:385
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define assert(ex)
Definition: util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Cgt_Man_t_ Cgt_Man_t
INCLUDES ///.
Definition: cgtInt.h:47
void Cgt_ManPrintStats ( Cgt_Man_t p)

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

Synopsis [Prints stats of the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 122 of file cgtMan.c.

123 {
124  printf( "Params: LevMax = %d. CandMax = %d. OdcMax = %d. ConfMax = %d. VarMin = %d. FlopMin = %d.\n",
125  p->pPars->nLevelMax, p->pPars->nCandMax, p->pPars->nOdcMax,
126  p->pPars->nConfMax, p->pPars->nVarsMin, p->pPars->nFlopsMin );
127  printf( "SAT : Calls = %d. Unsat = %d. Sat = %d. Fails = %d. Recycles = %d. ",
128  p->nCalls, p->nCallsUnsat, p->nCallsSat, p->nCallsUndec, p->nRecycles );
129  ABC_PRT( "Time", p->timeTotal );
130 /*
131  p->timeOther = p->timeTotal-p->timeAig-p->timePrepare-p->timeSat-p->timeDecision;
132  ABC_PRTP( "AIG ", p->timeAig, p->timeTotal );
133  ABC_PRTP( "Prepare ", p->timePrepare, p->timeTotal );
134  ABC_PRTP( "SAT solving", p->timeSat, p->timeTotal );
135  ABC_PRTP( " unsat ", p->timeSatUnsat, p->timeTotal );
136  ABC_PRTP( " sat ", p->timeSatSat, p->timeTotal );
137  ABC_PRTP( " undecided", p->timeSatUndec, p->timeTotal );
138  ABC_PRTP( "Other ", p->timeOther, p->timeTotal );
139  ABC_PRTP( "TOTAL ", p->timeTotal, p->timeTotal );
140 */
141 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_PRT(a, t)
Definition: abc_global.h:220
void Cgt_ManStop ( Cgt_Man_t p)

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

Synopsis [Frees the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 154 of file cgtMan.c.

155 {
156  if ( p->pPars->fVerbose )
157  Cgt_ManPrintStats( p );
158  if ( p->pFrame )
159  Aig_ManStop( p->pFrame );
160  Cgt_ManClean( p );
161  Vec_PtrFree( p->vFanout );
162  Vec_PtrFree( p->vVisited );
163  if ( p->vGates )
164  Vec_PtrFree( p->vGates );
165  if ( p->vGatesAll )
166  Vec_VecFree( p->vGatesAll );
167  if ( p->vSuppsInv )
168  Vec_VecFree( p->vSuppsInv );
169  ABC_FREE( p );
170 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
void Cgt_ManPrintStats(Cgt_Man_t *p)
Definition: cgtMan.c:122
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
void Cgt_ManClean(Cgt_Man_t *p)
Definition: cgtMan.c:86
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223