diff options
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/gia.h | 2 | ||||
-rw-r--r-- | src/aig/gia/giaReparam.c | 203 | ||||
-rw-r--r-- | src/aig/gia/module.make | 1 |
3 files changed, 0 insertions, 206 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index 25187a33..fd47d2c7 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -857,8 +857,6 @@ extern void Gia_MmStepEntryRecycle( Gia_MmStep_t * p, char * pEnt extern int Gia_MmStepReadMemUsage( Gia_MmStep_t * p ); /*=== giaPat.c ===========================================================*/ extern void Gia_SatVerifyPattern( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t * vCex, Vec_Int_t * vVisit ); -/*=== giaReparam.c ===========================================================*/ -extern Gia_Man_t * Gia_ManReparam( Gia_Man_t * p, int fVerbose ); /*=== giaRetime.c ===========================================================*/ extern Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose ); /*=== giaSat.c ============================================================*/ diff --git a/src/aig/gia/giaReparam.c b/src/aig/gia/giaReparam.c deleted file mode 100644 index a63af649..00000000 --- a/src/aig/gia/giaReparam.c +++ /dev/null @@ -1,203 +0,0 @@ -/**CFile**************************************************************** - - FileName [gia.c] - - SystemName [ABC: Logic synthesis and verification system.] - - PackageName [Scalable AIG package.] - - Synopsis [] - - Author [Alan Mishchenko] - - Affiliation [UC Berkeley] - - Date [Ver. 1.0. Started - June 20, 2005.] - - Revision [$Id: gia.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $] - -***********************************************************************/ - -#include "gia.h" -#include "giaAig.h" -#include "aig/saig/saig.h" - -ABC_NAMESPACE_IMPL_START - - -//////////////////////////////////////////////////////////////////////// -/// DECLARATIONS /// -//////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////// -/// FUNCTION DEFINITIONS /// -//////////////////////////////////////////////////////////////////////// - -/**Function************************************************************* - - Synopsis [Specialized duplication.] - - Description [Replaces registers by PIs/POs and PIs by registers.] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -Gia_Man_t * Gia_ManDupIn2Ff( Gia_Man_t * p ) -{ - Vec_Int_t * vPiOuts; - Gia_Man_t * pNew; - Gia_Obj_t * pObj; - int i; - vPiOuts = Vec_IntAlloc( Gia_ManPiNum(p) ); - pNew = Gia_ManStart( Gia_ManObjNum(p) + 2 * Gia_ManPiNum(p) ); - pNew->pName = Abc_UtilStrsav( p->pName ); - pNew->pSpec = Abc_UtilStrsav( p->pSpec ); - Gia_ManFillValue( p ); - Gia_ManConst0(p)->Value = 0; - Gia_ManForEachPi( p, pObj, i ) - Vec_IntPush( vPiOuts, Gia_ManAppendCi(pNew) ); - Gia_ManForEachRo( p, pObj, i ) - pObj->Value = Gia_ManAppendCi( pNew ); - Gia_ManForEachPi( p, pObj, i ) - pObj->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(pObj) ); - Gia_ManForEachPi( p, pObj, i ) - Gia_ManAppendCo( pNew, Vec_IntEntry(vPiOuts, i) ); - Gia_ManSetRegNum( pNew, Gia_ManPiNum(p) ); - Vec_IntFree( vPiOuts ); - return pNew; -} - -/**Function************************************************************* - - Synopsis [Reverses the above step.] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -int Gia_ManDupFf2In_rec( Gia_Man_t * pNew, Gia_Obj_t * pObj ) -{ - if ( pObj->Value != ~0 ) - return pObj->Value; - assert( Gia_ObjIsAnd(pObj) ); - Gia_ManDupFf2In_rec( pNew, Gia_ObjFanin0(pObj) ); - Gia_ManDupFf2In_rec( pNew, Gia_ObjFanin1(pObj) ); - return pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); -} - -/**Function************************************************************* - - Synopsis [Reverses the above step.] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -Gia_Man_t * Gia_ManDupFf2In( Gia_Man_t * p, int nFlopsOld ) -{ - Gia_Man_t * pNew; - Gia_Obj_t * pObj; - int i; - pNew = Gia_ManStart( Gia_ManObjNum(p) ); - pNew->pName = Abc_UtilStrsav( p->pName ); - pNew->pSpec = Abc_UtilStrsav( p->pSpec ); - Gia_ManFillValue( p ); - Gia_ManConst0(p)->Value = 0; - Gia_ManForEachRo( p, pObj, i ) - pObj->Value = Gia_ManAppendCi( pNew ); - for ( i = Gia_ManPiNum(p) - nFlopsOld; i < Gia_ManPiNum(p); i++ ) - Gia_ManPi(p, i)->Value = Gia_ManAppendCi( pNew ); - Gia_ManForEachPo( p, pObj, i ) - Gia_ManDupFf2In_rec( pNew, Gia_ObjFanin0(pObj) ); - Gia_ManForEachPo( p, pObj, i ) - Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) ); - Gia_ManSetRegNum( pNew, nFlopsOld ); - return pNew; -} - -/**Function************************************************************* - - Synopsis [Reparameterized to get rid of useless primary inputs.] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -Gia_Man_t * Gia_ManReparam( Gia_Man_t * p, int fVerbose ) -{ -// extern Aig_Man_t * Saig_ManRetimeMinArea( Aig_Man_t * p, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose ); - Aig_Man_t * pMan, * pTemp; - Gia_Man_t * pNew, * pTmp; - int nFlopsOld = Gia_ManRegNum(p); - if ( fVerbose ) - { - printf( "Original AIG:\n" ); - Gia_ManPrintStats( p, 0, 0 ); - } - - // perform input trimming - pNew = Gia_ManDupTrimmed( p, 1, 0, 0 ); - if ( fVerbose ) - { - printf( "After PI trimming:\n" ); - Gia_ManPrintStats( pNew, 0, 0 ); - } - // transform GIA - pNew = Gia_ManDupIn2Ff( pTmp = pNew ); - Gia_ManStop( pTmp ); - if ( fVerbose ) - { - printf( "After PI-2-FF transformation:\n" ); - Gia_ManPrintStats( pNew, 0, 0 ); - } - - // derive AIG - pMan = Gia_ManToAigSimple( pNew ); - Gia_ManStop( pNew ); - // perform min-reg retiming - pMan = Saig_ManRetimeMinArea( pTemp = pMan, 10, 0, 0, 1, 0 ); - Aig_ManStop( pTemp ); - // derive GIA - pNew = Gia_ManFromAigSimple( pMan ); - Aig_ManStop( pMan ); - if ( fVerbose ) - { - printf( "After min-area retiming:\n" ); - Gia_ManPrintStats( pNew, 0, 0 ); - } - - // transform back - pNew = Gia_ManDupFf2In( pTmp = pNew, nFlopsOld ); - Gia_ManStop( pTmp ); - if ( fVerbose ) - { - printf( "After FF-2-PI tranformation:\n" ); - Gia_ManPrintStats( pNew, 0, 0 ); - } - return pNew; -} - -//////////////////////////////////////////////////////////////////////// -/// END OF FILE /// -//////////////////////////////////////////////////////////////////////// - - -ABC_NAMESPACE_IMPL_END - diff --git a/src/aig/gia/module.make b/src/aig/gia/module.make index 5bdd4ff1..fcff9a9f 100644 --- a/src/aig/gia/module.make +++ b/src/aig/gia/module.make @@ -28,7 +28,6 @@ SRC += src/aig/gia/gia.c \ src/aig/gia/giaMan.c \ src/aig/gia/giaMem.c \ src/aig/gia/giaPat.c \ - src/aig/gia/giaReparam.c \ src/aig/gia/giaRetime.c \ src/aig/gia/giaScl.c \ src/aig/gia/giaShrink.c \ |