abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cbaReadBlif.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [cbaReadBlif.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Verilog parser.]
8 
9  Synopsis [Parses several flavors of word-level Verilog.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - November 29, 2014.]
16 
17  Revision [$Id: cbaReadBlif.c,v 1.00 2014/11/29 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "cba.h"
22 #include "cbaPrs.h"
23 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 // BLIF keywords
31 typedef enum {
32  CBA_BLIF_NONE = 0, // 0: unused
33  CBA_BLIF_MODEL, // 1: .model
34  CBA_BLIF_INOUTS, // 2: .inouts
35  CBA_BLIF_INPUTS, // 3: .inputs
36  CBA_BLIF_OUTPUTS, // 4: .outputs
37  CBA_BLIF_NAMES, // 5: .names
38  CBA_BLIF_SUBCKT, // 6: .subckt
39  CBA_BLIF_GATE, // 7: .gate
40  CBA_BLIF_LATCH, // 8: .latch
41  CBA_BLIF_SHORT, // 9: .short
42  CBA_BLIF_END, // 10: .end
43  CBA_BLIF_UNKNOWN // 11: unknown
45 
46 const char * s_BlifTypes[CBA_BLIF_UNKNOWN+1] = {
47  NULL, // 0: unused
48  ".model", // 1: .model
49  ".inouts", // 2: .inputs
50  ".inputs", // 3: .inputs
51  ".outputs", // 4: .outputs
52  ".names", // 5: .names
53  ".subckt", // 6: .subckt
54  ".gate", // 7: .gate
55  ".latch", // 8: .latch
56  ".short", // 9: .short
57  ".end", // 10: .end
58  NULL // 11: unknown
59 };
60 
61 static inline void Cba_PrsAddBlifDirectives( Cba_Prs_t * p )
62 {
63  int i;
64  for ( i = 1; s_BlifTypes[i]; i++ )
65  Abc_NamStrFindOrAdd( p->pDesign->pNames, (char *)s_BlifTypes[i], NULL );
67  Abc_NamStrFindOrAdd( p->pDesign->pFuncs, (char *)" 0\n", NULL ); // default const 0 function
68  Abc_NamStrFindOrAdd( p->pDesign->pFuncs, (char *)"1 1\n", NULL ); // default buffer function
70 }
71 
72 
73 ////////////////////////////////////////////////////////////////////////
74 /// FUNCTION DEFINITIONS ///
75 ////////////////////////////////////////////////////////////////////////
76 
77 /**Function*************************************************************
78 
79  Synopsis [Reading characters.]
80 
81  Description []
82 
83  SideEffects []
84 
85  SeeAlso []
86 
87 ***********************************************************************/
88 static inline int Cba_CharIsSpace( char c ) { return c == ' ' || c == '\t' || c == '\r'; }
89 static inline int Cba_CharIsStop( char c ) { return c == '#' || c == '\\' || c == '\n' || c == '='; }
90 static inline int Cba_CharIsLit( char c ) { return c == '0' || c == '1' || c == '-'; }
91 
92 static inline int Cba_PrsIsSpace( Cba_Prs_t * p ) { return Cba_CharIsSpace(*p->pCur); }
93 static inline int Cba_PrsIsStop( Cba_Prs_t * p ) { return Cba_CharIsStop(*p->pCur); }
94 static inline int Cba_PrsIsLit( Cba_Prs_t * p ) { return Cba_CharIsLit(*p->pCur); }
95 
96 static inline int Cba_PrsIsChar( Cba_Prs_t * p, char c ) { return *p->pCur == c; }
97 static inline int Cba_PrsIsChar2( Cba_Prs_t * p, char c ) { return *p->pCur++ == c; }
98 
99 static inline void Cba_PrsSkip( Cba_Prs_t * p ) { p->pCur++; }
100 static inline char Cba_PrsSkip2( Cba_Prs_t * p ) { return *p->pCur++; }
101 
102 
103 /**Function*************************************************************
104 
105  Synopsis [Reading names.]
106 
107  Description []
108 
109  SideEffects []
110 
111  SeeAlso []
112 
113 ***********************************************************************/
114 static inline void Cba_PrsSkipToChar( Cba_Prs_t * p, char c )
115 {
116  while ( !Cba_PrsIsChar(p, c) )
117  Cba_PrsSkip(p);
118 }
119 static inline void Cba_PrsSkipSpaces( Cba_Prs_t * p )
120 {
121  while ( 1 )
122  {
123  while ( Cba_PrsIsSpace(p) )
124  Cba_PrsSkip(p);
125  if ( Cba_PrsIsChar(p, '\\') )
126  {
127  Cba_PrsSkipToChar( p, '\n' );
128  Cba_PrsSkip(p);
129  continue;
130  }
131  if ( Cba_PrsIsChar(p, '#') )
132  Cba_PrsSkipToChar( p, '\n' );
133  break;
134  }
135  assert( !Cba_PrsIsSpace(p) );
136 }
137 static inline int Cba_PrsReadName( Cba_Prs_t * p )
138 {
139  char * pStart;
140  Cba_PrsSkipSpaces( p );
141  if ( Cba_PrsIsChar(p, '\n') )
142  return 0;
143  pStart = p->pCur;
144  while ( !Cba_PrsIsSpace(p) && !Cba_PrsIsStop(p) )
145  Cba_PrsSkip(p);
146  if ( pStart == p->pCur )
147  return 0;
148  return Abc_NamStrFindOrAddLim( p->pDesign->pNames, pStart, p->pCur, NULL );
149 }
150 static inline int Cba_PrsReadList( Cba_Prs_t * p )
151 {
152  int iToken;
153  Vec_IntClear( &p->vTemp );
154  while ( (iToken = Cba_PrsReadName(p)) )
155  Vec_IntPush( &p->vTemp, iToken );
156  if ( Vec_IntSize(&p->vTemp) == 0 ) return Cba_PrsErrorSet(p, "Signal list is empty.", 1);
157  return 0;
158 }
159 static inline int Cba_PrsReadList2( Cba_Prs_t * p )
160 {
161  int iToken;
162  Vec_IntFill( &p->vTemp, 1, -1 );
163  while ( (iToken = Cba_PrsReadName(p)) )
164  Vec_IntPush( &p->vTemp, iToken );
165  iToken = Vec_IntPop(&p->vTemp);
166  if ( Vec_IntSize(&p->vTemp) == 0 ) return Cba_PrsErrorSet(p, "Signal list is empty.", 1);
167  Vec_IntWriteEntry( &p->vTemp, 0, iToken );
168  return 0;
169 }
170 static inline int Cba_PrsReadList3( Cba_Prs_t * p )
171 {
172  Vec_IntClear( &p->vTemp );
173  while ( !Cba_PrsIsChar(p, '\n') )
174  {
175  int iToken = Cba_PrsReadName(p);
176  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read formal name.", 1);
177  Vec_IntPush( &p->vTemp, iToken );
178  Cba_PrsSkipSpaces( p );
179  if ( !Cba_PrsIsChar2(p, '=') ) return Cba_PrsErrorSet(p, "Cannot find symbol \"=\".", 1);
180  iToken = Cba_PrsReadName(p);
181  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read actual name.", 1);
182  Vec_IntPush( &p->vTemp, iToken );
183  Cba_PrsSkipSpaces( p );
184  }
185  if ( Vec_IntSize(&p->vTemp) == 0 ) return Cba_PrsErrorSet(p, "Cannot read a list of formal/actual names.", 1);
186  if ( Vec_IntSize(&p->vTemp) % 2 ) return Cba_PrsErrorSet(p, "The number of formal/actual names is not even.", 1);
187  return 0;
188 }
189 
190 /**Function*************************************************************
191 
192  Synopsis []
193 
194  Description []
195 
196  SideEffects []
197 
198  SeeAlso []
199 
200 ***********************************************************************/
201 static inline int Cba_PrsReadCube( Cba_Prs_t * p )
202 {
203  assert( Cba_PrsIsLit(p) );
204  while ( Cba_PrsIsLit(p) )
205  Vec_StrPush( &p->vCover, Cba_PrsSkip2(p) );
206  Cba_PrsSkipSpaces( p );
207  if ( Cba_PrsIsChar(p, '\n') )
208  {
209  if ( Vec_StrSize(&p->vCover) != 1 ) return Cba_PrsErrorSet(p, "Cannot read cube.", 1);
210  // fix single literal cube by adding space
211  Vec_StrPush( &p->vCover, Vec_StrEntry(&p->vCover,0) );
212  Vec_StrWriteEntry( &p->vCover, 0, ' ' );
213  Vec_StrPush( &p->vCover, '\n' );
214  return 0;
215  }
216  if ( !Cba_PrsIsLit(p) ) return Cba_PrsErrorSet(p, "Cannot read output literal.", 1);
217  Vec_StrPush( &p->vCover, ' ' );
218  Vec_StrPush( &p->vCover, Cba_PrsSkip2(p) );
219  Vec_StrPush( &p->vCover, '\n' );
220  Cba_PrsSkipSpaces( p );
221  if ( !Cba_PrsIsChar(p, '\n') ) return Cba_PrsErrorSet(p, "Cannot read end of cube.", 1);
222  return 0;
223 }
224 static inline void Cba_PrsSaveCover( Cba_Prs_t * p )
225 {
226  int iToken;
227  assert( Vec_StrSize(&p->vCover) > 0 );
228  Vec_StrPush( &p->vCover, '\0' );
229  iToken = Abc_NamStrFindOrAdd( p->pDesign->pFuncs, Vec_StrArray(&p->vCover), NULL );
230  assert( Vec_IntEntryLast(&p->vFuncsCur) == 1 );
231  Vec_IntWriteEntry( &p->vFuncsCur, Vec_IntSize(&p->vFuncsCur)-1, iToken );
232  Vec_StrClear( &p->vCover );
233 }
234 
235 /**Function*************************************************************
236 
237  Synopsis []
238 
239  Description []
240 
241  SideEffects []
242 
243  SeeAlso []
244 
245 ***********************************************************************/
246 static inline int Cba_PrsReadInouts( Cba_Prs_t * p )
247 {
248  if ( Cba_PrsReadList(p) ) return 1;
249  Vec_IntAppend( &p->vInoutsCur, &p->vTemp );
250  return 0;
251 }
252 static inline int Cba_PrsReadInputs( Cba_Prs_t * p )
253 {
254  if ( Cba_PrsReadList(p) ) return 1;
255  Vec_IntAppend( &p->vInputsCur, &p->vTemp );
256  return 0;
257 }
258 static inline int Cba_PrsReadOutputs( Cba_Prs_t * p )
259 {
260  if ( Cba_PrsReadList(p) ) return 1;
261  Vec_IntAppend( &p->vOutputsCur, &p->vTemp );
262  return 0;
263 }
264 static inline int Cba_PrsReadNode( Cba_Prs_t * p )
265 {
266  if ( Cba_PrsReadList2(p) ) return 1;
267  // save results
269  Vec_IntPush( &p->vFuncsCur, 1 ); // default const 0 function
271  return 0;
272 }
273 static inline int Cba_PrsReadBox( Cba_Prs_t * p, int fGate )
274 {
275  int iToken = Cba_PrsReadName(p);
276  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read model name.", 1);
277  if ( Cba_PrsReadList3(p) ) return 1;
278  // save results
280  Vec_IntPush( &p->vFuncsCur, iToken );
282  return 0;
283 }
284 static inline int Cba_PrsReadLatch( Cba_Prs_t * p )
285 {
286  int iToken = Cba_PrsReadName(p);
287  Vec_IntFill( &p->vTemp, 2, -1 );
288  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read latch input.", 1);
289  Vec_IntWriteEntry( &p->vTemp, 1, iToken );
290  iToken = Cba_PrsReadName(p);
291  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read latch output.", 1);
292  Vec_IntWriteEntry( &p->vTemp, 0, iToken );
293  Cba_PrsSkipSpaces( p );
294  if ( Cba_PrsIsChar(p, '0') )
295  iToken = 0;
296  else if ( Cba_PrsIsChar(p, '1') )
297  iToken = 1;
298  else
299  iToken = 2;
300  Cba_PrsSkipToChar( p, '\n' );
301  // save results
303  Vec_IntPush( &p->vFuncsCur, iToken );
305  return 0;
306 }
307 static inline int Cba_PrsReadShort( Cba_Prs_t * p )
308 {
309  int iToken = Cba_PrsReadName(p);
310  Vec_IntFill( &p->vTemp, 2, -1 );
311  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read .short input.", 1);
312  Vec_IntWriteEntry( &p->vTemp, 1, iToken );
313  iToken = Cba_PrsReadName(p);
314  if ( iToken == 0 ) return Cba_PrsErrorSet(p, "Cannot read .short output.", 1);
315  Vec_IntWriteEntry( &p->vTemp, 0, iToken );
316  Cba_PrsSkipSpaces( p );
317  if ( !Cba_PrsIsChar(p, '\n') ) return Cba_PrsErrorSet(p, "Trailing symbols on .short line.", 1);
318  // save results
320  Vec_IntPush( &p->vFuncsCur, 2 ); // default buffer function
322  return 0;
323 }
324 static inline int Cba_PrsReadModel( Cba_Prs_t * p )
325 {
326  if ( p->iModuleName > 0 ) return Cba_PrsErrorSet(p, "Parsing previous model is unfinished.", 1);
328  Cba_PrsSkipSpaces( p );
329  if ( !Cba_PrsIsChar(p, '\n') ) return Cba_PrsErrorSet(p, "Trailing symbols on .model line.", 1);
330  return 0;
331 }
332 static inline int Cba_PrsReadEnd( Cba_Prs_t * p )
333 {
334  if ( p->iModuleName == 0 ) return Cba_PrsErrorSet(p, "Directive .end without .model.", 1);
335  //printf( "Saving model \"%s\".\n", Abc_NamStr(p->pDesign->pNames, p->iModuleName) );
337  p->iModuleName = 0;
338  Cba_PrsSkipSpaces( p );
339  if ( !Cba_PrsIsChar(p, '\n') ) return Cba_PrsErrorSet(p, "Trailing symbols on .end line.", 1);
340  return 0;
341 }
342 
343 static inline int Cba_PrsReadDirective( Cba_Prs_t * p )
344 {
345  int iToken;
346  if ( !Cba_PrsIsChar(p, '.') )
347  return Cba_PrsReadCube( p );
348  if ( Vec_StrSize(&p->vCover) > 0 ) // SOP was specified for the previous node
349  Cba_PrsSaveCover( p );
350  iToken = Cba_PrsReadName( p );
351  if ( iToken == CBA_BLIF_MODEL )
352  return Cba_PrsReadModel( p );
353  if ( iToken == CBA_BLIF_INOUTS )
354  return Cba_PrsReadInouts( p );
355  if ( iToken == CBA_BLIF_INPUTS )
356  return Cba_PrsReadInputs( p );
357  if ( iToken == CBA_BLIF_OUTPUTS )
358  return Cba_PrsReadOutputs( p );
359  if ( iToken == CBA_BLIF_NAMES )
360  return Cba_PrsReadNode( p );
361  if ( iToken == CBA_BLIF_SUBCKT )
362  return Cba_PrsReadBox( p, 0 );
363  if ( iToken == CBA_BLIF_GATE )
364  return Cba_PrsReadBox( p, 1 );
365  if ( iToken == CBA_BLIF_LATCH )
366  return Cba_PrsReadLatch( p );
367  if ( iToken == CBA_BLIF_SHORT )
368  return Cba_PrsReadShort( p );
369  if ( iToken == CBA_BLIF_END )
370  return Cba_PrsReadEnd( p );
371  printf( "Cannot read directive \"%s\".\n", Abc_NamStr(p->pDesign->pNames, iToken) );
372  return 1;
373 }
374 static inline int Cba_PrsReadLines( Cba_Prs_t * p )
375 {
376  while ( p->pCur[1] != '\0' )
377  {
378  assert( Cba_PrsIsChar(p, '\n') );
379  Cba_PrsSkip(p);
380  Cba_PrsSkipSpaces( p );
381  if ( Cba_PrsIsChar(p, '\n') )
382  continue;
383  if ( Cba_PrsReadDirective(p) )
384  return 1;
385  }
386  return 0;
387 }
388 
389 /**Function*************************************************************
390 
391  Synopsis []
392 
393  Description []
394 
395  SideEffects []
396 
397  SeeAlso []
398 
399 ***********************************************************************/
400 Cba_Man_t * Cba_PrsReadBlif( char * pFileName )
401 {
402  Cba_Man_t * pDesign = NULL;
403  Cba_Prs_t * p = Cba_PrsAlloc( pFileName );
404  if ( p == NULL )
405  return NULL;
407  Cba_PrsReadLines( p );
408  if ( Cba_PrsErrorPrint(p) )
409  ABC_SWAP( Cba_Man_t *, pDesign, p->pDesign );
410  Cba_PrsFree( p );
411  return pDesign;
412 }
413 
414 /**Function*************************************************************
415 
416  Synopsis []
417 
418  Description []
419 
420  SideEffects []
421 
422  SeeAlso []
423 
424 ***********************************************************************/
425 void Cba_PrsReadBlifTest( char * pFileName )
426 {
427  abctime clk = Abc_Clock();
428  extern void Cba_PrsWriteBlif( char * pFileName, Cba_Man_t * pDes );
429  Cba_Man_t * p = Cba_PrsReadBlif( "aga/ray/ray_hie_oper.blif" );
430  if ( !p ) return;
431  printf( "Finished reading %d networks. ", Cba_ManNtkNum(p) );
432  printf( "NameIDs = %d. ", Abc_NamObjNumMax(p->pNames) );
433  printf( "Memory = %.2f MB. ", 1.0*Cba_ManMemory(p)/(1<<20) );
434  Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
435 // Abc_NamPrint( p->pDesign->pNames );
436  Cba_PrsWriteBlif( "aga/ray/ray_hie_oper_out.blif", p );
437  Cba_ManFree( p );
438 }
439 
440 
441 ////////////////////////////////////////////////////////////////////////
442 /// END OF FILE ///
443 ////////////////////////////////////////////////////////////////////////
444 
445 
447 
static int Cba_PrsReadList3(Cba_Prs_t *p)
Definition: cbaReadBlif.c:170
static int Cba_PrsErrorSet(Cba_Prs_t *p, char *pError, int Value)
MACRO DEFINITIONS ///.
Definition: cbaPrs.h:92
static char Cba_PrsSkip2(Cba_Prs_t *p)
Definition: cbaReadBlif.c:100
static int Cba_PrsReadBox(Cba_Prs_t *p, int fGate)
Definition: cbaReadBlif.c:273
static int Cba_PrsReadCube(Cba_Prs_t *p)
Definition: cbaReadBlif.c:201
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static char * Vec_StrArray(Vec_Str_t *p)
Definition: vecStr.h:272
Vec_Int_t vTypesCur
Definition: cbaPrs.h:68
static int Cba_PrsIsChar(Cba_Prs_t *p, char c)
Definition: cbaReadBlif.c:96
static void Cba_PrsSkipSpaces(Cba_Prs_t *p)
Definition: cbaReadBlif.c:119
static int Cba_PrsReadLines(Cba_Prs_t *p)
Definition: cbaReadBlif.c:374
static void Cba_PrsSaveCover(Cba_Prs_t *p)
Definition: cbaReadBlif.c:224
int Abc_NamObjNumMax(Abc_Nam_t *p)
Definition: utilNam.c:186
static Vec_Int_t * Vec_WecPushLevel(Vec_Wec_t *p)
Definition: vecWec.h:284
static int Cba_PrsIsSpace(Cba_Prs_t *p)
Definition: cbaReadBlif.c:92
static int Cba_PrsReadName(Cba_Prs_t *p)
Definition: cbaReadBlif.c:137
static void Vec_StrClear(Vec_Str_t *p)
Definition: vecStr.h:519
static int Cba_PrsReadList2(Cba_Prs_t *p)
Definition: cbaReadBlif.c:159
int Abc_NamStrFindOrAdd(Abc_Nam_t *p, char *pStr, int *pfFound)
Definition: utilNam.c:392
static abctime Abc_Clock()
Definition: abc_global.h:279
static void Vec_StrPush(Vec_Str_t *p, char Entry)
Definition: vecStr.h:535
Abc_Nam_t * pNames
Definition: cba.h:87
#define ABC_SWAP(Type, a, b)
Definition: abc_global.h:218
Vec_Int_t vInoutsCur
Definition: cbaPrs.h:63
int Abc_NamStrFindOrAddLim(Abc_Nam_t *p, char *pStr, char *pLim, int *pfFound)
Definition: utilNam.c:431
Vec_Int_t vInputsCur
Definition: cbaPrs.h:64
Vec_Str_t vCover
Definition: cbaPrs.h:73
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static void Vec_StrWriteEntry(Vec_Str_t *p, int i, char Entry)
Definition: vecStr.h:370
static char Vec_StrEntry(Vec_Str_t *p, int i)
Definition: vecStr.h:336
static int Cba_PrsReadModel(Cba_Prs_t *p)
Definition: cbaReadBlif.c:324
int iModuleName
Definition: cbaPrs.h:62
static int Cba_CharIsStop(char c)
Definition: cbaReadBlif.c:89
Vec_Int_t vFuncsCur
Definition: cbaPrs.h:69
static void Cba_ManFree(Cba_Man_t *p)
Definition: cba.h:214
static int Cba_PrsReadNode(Cba_Prs_t *p)
Definition: cbaReadBlif.c:264
static void Cba_PrsSetupVecInt(Cba_Prs_t *p, Vec_Int_t *vTo, Vec_Int_t *vFrom)
Definition: cbaPrs.h:116
Cba_Man_t * pDesign
Definition: cbaPrs.h:60
static int Cba_PrsReadInputs(Cba_Prs_t *p)
Definition: cbaReadBlif.c:252
void Cba_PrsReadBlifTest(char *pFileName)
Definition: cbaReadBlif.c:425
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:356
static int Vec_IntPop(Vec_Int_t *p)
static int Cba_PrsIsChar2(Cba_Prs_t *p, char c)
Definition: cbaReadBlif.c:97
char * pCur
Definition: cbaPrs.h:57
static void Cba_PrsSkip(Cba_Prs_t *p)
Definition: cbaReadBlif.c:99
static Cba_Prs_t * Cba_PrsAlloc(char *pFileName)
Definition: cbaPrs.h:168
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static void Vec_IntAppend(Vec_Int_t *vVec1, Vec_Int_t *vVec2)
Vec_Wec_t vFaninsCur
Definition: cbaPrs.h:71
static int Cba_PrsErrorPrint(Cba_Prs_t *p)
Definition: cbaPrs.h:104
static int Cba_PrsReadShort(Cba_Prs_t *p)
Definition: cbaReadBlif.c:307
static int Cba_CharIsSpace(char c)
FUNCTION DEFINITIONS ///.
Definition: cbaReadBlif.c:88
Vec_Int_t vOutputsCur
Definition: cbaPrs.h:65
static Cba_Ntk_t * Cba_PrsAddCurrentModel(Cba_Prs_t *p, int iNameId)
Definition: cbaPrs.h:125
static int Cba_PrsReadEnd(Cba_Prs_t *p)
Definition: cbaReadBlif.c:332
static int Cba_ManMemory(Cba_Man_t *p)
Definition: cba.h:229
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
Definition: utilNam.c:479
Definition: cba.h:82
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static int Cba_ManNtkNum(Cba_Man_t *p)
Definition: cba.h:121
static int Cba_CharIsLit(char c)
Definition: cbaReadBlif.c:90
static int Vec_StrSize(Vec_Str_t *p)
Definition: bblif.c:600
static void Cba_PrsAddBlifDirectives(Cba_Prs_t *p)
Definition: cbaReadBlif.c:61
Abc_Nam_t * pFuncs
Definition: cba.h:89
const char * s_BlifTypes[CBA_BLIF_UNKNOWN+1]
Definition: cbaReadBlif.c:46
static int Vec_IntEntryLast(Vec_Int_t *p)
Definition: bblif.c:319
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
Cba_Man_t * Cba_PrsReadBlif(char *pFileName)
Definition: cbaReadBlif.c:400
static void Cba_PrsFree(Cba_Prs_t *p)
Definition: cbaPrs.h:183
static int Cba_PrsReadInouts(Cba_Prs_t *p)
Definition: cbaReadBlif.c:246
Vec_Int_t vTemp
Definition: cbaPrs.h:74
static int Cba_PrsReadOutputs(Cba_Prs_t *p)
Definition: cbaReadBlif.c:258
void Cba_PrsWriteBlif(char *pFileName, Cba_Man_t *pDes)
Definition: cbaWriteBlif.c:105
#define assert(ex)
Definition: util_old.h:213
static int Cba_PrsReadList(Cba_Prs_t *p)
Definition: cbaReadBlif.c:150
static void Cba_PrsSkipToChar(Cba_Prs_t *p, char c)
Definition: cbaReadBlif.c:114
static int Cba_PrsReadLatch(Cba_Prs_t *p)
Definition: cbaReadBlif.c:284
static int Cba_PrsReadDirective(Cba_Prs_t *p)
Definition: cbaReadBlif.c:343
Cba_BlifType_t
DECLARATIONS ///.
Definition: cbaReadBlif.c:31
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
ABC_INT64_T abctime
Definition: abc_global.h:278
static int Cba_PrsIsStop(Cba_Prs_t *p)
Definition: cbaReadBlif.c:93
static int Cba_PrsIsLit(Cba_Prs_t *p)
Definition: cbaReadBlif.c:94