#include "ivy.h"
Go to the source code of this file.
#define Ivy_ObjForEachFanoutInt | ( | pObj, | |||
pFanout | ) |
for ( pFanout = (pObj)->pFanout; pFanout; \ pFanout = Ivy_ObjNextFanout(pObj, pFanout) )
Definition at line 106 of file ivyFanout.c.
#define Ivy_ObjForEachFanoutIntSafe | ( | pObj, | |||
pFanout, | |||||
pFanout2 | ) |
for ( pFanout = (pObj)->pFanout, \ pFanout2 = Ivy_ObjNextFanout(pObj, pFanout); \ pFanout; \ pFanout = pFanout2, \ pFanout2 = Ivy_ObjNextFanout(pObj, pFanout) )
Definition at line 111 of file ivyFanout.c.
void Ivy_ManStartFanout | ( | Ivy_Man_t * | p | ) |
FUNCTION DEFINITIONS ///Function*************************************************************
Synopsis [Starts the fanout representation.]
Description []
SideEffects []
SeeAlso []
Definition at line 133 of file ivyFanout.c.
00134 { 00135 Ivy_Obj_t * pObj; 00136 int i; 00137 assert( !p->fFanout ); 00138 p->fFanout = 1; 00139 Ivy_ManForEachObj( p, pObj, i ) 00140 { 00141 if ( Ivy_ObjFanin0(pObj) ) 00142 Ivy_ObjAddFanout( p, Ivy_ObjFanin0(pObj), pObj ); 00143 if ( Ivy_ObjFanin1(pObj) ) 00144 Ivy_ObjAddFanout( p, Ivy_ObjFanin1(pObj), pObj ); 00145 } 00146 }
void Ivy_ManStopFanout | ( | Ivy_Man_t * | p | ) |
Function*************************************************************
Synopsis [Stops the fanout representation.]
Description []
SideEffects []
SeeAlso []
Definition at line 159 of file ivyFanout.c.
Function*************************************************************
Synopsis [Add the fanout.]
Description []
SideEffects []
SeeAlso []
Definition at line 180 of file ivyFanout.c.
00181 { 00182 assert( p->fFanout ); 00183 if ( pFanin->pFanout ) 00184 { 00185 *Ivy_ObjNextFanoutPlace(pFanin, pFanout) = pFanin->pFanout; 00186 *Ivy_ObjPrevFanoutPlace(pFanin, pFanin->pFanout) = pFanout; 00187 } 00188 pFanin->pFanout = pFanout; 00189 }
Function*************************************************************
Synopsis [Starts iteration through the fanouts.]
Description [Copies the currently available fanouts into the array.]
SideEffects [Can be used while the fanouts are being removed.]
SeeAlso []
Definition at line 259 of file ivyFanout.c.
00260 { 00261 Ivy_Obj_t * pFanout; 00262 assert( p->fFanout ); 00263 assert( !Ivy_IsComplement(pObj) ); 00264 Vec_PtrClear( vArray ); 00265 Ivy_ObjForEachFanoutInt( pObj, pFanout ) 00266 Vec_PtrPush( vArray, pFanout ); 00267 }
Function*************************************************************
Synopsis [Removes the fanout.]
Description []
SideEffects []
SeeAlso []
Definition at line 202 of file ivyFanout.c.
00203 { 00204 Ivy_Obj_t ** ppPlace1, ** ppPlace2, ** ppPlaceN; 00205 assert( pFanin->pFanout != NULL ); 00206 00207 ppPlace1 = Ivy_ObjNextFanoutPlace(pFanin, pFanout); 00208 ppPlaceN = Ivy_ObjPrevNextFanoutPlace(pFanin, pFanout); 00209 assert( *ppPlaceN == pFanout ); 00210 if ( ppPlaceN ) 00211 *ppPlaceN = *ppPlace1; 00212 00213 ppPlace2 = Ivy_ObjPrevFanoutPlace(pFanin, pFanout); 00214 ppPlaceN = Ivy_ObjNextPrevFanoutPlace(pFanin, pFanout); 00215 assert( ppPlaceN == NULL || *ppPlaceN == pFanout ); 00216 if ( ppPlaceN ) 00217 *ppPlaceN = *ppPlace2; 00218 00219 *ppPlace1 = NULL; 00220 *ppPlace2 = NULL; 00221 }
Function*************************************************************
Synopsis [Reads one fanout.]
Description [Returns fanout if there is only one fanout.]
SideEffects []
SeeAlso []
Definition at line 296 of file ivyFanout.c.
00297 { 00298 Ivy_Obj_t * pFanout; 00299 int Counter = 0; 00300 Ivy_ObjForEachFanoutInt( pObj, pFanout ) 00301 Counter++; 00302 return Counter; 00303 }
CFile****************************************************************
FileName [ivyFanout.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [And-Inverter Graph package.]
Synopsis [Representation of the fanouts.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - May 11, 2006.]
Revision [
] DECLARATIONS ///
Definition at line 28 of file ivyFanout.c.
00029 { 00030 assert( !Ivy_IsComplement(pObj) ); 00031 assert( !Ivy_IsComplement(pFanout) ); 00032 if ( pFanout == NULL ) 00033 return NULL; 00034 if ( Ivy_ObjFanin0(pFanout) == pObj ) 00035 return pFanout->pNextFan0; 00036 assert( Ivy_ObjFanin1(pFanout) == pObj ); 00037 return pFanout->pNextFan1; 00038 }
static Ivy_Obj_t** Ivy_ObjNextFanoutPlace | ( | Ivy_Obj_t * | pObj, | |
Ivy_Obj_t * | pFanout | |||
) | [inline, static] |
Definition at line 54 of file ivyFanout.c.
00055 { 00056 assert( !Ivy_IsComplement(pObj) ); 00057 assert( !Ivy_IsComplement(pFanout) ); 00058 if ( Ivy_ObjFanin0(pFanout) == pObj ) 00059 return &pFanout->pNextFan0; 00060 assert( Ivy_ObjFanin1(pFanout) == pObj ); 00061 return &pFanout->pNextFan1; 00062 }
static Ivy_Obj_t** Ivy_ObjNextPrevFanoutPlace | ( | Ivy_Obj_t * | pObj, | |
Ivy_Obj_t * | pFanout | |||
) | [inline, static] |
Definition at line 91 of file ivyFanout.c.
00092 { 00093 Ivy_Obj_t * pTemp; 00094 assert( !Ivy_IsComplement(pObj) ); 00095 assert( !Ivy_IsComplement(pFanout) ); 00096 pTemp = Ivy_ObjNextFanout(pObj, pFanout); 00097 if ( pTemp == NULL ) 00098 return NULL; 00099 if ( Ivy_ObjFanin0(pTemp) == pObj ) 00100 return &pTemp->pPrevFan0; 00101 assert( Ivy_ObjFanin1(pTemp) == pObj ); 00102 return &pTemp->pPrevFan1; 00103 }
void Ivy_ObjPatchFanout | ( | Ivy_Man_t * | p, | |
Ivy_Obj_t * | pFanin, | |||
Ivy_Obj_t * | pFanoutOld, | |||
Ivy_Obj_t * | pFanoutNew | |||
) |
Function*************************************************************
Synopsis [Replaces the fanout of pOld to be pFanoutNew.]
Description []
SideEffects []
SeeAlso []
Definition at line 234 of file ivyFanout.c.
00235 { 00236 Ivy_Obj_t ** ppPlace; 00237 ppPlace = Ivy_ObjPrevNextFanoutPlace(pFanin, pFanoutOld); 00238 assert( *ppPlace == pFanoutOld ); 00239 if ( ppPlace ) 00240 *ppPlace = pFanoutNew; 00241 ppPlace = Ivy_ObjNextPrevFanoutPlace(pFanin, pFanoutOld); 00242 assert( ppPlace == NULL || *ppPlace == pFanoutOld ); 00243 if ( ppPlace ) 00244 *ppPlace = pFanoutNew; 00245 // assuming that pFanoutNew already points to the next fanout 00246 }
Definition at line 41 of file ivyFanout.c.
00042 { 00043 assert( !Ivy_IsComplement(pObj) ); 00044 assert( !Ivy_IsComplement(pFanout) ); 00045 if ( pFanout == NULL ) 00046 return NULL; 00047 if ( Ivy_ObjFanin0(pFanout) == pObj ) 00048 return pFanout->pPrevFan0; 00049 assert( Ivy_ObjFanin1(pFanout) == pObj ); 00050 return pFanout->pPrevFan1; 00051 }
static Ivy_Obj_t** Ivy_ObjPrevFanoutPlace | ( | Ivy_Obj_t * | pObj, | |
Ivy_Obj_t * | pFanout | |||
) | [inline, static] |
Definition at line 65 of file ivyFanout.c.
00066 { 00067 assert( !Ivy_IsComplement(pObj) ); 00068 assert( !Ivy_IsComplement(pFanout) ); 00069 if ( Ivy_ObjFanin0(pFanout) == pObj ) 00070 return &pFanout->pPrevFan0; 00071 assert( Ivy_ObjFanin1(pFanout) == pObj ); 00072 return &pFanout->pPrevFan1; 00073 }
static Ivy_Obj_t** Ivy_ObjPrevNextFanoutPlace | ( | Ivy_Obj_t * | pObj, | |
Ivy_Obj_t * | pFanout | |||
) | [inline, static] |
Definition at line 76 of file ivyFanout.c.
00077 { 00078 Ivy_Obj_t * pTemp; 00079 assert( !Ivy_IsComplement(pObj) ); 00080 assert( !Ivy_IsComplement(pFanout) ); 00081 pTemp = Ivy_ObjPrevFanout(pObj, pFanout); 00082 if ( pTemp == NULL ) 00083 return &pObj->pFanout; 00084 if ( Ivy_ObjFanin0(pTemp) == pObj ) 00085 return &pTemp->pNextFan0; 00086 assert( Ivy_ObjFanin1(pTemp) == pObj ); 00087 return &pTemp->pNextFan1; 00088 }
Function*************************************************************
Synopsis [Reads one fanout.]
Description [Returns fanout if there is only one fanout.]
SideEffects []
SeeAlso []
Definition at line 280 of file ivyFanout.c.
00281 { 00282 return pObj->pFanout; 00283 }