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
a1dd7e3f
Commit
a1dd7e3f
authored
Jun 29, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Saturating floating point computation.
parent
96c5b562
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/map/amap/amapMatch.c
+10
-4
No files found.
src/map/amap/amapMatch.c
View file @
a1dd7e3f
...
...
@@ -387,6 +387,7 @@ static inline void Amap_ManMatchGetFlows( Amap_Man_t * p, Amap_Mat_t * pM )
Amap_Mat_t
*
pMFanin
;
Amap_Obj_t
*
pFanin
;
Amap_Gat_t
*
pGate
;
float
AddOn
;
int
i
;
pGate
=
Amap_LibGate
(
p
->
pLib
,
pM
->
pSet
->
iGate
);
assert
(
pGate
->
nPins
==
pM
->
pCut
->
nFans
);
...
...
@@ -399,10 +400,15 @@ static inline void Amap_ManMatchGetFlows( Amap_Man_t * p, Amap_Mat_t * pM )
pMFanin
=
&
pFanin
->
Best
;
pM
->
Delay
=
Abc_MaxInt
(
pM
->
Delay
,
pMFanin
->
Delay
);
pM
->
AveFan
+=
Amap_ObjRefsTotal
(
pFanin
);
if
(
Amap_ObjRefsTotal
(
pFanin
)
==
0
)
pM
->
Area
+=
pMFanin
->
Area
;
else
pM
->
Area
+=
pMFanin
->
Area
/
pFanin
->
EstRefs
;
// if ( Amap_ObjRefsTotal(pFanin) == 0 )
// pM->Area += pMFanin->Area;
// else
// pM->Area += pMFanin->Area / pFanin->EstRefs;
AddOn
=
Amap_ObjRefsTotal
(
pFanin
)
==
0
?
pMFanin
->
Area
:
pMFanin
->
Area
/
pFanin
->
EstRefs
;
if
(
pM
->
Area
>=
(
float
)
1e32
||
AddOn
>=
(
float
)
1e32
)
pM
->
Area
=
(
float
)
1e32
;
else
pM
->
Area
+=
AddOn
;
}
pM
->
AveFan
/=
pGate
->
nPins
;
pM
->
Delay
+=
1
.
0
;
...
...
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