Commit d688af26 by Alan Mishchenko

Several small bug fixes.

parent 17610c03
...@@ -328,6 +328,7 @@ Gia_Man_t * Gia_ManFxInsert( Gia_Man_t * p, Vec_Wec_t * vCubes, Vec_Str_t * vCom ...@@ -328,6 +328,7 @@ Gia_Man_t * Gia_ManFxInsert( Gia_Man_t * p, Vec_Wec_t * vCubes, Vec_Str_t * vCom
pNew = Gia_ManStart( Gia_ManObjNum(p) ); pNew = Gia_ManStart( Gia_ManObjNum(p) );
pNew->pName = Abc_UtilStrsav( p->pName ); pNew->pName = Abc_UtilStrsav( p->pName );
pNew->pSpec = Abc_UtilStrsav( p->pSpec ); pNew->pSpec = Abc_UtilStrsav( p->pSpec );
pNew->vLevels = Vec_IntStart( 6*Gia_ManObjNum(p)/5 + 100 );
Gia_ManHashStart( pNew ); Gia_ManHashStart( pNew );
// create primary inputs // create primary inputs
vMap = Vec_IntStartFull( Vec_IntSize(vOrder) ); vMap = Vec_IntStartFull( Vec_IntSize(vOrder) );
......
...@@ -1589,6 +1589,7 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p ) ...@@ -1589,6 +1589,7 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p )
pNew = Gia_ManStart( Gia_ManObjNum(p->pGia) ); pNew = Gia_ManStart( Gia_ManObjNum(p->pGia) );
pNew->pName = Abc_UtilStrsav( p->pGia->pName ); pNew->pName = Abc_UtilStrsav( p->pGia->pName );
pNew->pSpec = Abc_UtilStrsav( p->pGia->pSpec ); pNew->pSpec = Abc_UtilStrsav( p->pGia->pSpec );
pNew->vLevels = Vec_IntStart( 6*Gia_ManObjNum(p->pGia)/5 + 100 );
// map primary inputs // map primary inputs
Vec_IntWriteEntry( vCopies, 0, 0 ); Vec_IntWriteEntry( vCopies, 0, 0 );
Gia_ManForEachCi( p->pGia, pObj, i ) Gia_ManForEachCi( p->pGia, pObj, i )
......
...@@ -50,7 +50,7 @@ void Cba_ManPrepareGates( Cba_Man_t * p ) ...@@ -50,7 +50,7 @@ void Cba_ManPrepareGates( Cba_Man_t * p )
if ( p->pMioLib == NULL ) if ( p->pMioLib == NULL )
return; return;
assert( p->ppGraphs == NULL ); 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; p->ppGraphs[0] = NULL;
for ( i = 1; i < Abc_NamObjNumMax(p->pFuncs); i++ ) for ( i = 1; i < Abc_NamObjNumMax(p->pFuncs); i++ )
{ {
......
...@@ -167,13 +167,19 @@ void Cba_ManWriteBlifLines( FILE * pFile, Cba_Ntk_t * p ) ...@@ -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 ( 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) ); 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 ); Mio_Gate_t * pGate = Mio_LibraryReadGateByName( (Mio_Library_t *)p->pDesign->pMioLib, pGateName, NULL );
fprintf( pFile, ".gate" ); fprintf( pFile, ".gate" );
Cba_ManWriteBlifGate( pFile, p, pGate, Cba_ObjFaninVec(p, i), i ); 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 else
{ {
fprintf( pFile, ".names" ); fprintf( pFile, ".names" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment