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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Saig_ManReportUselessRegisters (Aig_Man_t *pAig)
 DECLARATIONS ///.
 
int Saig_ManReportComplements (Aig_Man_t *p)
 

Function Documentation

◆ Saig_ManReportComplements()

int Saig_ManReportComplements ( Aig_Man_t * p)

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

Synopsis [Report the number of pairs of complemented registers.]

Description []

SideEffects []

SeeAlso []

Definition at line 85 of file saigScl.c.

86{
87 Aig_Obj_t * pObj, * pFanin;
88 int i, Counter = 0;
89 assert( Aig_ManRegNum(p) > 0 );
90 Aig_ManForEachObj( p, pObj, i )
91 assert( !pObj->fMarkA );
92 Aig_ManForEachLiSeq( p, pObj, i )
93 {
94 pFanin = Aig_ObjFanin0(pObj);
95 if ( pFanin->fMarkA )
96 Counter++;
97 else
98 pFanin->fMarkA = 1;
99 }
100 // count fanins that have both attributes
101 Aig_ManForEachLiSeq( p, pObj, i )
102 {
103 pFanin = Aig_ObjFanin0(pObj);
104 pFanin->fMarkA = 0;
105 }
106 return Counter;
107}
#define Aig_ManForEachObj(p, pObj, i)
Definition aig.h:403
#define Aig_ManForEachLiSeq(p, pObj, i)
Definition aig.h:447
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
Cube * p
Definition exorList.c:222
unsigned int fMarkA
Definition aig.h:79
#define assert(ex)
Definition util_old.h:213
Here is the caller graph for this function:

◆ Saig_ManReportUselessRegisters()

ABC_NAMESPACE_IMPL_START void Saig_ManReportUselessRegisters ( Aig_Man_t * pAig)

DECLARATIONS ///.

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

FileName [saigScl.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Sequential AIG package.]

Synopsis [Sequential cleanup.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Report registers useless for SEC.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file saigScl.c.

46{
47 Aig_Obj_t * pObj, * pDriver;
48 int i, Counter1, Counter2;
49 // set PIO numbers
50 Aig_ManSetCioIds( pAig );
51 // check how many POs are driven by a register whose ref count is 1
52 Counter1 = 0;
53 Saig_ManForEachPo( pAig, pObj, i )
54 {
55 pDriver = Aig_ObjFanin0(pObj);
56 if ( Saig_ObjIsLo(pAig, pDriver) && Aig_ObjRefs(pDriver) == 1 )
57 Counter1++;
58 }
59 // check how many PIs have ref count 1 and drive a register
60 Counter2 = 0;
61 Saig_ManForEachLi( pAig, pObj, i )
62 {
63 pDriver = Aig_ObjFanin0(pObj);
64 if ( Saig_ObjIsPi(pAig, pDriver) && Aig_ObjRefs(pDriver) == 1 )
65 Counter2++;
66 }
67 if ( Counter1 )
68 printf( "Network has %d (out of %d) registers driving POs.\n", Counter1, Saig_ManRegNum(pAig) );
69 if ( Counter2 )
70 printf( "Network has %d (out of %d) registers driven by PIs.\n", Counter2, Saig_ManRegNum(pAig) );
71}
void Aig_ManSetCioIds(Aig_Man_t *p)
Definition aigUtil.c:978
#define Saig_ManForEachLi(p, pObj, i)
Definition saig.h:98
#define Saig_ManForEachPo(p, pObj, i)
Definition saig.h:93
Here is the call graph for this function:
Here is the caller graph for this function: