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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Saig_ManSupport_rec (Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Ptr_t *vSupp)
 DECLARATIONS ///.
 
Vec_Ptr_tSaig_ManSupport (Aig_Man_t *p, Vec_Ptr_t *vNodes)
 
void Saig_ManPrintConeOne (Aig_Man_t *p, Aig_Obj_t *pObj)
 
void Saig_ManPrintCones (Aig_Man_t *p)
 FUNCTION DECLARATIONS ///.
 

Function Documentation

◆ Saig_ManPrintConeOne()

void Saig_ManPrintConeOne ( Aig_Man_t * p,
Aig_Obj_t * pObj )

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

Synopsis [Prints information about cones of influence of the POs.]

Description []

SideEffects []

SeeAlso []

Definition at line 103 of file saigCone.c.

104{
105 Vec_Ptr_t * vPrev, * vCur, * vTotal;
106 int s, i, nCurNew, nCurPrev, nCurOld;
107 assert( Saig_ObjIsPo(p, pObj) );
108 // start the array
109 vPrev = Vec_PtrAlloc( 100 );
110 Vec_PtrPush( vPrev, pObj );
111 // get the current support
112 vCur = Saig_ManSupport( p, vPrev );
113 Vec_PtrClear( vPrev );
114 printf( " PO %3d ", Aig_ObjCioId(pObj) );
115 // continue computing supports as long as there are now nodes
116 vTotal = Vec_PtrAlloc( 100 );
117 for ( s = 0; ; s++ )
118 {
119 // classify current into those new, prev, and older
120 nCurNew = nCurPrev = nCurOld = 0;
121 Vec_PtrForEachEntry( Aig_Obj_t *, vCur, pObj, i )
122 {
123 if ( Vec_PtrFind(vTotal, pObj) == -1 )
124 {
125 Vec_PtrPush( vTotal, pObj );
126 nCurNew++;
127 }
128 else if ( Vec_PtrFind(vPrev, pObj) >= 0 )
129 nCurPrev++;
130 else
131 nCurOld++;
132 }
133 assert( nCurNew + nCurPrev + nCurOld == Vec_PtrSize(vCur) );
134 // print the result
135 printf( "%d:%d %d=%d+%d+%d ", s, Vec_PtrSize(vTotal), Vec_PtrSize(vCur), nCurNew, nCurPrev, nCurOld );
136 if ( nCurNew == 0 )
137 break;
138 // compute one more step
139 Vec_PtrFree( vPrev );
140 vCur = Saig_ManSupport( p, vPrev = vCur );
141 }
142 printf( "\n" );
143 Vec_PtrFree( vPrev );
144 Vec_PtrFree( vCur );
145 Vec_PtrFree( vTotal );
146}
struct Aig_Obj_t_ Aig_Obj_t
Definition aig.h:51
Cube * p
Definition exorList.c:222
Vec_Ptr_t * Saig_ManSupport(Aig_Man_t *p, Vec_Ptr_t *vNodes)
Definition saigCone.c:77
#define assert(ex)
Definition util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Saig_ManPrintCones()

void Saig_ManPrintCones ( Aig_Man_t * p)

FUNCTION DECLARATIONS ///.

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

Synopsis [Prints information about cones of influence of the POs.]

Description []

SideEffects []

SeeAlso []

Definition at line 159 of file saigCone.c.

160{
161 Aig_Obj_t * pObj;
162 int i;
163 printf( "The format of this print-out: For each PO, x:a b=c+d+e, where \n" );
164 printf( "- x is the time-frame counting back from the PO\n" );
165 printf( "- a is the total number of registers in the COI of the PO so far\n" );
166 printf( "- b is the number of registers in the COI of the PO in this time-frame\n" );
167 printf( "- c is the number of registers in b that are new (appear for the first time)\n" );
168 printf( "- d is the number of registers in b in common with the previous time-frame\n" );
169 printf( "- e is the number of registers in b in common with other time-frames\n" );
171 Saig_ManForEachPo( p, pObj, i )
172 Saig_ManPrintConeOne( p, pObj );
173}
void Aig_ManSetCioIds(Aig_Man_t *p)
Definition aigUtil.c:978
void Saig_ManPrintConeOne(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition saigCone.c:103
#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:

◆ Saig_ManSupport()

Vec_Ptr_t * Saig_ManSupport ( Aig_Man_t * p,
Vec_Ptr_t * vNodes )

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

Synopsis [Counts the support size of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 77 of file saigCone.c.

78{
79 Vec_Ptr_t * vSupp;
80 Aig_Obj_t * pObj;
81 int i;
82 vSupp = Vec_PtrAlloc( 100 );
84 Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
85 {
86 assert( Aig_ObjIsCo(pObj) );
87 Saig_ManSupport_rec( p, Aig_ObjFanin0(pObj), vSupp );
88 }
89 return vSupp;
90}
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition aigUtil.c:44
ABC_NAMESPACE_IMPL_START void Saig_ManSupport_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Ptr_t *vSupp)
DECLARATIONS ///.
Definition saigCone.c:45
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Saig_ManSupport_rec()

ABC_NAMESPACE_IMPL_START void Saig_ManSupport_rec ( Aig_Man_t * p,
Aig_Obj_t * pObj,
Vec_Ptr_t * vSupp )

DECLARATIONS ///.

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

FileName [saigCone.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Sequential AIG package.]

Synopsis [Cone of influence computation.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Counts the support size of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file saigCone.c.

46{
47 if ( Aig_ObjIsTravIdCurrent(p, pObj) )
48 return;
49 Aig_ObjSetTravIdCurrent(p, pObj);
50 if ( Aig_ObjIsConst1(pObj) )
51 return;
52 if ( Aig_ObjIsCi(pObj) )
53 {
54 if ( Saig_ObjIsLo(p,pObj) )
55 {
56 pObj = Saig_ManLi( p, Aig_ObjCioId(pObj)-Saig_ManPiNum(p) );
57 Vec_PtrPush( vSupp, pObj );
58 }
59 return;
60 }
61 assert( Aig_ObjIsNode(pObj) );
62 Saig_ManSupport_rec( p, Aig_ObjFanin0(pObj), vSupp );
63 Saig_ManSupport_rec( p, Aig_ObjFanin1(pObj), vSupp );
64}
Here is the call graph for this function:
Here is the caller graph for this function: