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
edf6c137
Commit
edf6c137
authored
Sep 22, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding new command &rex2gia.
parent
7a85a0ee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
abclib.dsp
+4
-0
src/aig/gia/giaRex.c
+0
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+67
-0
No files found.
abclib.dsp
View file @
edf6c137
...
...
@@ -4267,6 +4267,10 @@ SOURCE=.\src\aig\gia\giaRetime.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaRex.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaScl.c
# End Source File
# Begin Source File
...
...
src/aig/gia/giaRex.c
0 → 100644
View file @
edf6c137
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
edf6c137
...
...
@@ -51,6 +51,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaQbf.c
\
src/aig/gia/giaResub.c
\
src/aig/gia/giaRetime.c
\
src/aig/gia/giaRex.c
\
src/aig/gia/giaScl.c
\
src/aig/gia/giaScript.c
\
src/aig/gia/giaShrink.c
\
...
...
src/base/abci/abc.c
View file @
edf6c137
...
...
@@ -345,6 +345,7 @@ static int Abc_CommandAbc9PFan ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9PSig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Status
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9MuxProfile
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Rex2Gia
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Show
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9SetRegNum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Strash
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -962,6 +963,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&psig"
,
Abc_CommandAbc9PSig
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&status"
,
Abc_CommandAbc9Status
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&profile"
,
Abc_CommandAbc9MuxProfile
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&rex2gia"
,
Abc_CommandAbc9Rex2Gia
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&show"
,
Abc_CommandAbc9Show
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&setregnum"
,
Abc_CommandAbc9SetRegNum
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&st"
,
Abc_CommandAbc9Strash
,
0
);
...
...
@@ -26930,6 +26932,71 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Rex2Gia
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManRex2Gia
(
char
*
pStr
,
int
fOrder
,
int
fVerbose
);
Gia_Man_t
*
pGia
=
NULL
;
char
*
pStr
=
NULL
;
char
**
pArgvNew
;
int
nArgcNew
;
int
c
,
fOrder
=
1
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"avh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'a'
:
fOrder
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
pArgvNew
=
argv
+
globalUtilOptind
;
nArgcNew
=
argc
-
globalUtilOptind
;
if
(
nArgcNew
!=
1
)
{
Abc_Print
(
-
1
,
"No regular expression is entered on the command line.
\n
"
);
return
1
;
}
pStr
=
pArgvNew
[
0
];
pGia
=
Gia_ManRex2Gia
(
pStr
,
fOrder
,
fVerbose
);
if
(
pGia
)
Abc_FrameUpdateGia
(
pAbc
,
pGia
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &rex2gia [-avh] [string]
\n
"
);
Abc_Print
(
-
2
,
"
\t
converts a regular expression into a sequential AIG
\n
"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle ordering input symbols alphabetically [default = %s]
\n
"
,
fOrder
?
"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
"
);
Abc_Print
(
-
2
,
"
\t
string : representation of a regular expression
\n
"
);
Abc_Print
(
-
2
,
"
\t
Special symbols: parentheses
\'
(
\'
and
\'
)
\'
, Kleene closure
\'
*
\'
, union
\'
|'
\n
"
);
Abc_Print
(
-
2
,
"
\t
All other characters are treated as symbols of the input alphabet.
\n
"
);
Abc_Print
(
-
2
,
"
\t
For example, ((A*B|AC)D) is defined over the alphabet {A, B, C, D}
\n
"
);
Abc_Print
(
-
2
,
"
\t
and generates the following language: {BD, ABD, AABD, AAABD, ..., ACD}
\n
"
);
Abc_Print
(
-
2
,
"
\t
A known limitation: For the command to work correctly, each two-input union
\n
"
);
Abc_Print
(
-
2
,
"
\t
should have a dedicated pair of parentheses: ((A|B)|C) rather than (A|B|C)
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Show
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Aig_Man_t
*
pMan
;
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