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
b2dfa013
Commit
b2dfa013
authored
Jun 08, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding command 'srm2' (additional feature).
parent
11f684c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
src/aig/gia/giaEquiv.c
+9
-1
src/base/abci/abc.c
+13
-4
No files found.
src/aig/gia/giaEquiv.c
View file @
b2dfa013
...
@@ -887,7 +887,7 @@ Gia_Man_t * Gia_ManSpecReduceTrace( Gia_Man_t * p, Vec_Int_t * vTrace )
...
@@ -887,7 +887,7 @@ Gia_Man_t * Gia_ManSpecReduceTrace( Gia_Man_t * p, Vec_Int_t * vTrace )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Gia_ManFilterEquivsForSpeculation
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
)
int
Gia_ManFilterEquivsForSpeculation
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
,
int
fLatchA
,
int
fLatchB
)
{
{
Gia_Man_t
*
pGia1
,
*
pGia2
,
*
pMiter
;
Gia_Man_t
*
pGia1
,
*
pGia2
,
*
pMiter
;
Gia_Obj_t
*
pObj1
,
*
pObj2
,
*
pObjM
,
*
pObj
;
Gia_Obj_t
*
pObj1
,
*
pObj2
,
*
pObjM
,
*
pObj
;
...
@@ -969,9 +969,17 @@ int Gia_ManFilterEquivsForSpeculation( Gia_Man_t * pGia, char * pName1, char * p
...
@@ -969,9 +969,17 @@ int Gia_ManFilterEquivsForSpeculation( Gia_Man_t * pGia, char * pName1, char * p
{
{
pObj
=
Gia_ManObj
(
pGia
,
iObj
);
pObj
=
Gia_ManObj
(
pGia
,
iObj
);
if
(
ClassA
==
-
1
&&
pObj
->
fMark0
&&
!
pObj
->
fMark1
)
if
(
ClassA
==
-
1
&&
pObj
->
fMark0
&&
!
pObj
->
fMark1
)
{
if
(
fLatchA
&&
!
Gia_ObjIsRo
(
pGia
,
pObj
)
)
continue
;
ClassA
=
iObj
;
ClassA
=
iObj
;
}
if
(
ClassB
==
-
1
&&
pObj
->
fMark1
&&
!
pObj
->
fMark0
)
if
(
ClassB
==
-
1
&&
pObj
->
fMark1
&&
!
pObj
->
fMark0
)
{
if
(
fLatchB
&&
!
Gia_ObjIsRo
(
pGia
,
pObj
)
)
continue
;
ClassB
=
iObj
;
ClassB
=
iObj
;
}
}
}
// undo equivalence classes
// undo equivalence classes
for
(
iObj
=
i
,
iNext
=
Gia_ObjNext
(
pGia
,
iObj
);
iObj
;
for
(
iObj
=
i
,
iNext
=
Gia_ObjNext
(
pGia
,
iObj
);
iObj
;
...
...
src/base/abci/abc.c
View file @
b2dfa013
...
@@ -26278,15 +26278,22 @@ usage:
...
@@ -26278,15 +26278,22 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Srm2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Srm2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
int
Gia_ManFilterEquivsForSpeculation
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
);
extern
int
Gia_ManFilterEquivsForSpeculation
(
Gia_Man_t
*
pGia
,
char
*
pName1
,
char
*
pName2
,
int
fLatchA
,
int
fLatchB
);
char
pFileName
[
10
],
*
pFileName1
,
*
pFileName2
;
char
pFileName
[
10
],
*
pFileName1
,
*
pFileName2
;
Gia_Man_t
*
pTemp
,
*
pAux
;
Gia_Man_t
*
pTemp
,
*
pAux
;
int
fLatchA
=
0
,
fLatchB
=
0
;
int
c
,
fVerbose
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
ab
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
case
'a'
:
fLatchA
^=
1
;
break
;
case
'b'
:
fLatchB
^=
1
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
...
@@ -26324,7 +26331,7 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -26324,7 +26331,7 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv )
memcpy
(
pTemp
->
pNexts
,
pAbc
->
pGia
->
pNexts
,
sizeof
(
int
)
*
Gia_ManObjNum
(
pTemp
)
);
memcpy
(
pTemp
->
pNexts
,
pAbc
->
pGia
->
pNexts
,
sizeof
(
int
)
*
Gia_ManObjNum
(
pTemp
)
);
//Gia_ManPrintStats( pTemp, 0 );
//Gia_ManPrintStats( pTemp, 0 );
// filter the classes
// filter the classes
if
(
!
Gia_ManFilterEquivsForSpeculation
(
pTemp
,
pFileName1
,
pFileName2
)
)
if
(
!
Gia_ManFilterEquivsForSpeculation
(
pTemp
,
pFileName1
,
pFileName2
,
fLatchA
,
fLatchB
)
)
{
{
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
Abc_Print
(
-
1
,
"Filtering equivalences has failed.
\n
"
);
Abc_Print
(
-
1
,
"Filtering equivalences has failed.
\n
"
);
...
@@ -26346,9 +26353,11 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -26346,9 +26353,11 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &srm2 [-vh] <PartA_FileName> <PartB_FileName>
\n
"
);
Abc_Print
(
-
2
,
"usage: &srm2 [-
ab
vh] <PartA_FileName> <PartB_FileName>
\n
"
);
Abc_Print
(
-
2
,
"
\t
writes speculatively reduced model into file
\"
%s
\"\n
"
,
pFileName
);
Abc_Print
(
-
2
,
"
\t
writes speculatively reduced model into file
\"
%s
\"\n
"
,
pFileName
);
Abc_Print
(
-
2
,
"
\t
only preserves equivalences across PartA and PartB
\n
"
);
Abc_Print
(
-
2
,
"
\t
only preserves equivalences across PartA and PartB
\n
"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle using latches only in PartA [default = %s]
\n
"
,
fLatchA
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle using latches only in PartB [default = %s]
\n
"
,
fLatchB
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"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
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
...
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