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
68c79ee8
Commit
68c79ee8
authored
Jun 15, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command &filter to filter equiv classes.
parent
dcd95cac
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
1 deletions
+83
-1
src/aig/gia/gia.h
+3
-0
src/aig/gia/giaEquiv.c
+0
-0
src/base/abci/abc.c
+80
-1
No files found.
src/aig/gia/gia.h
View file @
68c79ee8
...
...
@@ -675,6 +675,9 @@ extern void Gia_ManEquivImprove( Gia_Man_t * p );
extern
Gia_Man_t
*
Gia_ManEquivToChoices
(
Gia_Man_t
*
p
,
int
nSnapshots
);
extern
int
Gia_ManCountChoiceNodes
(
Gia_Man_t
*
p
);
extern
int
Gia_ManCountChoices
(
Gia_Man_t
*
p
);
extern
int
Gia_ManFilterEquivsForSpeculation
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
,
int
fLatchA
,
int
fLatchB
);
extern
int
Gia_ManFilterEquivsUsingParts
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
);
extern
void
Gia_ManFilterEquivsUsingLatches
(
Gia_Man_t
*
pGia
,
int
fFlopsOnly
,
int
fFlopsWith
);
/*=== giaFanout.c =========================================================*/
extern
void
Gia_ObjAddFanout
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Gia_Obj_t
*
pFanout
);
extern
void
Gia_ObjRemoveFanout
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Gia_Obj_t
*
pFanout
);
...
...
src/aig/gia/giaEquiv.c
View file @
68c79ee8
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
68c79ee8
...
...
@@ -357,6 +357,7 @@ static int Abc_CommandAbc9Sat ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Fraig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Srm
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Srm2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Filter
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reduce
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9EquivMark
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Cec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -773,6 +774,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&fraig"
,
Abc_CommandAbc9Fraig
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&srm"
,
Abc_CommandAbc9Srm
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&srm2"
,
Abc_CommandAbc9Srm2
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&filter"
,
Abc_CommandAbc9Filter
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reduce"
,
Abc_CommandAbc9Reduce
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&equiv_mark"
,
Abc_CommandAbc9EquivMark
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&cec"
,
Abc_CommandAbc9Cec
,
0
);
...
...
@@ -26279,7 +26281,6 @@ usage:
***********************************************************************/
int
Abc_CommandAbc9Srm2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
int
Gia_ManFilterEquivsForSpeculation
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
,
int
fLatchA
,
int
fLatchB
);
char
pFileName
[
10
],
*
pFileName1
,
*
pFileName2
;
Gia_Man_t
*
pTemp
,
*
pAux
;
int
fLatchA
=
0
,
fLatchB
=
0
;
...
...
@@ -26375,6 +26376,84 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Filter
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
char
*
pFileName1
=
NULL
,
*
pFileName2
=
NULL
;
int
fFlopsOnly
=
0
,
fFlopsWith
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"fgvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'f'
:
fFlopsOnly
^=
1
;
break
;
case
'g'
:
fFlopsWith
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Srm2(): There is no AIG.
\n
"
);
return
1
;
}
if
(
pAbc
->
pGia
->
pReprs
==
NULL
||
pAbc
->
pGia
->
pNexts
==
NULL
)
{
Abc_Print
(
-
1
,
"Equivalences are not defined.
\n
"
);
return
0
;
}
if
(
argc
!=
globalUtilOptind
&&
argc
!=
globalUtilOptind
+
2
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Srm2(): Expecting two file names on the command line.
\n
"
);
return
1
;
}
// filter using one of the choices
if
(
fFlopsOnly
^
fFlopsWith
)
Gia_ManFilterEquivsUsingLatches
(
pAbc
->
pGia
,
fFlopsOnly
,
fFlopsWith
);
// get the input file name
if
(
argc
==
globalUtilOptind
+
2
)
{
pFileName1
=
argv
[
globalUtilOptind
];
pFileName2
=
argv
[
globalUtilOptind
+
1
];
if
(
!
Gia_ManFilterEquivsUsingParts
(
pAbc
->
pGia
,
pFileName1
,
pFileName2
)
)
{
Abc_Print
(
-
1
,
"Filtering equivalences using PartA and PartB has failed.
\n
"
);
return
1
;
}
}
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &filter [-fgvh] <PartA_FileName> <PartB_FileName>
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs filtering of equivalence classes
\n
"
);
Abc_Print
(
-
2
,
"
\t
(if Parts A/B are given, removes classes composed of one part)
\n
"
);
Abc_Print
(
-
2
,
"
\t
-f : toggle removing all elements except flops [default = %s]
\n
"
,
fFlopsOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle removing removing classes without flops [default = %s]
\n
"
,
fFlopsWith
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Reduce
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Gia_Man_t
*
pTemp
,
*
pTemp2
;
...
...
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