65static inline void Psr_NtkAddVerilogDirectives(
Psr_Man_t *
p )
68 for ( i = 1; s_VerTypes[i]; i++ )
75static inline int Psr_CharIsSpace(
char c ) {
return (c ==
' ' || c ==
'\t' || c ==
'\r' || c ==
'\n'); }
76static inline int Psr_CharIsDigit(
char c ) {
return (c >=
'0' && c <=
'9'); }
77static inline int Psr_CharIsDigitB(
char c ) {
return (c ==
'0' || c ==
'1' || c ==
'x' || c ==
'z'); }
78static inline int Psr_CharIsDigitH(
char c ) {
return (c >=
'0' && c <=
'9') || (c >=
'A' && c <=
'F') || (c >=
'a' && c <=
'f'); }
79static inline int Psr_CharIsChar(
char c ) {
return (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z'); }
80static inline int Psr_CharIsSymb1(
char c ) {
return Psr_CharIsChar(c) || c ==
'_'; }
81static inline int Psr_CharIsSymb2(
char c ) {
return Psr_CharIsSymb1(c) || Psr_CharIsDigit(c) || c ==
'$'; }
83static inline int Psr_ManIsChar(
Psr_Man_t *
p,
char c ) {
return p->pCur[0] == c; }
84static inline int Psr_ManIsChar1(
Psr_Man_t *
p,
char c ) {
return p->pCur[1] == c; }
85static inline int Psr_ManIsDigit(
Psr_Man_t *
p ) {
return Psr_CharIsDigit(*
p->pCur); }
104static const char * s_VerilogModules[100] =
123static const char * s_KnownModules[100] =
180static inline int Psr_ManIsVerilogModule(
Psr_Man_t *
p,
char * pName )
183 for ( i = 0; s_VerilogModules[i]; i++ )
184 if ( !
strcmp(pName, s_VerilogModules[i]) )
189static inline int Psr_ManIsKnownModule(
Psr_Man_t *
p,
char * pName )
192 for ( i = 0; s_KnownModules[i]; i++ )
193 if ( !
strncmp(pName, s_KnownModules[i],
strlen(s_KnownModules[i])) )
212static inline int Psr_ManUtilSkipComments(
Psr_Man_t *
p )
214 if ( !Psr_ManIsChar(
p,
'/') )
216 if ( Psr_ManIsChar1(
p,
'/') )
218 for (
p->pCur += 2;
p->pCur <
p->pLimit;
p->pCur++ )
219 if ( Psr_ManIsChar(
p,
'\n') )
220 {
p->pCur++;
return 1; }
222 else if ( Psr_ManIsChar1(
p,
'*') )
224 for (
p->pCur += 2;
p->pCur <
p->pLimit;
p->pCur++ )
225 if ( Psr_ManIsChar(
p,
'*') && Psr_ManIsChar1(
p,
'/') )
226 {
p->pCur++;
p->pCur++;
return 1; }
230static inline int Psr_ManUtilSkipName(
Psr_Man_t *
p )
232 if ( !Psr_ManIsChar(
p,
'\\') )
234 for (
p->pCur++;
p->pCur <
p->pLimit;
p->pCur++ )
235 if ( Psr_ManIsChar(
p,
' ') )
236 {
p->pCur++;
return 1; }
241static inline int Psr_ManUtilSkipSpaces(
Psr_Man_t *
p )
243 while (
p->pCur <
p->pLimit )
245 while ( Psr_CharIsSpace(*
p->pCur) )
248 return Psr_ManErrorSet(
p,
"Unexpectedly reached end-of-file.", 1);
249 if ( !Psr_ManUtilSkipComments(
p) )
252 return Psr_ManErrorSet(
p,
"Unexpectedly reached end-of-file.", 1);
255static inline int Psr_ManUtilSkipUntil(
Psr_Man_t *
p,
char c )
257 while (
p->pCur <
p->pLimit )
259 if ( Psr_ManIsChar(
p, c) )
261 if ( Psr_ManUtilSkipComments(
p) )
263 if ( Psr_ManUtilSkipName(
p) )
270static inline int Psr_ManUtilSkipUntilWord(
Psr_Man_t *
p,
char * pWord )
272 char * pPlace =
strstr(
p->pCur, pWord );
273 if ( pPlace == NULL )
return 1;
274 p->pCur = pPlace +
strlen(pWord);
289static inline int Psr_ManReadName(
Psr_Man_t *
p )
291 char * pStart =
p->pCur;
292 if ( Psr_ManIsChar(
p,
'\\') )
295 while ( !Psr_ManIsChar(
p,
' ') )
298 else if ( Psr_CharIsSymb1(*
p->pCur) )
301 while ( Psr_CharIsSymb2(*
p->pCur) )
310 Vec_IntClear( vTemp );
313 int Item = Psr_ManReadName(
p);
314 if ( Item == 0 )
return Psr_ManErrorSet(
p,
"Cannot read name in the list.", 0);
315 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 1.", 0);
318 Vec_IntPush( vTemp, Item );
319 if ( Psr_ManIsChar(
p, LastSymb) )
break;
320 if ( !Psr_ManIsChar(
p,
',') )
return Psr_ManErrorSet(
p,
"Expecting comma in the list.", 0);
322 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 2.", 0);
326static inline int Psr_ManReadConstant(
Psr_Man_t *
p )
328 char * pStart =
p->pCur;
330 while ( Psr_ManIsDigit(
p) )
332 if ( !Psr_ManIsChar(
p,
'\'') )
return Psr_ManErrorSet(
p,
"Cannot read constant.", 0);
334 if ( Psr_ManIsChar(
p,
'b') )
337 while ( Psr_CharIsDigitB(*
p->pCur) )
339 if ( *
p->pCur ==
'0' )
340 p->pNtk->fHasC0s = 1;
341 else if ( *
p->pCur ==
'1' )
342 p->pNtk->fHasC1s = 1;
343 else if ( *
p->pCur ==
'x' )
344 p->pNtk->fHasCXs = 1;
345 else if ( *
p->pCur ==
'z' )
346 p->pNtk->fHasCZs = 1;
350 else if ( Psr_ManIsChar(
p,
'h') )
353 p->pNtk->fHasC0s = 1;
354 while ( Psr_CharIsDigitH(*
p->pCur) )
356 if ( *
p->pCur !=
'0' )
357 p->pNtk->fHasC1s = 1;
361 else if ( Psr_ManIsChar(
p,
'd') )
364 p->pNtk->fHasC0s = 1;
365 while ( Psr_ManIsDigit(
p) )
367 if ( *
p->pCur !=
'0' )
368 p->pNtk->fHasC1s = 1;
372 else return Psr_ManErrorSet(
p,
"Cannot read radix of constant.", 0);
375static inline int Psr_ManReadRange(
Psr_Man_t *
p )
377 assert( Psr_ManIsChar(
p,
'[') );
378 Vec_StrClear( &
p->vCover );
379 Vec_StrPush( &
p->vCover, *
p->pCur++ );
380 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 3.", 0);
381 if ( !Psr_ManIsDigit(
p) )
return Psr_ManErrorSet(
p,
"Cannot read digit in range specification.", 0);
382 while ( Psr_ManIsDigit(
p) )
383 Vec_StrPush( &
p->vCover, *
p->pCur++ );
384 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 4.", 0);
385 if ( Psr_ManIsChar(
p,
':') )
387 Vec_StrPush( &
p->vCover, *
p->pCur++ );
388 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 5.", 0);
389 if ( !Psr_ManIsDigit(
p) )
return Psr_ManErrorSet(
p,
"Cannot read digit in range specification.", 0);
390 while ( Psr_ManIsDigit(
p) )
391 Vec_StrPush( &
p->vCover, *
p->pCur++ );
392 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 6.", 0);
394 if ( !Psr_ManIsChar(
p,
']') )
return Psr_ManErrorSet(
p,
"Cannot read closing brace in range specification.", 0);
395 Vec_StrPush( &
p->vCover, *
p->pCur++ );
396 Vec_StrPush( &
p->vCover,
'\0' );
402 assert( Psr_ManIsChar(
p,
'{') );
406 assert( Psr_ManIsChar(
p,
'}') );
409 assert( Vec_IntSize(vTemp2) > 0 );
410 if ( Vec_IntSize(vTemp2) == 1 )
411 return Vec_IntEntry(vTemp2, 0);
412 return Abc_Var2Lit2( Psr_NtkAddConcat(
p->pNtk, vTemp2),
BAC_PRS_CONCAT );
414static inline int Psr_ManReadSignal(
Psr_Man_t *
p )
417 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 8.", 0);
418 if ( Psr_ManIsDigit(
p) )
420 Item = Psr_ManReadConstant(
p);
421 if ( Item == 0 )
return Psr_ManErrorSet(
p,
"Error number 9.", 0);
422 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 10.", 0);
425 if ( Psr_ManIsChar(
p,
'{') )
427 if (
p->fUsingTemp2 )
return Psr_ManErrorSet(
p,
"Cannot read nested concatenations.", 0);
429 Item = Psr_ManReadConcat(
p, &
p->vTemp2);
431 if ( Item == 0 )
return Psr_ManErrorSet(
p,
"Error number 11.", 0);
432 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 12.", 0);
437 Item = Psr_ManReadName(
p );
438 if ( Item == 0 )
return Psr_ManErrorSet(
p,
"Error number 13.", 0);
439 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 14.", 0);
440 if ( Psr_ManIsChar(
p,
'[') )
442 int Range = Psr_ManReadRange(
p);
443 if ( Range == 0 )
return Psr_ManErrorSet(
p,
"Error number 15.", 0);
444 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 16.", 0);
445 return Abc_Var2Lit2( Psr_NtkAddSlice(
p->pNtk, Item, Range),
BAC_PRS_SLICE );
452 Vec_IntClear( vTemp );
455 int Item = Psr_ManReadSignal(
p);
456 if ( Item == 0 )
return Psr_ManErrorSet(
p,
"Cannot read signal in the list.", 0);
458 Vec_IntPush( vTemp, 0 );
459 Vec_IntPush( vTemp, Item );
460 if ( Psr_ManIsChar(
p, LastSymb) )
break;
461 if ( !Psr_ManIsChar(
p,
',') )
return Psr_ManErrorSet(
p,
"Expecting comma in the list.", 0);
469 Vec_IntClear( vTemp );
470 assert( Psr_ManIsChar(
p,
'.') );
471 while ( Psr_ManIsChar(
p,
'.') )
474 FormId = Psr_ManReadName(
p );
475 if ( FormId == 0 )
return Psr_ManErrorSet(
p,
"Cannot read formal name of the instance.", 0);
476 if ( !Psr_ManIsChar(
p,
'(') )
return Psr_ManErrorSet(
p,
"Cannot read \"(\" in the instance.", 0);
478 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 17.", 0);
479 ActItem = Psr_ManReadSignal(
p );
480 if ( ActItem == 0 )
return Psr_ManErrorSet(
p,
"Cannot read actual name of the instance.", 0);
481 if ( !Psr_ManIsChar(
p,
')') )
return Psr_ManErrorSet(
p,
"Cannot read \")\" in the instance.", 0);
483 Vec_IntPushTwo( vTemp, FormId, ActItem );
484 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 18.", 0);
485 if ( Psr_ManIsChar(
p,
')') )
break;
486 if ( !Psr_ManIsChar(
p,
',') )
return Psr_ManErrorSet(
p,
"Expecting comma in the instance.", 0);
488 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 19.", 0);
490 assert( Vec_IntSize(vTemp) > 0 );
491 assert( Vec_IntSize(vTemp) % 2 == 0 );
506static inline int Psr_ManReadDeclaration(
Psr_Man_t *
p,
int Type )
508 int i, NameId, RangeId = 0;
509 Vec_Int_t * vNames[4] = { &
p->pNtk->vInputs, &
p->pNtk->vOutputs, &
p->pNtk->vInouts, &
p->pNtk->vWires };
510 Vec_Int_t * vNamesR[4] = { &
p->pNtk->vInputsR, &
p->pNtk->vOutputsR, &
p->pNtk->vInoutsR, &
p->pNtk->vWiresR };
512 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 20.", 0);
513 if ( Psr_ManIsChar(
p,
'[') && !(RangeId = Psr_ManReadRange(
p)) )
return Psr_ManErrorSet(
p,
"Error number 21.", 0);
514 if ( !Psr_ManReadNameList(
p, &
p->vTemp,
';' ) )
return Psr_ManErrorSet(
p,
"Error number 22.", 0);
520 Vec_IntPush( &
p->pNtk->vOrder, Abc_Var2Lit2(NameId, Type) );
524static inline int Psr_ManReadAssign(
Psr_Man_t *
p )
526 int OutItem, InItem, fCompl = 0, fCompl2 = 0, Oper = 0;
528 OutItem = Psr_ManReadSignal(
p );
529 if ( OutItem == 0 )
return Psr_ManErrorSet(
p,
"Cannot read output in assign-statement.", 0);
530 if ( !Psr_ManIsChar(
p,
'=') )
return Psr_ManErrorSet(
p,
"Expecting \"=\" in assign-statement.", 0);
532 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 23.", 0);
533 if ( Psr_ManIsChar(
p,
'~') )
539 InItem = Psr_ManReadSignal(
p );
540 if ( InItem == 0 )
return Psr_ManErrorSet(
p,
"Cannot read first input name in the assign-statement.", 0);
541 Vec_IntClear( &
p->vTemp );
542 Vec_IntPush( &
p->vTemp, 0 );
543 Vec_IntPush( &
p->vTemp, InItem );
545 if ( Psr_ManIsChar(
p,
';') )
547 Vec_IntPush( &
p->vTemp, 0 );
548 Vec_IntPush( &
p->vTemp, OutItem );
550 Psr_NtkAddBox(
p->pNtk, Oper, 0, &
p->vTemp );
553 if ( Psr_ManIsChar(
p,
'&') )
555 else if ( Psr_ManIsChar(
p,
'|') )
557 else if ( Psr_ManIsChar(
p,
'^') )
559 else if ( Psr_ManIsChar(
p,
'?') )
561 else return Psr_ManErrorSet(
p,
"Unrecognized operator in the assign-statement.", 0);
563 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 24.", 0);
564 if ( Psr_ManIsChar(
p,
'~') )
570 InItem = Psr_ManReadSignal(
p );
571 if ( InItem == 0 )
return Psr_ManErrorSet(
p,
"Cannot read second input name in the assign-statement.", 0);
572 Vec_IntPush( &
p->vTemp, 0 );
573 Vec_IntPush( &
p->vTemp, InItem );
578 if ( !Psr_ManIsChar(
p,
':') )
return Psr_ManErrorSet(
p,
"Expected colon in the MUX assignment.", 0);
581 InItem = Psr_ManReadSignal(
p );
582 if ( InItem == 0 )
return Psr_ManErrorSet(
p,
"Cannot read third input name in the assign-statement.", 0);
583 Vec_IntPush( &
p->vTemp, 0 );
584 Vec_IntPush( &
p->vTemp, InItem );
585 if ( !Psr_ManIsChar(
p,
';') )
return Psr_ManErrorSet(
p,
"Expected semicolon at the end of the assign-statement.", 0);
592 if ( fCompl && !fCompl2 )
594 else if ( !fCompl && fCompl2 )
596 else if ( fCompl && fCompl2 )
601 if ( fCompl && fCompl2 )
603 else assert( !fCompl && !fCompl2 );
607 if ( fCompl && !fCompl2 )
609 else assert( !fCompl && !fCompl2 );
613 Vec_IntPush( &
p->vTemp, 0 );
614 Vec_IntPush( &
p->vTemp, OutItem );
615 Psr_NtkAddBox(
p->pNtk, Oper, 0, &
p->vTemp );
618static inline int Psr_ManReadInstance(
Psr_Man_t *
p,
int Func )
628 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 25.", 0);
629 if ( (InstId = Psr_ManReadName(
p)) )
630 if (Psr_ManUtilSkipSpaces(
p))
return Psr_ManErrorSet(
p,
"Error number 26.", 0);
631 if ( !Psr_ManIsChar(
p,
'(') )
return Psr_ManErrorSet(
p,
"Expecting \"(\" in module instantiation.", 0);
633 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 27.", 0);
634 if ( Psr_ManIsChar(
p,
'.') )
635 Status = Psr_ManReadSignalList2(
p, &
p->vTemp);
640 int iFuncNew = Psr_ManIsVerilogModule(
p,
Abc_NamStr(
p->pStrs, Func));
641 if ( iFuncNew == 0 )
return Psr_ManErrorSet(
p,
"Cannot find elementary gate.", 0);
645 if ( Status == 0 )
return Psr_ManErrorSet(
p,
"Error number 28.", 0);
646 assert( Psr_ManIsChar(
p,
')') );
648 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 29.", 0);
649 if ( !Psr_ManIsChar(
p,
';') )
return Psr_ManErrorSet(
p,
"Expecting semicolon in the instance.", 0);
651 Psr_NtkAddBox(
p->pNtk, Func, InstId, &
p->vTemp );
654static inline int Psr_ManReadArguments(
Psr_Man_t *
p )
656 int iRange = 0, iType = -1;
657 Vec_Int_t * vSigs[3] = { &
p->pNtk->vInputs, &
p->pNtk->vOutputs, &
p->pNtk->vInouts };
658 Vec_Int_t * vSigsR[3] = { &
p->pNtk->vInputsR, &
p->pNtk->vOutputsR, &
p->pNtk->vInoutsR };
659 assert( Psr_ManIsChar(
p,
'(') );
661 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 30.", 0);
664 int iName = Psr_ManReadName(
p );
665 if ( iName == 0 )
return Psr_ManErrorSet(
p,
"Error number 31.", 0);
666 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 32.", 0);
670 if ( Psr_ManIsChar(
p,
'[') )
672 iRange = Psr_ManReadRange(
p);
673 if ( iRange == 0 )
return Psr_ManErrorSet(
p,
"Error number 33.", 0);
674 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 34.", 0);
676 iName = Psr_ManReadName(
p );
677 if ( iName == 0 )
return Psr_ManErrorSet(
p,
"Error number 35.", 0);
683 Vec_IntPush( &
p->pNtk->vOrder, Abc_Var2Lit2(iName, iType) );
685 if ( Psr_ManIsChar(
p,
')') )
687 if ( !Psr_ManIsChar(
p,
',') )
return Psr_ManErrorSet(
p,
"Expecting comma in the instance.", 0);
689 if ( Psr_ManUtilSkipSpaces(
p) )
return Psr_ManErrorSet(
p,
"Error number 36.", 0);
692 assert( Psr_ManIsChar(
p,
')') );
697static inline int Psr_ManReadModule(
Psr_Man_t *
p )
700 if (
p->pNtk != NULL )
return Psr_ManErrorSet(
p,
"Parsing previous module is unfinished.", 4);
701 if ( Psr_ManUtilSkipSpaces(
p) )
703 Psr_ManErrorClear(
p );
707 iToken = Psr_ManReadName(
p );
708 if ( iToken !=
PRS_VER_MODULE )
return Psr_ManErrorSet(
p,
"Cannot read \"module\" keyword.", 4);
709 if ( Psr_ManUtilSkipSpaces(
p) )
return 4;
711 iToken = Psr_ManReadName(
p );
712 if ( iToken == 0 )
return Psr_ManErrorSet(
p,
"Cannot read module name.", 4);
713 if ( Psr_ManIsKnownModule(
p,
Abc_NamStr(
p->pStrs, iToken)) )
715 if ( Psr_ManUtilSkipUntilWord(
p,
"endmodule" ) )
return Psr_ManErrorSet(
p,
"Cannot find \"endmodule\" keyword.", 4);
717 Vec_IntPush( &
p->vKnown, iToken );
720 Psr_ManInitializeNtk(
p, iToken, 1 );
722 if ( Psr_ManUtilSkipSpaces(
p) )
return 4;
723 if ( !Psr_ManIsChar(
p,
'(') )
return Psr_ManErrorSet(
p,
"Cannot find \"(\" in the argument declaration.", 4);
724 if ( !Psr_ManReadArguments(
p) )
return 4;
727 if ( Psr_ManUtilSkipSpaces(
p) )
return 4;
729 while ( Psr_ManIsChar(
p,
';') )
732 if ( Psr_ManUtilSkipSpaces(
p) )
return 4;
733 iToken = Psr_ManReadName(
p );
736 Vec_IntPush( &
p->vSucceeded,
p->pNtk->iModuleName );
737 Psr_ManFinalizeNtk(
p );
741 Status = Psr_ManReadDeclaration(
p, iToken );
743 Status = Psr_ManUtilSkipUntil(
p,
';' );
747 Status = Psr_ManReadAssign(
p );
749 Status = Psr_ManReadInstance(
p, iToken );
752 if ( Psr_ManUtilSkipUntilWord(
p,
"endmodule" ) )
return Psr_ManErrorSet(
p,
"Cannot find \"endmodule\" keyword.", 4);
755 Vec_IntPush( &
p->vFailed,
p->pNtk->iModuleName );
757 Vec_IntErase( &
p->pNtk->vWires );
758 Vec_IntErase( &
p->pNtk->vWiresR );
759 Vec_IntErase( &
p->pNtk->vSlices );
760 Vec_IntErase( &
p->pNtk->vConcats );
761 Vec_IntErase( &
p->pNtk->vBoxes );
762 Vec_IntErase( &
p->pNtk->vObjs );
765 Psr_ManFinalizeNtk(
p );
766 Psr_ManErrorClear(
p );
770 if ( !Status )
return 4;
771 if ( Psr_ManUtilSkipSpaces(
p) )
return 4;
773 return Psr_ManErrorSet(
p,
"Cannot find \";\" in the module definition.", 4);
775static inline int Psr_ManReadDesign(
Psr_Man_t *
p )
779 int RetValue = Psr_ManReadModule(
p );
809 printf(
"Succeeded parsing %d models:\n", Vec_IntSize(&
p->vSucceeded) );
811 printf(
" %s", pName );
813 printf(
"Skipped %d known models:\n", Vec_IntSize(&
p->vKnown) );
815 printf(
" %s", pName );
817 printf(
"Skipped %d failed models:\n", Vec_IntSize(&
p->vFailed) );
819 printf(
" %s", pName );
840 Psr_NtkAddVerilogDirectives(
p );
841 Psr_ManReadDesign(
p );
843 if ( Psr_ManErrorPrint(
p) )
857 printf(
"Finished reading %d networks. ", Vec_PtrSize(vPrs) );
859 printf(
"Memory = %.2f MB. ", 1.0*Psr_ManMemory(vPrs)/(1<<20) );
860 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
865 Psr_ManVecFree( vPrs );
#define ABC_SWAP(Type, a, b)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define Psr_ManForEachNameVec(vVec, p, pName, i)
struct Psr_Man_t_ Psr_Man_t
void Psr_ManReadVerilogTest(char *pFileName)
void Psr_ManPrintModules(Psr_Man_t *p)
Vec_Ptr_t * Psr_ManReadVerilog(char *pFileName)
int Psr_ManReadSignalList(Psr_Man_t *p, Vec_Int_t *vTemp, char LastSymb, int fAddForm)
Bac_VerType_t
DECLARATIONS ///.
void Psr_ManWriteVerilog(char *pFileName, Vec_Ptr_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Abc_NamStrFindOrAddLim(Abc_Nam_t *p, char *pStr, char *pLim, int *pfFound)
int Abc_NamStrFindOrAdd(Abc_Nam_t *p, char *pStr, int *pfFound)
int Abc_NamObjNumMax(Abc_Nam_t *p)
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.