summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcPrint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abci/abcPrint.c')
-rw-r--r--src/base/abci/abcPrint.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c
index e978aa71..664ddec1 100644
--- a/src/base/abci/abcPrint.c
+++ b/src/base/abci/abcPrint.c
@@ -849,10 +849,15 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN
memset( pLevelCounts, 0, sizeof(int) * nIntervals );
Abc_NtkForEachCo( pNtk, pNode, i )
{
- DelayCur = Abc_NodeReadArrival( Abc_ObjFanin0(pNode) )->Worst;
- DelayInt = (int)(DelayCur / DelayDelta);
- if ( DelayInt >= nIntervals )
- DelayInt = nIntervals - 1;
+ if ( Abc_ObjIsNode(Abc_ObjFanin0(pNode)) && Abc_ObjFaninNum(Abc_ObjFanin0(pNode)) == 0 )
+ DelayInt = 0;
+ else
+ {
+ DelayCur = Abc_NodeReadArrival( Abc_ObjFanin0(pNode) )->Worst;
+ DelayInt = (int)(DelayCur / DelayDelta);
+ if ( DelayInt >= nIntervals )
+ DelayInt = nIntervals - 1;
+ }
pLevelCounts[DelayInt]++;
}