abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cutList.h File Reference

Go to the source code of this file.

Data Structures

struct  Cut_ListStruct_t_
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct Cut_ListStruct_t_ 
Cut_List_t
 INCLUDES ///. More...
 

Functions

static void Cut_ListStart (Cut_List_t *p)
 MACRO DEFINITIONS ///. More...
 
static void Cut_ListAdd (Cut_List_t *p, Cut_Cut_t *pCut)
 
static void Cut_ListAdd2 (Cut_List_t *p, Cut_Cut_t *pCut)
 
static void Cut_ListDerive (Cut_List_t *p, Cut_Cut_t *pList)
 
static void Cut_ListAddList (Cut_List_t *pOld, Cut_List_t *pNew)
 
static Cut_Cut_tCut_ListFinish (Cut_List_t *p)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct Cut_ListStruct_t_ Cut_List_t

INCLUDES ///.

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

FileName [cutList.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Implementation of layered listed list of cuts.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]PARAMETERS ///BASIC TYPES ///

Definition at line 40 of file cutList.h.

Function Documentation

static void Cut_ListAdd ( Cut_List_t p,
Cut_Cut_t pCut 
)
inlinestatic

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

Synopsis [Adds one cut to the cut list.]

Description []

SideEffects []

SeeAlso []

Definition at line 87 of file cutList.h.

88 {
89  assert( pCut->nLeaves > 0 && pCut->nLeaves <= CUT_SIZE_MAX );
90  *p->ppTail[pCut->nLeaves] = pCut;
91  p->ppTail[pCut->nLeaves] = &pCut->pNext;
92 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Cut_Cut_t * pNext
Definition: cut.h:88
#define CUT_SIZE_MAX
Definition: cut.h:39
unsigned nLeaves
Definition: cut.h:84
#define assert(ex)
Definition: util_old.h:213
static void Cut_ListAdd2 ( Cut_List_t p,
Cut_Cut_t pCut 
)
inlinestatic

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

Synopsis [Adds one cut to the cut list while preserving order.]

Description []

SideEffects []

SeeAlso []

Definition at line 105 of file cutList.h.

106 {
107  extern int Cut_CutCompare( Cut_Cut_t * pCut1, Cut_Cut_t * pCut2 );
108  Cut_Cut_t * pTemp, ** ppSpot;
109  assert( pCut->nLeaves > 0 && pCut->nLeaves <= CUT_SIZE_MAX );
110  if ( p->pHead[pCut->nLeaves] != NULL )
111  {
112  ppSpot = &p->pHead[pCut->nLeaves];
113  for ( pTemp = p->pHead[pCut->nLeaves]; pTemp; pTemp = pTemp->pNext )
114  {
115  if ( Cut_CutCompare(pCut, pTemp) < 0 )
116  {
117  *ppSpot = pCut;
118  pCut->pNext = pTemp;
119  return;
120  }
121  else
122  ppSpot = &pTemp->pNext;
123  }
124  }
125  *p->ppTail[pCut->nLeaves] = pCut;
126  p->ppTail[pCut->nLeaves] = &pCut->pNext;
127 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Cut_Cut_t * pNext
Definition: cut.h:88
#define CUT_SIZE_MAX
Definition: cut.h:39
int Cut_CutCompare(Cut_Cut_t *pCut1, Cut_Cut_t *pCut2)
Definition: cutCut.c:92
unsigned nLeaves
Definition: cut.h:84
#define assert(ex)
Definition: util_old.h:213
static void Cut_ListAddList ( Cut_List_t pOld,
Cut_List_t pNew 
)
inlinestatic

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

Synopsis [Adds the second list to the first list.]

Description []

SideEffects []

SeeAlso []

Definition at line 168 of file cutList.h.

169 {
170  int i;
171  for ( i = 1; i <= CUT_SIZE_MAX; i++ )
172  {
173  if ( pNew->pHead[i] == NULL )
174  continue;
175  *pOld->ppTail[i] = pNew->pHead[i];
176  pOld->ppTail[i] = pNew->ppTail[i];
177  }
178 }
#define CUT_SIZE_MAX
Definition: cut.h:39
static void Cut_ListDerive ( Cut_List_t p,
Cut_Cut_t pList 
)
inlinestatic

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

Synopsis [Derive the super list from the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 140 of file cutList.h.

141 {
142  Cut_Cut_t * pPrev;
143  int nLeaves;
144  Cut_ListStart( p );
145  while ( pList != NULL )
146  {
147  nLeaves = pList->nLeaves;
148  p->pHead[nLeaves] = pList;
149  for ( pPrev = pList, pList = pList->pNext; pList; pPrev = pList, pList = pList->pNext )
150  if ( nLeaves < (int)pList->nLeaves )
151  break;
152  p->ppTail[nLeaves] = &pPrev->pNext;
153  pPrev->pNext = NULL;
154  }
155 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Cut_Cut_t * pNext
Definition: cut.h:88
unsigned nLeaves
Definition: cut.h:84
static void Cut_ListStart(Cut_List_t *p)
MACRO DEFINITIONS ///.
Definition: cutList.h:66
static Cut_Cut_t* Cut_ListFinish ( Cut_List_t p)
inlinestatic

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

Synopsis [Returns the cut list linked into one sequence of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 191 of file cutList.h.

192 {
193  Cut_Cut_t * pHead = NULL, ** ppTail = &pHead;
194  int i;
195  for ( i = 1; i <= CUT_SIZE_MAX; i++ )
196  {
197  if ( p->pHead[i] == NULL )
198  continue;
199  *ppTail = p->pHead[i];
200  ppTail = p->ppTail[i];
201  }
202  *ppTail = NULL;
203  return pHead;
204 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define CUT_SIZE_MAX
Definition: cut.h:39
static void Cut_ListStart ( Cut_List_t p)
inlinestatic

MACRO DEFINITIONS ///.

FUNCTION DECLARATIONS /// Function*************************************************************

Synopsis [Start the cut list.]

Description []

SideEffects []

SeeAlso []

Definition at line 66 of file cutList.h.

67 {
68  int i;
69  for ( i = 1; i <= CUT_SIZE_MAX; i++ )
70  {
71  p->pHead[i] = 0;
72  p->ppTail[i] = &p->pHead[i];
73  }
74 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define CUT_SIZE_MAX
Definition: cut.h:39