summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifTruth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/if/ifTruth.c')
-rw-r--r--src/map/if/ifTruth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/if/ifTruth.c b/src/map/if/ifTruth.c
index 91e6adcf..7c8892d3 100644
--- a/src/map/if/ifTruth.c
+++ b/src/map/if/ifTruth.c
@@ -244,10 +244,15 @@ p->timeCache[3] += Abc_Clock() - clk;
else
assert( pCut->uSign == If_ObjCutSignCompute( pCut ) );
+ assert( Vec_IntSize(p->vTtOccurs[pCut->nLeaves]) == Vec_MemEntryNum(p->vTtMem[pCut->nLeaves]) );
// hash function
fCompl = ((p->uCanonPhase >> pCut->nLeaves) & 1);
truthId = Vec_MemHashInsert( p->vTtMem[pCut->nLeaves], pTruth );
pCut->iCutFunc = Abc_Var2Lit( truthId, fCompl );
+ // count how many time this truth table is used
+ if ( Vec_IntSize(p->vTtOccurs[pCut->nLeaves]) < Vec_MemEntryNum(p->vTtMem[pCut->nLeaves]) )
+ Vec_IntPush( p->vTtOccurs[pCut->nLeaves], 0 );
+ Vec_IntAddToEntry( p->vTtOccurs[pCut->nLeaves], truthId, 1 );
if ( fVerbose )
{