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
6ecc71f8
Commit
6ecc71f8
authored
May 19, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc changes.
parent
37a3e07d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
1 deletions
+69
-1
src/aig/gia/gia.h
+2
-0
src/aig/gia/giaEquiv.c
+1
-1
src/aig/gia/giaUtil.c
+66
-0
No files found.
src/aig/gia/gia.h
View file @
6ecc71f8
...
...
@@ -853,7 +853,9 @@ extern int Gia_ObjRecognizeExor( Gia_Obj_t * pObj, Gia_Obj_t **
extern
Gia_Obj_t
*
Gia_ObjRecognizeMux
(
Gia_Obj_t
*
pNode
,
Gia_Obj_t
**
ppNodeT
,
Gia_Obj_t
**
ppNodeE
);
extern
int
Gia_NodeMffcSize
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pNode
);
extern
int
Gia_ManHasChoices
(
Gia_Man_t
*
p
);
extern
void
Gia_ManVerifyChoices
(
Gia_Man_t
*
p
);
extern
int
Gia_ManHasDangling
(
Gia_Man_t
*
p
);
extern
int
Gia_ManMarkDangling
(
Gia_Man_t
*
p
);
extern
Vec_Int_t
*
Gia_ManGetDangling
(
Gia_Man_t
*
p
);
extern
void
Gia_ObjPrint
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
int
Gia_ManVerifyCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
,
int
fDualOut
);
...
...
src/aig/gia/giaEquiv.c
View file @
6ecc71f8
...
...
@@ -53,7 +53,7 @@ int Gia_ManCheckTopoOrder_rec( Gia_Man_t * p, Gia_Obj_t * pObj )
return
0
;
if
(
!
Gia_ManCheckTopoOrder_rec
(
p
,
Gia_ObjFanin1
(
pObj
)
)
)
return
0
;
pRepr
=
Gia_ObjReprObj
(
p
,
Gia_ObjId
(
p
,
pObj
)
)
;
pRepr
=
p
->
pReprs
?
Gia_ObjReprObj
(
p
,
Gia_ObjId
(
p
,
pObj
)
)
:
NULL
;
return
pRepr
==
NULL
||
pRepr
->
Value
==
0
;
}
...
...
src/aig/gia/giaUtil.c
View file @
6ecc71f8
...
...
@@ -963,6 +963,41 @@ int Gia_ManHasChoices( Gia_Man_t * p )
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ManVerifyChoices
(
Gia_Man_t
*
p
)
{
Gia_Obj_t
*
pObj
;
int
i
,
fProb
=
0
;
assert
(
p
->
pReprs
);
Gia_ManForEachObj
(
p
,
pObj
,
i
)
{
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
if
(
Gia_ObjHasRepr
(
p
,
Gia_ObjFaninId0
(
pObj
,
i
))
)
printf
(
"Fanin 0 of AND node %d has a repr.
\n
"
,
i
),
fProb
=
1
;
if
(
Gia_ObjHasRepr
(
p
,
Gia_ObjFaninId1
(
pObj
,
i
))
)
printf
(
"Fanin 1 of AND node %d has a repr.
\n
"
,
i
),
fProb
=
1
;
}
else
if
(
Gia_ObjIsCo
(
pObj
)
)
{
if
(
Gia_ObjHasRepr
(
p
,
Gia_ObjFaninId0
(
pObj
,
i
))
)
printf
(
"Fanin 0 of CO node %d has a repr.
\n
"
,
i
),
fProb
=
1
;
}
}
if
(
!
fProb
)
printf
(
"GIA with choices is correct.
\n
"
);
}
/**Function*************************************************************
Synopsis [Returns 1 if AIG has dangling nodes.]
Description []
...
...
@@ -1004,6 +1039,37 @@ int Gia_ManHasDangling( Gia_Man_t * p )
SeeAlso []
***********************************************************************/
int
Gia_ManMarkDangling
(
Gia_Man_t
*
p
)
{
Gia_Obj_t
*
pObj
;
int
i
,
Counter
=
0
;
Gia_ManForEachObj
(
p
,
pObj
,
i
)
{
pObj
->
fMark0
=
0
;
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
Gia_ObjFanin0
(
pObj
)
->
fMark0
=
1
;
Gia_ObjFanin1
(
pObj
)
->
fMark0
=
1
;
}
else
if
(
Gia_ObjIsCo
(
pObj
)
)
Gia_ObjFanin0
(
pObj
)
->
fMark0
=
1
;
}
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
Counter
+=
!
pObj
->
fMark0
;
return
Counter
;
}
/**Function*************************************************************
Synopsis [Returns 1 if AIG has dangling nodes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t
*
Gia_ManGetDangling
(
Gia_Man_t
*
p
)
{
Vec_Int_t
*
vDangles
;
...
...
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