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
c9e520e2
Commit
c9e520e2
authored
Sep 16, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expriments with functions.
parent
d05fe039
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
17 deletions
+38
-17
abclib.dsp
+4
-0
src/base/abci/abc.c
+30
-14
src/base/wlc/wlcNdr.c
+1
-1
src/opt/dau/dauNpn.c
+2
-2
src/opt/dau/module.make
+1
-0
No files found.
abclib.dsp
View file @
c9e520e2
...
...
@@ -2955,6 +2955,10 @@ SOURCE=.\src\opt\dau\dauNpn.c
# End Source File
# Begin Source File
SOURCE=.\src\opt\dau\dauNpn2.c
# End Source File
# Begin Source File
SOURCE=.\src\opt\dau\dauTree.c
# End Source File
# End Group
...
...
src/base/abci/abc.c
View file @
c9e520e2
...
...
@@ -13214,8 +13214,8 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
}
*/
{
//
extern void Abc_EnumerateFuncs( int nDecMax, int nDivMax, int fVerbose );
// Abc_EnumerateFuncs( nDecMax, nDivMax, fVerbose
);
extern
void
Abc_EnumerateFuncs
(
int
nDecMax
,
int
nDivMax
,
int
fVerbose
);
Abc_EnumerateFuncs
(
4
,
7
,
0
);
}
/*
if ( fNewAlgo )
...
...
@@ -13266,7 +13266,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Cba_PrsReadBlifTest();
}
// Abc_NtkComputePaths( Abc_FrameReadNtk(pAbc) );
Dau_NetworkEnumTest
();
//
Dau_NetworkEnumTest();
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: test [-CKDNM] [-aovwh] <file_name>
\n
"
);
...
...
@@ -23012,10 +23012,11 @@ usage:
***********************************************************************/
int
Abc_CommandFunEnum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Dtt_EnumerateLf
(
int
nVars
,
int
nNodeMax
,
int
fVerbose
);
extern
void
Dau_FunctionEnum
(
int
nInputs
,
int
nVars
,
int
nNodeMax
,
int
fUseTwo
,
int
fReduce
,
int
fVerbose
);
int
c
,
nInputs
=
4
,
nVars
=
4
,
nNodeMax
=
32
,
fUseTwo
=
0
,
fReduce
=
0
,
fVerbose
=
0
;
int
c
,
nInputs
=
4
,
nVars
=
4
,
nNodeMax
=
32
,
fUseTwo
=
0
,
fReduce
=
0
,
f
Simple
=
0
,
f
Verbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"SIMtrvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"SIMtr
l
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -23058,6 +23059,9 @@ int Abc_CommandFunEnum( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'r'
:
fReduce
^=
1
;
break
;
case
'l'
:
fSimple
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -23068,28 +23072,40 @@ int Abc_CommandFunEnum( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
}
}
if
(
nVars
<
2
||
nVars
>
6
)
if
(
fSimple
)
{
Abc_Print
(
-
1
,
"The number of inputs should be 2 <= I <= 6.
\n
"
);
goto
usage
;
if
(
nVars
<
4
||
nVars
>
5
)
{
Abc_Print
(
-
1
,
"The number of inputs should be 4 <= I <= 5.
\n
"
);
goto
usage
;
}
Dtt_EnumerateLf
(
nVars
,
nNodeMax
,
fVerbose
);
}
if
(
nInputs
<
nVars
||
nInputs
>
6
)
else
{
Abc_Print
(
-
1
,
"The intermediate support size should be I <= S <= 6.
\n
"
);
goto
usage
;
if
(
nVars
<
2
||
nVars
>
6
)
{
Abc_Print
(
-
1
,
"The number of inputs should be 2 <= I <= 6.
\n
"
);
goto
usage
;
}
if
(
nInputs
<
nVars
||
nInputs
>
6
)
{
Abc_Print
(
-
1
,
"The intermediate support size should be I <= S <= 6.
\n
"
);
goto
usage
;
}
Dau_FunctionEnum
(
nInputs
,
nVars
,
nNodeMax
,
fUseTwo
,
fReduce
,
fVerbose
);
}
Dau_FunctionEnum
(
nInputs
,
nVars
,
nNodeMax
,
fUseTwo
,
fReduce
,
fVerbose
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: funenum [-SIM num] [-trvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: funenum [-SIM num] [-tr
l
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
enumerates minimum 2-input-gate implementations
\n
"
);
Abc_Print
(
-
2
,
"
\t
-S num : the maximum intermediate support size [default = %d]
\n
"
,
nInputs
);
Abc_Print
(
-
2
,
"
\t
-I num : the number of inputs of Boolean functions [default = %d]
\n
"
,
nVars
);
Abc_Print
(
-
2
,
"
\t
-M num : the maximum number of 2-input gates [default = %d]
\n
"
,
nNodeMax
);
Abc_Print
(
-
2
,
"
\t
-t : toggle adding combination of two gates [default = %s]
\n
"
,
fUseTwo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle reducing the last level [default = %s]
\n
"
,
fReduce
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-l : toggle generating L(f) rather than C(f) [default = %s]
\n
"
,
fSimple
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
src/base/wlc/wlcNdr.c
View file @
c9e520e2
...
...
@@ -347,7 +347,7 @@ void Wlc_NtkCheckIntegrity( void * pData )
int
Type
=
Ndr_ObjReadBody
(
p
,
Obj
,
NDR_OPERTYPE
);
int
i
,
*
pArray
,
nArray
=
Ndr_ObjReadArray
(
p
,
Obj
,
NDR_INPUT
,
&
pArray
);
for
(
i
=
0
;
i
<
nArray
;
i
++
)
if
(
Vec_IntGetEntry
(
vMap
,
pArray
[
i
])
==
0
&&
!
(
Type
==
ABC_OPER_DFFRSE
&&
i
==
7
)
)
if
(
Vec_IntGetEntry
(
vMap
,
pArray
[
i
])
==
0
&&
!
(
Type
==
ABC_OPER_DFFRSE
&&
(
i
>=
5
||
i
<=
7
)
)
)
printf
(
"Input name %d appearing as fanin %d of obj %d is not used as output name in any object.
\n
"
,
pArray
[
i
],
i
,
Obj
);
}
Vec_IntFree
(
vMap
);
...
...
src/opt/dau/dauNpn.c
View file @
c9e520e2
...
...
@@ -620,8 +620,8 @@ int Dau_InsertFunction( Abc_TtHieMan_t * pMan, word * pCur, int nNodes, int nInp
int
DumpDelta
=
1000000
;
char
Perm
[
16
]
=
{
0
};
int
nVarsNew
=
Abc_TtMinBase
(
pCur
,
NULL
,
nVars
,
nInputs
);
unsigned
Phase
=
Abc_TtCanonicizeHie
(
pMan
,
pCur
,
nVarsNew
,
Perm
,
1
);
//unsigned Phase = Dau_RunNpn( pMan, pCur, nVarsNew
, Perm );
//
unsigned Phase = Abc_TtCanonicizeHie( pMan, pCur, nVarsNew, Perm, 1 );
unsigned
Phase
=
Dau_RunNpn
(
pMan
,
pCur
,
nInputs
,
Perm
);
int
nEntries
=
Vec_MemEntryNum
(
vTtMem
);
int
Entry
=
Vec_MemHashInsert
(
vTtMem
,
pCur
);
if
(
nEntries
==
Vec_MemEntryNum
(
vTtMem
)
)
// found in the table - not new
...
...
src/opt/dau/module.make
View file @
c9e520e2
...
...
@@ -8,4 +8,5 @@ SRC += src/opt/dau/dauCanon.c \
src/opt/dau/dauMerge.c
\
src/opt/dau/dauNonDsd.c
\
src/opt/dau/dauNpn.c
\
src/opt/dau/dauNpn2.c
\
src/opt/dau/dauTree.c
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