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
a3620fe6
Commit
a3620fe6
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 (compiler warnings).
parent
dbaa6a58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
src/opt/dau/dauNpn.c
+9
-6
src/opt/dau/dauNpn2.c
+5
-4
No files found.
src/opt/dau/dauNpn.c
View file @
a3620fe6
...
...
@@ -51,8 +51,6 @@ void Dau_TruthEnum(int nVars)
abctime
clk
=
Abc_Clock
();
int
nSizeLog
=
(
1
<<
nVars
)
-
2
;
int
nSizeW
=
1
<<
nSizeLog
;
char
pFileName
[
20
];
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
int
nPerms
=
Extra_Factorial
(
nVars
);
int
nMints
=
1
<<
nVars
;
int
*
pPerm
=
Extra_PermSchedule
(
nVars
);
...
...
@@ -115,8 +113,12 @@ void Dau_TruthEnum(int nVars)
// write into file
if
(
pTable
)
{
FILE
*
pFile
=
fopen
(
pFileName
,
"wb"
);
int
RetValue
=
fwrite
(
pTable
,
8
,
nSizeW
,
pFile
);
FILE
*
pFile
;
int
RetValue
;
char
pFileName
[
20
];
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
pFile
=
fopen
(
pFileName
,
"wb"
);
RetValue
=
fwrite
(
pTable
,
8
,
nSizeW
,
pFile
);
RetValue
=
0
;
fclose
(
pFile
);
ABC_FREE
(
pTable
);
...
...
@@ -179,12 +181,13 @@ void Dau_NetworkEnum(int nVars)
int
nSizeLog
=
(
1
<<
nVars
)
-
2
;
int
nSizeW
=
1
<<
nSizeLog
;
char
pFileName
[
20
];
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
unsigned
*
pTable
=
Dau_ReadFile
(
pFileName
,
nSizeW
);
unsigned
*
pTable
;
Vec_Wec_t
*
vNpns
=
Vec_WecStart
(
32
);
Vec_Wec_t
*
vNpns_
=
Vec_WecStart
(
32
);
int
i
,
v
,
u
,
g
,
k
,
m
,
n
,
Res
,
Entry
;
unsigned
Inv
=
(
unsigned
)
Abc_Tt6Mask
(
1
<<
(
nVars
-
1
));
sprintf
(
pFileName
,
"tableW%d.data"
,
nSizeLog
);
pTable
=
Dau_ReadFile
(
pFileName
,
nSizeW
);
// create constant function and buffer/inverter function
pTable
[
0
]
|=
(
1
<<
31
);
pTable
[
Inv
]
|=
(
1
<<
31
);
...
...
src/opt/dau/dauNpn2.c
View file @
a3620fe6
...
...
@@ -311,10 +311,12 @@ Gia_Man_t * Dau_ConstructAigFromFile( char * pFileName )
unsigned
*
Dau_ReadFile2
(
char
*
pFileName
,
int
nSizeW
)
{
abctime
clk
=
Abc_Clock
();
unsigned
*
p
;
int
RetValue
;
FILE
*
pFile
=
fopen
(
pFileName
,
"rb"
);
if
(
pFile
==
NULL
)
return
NULL
;
unsigned
*
p
=
(
unsigned
*
)
ABC_CALLOC
(
word
,
nSizeW
);
int
RetValue
=
pFile
?
fread
(
p
,
sizeof
(
word
),
nSizeW
,
pFile
)
:
0
;
p
=
(
unsigned
*
)
ABC_CALLOC
(
word
,
nSizeW
);
RetValue
=
pFile
?
fread
(
p
,
sizeof
(
word
),
nSizeW
,
pFile
)
:
0
;
RetValue
=
0
;
if
(
pFile
)
{
...
...
@@ -342,8 +344,7 @@ void Dtt_ManRenum( int nVars, unsigned * pTable, int * pnClasses )
}
unsigned
*
Dtt_ManLoadClasses
(
int
nVars
,
int
*
pnClasses
)
{
extern
Dau_TruthEnum
(
int
);
extern
void
Dau_TruthEnum
(
int
nVars
);
unsigned
*
pTable
=
NULL
;
int
nSizeLog
=
(
1
<<
nVars
)
-
2
;
int
nSizeW
=
1
<<
nSizeLog
;
...
...
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