Go to the source code of this file.
Function*************************************************************
Synopsis [Collects nodes in the cone.]
Description []
SideEffects []
SeeAlso []
Definition at line 195 of file ivyDfs.c.
204 assert( pObj->fMarkA == 0 );
static int Ivy_IsComplement(Ivy_Obj_t *p)
void Ivy_ManCollectCone_rec(Ivy_Obj_t *pObj, Vec_Ptr_t *vCone)
static Ivy_Obj_t * Ivy_Regular(Ivy_Obj_t *p)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
static void Vec_PtrClear(Vec_Ptr_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Function*************************************************************
Synopsis [Collects nodes in the cone.]
Description []
SideEffects []
SeeAlso []
Definition at line 168 of file ivyDfs.c.
void Ivy_ManCollectCone_rec(Ivy_Obj_t *pObj, Vec_Ptr_t *vCone)
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static Ivy_Obj_t * Ivy_ObjFanin1(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
Function*************************************************************
Synopsis [Collects AND/EXOR nodes in the DFS order from CIs to COs.]
Description []
SideEffects []
SeeAlso []
Definition at line 87 of file ivyDfs.c.
95 assert( !pObj->fMarkA && !pObj->fMarkB );
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START void Ivy_ManDfs_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj, Vec_Int_t *vNodes)
DECLARATIONS ///.
static int Ivy_ManBufNum(Ivy_Man_t *p)
#define Ivy_ManForEachPo(p, pObj, i)
static int Ivy_ManLatchNum(Ivy_Man_t *p)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Ivy_ObjClearMarkA(Ivy_Obj_t *pObj)
static int Vec_IntSize(Vec_Int_t *p)
static int Ivy_ManNodeNum(Ivy_Man_t *p)
#define Ivy_ManForEachObj(p, pObj, i)
DECLARATIONS ///.
CFile****************************************************************
FileName [ivyDfs.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [And-Inverter Graph package.]
Synopsis [DFS collection procedures.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - May 11, 2006.]
Revision [
- Id:
- ivyDfs.c,v 1.00 2006/05/11 00:00:00 alanmi Exp
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Collects nodes in the DFS order.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file ivyDfs.c.
52 if (
p->pHaig == NULL && pObj->
pEquiv )
67 if (
p->pHaig == NULL && pObj->
pEquiv )
ABC_NAMESPACE_IMPL_START void Ivy_ManDfs_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj, Vec_Int_t *vNodes)
DECLARATIONS ///.
static int Ivy_ObjIsMarkA(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin1(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static void Ivy_ObjSetMarkA(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_Regular(Ivy_Obj_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Ivy_ObjIsAnd(Ivy_Obj_t *pObj)
static int Ivy_ObjIsExor(Ivy_Obj_t *pObj)
static int Ivy_ObjIsConst1(Ivy_Obj_t *pObj)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
static int Ivy_ObjIsCi(Ivy_Obj_t *pObj)
Function*************************************************************
Synopsis [Collects AND/EXOR nodes in the DFS order from CIs to COs.]
Description []
SideEffects []
SeeAlso []
Definition at line 121 of file ivyDfs.c.
129 assert( !pObj->fMarkA && !pObj->fMarkB );
150 if ( pvLatches == NULL )
153 *pvLatches = vLatches;
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START void Ivy_ManDfs_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj, Vec_Int_t *vNodes)
DECLARATIONS ///.
#define Ivy_ManForEachPo(p, pObj, i)
#define Ivy_ManForEachLatch(p, pObj, i)
static int Ivy_ManLatchNum(Ivy_Man_t *p)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Ivy_ObjClearMarkA(Ivy_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define Ivy_ManForEachNodeVec(p, vIds, pObj, i)
static int Ivy_ManNodeNum(Ivy_Man_t *p)
#define Ivy_ManForEachObj(p, pObj, i)
static void Vec_IntFree(Vec_Int_t *p)
Function*************************************************************
Synopsis [Detects combinational loops.]
Description [This procedure is based on the idea suggested by Donald Chai. As we traverse the network and visit the nodes, we need to distinquish three types of nodes: (1) those that are visited for the first time, (2) those that have been visited in this traversal but are currently not on the traversal path, (3) those that have been visited and are currently on the travesal path. When the node of type (3) is encountered, it means that there is a combinational loop. To mark the three types of nodes, two new values of the traversal IDs are used.]
SideEffects []
SeeAlso []
Definition at line 373 of file ivyDfs.c.
int Ivy_ManIsAcyclic_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static int Ivy_ObjIsLatch(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
#define Ivy_ManForEachCo(p, pObj, i)
void Ivy_ManIncrementTravId(Ivy_Man_t *p)
DECLARATIONS ///.
static int Ivy_ObjId(Ivy_Obj_t *pObj)
Function*************************************************************
Synopsis [Recursively detects combinational loops.]
Description []
SideEffects []
SeeAlso []
Definition at line 294 of file ivyDfs.c.
302 fprintf( stdout,
"Manager contains combinational loop!\n" );
303 fprintf( stdout,
"Node \"%d\" is encountered twice on the following path:\n",
Ivy_ObjId(pObj) );
304 fprintf( stdout,
" %d",
Ivy_ObjId(pObj) );
320 fprintf( stdout,
" -> (%d",
Ivy_ObjId(pObj) );
322 fprintf( stdout,
" %d",
Ivy_ObjId(pTemp) );
323 fprintf( stdout,
")" );
340 fprintf( stdout,
" -> %d",
Ivy_ObjId(pObj) );
347 fprintf( stdout,
" -> %d",
Ivy_ObjId(pObj) );
static int Ivy_IsComplement(Ivy_Obj_t *p)
int Ivy_ManIsAcyclic_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin1(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static int Ivy_ObjIsTravIdPrevious(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static void Ivy_ObjSetTravIdPrevious(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static int Ivy_ObjRefs(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_Regular(Ivy_Obj_t *p)
static int Ivy_ObjIsTravIdCurrent(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
static int Ivy_ObjIsConst1(Ivy_Obj_t *pObj)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
static int Ivy_ObjIsCi(Ivy_Obj_t *pObj)
static int Ivy_ObjId(Ivy_Obj_t *pObj)
static void Ivy_ObjSetTravIdCurrent(Ivy_Man_t *p, Ivy_Obj_t *pObj)
Function*************************************************************
Synopsis [Returns the nodes by level.]
Description []
SideEffects []
SeeAlso []
Definition at line 224 of file ivyDfs.c.
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
#define Ivy_ManForEachObj(p, pObj, i)
Function*************************************************************
Synopsis [Computes required levels for each node.]
Description [Assumes topological ordering of the nodes.]
SideEffects []
SeeAlso []
Definition at line 250 of file ivyDfs.c.
255 int i, k, Level, LevelMax;
256 assert(
p->vRequired == NULL );
279 p->vRequired = vLevelsR;
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Ivy_ObjFaninId1(Ivy_Obj_t *pObj)
static void Vec_VecFree(Vec_Vec_t *p)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
int Ivy_ManLevels(Ivy_Man_t *p)
static int Ivy_ManObjIdMax(Ivy_Man_t *p)
static int Ivy_ObjFaninId0(Ivy_Obj_t *pObj)
static Vec_Int_t * Vec_IntStart(int nSize)
Vec_Vec_t * Ivy_ManLevelize(Ivy_Man_t *p)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Ivy_ObjIsExor(Ivy_Obj_t *pObj)
#define Ivy_ManForEachObj(p, pObj, i)
#define Vec_VecForEachEntryReverseReverse(Type, vGlob, pEntry, i, k)
int Ivy_ManSetLevels |
( |
Ivy_Man_t * |
p, |
|
|
int |
fHaig |
|
) |
| |
Function*************************************************************
Synopsis [Sets the levels of the nodes.]
Description []
SideEffects []
SeeAlso []
Definition at line 457 of file ivyDfs.c.
466 printf( "CI %d has a choice, which will not be visualized.\n", pObj->Id );
483 LevelMax =
IVY_MAX( LevelMax, (
int)pObj->Level );
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
#define Ivy_ManForEachCo(p, pObj, i)
static void Ivy_ObjClearMarkA(Ivy_Obj_t *pObj)
static int Ivy_ObjRefs(Ivy_Obj_t *pObj)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
#define Ivy_ManForEachCi(p, pObj, i)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
#define Ivy_ManForEachObj(p, pObj, i)
int Ivy_ManSetLevels_rec(Ivy_Obj_t *pObj, int fHaig)
int Ivy_ManSetLevels_rec |
( |
Ivy_Obj_t * |
pObj, |
|
|
int |
fHaig |
|
) |
| |
Function*************************************************************
Synopsis [Sets the levels of the nodes.]
Description []
SideEffects []
SeeAlso []
Definition at line 408 of file ivyDfs.c.
432 unsigned LevelMax = pObj->
Level;
439 pObj->
Level = LevelMax;
441 pTemp->
Level = LevelMax;
static int Ivy_ObjLevelNew(Ivy_Obj_t *pObj)
static int Ivy_ObjIsMarkA(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin1(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static void Ivy_ObjSetMarkA(Ivy_Obj_t *pObj)
static int Ivy_ObjRefs(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_Regular(Ivy_Obj_t *p)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
static int Ivy_ObjIsAnd(Ivy_Obj_t *pObj)
static int Ivy_ObjIsExor(Ivy_Obj_t *pObj)
static int Ivy_ObjIsConst1(Ivy_Obj_t *pObj)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
static int Ivy_ObjIsCi(Ivy_Obj_t *pObj)
int Ivy_ManSetLevels_rec(Ivy_Obj_t *pObj, int fHaig)