Commit 12c8a54c by Alan Mishchenko

Adding barrier buffers.

parent 89eed1aa
...@@ -271,8 +271,6 @@ Abc_Ntk_t * Abc_NtkFromBarBufsInt( Abc_Ntk_t * pNtkBase, Abc_Ntk_t * pNtk, int f ...@@ -271,8 +271,6 @@ Abc_Ntk_t * Abc_NtkFromBarBufsInt( Abc_Ntk_t * pNtkBase, Abc_Ntk_t * pNtk, int f
Abc_ObjFanout0(Abc_ObjFanout0(pLatch))->pCopy = pNet->pCopy; Abc_ObjFanout0(Abc_ObjFanout0(pLatch))->pCopy = pNet->pCopy;
} }
} }
Abc_NtkForEachLatch( pNtk, pObj, i )
assert( Abc_ObjFanout0(Abc_ObjFanout0(pLatch))->pCopy != NULL );
// build PO cones // build PO cones
if ( fRoot ) if ( fRoot )
{ {
......
...@@ -113,6 +113,7 @@ Abc_Ntk_t * Abc_NtkStartFrom( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, Abc_NtkFunc_ ...@@ -113,6 +113,7 @@ Abc_Ntk_t * Abc_NtkStartFrom( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, Abc_NtkFunc_
// start the network // start the network
pNtkNew = Abc_NtkAlloc( Type, Func, 1 ); pNtkNew = Abc_NtkAlloc( Type, Func, 1 );
pNtkNew->nConstrs = pNtk->nConstrs; pNtkNew->nConstrs = pNtk->nConstrs;
pNtkNew->nBarBufs = pNtk->nBarBufs;
// duplicate the name and the spec // duplicate the name and the spec
pNtkNew->pName = Extra_UtilStrsav(pNtk->pName); pNtkNew->pName = Extra_UtilStrsav(pNtk->pName);
pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec); pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec);
...@@ -178,6 +179,7 @@ Abc_Ntk_t * Abc_NtkStartFromWithLatches( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, A ...@@ -178,6 +179,7 @@ Abc_Ntk_t * Abc_NtkStartFromWithLatches( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, A
// start the network // start the network
pNtkNew = Abc_NtkAlloc( Type, Func, 1 ); pNtkNew = Abc_NtkAlloc( Type, Func, 1 );
pNtkNew->nConstrs = pNtk->nConstrs; pNtkNew->nConstrs = pNtk->nConstrs;
pNtkNew->nBarBufs = pNtk->nBarBufs;
// duplicate the name and the spec // duplicate the name and the spec
pNtkNew->pName = Extra_UtilStrsav(pNtk->pName); pNtkNew->pName = Extra_UtilStrsav(pNtk->pName);
pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec); pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec);
...@@ -252,6 +254,7 @@ Abc_Ntk_t * Abc_NtkStartFromNoLatches( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, Abc ...@@ -252,6 +254,7 @@ Abc_Ntk_t * Abc_NtkStartFromNoLatches( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, Abc
// start the network // start the network
pNtkNew = Abc_NtkAlloc( Type, Func, 1 ); pNtkNew = Abc_NtkAlloc( Type, Func, 1 );
pNtkNew->nConstrs = pNtk->nConstrs; pNtkNew->nConstrs = pNtk->nConstrs;
pNtkNew->nBarBufs = pNtk->nBarBufs;
// duplicate the name and the spec // duplicate the name and the spec
pNtkNew->pName = Extra_UtilStrsav(pNtk->pName); pNtkNew->pName = Extra_UtilStrsav(pNtk->pName);
pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec); pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec);
...@@ -564,6 +567,7 @@ Abc_Ntk_t * Abc_NtkDupTransformMiter( Abc_Ntk_t * pNtk ) ...@@ -564,6 +567,7 @@ Abc_Ntk_t * Abc_NtkDupTransformMiter( Abc_Ntk_t * pNtk )
// start the network // start the network
pNtkNew = Abc_NtkAlloc( pNtk->ntkType, pNtk->ntkFunc, 1 ); pNtkNew = Abc_NtkAlloc( pNtk->ntkType, pNtk->ntkFunc, 1 );
pNtkNew->nConstrs = pNtk->nConstrs; pNtkNew->nConstrs = pNtk->nConstrs;
pNtkNew->nBarBufs = pNtk->nBarBufs;
// duplicate the name and the spec // duplicate the name and the spec
pNtkNew->pName = Extra_UtilStrsav(pNtk->pName); pNtkNew->pName = Extra_UtilStrsav(pNtk->pName);
pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec); pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec);
......
...@@ -417,6 +417,7 @@ Abc_Ntk_t * Abc_NtkFromDar( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) ...@@ -417,6 +417,7 @@ Abc_Ntk_t * Abc_NtkFromDar( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan )
// perform strashing // perform strashing
pNtkNew = Abc_NtkStartFrom( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG ); pNtkNew = Abc_NtkStartFrom( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG );
pNtkNew->nConstrs = pMan->nConstrs; pNtkNew->nConstrs = pMan->nConstrs;
pNtkNew->nBarBufs = pNtkOld->nBarBufs;
// transfer the pointers to the basic nodes // transfer the pointers to the basic nodes
Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew); Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
Aig_ManForEachCi( pMan, pObj, i ) Aig_ManForEachCi( pMan, pObj, i )
...@@ -467,6 +468,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeqSweep( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) ...@@ -467,6 +468,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeqSweep( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan )
Aig_Obj_t * pObj, * pObjLo, * pObjLi; Aig_Obj_t * pObj, * pObjLo, * pObjLi;
int i, iNodeId, nDigits; int i, iNodeId, nDigits;
assert( pMan->nAsserts == 0 ); assert( pMan->nAsserts == 0 );
assert( pNtkOld->nBarBufs == 0 );
// assert( Aig_ManRegNum(pMan) != Abc_NtkLatchNum(pNtkOld) ); // assert( Aig_ManRegNum(pMan) != Abc_NtkLatchNum(pNtkOld) );
// perform strashing // perform strashing
pNtkNew = Abc_NtkStartFromNoLatches( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG ); pNtkNew = Abc_NtkStartFromNoLatches( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG );
...@@ -811,6 +813,7 @@ Abc_Ntk_t * Abc_NtkAfterTrim( Aig_Man_t * pMan, Abc_Ntk_t * pNtkOld ) ...@@ -811,6 +813,7 @@ Abc_Ntk_t * Abc_NtkAfterTrim( Aig_Man_t * pMan, Abc_Ntk_t * pNtkOld )
Aig_Obj_t * pObj, * pObjLo, * pObjLi; Aig_Obj_t * pObj, * pObjLo, * pObjLi;
int i; int i;
assert( pMan->nAsserts == 0 ); assert( pMan->nAsserts == 0 );
assert( pNtkOld->nBarBufs == 0 );
assert( Aig_ManRegNum(pMan) <= Abc_NtkLatchNum(pNtkOld) ); assert( Aig_ManRegNum(pMan) <= Abc_NtkLatchNum(pNtkOld) );
assert( Saig_ManPiNum(pMan) <= Abc_NtkCiNum(pNtkOld) ); assert( Saig_ManPiNum(pMan) <= Abc_NtkCiNum(pNtkOld) );
assert( Saig_ManPoNum(pMan) == Abc_NtkPoNum(pNtkOld) ); assert( Saig_ManPoNum(pMan) == Abc_NtkPoNum(pNtkOld) );
...@@ -899,6 +902,7 @@ Abc_Ntk_t * Abc_NtkFromDarChoices( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) ...@@ -899,6 +902,7 @@ Abc_Ntk_t * Abc_NtkFromDarChoices( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan )
// perform strashing // perform strashing
pNtkNew = Abc_NtkStartFrom( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG ); pNtkNew = Abc_NtkStartFrom( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG );
pNtkNew->nConstrs = pMan->nConstrs; pNtkNew->nConstrs = pMan->nConstrs;
pNtkNew->nBarBufs = pNtkOld->nBarBufs;
// transfer the pointers to the basic nodes // transfer the pointers to the basic nodes
Aig_ManCleanData( pMan ); Aig_ManCleanData( pMan );
Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew); Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew);
...@@ -956,6 +960,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeq( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) ...@@ -956,6 +960,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeq( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan )
Aig_Obj_t * pObj; Aig_Obj_t * pObj;
int i; int i;
// assert( Aig_ManLatchNum(pMan) > 0 ); // assert( Aig_ManLatchNum(pMan) > 0 );
assert( pNtkOld->nBarBufs == 0 );
// perform strashing // perform strashing
pNtkNew = Abc_NtkStartFromNoLatches( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG ); pNtkNew = Abc_NtkStartFromNoLatches( pNtkOld, ABC_NTK_STRASH, ABC_FUNC_AIG );
pNtkNew->nConstrs = pMan->nConstrs; pNtkNew->nConstrs = pMan->nConstrs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment