summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-07-29 22:24:54 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-07-29 22:24:54 -0700
commit8e54792cd048f1884ecf335f79f2016408bbb2e4 (patch)
tree5a52550d9c5f84af14fe702e6811a64289b4fa02 /src
parentf09a7042502b97a64d3c6659104e715452ee03e7 (diff)
downloadabc-8e54792cd048f1884ecf335f79f2016408bbb2e4.tar.gz
abc-8e54792cd048f1884ecf335f79f2016408bbb2e4.tar.bz2
abc-8e54792cd048f1884ecf335f79f2016408bbb2e4.zip
Added commands 'maxsize' and 'unbuffer'.
Diffstat (limited to 'src')
-rw-r--r--src/map/scl/sclBuffer.c11
1 files changed, 8 insertions, 3 deletions
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) );