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
98e377bd
Commit
98e377bd
authored
Sep 28, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding features to CNF generation.
parent
fbc9c00f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
src/aig/gia/giaMf.c
+2
-2
src/base/io/io.c
+16
-6
No files found.
src/aig/gia/giaMf.c
View file @
98e377bd
...
...
@@ -1643,11 +1643,11 @@ Cnf_Dat_t * Mf_ManGenerateCnf( Gia_Man_t * pGia, int nLutSize, int fCnfObjIds, i
// Cnf_DataPrint( (Cnf_Dat_t *)pGia->pData, 1 );
return
pGia
->
pData
;
}
void
Mf_ManDumpCnf
(
Gia_Man_t
*
p
,
char
*
pFileName
,
int
nLutSize
,
int
fVerbose
)
void
Mf_ManDumpCnf
(
Gia_Man_t
*
p
,
char
*
pFileName
,
int
nLutSize
,
int
f
CnfObjIds
,
int
fAddOrCla
,
int
f
Verbose
)
{
abctime
clk
=
Abc_Clock
();
Cnf_Dat_t
*
pCnf
;
pCnf
=
Mf_ManGenerateCnf
(
p
,
nLutSize
,
0
,
1
,
fVerbose
);
pCnf
=
Mf_ManGenerateCnf
(
p
,
nLutSize
,
fCnfObjIds
,
fAddOrCla
,
fVerbose
);
Cnf_DataWriteIntoFile
(
pCnf
,
pFileName
,
0
,
NULL
,
NULL
);
// if ( fVerbose )
{
...
...
src/base/io/io.c
View file @
98e377bd
...
...
@@ -1939,14 +1939,16 @@ usage:
int
IoCommandWriteCnf2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Jf_ManDumpCnf
(
Gia_Man_t
*
p
,
char
*
pFileName
,
int
fVerbose
);
extern
void
Mf_ManDumpCnf
(
Gia_Man_t
*
p
,
char
*
pFileName
,
int
nLutSize
,
int
fVerbose
);
extern
void
Mf_ManDumpCnf
(
Gia_Man_t
*
p
,
char
*
pFileName
,
int
nLutSize
,
int
f
CnfObjIds
,
int
fAddOrCla
,
int
f
Verbose
);
FILE
*
pFile
;
char
*
pFileName
;
int
nLutSize
=
6
;
int
fNewAlgo
=
1
;
int
nLutSize
=
6
;
int
fNewAlgo
=
1
;
int
fCnfObjIds
=
0
;
int
fAddOrCla
=
1
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Kavh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Ka
io
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -1962,6 +1964,12 @@ int IoCommandWriteCnf2( Abc_Frame_t * pAbc, int argc, char **argv )
case
'a'
:
fNewAlgo
^=
1
;
break
;
case
'i'
:
fCnfObjIds
^=
1
;
break
;
case
'o'
:
fAddOrCla
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -2003,16 +2011,18 @@ int IoCommandWriteCnf2( Abc_Frame_t * pAbc, int argc, char **argv )
}
fclose
(
pFile
);
if
(
fNewAlgo
)
Mf_ManDumpCnf
(
pAbc
->
pGia
,
pFileName
,
nLutSize
,
fVerbose
);
Mf_ManDumpCnf
(
pAbc
->
pGia
,
pFileName
,
nLutSize
,
f
CnfObjIds
,
fAddOrCla
,
f
Verbose
);
else
Jf_ManDumpCnf
(
pAbc
->
pGia
,
pFileName
,
fVerbose
);
return
0
;
usage:
fprintf
(
pAbc
->
Err
,
"usage: &write_cnf [-Kavh] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage: &write_cnf [-Ka
io
vh] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
writes CNF produced by a new generator
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-K <num> : the LUT size (3 <= num <= 8) [default = %d]
\n
"
,
nLutSize
);
fprintf
(
pAbc
->
Err
,
"
\t
-a : toggle using new algorithm [default = %s]
\n
"
,
fNewAlgo
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-i : toggle using AIG object IDs as CNF variables [default = %s]
\n
"
,
fCnfObjIds
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-o : toggle adding OR clause for the outputs [default = %s]
\n
"
,
fAddOrCla
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : print the help massage
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
file : the name of the file to write
\n
"
);
...
...
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