Commit 723f85ef by Alan Mishchenko

Extending Liberty parser to handle multi-output cells.

parent 5dc50744
...@@ -2372,7 +2372,7 @@ void Ver_ParseReportUndefBoxes( Ver_Man_t * pMan ) ...@@ -2372,7 +2372,7 @@ void Ver_ParseReportUndefBoxes( Ver_Man_t * pMan )
if ( pBox->pData && !Ver_NtkIsDefined((Abc_Ntk_t *)pBox->pData) ) if ( pBox->pData && !Ver_NtkIsDefined((Abc_Ntk_t *)pBox->pData) )
((Abc_Ntk_t *)pBox->pData)->fHiePath++; ((Abc_Ntk_t *)pBox->pData)->fHiePath++;
// print the stats // print the stats
printf( "Warning: The design contains %d undefined objects interpreted as blackboxes:\n", nBoxes ); printf( "Warning: The design contains %d undefined object types interpreted as blackboxes:\n", nBoxes );
Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i ) Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
if ( !Ver_NtkIsDefined(pNtk) ) if ( !Ver_NtkIsDefined(pNtk) )
printf( "%s (%d) ", Abc_NtkName(pNtk), pNtk->fHiePath ); printf( "%s (%d) ", Abc_NtkName(pNtk), pNtk->fHiePath );
......
...@@ -454,7 +454,7 @@ int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName, int fVerbose ) ...@@ -454,7 +454,7 @@ int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName, int fVerbose )
fprintf( pFile, "%s=", Amap_LibertyGetString(p, pOutput->Head) ); fprintf( pFile, "%s=", Amap_LibertyGetString(p, pOutput->Head) );
fprintf( pFile, "%s;\n", Amap_LibertyGetStringFormula(p, pFunc->Head) ); fprintf( pFile, "%s;\n", Amap_LibertyGetStringFormula(p, pFunc->Head) );
Amap_ItemForEachChild( p, pCell, pPin ) Amap_ItemForEachChild( p, pCell, pPin )
if ( pPin != pOutput && !Amap_LibertyCompare(p, pPin->Key, "pin") ) if ( Vec_PtrFind(vOutputs, pPin) == -1 && !Amap_LibertyCompare(p, pPin->Key, "pin") )
fprintf( pFile, " PIN %13s UNKNOWN 1 999 1.00 0.00 1.00 0.00\n", Amap_LibertyGetString(p, pPin->Head) ); fprintf( pFile, " PIN %13s UNKNOWN 1 999 1.00 0.00 1.00 0.00\n", Amap_LibertyGetString(p, pPin->Head) );
} }
Vec_PtrFree( vOutputs ); Vec_PtrFree( vOutputs );
......
...@@ -410,7 +410,7 @@ int Mio_ParseCheckFormula( Mio_Gate_t * pGate, char * pForm ) ...@@ -410,7 +410,7 @@ int Mio_ParseCheckFormula( Mio_Gate_t * pGate, char * pForm )
Mio_Pin_t * pPin; Mio_Pin_t * pPin;
char * pStr; char * pStr;
int i, iPin, fVisit[32] = {0}; int i, iPin, fVisit[32] = {0};
if ( Mio_GateReadPins(pGate) == NULL ) if ( Mio_GateReadPins(pGate) == NULL || !strcmp(Mio_PinReadName(Mio_GateReadPins(pGate)), "*") )
return 1; return 1;
/* /*
// find the equality sign // find the equality sign
...@@ -421,9 +421,9 @@ int Mio_ParseCheckFormula( Mio_Gate_t * pGate, char * pForm ) ...@@ -421,9 +421,9 @@ int Mio_ParseCheckFormula( Mio_Gate_t * pGate, char * pForm )
return 0; return 0;
} }
*/ */
printf( "Checking gate %s\n", pGate->pName ); //printf( "Checking gate %s\n", pGate->pName );
for ( pStr = pForm + 1; *pStr; pStr++ ) for ( pStr = pForm; *pStr; pStr++ )
{ {
if ( *pStr == ' ' || if ( *pStr == ' ' ||
*pStr == MIO_EQN_SYM_OPEN || *pStr == MIO_EQN_SYM_OPEN ||
...@@ -443,7 +443,7 @@ printf( "Checking gate %s\n", pGate->pName ); ...@@ -443,7 +443,7 @@ printf( "Checking gate %s\n", pGate->pName );
iPin = Mio_ParseCheckName( pGate, &pStr ); iPin = Mio_ParseCheckName( pGate, &pStr );
if ( iPin == -1 ) if ( iPin == -1 )
{ {
printf( "Skipping gate \"%s\" because substring \"%s\" does not match with a pin name.\n", pGate->pName, *pStr ); printf( "Skipping gate \"%s\" because substring \"%s\" does not match with a pin name.\n", pGate->pName, pStr );
return 0; return 0;
} }
assert( iPin < 32 ); assert( iPin < 32 );
......
...@@ -209,14 +209,14 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended ...@@ -209,14 +209,14 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended
pGate = Mio_LibraryReadGate( &pToken, fExtendedFormat ); pGate = Mio_LibraryReadGate( &pToken, fExtendedFormat );
if ( pGate == NULL ) if ( pGate == NULL )
return 1; return 1;
/*
// skip the gate if its formula has problems // skip the gate if its formula has problems
if ( !Mio_ParseCheckFormula(pGate, pGate->pForm) ) if ( !Mio_ParseCheckFormula(pGate, pGate->pForm) )
{ {
Mio_GateDelete( pGate ); Mio_GateDelete( pGate );
continue; continue;
} }
*/
// set the library // set the library
pGate->pLib = pLib; pGate->pLib = pLib;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment