Commit 3146ff40 by Alan Mishchenko

Fix incorrect transfer of box copy ID.

parent f2610921
...@@ -226,7 +226,7 @@ Tim_Man_t * Tim_ManTrim( Tim_Man_t * p, Vec_Int_t * vBoxPres ) ...@@ -226,7 +226,7 @@ Tim_Man_t * Tim_ManTrim( Tim_Man_t * p, Vec_Int_t * vBoxPres )
if ( Vec_IntEntry(vBoxPres, i) ) if ( Vec_IntEntry(vBoxPres, i) )
{ {
Tim_ManCreateBox( pNew, curPo, pBox->nInputs, curPi, pBox->nOutputs, pBox->iDelayTable ); Tim_ManCreateBox( pNew, curPo, pBox->nInputs, curPi, pBox->nOutputs, pBox->iDelayTable );
Tim_ManBoxSetCopy( pNew, Tim_ManBoxNum(pNew) - 1, i ); Tim_ManBoxSetCopy( pNew, Tim_ManBoxNum(pNew) - 1, Tim_ManBoxCopy(p, i) == -1 ? i : Tim_ManBoxCopy(p, i) );
curPi += pBox->nOutputs; curPi += pBox->nOutputs;
curPo += pBox->nInputs; curPo += pBox->nInputs;
} }
...@@ -319,7 +319,7 @@ Tim_Man_t * Tim_ManReduce( Tim_Man_t * p, Vec_Int_t * vBoxesLeft, int nTermsDiff ...@@ -319,7 +319,7 @@ Tim_Man_t * Tim_ManReduce( Tim_Man_t * p, Vec_Int_t * vBoxesLeft, int nTermsDiff
{ {
pBox = Tim_ManBox( p, iBox ); pBox = Tim_ManBox( p, iBox );
Tim_ManCreateBox( pNew, curPo, pBox->nInputs, curPi, pBox->nOutputs, pBox->iDelayTable ); Tim_ManCreateBox( pNew, curPo, pBox->nInputs, curPi, pBox->nOutputs, pBox->iDelayTable );
Tim_ManBoxSetCopy( pNew, Tim_ManBoxNum(pNew) - 1, iBox ); Tim_ManBoxSetCopy( pNew, Tim_ManBoxNum(pNew) - 1, Tim_ManBoxCopy(p, iBox) == -1 ? iBox : Tim_ManBoxCopy(p, iBox) );
curPi += pBox->nOutputs; curPi += pBox->nOutputs;
curPo += pBox->nInputs; curPo += pBox->nInputs;
} }
......
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