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
c3ab7843
Commit
c3ab7843
authored
Jan 07, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backward reachability using circuit cofactoring.
parent
99cc6ae9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
src/aig/gia/giaCCof.c
+12
-13
No files found.
src/aig/gia/giaCCof.c
View file @
c3ab7843
...
@@ -149,19 +149,21 @@ static inline int Gia_Obj1Copy( Vec_Int_t * vCopies, Gia_Man_t * pGia, Gia_Obj_t
...
@@ -149,19 +149,21 @@ static inline int Gia_Obj1Copy( Vec_Int_t * vCopies, Gia_Man_t * pGia, Gia_Obj_t
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Gia_ManCofOneDerive_rec
(
Ccf_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
void
Gia_ManCofOneDerive_rec
(
Ccf_Man_t
*
p
,
int
Id
)
{
{
int
Res
,
Id
=
Gia_ObjId
(
p
->
pFrames
,
pObj
);
Gia_Obj_t
*
pObj
;
int
Res
;
if
(
Vec_IntEntry
(
p
->
vCopies
,
Id
)
!=
-
1
)
if
(
Vec_IntEntry
(
p
->
vCopies
,
Id
)
!=
-
1
)
return
;
return
;
pObj
=
Gia_ManObj
(
p
->
pFrames
,
Id
);
assert
(
Gia_ObjIsCi
(
pObj
)
||
Gia_ObjIsAnd
(
pObj
)
);
assert
(
Gia_ObjIsCi
(
pObj
)
||
Gia_ObjIsAnd
(
pObj
)
);
if
(
Gia_ObjIsAnd
(
pObj
)
)
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
{
Gia_ManCofOneDerive_rec
(
p
,
Gia_ObjFanin
0
(
pObj
)
);
Gia_ManCofOneDerive_rec
(
p
,
Gia_ObjFanin
Id0p
(
p
->
pFrames
,
Gia_ManObj
(
p
->
pFrames
,
Id
)
)
);
Gia_ManCofOneDerive_rec
(
p
,
Gia_ObjFanin
1
(
pObj
)
);
Gia_ManCofOneDerive_rec
(
p
,
Gia_ObjFanin
Id1p
(
p
->
pFrames
,
Gia_ManObj
(
p
->
pFrames
,
Id
)
)
);
Res
=
Gia_ManHashAnd
(
p
->
pFrames
,
Res
=
Gia_ManHashAnd
(
p
->
pFrames
,
Gia_Obj0Copy
(
p
->
vCopies
,
p
->
pFrames
,
pObj
),
Gia_Obj0Copy
(
p
->
vCopies
,
p
->
pFrames
,
Gia_ManObj
(
p
->
pFrames
,
Id
)
),
Gia_Obj1Copy
(
p
->
vCopies
,
p
->
pFrames
,
pObj
)
);
Gia_Obj1Copy
(
p
->
vCopies
,
p
->
pFrames
,
Gia_ManObj
(
p
->
pFrames
,
Id
)
)
);
}
}
else
if
(
Gia_ObjCioId
(
pObj
)
>=
Gia_ManRegNum
(
p
->
pGia
)
)
// PI
else
if
(
Gia_ObjCioId
(
pObj
)
>=
Gia_ManRegNum
(
p
->
pGia
)
)
// PI
Res
=
sat_solver_var_value
(
p
->
pSat
,
Id
);
Res
=
sat_solver_var_value
(
p
->
pSat
,
Id
);
...
@@ -183,15 +185,12 @@ void Gia_ManCofOneDerive_rec( Ccf_Man_t * p, Gia_Obj_t * pObj )
...
@@ -183,15 +185,12 @@ void Gia_ManCofOneDerive_rec( Ccf_Man_t * p, Gia_Obj_t * pObj )
***********************************************************************/
***********************************************************************/
int
Gia_ManCofOneDerive
(
Ccf_Man_t
*
p
,
int
LitProp
)
int
Gia_ManCofOneDerive
(
Ccf_Man_t
*
p
,
int
LitProp
)
{
{
Gia_Obj_t
*
pObj
;
int
LitOut
;
int
LitOut
;
// get the property node
// derive the cofactor of the property node
pObj
=
Gia_ManObj
(
p
->
pFrames
,
Gia_Lit2Var
(
LitProp
)
);
// derive the cofactor
Vec_IntFill
(
p
->
vCopies
,
Gia_ManObjNum
(
p
->
pFrames
),
-
1
);
Vec_IntFill
(
p
->
vCopies
,
Gia_ManObjNum
(
p
->
pFrames
),
-
1
);
Gia_ManCofOneDerive_rec
(
p
,
pObj
);
Gia_ManCofOneDerive_rec
(
p
,
Gia_Lit2Var
(
LitProp
)
);
LitOut
=
Vec_IntEntry
(
p
->
vCopies
,
Gia_Lit2Var
(
LitProp
)
);
LitOut
=
Vec_IntEntry
(
p
->
vCopies
,
Gia_Lit2Var
(
LitProp
)
);
LitOut
=
Gia_LitNotCond
(
LitOut
,
Gia_LitIsCompl
(
LitProp
)
);
LitOut
=
Gia_LitNotCond
(
LitOut
,
Gia_LitIsCompl
(
LitProp
)
);
// add new PO for the cofactor
// add new PO for the cofactor
Gia_ManAppendCo
(
p
->
pFrames
,
LitOut
);
Gia_ManAppendCo
(
p
->
pFrames
,
LitOut
);
// add SAT clauses
// add SAT clauses
...
...
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