summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaFrames.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-05-19 21:27:23 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-05-19 21:27:23 -0700
commit232fe09ee41afaacf6382d01ef9c6a046874b6da (patch)
treefb6f59ee947d07adf49fe34db2448dad6d23d7ad /src/aig/gia/giaFrames.c
parent6682d6b0e79ca20115fbc36563a66662f6e3c6af (diff)
downloadabc-232fe09ee41afaacf6382d01ef9c6a046874b6da.tar.gz
abc-232fe09ee41afaacf6382d01ef9c6a046874b6da.tar.bz2
abc-232fe09ee41afaacf6382d01ef9c6a046874b6da.zip
Bug fix in &frames.
Diffstat (limited to 'src/aig/gia/giaFrames.c')
-rw-r--r--src/aig/gia/giaFrames.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/src/aig/gia/giaFrames.c b/src/aig/gia/giaFrames.c
index b19e223b..23caacc4 100644
--- a/src/aig/gia/giaFrames.c
+++ b/src/aig/gia/giaFrames.c
@@ -715,29 +715,6 @@ void Gia_ManFraSupports( Gia_ManFra_t * p )
/**Function*************************************************************
- Synopsis [Moves the first nRegs entries to the end.]
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
-void Gia_ManFraTransformCis( Gia_Man_t * pAig, Vec_Int_t * vCis )
-{
- int i, k = 0, Entry;
- Vec_IntForEachEntryStop( vCis, Entry, i, Gia_ManRegNum(pAig) )
- assert( Entry == i+1 );
- Vec_IntForEachEntryStart( vCis, Entry, i, Gia_ManRegNum(pAig) )
- Vec_IntWriteEntry( vCis, k++, Entry );
- for ( i = 0; i < Gia_ManRegNum(pAig); i++ )
- Vec_IntWriteEntry( vCis, k++, i+1 );
- assert( k == Vec_IntSize(vCis) );
-}
-
-/**Function*************************************************************
-
Synopsis []
Description []
@@ -878,6 +855,11 @@ Gia_Man_t * Gia_ManFrames( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
if ( !pPars->fDisableSt )
Gia_ManHashAlloc( pFrames );
Gia_ManConst0(pAig)->Value = 0;
+ // create primary inputs
+ for ( f = 0; f < pPars->nFrames; f++ )
+ Gia_ManForEachPi( pAig, pObj, i )
+ pObj->Value = Gia_ManAppendCi( pFrames );
+ // add internal nodes for each timeframe
for ( f = 0; f < pPars->nFrames; f++ )
{
if ( f == 0 )
@@ -891,7 +873,7 @@ Gia_Man_t * Gia_ManFrames( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
pObj->Value = Gia_ObjRoToRi( pAig, pObj )->Value;
}
Gia_ManForEachPi( pAig, pObj, i )
- pObj->Value = Gia_ManAppendCi( pFrames );
+ pObj->Value = Gia_Obj2Lit( pFrames, Gia_ManPi(pFrames, f * Gia_ManPiNum(pAig) + i) );
if ( !pPars->fDisableSt )
Gia_ManForEachAnd( pAig, pObj, i )
pObj->Value = Gia_ManHashAnd( pFrames, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
@@ -929,7 +911,6 @@ Gia_Man_t * Gia_ManFrames( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
Vec_IntFreeP( &vPoLits );
if ( !pPars->fDisableSt )
Gia_ManHashStop( pFrames );
- Gia_ManFraTransformCis( pAig, pFrames->vCis );
Gia_ManSetRegNum( pFrames, Gia_ManRegNum(pAig) );
if ( Gia_ManCombMarkUsed(pFrames) < Gia_ManAndNum(pFrames) )
{