mirror of https://github.com/YosysHQ/abc.git
Convert buffers to .short lines in BLIF.
This commit is contained in:
parent
490bb92a8c
commit
c85f007f75
|
|
@ -696,6 +696,35 @@ static char * Io_MvLoadFile( char * pFileName )
|
|||
return pContents;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
void Io_MvReplaceBuffersByShorts( char * p )
|
||||
{
|
||||
if ( !strstr(p, ".gate") )
|
||||
return;
|
||||
char * q, * pNext, * pShort = (char *)".short"; int i;
|
||||
for ( q = p; *q && (pNext = strstr(q, ".names")); q = pNext ) {
|
||||
for ( i = 0; i < 6; i++ )
|
||||
pNext[i] = pShort[i];
|
||||
while ( *pNext && *pNext++ != '\n' );
|
||||
if ( *pNext == 0 )
|
||||
return;
|
||||
while ( *pNext && *pNext != '\n' )
|
||||
*pNext++ = ' ';
|
||||
if ( *pNext == 0 )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Prepares the parsing.]
|
||||
|
|
@ -717,6 +746,8 @@ static void Io_MvReadPreparse( Io_MvMan_t * p )
|
|||
{
|
||||
char * pCur, * pPrev;
|
||||
int i, fComment = 0;
|
||||
Io_MvReplaceBuffersByShorts( p->pBuffer );
|
||||
|
||||
// parse the buffer into lines and remove comments
|
||||
Vec_PtrPush( p->vLines, p->pBuffer );
|
||||
for ( pCur = p->pBuffer; *pCur; pCur++ )
|
||||
|
|
|
|||
Loading…
Reference in New Issue