summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaQbf.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-07-30 17:08:26 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2019-07-30 17:08:26 +0700
commit9017fa9169eda22ba8e60ac5dfcdb27f00e303fc (patch)
tree3899fcf87ba98fc8f2075a6b709376d8fbea7e65 /src/aig/gia/giaQbf.c
parent5776ad07e7247993976bffed4802a5737c456782 (diff)
downloadabc-9017fa9169eda22ba8e60ac5dfcdb27f00e303fc.tar.gz
abc-9017fa9169eda22ba8e60ac5dfcdb27f00e303fc.tar.bz2
abc-9017fa9169eda22ba8e60ac5dfcdb27f00e303fc.zip
Adding new switch to &genqfb to use output as an enable in the miter.
Diffstat (limited to 'src/aig/gia/giaQbf.c')
-rw-r--r--src/aig/gia/giaQbf.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/aig/gia/giaQbf.c b/src/aig/gia/giaQbf.c
index 247c3dad..f32db0a4 100644
--- a/src/aig/gia/giaQbf.c
+++ b/src/aig/gia/giaQbf.c
@@ -132,11 +132,11 @@ Vec_Int_t * Gia_GenCreateMuxes( Gia_Man_t * p, Gia_Man_t * pNew, Vec_Int_t * vFl
}
return vLits;
}
-Gia_Man_t * Gia_GenQbfMiter( Gia_Man_t * p, int nFrames, int nLutNum, int nLutSize, char * pStr, int fVerbose )
+Gia_Man_t * Gia_GenQbfMiter( Gia_Man_t * p, int nFrames, int nLutNum, int nLutSize, char * pStr, int fUseOut, int fVerbose )
{
Gia_Obj_t * pObj;
Gia_Man_t * pTemp, * pNew;
- int i, iMiter, nPars = nLutNum * (1 << nLutSize);
+ int i, iMiter, iLut0, iLut1, nPars = nLutNum * (1 << nLutSize);
Vec_Int_t * vLits0, * vLits1, * vParLits;
Vec_Int_t * vFlops = Gia_GenCollectFlopIndexes( pStr, nLutNum, nLutSize, Gia_ManRegNum(p) );
// collect parameter literals (data vars)
@@ -160,7 +160,18 @@ Gia_Man_t * Gia_GenQbfMiter( Gia_Man_t * p, int nFrames, int nLutNum, int nLutSi
vLits0 = Gia_GenCreateMuxes( p, pNew, vFlops, nLutNum, nLutSize, vParLits, 0 );
vLits1 = Gia_GenCreateMuxes( p, pNew, vFlops, nLutNum, nLutSize, vParLits, 1 );
// create miter output
- iMiter = Gia_ManHashAnd( pNew, Vec_IntEntry(vLits0, 0), Abc_LitNot(Vec_IntEntry(vLits1, 0)) );
+ //iMiter = Gia_ManHashAnd( pNew, Vec_IntEntry(vLits0, 0), Abc_LitNot(Vec_IntEntry(vLits1, 0)) );
+ ///////////////////////////////////////////////////////////////////////////
+ iLut0 = Vec_IntEntry(vLits0, 0);
+ iLut1 = Vec_IntEntry(vLits1, 0);
+ if ( fUseOut )
+ {
+ Gia_Obj_t * pObjPoLast = Gia_ManPo( p, Gia_ManPoNum(p)-1 );
+ int iOut = Abc_LitNotCond( Gia_ObjFanin0Copy(pObjPoLast), 0 );
+ iLut1 = Gia_ManHashAnd( pNew, iLut1, Abc_LitNot(iOut) );
+ }
+ iMiter = Gia_ManHashAnd( pNew, iLut0, Abc_LitNot(iLut1) );
+ ///////////////////////////////////////////////////////////////////////////
iMiter = Gia_ManHashAnd( pNew, Abc_LitNot(iMiter), Abc_Var2Lit(1, 0) );
Gia_ManAppendCo( pNew, iMiter );
// cleanup