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
d56570f2
Commit
d56570f2
authored
Nov 01, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to the truth table computations.
parent
ce3f8cb1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
3 deletions
+85
-3
src/base/abci/abc.c
+1
-0
src/base/abci/abcNpn.c
+15
-3
src/misc/util/utilTruth.h
+0
-0
src/opt/dau/dau.h
+69
-0
src/opt/dau/dauCanon.c
+0
-0
No files found.
src/base/abci/abc.c
View file @
d56570f2
...
...
@@ -4937,6 +4937,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
2: semi-canonical form by counting 1s in cofactors
\n
"
);
Abc_Print
(
-
2
,
"
\t
3: Jake's hybrid semi-canonical form (fast)
\n
"
);
Abc_Print
(
-
2
,
"
\t
4: Jake's hybrid semi-canonical form (high-effort)
\n
"
);
Abc_Print
(
-
2
,
"
\t
5: new fast hybrid semi-canonical form
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of support variables (binary files only) [default = unused]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping resulting functions into a file [default = %s]
\n
"
,
fDumpRes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle dumping in binary format [default = %s]
\n
"
,
fBinary
?
"yes"
:
"no"
);
...
...
src/base/abci/abcNpn.c
View file @
d56570f2
...
...
@@ -23,6 +23,7 @@
#include "bool/kit/kit.h"
#include "bool/lucky/lucky.h"
#include "opt/dau/dau.h"
ABC_NAMESPACE_IMPL_START
...
...
@@ -190,6 +191,8 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
pAlgoName
=
"Jake's hybrid fast "
;
else
if
(
NpnType
==
4
)
pAlgoName
=
"Jake's hybrid good "
;
else
if
(
NpnType
==
5
)
pAlgoName
=
"new hybrid fast "
;
assert
(
p
->
nVars
<=
16
);
if
(
pAlgoName
)
...
...
@@ -202,10 +205,8 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
{
for
(
i
=
0
;
i
<
p
->
nFuncs
;
i
++
)
{
extern
void
Abc_TtCofactorTest
(
word
*
pTruth
,
int
nVars
,
int
i
);
if
(
fVerbose
)
printf
(
"%7d : "
,
i
);
Abc_TtCofactorTest
(
p
->
pFuncs
[
i
],
p
->
nVars
,
i
);
if
(
fVerbose
)
Extra_PrintHex
(
stdout
,
(
unsigned
*
)
p
->
pFuncs
[
i
],
p
->
nVars
),
printf
(
"
\n
"
);
}
...
...
@@ -261,6 +262,17 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
Extra_PrintHex
(
stdout
,
(
unsigned
*
)
p
->
pFuncs
[
i
],
p
->
nVars
),
Abc_TruthNpnPrint
(
pCanonPerm
,
uCanonPhase
,
p
->
nVars
),
printf
(
"
\n
"
);
}
}
else
if
(
NpnType
==
5
)
{
for
(
i
=
0
;
i
<
p
->
nFuncs
;
i
++
)
{
if
(
fVerbose
)
printf
(
"%7d : "
,
i
);
uCanonPhase
=
Abc_TtCanonicize
(
p
->
pFuncs
[
i
],
p
->
nVars
,
pCanonPerm
);
if
(
fVerbose
)
Extra_PrintHex
(
stdout
,
(
unsigned
*
)
p
->
pFuncs
[
i
],
p
->
nVars
),
Abc_TruthNpnPrint
(
pCanonPerm
,
uCanonPhase
,
p
->
nVars
),
printf
(
"
\n
"
);
}
}
else
assert
(
0
);
clk
=
clock
()
-
clk
;
printf
(
"Classes =%9d "
,
Abc_TruthNpnCountUnique
(
p
)
);
...
...
@@ -324,7 +336,7 @@ int Abc_NpnTest( char * pFileName, int NpnType, int nVarNum, int fDumpRes, int f
{
if
(
fVerbose
)
printf
(
"Using truth tables from file
\"
%s
\"
...
\n
"
,
pFileName
);
if
(
NpnType
>=
0
&&
NpnType
<=
4
)
if
(
NpnType
>=
0
&&
NpnType
<=
5
)
Abc_TruthNpnTest
(
pFileName
,
NpnType
,
nVarNum
,
fDumpRes
,
fBinary
,
fVerbose
);
else
printf
(
"Unknown canonical form value (%d).
\n
"
,
NpnType
);
...
...
src/misc/util/utilTruth.h
View file @
d56570f2
This diff is collapsed.
Click to expand it.
src/opt/dau/dau.h
0 → 100644
View file @
d56570f2
/**CFile****************************************************************
FileName [dau.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [DAG-aware unmapping.]
Synopsis [External declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: dau.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#ifndef ABC__DAU___h
#define ABC__DAU___h
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "misc/vec/vec.h"
////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_HEADER_START
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
/*=== dauCanon.c ==========================================================*/
extern
unsigned
Abc_TtCanonicize
(
word
*
pTruth
,
int
nVars
,
char
*
pCanonPerm
);
ABC_NAMESPACE_HEADER_END
#endif
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
src/opt/dau/dauCanon.c
View file @
d56570f2
This diff is collapsed.
Click to expand it.
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