summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-05-18 09:54:06 +0900
committerAlan Mishchenko <alanmi@berkeley.edu>2018-05-18 09:54:06 +0900
commitd9e68f60c84e187cb3759a931e416b9f791269fe (patch)
tree2228b014d346e52b849907fc4b9a74f10360da22 /src
parenteb027885eeaaf9969b4dbeff5f31d5bbcec98529 (diff)
downloadabc-d9e68f60c84e187cb3759a931e416b9f791269fe.tar.gz
abc-d9e68f60c84e187cb3759a931e416b9f791269fe.tar.bz2
abc-d9e68f60c84e187cb3759a931e416b9f791269fe.zip
Bug fix in supporting signed multiplication in NDR.
Diffstat (limited to 'src')
-rw-r--r--src/base/wlc/wlcNdr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/base/wlc/wlcNdr.c b/src/base/wlc/wlcNdr.c
index 0822cbb5..8e89ae2c 100644
--- a/src/base/wlc/wlcNdr.c
+++ b/src/base/wlc/wlcNdr.c
@@ -402,6 +402,13 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
ABC_SWAP( int, Vec_IntEntryP(vFanins, 1)[0], Vec_IntEntryP(vFanins, 2)[0] );
Wlc_ObjAddFanins( pNtk, Wlc_NtkObj(pNtk, iObj), vFanins );
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
Ndr_ModForEachPo( p, Mod, Obj )
@@ -424,12 +431,6 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
int * pFanins = Wlc_ObjFanins(pObj);
for ( k = 0; k < Wlc_ObjFaninNum(pObj); 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 )
{