Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
05c987b6
Commit
05c987b6
authored
Oct 31, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving critical path print-out.
parent
431dc61a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
6 deletions
+47
-6
src/map/scl/sclSize.c
+47
-6
No files found.
src/map/scl/sclSize.c
View file @
05c987b6
...
@@ -128,6 +128,7 @@ static inline void Abc_SclTimeNodePrint( SC_Man * p, Abc_Obj_t * pObj, int fRise
...
@@ -128,6 +128,7 @@ static inline void Abc_SclTimeNodePrint( SC_Man * p, Abc_Obj_t * pObj, int fRise
}
}
void
Abc_SclTimeNtkPrint
(
SC_Man
*
p
,
int
fShowAll
,
int
fPrintPath
)
void
Abc_SclTimeNtkPrint
(
SC_Man
*
p
,
int
fShowAll
,
int
fPrintPath
)
{
{
int
fReversePath
=
1
;
int
i
,
nLength
=
0
,
fRise
=
0
;
int
i
,
nLength
=
0
,
fRise
=
0
;
Abc_Obj_t
*
pObj
,
*
pPivot
=
Abc_SclFindCriticalCo
(
p
,
&
fRise
);
Abc_Obj_t
*
pObj
,
*
pPivot
=
Abc_SclFindCriticalCo
(
p
,
&
fRise
);
float
maxDelay
=
Abc_SclObjTimePs
(
p
,
pPivot
,
fRise
);
float
maxDelay
=
Abc_SclObjTimePs
(
p
,
pPivot
,
fRise
);
...
@@ -157,7 +158,10 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath )
...
@@ -157,7 +158,10 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath )
}
}
if
(
fPrintPath
)
if
(
fPrintPath
)
{
{
// printf( "Critical path: \n" );
Abc_Obj_t
*
pTemp
,
*
pPrev
=
NULL
;
int
iStart
=
-
1
,
iEnd
=
-
1
;
Vec_Ptr_t
*
vPath
;
// printf( "Critical path: \n" );
// find the longest cell name
// find the longest cell name
pObj
=
Abc_ObjFanin0
(
pPivot
);
pObj
=
Abc_ObjFanin0
(
pPivot
);
i
=
0
;
i
=
0
;
...
@@ -167,14 +171,51 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath )
...
@@ -167,14 +171,51 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath )
nLength
=
Abc_MaxInt
(
nLength
,
strlen
(
Abc_SclObjCell
(
pObj
)
->
pName
)
);
nLength
=
Abc_MaxInt
(
nLength
,
strlen
(
Abc_SclObjCell
(
pObj
)
->
pName
)
);
pObj
=
Abc_SclFindMostCriticalFanin
(
p
,
&
fRise
,
pObj
);
pObj
=
Abc_SclFindMostCriticalFanin
(
p
,
&
fRise
,
pObj
);
}
}
// print timing
// print timing
pObj
=
Abc_ObjFanin0
(
pPivot
);
if
(
!
fReversePath
)
while
(
pObj
)
//&& Abc_ObjIsNode(pObj) )
{
{
printf
(
"Path%3d --"
,
i
--
);
// print timing
Abc_SclTimeNodePrint
(
p
,
pObj
,
fRise
,
nLength
,
maxDelay
);
pObj
=
Abc_ObjFanin0
(
pPivot
);
pObj
=
Abc_SclFindMostCriticalFanin
(
p
,
&
fRise
,
pObj
);
while
(
pObj
)
//&& Abc_ObjIsNode(pObj) )
{
printf
(
"Path%3d --"
,
i
--
);
Abc_SclTimeNodePrint
(
p
,
pObj
,
fRise
,
nLength
,
maxDelay
);
pPrev
=
pObj
;
pObj
=
Abc_SclFindMostCriticalFanin
(
p
,
&
fRise
,
pObj
);
}
}
else
{
// collect path nodes
vPath
=
Vec_PtrAlloc
(
100
);
Vec_PtrPush
(
vPath
,
pPivot
);
pObj
=
Abc_ObjFanin0
(
pPivot
);
while
(
pObj
)
//&& Abc_ObjIsNode(pObj) )
{
Vec_PtrPush
(
vPath
,
pObj
);
pPrev
=
pObj
;
pObj
=
Abc_SclFindMostCriticalFanin
(
p
,
&
fRise
,
pObj
);
}
Vec_PtrForEachEntryReverse
(
Abc_Obj_t
*
,
vPath
,
pObj
,
i
)
{
printf
(
"Path%3d --"
,
Vec_PtrSize
(
vPath
)
-
1
-
i
);
Abc_SclTimeNodePrint
(
p
,
pObj
,
fRise
,
nLength
,
maxDelay
);
if
(
i
==
1
)
break
;
}
Vec_PtrFree
(
vPath
);
}
}
// print start-point and end-point
Abc_NtkForEachPi
(
p
->
pNtk
,
pTemp
,
iStart
)
if
(
pTemp
==
pPrev
)
break
;
Abc_NtkForEachPo
(
p
->
pNtk
,
pTemp
,
iEnd
)
if
(
pTemp
==
pPivot
)
break
;
printf
(
"Start-point = pi%0*d. End-point = po%0*d.
\n
"
,
Abc_Base10Log
(
Abc_NtkPiNum
(
p
->
pNtk
)
),
iStart
,
Abc_Base10Log
(
Abc_NtkPoNum
(
p
->
pNtk
)
),
iEnd
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment