Commit d9e68f60 by Alan Mishchenko

Bug fix in supporting signed multiplication in NDR.

parent eb027885
...@@ -402,6 +402,13 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData ) ...@@ -402,6 +402,13 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
ABC_SWAP( int, Vec_IntEntryP(vFanins, 1)[0], Vec_IntEntryP(vFanins, 2)[0] ); ABC_SWAP( int, Vec_IntEntryP(vFanins, 1)[0], Vec_IntEntryP(vFanins, 2)[0] );
Wlc_ObjAddFanins( pNtk, Wlc_NtkObj(pNtk, iObj), vFanins ); Wlc_ObjAddFanins( pNtk, Wlc_NtkObj(pNtk, iObj), vFanins );
Wlc_ObjSetNameId( pNtk, iObj, NameId ); Wlc_ObjSetNameId( pNtk, iObj, NameId );
if ( Type == ABC_OPER_ARI_SMUL )
{
pObj = Wlc_NtkObj(pNtk, iObj);
assert( Wlc_ObjFaninNum(pObj) == 2 );
Wlc_ObjFanin0(pNtk, pObj)->Signed = 1;
Wlc_ObjFanin1(pNtk, pObj)->Signed = 1;
}
} }
// mark primary outputs // mark primary outputs
Ndr_ModForEachPo( p, Mod, Obj ) Ndr_ModForEachPo( p, Mod, Obj )
...@@ -424,12 +431,6 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData ) ...@@ -424,12 +431,6 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
int * pFanins = Wlc_ObjFanins(pObj); int * pFanins = Wlc_ObjFanins(pObj);
for ( k = 0; k < Wlc_ObjFaninNum(pObj); k++ ) for ( k = 0; k < Wlc_ObjFaninNum(pObj); k++ )
pFanins[k] = Vec_IntEntry(vName2Obj, pFanins[k]); pFanins[k] = Vec_IntEntry(vName2Obj, pFanins[k]);
if ( Wlc_ObjType(pObj) == WLC_OBJ_ARI_MULTI )
{
assert( Wlc_ObjFaninNum(pObj) == 2 );
Wlc_ObjFanin0(pNtk, pObj)->Signed = 1;
Wlc_ObjFanin1(pNtk, pObj)->Signed = 1;
}
} }
if ( pNtk->vInits ) if ( pNtk->vInits )
{ {
......
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