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
d00cbdb5
Commit
d00cbdb5
authored
Mar 31, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed in comparing user timing.
parent
ac3817ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
src/base/abci/abcTiming.c
+16
-8
No files found.
src/base/abci/abcTiming.c
View file @
d00cbdb5
...
...
@@ -18,6 +18,8 @@
***********************************************************************/
#include <math.h>
#include "base/abc/abc.h"
#include "base/main/main.h"
#include "map/mio/mio.h"
...
...
@@ -41,6 +43,10 @@ struct Abc_ManTime_t_
Abc_Time_t
*
tOutLoad
;
};
#define TOLERANCE 0.001
static
inline
int
Abc_FloatEqual
(
float
x
,
float
y
)
{
return
fabs
(
x
-
y
)
<
TOLERANCE
;
}
// static functions
static
Abc_ManTime_t
*
Abc_ManTimeStart
(
Abc_Ntk_t
*
pNtk
);
static
void
Abc_ManTimeExpand
(
Abc_ManTime_t
*
p
,
int
nSize
,
int
fProgressive
);
...
...
@@ -341,7 +347,7 @@ void Abc_NtkTimeInitialize( Abc_Ntk_t * pNtk, Abc_Ntk_t * pNtkOld )
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
{
pTime
=
ppTimes
[
pObj
->
Id
];
if
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
)
!=
-
ABC_INFINITY
)
if
(
!
Abc_FloatEqual
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
),
0
)
)
continue
;
*
pTime
=
pNtkOld
?
*
Abc_NodeReadArrival
(
Abc_NtkCi
(
pNtkOld
,
i
))
:
pNtk
->
pManTime
->
tArrDef
;
}
...
...
@@ -350,7 +356,7 @@ void Abc_NtkTimeInitialize( Abc_Ntk_t * pNtk, Abc_Ntk_t * pNtkOld )
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
{
pTime
=
ppTimes
[
pObj
->
Id
];
if
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
)
!=
ABC_INFINITY
)
if
(
!
Abc_FloatEqual
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
),
ABC_INFINITY
)
)
continue
;
*
pTime
=
pNtkOld
?
*
Abc_NodeReadRequired
(
Abc_NtkCo
(
pNtkOld
,
i
))
:
pNtk
->
pManTime
->
tReqDef
;
}
...
...
@@ -385,16 +391,18 @@ void Abc_NtkTimeScale( Abc_Ntk_t * pNtk, float Scale )
pNtk
->
pManTime
->
tArrDef
.
Fall
*=
Scale
;
pNtk
->
pManTime
->
tArrDef
.
Rise
*=
Scale
;
// departure
if
(
pNtk
->
pManTime
->
tReqDef
.
Fall
!=
ABC_INFINITY
)
pNtk
->
pManTime
->
tReqDef
.
Fall
*=
Scale
;
if
(
pNtk
->
pManTime
->
tReqDef
.
Rise
!=
ABC_INFINITY
)
pNtk
->
pManTime
->
tReqDef
.
Rise
*=
Scale
;
pTime
=
&
pNtk
->
pManTime
->
tReqDef
;
if
(
!
Abc_FloatEqual
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
),
ABC_INFINITY
)
)
{
pTime
->
Fall
*=
Scale
;
pTime
->
Rise
*=
Scale
;
}
// set the default timing
ppTimes
=
(
Abc_Time_t
**
)
pNtk
->
pManTime
->
vArrs
->
pArray
;
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
{
pTime
=
ppTimes
[
pObj
->
Id
];
if
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
)
!=
-
ABC_INFINITY
)
if
(
!
Abc_FloatEqual
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
),
0
)
)
continue
;
pTime
->
Fall
*=
Scale
;
pTime
->
Rise
*=
Scale
;
...
...
@@ -404,7 +412,7 @@ void Abc_NtkTimeScale( Abc_Ntk_t * pNtk, float Scale )
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
{
pTime
=
ppTimes
[
pObj
->
Id
];
if
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
)
!=
ABC_INFINITY
)
if
(
!
Abc_FloatEqual
(
Abc_MaxFloat
(
pTime
->
Fall
,
pTime
->
Rise
),
ABC_INFINITY
)
)
continue
;
pTime
->
Fall
*=
Scale
;
pTime
->
Rise
*=
Scale
;
...
...
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