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
06100279
Commit
06100279
authored
Aug 16, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DSD-based collapsing &dsd.
parent
c8bfe83e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
5 deletions
+68
-5
abclib.dsp
+4
-0
src/aig/gia/giaClp.c
+0
-0
src/aig/gia/giaMffc.c
+9
-4
src/base/abc/abcFunc.c
+1
-1
src/base/abci/abc.c
+54
-0
No files found.
abclib.dsp
View file @
06100279
...
...
@@ -3715,6 +3715,10 @@ SOURCE=.\src\aig\gia\giaCex.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaClp.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaCof.c
# End Source File
# Begin Source File
...
...
src/aig/gia/giaClp.c
0 → 100644
View file @
06100279
This diff is collapsed.
Click to expand it.
src/aig/gia/giaMffc.c
View file @
06100279
...
...
@@ -207,7 +207,7 @@ Gia_Man_t * Gia_ManDomDerive( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t * vSup
Gia_Man_t
*
pNew
,
*
pTemp
;
int
nMints
=
1
<<
nVars
;
int
i
,
m
,
iResLit
;
assert
(
nVars
>
0
&&
nVars
<=
5
);
assert
(
nVars
>
=
0
&&
nVars
<=
5
);
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
...
...
@@ -249,6 +249,8 @@ Gia_Man_t * Gia_ManDomDerive( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t * vSup
***********************************************************************/
void
Gia_ManComputeDomsTry
(
Gia_Man_t
*
p
)
{
extern
void
Gia_ManCollapseTestTest
(
Gia_Man_t
*
p
);
Vec_Int_t
*
vSupp
,
*
vSuppRefs
;
Gia_Man_t
*
pNew
;
Gia_Obj_t
*
pObj
;
...
...
@@ -272,7 +274,7 @@ void Gia_ManComputeDomsTry( Gia_Man_t * p )
if
(
!
Gia_ObjIsAnd
(
pObj
)
)
continue
;
nSize
=
Gia_NodeMffcSizeSupp
(
p
,
pObj
,
vSupp
,
vSuppRefs
);
if
(
nSize
<
30
||
nSize
>
100
)
if
(
nSize
<
10
)
//
|| nSize > 100 )
continue
;
// sort by cost
Vec_IntSelectSortCost2
(
Vec_IntArray
(
vSupp
),
Vec_IntSize
(
vSupp
),
Vec_IntArray
(
vSuppRefs
)
);
...
...
@@ -280,8 +282,8 @@ void Gia_ManComputeDomsTry( Gia_Man_t * p )
printf
(
"Obj %6d : "
,
i
);
printf
(
"Cone = %4d "
,
nSize
);
printf
(
"Supp = %4d "
,
Vec_IntSize
(
vSupp
)
);
Vec_IntForEachEntry
(
vSuppRefs
,
Entry
,
k
)
printf
(
"%d(%d) "
,
-
Entry
,
Gia_ObjLevelId
(
p
,
Vec_IntEntry
(
vSupp
,
k
))
);
//
Vec_IntForEachEntry( vSuppRefs, Entry, k )
//
printf( "%d(%d) ", -Entry, Gia_ObjLevelId(p, Vec_IntEntry(vSupp, k)) );
printf
(
"
\n
"
);
// selected k
...
...
@@ -289,10 +291,13 @@ void Gia_ManComputeDomsTry( Gia_Man_t * p )
if
(
Vec_IntEntry
(
vSuppRefs
,
k
)
==
1
)
break
;
k
=
Abc_MinInt
(
k
,
3
);
k
=
0
;
// dump
pNew
=
Gia_ManDomDerive
(
p
,
pObj
,
vSupp
,
k
);
Gia_DumpAiger
(
pNew
,
"mffc"
,
i
,
6
);
Gia_ManCollapseTestTest
(
pNew
);
Gia_ManStop
(
pNew
);
}
Vec_IntFree
(
vSuppRefs
);
...
...
src/base/abc/abcFunc.c
View file @
06100279
...
...
@@ -32,7 +32,7 @@ ABC_NAMESPACE_IMPL_START
#define ABC_MUX_CUBES 100000
static
int
Abc_ConvertZddToSop
(
DdManager
*
dd
,
DdNode
*
zCover
,
char
*
pSop
,
int
nFanins
,
Vec_Str_t
*
vCube
,
int
fPhase
);
int
Abc_ConvertZddToSop
(
DdManager
*
dd
,
DdNode
*
zCover
,
char
*
pSop
,
int
nFanins
,
Vec_Str_t
*
vCube
,
int
fPhase
);
static
DdNode
*
Abc_ConvertAigToBdd
(
DdManager
*
dd
,
Hop_Obj_t
*
pRoot
);
static
Hop_Obj_t
*
Abc_ConvertSopToAig
(
Hop_Man_t
*
pMan
,
char
*
pSop
);
...
...
src/base/abci/abc.c
View file @
06100279
...
...
@@ -347,6 +347,7 @@ static int Abc_CommandAbc9Frames ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Retime
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Enable
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Dc2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Dsd
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Bidec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Shrink
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Fx
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -929,6 +930,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&retime"
,
Abc_CommandAbc9Retime
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&enable"
,
Abc_CommandAbc9Enable
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&dc2"
,
Abc_CommandAbc9Dc2
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&dsd"
,
Abc_CommandAbc9Dsd
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&bidec"
,
Abc_CommandAbc9Bidec
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&shrink"
,
Abc_CommandAbc9Shrink
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&fx"
,
Abc_CommandAbc9Fx
,
0
);
...
...
@@ -27521,6 +27523,58 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Dsd
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManCollapseTest
(
Gia_Man_t
*
p
,
int
fVerbose
);
Gia_Man_t
*
pTemp
;
int
c
,
fVerbose
=
0
;
int
fUpdateLevel
=
1
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"lvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'l'
:
fUpdateLevel
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Dsd(): There is no AIG.
\n
"
);
return
1
;
}
pTemp
=
Gia_ManCollapseTest
(
pAbc
->
pGia
,
fVerbose
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &dsd [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs DSD-based collapsing
\n
"
);
// Abc_Print( -2, "\t-l : toggle level update during rewriting [default = %s]\n", fUpdateLevel? "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_CommandAbc9Bidec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Gia_Man_t
*
pTemp
;
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