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
378bb416
Commit
378bb416
authored
Jan 02, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to delay optimization project.
parent
51e3a7c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/opt/sbd/sbdCore.c
+1
-1
src/opt/sbd/sbdPath.c
+9
-9
No files found.
src/opt/sbd/sbdCore.c
View file @
378bb416
...
@@ -1992,7 +1992,7 @@ void Sbd_ManDeriveMapping( Sbd_Man_t * p, Gia_Man_t * pNew )
...
@@ -1992,7 +1992,7 @@ void Sbd_ManDeriveMapping( Sbd_Man_t * p, Gia_Man_t * pNew )
Vec_IntPushUniqueOrder
(
vLeaves
,
iObjNew
);
Vec_IntPushUniqueOrder
(
vLeaves
,
iObjNew
);
}
}
assert
(
Vec_IntSize
(
vLeaves
)
<=
p
->
pPars
->
nLutSize
);
assert
(
Vec_IntSize
(
vLeaves
)
<=
p
->
pPars
->
nLutSize
);
assert
(
Vec_IntSize
(
vLeaves
)
>
1
);
//
assert( Vec_IntSize(vLeaves) > 1 );
pCutNew
[
0
]
=
Vec_IntSize
(
vLeaves
);
pCutNew
[
0
]
=
Vec_IntSize
(
vLeaves
);
memcpy
(
pCutNew
+
1
,
Vec_IntArray
(
vLeaves
),
sizeof
(
int
)
*
Vec_IntSize
(
vLeaves
)
);
memcpy
(
pCutNew
+
1
,
Vec_IntArray
(
vLeaves
),
sizeof
(
int
)
*
Vec_IntSize
(
vLeaves
)
);
}
}
...
...
src/opt/sbd/sbdPath.c
View file @
378bb416
...
@@ -52,7 +52,7 @@ int Sbc_ManAddInternalToPath_rec( Gia_Man_t * p, int iObj, Vec_Bit_t * vPath )
...
@@ -52,7 +52,7 @@ int Sbc_ManAddInternalToPath_rec( Gia_Man_t * p, int iObj, Vec_Bit_t * vPath )
Gia_ObjSetTravIdCurrentId
(
p
,
iObj
);
Gia_ObjSetTravIdCurrentId
(
p
,
iObj
);
pObj
=
Gia_ManObj
(
p
,
iObj
);
pObj
=
Gia_ManObj
(
p
,
iObj
);
if
(
Gia_ObjIsCi
(
pObj
)
)
if
(
Gia_ObjIsCi
(
pObj
)
)
return
0
;
return
Vec_BitEntry
(
vPath
,
iObj
)
;
assert
(
Gia_ObjIsAnd
(
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
);
Gia_LutForEachFanin
(
p
,
iObj
,
iFan
,
k
)
Gia_LutForEachFanin
(
p
,
iObj
,
iFan
,
k
)
Value
|=
Sbc_ManAddInternalToPath_rec
(
p
,
iFan
,
vPath
);
Value
|=
Sbc_ManAddInternalToPath_rec
(
p
,
iFan
,
vPath
);
...
@@ -85,13 +85,14 @@ void Sbc_ManAddInternalToPath( Gia_Man_t * p, Vec_Bit_t * vPath )
...
@@ -85,13 +85,14 @@ void Sbc_ManAddInternalToPath( Gia_Man_t * p, Vec_Bit_t * vPath )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Sbc_ManCriticalPath_rec
(
Gia_Man_t
*
p
,
int
*
pLevels
,
int
iObj
,
int
LevelFan
,
Vec_Bit_t
*
vPath
)
void
Sbc_ManCriticalPath_rec
(
Gia_Man_t
*
p
,
int
*
pLevels
,
int
iObj
,
int
LevelFan
,
Vec_Bit_t
*
vPath
,
int
Slack
)
{
{
Gia_Obj_t
*
pObj
;
int
k
,
iFan
;
Gia_Obj_t
*
pObj
;
int
k
,
iFan
;
if
(
Gia_ObjIsTravIdCurrentId
(
p
,
iObj
)
)
if
(
Gia_ObjIsTravIdCurrentId
(
p
,
iObj
)
)
return
;
return
;
Gia_ObjSetTravIdCurrentId
(
p
,
iObj
);
Gia_ObjSetTravIdCurrentId
(
p
,
iObj
);
pObj
=
Gia_ManObj
(
p
,
iObj
);
pObj
=
Gia_ManObj
(
p
,
iObj
);
Vec_BitWriteEntry
(
vPath
,
iObj
,
1
);
if
(
Gia_ObjIsCi
(
pObj
)
)
if
(
Gia_ObjIsCi
(
pObj
)
)
{
{
Tim_Man_t
*
pManTime
=
(
Tim_Man_t
*
)
p
->
pManTime
;
Tim_Man_t
*
pManTime
=
(
Tim_Man_t
*
)
p
->
pManTime
;
...
@@ -104,21 +105,20 @@ void Sbc_ManCriticalPath_rec( Gia_Man_t * p, int * pLevels, int iObj, int LevelF
...
@@ -104,21 +105,20 @@ void Sbc_ManCriticalPath_rec( Gia_Man_t * p, int * pLevels, int iObj, int LevelF
{
{
Gia_Obj_t
*
pCo
=
Gia_ManCo
(
p
,
curCo
+
k
);
Gia_Obj_t
*
pCo
=
Gia_ManCo
(
p
,
curCo
+
k
);
int
iDriver
=
Gia_ObjFaninId0p
(
p
,
pCo
);
int
iDriver
=
Gia_ObjFaninId0p
(
p
,
pCo
);
if
(
(
pLevels
[
iDriver
]
>=
LevelFan
-
1
)
&&
iDriver
)
if
(
(
pLevels
[
iDriver
]
+
Slack
>=
LevelFan
-
1
)
&&
iDriver
)
Sbc_ManCriticalPath_rec
(
p
,
pLevels
,
iDriver
,
pLevels
[
iDriver
],
vPath
);
Sbc_ManCriticalPath_rec
(
p
,
pLevels
,
iDriver
,
pLevels
[
iDriver
],
vPath
,
Abc_MaxInt
(
0
,
pLevels
[
iDriver
]
+
Slack
-
(
LevelFan
-
1
))
);
}
}
}
}
return
;
return
;
}
}
assert
(
Gia_ObjIsAnd
(
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
);
Vec_BitWriteEntry
(
vPath
,
iObj
,
1
);
Gia_LutForEachFanin
(
p
,
iObj
,
iFan
,
k
)
Gia_LutForEachFanin
(
p
,
iObj
,
iFan
,
k
)
if
(
pLevels
[
iFan
]
>=
LevelFan
-
1
)
if
(
pLevels
[
iFan
]
+
Slack
>=
LevelFan
-
1
)
Sbc_ManCriticalPath_rec
(
p
,
pLevels
,
iFan
,
pLevels
[
iFan
],
vPath
);
Sbc_ManCriticalPath_rec
(
p
,
pLevels
,
iFan
,
pLevels
[
iFan
],
vPath
,
Abc_MaxInt
(
0
,
pLevels
[
iFan
]
+
Slack
-
(
LevelFan
-
1
))
);
}
}
Vec_Bit_t
*
Sbc_ManCriticalPath
(
Gia_Man_t
*
p
)
Vec_Bit_t
*
Sbc_ManCriticalPath
(
Gia_Man_t
*
p
)
{
{
int
*
pLevels
=
NULL
,
k
,
iDriver
;
int
*
pLevels
=
NULL
,
k
,
iDriver
,
Slack
=
1
;
int
nLevels
=
p
->
pManTime
?
Gia_ManLutLevelWithBoxes
(
p
)
:
Gia_ManLutLevel
(
p
,
&
pLevels
);
int
nLevels
=
p
->
pManTime
?
Gia_ManLutLevelWithBoxes
(
p
)
:
Gia_ManLutLevel
(
p
,
&
pLevels
);
Vec_Bit_t
*
vPath
=
Vec_BitStart
(
Gia_ManObjNum
(
p
)
);
Vec_Bit_t
*
vPath
=
Vec_BitStart
(
Gia_ManObjNum
(
p
)
);
if
(
p
->
pManTime
)
if
(
p
->
pManTime
)
...
@@ -126,7 +126,7 @@ Vec_Bit_t * Sbc_ManCriticalPath( Gia_Man_t * p )
...
@@ -126,7 +126,7 @@ Vec_Bit_t * Sbc_ManCriticalPath( Gia_Man_t * p )
Gia_ManIncrementTravId
(
p
);
Gia_ManIncrementTravId
(
p
);
Gia_ManForEachCoDriverId
(
p
,
iDriver
,
k
)
Gia_ManForEachCoDriverId
(
p
,
iDriver
,
k
)
if
(
(
pLevels
[
iDriver
]
==
nLevels
)
&&
iDriver
)
if
(
(
pLevels
[
iDriver
]
==
nLevels
)
&&
iDriver
)
Sbc_ManCriticalPath_rec
(
p
,
pLevels
,
iDriver
,
pLevels
[
iDriver
],
vPath
);
Sbc_ManCriticalPath_rec
(
p
,
pLevels
,
iDriver
,
pLevels
[
iDriver
],
vPath
,
Slack
);
if
(
!
p
->
pManTime
)
if
(
!
p
->
pManTime
)
ABC_FREE
(
pLevels
);
ABC_FREE
(
pLevels
);
Sbc_ManAddInternalToPath
(
p
,
vPath
);
Sbc_ManAddInternalToPath
(
p
,
vPath
);
...
...
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