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
eb270018
Commit
eb270018
authored
Feb 03, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Esperiments with MO PLA optimization.
parent
d7d1978e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
8 deletions
+21
-8
src/base/abc/abc.h
+1
-0
src/base/abc/abcFunc.c
+4
-4
src/base/io/io.c
+8
-4
src/base/io/ioAbc.h
+2
-0
src/base/io/ioUtil.c
+6
-0
src/base/io/ioWritePla.c
+0
-0
No files found.
src/base/abc/abc.h
View file @
eb270018
...
...
@@ -258,6 +258,7 @@ static inline int Abc_NtkHasBlifMv( Abc_Ntk_t * pNtk ) { return pN
static
inline
int
Abc_NtkHasBlackbox
(
Abc_Ntk_t
*
pNtk
)
{
return
pNtk
->
ntkFunc
==
ABC_FUNC_BLACKBOX
;
}
static
inline
int
Abc_NtkIsSopNetlist
(
Abc_Ntk_t
*
pNtk
)
{
return
pNtk
->
ntkFunc
==
ABC_FUNC_SOP
&&
pNtk
->
ntkType
==
ABC_NTK_NETLIST
;
}
static
inline
int
Abc_NtkIsBddNetlist
(
Abc_Ntk_t
*
pNtk
)
{
return
pNtk
->
ntkFunc
==
ABC_FUNC_BDD
&&
pNtk
->
ntkType
==
ABC_NTK_NETLIST
;
}
static
inline
int
Abc_NtkIsAigNetlist
(
Abc_Ntk_t
*
pNtk
)
{
return
pNtk
->
ntkFunc
==
ABC_FUNC_AIG
&&
pNtk
->
ntkType
==
ABC_NTK_NETLIST
;
}
static
inline
int
Abc_NtkIsMappedNetlist
(
Abc_Ntk_t
*
pNtk
)
{
return
pNtk
->
ntkFunc
==
ABC_FUNC_MAP
&&
pNtk
->
ntkType
==
ABC_NTK_NETLIST
;
}
static
inline
int
Abc_NtkIsBlifMvNetlist
(
Abc_Ntk_t
*
pNtk
)
{
return
pNtk
->
ntkFunc
==
ABC_FUNC_BLIFMV
&&
pNtk
->
ntkType
==
ABC_NTK_NETLIST
;
}
...
...
src/base/abc/abcFunc.c
View file @
eb270018
...
...
@@ -30,7 +30,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
#define ABC_M
U
X_CUBES 100000
#define ABC_M
A
X_CUBES 100000
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
);
...
...
@@ -307,10 +307,10 @@ char * Abc_ConvertBddToSop( Mem_Flex_t * pMan, DdManager * dd, DdNode * bFuncOn,
assert
(
0
);
}
if
(
nCubes
>
ABC_M
U
X_CUBES
)
if
(
nCubes
>
ABC_M
A
X_CUBES
)
{
Cudd_RecursiveDerefZdd
(
dd
,
zCover
);
printf
(
"The number of cubes exceeded the predefined limit (%d).
\n
"
,
ABC_M
U
X_CUBES
);
printf
(
"The number of cubes exceeded the predefined limit (%d).
\n
"
,
ABC_M
A
X_CUBES
);
return
NULL
;
}
...
...
@@ -571,7 +571,7 @@ void Abc_CountZddCubes_rec( DdManager * dd, DdNode * zCover, int * pnCubes )
(
*
pnCubes
)
++
;
return
;
}
if
(
(
*
pnCubes
)
>
ABC_M
U
X_CUBES
)
if
(
(
*
pnCubes
)
>
ABC_M
A
X_CUBES
)
return
;
extraDecomposeCover
(
dd
,
zCover
,
&
zC0
,
&
zC1
,
&
zC2
);
Abc_CountZddCubes_rec
(
dd
,
zC0
,
pnCubes
);
...
...
src/base/io/io.c
View file @
eb270018
...
...
@@ -2479,13 +2479,16 @@ usage:
int
IoCommandWritePla
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
char
*
pFileName
;
int
c
;
int
c
,
fUseMoPla
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
m
h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'm'
:
fUseMoPla
^=
1
;
break
;
case
'h'
:
goto
usage
;
default
:
...
...
@@ -2502,12 +2505,13 @@ int IoCommandWritePla( Abc_Frame_t * pAbc, int argc, char **argv )
// get the output file name
pFileName
=
argv
[
globalUtilOptind
];
// call the corresponding file writer
Io_Write
(
pAbc
->
pNtkCur
,
pFileName
,
IO_FILE_PLA
);
Io_Write
(
pAbc
->
pNtkCur
,
pFileName
,
fUseMoPla
?
IO_FILE_MOPLA
:
IO_FILE_PLA
);
return
0
;
usage
:
fprintf
(
pAbc
->
Err
,
"usage: write_pla [-h] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage: write_pla [-
m
h] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
writes the collapsed network into a PLA file
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-m : toggle writing multi-output PLA [default = %s]
\n
"
,
fUseMoPla
?
"yes"
:
"no"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : print the help massage
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
file : the name of the file to write
\n
"
);
return
1
;
...
...
src/base/io/ioAbc.h
View file @
eb270018
...
...
@@ -59,6 +59,7 @@ typedef enum {
IO_FILE_GML
,
IO_FILE_LIST
,
IO_FILE_PLA
,
IO_FILE_MOPLA
,
IO_FILE_SMV
,
IO_FILE_VERILOG
,
IO_FILE_UNKNOWN
...
...
@@ -128,6 +129,7 @@ extern void Io_WriteGml( Abc_Ntk_t * pNtk, char * pFileName );
extern
void
Io_WriteList
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fUseHost
);
/*=== abcWritePla.c ===========================================================*/
extern
int
Io_WritePla
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
);
extern
int
Io_WriteMoPla
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
);
/*=== abcWriteSmv.c ===========================================================*/
extern
int
Io_WriteSmv
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
);
/*=== abcWriteVerilog.c =======================================================*/
...
...
src/base/io/ioUtil.c
View file @
eb270018
...
...
@@ -399,6 +399,10 @@ void Io_Write( Abc_Ntk_t * pNtk, char * pFileName, Io_FileType_t FileType )
if
(
!
Abc_NtkToSop
(
pNtkTemp
,
1
)
)
return
;
}
else
if
(
FileType
==
IO_FILE_MOPLA
)
{
pNtkTemp
=
Abc_NtkStrash
(
pNtk
,
0
,
0
,
0
);
}
else
if
(
FileType
==
IO_FILE_BENCH
)
{
if
(
!
Abc_NtkIsStrash
(
pNtk
)
)
...
...
@@ -444,6 +448,8 @@ void Io_Write( Abc_Ntk_t * pNtk, char * pFileName, Io_FileType_t FileType )
Io_WriteBook
(
pNtkTemp
,
pFileName
);
else
if
(
FileType
==
IO_FILE_PLA
)
Io_WritePla
(
pNtkTemp
,
pFileName
);
else
if
(
FileType
==
IO_FILE_MOPLA
)
Io_WriteMoPla
(
pNtkTemp
,
pFileName
);
else
if
(
FileType
==
IO_FILE_EQN
)
{
if
(
!
Abc_NtkHasAig
(
pNtkTemp
)
)
...
...
src/base/io/ioWritePla.c
View file @
eb270018
This diff is collapsed.
Click to expand it.
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