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
d0a0cf63
Commit
d0a0cf63
authored
Apr 09, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Command &esop to convert AIG into ESOP.
parent
8b07237b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
0 deletions
+94
-0
abclib.dsp
+4
-0
src/aig/gia/giaEsop.c
+0
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+49
-0
src/misc/vec/vecHsh.h
+20
-0
src/misc/vec/vecPtr.h
+20
-0
No files found.
abclib.dsp
View file @
d0a0cf63
...
...
@@ -4195,6 +4195,10 @@ SOURCE=.\src\aig\gia\giaEra2.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaEsop.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaFadds.c
# End Source File
# Begin Source File
...
...
src/aig/gia/giaEsop.c
0 → 100644
View file @
d0a0cf63
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
d0a0cf63
...
...
@@ -22,6 +22,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaEquiv.c
\
src/aig/gia/giaEra.c
\
src/aig/gia/giaEra2.c
\
src/aig/gia/giaEsop.c
\
src/aig/gia/giaFadds.c
\
src/aig/gia/giaFalse.c
\
src/aig/gia/giaFanout.c
\
...
...
src/base/abci/abc.c
View file @
d0a0cf63
...
...
@@ -464,6 +464,7 @@ static int Abc_CommandAbc9Bmci ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9PoXsim
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Demiter
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Fadds
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Esop
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Mfs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
//static int Abc_CommandAbc9PoPart2 ( Abc_Frame_t * pAbc, int argc, char ** argv );
//static int Abc_CommandAbc9CexCut ( Abc_Frame_t * pAbc, int argc, char ** argv );
...
...
@@ -1090,6 +1091,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&poxsim"
,
Abc_CommandAbc9PoXsim
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&demiter"
,
Abc_CommandAbc9Demiter
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&fadds"
,
Abc_CommandAbc9Fadds
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&esop"
,
Abc_CommandAbc9Esop
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&mfs"
,
Abc_CommandAbc9Mfs
,
0
);
// Cmd_CommandAdd( pAbc, "ABC9", "&popart2", Abc_CommandAbc9PoPart2, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexcut", Abc_CommandAbc9CexCut, 0 );
...
...
@@ -39165,6 +39167,53 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Esop
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Eso_ManCompute
(
Gia_Man_t
*
pGia
,
int
fVerbose
);
Gia_Man_t
*
pTemp
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Esop(): There is no AIG.
\n
"
);
return
0
;
}
pTemp
=
Eso_ManCompute
(
pAbc
->
pGia
,
fVerbose
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &esop [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
derives Exclusive Sum of Products from AIG
\n
"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles 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_CommandAbc9Mfs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManPerformMfs
(
Gia_Man_t
*
p
,
Sfm_Par_t
*
pPars
);
src/misc/vec/vecHsh.h
View file @
d0a0cf63
...
...
@@ -79,6 +79,8 @@ struct Hsh_VecMan_t_
Vec_Int_t
*
vData
;
// data storage
Vec_Int_t
*
vMap
;
// mapping entries into data;
Vec_Int_t
vTemp
;
// temporary array
Vec_Int_t
vTemp1
;
// temporary array
Vec_Int_t
vTemp2
;
// temporary array
};
////////////////////////////////////////////////////////////////////////
...
...
@@ -305,6 +307,10 @@ static inline void Hsh_VecManStop( Hsh_VecMan_t * p )
Vec_IntFree
(
p
->
vMap
);
ABC_FREE
(
p
);
}
static
inline
int
*
Hsh_VecReadArray
(
Hsh_VecMan_t
*
p
,
int
i
)
{
return
(
int
*
)
Hsh_VecObj
(
p
,
i
)
+
2
;
}
static
inline
Vec_Int_t
*
Hsh_VecReadEntry
(
Hsh_VecMan_t
*
p
,
int
i
)
{
Hsh_VecObj_t
*
pObj
=
Hsh_VecObj
(
p
,
i
);
...
...
@@ -312,6 +318,20 @@ static inline Vec_Int_t * Hsh_VecReadEntry( Hsh_VecMan_t * p, int i )
p
->
vTemp
.
pArray
=
(
int
*
)
pObj
+
2
;
return
&
p
->
vTemp
;
}
static
inline
Vec_Int_t
*
Hsh_VecReadEntry1
(
Hsh_VecMan_t
*
p
,
int
i
)
{
Hsh_VecObj_t
*
pObj
=
Hsh_VecObj
(
p
,
i
);
p
->
vTemp1
.
nSize
=
p
->
vTemp1
.
nCap
=
pObj
->
nSize
;
p
->
vTemp1
.
pArray
=
(
int
*
)
pObj
+
2
;
return
&
p
->
vTemp1
;
}
static
inline
Vec_Int_t
*
Hsh_VecReadEntry2
(
Hsh_VecMan_t
*
p
,
int
i
)
{
Hsh_VecObj_t
*
pObj
=
Hsh_VecObj
(
p
,
i
);
p
->
vTemp2
.
nSize
=
p
->
vTemp2
.
nCap
=
pObj
->
nSize
;
p
->
vTemp2
.
pArray
=
(
int
*
)
pObj
+
2
;
return
&
p
->
vTemp2
;
}
static
inline
int
Hsh_VecSize
(
Hsh_VecMan_t
*
p
)
{
return
Vec_IntSize
(
p
->
vMap
);
...
...
src/misc/vec/vecPtr.h
View file @
d0a0cf63
...
...
@@ -770,6 +770,26 @@ static inline void Vec_PtrRemove( Vec_Ptr_t * p, void * Entry )
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_PtrDrop
(
Vec_Ptr_t
*
p
,
int
i
)
{
int
k
;
assert
(
i
>=
0
&&
i
<
Vec_PtrSize
(
p
)
);
p
->
nSize
--
;
for
(
k
=
i
;
k
<
p
->
nSize
;
k
++
)
p
->
pArray
[
k
]
=
p
->
pArray
[
k
+
1
];
}
/**Function*************************************************************
Synopsis [Interts entry at the index iHere. Shifts other entries.]
Description []
...
...
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