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
236be841
Commit
236be841
authored
Feb 27, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User-controlable SAT sweeper.
parent
12253f47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
src/aig/gia/gia.h
+2
-0
src/aig/gia/giaSweeper.c
+54
-2
No files found.
src/aig/gia/gia.h
View file @
236be841
...
@@ -1008,6 +1008,8 @@ extern void Gia_SweeperCondPush( Gia_Man_t * p, int ProbeId );
...
@@ -1008,6 +1008,8 @@ extern void Gia_SweeperCondPush( Gia_Man_t * p, int ProbeId );
extern
int
Gia_SweeperCondCheckUnsat
(
Gia_Man_t
*
p
);
extern
int
Gia_SweeperCondCheckUnsat
(
Gia_Man_t
*
p
);
extern
int
Gia_SweeperCheckEquiv
(
Gia_Man_t
*
pGia
,
int
ProbeId1
,
int
ProbeId2
);
extern
int
Gia_SweeperCheckEquiv
(
Gia_Man_t
*
pGia
,
int
ProbeId1
,
int
ProbeId2
);
extern
Gia_Man_t
*
Gia_SweeperExtractUserLogic
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
Vec_Ptr_t
*
vOutNames
);
extern
Gia_Man_t
*
Gia_SweeperExtractUserLogic
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
Vec_Ptr_t
*
vOutNames
);
extern
Vec_Int_t
*
Gia_SweeperGraft
(
Gia_Man_t
*
pDst
,
Vec_Int_t
*
vProbes
,
Gia_Man_t
*
pSrc
);
extern
Gia_Man_t
*
Gia_SweeperSweep
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeConds
,
Vec_Int_t
*
vProbeOuts
);
/*=== 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 @
236be841
...
@@ -230,8 +230,6 @@ void Gia_SweeperSetRuntimeLimit( Gia_Man_t * p, int nSeconds )
...
@@ -230,8 +230,6 @@ void Gia_SweeperSetRuntimeLimit( Gia_Man_t * p, int nSeconds )
{
{
Swp_Man_t
*
pSwp
=
(
Swp_Man_t
*
)
p
->
pData
;
Swp_Man_t
*
pSwp
=
(
Swp_Man_t
*
)
p
->
pData
;
pSwp
->
nTimeOut
=
nSeconds
;
pSwp
->
nTimeOut
=
nSeconds
;
if
(
nSeconds
)
sat_solver_set_runtime_limit
(
pSwp
->
pSat
,
nSeconds
*
CLOCKS_PER_SEC
+
clock
()
);
}
}
Vec_Int_t
*
Gia_SweeperGetCex
(
Gia_Man_t
*
p
)
Vec_Int_t
*
Gia_SweeperGetCex
(
Gia_Man_t
*
p
)
{
{
...
@@ -696,6 +694,10 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
...
@@ -696,6 +694,10 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
Vec_IntPush
(
p
->
vCondAssump
,
pLitsSat
[
0
]
);
Vec_IntPush
(
p
->
vCondAssump
,
pLitsSat
[
0
]
);
Vec_IntPush
(
p
->
vCondAssump
,
Abc_LitNot
(
pLitsSat
[
1
])
);
Vec_IntPush
(
p
->
vCondAssump
,
Abc_LitNot
(
pLitsSat
[
1
])
);
// set runtime limit for this call
if
(
p
->
nTimeOut
)
sat_solver_set_runtime_limit
(
p
->
pSat
,
p
->
nTimeOut
*
CLOCKS_PER_SEC
+
clock
()
);
clk
=
clock
();
clk
=
clock
();
RetValue1
=
sat_solver_solve
(
p
->
pSat
,
Vec_IntArray
(
p
->
vCondAssump
),
Vec_IntArray
(
p
->
vCondAssump
)
+
Vec_IntSize
(
p
->
vCondAssump
),
RetValue1
=
sat_solver_solve
(
p
->
pSat
,
Vec_IntArray
(
p
->
vCondAssump
),
Vec_IntArray
(
p
->
vCondAssump
)
+
Vec_IntSize
(
p
->
vCondAssump
),
(
ABC_INT64_T
)
p
->
nConfMax
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
(
ABC_INT64_T
)
p
->
nConfMax
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
...
@@ -798,6 +800,10 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
...
@@ -798,6 +800,10 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
}
}
sat_solver_compress
(
p
->
pSat
);
sat_solver_compress
(
p
->
pSat
);
// set runtime limit for this call
if
(
p
->
nTimeOut
)
sat_solver_set_runtime_limit
(
p
->
pSat
,
p
->
nTimeOut
*
CLOCKS_PER_SEC
+
clock
()
);
clk
=
clock
();
clk
=
clock
();
RetValue
=
sat_solver_solve
(
p
->
pSat
,
Vec_IntArray
(
p
->
vCondAssump
),
Vec_IntArray
(
p
->
vCondAssump
)
+
Vec_IntSize
(
p
->
vCondAssump
),
RetValue
=
sat_solver_solve
(
p
->
pSat
,
Vec_IntArray
(
p
->
vCondAssump
),
Vec_IntArray
(
p
->
vCondAssump
)
+
Vec_IntSize
(
p
->
vCondAssump
),
(
ABC_INT64_T
)
p
->
nConfMax
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
(
ABC_INT64_T
)
p
->
nConfMax
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
...
@@ -825,6 +831,52 @@ p->timeSatUndec += clock() - clk;
...
@@ -825,6 +831,52 @@ p->timeSatUndec += clock() - clk;
}
}
}
}
/**Function*************************************************************
Synopsis [Performs grafting from another manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t
*
Gia_SweeperGraft
(
Gia_Man_t
*
pDst
,
Vec_Int_t
*
vProbes
,
Gia_Man_t
*
pSrc
)
{
Vec_Int_t
*
vOutLits
;
Gia_Obj_t
*
pObj
;
int
i
;
assert
(
Vec_IntSize
(
vProbes
)
==
Gia_ManPiNum
(
pSrc
)
);
assert
(
pDst
->
pHTable
!=
NULL
);
Gia_ManForEachPi
(
pSrc
,
pObj
,
i
)
pObj
->
Value
=
Gia_SweeperProbeLit
(
pDst
,
Vec_IntEntry
(
vProbes
,
i
)
);
Gia_ManForEachAnd
(
pSrc
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pDst
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
vOutLits
=
Vec_IntAlloc
(
Gia_ManPoNum
(
pSrc
)
);
Gia_ManForEachPo
(
pSrc
,
pObj
,
i
)
Vec_IntPush
(
vOutLits
,
Gia_ObjFanin0Copy
(
pObj
)
);
return
vOutLits
;
}
/**Function*************************************************************
Synopsis [Performs conditional sweeping of the cone.]
Description [Returns the result as a new GIA manager with as many inputs
as the original manager and as many outputs as there are logic cones.]
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_SweeperSweep
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeConds
,
Vec_Int_t
*
vProbeOuts
)
{
return
NULL
;
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// 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