Merge pull request #145 from QuantamHD/fix_internal_pins

Fixes internal pin parsing error in ASAP7 liberty file.
This commit is contained in:
alanminko 2022-04-04 12:55:49 -07:00 committed by GitHub
commit 547de09670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -955,6 +955,8 @@ int Scl_LibertyReadPinDirection( Scl_Tree_t * p, Scl_Item_t * pPin )
return 0;
if ( !strcmp(pToken, "output") )
return 1;
if ( !strcmp(pToken, "internal") )
return 2;
break;
}
return -1;
@ -1525,7 +1527,7 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
float CapOne, CapRise, CapFall;
if ( Scl_LibertyReadPinFormula(p, pPin) != NULL ) // skip output pin
continue;
assert( Scl_LibertyReadPinDirection(p, pPin) == 0 );
assert( Scl_LibertyReadPinDirection(p, pPin) == 0 || Scl_LibertyReadPinDirection(p, pPin) == 2);
pName = Scl_LibertyReadString(p, pPin->Head);
Vec_PtrPush( vNameIns, Abc_UtilStrsav(pName) );
Vec_StrPutS_( vOut, pName );
@ -1546,6 +1548,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
{
if ( !Scl_LibertyReadPinFormula(p, pPin) ) // skip input pin
continue;
if (Scl_LibertyReadPinDirection(p, pPin) == 2) // skip internal pin
continue;
assert( Scl_LibertyReadPinDirection(p, pPin) == 1 );
pName = Scl_LibertyReadString(p, pPin->Head);
Vec_StrPutS_( vOut, pName );