From f2316ab7c818c5d5519a12d34b17b4845521d3f2 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 23 Jan 2020 14:40:42 -0800 Subject: Gia_ManDupPermFlop to behave as Gia_ManDupPerm Fixes sequential synthesis (e.g. &scl) for multiple domains --- src/aig/gia/giaDup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c index a1aaadf3..4f448c40 100644 --- a/src/aig/gia/giaDup.c +++ b/src/aig/gia/giaDup.c @@ -855,12 +855,12 @@ Gia_Man_t * Gia_ManDupPerm( Gia_Man_t * p, Vec_Int_t * vPiPerm ) } Gia_Man_t * Gia_ManDupPermFlop( Gia_Man_t * p, Vec_Int_t * vFfPerm ) { - Vec_Int_t * vPermInv; + //Vec_Int_t * vPermInv; Gia_Man_t * pNew; Gia_Obj_t * pObj; int i; assert( Vec_IntSize(vFfPerm) == Gia_ManRegNum(p) ); - vPermInv = Vec_IntInvert( vFfPerm, -1 ); + //vPermInv = Vec_IntInvert( vFfPerm, -1 ); pNew = Gia_ManStart( Gia_ManObjNum(p) ); pNew->pName = Abc_UtilStrsav( p->pName ); pNew->pSpec = Abc_UtilStrsav( p->pSpec ); @@ -868,14 +868,16 @@ Gia_Man_t * Gia_ManDupPermFlop( Gia_Man_t * p, Vec_Int_t * vFfPerm ) Gia_ManForEachPi( p, pObj, i ) pObj->Value = Gia_ManAppendCi(pNew); Gia_ManForEachRo( p, pObj, i ) - Gia_ManRo(p, Vec_IntEntry(vPermInv, i))->Value = Gia_ManAppendCi(pNew); + //Gia_ManRo(p, Vec_IntEntry(vPermInv, i))->Value = Gia_ManAppendCi(pNew); + Gia_ManRo(p, Vec_IntEntry(vFfPerm, i))->Value = Gia_ManAppendCi( pNew ); Gia_ManForEachAnd( p, pObj, i ) pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); Gia_ManForEachPo( p, pObj, i ) pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) ); Gia_ManForEachRi( p, pObj, i ) - pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy( Gia_ManRi(p, Vec_IntEntry(vPermInv, i)) ) ); - Vec_IntFree( vPermInv ); + //pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy( Gia_ManRi(p, Vec_IntEntry(vPermInv, i)) ) ); + pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy( Gia_ManRi(p, Vec_IntEntry(vFfPerm, i)) ) ); + //Vec_IntFree( vPermInv ); Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); return pNew; } -- cgit v1.2.3 From 8afd927d609faf44fcf70e7870bbc201cffde0fd Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 11 Nov 2019 08:25:56 +0000 Subject: Make use of setrlimit conditional on ABC_NO_RLIMIT. This is useful for POSIX-like platforms that do not have rlimit, such as WASI. --- src/base/main/mainReal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/main/mainReal.c b/src/base/main/mainReal.c index be099be4..922e0521 100644 --- a/src/base/main/mainReal.c +++ b/src/base/main/mainReal.c @@ -132,7 +132,7 @@ int Abc_RealMain( int argc, char * argv[] ) break; case 'm': { -#ifndef WIN32 +#if !defined(WIN32) && !defined(ABC_NO_RLIMIT) int maxMb = atoi(globalUtilOptarg); printf("Limiting memory use to %d MB\n", maxMb); struct rlimit limit = { @@ -144,7 +144,7 @@ int Abc_RealMain( int argc, char * argv[] ) break; } case 'l': { -#ifndef WIN32 +#if !defined(WIN32) && !defined(ABC_NO_RLIMIT) rlim_t maxTime = atoi(globalUtilOptarg); printf("Limiting time to %d seconds\n", (int)maxTime); struct rlimit limit = { -- cgit v1.2.3