summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-09-17 15:20:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-09-17 15:20:04 -0700
commit69827a5a8848ada3ef70bcf25f4f523aed97bded (patch)
treeb8d329461b4fa68651fdba155ebdb089eaee228f /src
parentffd77ffedda47d5ec5541c6a51bb9e80540fd3f7 (diff)
downloadabc-69827a5a8848ada3ef70bcf25f4f523aed97bded.tar.gz
abc-69827a5a8848ada3ef70bcf25f4f523aed97bded.tar.bz2
abc-69827a5a8848ada3ef70bcf25f4f523aed97bded.zip
Improvements to word-level Verilog parser.
Diffstat (limited to 'src')
-rw-r--r--src/base/wlc/wlcReadVer.c5
-rw-r--r--src/base/wlc/wlcWriteVer.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c
index 9ee81844..34197e1b 100644
--- a/src/base/wlc/wlcReadVer.c
+++ b/src/base/wlc/wlcReadVer.c
@@ -705,8 +705,9 @@ int Wlc_PrsDerive( Wlc_Prs_t * p )
if ( Wlc_PrsStrCmp( pName, "table" ) )
{
// THIS IS A HACK TO DETECT tables
- int Width1, Width2;
- int v, b, Value, nBits, nInts, * pTable;
+ int Width1 = -1, Width2 = -1;
+ int v, b, Value, nBits, nInts;
+ unsigned * pTable;
Vec_Int_t * vValues = Vec_IntAlloc( 256 );
Wlc_PrsForEachLineStart( p, pStart, i, i+1 )
{
diff --git a/src/base/wlc/wlcWriteVer.c b/src/base/wlc/wlcWriteVer.c
index 6899d462..262d5e52 100644
--- a/src/base/wlc/wlcWriteVer.c
+++ b/src/base/wlc/wlcWriteVer.c
@@ -55,7 +55,7 @@ void Wlc_WriteTableOne( FILE * pFile, int nFans, int nOuts, word * pTable, int I
fprintf( pFile, " begin\n" );
fprintf( pFile, " case (ind)\n" );
for ( m = 0; m < nMints; m++ )
- fprintf( pFile, " %d\'h%x: val = %d\'h%x;\n", nFans, m, nOuts, (pTable[(nOuts * m) >> 6] >> ((nOuts * m) & 63)) & Abc_Tt6Mask(nOuts) );
+ fprintf( pFile, " %d\'h%x: val = %d\'h%x;\n", nFans, m, nOuts, (unsigned)((pTable[(nOuts * m) >> 6] >> ((nOuts * m) & 63)) & Abc_Tt6Mask(nOuts)) );
fprintf( pFile, " endcase\n" );
fprintf( pFile, " end\n" );
fprintf( pFile, "endmodule\n" );