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
7ecea8d4
Commit
7ecea8d4
authored
Oct 24, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added hierarchical BLIF output for mapping with LUT structures (write_blif -a -S <XYZ>).
parent
e9e8f179
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
src/aig/gia/giaIf.c
+3
-2
src/base/io/io.c
+8
-3
src/base/io/ioAbc.h
+1
-1
src/base/io/ioWriteBlif.c
+0
-0
No files found.
src/aig/gia/giaIf.c
View file @
7ecea8d4
...
@@ -506,7 +506,8 @@ Gia_Man_t * Gia_ManFromIf( If_Man_t * pIfMan )
...
@@ -506,7 +506,8 @@ Gia_Man_t * Gia_ManFromIf( If_Man_t * pIfMan )
// which participate as leaves of some cuts used in the mapping
// which participate as leaves of some cuts used in the mapping
// such nodes are marked here and skipped when mapping is derived
// such nodes are marked here and skipped when mapping is derived
Counter
=
Gia_ManMarkDangling
(
pNew
);
Counter
=
Gia_ManMarkDangling
(
pNew
);
if
(
pIfMan
->
pPars
->
fVerbose
&&
Counter
)
// if ( pIfMan->pPars->fVerbose && Counter )
if
(
Counter
)
printf
(
"GIA after mapping has %d dangling nodes.
\n
"
,
Counter
);
printf
(
"GIA after mapping has %d dangling nodes.
\n
"
,
Counter
);
// create mapping
// create mapping
...
@@ -568,7 +569,7 @@ Gia_Man_t * Gia_ManFromIf( If_Man_t * pIfMan )
...
@@ -568,7 +569,7 @@ Gia_Man_t * Gia_ManFromIf( If_Man_t * pIfMan )
pNew
->
pMapping
[
iOffset
-
k
-
1
]
--
;
pNew
->
pMapping
[
iOffset
-
k
-
1
]
--
;
continue
;
continue
;
}
}
assert
(
FaninId
!=
GiaId
);
assert
(
FaninId
<
GiaId
);
pNew
->
pMapping
[
iOffset
++
]
=
FaninId
;
pNew
->
pMapping
[
iOffset
++
]
=
FaninId
;
}
}
pNew
->
pMapping
[
iOffset
++
]
=
GiaId
;
pNew
->
pMapping
[
iOffset
++
]
=
GiaId
;
...
...
src/base/io/io.c
View file @
7ecea8d4
...
@@ -1654,9 +1654,10 @@ int IoCommandWriteBlif( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -1654,9 +1654,10 @@ int IoCommandWriteBlif( Abc_Frame_t * pAbc, int argc, char **argv )
char
*
pFileName
;
char
*
pFileName
;
char
*
pLutStruct
=
NULL
;
char
*
pLutStruct
=
NULL
;
int
c
,
fSpecial
=
0
;
int
c
,
fSpecial
=
0
;
int
fUseHie
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Sjh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Sj
a
h"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -1677,6 +1678,9 @@ int IoCommandWriteBlif( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -1677,6 +1678,9 @@ int IoCommandWriteBlif( Abc_Frame_t * pAbc, int argc, char **argv )
case
'j'
:
case
'j'
:
fSpecial
^=
1
;
fSpecial
^=
1
;
break
;
break
;
case
'a'
:
fUseHie
^=
1
;
break
;
case
'h'
:
case
'h'
:
goto
usage
;
goto
usage
;
default:
default:
...
@@ -1694,16 +1698,17 @@ int IoCommandWriteBlif( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -1694,16 +1698,17 @@ int IoCommandWriteBlif( Abc_Frame_t * pAbc, int argc, char **argv )
pFileName
=
argv
[
globalUtilOptind
];
pFileName
=
argv
[
globalUtilOptind
];
// call the corresponding file writer
// call the corresponding file writer
if
(
fSpecial
||
pLutStruct
)
if
(
fSpecial
||
pLutStruct
)
Io_WriteBlifSpecial
(
pAbc
->
pNtkCur
,
pFileName
,
pLutStruct
);
Io_WriteBlifSpecial
(
pAbc
->
pNtkCur
,
pFileName
,
pLutStruct
,
fUseHie
);
else
else
Io_Write
(
pAbc
->
pNtkCur
,
pFileName
,
IO_FILE_BLIF
);
Io_Write
(
pAbc
->
pNtkCur
,
pFileName
,
IO_FILE_BLIF
);
return
0
;
return
0
;
usage:
usage:
fprintf
(
pAbc
->
Err
,
"usage: write_blif [-S str] [-jh] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage: write_blif [-S str] [-j
a
h] <file>
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
writes the network into a BLIF file
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
writes the network into a BLIF file
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-S str : string representing the LUT structure [default = %s]
\n
"
,
pLutStruct
?
pLutStruct
:
"not used"
);
fprintf
(
pAbc
->
Err
,
"
\t
-S str : string representing the LUT structure [default = %s]
\n
"
,
pLutStruct
?
pLutStruct
:
"not used"
);
fprintf
(
pAbc
->
Err
,
"
\t
-j : enables special BLIF writing [default = %s]
\n
"
,
fSpecial
?
"yes"
:
"no"
);;
fprintf
(
pAbc
->
Err
,
"
\t
-j : enables special BLIF writing [default = %s]
\n
"
,
fSpecial
?
"yes"
:
"no"
);;
fprintf
(
pAbc
->
Err
,
"
\t
-a : enables hierarchical BLIF writing for LUT structures [default = %s]
\n
"
,
fUseHie
?
"yes"
:
"no"
);;
fprintf
(
pAbc
->
Err
,
"
\t
-h : print the help massage
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-h : print the help massage
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
file : the name of the file to write (extension .blif)
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
file : the name of the file to write (extension .blif)
\n
"
);
return
1
;
return
1
;
...
...
src/base/io/ioAbc.h
View file @
7ecea8d4
...
@@ -106,7 +106,7 @@ extern void Io_WriteBblif( Abc_Ntk_t * pNtk, char * pFileName );
...
@@ -106,7 +106,7 @@ extern void Io_WriteBblif( Abc_Ntk_t * pNtk, char * pFileName );
extern
void
Io_WriteBlifLogic
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fWriteLatches
);
extern
void
Io_WriteBlifLogic
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fWriteLatches
);
extern
void
Io_WriteBlif
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fWriteLatches
,
int
fBb2Wb
,
int
fSeq
);
extern
void
Io_WriteBlif
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
int
fWriteLatches
,
int
fBb2Wb
,
int
fSeq
);
extern
void
Io_WriteTimingInfo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
extern
void
Io_WriteTimingInfo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
extern
void
Io_WriteBlifSpecial
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
,
char
*
pLutStruct
);
extern
void
Io_WriteBlifSpecial
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
,
char
*
pLutStruct
,
int
fUseHie
);
/*=== abcWriteBlifMv.c ==========================================================*/
/*=== abcWriteBlifMv.c ==========================================================*/
extern
void
Io_WriteBlifMv
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
);
extern
void
Io_WriteBlifMv
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
);
/*=== abcWriteBench.c =========================================================*/
/*=== abcWriteBench.c =========================================================*/
...
...
src/base/io/ioWriteBlif.c
View file @
7ecea8d4
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