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
bf6a053c
Commit
bf6a053c
authored
Jul 01, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Saturating floating point computation.
parent
a1dd7e3f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
src/aig/gia/giaLf.c
+5
-1
src/aig/gia/giaNf.c
+5
-1
src/base/cmd/cmdHist.c
+1
-1
src/map/if/ifCut.c
+7
-3
No files found.
src/aig/gia/giaLf.c
View file @
bf6a053c
...
@@ -1154,7 +1154,11 @@ static inline void Lf_CutParams( Lf_Man_t * p, Lf_Cut_t * pCut, int Required, fl
...
@@ -1154,7 +1154,11 @@ static inline void Lf_CutParams( Lf_Man_t * p, Lf_Cut_t * pCut, int Required, fl
else
else
{
{
Index
=
(
int
)(
pBest
->
Delay
[
1
]
+
1
<=
Required
&&
Required
!=
ABC_INFINITY
);
Index
=
(
int
)(
pBest
->
Delay
[
1
]
+
1
<=
Required
&&
Required
!=
ABC_INFINITY
);
pCut
->
Flow
+=
pBest
->
Flow
[
Index
];
//pCut->Flow += pBest->Flow[Index];
if
(
pCut
->
Flow
>=
(
float
)
1e32
||
pBest
->
Flow
[
Index
]
>=
(
float
)
1e32
)
pCut
->
Flow
=
(
float
)
1e32
;
else
pCut
->
Flow
+=
pBest
->
Flow
[
Index
];
}
}
Delay
=
pBest
->
Delay
[
Index
];
Delay
=
pBest
->
Delay
[
Index
];
}
}
...
...
src/aig/gia/giaNf.c
View file @
bf6a053c
...
@@ -1147,7 +1147,11 @@ void Nf_ManCutMatchOne( Nf_Man_t * p, int iObj, int * pCut, int * pCutSet )
...
@@ -1147,7 +1147,11 @@ void Nf_ManCutMatchOne( Nf_Man_t * p, int iObj, int * pCut, int * pCutSet )
if
(
pD
->
D
<
SCL_INFINITY
&&
pA
->
D
<
SCL_INFINITY
&&
ArrivalD
+
pC
->
iDelays
[
k
]
>
Required
)
if
(
pD
->
D
<
SCL_INFINITY
&&
pA
->
D
<
SCL_INFINITY
&&
ArrivalD
+
pC
->
iDelays
[
k
]
>
Required
)
break
;
break
;
Delay
=
Abc_MaxInt
(
Delay
,
ArrivalD
+
pC
->
iDelays
[
k
]
);
Delay
=
Abc_MaxInt
(
Delay
,
ArrivalD
+
pC
->
iDelays
[
k
]
);
AreaF
+=
pBestF
[
iFanin
]
->
M
[
fComplF
][
0
].
F
;
//AreaF += pBestF[iFanin]->M[fComplF][0].F;
if
(
AreaF
>=
(
float
)
1e32
||
pBestF
[
iFanin
]
->
M
[
fComplF
][
0
].
F
>=
(
float
)
1e32
)
AreaF
=
(
float
)
1e32
;
else
AreaF
+=
pBestF
[
iFanin
]
->
M
[
fComplF
][
0
].
F
;
}
}
}
}
if
(
k
<
nFans
)
if
(
k
<
nFans
)
...
...
src/base/cmd/cmdHist.c
View file @
bf6a053c
...
@@ -57,7 +57,7 @@ void Cmd_HistoryAddCommand( Abc_Frame_t * p, const char * command )
...
@@ -57,7 +57,7 @@ void Cmd_HistoryAddCommand( Abc_Frame_t * p, const char * command )
return
;
return
;
Len
=
strlen
(
command
);
Len
=
strlen
(
command
);
strcpy
(
Buffer
,
command
);
strcpy
(
Buffer
,
command
);
if
(
Buffer
[
Len
-
1
]
==
'\n'
)
if
(
Len
>
0
&&
Buffer
[
Len
-
1
]
==
'\n'
)
Buffer
[
Len
-
1
]
=
0
;
Buffer
[
Len
-
1
]
=
0
;
if
(
strlen
(
Buffer
)
>
3
&&
if
(
strlen
(
Buffer
)
>
3
&&
strncmp
(
Buffer
,
"set"
,
3
)
&&
strncmp
(
Buffer
,
"set"
,
3
)
&&
...
...
src/map/if/ifCut.c
View file @
bf6a053c
...
@@ -919,18 +919,22 @@ void If_CutLift( If_Cut_t * pCut )
...
@@ -919,18 +919,22 @@ void If_CutLift( If_Cut_t * pCut )
float
If_CutAreaFlow
(
If_Man_t
*
p
,
If_Cut_t
*
pCut
)
float
If_CutAreaFlow
(
If_Man_t
*
p
,
If_Cut_t
*
pCut
)
{
{
If_Obj_t
*
pLeaf
;
If_Obj_t
*
pLeaf
;
float
Flow
;
float
Flow
,
AddOn
;
int
i
;
int
i
;
Flow
=
If_CutLutArea
(
p
,
pCut
);
Flow
=
If_CutLutArea
(
p
,
pCut
);
If_CutForEachLeaf
(
p
,
pCut
,
pLeaf
,
i
)
If_CutForEachLeaf
(
p
,
pCut
,
pLeaf
,
i
)
{
{
if
(
pLeaf
->
nRefs
==
0
||
If_ObjIsConst1
(
pLeaf
)
)
if
(
pLeaf
->
nRefs
==
0
||
If_ObjIsConst1
(
pLeaf
)
)
Flow
+
=
If_ObjCutBest
(
pLeaf
)
->
Area
;
AddOn
=
If_ObjCutBest
(
pLeaf
)
->
Area
;
else
else
{
{
assert
(
pLeaf
->
EstRefs
>
p
->
fEpsilon
);
assert
(
pLeaf
->
EstRefs
>
p
->
fEpsilon
);
Flow
+
=
If_ObjCutBest
(
pLeaf
)
->
Area
/
pLeaf
->
EstRefs
;
AddOn
=
If_ObjCutBest
(
pLeaf
)
->
Area
/
pLeaf
->
EstRefs
;
}
}
if
(
Flow
>=
(
float
)
1e32
||
AddOn
>=
(
float
)
1e32
)
Flow
=
(
float
)
1e32
;
else
Flow
+=
AddOn
;
}
}
return
Flow
;
return
Flow
;
}
}
...
...
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