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
3fb3c6bd
Commit
3fb3c6bd
authored
Aug 01, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with function enumeration.
parent
905a6277
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
12 deletions
+57
-12
src/opt/dau/dauNpn.c
+57
-12
No files found.
src/opt/dau/dauNpn.c
View file @
3fb3c6bd
...
...
@@ -194,15 +194,28 @@ void Dau_NetworkEnum()
//Dau_DsdPrintFromTruth( &uTruth, 4 );
for
(
v
=
0
;
v
<
nSupp
;
v
++
)
{
word
tGate
,
tCur
;
word
Cof0
=
Abc_Tt6Cofactor0
(
uTruth
,
nVars
-
1
-
v
);
word
Cof1
=
Abc_Tt6Cofactor1
(
uTruth
,
nVars
-
1
-
v
);
for
(
g
=
0
;
g
<
Limit
;
g
++
)
{
if
(
nSupp
<
nVars
)
{
word
tGate
=
g
?
s_Truths6
[
nVars
-
1
-
v
]
^
s_Truths6
[
nVars
-
1
-
nSupp
]
:
s_Truths6
[
nVars
-
1
-
v
]
&
s_Truths6
[
nVars
-
1
-
nSupp
];
word
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
if
(
g
==
0
)
{
tGate
=
s_Truths6
[
nVars
-
1
-
v
]
&
s_Truths6
[
nVars
-
1
-
nSupp
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
}
else
{
tGate
=
s_Truths6
[
nVars
-
1
-
v
]
^
s_Truths6
[
nVars
-
1
-
nSupp
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
}
}
}
for
(
g
=
0
;
g
<
Limit
;
g
++
)
...
...
@@ -210,13 +223,26 @@ void Dau_NetworkEnum()
// add one cross bar
for
(
k
=
0
;
k
<
nSupp
;
k
++
)
if
(
k
!=
v
)
{
word
tGate
=
g
?
s_Truths6
[
nVars
-
1
-
v
]
^
s_Truths6
[
nVars
-
1
-
k
]
:
s_Truths6
[
nVars
-
1
-
v
]
&
s_Truths6
[
nVars
-
1
-
k
];
word
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
if
(
g
==
0
)
{
tGate
=
s_Truths6
[
nVars
-
1
-
v
]
&
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tGate
=
s_Truths6
[
nVars
-
1
-
v
]
&
~
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
if
(
g
==
0
)
// skip XOR
}
else
{
word
tGate
=
s_Truths6
[
nVars
-
1
-
v
]
&
~
s_Truths6
[
nVars
-
1
-
k
];
word
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
tGate
=
s_Truths6
[
nVars
-
1
-
v
]
^
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
}
}
...
...
@@ -227,22 +253,41 @@ void Dau_NetworkEnum()
for
(
k
=
0
;
k
<
nSupp
;
k
++
)
if
(
k
!=
v
)
for
(
m
=
k
+
1
;
m
<
nSupp
;
m
++
)
if
(
m
!=
v
)
{
word
tGate
=
g
?
s_Truths6
[
nVars
-
1
-
m
]
^
s_Truths6
[
nVars
-
1
-
k
]
:
s_Truths6
[
nVars
-
1
-
m
]
&
s_Truths6
[
nVars
-
1
-
k
];
word
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
if
(
g
==
0
)
// skip XOR
if
(
g
==
0
)
{
tGate
=
s_Truths6
[
nVars
-
1
-
m
]
&
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tGate
=
s_Truths6
[
nVars
-
1
-
m
]
&
~
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tGate
=
~
s_Truths6
[
nVars
-
1
-
m
]
&
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tGate
=
~
s_Truths6
[
nVars
-
1
-
m
]
&
~
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
tCur
=
(
tGate
&
Cof0
)
|
(
~
tGate
&
Cof1
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
}
else
{
tGate
=
s_Truths6
[
nVars
-
1
-
m
]
^
s_Truths6
[
nVars
-
1
-
k
];
tCur
=
(
tGate
&
Cof1
)
|
(
~
tGate
&
Cof0
);
Dau_AddFunction
(
tCur
,
nVars
,
pTable
,
vNpns
);
}
}
}
...
...
@@ -252,7 +297,7 @@ void Dau_NetworkEnum()
//printf("Finished %d nodes with %d functions.\n", Count++, Vec_IntSize(vNpns) );
iPrev
=
iLast
;
iLast
=
Vec_IntSize
(
vNpns
)
-
1
;
printf
(
"Finished %2d nodes with %6d functions ou
r
of %6d. "
,
Count
++
,
iLast
-
iPrev
,
Vec_IntSize
(
vNpns
)
);
printf
(
"Finished %2d nodes with %6d functions ou
t
of %6d. "
,
Count
++
,
iLast
-
iPrev
,
Vec_IntSize
(
vNpns
)
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
fflush
(
stdout
);
}
...
...
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