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
dbaa6a58
Commit
dbaa6a58
authored
Apr 18, 2019
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling dumping of the library of minimum circuits (file support).
parent
3709744c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
28 deletions
+25
-28
src/opt/dau/dauNpn.c
+12
-23
src/opt/dau/dauNpn2.c
+13
-5
No files found.
src/opt/dau/dauNpn.c
View file @
dbaa6a58
...
@@ -29,7 +29,6 @@ ABC_NAMESPACE_IMPL_START
...
@@ -29,7 +29,6 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
//#define USE4VARS 1
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
/// FUNCTION DEFINITIONS ///
...
@@ -46,19 +45,14 @@ ABC_NAMESPACE_IMPL_START
...
@@ -46,19 +45,14 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Dau_TruthEnum
()
void
Dau_TruthEnum
(
int
nVars
)
{
{
int
fUseTable
=
1
;
int
fUseTable
=
1
;
abctime
clk
=
Abc_Clock
();
abctime
clk
=
Abc_Clock
();
#ifdef USE4VARS
int
nSizeLog
=
(
1
<<
nVars
)
-
2
;
int
nVars
=
4
;
int
nSizeW
=
1
<<
nSizeLog
;
int
nSizeW
=
1
<<
14
;
char
pFileName
[
20
];
char
*
pFileName
=
"tableW14.data"
;
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
#else
int
nVars
=
5
;
int
nSizeW
=
1
<<
30
;
char
*
pFileName
=
"tableW30.data"
;
#endif
int
nPerms
=
Extra_Factorial
(
nVars
);
int
nPerms
=
Extra_Factorial
(
nVars
);
int
nMints
=
1
<<
nVars
;
int
nMints
=
1
<<
nVars
;
int
*
pPerm
=
Extra_PermSchedule
(
nVars
);
int
*
pPerm
=
Extra_PermSchedule
(
nVars
);
...
@@ -177,20 +171,15 @@ int Dau_AddFunction( word tCur, int nVars, unsigned * pTable, Vec_Int_t * vNpns,
...
@@ -177,20 +171,15 @@ int Dau_AddFunction( word tCur, int nVars, unsigned * pTable, Vec_Int_t * vNpns,
}
}
return
0
;
return
0
;
}
}
void
Dau_NetworkEnum
()
void
Dau_NetworkEnum
(
int
nVars
)
{
{
abctime
clk
=
Abc_Clock
();
abctime
clk
=
Abc_Clock
();
int
Limit
=
2
;
int
Limit
=
2
;
int
UseTwo
=
0
;
int
UseTwo
=
0
;
#ifdef USE4VARS
int
nSizeLog
=
(
1
<<
nVars
)
-
2
;
int
nVars
=
4
;
int
nSizeW
=
1
<<
nSizeLog
;
int
nSizeW
=
1
<<
14
;
char
pFileName
[
20
];
char
*
pFileName
=
"tableW14.data"
;
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
#else
int
nVars
=
5
;
int
nSizeW
=
1
<<
30
;
char
*
pFileName
=
"tableW30.data"
;
#endif
unsigned
*
pTable
=
Dau_ReadFile
(
pFileName
,
nSizeW
);
unsigned
*
pTable
=
Dau_ReadFile
(
pFileName
,
nSizeW
);
Vec_Wec_t
*
vNpns
=
Vec_WecStart
(
32
);
Vec_Wec_t
*
vNpns
=
Vec_WecStart
(
32
);
Vec_Wec_t
*
vNpns_
=
Vec_WecStart
(
32
);
Vec_Wec_t
*
vNpns_
=
Vec_WecStart
(
32
);
...
@@ -380,8 +369,8 @@ void Dau_NetworkEnum()
...
@@ -380,8 +369,8 @@ void Dau_NetworkEnum()
}
}
void
Dau_NetworkEnumTest
()
void
Dau_NetworkEnumTest
()
{
{
//Dau_TruthEnum();
//Dau_TruthEnum(
3
);
Dau_NetworkEnum
();
Dau_NetworkEnum
(
4
);
}
}
...
...
src/opt/dau/dauNpn2.c
View file @
dbaa6a58
...
@@ -312,6 +312,7 @@ unsigned * Dau_ReadFile2( char * pFileName, int nSizeW )
...
@@ -312,6 +312,7 @@ unsigned * Dau_ReadFile2( char * pFileName, int nSizeW )
{
{
abctime
clk
=
Abc_Clock
();
abctime
clk
=
Abc_Clock
();
FILE
*
pFile
=
fopen
(
pFileName
,
"rb"
);
FILE
*
pFile
=
fopen
(
pFileName
,
"rb"
);
if
(
pFile
==
NULL
)
return
NULL
;
unsigned
*
p
=
(
unsigned
*
)
ABC_CALLOC
(
word
,
nSizeW
);
unsigned
*
p
=
(
unsigned
*
)
ABC_CALLOC
(
word
,
nSizeW
);
int
RetValue
=
pFile
?
fread
(
p
,
sizeof
(
word
),
nSizeW
,
pFile
)
:
0
;
int
RetValue
=
pFile
?
fread
(
p
,
sizeof
(
word
),
nSizeW
,
pFile
)
:
0
;
RetValue
=
0
;
RetValue
=
0
;
...
@@ -341,12 +342,19 @@ void Dtt_ManRenum( int nVars, unsigned * pTable, int * pnClasses )
...
@@ -341,12 +342,19 @@ void Dtt_ManRenum( int nVars, unsigned * pTable, int * pnClasses )
}
}
unsigned
*
Dtt_ManLoadClasses
(
int
nVars
,
int
*
pnClasses
)
unsigned
*
Dtt_ManLoadClasses
(
int
nVars
,
int
*
pnClasses
)
{
{
extern
Dau_TruthEnum
(
int
);
unsigned
*
pTable
=
NULL
;
unsigned
*
pTable
=
NULL
;
if
(
nVars
==
4
)
int
nSizeLog
=
(
1
<<
nVars
)
-
2
;
pTable
=
Dau_ReadFile2
(
"tableW14.data"
,
1
<<
14
);
int
nSizeW
=
1
<<
nSizeLog
;
else
if
(
nVars
==
5
)
char
pFileName
[
20
];
pTable
=
Dau_ReadFile2
(
"tableW30.data"
,
1
<<
30
);
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
else
assert
(
0
);
pTable
=
Dau_ReadFile2
(
pFileName
,
nSizeW
);
if
(
pTable
==
NULL
)
{
Dau_TruthEnum
(
nVars
);
pTable
=
Dau_ReadFile2
(
pFileName
,
nSizeW
);
}
Dtt_ManRenum
(
nVars
,
pTable
,
pnClasses
);
Dtt_ManRenum
(
nVars
,
pTable
,
pnClasses
);
return
pTable
;
return
pTable
;
}
}
...
...
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