diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-01-17 20:48:42 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-01-17 20:48:42 -0800 |
commit | d688af2601d5a7d4cb23ced5e25eeec0f046f40e (patch) | |
tree | d4a205fa0e2030c16e55d95d12ac173b348f1d95 /src/base | |
parent | 17610c039f79e30679b7950e7d91de166b34d2fa (diff) | |
download | abc-d688af2601d5a7d4cb23ced5e25eeec0f046f40e.tar.gz abc-d688af2601d5a7d4cb23ced5e25eeec0f046f40e.tar.bz2 abc-d688af2601d5a7d4cb23ced5e25eeec0f046f40e.zip |
Several small bug fixes.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/cba/cbaBlast.c | 2 | ||||
-rw-r--r-- | src/base/cba/cbaWriteBlif.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/base/cba/cbaBlast.c b/src/base/cba/cbaBlast.c index 45ced7d2..b0988632 100644 --- a/src/base/cba/cbaBlast.c +++ b/src/base/cba/cbaBlast.c @@ -50,7 +50,7 @@ void Cba_ManPrepareGates( Cba_Man_t * p ) if ( p->pMioLib == NULL ) return; assert( p->ppGraphs == NULL ); - p->ppGraphs = ABC_ALLOC( Dec_Graph_t *, Abc_NamObjNumMax(p->pFuncs) ); + p->ppGraphs = (Dec_Graph_t **)ABC_ALLOC( Dec_Graph_t *, Abc_NamObjNumMax(p->pFuncs) ); p->ppGraphs[0] = NULL; for ( i = 1; i < Abc_NamObjNumMax(p->pFuncs); i++ ) { diff --git a/src/base/cba/cbaWriteBlif.c b/src/base/cba/cbaWriteBlif.c index 7e227d2d..4a59b69d 100644 --- a/src/base/cba/cbaWriteBlif.c +++ b/src/base/cba/cbaWriteBlif.c @@ -167,13 +167,19 @@ void Cba_ManWriteBlifLines( FILE * pFile, Cba_Ntk_t * p ) { if ( Type == CBA_OBJ_NODE ) // .names/assign/box2 (no formal/actual binding) { - if ( Abc_NamObjNumMax(p->pDesign->pFuncs) > 1 ) // mapped + if ( p->pDesign->pMioLib ) // mapped { char * pGateName = Abc_NamStr( p->pDesign->pFuncs, Cba_ObjFuncId(p, i) ); Mio_Gate_t * pGate = Mio_LibraryReadGateByName( (Mio_Library_t *)p->pDesign->pMioLib, pGateName, NULL ); fprintf( pFile, ".gate" ); Cba_ManWriteBlifGate( pFile, p, pGate, Cba_ObjFaninVec(p, i), i ); } + else if ( Abc_NamObjNumMax(p->pDesign->pFuncs) > 1 ) // SOP functions + { + fprintf( pFile, ".names" ); + Cba_ManWriteBlifArray( pFile, p, Cba_ObjFaninVec(p, i), i ); + fprintf( pFile, "%s", Cba_ObjFuncStr(p, i) ); + } else { fprintf( pFile, ".names" ); |