diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-02-07 22:05:02 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-02-07 22:05:02 -0800 |
commit | 55c5c1b58f3f9cd1b534ad11dbec6ba7a7813194 (patch) | |
tree | 4e9293e7b646d0065413939e622f583d023c4c3f /src/base/wlc/wlcReadVer.c | |
parent | d7099e7adc60190dfef9761130bde0eaf352b48d (diff) | |
download | abc-55c5c1b58f3f9cd1b534ad11dbec6ba7a7813194.tar.gz abc-55c5c1b58f3f9cd1b534ad11dbec6ba7a7813194.tar.bz2 abc-55c5c1b58f3f9cd1b534ad11dbec6ba7a7813194.zip |
Added SMT parser for Wlc_Ntk_t.
Diffstat (limited to 'src/base/wlc/wlcReadVer.c')
-rw-r--r-- | src/base/wlc/wlcReadVer.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c index 8ed33909..11d14395 100644 --- a/src/base/wlc/wlcReadVer.c +++ b/src/base/wlc/wlcReadVer.c @@ -547,7 +547,7 @@ static inline char * Wlc_PrsReadConstant( Wlc_Prs_t * p, char * pStr, Vec_Int_t Vec_IntFill( vFanins, Abc_BitWordNum(nBits), 0 ); for ( i = 0; i < nBits; i++ ) if ( pStr[2+i] == '1' ) - Abc_InfoSetBit( (unsigned *)Vec_IntArray(vFanins), i ); + Abc_InfoSetBit( (unsigned *)Vec_IntArray(vFanins), nBits-1-i ); else if ( pStr[2+i] != '0' ) return (char *)(ABC_PTRINT_T)Wlc_PrsWriteErrorMessage( p, pStr, "Wrong digit in binary constant \"%c\".", pStr[2+i] ); *pRange = nBits; @@ -922,19 +922,22 @@ startword: Vec_Int_t * vTemp = Vec_IntStartNatural( Wlc_NtkObjNumMax(p->pNtk) ); Vec_IntAppend( &p->pNtk->vNameIds, vTemp ); Vec_IntFree( vTemp ); - // move FO/FI to be part of CI/CO - assert( (Vec_IntSize(&p->pNtk->vFfs) & 1) == 0 ); - assert( Vec_IntSize(&p->pNtk->vFfs) == 2 * Vec_IntSize(p->pNtk->vInits) ); - Wlc_NtkForEachFf( p->pNtk, pObj, i ) - if ( i & 1 ) - Wlc_ObjSetCo( p->pNtk, pObj, 1 ); - else - Wlc_ObjSetCi( p->pNtk, pObj ); - Vec_IntClear( &p->pNtk->vFfs ); - // convert init values into binary string - //Vec_IntPrint( &p->pNtk->vInits ); - p->pNtk->pInits = Wlc_PrsConvertInitValues( p->pNtk ); - //printf( "%s", p->pNtk->pInits ); + if ( p->pNtk->vInits ) + { + // move FO/FI to be part of CI/CO + assert( (Vec_IntSize(&p->pNtk->vFfs) & 1) == 0 ); + assert( Vec_IntSize(&p->pNtk->vFfs) == 2 * Vec_IntSize(p->pNtk->vInits) ); + Wlc_NtkForEachFf( p->pNtk, pObj, i ) + if ( i & 1 ) + Wlc_ObjSetCo( p->pNtk, pObj, 1 ); + else + Wlc_ObjSetCi( p->pNtk, pObj ); + Vec_IntClear( &p->pNtk->vFfs ); + // convert init values into binary string + //Vec_IntPrint( &p->pNtk->vInits ); + p->pNtk->pInits = Wlc_PrsConvertInitValues( p->pNtk ); + //printf( "%s", p->pNtk->pInits ); + } break; } // these are read as part of the interface |