1 /**CFile****************************************************************
2
3 FileName [wlc.h]
4
5 SystemName [ABC: Logic synthesis and verification system.]
6
7 PackageName [Verilog parser.]
8
9 Synopsis [External declarations.]
10
11 Author [Alan Mishchenko]
12
13 Affiliation [UC Berkeley]
14
15 Date [Ver. 1.0. Started - August 22, 2014.]
16
17 Revision [$Id: wlc.h,v 1.00 2014/09/12 00:00:00 alanmi Exp $]
18
19 ***********************************************************************/
20
21 #ifndef ABC__base__wln__wln_h
22 #define ABC__base__wln__wln_h
23
24
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28
29 #include "aig/gia/gia.h"
30 #include "misc/vec/vecHash.h"
31 #include "misc/extra/extra.h"
32 #include "misc/util/utilNam.h"
33 #include "misc/util/utilTruth.h"
34 #include "aig/miniaig/abcOper.h"
35
36 ////////////////////////////////////////////////////////////////////////
37 /// PARAMETERS ///
38 ////////////////////////////////////////////////////////////////////////
39
40 ABC_NAMESPACE_HEADER_START
41
42 ////////////////////////////////////////////////////////////////////////
43 /// BASIC TYPES ///
44 ////////////////////////////////////////////////////////////////////////
45
46 typedef struct Wln_Vec_t_ Wln_Vec_t;
47 struct Wln_Vec_t_
48 {
49 int nCap;
50 int nSize;
51 union { int Array[2];
52 int * pArray[1]; };
53 };
54
55 typedef struct Wln_Ntk_t_ Wln_Ntk_t;
56 struct Wln_Ntk_t_
57 {
58 char * pName; // model name
59 char * pSpec; // input file name
60 int fSmtLib; // derived from SMT-LIB
61 Vec_Int_t vCis; // combinational inputs
62 Vec_Int_t vCos; // combinational outputs
63 Vec_Int_t vFfs; // flops
64 Vec_Int_t vTypes; // object types
65 Wln_Vec_t * vFanins; // object fanins (exceptions: const, select)
66 Vec_Int_t vRanges; // object ranges
67 Hash_IntMan_t * pRanges; // object ranges
68 Vec_Int_t vNameIds; // object name IDs
69 Vec_Int_t vInstIds; // object name IDs
70 Abc_Nam_t * pManName; // object names
71 Vec_Str_t vSigns; // object signedness
72 int nTravIds; // counter of traversal IDs
73 Vec_Int_t vTravIds; // trav IDs of the objects
74 Vec_Int_t vCopies; // object first bits
75 Vec_Int_t vBits; // object mapping into AIG nodes
76 Vec_Int_t vLevels; // object levels
77 Vec_Int_t vRefs; // object reference counters
78 Vec_Int_t vFanout; // static fanout
79 Vec_Int_t vFaninAttrs; // static fanin attributes
80 Vec_Int_t vFaninLists; // static fanin attributes
81 Vec_Ptr_t * vTables; // tables
82 int nObjs[ABC_OPER_LAST]; // counter of objects of each type
83 int nAnds[ABC_OPER_LAST]; // counter of AND gates after blasting
84 };
85
Wln_NtkObjNum(Wln_Ntk_t * p)86 static inline int Wln_NtkObjNum( Wln_Ntk_t * p ) { return Vec_IntSize(&p->vTypes); }
Wln_NtkCiNum(Wln_Ntk_t * p)87 static inline int Wln_NtkCiNum( Wln_Ntk_t * p ) { return Vec_IntSize(&p->vCis); }
Wln_NtkCoNum(Wln_Ntk_t * p)88 static inline int Wln_NtkCoNum( Wln_Ntk_t * p ) { return Vec_IntSize(&p->vCos); }
Wln_NtkFfNum(Wln_Ntk_t * p)89 static inline int Wln_NtkFfNum( Wln_Ntk_t * p ) { return Vec_IntSize(&p->vFfs); }
Wln_NtkPiNum(Wln_Ntk_t * p)90 static inline int Wln_NtkPiNum( Wln_Ntk_t * p ) { return Wln_NtkCiNum(p) - Wln_NtkFfNum(p); }
Wln_NtkPoNum(Wln_Ntk_t * p)91 static inline int Wln_NtkPoNum( Wln_Ntk_t * p ) { return Wln_NtkCoNum(p) - Wln_NtkFfNum(p); }
92
Wln_NtkCi(Wln_Ntk_t * p,int i)93 static inline int Wln_NtkCi( Wln_Ntk_t * p, int i ) { return Vec_IntEntry(&p->vCis, i); }
Wln_NtkCo(Wln_Ntk_t * p,int i)94 static inline int Wln_NtkCo( Wln_Ntk_t * p, int i ) { return Vec_IntEntry(&p->vCos, i); }
Wln_NtkFf(Wln_Ntk_t * p,int i)95 static inline int Wln_NtkFf( Wln_Ntk_t * p, int i ) { return Vec_IntEntry(&p->vFfs, i); }
96
Wln_ObjType(Wln_Ntk_t * p,int i)97 static inline int Wln_ObjType( Wln_Ntk_t * p, int i ) { return Vec_IntEntry(&p->vTypes, i); }
Wln_ObjIsNone(Wln_Ntk_t * p,int i)98 static inline int Wln_ObjIsNone( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_NONE; }
Wln_ObjIsCi(Wln_Ntk_t * p,int i)99 static inline int Wln_ObjIsCi( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_CI; }
Wln_ObjIsCo(Wln_Ntk_t * p,int i)100 static inline int Wln_ObjIsCo( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_CO; }
Wln_ObjIsCio(Wln_Ntk_t * p,int i)101 static inline int Wln_ObjIsCio( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_CI || Wln_ObjType(p, i)==ABC_OPER_CO; }
Wln_ObjIsFon(Wln_Ntk_t * p,int i)102 static inline int Wln_ObjIsFon( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_FON; }
Wln_ObjIsFf(Wln_Ntk_t * p,int i)103 static inline int Wln_ObjIsFf( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_DFFRSE; }
Wln_ObjIsConst(Wln_Ntk_t * p,int i)104 static inline int Wln_ObjIsConst( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_CONST; }
Wln_ObjIsSlice(Wln_Ntk_t * p,int i)105 static inline int Wln_ObjIsSlice( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_SLICE; }
Wln_ObjIsRotate(Wln_Ntk_t * p,int i)106 static inline int Wln_ObjIsRotate( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_SHIFT_ROTL || Wln_ObjType(p, i) == ABC_OPER_SHIFT_ROTR; }
Wln_ObjIsTable(Wln_Ntk_t * p,int i)107 static inline int Wln_ObjIsTable( Wln_Ntk_t * p, int i ) { return Wln_ObjType(p, i) == ABC_OPER_TABLE; }
108
Wln_ObjFaninNum(Wln_Ntk_t * p,int i)109 static inline int Wln_ObjFaninNum( Wln_Ntk_t * p, int i ) { return p->vFanins[i].nSize; }
Wln_ObjFanins(Wln_Ntk_t * p,int i)110 static inline int * Wln_ObjFanins( Wln_Ntk_t * p, int i ) { return Wln_ObjFaninNum(p, i) > 2 ? p->vFanins[i].pArray[0] : p->vFanins[i].Array; }
Wln_ObjFanin(Wln_Ntk_t * p,int i,int f)111 static inline int Wln_ObjFanin( Wln_Ntk_t * p, int i, int f ) { return Wln_ObjFaninNum(p, i) > 2 ? p->vFanins[i].pArray[0][f] : p->vFanins[i].Array[f]; }
Wln_ObjSetFanin(Wln_Ntk_t * p,int i,int f,int v)112 static inline void Wln_ObjSetFanin( Wln_Ntk_t * p, int i, int f, int v ) { Wln_ObjFanins( p, i )[f] = v; }
Wln_ObjFanin0(Wln_Ntk_t * p,int i)113 static inline int Wln_ObjFanin0( Wln_Ntk_t * p, int i ) { return Wln_ObjFanin( p, i, 0 ); }
Wln_ObjFanin1(Wln_Ntk_t * p,int i)114 static inline int Wln_ObjFanin1( Wln_Ntk_t * p, int i ) { return Wln_ObjFanin( p, i, 1 ); }
Wln_ObjFanin2(Wln_Ntk_t * p,int i)115 static inline int Wln_ObjFanin2( Wln_Ntk_t * p, int i ) { return Wln_ObjFanin( p, i, 2 ); }
116
Wln_ObjRangeId(Wln_Ntk_t * p,int i)117 static inline int Wln_ObjRangeId( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vRanges, i ); }
Wln_ObjRangeEnd(Wln_Ntk_t * p,int i)118 static inline int Wln_ObjRangeEnd( Wln_Ntk_t * p, int i ) { return Hash_IntObjData0( p->pRanges, Wln_ObjRangeId(p, i) ); }
Wln_ObjRangeBeg(Wln_Ntk_t * p,int i)119 static inline int Wln_ObjRangeBeg( Wln_Ntk_t * p, int i ) { return Hash_IntObjData1( p->pRanges, Wln_ObjRangeId(p, i) ); }
Wln_ObjRangeIsReversed(Wln_Ntk_t * p,int i)120 static inline int Wln_ObjRangeIsReversed( Wln_Ntk_t * p, int i ) { return Wln_ObjRangeEnd(p, i) < Wln_ObjRangeBeg(p, i); }
Wln_ObjRange(Wln_Ntk_t * p,int i)121 static inline int Wln_ObjRange( Wln_Ntk_t * p, int i ) { return 1 + Abc_AbsInt(Wln_ObjRangeEnd(p, i)-Wln_ObjRangeBeg(p, i)); }
122
Wln_ObjIsSigned(Wln_Ntk_t * p,int i)123 static inline int Wln_ObjIsSigned( Wln_Ntk_t * p, int i ) { return (int)Vec_StrEntry(&p->vSigns, i); }
Wln_ObjSetSigned(Wln_Ntk_t * p,int i)124 static inline void Wln_ObjSetSigned( Wln_Ntk_t * p, int i ) { Vec_StrSetEntry(&p->vSigns, i, (char)1); }
Wln_ObjIsSignedFanin0(Wln_Ntk_t * p,int i)125 static inline int Wln_ObjIsSignedFanin0( Wln_Ntk_t * p, int i ) { return Wln_ObjIsSigned( p, p->fSmtLib ? i : Wln_ObjFanin0(p, i) ); }
Wln_ObjIsSignedFanin1(Wln_Ntk_t * p,int i)126 static inline int Wln_ObjIsSignedFanin1( Wln_Ntk_t * p, int i ) { return Wln_ObjIsSigned( p, p->fSmtLib ? i : Wln_ObjFanin1(p, i) ); }
Wln_ObjIsSignedFanin01(Wln_Ntk_t * p,int i)127 static inline int Wln_ObjIsSignedFanin01( Wln_Ntk_t * p, int i ) { return Wln_ObjIsSignedFanin0( p, i ) && Wln_ObjIsSignedFanin1( p, i ); }
Wln_ObjSign(Wln_Ntk_t * p,int i)128 static inline int Wln_ObjSign( Wln_Ntk_t * p, int i ) { return Abc_Var2Lit( Wln_ObjRange(p, i), Wln_ObjIsSigned(p, i) ); }
129
Wln_NtkCleanCopy(Wln_Ntk_t * p)130 static inline void Wln_NtkCleanCopy( Wln_Ntk_t * p ) { Vec_IntFill( &p->vCopies, Vec_IntCap(&p->vTypes), 0 ); }
Wln_NtkHasCopy(Wln_Ntk_t * p)131 static inline int Wln_NtkHasCopy( Wln_Ntk_t * p ) { return Vec_IntSize( &p->vCopies ) > 0; }
Wln_ObjSetCopy(Wln_Ntk_t * p,int i,int c)132 static inline void Wln_ObjSetCopy( Wln_Ntk_t * p, int i, int c ) { Vec_IntWriteEntry( &p->vCopies, i, c ); }
Wln_ObjCopy(Wln_Ntk_t * p,int i)133 static inline int Wln_ObjCopy( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vCopies, i ); }
134
Wln_NtkCleanLevel(Wln_Ntk_t * p)135 static inline void Wln_NtkCleanLevel( Wln_Ntk_t * p ) { Vec_IntFill( &p->vLevels, Vec_IntCap(&p->vTypes), 0 ); }
Wln_NtkHasLevel(Wln_Ntk_t * p)136 static inline int Wln_NtkHasLevel( Wln_Ntk_t * p ) { return Vec_IntSize( &p->vLevels ) > 0; }
Wln_ObjSetLevel(Wln_Ntk_t * p,int i,int l)137 static inline void Wln_ObjSetLevel( Wln_Ntk_t * p, int i, int l ) { Vec_IntWriteEntry( &p->vLevels, i, l ); }
Wln_ObjLevel(Wln_Ntk_t * p,int i)138 static inline int Wln_ObjLevel( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vLevels, i ); }
139
Wln_NtkCleanNameId(Wln_Ntk_t * p)140 static inline void Wln_NtkCleanNameId( Wln_Ntk_t * p ) { Vec_IntFill( &p->vNameIds, Vec_IntCap(&p->vTypes), 0 ); }
Wln_NtkHasNameId(Wln_Ntk_t * p)141 static inline int Wln_NtkHasNameId( Wln_Ntk_t * p ) { return Vec_IntSize( &p->vNameIds ) > 0; }
Wln_ObjSetNameId(Wln_Ntk_t * p,int i,int n)142 static inline void Wln_ObjSetNameId( Wln_Ntk_t * p, int i, int n ) { Vec_IntWriteEntry( &p->vNameIds, i, n ); }
Wln_ObjNameId(Wln_Ntk_t * p,int i)143 static inline int Wln_ObjNameId( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vNameIds, i ); }
144
Wln_NtkCleanInstId(Wln_Ntk_t * p)145 static inline void Wln_NtkCleanInstId( Wln_Ntk_t * p ) { Vec_IntFill( &p->vInstIds, Vec_IntCap(&p->vTypes), 0 ); }
Wln_NtkHasInstId(Wln_Ntk_t * p)146 static inline int Wln_NtkHasInstId( Wln_Ntk_t * p ) { return Vec_IntSize( &p->vInstIds ) > 0; }
Wln_ObjSetInstId(Wln_Ntk_t * p,int i,int n)147 static inline void Wln_ObjSetInstId( Wln_Ntk_t * p, int i, int n ) { Vec_IntWriteEntry( &p->vInstIds, i, n ); }
Wln_ObjInstId(Wln_Ntk_t * p,int i)148 static inline int Wln_ObjInstId( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vInstIds, i ); }
149
Wln_NtkCleanRefs(Wln_Ntk_t * p)150 static inline void Wln_NtkCleanRefs( Wln_Ntk_t * p ) { Vec_IntFill( &p->vRefs, Vec_IntCap(&p->vTypes), 0 ); }
Wln_NtkHasRefs(Wln_Ntk_t * p)151 static inline int Wln_NtkHasRefs( Wln_Ntk_t * p ) { return Vec_IntSize( &p->vRefs ) > 0; }
Wln_ObjSetRefs(Wln_Ntk_t * p,int i,int n)152 static inline void Wln_ObjSetRefs( Wln_Ntk_t * p, int i, int n ) { Vec_IntWriteEntry( &p->vRefs, i, n ); }
Wln_ObjRefs(Wln_Ntk_t * p,int i)153 static inline int Wln_ObjRefs( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vRefs, i ); }
Wln_ObjRefsInc(Wln_Ntk_t * p,int i)154 static inline int Wln_ObjRefsInc( Wln_Ntk_t * p, int i ) { return (*Vec_IntEntryP( &p->vRefs, i ))++; }
Wln_ObjRefsDec(Wln_Ntk_t * p,int i)155 static inline int Wln_ObjRefsDec( Wln_Ntk_t * p, int i ) { return --(*Vec_IntEntryP( &p->vRefs, i )); }
Wln_ObjRefsFaninInc(Wln_Ntk_t * p,int i,int k)156 static inline void Wln_ObjRefsFaninInc( Wln_Ntk_t * p, int i, int k ) { Wln_ObjRefsInc( p, Wln_ObjFanin(p, i, k) ); }
Wln_ObjRefsFaninDec(Wln_Ntk_t * p,int i,int k)157 static inline void Wln_ObjRefsFaninDec( Wln_Ntk_t * p, int i, int k ) { Wln_ObjRefsDec( p, Wln_ObjFanin(p, i, k) ); }
158
Wln_ObjFanoutNum(Wln_Ntk_t * p,int i)159 static inline int Wln_ObjFanoutNum( Wln_Ntk_t * p, int i ) { return Vec_IntEntry( &p->vRefs, i ); }
Wln_ObjFanouts(Wln_Ntk_t * p,int i)160 static inline int * Wln_ObjFanouts( Wln_Ntk_t * p, int i ) { return Vec_IntEntryP( &p->vFanout, Vec_IntEntry(&p->vFanout, i) ); }
Wln_ObjFanout(Wln_Ntk_t * p,int i,int f)161 static inline int Wln_ObjFanout( Wln_Ntk_t * p, int i, int f ) { return Wln_ObjFanouts( p, i )[f]; }
Wln_ObjSetFanout(Wln_Ntk_t * p,int i,int f,int v)162 static inline void Wln_ObjSetFanout( Wln_Ntk_t * p, int i, int f, int v ){ Wln_ObjFanouts( p, i )[f] = v; }
163
Wln_NtkIncrementTravId(Wln_Ntk_t * p)164 static inline void Wln_NtkIncrementTravId( Wln_Ntk_t * p ) { if (!p->nTravIds++) Vec_IntFill(&p->vTravIds, Vec_IntCap(&p->vTypes), 0); }
Wln_ObjSetTravIdCurrent(Wln_Ntk_t * p,int i)165 static inline void Wln_ObjSetTravIdCurrent( Wln_Ntk_t * p, int i ) { Vec_IntWriteEntry( &p->vTravIds, i, p->nTravIds ); }
Wln_ObjIsTravIdCurrent(Wln_Ntk_t * p,int i)166 static inline int Wln_ObjIsTravIdCurrent( Wln_Ntk_t * p, int i ) { return (Vec_IntEntry(&p->vTravIds, i) == p->nTravIds); }
Wln_ObjIsTravIdPrevious(Wln_Ntk_t * p,int i)167 static inline int Wln_ObjIsTravIdPrevious( Wln_Ntk_t * p, int i ) { return (Vec_IntEntry(&p->vTravIds, i) == p->nTravIds-1); }
Wln_ObjCheckTravId(Wln_Ntk_t * p,int i)168 static inline int Wln_ObjCheckTravId( Wln_Ntk_t * p, int i ) { if ( Wln_ObjIsTravIdCurrent(p, i) ) return 1; Wln_ObjSetTravIdCurrent(p, i); return 0; }
169
Wln_ObjCioId(Wln_Ntk_t * p,int i)170 static inline int Wln_ObjCioId( Wln_Ntk_t * p, int i ) { assert( Wln_ObjIsCio(p, i) ); return Wln_ObjFanin1(p, i); }
Wln_ObjIsPi(Wln_Ntk_t * p,int i)171 static inline int Wln_ObjIsPi( Wln_Ntk_t * p, int i ) { return Wln_ObjIsCi(p, i) && Wln_ObjCioId(p, i) < Wln_NtkPiNum(p); }
Wln_ObjIsPo(Wln_Ntk_t * p,int i)172 static inline int Wln_ObjIsPo( Wln_Ntk_t * p, int i ) { return Wln_ObjIsCo(p, i) && Wln_ObjCioId(p, i) < Wln_NtkPoNum(p); }
Wln_ObjIsRo(Wln_Ntk_t * p,int i)173 static inline int Wln_ObjIsRo( Wln_Ntk_t * p, int i ) { return Wln_ObjIsCi(p, i) && Wln_ObjCioId(p, i) >= Wln_NtkPiNum(p); }
Wln_ObjIsRi(Wln_Ntk_t * p,int i)174 static inline int Wln_ObjIsRi( Wln_Ntk_t * p, int i ) { return Wln_ObjIsCo(p, i) && Wln_ObjCioId(p, i) >= Wln_NtkPoNum(p); }
Wln_ObjRoToRi(Wln_Ntk_t * p,int i)175 static inline int Wln_ObjRoToRi( Wln_Ntk_t * p, int i ) { assert( Wln_ObjIsRo(p, i) ); return Wln_NtkCo(p, Wln_NtkCoNum(p) - Wln_NtkCiNum(p) + Wln_ObjCioId(p, i)); }
Wln_ObjRiToRo(Wln_Ntk_t * p,int i)176 static inline int Wln_ObjRiToRo( Wln_Ntk_t * p, int i ) { assert( Wln_ObjIsRi(p, i) ); return Wln_NtkCi(p, Wln_NtkCiNum(p) - Wln_NtkCoNum(p) + Wln_ObjCioId(p, i)); }
177
178 ////////////////////////////////////////////////////////////////////////
179 /// MACRO DEFINITIONS ///
180 ////////////////////////////////////////////////////////////////////////
181
182 ////////////////////////////////////////////////////////////////////////
183 /// ITERATORS ///
184 ////////////////////////////////////////////////////////////////////////
185
186 #define Wln_NtkForEachObj( p, i ) \
187 for ( i = 1; i < Wln_NtkObjNum(p); i++ )
188 #define Wln_NtkForEachObjReverse( p, i ) \
189 for ( i = Wln_NtkObjNum(p) - 1; i > 0; i-- )
190 #define Wln_NtkForEachObjInternal( p, i ) \
191 for ( i = 1; i < Wln_NtkObjNum(p); i++ ) if ( Wln_ObjIsCio(p, i) ) {} else
192
193 #define Wln_NtkForEachPi( p, iPi, i ) \
194 for ( i = 0; (i < Wln_NtkPiNum(p)) && (((iPi) = Wln_NtkCi(p, i)), 1); i++ )
195 #define Wln_NtkForEachPo( p, iPo, i ) \
196 for ( i = 0; (i < Wln_NtkPoNum(p)) && (((iPo) = Wln_NtkCo(p, i)), 1); i++ )
197 #define Wln_NtkForEachCi( p, iCi, i ) \
198 for ( i = 0; (i < Wln_NtkCiNum(p)) && (((iCi) = Wln_NtkCi(p, i)), 1); i++ )
199 #define Wln_NtkForEachCo( p, iCo, i ) \
200 for ( i = 0; (i < Wln_NtkCoNum(p)) && (((iCo) = Wln_NtkCo(p, i)), 1); i++ )
201 #define Wln_NtkForEachFf( p, iFf, i ) \
202 for ( i = 0; (i < Wln_NtkFfNum(p)) && (((iFf) = Wln_NtkFf(p, i)), 1); i++ )
203
204 #define Wln_ObjForEachFanin( p, iObj, iFanin, i ) \
205 for ( i = 0; (i < Wln_ObjFaninNum(p, iObj)) && (((iFanin) = Wln_ObjFanin(p, iObj, i)), 1); i++ ) if ( !iFanin ) {} else
206 #define Wln_ObjForEachFaninReverse( pObj, iFanin, i ) \
207 for ( i = Wln_ObjFaninNum(p, iObj) - 1; (i >= 0) && (((iFanin) = Wln_ObjFanin(p, iObj, i)), 1); i-- ) if ( !iFanin ) {} else
208
209 #define Wln_ObjForEachFanoutStatic( p, iObj, iFanout, i ) \
210 for ( i = 0; (i < Wln_ObjRefs(p, iObj)) && (((iFanout) = Wln_ObjFanout(p, iObj, i)), 1); i++ )
211
212
213 ////////////////////////////////////////////////////////////////////////
214 /// FUNCTION DECLARATIONS ///
215 ////////////////////////////////////////////////////////////////////////
216
217 /*=== wlcNdr.c ========================================================*/
218 extern Wln_Ntk_t * Wln_ReadNdr( char * pFileName );
219 extern void Wln_WriteNdr( Wln_Ntk_t * pNtk, char * pFileName );
220 extern Wln_Ntk_t * Wln_NtkFromNdr( void * pData );
221 extern void * Wln_NtkToNdr( Wln_Ntk_t * pNtk );
222 /*=== wlcNtk.c ========================================================*/
223 extern Wln_Ntk_t * Wln_NtkAlloc( char * pName, int nObjsMax );
224 extern void Wln_NtkFree( Wln_Ntk_t * p );
225 extern int Wln_NtkMemUsage( Wln_Ntk_t * p );
226 extern void Wln_NtkPrint( Wln_Ntk_t * p );
227 extern Wln_Ntk_t * Wln_NtkDupDfs( Wln_Ntk_t * p );
228 extern void Wln_NtkCreateRefs( Wln_Ntk_t * p );
229 extern void Wln_NtkStartFaninMap( Wln_Ntk_t * p, Vec_Int_t * vFaninMap, int nMulti );
230 extern void Wln_NtkStartFanoutMap( Wln_Ntk_t * p, Vec_Int_t * vFanoutMap, Vec_Int_t * vFanoutNums, int nMulti );
231 extern void Wln_NtkStaticFanoutStart( Wln_Ntk_t * p );
232 extern void Wln_NtkStaticFanoutStop( Wln_Ntk_t * p );
233 extern void Wln_NtkStaticFanoutTest( Wln_Ntk_t * p );
234 /*=== wlcObj.c ========================================================*/
235 extern char * Wln_ObjName( Wln_Ntk_t * p, int iObj );
236 extern char * Wln_ObjConstString( Wln_Ntk_t * p, int iObj );
237 extern void Wln_ObjUpdateType( Wln_Ntk_t * p, int iObj, int Type );
238 extern void Wln_ObjSetConst( Wln_Ntk_t * p, int iObj, int NameId );
239 extern void Wln_ObjSetSlice( Wln_Ntk_t * p, int iObj, int SliceId );
240 extern void Wln_ObjAddFanin( Wln_Ntk_t * p, int iObj, int i );
241 extern int Wln_ObjAddFanins( Wln_Ntk_t * p, int iObj, Vec_Int_t * vFanins );
242 extern int Wln_ObjAlloc( Wln_Ntk_t * p, int Type, int Signed, int End, int Beg );
243 extern int Wln_ObjClone( Wln_Ntk_t * pNew, Wln_Ntk_t * p, int iObj );
244 extern int Wln_ObjCreateCo( Wln_Ntk_t * p, int iFanin );
245 extern void Wln_ObjPrint( Wln_Ntk_t * p, int iObj );
246 /*=== wlcRetime.c ========================================================*/
247 extern Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * p, int fSkipSimple, int fVerbose );
248 extern void Wln_NtkRetimeCreateDelayInfo( Wln_Ntk_t * pNtk );
249 /*=== wlcWriteVer.c ========================================================*/
250 extern void Wln_WriteVer( Wln_Ntk_t * p, char * pFileName );
251
252
253 ABC_NAMESPACE_HEADER_END
254
255 #endif
256
257 ////////////////////////////////////////////////////////////////////////
258 /// END OF FILE ///
259 ////////////////////////////////////////////////////////////////////////
260
261