abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sfmNtk.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [sfmNtk.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [SAT-based optimization using internal don't-cares.]
8 
9  Synopsis [Logic network.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: sfmNtk.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "sfmInt.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis []
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
45 void Sfm_CheckConsistency( Vec_Wec_t * vFanins, int nPis, int nPos, Vec_Str_t * vFixed )
46 {
47  Vec_Int_t * vArray;
48  int i, k, Fanin;
49  // check entries
50  Vec_WecForEachLevel( vFanins, vArray, i )
51  {
52  // PIs have no fanins
53  if ( i < nPis )
54  assert( Vec_IntSize(vArray) == 0 && Vec_StrEntry(vFixed, i) == (char)0 );
55  // nodes are in a topo order; POs cannot be fanins
56  Vec_IntForEachEntry( vArray, Fanin, k )
57 // assert( Fanin < i && Fanin + nPos < Vec_WecSize(vFanins) );
58  assert( Fanin + nPos < Vec_WecSize(vFanins) );
59  // POs have one fanout
60  if ( i + nPos >= Vec_WecSize(vFanins) )
61  assert( Vec_IntSize(vArray) == 1 && Vec_StrEntry(vFixed, i) == (char)0 );
62  }
63 }
64 
65 /**Function*************************************************************
66 
67  Synopsis []
68 
69  Description []
70 
71  SideEffects []
72 
73  SeeAlso []
74 
75 ***********************************************************************/
76 void Sfm_CreateFanout( Vec_Wec_t * vFanins, Vec_Wec_t * vFanouts )
77 {
78  Vec_Int_t * vArray;
79  int i, k, Fanin;
80  // count fanouts
81  Vec_WecInit( vFanouts, Vec_WecSize(vFanins) );
82  Vec_WecForEachLevel( vFanins, vArray, i )
83  Vec_IntForEachEntry( vArray, Fanin, k )
84  Vec_WecEntry( vFanouts, Fanin )->nSize++;
85  // allocate fanins
86  Vec_WecForEachLevel( vFanouts, vArray, i )
87  {
88  k = vArray->nSize; vArray->nSize = 0;
89  Vec_IntGrow( vArray, k );
90  }
91  // add fanouts
92  Vec_WecForEachLevel( vFanins, vArray, i )
93  Vec_IntForEachEntry( vArray, Fanin, k )
94  Vec_IntPush( Vec_WecEntry( vFanouts, Fanin ), i );
95  // verify
96  Vec_WecForEachLevel( vFanouts, vArray, i )
97  assert( Vec_IntSize(vArray) == Vec_IntCap(vArray) );
98 }
99 
100 /**Function*************************************************************
101 
102  Synopsis []
103 
104  Description []
105 
106  SideEffects []
107 
108  SeeAlso []
109 
110 ***********************************************************************/
111 static inline int Sfm_ObjLevelNew( Vec_Int_t * vArray, Vec_Int_t * vLevels, int fAddLevel )
112 {
113  int k, Fanin, Level = 0;
114  Vec_IntForEachEntry( vArray, Fanin, k )
115  Level = Abc_MaxInt( Level, Vec_IntEntry(vLevels, Fanin) );
116  return Level + fAddLevel;
117 }
118 void Sfm_CreateLevel( Vec_Wec_t * vFanins, Vec_Int_t * vLevels, Vec_Str_t * vEmpty )
119 {
120  Vec_Int_t * vArray;
121  int i;
122  assert( Vec_IntSize(vLevels) == 0 );
123  Vec_IntFill( vLevels, Vec_WecSize(vFanins), 0 );
124  Vec_WecForEachLevel( vFanins, vArray, i )
125  Vec_IntWriteEntry( vLevels, i, Sfm_ObjLevelNew(vArray, vLevels, Sfm_ObjAddsLevelArray(vEmpty, i)) );
126 }
127 
128 /**Function*************************************************************
129 
130  Synopsis []
131 
132  Description []
133 
134  SideEffects []
135 
136  SeeAlso []
137 
138 ***********************************************************************/
139 static inline int Sfm_ObjLevelNewR( Vec_Int_t * vArray, Vec_Int_t * vLevelsR, int fAddLevel )
140 {
141  int k, Fanout, LevelR = 0;
142  Vec_IntForEachEntry( vArray, Fanout, k )
143  LevelR = Abc_MaxInt( LevelR, Vec_IntEntry(vLevelsR, Fanout) );
144  return LevelR + fAddLevel;
145 }
146 void Sfm_CreateLevelR( Vec_Wec_t * vFanouts, Vec_Int_t * vLevelsR, Vec_Str_t * vEmpty )
147 {
148  Vec_Int_t * vArray;
149  int i;
150  assert( Vec_IntSize(vLevelsR) == 0 );
151  Vec_IntFill( vLevelsR, Vec_WecSize(vFanouts), 0 );
152  Vec_WecForEachLevelReverse( vFanouts, vArray, i )
153  Vec_IntWriteEntry( vLevelsR, i, Sfm_ObjLevelNewR(vArray, vLevelsR, Sfm_ObjAddsLevelArray(vEmpty, i)) );
154 }
155 
156 /**Function*************************************************************
157 
158  Synopsis []
159 
160  Description []
161 
162  SideEffects []
163 
164  SeeAlso []
165 
166 ***********************************************************************/
167 Sfm_Ntk_t * Sfm_NtkConstruct( Vec_Wec_t * vFanins, int nPis, int nPos, Vec_Str_t * vFixed, Vec_Str_t * vEmpty, Vec_Wrd_t * vTruths )
168 {
169  Sfm_Ntk_t * p;
170  Sfm_CheckConsistency( vFanins, nPis, nPos, vFixed );
171  p = ABC_CALLOC( Sfm_Ntk_t, 1 );
172  p->nObjs = Vec_WecSize( vFanins );
173  p->nPis = nPis;
174  p->nPos = nPos;
175  p->nNodes = p->nObjs - p->nPis - p->nPos;
176  // user data
177  p->vFixed = vFixed;
178  p->vEmpty = vEmpty;
179  p->vTruths = vTruths;
180  p->vFanins = *vFanins;
181  ABC_FREE( vFanins );
182  // attributes
183  Sfm_CreateFanout( &p->vFanins, &p->vFanouts );
184  Sfm_CreateLevel( &p->vFanins, &p->vLevels, vEmpty );
185  Sfm_CreateLevelR( &p->vFanouts, &p->vLevelsR, vEmpty );
186  Vec_IntFill( &p->vCounts, p->nObjs, 0 );
187  Vec_IntFill( &p->vTravIds, p->nObjs, 0 );
188  Vec_IntFill( &p->vTravIds2, p->nObjs, 0 );
189  Vec_IntFill( &p->vId2Var, 2*p->nObjs, -1 );
190  Vec_IntFill( &p->vVar2Id, 2*p->nObjs, -1 );
191  p->vCover = Vec_IntAlloc( 1 << 16 );
192  p->vCnfs = Sfm_CreateCnf( p );
193  return p;
194 }
196 {
197  p->nLevelMax = Vec_IntFindMax(&p->vLevels) + p->pPars->nGrowthLevel;
198  p->vNodes = Vec_IntAlloc( 1000 );
199  p->vDivs = Vec_IntAlloc( 100 );
200  p->vRoots = Vec_IntAlloc( 1000 );
201  p->vTfo = Vec_IntAlloc( 1000 );
202  p->vDivCexes = Vec_WrdStart( p->pPars->nWinSizeMax );
203  p->vOrder = Vec_IntAlloc( 100 );
204  p->vDivVars = Vec_IntAlloc( 100 );
205  p->vDivIds = Vec_IntAlloc( 1000 );
206  p->vLits = Vec_IntAlloc( 100 );
207  p->vValues = Vec_IntAlloc( 100 );
208  p->vClauses = Vec_WecAlloc( 100 );
209  p->vFaninMap = Vec_IntAlloc( 10 );
210  p->pSat = sat_solver_new();
211  sat_solver_setnvars( p->pSat, p->pPars->nWinSizeMax );
212 }
214 {
215  // user data
216  Vec_StrFree( p->vFixed );
217  Vec_StrFreeP( &p->vEmpty );
218  Vec_WrdFree( p->vTruths );
219  Vec_WecErase( &p->vFanins );
220  // attributes
221  Vec_WecErase( &p->vFanouts );
222  ABC_FREE( p->vLevels.pArray );
223  ABC_FREE( p->vLevelsR.pArray );
224  ABC_FREE( p->vCounts.pArray );
225  ABC_FREE( p->vTravIds.pArray );
226  ABC_FREE( p->vTravIds2.pArray );
227  ABC_FREE( p->vId2Var.pArray );
228  ABC_FREE( p->vVar2Id.pArray );
229  Vec_WecFree( p->vCnfs );
230  Vec_IntFree( p->vCover );
231  // other data
232  Vec_IntFreeP( &p->vNodes );
233  Vec_IntFreeP( &p->vDivs );
234  Vec_IntFreeP( &p->vRoots );
235  Vec_IntFreeP( &p->vTfo );
236  Vec_WrdFreeP( &p->vDivCexes );
237  Vec_IntFreeP( &p->vOrder );
238  Vec_IntFreeP( &p->vDivVars );
239  Vec_IntFreeP( &p->vDivIds );
240  Vec_IntFreeP( &p->vLits );
241  Vec_IntFreeP( &p->vValues );
242  Vec_WecFreeP( &p->vClauses );
243  Vec_IntFreeP( &p->vFaninMap );
244  if ( p->pSat ) sat_solver_delete( p->pSat );
245  ABC_FREE( p );
246 }
247 
248 /**Function*************************************************************
249 
250  Synopsis [Performs resubstitution for the node.]
251 
252  Description []
253 
254  SideEffects []
255 
256  SeeAlso []
257 
258 ***********************************************************************/
259 void Sfm_NtkRemoveFanin( Sfm_Ntk_t * p, int iNode, int iFanin )
260 {
261  int RetValue;
262  assert( Sfm_ObjIsNode(p, iNode) );
263  assert( !Sfm_ObjIsPo(p, iFanin) );
264  RetValue = Vec_IntRemove( Sfm_ObjFiArray(p, iNode), iFanin );
265  assert( RetValue );
266  RetValue = Vec_IntRemove( Sfm_ObjFoArray(p, iFanin), iNode );
267  assert( RetValue );
268 }
269 void Sfm_NtkAddFanin( Sfm_Ntk_t * p, int iNode, int iFanin )
270 {
271  if ( iFanin < 0 )
272  return;
273  assert( Sfm_ObjIsNode(p, iNode) );
274  assert( !Sfm_ObjIsPo(p, iFanin) );
275  assert( Vec_IntFind( Sfm_ObjFiArray(p, iNode), iFanin ) == -1 );
276  assert( Vec_IntFind( Sfm_ObjFoArray(p, iFanin), iNode ) == -1 );
277  Vec_IntPush( Sfm_ObjFiArray(p, iNode), iFanin );
278  Vec_IntPush( Sfm_ObjFoArray(p, iFanin), iNode );
279 }
280 void Sfm_NtkDeleteObj_rec( Sfm_Ntk_t * p, int iNode )
281 {
282  int i, iFanin;
283  if ( Sfm_ObjFanoutNum(p, iNode) > 0 || Sfm_ObjIsPi(p, iNode) || Sfm_ObjIsFixed(p, iNode) )
284  return;
285  assert( Sfm_ObjIsNode(p, iNode) );
286  Sfm_ObjForEachFanin( p, iNode, iFanin, i )
287  {
288  int RetValue = Vec_IntRemove( Sfm_ObjFoArray(p, iFanin), iNode ); assert( RetValue );
289  Sfm_NtkDeleteObj_rec( p, iFanin );
290  }
291  Vec_IntClear( Sfm_ObjFiArray(p, iNode) );
292  Vec_WrdWriteEntry( p->vTruths, iNode, (word)0 );
293 }
294 void Sfm_NtkUpdateLevel_rec( Sfm_Ntk_t * p, int iNode )
295 {
296  int i, iFanout;
297  int LevelNew = Sfm_ObjLevelNew( Sfm_ObjFiArray(p, iNode), &p->vLevels, Sfm_ObjAddsLevel(p, iNode) );
298  if ( LevelNew == Sfm_ObjLevel(p, iNode) )
299  return;
300  Sfm_ObjSetLevel( p, iNode, LevelNew );
301  Sfm_ObjForEachFanout( p, iNode, iFanout, i )
302  Sfm_NtkUpdateLevel_rec( p, iFanout );
303 }
304 void Sfm_NtkUpdateLevelR_rec( Sfm_Ntk_t * p, int iNode )
305 {
306  int i, iFanin;
307  int LevelNew = Sfm_ObjLevelNewR( Sfm_ObjFoArray(p, iNode), &p->vLevelsR, Sfm_ObjAddsLevel(p, iNode) );
308  if ( LevelNew == Sfm_ObjLevelR(p, iNode) )
309  return;
310  Sfm_ObjSetLevelR( p, iNode, LevelNew );
311  Sfm_ObjForEachFanin( p, iNode, iFanin, i )
312  Sfm_NtkUpdateLevelR_rec( p, iFanin );
313 }
314 void Sfm_NtkUpdate( Sfm_Ntk_t * p, int iNode, int f, int iFaninNew, word uTruth )
315 {
316  int iFanin = Sfm_ObjFanin( p, iNode, f );
317  assert( Sfm_ObjIsNode(p, iNode) );
318  assert( iFanin != iFaninNew );
319  if ( uTruth == 0 || ~uTruth == 0 )
320  {
321  Sfm_ObjForEachFanin( p, iNode, iFanin, f )
322  {
323  int RetValue = Vec_IntRemove( Sfm_ObjFoArray(p, iFanin), iNode ); assert( RetValue );
324  Sfm_NtkDeleteObj_rec( p, iFanin );
325  }
326  Vec_IntClear( Sfm_ObjFiArray(p, iNode) );
327  }
328  else
329  {
330  // replace old fanin by new fanin
331  Sfm_NtkRemoveFanin( p, iNode, iFanin );
332  Sfm_NtkAddFanin( p, iNode, iFaninNew );
333  // recursively remove MFFC
334  Sfm_NtkDeleteObj_rec( p, iFanin );
335  }
336  // update logic level
337  Sfm_NtkUpdateLevel_rec( p, iNode );
338  if ( iFaninNew != -1 )
339  Sfm_NtkUpdateLevelR_rec( p, iFaninNew );
340  if ( Sfm_ObjFanoutNum(p, iFanin) > 0 )
341  Sfm_NtkUpdateLevelR_rec( p, iFanin );
342  // update truth table
343  Vec_WrdWriteEntry( p->vTruths, iNode, uTruth );
344  Sfm_TruthToCnf( uTruth, Sfm_ObjFaninNum(p, iNode), p->vCover, (Vec_Str_t *)Vec_WecEntry(p->vCnfs, iNode) );
345 }
346 
347 /**Function*************************************************************
348 
349  Synopsis [Public APIs of this network.]
350 
351  Description []
352 
353  SideEffects []
354 
355  SeeAlso []
356 
357 ***********************************************************************/
359 {
360  return Vec_WecEntry( &p->vFanins, i );
361 }
363 {
364  return Vec_WrdEntryP( p->vTruths, i );
365 }
367 {
368  return (int)Vec_StrEntry( p->vFixed, i );
369 }
370 int Sfm_NodeReadUsed( Sfm_Ntk_t * p, int i )
371 {
372  return (Sfm_ObjFaninNum(p, i) > 0) || (Sfm_ObjFanoutNum(p, i) > 0);
373 }
374 
375 ////////////////////////////////////////////////////////////////////////
376 /// END OF FILE ///
377 ////////////////////////////////////////////////////////////////////////
378 
379 
381 
static int Sfm_ObjAddsLevel(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:134
void Sfm_NtkUpdateLevelR_rec(Sfm_Ntk_t *p, int iNode)
Definition: sfmNtk.c:304
static Vec_Wec_t * Vec_WecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecWec.h:87
void Sfm_NtkPrepare(Sfm_Ntk_t *p)
Definition: sfmNtk.c:195
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition: vecWec.h:42
#define Sfm_ObjForEachFanin(p, Node, Fan, i)
Definition: sfmInt.h:172
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static void Vec_WecFree(Vec_Wec_t *p)
Definition: vecWec.h:345
int Sfm_NodeReadUsed(Sfm_Ntk_t *p, int i)
Definition: sfmNtk.c:370
void sat_solver_delete(sat_solver *s)
Definition: satSolver.c:1141
void Sfm_NtkRemoveFanin(Sfm_Ntk_t *p, int iNode, int iFanin)
Definition: sfmNtk.c:259
static int Sfm_ObjFaninNum(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:139
static int Vec_IntFind(Vec_Int_t *p, int Entry)
Definition: vecInt.h:895
void Sfm_NtkUpdate(Sfm_Ntk_t *p, int iNode, int f, int iFaninNew, word uTruth)
Definition: sfmNtk.c:314
typedefABC_NAMESPACE_HEADER_START struct Sfm_Ntk_t_ Sfm_Ntk_t
INCLUDES ///.
Definition: sfm.h:41
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static void Vec_WrdFreeP(Vec_Wrd_t **p)
Definition: vecWrd.h:277
static int Vec_WecSize(Vec_Wec_t *p)
Definition: vecWec.h:193
static int Sfm_ObjIsNode(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:131
word * Sfm_NodeReadTruth(Sfm_Ntk_t *p, int i)
Definition: sfmNtk.c:362
void Sfm_CreateLevel(Vec_Wec_t *vFanins, Vec_Int_t *vLevels, Vec_Str_t *vEmpty)
Definition: sfmNtk.c:118
static int Sfm_ObjLevel(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:153
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
Definition: bblif.c:336
static int Sfm_ObjFanin(Sfm_Ntk_t *p, int i, int k)
Definition: sfmInt.h:145
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static int Sfm_ObjIsPi(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:129
static char Vec_StrEntry(Vec_Str_t *p, int i)
Definition: vecStr.h:336
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition: vecWec.h:55
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
#define Sfm_ObjForEachFanout(p, Node, Fan, i)
Definition: sfmInt.h:173
static void Vec_StrFree(Vec_Str_t *p)
Definition: bblif.c:616
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
Definition: vecWrd.h:418
static int Sfm_ObjIsPo(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:130
static void Vec_WecErase(Vec_Wec_t *p)
Definition: vecWec.h:336
void sat_solver_setnvars(sat_solver *s, int n)
Definition: satSolver.c:1072
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Vec_IntFindMax(Vec_Int_t *p)
Definition: vecInt.h:996
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
void Sfm_CreateFanout(Vec_Wec_t *vFanins, Vec_Wec_t *vFanouts)
Definition: sfmNtk.c:76
int Sfm_NodeReadFixed(Sfm_Ntk_t *p, int i)
Definition: sfmNtk.c:366
void Sfm_NtkDeleteObj_rec(Sfm_Ntk_t *p, int iNode)
Definition: sfmNtk.c:280
static void Vec_WrdFree(Vec_Wrd_t *p)
Definition: vecWrd.h:260
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:356
static int Sfm_ObjLevelNewR(Vec_Int_t *vArray, Vec_Int_t *vLevelsR, int fAddLevel)
Definition: sfmNtk.c:139
Vec_Wec_t * Sfm_CreateCnf(Sfm_Ntk_t *p)
Definition: sfmCnf.c:122
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static Vec_Int_t * Sfm_ObjFiArray(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:136
static int Sfm_ObjLevelNew(Vec_Int_t *vArray, Vec_Int_t *vLevels, int fAddLevel)
Definition: sfmNtk.c:111
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
static int Sfm_ObjLevelR(Sfm_Ntk_t *p, int iObj)
Definition: sfmInt.h:156
static int Vec_IntCap(Vec_Int_t *p)
Definition: vecInt.h:368
Sfm_Ntk_t * Sfm_NtkConstruct(Vec_Wec_t *vFanins, int nPis, int nPos, Vec_Str_t *vFixed, Vec_Str_t *vEmpty, Vec_Wrd_t *vTruths)
Definition: sfmNtk.c:167
static int Vec_IntRemove(Vec_Int_t *p, int Entry)
Definition: vecInt.h:915
void Sfm_NtkFree(Sfm_Ntk_t *p)
Definition: sfmNtk.c:213
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static Vec_Int_t * Vec_WecEntry(Vec_Wec_t *p, int i)
Definition: vecWec.h:142
static Vec_Wrd_t * Vec_WrdStart(int nSize)
Definition: vecWrd.h:103
static int Sfm_ObjAddsLevelArray(Vec_Str_t *p, int i)
Definition: sfmInt.h:133
void Sfm_CreateLevelR(Vec_Wec_t *vFanouts, Vec_Int_t *vLevelsR, Vec_Str_t *vEmpty)
Definition: sfmNtk.c:146
sat_solver * sat_solver_new(void)
Definition: satSolver.c:1001
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
int Sfm_TruthToCnf(word Truth, int nVars, Vec_Int_t *vCover, Vec_Str_t *vCnf)
Definition: sfmCnf.c:71
#define ABC_FREE(obj)
Definition: abc_global.h:232
static int Sfm_ObjFanoutNum(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:140
static void Sfm_ObjSetLevel(Sfm_Ntk_t *p, int iObj, int Lev)
Definition: sfmInt.h:154
static Vec_Int_t * Sfm_ObjFoArray(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:137
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
ABC_NAMESPACE_IMPL_START void Sfm_CheckConsistency(Vec_Wec_t *vFanins, int nPis, int nPos, Vec_Str_t *vFixed)
DECLARATIONS ///.
Definition: sfmNtk.c:45
#define Vec_WecForEachLevelReverse(vGlob, vVec, i)
Definition: vecWec.h:65
static void Vec_WecFreeP(Vec_Wec_t **p)
Definition: vecWec.h:350
#define assert(ex)
Definition: util_old.h:213
static int Sfm_ObjIsFixed(Sfm_Ntk_t *p, int i)
Definition: sfmInt.h:132
void Sfm_NtkAddFanin(Sfm_Ntk_t *p, int iNode, int iFanin)
Definition: sfmNtk.c:269
void Sfm_NtkUpdateLevel_rec(Sfm_Ntk_t *p, int iNode)
Definition: sfmNtk.c:294
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
Vec_Int_t * Sfm_NodeReadFanins(Sfm_Ntk_t *p, int i)
Definition: sfmNtk.c:358
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition: vecWrd.h:42
static void Sfm_ObjSetLevelR(Sfm_Ntk_t *p, int iObj, int Lev)
Definition: sfmInt.h:157
static void Vec_StrFreeP(Vec_Str_t **p)
Definition: vecStr.h:233
static void Vec_WecInit(Vec_Wec_t *p, int nSize)
Definition: vecWec.h:125
static word * Vec_WrdEntryP(Vec_Wrd_t *p, int i)
Definition: vecWrd.h:401