mirror of https://github.com/YosysHQ/abc.git
Extending &sim_read to use non-64-divisible pattern counts.
This commit is contained in:
parent
5c8ee4a2c1
commit
b74b7dfc2d
|
|
@ -1300,10 +1300,20 @@ static inline Vec_Wrd_t * Vec_WrdReadHex( char * pFileName, int * pnWords, int f
|
||||||
p = Vec_WrdAlloc( 1000 );
|
p = Vec_WrdAlloc( 1000 );
|
||||||
while ( (c = fgetc(pFile)) != EOF )
|
while ( (c = fgetc(pFile)) != EOF )
|
||||||
{
|
{
|
||||||
if ( c == '\n' && nWords == -1 )
|
if ( c == '\r' || c == '\t' || c == ' ' )
|
||||||
nWords = Vec_WrdSize(p);
|
|
||||||
if ( c == '\n' || c == '\r' || c == '\t' || c == ' ' )
|
|
||||||
continue;
|
continue;
|
||||||
|
if ( c == '\n' )
|
||||||
|
{
|
||||||
|
if ( nChars > 0 )
|
||||||
|
{
|
||||||
|
Vec_WrdPush( p, Num );
|
||||||
|
nChars = 0;
|
||||||
|
Num = 0;
|
||||||
|
}
|
||||||
|
if ( nWords == -1 && Vec_WrdSize(p) > 0 )
|
||||||
|
nWords = Vec_WrdSize(p);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Num |= (word)Vec_WrdReadHexOne((char)c) << (nChars * 4);
|
Num |= (word)Vec_WrdReadHexOne((char)c) << (nChars * 4);
|
||||||
if ( ++nChars < 16 )
|
if ( ++nChars < 16 )
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue