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
cc0e5d4f
Commit
cc0e5d4f
authored
Oct 10, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added procedure to check correctness of the topo order during AIG construction.
parent
d261e617
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
src/aig/miniaig/miniaig.h
+27
-0
No files found.
src/aig/miniaig/miniaig.h
View file @
cc0e5d4f
...
...
@@ -235,6 +235,33 @@ static int Mini_AigXor( Mini_Aig_t * p, int Lit0, int Lit1 )
return
Mini_AigMux
(
p
,
Lit0
,
Mini_AigLitNot
(
Lit1
),
Lit1
);
}
// procedure to check the topological order during AIG construction
static
int
Mini_AigCheck
(
Mini_Aig_t
*
p
)
{
int
status
=
1
;
int
i
,
iFaninLit0
,
iFaninLit1
;
Mini_AigForEachAnd
(
p
,
i
)
{
// get the fanin literals of this AND node
iFaninLit0
=
Mini_AigNodeFanin0
(
p
,
i
);
iFaninLit1
=
Mini_AigNodeFanin1
(
p
,
i
);
// compare the fanin literals with the literal of the current node (2 * i)
if
(
iFaninLit0
>=
2
*
i
)
printf
(
"Fanin0 of AND node %d is not in a topological order.
\n
"
,
i
),
status
=
0
;
if
(
iFaninLit1
>=
2
*
i
)
printf
(
"Fanin0 of AND node %d is not in a topological order.
\n
"
,
i
),
status
=
0
;
}
Mini_AigForEachPo
(
p
,
i
)
{
// get the fanin literal of this PO node
iFaninLit0
=
Mini_AigNodeFanin0
(
p
,
i
);
// compare the fanin literal with the literal of the current node (2 * i)
if
(
iFaninLit0
>=
2
*
i
)
printf
(
"Fanin0 of PO node %d is not in a topological order.
\n
"
,
i
),
status
=
0
;
}
return
status
;
}
////////////////////////////////////////////////////////////////////////
...
...
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