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
1c990fc4
Commit
1c990fc4
authored
Jun 10, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with path enumeration.
parent
dca22182
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
2 deletions
+60
-2
src/base/abci/abc.c
+60
-2
src/misc/extra/extraUtilPath.c
+0
-0
No files found.
src/base/abci/abc.c
View file @
1c990fc4
...
...
@@ -315,6 +315,7 @@ static int Abc_CommandInsWin ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandPermute
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandUnpermute
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandCubeEnum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandPathEnum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandCec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandDCec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -1001,6 +1002,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"permute"
,
Abc_CommandPermute
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"unpermute"
,
Abc_CommandUnpermute
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"cubeenum"
,
Abc_CommandCubeEnum
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"pathenum"
,
Abc_CommandPathEnum
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Verification"
,
"cec"
,
Abc_CommandCec
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Verification"
,
"dcec"
,
Abc_CommandDCec
,
0
);
...
...
@@ -12945,7 +12947,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
int
nCutMax
=
1
;
int
nLeafMax
=
4
;
int
nDivMax
=
2
;
int
nDecMax
=
70
;
int
nDecMax
=
3
;
int
nNumOnes
=
4
;
int
fNewAlgo
=
0
;
int
fNewOrder
=
0
;
...
...
@@ -13150,7 +13152,6 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Cba_PrsReadBlifTest();
}
// Abc_NtkComputePaths( Abc_FrameReadNtk(pAbc) );
// Abc_EnumeratePathsTest();
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: test [-CKDNM] [-aovwh] <file_name>
\n
"
);
...
...
@@ -22826,6 +22827,63 @@ usage:
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandPathEnum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Abc_EnumerateFrontierTest
(
int
nSize
);
int
c
,
nSize
=
4
,
fZddAlgo
=
0
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Nzvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'N'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nSize
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nSize
<
0
)
goto
usage
;
break
;
case
'z'
:
fZddAlgo
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
Abc_Print
(
-
2
,
"Unknown switch.
\n
"
);
goto
usage
;
}
}
Abc_EnumerateFrontierTest
(
nSize
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: pathenum [-N num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
enumerates self-avoiding paths on the NxN grid
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N num : the size of the grid to consider [default = %d]
\n
"
,
nSize
);
// Abc_Print( -2, "\t-z : toggle using ZDD-based algorithm [default = %s]\n", fZddAlgo? "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
;
}
/**Function*************************************************************
src/misc/extra/extraUtilPath.c
View file @
1c990fc4
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