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
2bf7454b
Commit
2bf7454b
authored
Apr 28, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added supporting dual-output seq miters in &iso.
parent
a4baba2c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
8 deletions
+47
-8
src/aig/gia/gia.h
+1
-1
src/aig/gia/giaIso.c
+38
-3
src/base/abci/abc.c
+8
-4
No files found.
src/aig/gia/gia.h
View file @
2bf7454b
...
...
@@ -752,7 +752,7 @@ extern int Gia_ManHashLookup( Gia_Man_t * p, Gia_Obj_t * p0, Gia
extern
void
Gia_ManPrintNpnClasses
(
Gia_Man_t
*
p
);
/*=== giaIso.c ===========================================================*/
extern
Gia_Man_t
*
Gia_ManIsoCanonicize
(
Gia_Man_t
*
p
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManIsoReduce
(
Gia_Man_t
*
p
,
Vec_Ptr_t
**
pvPosEquivs
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManIsoReduce
(
Gia_Man_t
*
p
,
Vec_Ptr_t
**
pvPosEquivs
,
int
f
DualOut
,
int
f
Verbose
);
/*=== giaLogic.c ===========================================================*/
extern
void
Gia_ManTestDistance
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSolveProblem
(
Gia_Man_t
*
pGia
,
Emb_Par_t
*
pPars
);
...
...
src/aig/gia/giaIso.c
View file @
2bf7454b
...
...
@@ -775,7 +775,7 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
break
;
}
Gia_IsoReportTopmost
(
p
);
//
Gia_IsoReportTopmost( p );
while
(
Vec_IntSize
(
p
->
vClasses
)
>
0
)
{
...
...
@@ -1063,19 +1063,33 @@ Vec_Str_t * Gia_ManIsoFindString( Gia_Man_t * p, int iPo, int fVerbose )
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManIsoReduce
(
Gia_Man_t
*
p
,
Vec_Ptr_t
**
pvPosEquivs
,
int
fVerbose
)
Gia_Man_t
*
Gia_ManIsoReduce
(
Gia_Man_t
*
p
Init
,
Vec_Ptr_t
**
pvPosEquivs
,
int
fDualOut
,
int
fVerbose
)
{
int
fVeryVerbose
=
0
;
Gia_Man_t
*
pPart
;
Gia_Man_t
*
p
,
*
p
Part
;
Vec_Ptr_t
*
vEquivs
,
*
vEquivs2
,
*
vStrings
;
Vec_Int_t
*
vRemain
,
*
vLevel
,
*
vLevel2
;
Vec_Str_t
*
vStr
,
*
vStr2
;
int
i
,
k
,
s
,
sStart
,
Entry
,
Counter
,
clk
=
clock
();
if
(
fDualOut
)
{
assert
(
(
Gia_ManPoNum
(
pInit
)
&
1
)
==
0
);
p
=
Gia_ManTransformMiter
(
pInit
);
p
=
Gia_ManSeqStructSweep
(
pPart
=
p
,
1
,
1
,
0
);
Gia_ManStop
(
pPart
);
}
else
p
=
pInit
;
// create preliminary equivalences
vEquivs
=
Gia_IsoDeriveEquivPos
(
p
,
1
,
fVeryVerbose
);
if
(
vEquivs
==
NULL
)
{
if
(
fDualOut
)
Gia_ManStop
(
p
);
return
NULL
;
}
// printf( "Reduced %d outputs to %d outputs. ", Gia_ManPoNum(p), Vec_PtrSize(vEquivs) );
// Abc_PrintTime( 1, "Time", clock() - clk );
...
...
@@ -1126,11 +1140,32 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * p, Vec_Ptr_t ** pvPosEquivs, int fVerb
Vec_PtrForEachEntry
(
Vec_Int_t
*
,
vEquivs
,
vLevel
,
i
)
Vec_IntPush
(
vRemain
,
Vec_IntEntry
(
vLevel
,
0
)
);
if
(
fDualOut
)
{
Vec_Int_t
*
vTemp
=
Vec_IntAlloc
(
Vec_IntSize
(
vRemain
)
);
int
i
,
Entry
;
Vec_IntForEachEntry
(
vRemain
,
Entry
,
i
)
{
printf
(
"%d "
,
Entry
);
Vec_IntPush
(
vTemp
,
2
*
Entry
);
Vec_IntPush
(
vTemp
,
2
*
Entry
+
1
);
}
printf
(
"
\n
"
);
Vec_IntFree
(
vRemain
);
vRemain
=
vTemp
;
Gia_ManStop
(
p
);
p
=
pInit
;
}
// derive the resulting AIG
pPart
=
Gia_ManDupCones
(
p
,
Vec_IntArray
(
vRemain
),
Vec_IntSize
(
vRemain
)
);
Vec_IntFree
(
vRemain
);
// report the results
if
(
!
fDualOut
)
printf
(
"Reduced %d outputs to %d outputs. "
,
Gia_ManPoNum
(
p
),
Gia_ManPoNum
(
pPart
)
);
else
printf
(
"Reduced %d dual outputs to %d dual outputs. "
,
Gia_ManPoNum
(
p
)
/
2
,
Gia_ManPoNum
(
pPart
)
/
2
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
if
(
fVerbose
)
{
...
...
src/base/abci/abc.c
View file @
2bf7454b
...
...
@@ -28338,12 +28338,15 @@ int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Gia_Man_t
*
pAig
;
Vec_Ptr_t
*
vPosEquivs
;
int
c
,
fVerbose
=
0
;
int
c
,
f
DualOut
=
0
,
f
Verbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
d
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'd'
:
fDualOut
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -28363,7 +28366,7 @@ int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9Iso(): The AIG has only one PO. Isomorphism detection is not performed.
\n
"
);
return
1
;
}
pAig
=
Gia_ManIsoReduce
(
pAbc
->
pGia
,
&
vPosEquivs
,
fVerbose
);
pAig
=
Gia_ManIsoReduce
(
pAbc
->
pGia
,
&
vPosEquivs
,
f
DualOut
,
f
Verbose
);
if
(
pAig
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Iso(): Transformation has failed.
\n
"
);
...
...
@@ -28376,8 +28379,9 @@ int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &iso [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &iso [-
d
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
removes POs with isomorphic sequential COI
\n
"
);
Abc_Print
(
-
2
,
"
\t
-d : treat the current AIG as a dual-output miter [default = %s]
\n
"
,
fDualOut
?
"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
;
...
...
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