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
d948f725
Commit
d948f725
authored
Jan 01, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to delay optimization project.
parent
26eb3f36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
30 deletions
+31
-30
src/opt/sbd/sbdCore.c
+2
-0
src/opt/sbd/sbdCut2.c
+29
-30
No files found.
src/opt/sbd/sbdCore.c
View file @
d948f725
...
...
@@ -2009,6 +2009,7 @@ void Sbd_NtkPerformOne( Sbd_Man_t * p, int Pivot )
Vec_IntWriteEntry
(
p
->
vMirrors
,
Pivot
,
RetValue
);
if
(
p
->
pPars
->
fVerbose
)
printf
(
"Node %5d: Detected constant %d.
\n
"
,
Pivot
,
RetValue
);
}
/*
else if ( p->pPars->nLutNum >= 1 && Sbd_ManExplore2( p, Pivot, &Truth ) )
{
int i;
...
...
@@ -2020,6 +2021,7 @@ void Sbd_NtkPerformOne( Sbd_Man_t * p, int Pivot )
Sbd_ManImplement2( p, Pivot, 1, Strs );
if ( p->pPars->fVerbose ) printf( "Node %5d: Detected LUT%d\n", Pivot, p->pPars->nLutSize );
}
*/
else
if
(
p
->
pPars
->
nLutNum
>=
2
&&
Sbd_ManExplore3
(
p
,
Pivot
,
&
nStrs
,
Strs
)
)
{
Sbd_ManImplement2
(
p
,
Pivot
,
nStrs
,
Strs
);
...
...
src/opt/sbd/sbdCut2.c
View file @
d948f725
...
...
@@ -336,36 +336,6 @@ int Sbd_ManCutServerFirst( Sbd_Srv_t * p, int iObj, int * pLeaves )
return
Vec_IntSize
(
p
->
vCut
);
}
#if 0
// recompute the cut
Vec_IntClear( p->vCut );
Gia_ManIncrementTravId( p->pGia );
RetValue = Sbd_ManCutCollect_rec( p->pGia, p->vMirrors, iObj, LevStop-1, p->vLutLevs, p->vCut );
if ( RetValue == 0 ) // cannot build delay-improving cut
return -1;
// check if the current cut is good
Vec_IntSort( p->vCut, 0 );
/*
Sbd_ManCutReload( p->vMirrors, p->vLutLevs, LevStop, p->vCut, p->vCutTop, p->vCutBot );
if ( Vec_IntSize(p->vCut) <= p->nCutSize && Vec_IntSize(p->vCutTop) <= p->nLutSize-1 )
{
//printf( "%d ", Vec_IntSize(p->vCut) );
memcpy( pLeaves, Vec_IntArray(p->vCut), sizeof(int) * Vec_IntSize(p->vCut) );
return Vec_IntSize(p->vCut);
}
*/
// try to expand the cut
Sbd_ManCutExpand( p->pGia, p->vMirrors, p->vLutLevs, p->vCut );
Sbd_ManCutReload( p->vMirrors, p->vLutLevs, LevStop, p->vCut, p->vCutTop, p->vCutBot );
if ( Vec_IntSize(p->vCut) <= p->nCutSize && Vec_IntSize(p->vCutTop) <= p->nLutSize-1 )
{
//printf( "2=(%d,%d) ", Vec_IntSize(p->vCutTop), Vec_IntSize(p->vCutBot) );
//printf( "%d ", Vec_IntSize(p->vCut) );
memcpy( pLeaves, Vec_IntArray(p->vCut), sizeof(int) * Vec_IntSize(p->vCut) );
return Vec_IntSize(p->vCut);
}
#endif
// try to reduce the topmost
Vec_IntClear
(
p
->
vCut0
);
Vec_IntAppend
(
p
->
vCut0
,
p
->
vCut
);
...
...
@@ -420,6 +390,35 @@ int Sbd_ManCutServerFirst( Sbd_Srv_t * p, int iObj, int * pLeaves )
}
}
}
// recompute the cut
Vec_IntClear
(
p
->
vCut
);
Gia_ManIncrementTravId
(
p
->
pGia
);
RetValue
=
Sbd_ManCutCollect_rec
(
p
->
pGia
,
p
->
vMirrors
,
iObj
,
LevStop
-
1
,
p
->
vLutLevs
,
p
->
vCut
);
if
(
RetValue
==
0
)
// cannot build delay-improving cut
return
-
1
;
// check if the current cut is good
Vec_IntSort
(
p
->
vCut
,
0
);
/*
Sbd_ManCutReload( p->vMirrors, p->vLutLevs, LevStop, p->vCut, p->vCutTop, p->vCutBot );
if ( Vec_IntSize(p->vCut) <= p->nCutSize && Vec_IntSize(p->vCutTop) <= p->nLutSize-1 )
{
//printf( "%d ", Vec_IntSize(p->vCut) );
memcpy( pLeaves, Vec_IntArray(p->vCut), sizeof(int) * Vec_IntSize(p->vCut) );
return Vec_IntSize(p->vCut);
}
*/
// try to expand the cut
Sbd_ManCutExpand
(
p
->
pGia
,
p
->
vMirrors
,
p
->
vLutLevs
,
p
->
vCut
);
Sbd_ManCutReload
(
p
->
vMirrors
,
p
->
vLutLevs
,
LevStop
,
p
->
vCut
,
p
->
vCutTop
,
p
->
vCutBot
);
if
(
Vec_IntSize
(
p
->
vCut
)
<=
p
->
nCutSize
&&
Vec_IntSize
(
p
->
vCutTop
)
<=
p
->
nLutSize
-
1
)
{
//printf( "2=(%d,%d) ", Vec_IntSize(p->vCutTop), Vec_IntSize(p->vCutBot) );
//printf( "%d ", Vec_IntSize(p->vCut) );
memcpy
(
pLeaves
,
Vec_IntArray
(
p
->
vCut
),
sizeof
(
int
)
*
Vec_IntSize
(
p
->
vCut
)
);
return
Vec_IntSize
(
p
->
vCut
);
}
return
-
1
;
}
...
...
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