diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-04-03 13:01:49 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-04-03 13:01:49 -0700 |
commit | f1cd8797861e5a47d1f7cc9de0616bbc2d532f43 (patch) | |
tree | 448ef4441484a5d77ea8d3bbb786793891051d34 /src/opt | |
parent | 0a8a505638399a7c4bea481c887f2cf207b211ff (diff) | |
download | abc-f1cd8797861e5a47d1f7cc9de0616bbc2d532f43.tar.gz abc-f1cd8797861e5a47d1f7cc9de0616bbc2d532f43.tar.bz2 abc-f1cd8797861e5a47d1f7cc9de0616bbc2d532f43.zip |
New MFS package.
Diffstat (limited to 'src/opt')
-rw-r--r-- | src/opt/sfm/sfmNtk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opt/sfm/sfmNtk.c b/src/opt/sfm/sfmNtk.c index 190fff00..21252e60 100644 --- a/src/opt/sfm/sfmNtk.c +++ b/src/opt/sfm/sfmNtk.c @@ -51,7 +51,7 @@ Sfm_Ntk_t * Sfm_NtkAlloc( int nPis, int nPos, int nNodes, Vec_Int_t * vFanins, V int iFanin, iOffset = 2, iFanOffset = 0; int nEdges = Vec_IntSize(vEdges); int nObjs = nPis + nPos + nNodes; - int nSize = 2 + nObjs + nObjs * nStructSize + 2 * nEdges + AddOn * (nObjs - Vec_IntSum(vOpts)); + int nSize = 2 + nObjs * (nStructSize + 1) + 2 * nEdges + AddOn * (nPis + Vec_IntSum(vOpts)); assert( sizeof(Sfm_Obj_t) % sizeof(int) == 0 ); assert( nEdges == Vec_IntSum(vFanins) ); assert( nEdges == Vec_IntSum(vFanouts) ); @@ -91,7 +91,7 @@ Sfm_Ntk_t * Sfm_NtkAlloc( int nPis, int nPos, int nNodes, Vec_Int_t * vFanins, V } } // add node size - nObjSize = nStructSize + Vec_IntEntry(vFanins, i) + Vec_IntEntry(vFanouts, i) + AddOn * pObj->fOpt; + nObjSize = nStructSize + Vec_IntEntry(vFanins, i) + Vec_IntEntry(vFanouts, i) + AddOn * (pObj->Type==1 || pObj->fOpt); nObjSize += (int)( nObjSize & 1 ); assert( (nObjSize & 1) == 0 ); iOffset += nObjSize; |