From 8e54792cd048f1884ecf335f79f2016408bbb2e4 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 29 Jul 2013 22:24:54 -0700 Subject: Added commands 'maxsize' and 'unbuffer'. --- src/map/scl/sclBuffer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/scl/sclBuffer.c b/src/map/scl/sclBuffer.c index 6511a656..a13a7cf6 100644 --- a/src/map/scl/sclBuffer.c +++ b/src/map/scl/sclBuffer.c @@ -90,13 +90,18 @@ static inline int Abc_SclObjIsBufInv( Abc_Obj_t * pObj ) { return Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) == 1; } +static inline int Abc_SclIsInv( Abc_Obj_t * pObj ) +{ + assert( Abc_ObjIsNode(pObj) ); + return Mio_GateReadTruth((Mio_Gate_t *)pObj->pData) == ABC_CONST(0x5555555555555555); +} int Abc_SclGetRealFaninLit( Abc_Obj_t * pObj ) { int iLit; if ( !Abc_SclObjIsBufInv(pObj) ) return Abc_Var2Lit( Abc_ObjId(pObj), 0 ); iLit = Abc_SclGetRealFaninLit( Abc_ObjFanin0(pObj) ); - return Abc_LitNotCond( iLit, Abc_NodeIsInv(pObj) ); + return Abc_LitNotCond( iLit, Abc_SclIsInv(pObj) ); } Abc_Ntk_t * Abc_SclUnBufferPerform( Abc_Ntk_t * pNtk, int fVerbose ) { @@ -106,7 +111,7 @@ Abc_Ntk_t * Abc_SclUnBufferPerform( Abc_Ntk_t * pNtk, int fVerbose ) // assign inverters vLits = Vec_IntStartFull( Abc_NtkObjNumMax(pNtk) ); Abc_NtkForEachNode( pNtk, pObj, i ) - if ( Abc_NodeIsInv(pObj) && !Abc_SclObjIsBufInv(Abc_ObjFanin0(pObj)) ) + if ( Abc_SclIsInv(pObj) && !Abc_SclObjIsBufInv(Abc_ObjFanin0(pObj)) ) Vec_IntWriteEntry( vLits, Abc_ObjFaninId0(pObj), Abc_ObjId(pObj) ); // transfer fanins Abc_NtkForEachNodeCo( pNtk, pObj, i ) @@ -680,7 +685,7 @@ void Abc_BufPerformOne( Buf_Man_t * p, int iPivot, int fVerbose ) { Abc_Obj_t * pObj, * pFanout; int i, j, nCrit, nNonCrit; - int DelayMax = p->DelayMax; +// int DelayMax = p->DelayMax; assert( Abc_NtkObjNumMax(p->pNtk) + 30 < p->nObjAlloc ); pObj = Abc_NtkObj( p->pNtk, iPivot ); // assert( Vec_FltEntry(p->vCounts, iPivot) == (float)Abc_ObjFanoutNum(pObj) ); -- cgit v1.2.3