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
c959cf1b
Commit
c959cf1b
authored
Mar 03, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User-controlable SAT sweeper.
parent
b680f122
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
6 deletions
+62
-6
src/aig/gia/gia.h
+1
-1
src/aig/gia/giaSweeper.c
+61
-5
No files found.
src/aig/gia/gia.h
View file @
c959cf1b
...
@@ -1012,7 +1012,7 @@ extern int Gia_SweeperCheckEquiv( Gia_Man_t * p, int ProbeId1, i
...
@@ -1012,7 +1012,7 @@ extern int Gia_SweeperCheckEquiv( Gia_Man_t * p, int ProbeId1, i
extern
Gia_Man_t
*
Gia_SweeperExtractUserLogic
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
Vec_Ptr_t
*
vInNames
,
Vec_Ptr_t
*
vOutNames
);
extern
Gia_Man_t
*
Gia_SweeperExtractUserLogic
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
Vec_Ptr_t
*
vInNames
,
Vec_Ptr_t
*
vOutNames
);
extern
Vec_Int_t
*
Gia_SweeperGraft
(
Gia_Man_t
*
pDst
,
Vec_Int_t
*
vProbes
,
Gia_Man_t
*
pSrc
);
extern
Vec_Int_t
*
Gia_SweeperGraft
(
Gia_Man_t
*
pDst
,
Vec_Int_t
*
vProbes
,
Gia_Man_t
*
pSrc
);
extern
Gia_Man_t
*
Gia_SweeperCleanup
(
Gia_Man_t
*
p
,
char
*
pCommLime
);
extern
Gia_Man_t
*
Gia_SweeperCleanup
(
Gia_Man_t
*
p
,
char
*
pCommLime
);
extern
Vec_Int_t
*
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbes
,
char
*
pCommLime
);
extern
Vec_Int_t
*
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbe
Id
s
,
char
*
pCommLime
);
/*=== giaSwitch.c ============================================================*/
/*=== giaSwitch.c ============================================================*/
extern
float
Gia_ManEvaluateSwitching
(
Gia_Man_t
*
p
);
extern
float
Gia_ManEvaluateSwitching
(
Gia_Man_t
*
p
);
extern
float
Gia_ManComputeSwitching
(
Gia_Man_t
*
p
,
int
nFrames
,
int
nPref
,
int
fProbOne
);
extern
float
Gia_ManComputeSwitching
(
Gia_Man_t
*
p
,
int
nFrames
,
int
nPref
,
int
fProbOne
);
...
...
src/aig/gia/giaSweeper.c
View file @
c959cf1b
...
@@ -157,6 +157,8 @@ Gia_Man_t * Gia_SweeperStart( Gia_Man_t * pGia )
...
@@ -157,6 +157,8 @@ Gia_Man_t * Gia_SweeperStart( Gia_Man_t * pGia )
pGia
=
Gia_ManStart
(
10000
);
pGia
=
Gia_ManStart
(
10000
);
if
(
pGia
->
pHTable
==
NULL
)
if
(
pGia
->
pHTable
==
NULL
)
Gia_ManHashStart
(
pGia
);
Gia_ManHashStart
(
pGia
);
// recompute fPhase and fMark1 to mark multiple fanout nodes if AIG is already defined!!!
Swp_ManStart
(
pGia
);
Swp_ManStart
(
pGia
);
pGia
->
fSweeper
=
1
;
pGia
->
fSweeper
=
1
;
return
pGia
;
return
pGia
;
...
@@ -996,14 +998,14 @@ Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts )
...
@@ -996,14 +998,14 @@ Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Vec_Int_t
*
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbes
,
char
*
pCommLime
)
Vec_Int_t
*
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbe
Id
s
,
char
*
pCommLime
)
{
{
Gia_Man_t
*
pNew
;
Gia_Man_t
*
pNew
;
Vec_Int_t
*
vLits
;
Vec_Int_t
*
vLits
;
// sweeper is running
// sweeper is running
assert
(
Gia_SweeperIsRunning
(
p
)
);
assert
(
Gia_SweeperIsRunning
(
p
)
);
// sweep the logic
// sweep the logic
pNew
=
Gia_SweeperSweep
(
p
,
vProbes
);
pNew
=
Gia_SweeperSweep
(
p
,
vProbe
Id
s
);
// execute command line
// execute command line
if
(
pCommLime
)
if
(
pCommLime
)
{
{
...
@@ -1107,17 +1109,71 @@ Gia_Man_t * Gia_SweeperFraigTest( Gia_Man_t * p, int nWords, int nConfs, int fVe
...
@@ -1107,17 +1109,71 @@ Gia_Man_t * Gia_SweeperFraigTest( Gia_Man_t * p, int nWords, int nConfs, int fVe
solver restarted. The probe IDs are guaranteed to have the same logic
solver restarted. The probe IDs are guaranteed to have the same logic
functions as in the original manager.]
functions as in the original manager.]
SideEffects []
SideEffects [
The input manager is deleted inside this procedure.
]
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
#if 0
Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime )
Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime )
{
{
return
NULL
;
Vec_Int_t * vObjIds;
}
Gia_Man_t * pNew, * pTemp;
Gia_Obj_t * pObj;
int i, ProbeId;
// collect all internal nodes pointed to by used probes
Gia_ManIncrementTravId( p );
vObjIds = Vec_IntAlloc( 1000 );
Vec_IntForEachEntry( p->vProbes, ProbeId, i )
{
if ( ProbeId < 0 ) continue;
pObj = Gia_Lit2Obj( p, Gia_SweeperProbeLit(p, ProbeId) );
Gia_ManExtract_rec( p, Gia_Regular(pObj), vObjIds );
}
// create new manager
pNew = Gia_ManStart( 1 + Gia_ManPiNum(p) + Vec_IntSize(vObjIds) + 100 );
pNew->pName = Abc_UtilStrsav( p->pName );
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
Gia_ManConst0(p)->Value = 0;
Gia_ManForEachPi( p, pObj, i )
pObj->Value = Gia_ManAppendCi(pNew);
// create internal nodes
Gia_ManHashStart( pNew );
Gia_ManForEachObjVec( vObjIds, p, pObj, i )
pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
Gia_ManHashStop( pNew );
// create outputs
Vec_IntForEachEntry( p->vProbes, ProbeId, i )
{
Vec_IntPush( pSwp->vProbes, iLit );
Vec_IntPush( pSwp->vProbRefs, 1 );
Vec_IntSetEntryFull( pSwp->vLit2Prob, iLit, ProbeId ); // consider hash table in the future
pObj = Gia_Lit2Obj( p, Gia_SweeperProbeLit(p, ProbeId) );
Gia_ManAppendCo( pNew, Gia_Regular(pObj)->Value ^ Gia_IsComplement(pObj) );
}
// return the values back
Gia_ManForEachPi( p, pObj, i )
pObj->Value = 0;
Gia_ManForEachObjVec( vObjIds, p, pObj, i )
pObj->Value = Vec_IntEntry( vValues, i );
Vec_IntFree( vObjIds );
Vec_IntFree( vValues );
// duplicated if needed
if ( Gia_ManHasDangling(pNew) )
{
pNew = Gia_ManCleanup( pTemp = pNew );
Gia_ManStop( pTemp );
}
return pNew;
}
#endif
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
...
...
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