ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cgt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Cgt_Par_t_
 

Typedefs

typedef typedefABC_NAMESPACE_HEADER_START struct Cgt_Par_t_ Cgt_Par_t
 INCLUDES ///.
 

Functions

void Cgt_SetDefaultParams (Cgt_Par_t *p)
 MACRO DEFINITIONS ///.
 
Vec_Vec_tCgt_ClockGatingCandidates (Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars, Vec_Int_t *vUseful)
 
Vec_Vec_tCgt_ClockGatingInt (Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars, Vec_Int_t *vUseful)
 
Aig_Man_tCgt_ClockGating (Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars)
 

Typedef Documentation

◆ Cgt_Par_t

typedef typedefABC_NAMESPACE_HEADER_START struct Cgt_Par_t_ Cgt_Par_t

INCLUDES ///.

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

FileName [cgt.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Clock gating package.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
cgt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

] PARAMETERS /// BASIC TYPES ///

Definition at line 48 of file cgt.h.

Function Documentation

◆ Cgt_ClockGating()

Aig_Man_t * Cgt_ClockGating ( Aig_Man_t * pAig,
Aig_Man_t * pCare,
Cgt_Par_t * pPars )
extern

Definition at line 298 of file cgtCore.c.

299{
300 Aig_Man_t * pGated;
301 Vec_Vec_t * vGates = Cgt_ClockGatingInt( pAig, pCare, pPars, NULL );
302 int nNodesUsed;
303 if ( pPars->fVerbose )
304 {
305// printf( "Before CG: " );
306// Aig_ManPrintStats( pAig );
307 }
308 pGated = Cgt_ManDeriveGatedAig( pAig, vGates, pPars->fAreaOnly, &nNodesUsed );
309 if ( pPars->fVerbose )
310 {
311// printf( "After CG: " );
312// Aig_ManPrintStats( pGated );
313 printf( "Nodes: Before CG = %6d. After CG = %6d. (%6.2f %%). Total after CG = %6d.\n",
314 Aig_ManNodeNum(pAig), nNodesUsed,
315 100.0*nNodesUsed/Aig_ManNodeNum(pAig),
316 Aig_ManNodeNum(pGated) );
317 }
318 Vec_VecFree( vGates );
319 return pGated;
320}
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
Aig_Man_t * Cgt_ManDeriveGatedAig(Aig_Man_t *pAig, Vec_Vec_t *vGates, int fReduce, int *pnUsedNodes)
Definition cgtAig.c:524
Vec_Vec_t * Cgt_ClockGatingInt(Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars, Vec_Int_t *vUseful)
Definition cgtCore.c:287
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition vecVec.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cgt_ClockGatingCandidates()

Vec_Vec_t * Cgt_ClockGatingCandidates ( Aig_Man_t * pAig,
Aig_Man_t * pCare,
Cgt_Par_t * pPars,
Vec_Int_t * vUseful )
extern

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

Synopsis [Performs clock-gating for the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 245 of file cgtCore.c.

246{
247 Bar_Progress_t * pProgress = NULL;
248 Cgt_Par_t Pars;
249 Cgt_Man_t * p;
250 Vec_Vec_t * vGatesAll;
251 int iStart;
252 abctime clk = Abc_Clock(), clkTotal = Abc_Clock();
253 // reset random numbers
254 Aig_ManRandom( 1 );
255 if ( pPars == NULL )
256 Cgt_SetDefaultParams( pPars = &Pars );
257 p = Cgt_ManCreate( pAig, pCare, pPars );
258 p->vUseful = vUseful;
259 p->pFrame = Cgt_ManDeriveAigForGating( p );
260p->timeAig += Abc_Clock() - clk;
261 assert( Aig_ManCoNum(p->pFrame) == Saig_ManRegNum(p->pAig) );
262 pProgress = Bar_ProgressStart( stdout, Aig_ManCoNum(p->pFrame) );
263 for ( iStart = 0; iStart < Aig_ManCoNum(p->pFrame); )
264 {
265 Bar_ProgressUpdate( pProgress, iStart, NULL );
266 iStart = Cgt_ClockGatingRange( p, iStart );
267 }
268 Bar_ProgressStop( pProgress );
269 vGatesAll = p->vGatesAll;
270 p->vGatesAll = NULL;
271p->timeTotal = Abc_Clock() - clkTotal;
272 Cgt_ManStop( p );
273 return vGatesAll;
274}
ABC_INT64_T abctime
Definition abc_global.h:332
unsigned Aig_ManRandom(int fReset)
Definition aigUtil.c:1170
void Bar_ProgressStop(Bar_Progress_t *p)
Definition bar.c:126
Bar_Progress_t * Bar_ProgressStart(FILE *pFile, int nItemsTotal)
FUNCTION DEFINITIONS ///.
Definition bar.c:66
struct Bar_Progress_t_ Bar_Progress_t
BASIC TYPES ///.
Definition bar.h:48
Aig_Man_t * Cgt_ManDeriveAigForGating(Cgt_Man_t *p)
Definition cgtAig.c:266
ABC_NAMESPACE_IMPL_START void Cgt_SetDefaultParams(Cgt_Par_t *p)
DECLARATIONS ///.
Definition cgtCore.c:46
int Cgt_ClockGatingRange(Cgt_Man_t *p, int iStart)
Definition cgtCore.c:201
typedefABC_NAMESPACE_HEADER_START struct Cgt_Man_t_ Cgt_Man_t
INCLUDES ///.
Definition cgtInt.h:47
Cgt_Man_t * Cgt_ManCreate(Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars)
DECLARATIONS ///.
Definition cgtMan.c:45
void Cgt_ManStop(Cgt_Man_t *p)
Definition cgtMan.c:154
typedefABC_NAMESPACE_HEADER_START struct Cgt_Par_t_ Cgt_Par_t
INCLUDES ///.
Definition cgt.h:48
Cube * p
Definition exorList.c:222
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cgt_ClockGatingInt()

Vec_Vec_t * Cgt_ClockGatingInt ( Aig_Man_t * pAig,
Aig_Man_t * pCare,
Cgt_Par_t * pPars,
Vec_Int_t * vUseful )
extern

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

Synopsis [Performs clock-gating for the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 287 of file cgtCore.c.

288{
289 Vec_Vec_t * vGatesAll, * vGates;
290 vGatesAll = Cgt_ClockGatingCandidates( pAig, pCare, pPars, vUseful );
291 if ( pPars->fAreaOnly )
292 vGates = Cgt_ManDecideArea( pAig, vGatesAll, pPars->nOdcMax, pPars->fVerbose );
293 else
294 vGates = Cgt_ManDecideSimple( pAig, vGatesAll, pPars->nOdcMax, pPars->fVerbose );
295 Vec_VecFree( vGatesAll );
296 return vGates;
297}
Vec_Vec_t * Cgt_ClockGatingCandidates(Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars, Vec_Int_t *vUseful)
Definition cgtCore.c:245
Vec_Vec_t * Cgt_ManDecideSimple(Aig_Man_t *pAig, Vec_Vec_t *vGatesAll, int nOdcMax, int fVerbose)
Definition cgtDecide.c:184
Vec_Vec_t * Cgt_ManDecideArea(Aig_Man_t *pAig, Vec_Vec_t *vGatesAll, int nOdcMax, int fVerbose)
Definition cgtDecide.c:255
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cgt_SetDefaultParams()

void Cgt_SetDefaultParams ( Cgt_Par_t * p)
extern

MACRO DEFINITIONS ///.

FUNCTION DECLARATIONS ///

MACRO DEFINITIONS ///.

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

FileName [cgtCore.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Clock gating package.]

Synopsis []

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [This procedure sets default parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file cgtCore.c.

47{
48 memset( p, 0, sizeof(Cgt_Par_t) );
49 p->nLevelMax = 25; // the max number of levels to look for clock-gates
50 p->nCandMax = 1000; // the max number of candidates at each node
51 p->nOdcMax = 0; // the max number of ODC levels to consider
52 p->nConfMax = 10; // the max number of conflicts at a node
53 p->nVarsMin = 1000; // the min number of vars to recycle the SAT solver
54 p->nFlopsMin = 10; // the min number of flops to recycle the SAT solver
55 p->fAreaOnly = 0; // derive clock-gating to minimize area
56 p->fVerbose = 0; // verbosity flag
57}
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function: