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
2f866673
Commit
2f866673
authored
Jul 18, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding output range support to %blast.
parent
3d7034bf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
8 deletions
+40
-8
src/base/wlc/wlc.h
+1
-1
src/base/wlc/wlcBlast.c
+4
-1
src/base/wlc/wlcCom.c
+33
-4
src/base/wlc/wlcReadVer.c
+1
-1
src/base/wlc/wlcSim.c
+1
-1
No files found.
src/base/wlc/wlc.h
View file @
2f866673
...
...
@@ -259,7 +259,7 @@ extern Vec_Int_t * Wlc_NtkFindUifableMultiplierPairs( Wlc_Ntk_t * p );
extern
Wlc_Ntk_t
*
Wlc_NtkAbstractNodes
(
Wlc_Ntk_t
*
pNtk
,
Vec_Int_t
*
vNodes
);
extern
Wlc_Ntk_t
*
Wlc_NtkUifNodePairs
(
Wlc_Ntk_t
*
pNtk
,
Vec_Int_t
*
vPairs
);
/*=== wlcBlast.c ========================================================*/
extern
Gia_Man_t
*
Wlc_NtkBitBlast
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vBoxIds
,
int
fGiaSimple
,
int
fAddOutputs
);
extern
Gia_Man_t
*
Wlc_NtkBitBlast
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vBoxIds
,
int
iOutput
,
int
nRange
,
int
fGiaSimple
,
int
fAddOutputs
);
/*=== wlcCom.c ========================================================*/
extern
void
Wlc_SetNtk
(
Abc_Frame_t
*
pAbc
,
Wlc_Ntk_t
*
pNtk
);
/*=== wlcNtk.c ========================================================*/
...
...
src/base/wlc/wlcBlast.c
View file @
2f866673
...
...
@@ -820,7 +820,7 @@ void Wlc_BlastBooth( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA, int
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Wlc_NtkBitBlast
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vBoxIds
,
int
fGiaSimple
,
int
fAddOutputs
)
Gia_Man_t
*
Wlc_NtkBitBlast
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vBoxIds
,
int
iOutput
,
int
nOutputRange
,
int
fGiaSimple
,
int
fAddOutputs
)
{
int
fVerbose
=
0
;
int
fUseOldMultiplierBlasting
=
0
;
...
...
@@ -1314,6 +1314,9 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds, int fGiaSimple,
// create COs
Wlc_NtkForEachCo
(
p
,
pObj
,
i
)
{
// skip all outputs except the given ones
if
(
iOutput
>=
0
&&
(
i
<
iOutput
||
i
>=
iOutput
+
nOutputRange
)
)
continue
;
// create additional PO literals
if
(
vAddOutputs
&&
pObj
->
fIsFi
)
{
...
...
src/base/wlc/wlcCom.c
View file @
2f866673
...
...
@@ -338,12 +338,34 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Wlc_Ntk_t
*
pNtk
=
Wlc_AbcGetNtk
(
pAbc
);
Vec_Int_t
*
vBoxIds
=
NULL
;
Gia_Man_t
*
pNew
=
NULL
;
int
c
,
fGiaSimple
=
0
,
fAddOutputs
=
0
,
fMulti
=
0
,
fVerbose
=
0
;
int
c
,
iOutput
=
-
1
,
nOutputRange
=
2
,
fGiaSimple
=
0
,
fAddOutputs
=
0
,
fMulti
=
0
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"comvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
OR
comvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'O'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-O
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
iOutput
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
iOutput
<
0
)
goto
usage
;
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-R
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nOutputRange
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nOutputRange
<
0
)
goto
usage
;
break
;
case
'c'
:
fGiaSimple
^=
1
;
break
;
...
...
@@ -373,8 +395,13 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
vBoxIds
==
NULL
)
Abc_Print
(
1
,
"Warning: There is no multipliers in the design.
\n
"
);
}
if
(
iOutput
>=
0
&&
iOutput
+
nOutputRange
>
Wlc_NtkPoNum
(
pNtk
)
)
{
Abc_Print
(
1
,
"Abc_CommandBlast(): The output range [%d:%d] is incorrect.
\n
"
,
iOutput
,
iOutput
+
nOutputRange
-
1
);
return
0
;
}
// transform
pNew
=
Wlc_NtkBitBlast
(
pNtk
,
vBoxIds
,
fGiaSimple
,
fAddOutputs
);
pNew
=
Wlc_NtkBitBlast
(
pNtk
,
vBoxIds
,
iOutput
,
nOutputRange
,
fGiaSimple
,
fAddOutputs
);
Vec_IntFreeP
(
&
vBoxIds
);
if
(
pNew
==
NULL
)
{
...
...
@@ -384,8 +411,10 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_FrameUpdateGia
(
pAbc
,
pNew
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%blast [-comvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%blast [-
OR num] [-
comvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs bit-blasting of the word-level design
\n
"
);
Abc_Print
(
-
2
,
"
\t
-O num : zero-based index of the first word-level PO to bit-blast [default = %d]
\n
"
,
iOutput
);
Abc_Print
(
-
2
,
"
\t
-R num : the total number of word-level POs to bit-blast [default = %d]
\n
"
,
nOutputRange
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using AIG w/o const propagation and strashing [default = %s]
\n
"
,
fGiaSimple
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-o : toggle using additional POs on the word-level boundaries [default = %s]
\n
"
,
fAddOutputs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggle creating boxes for all multipliers in the design [default = %s]
\n
"
,
fMulti
?
"yes"
:
"no"
);
...
...
src/base/wlc/wlcReadVer.c
View file @
2f866673
...
...
@@ -1291,7 +1291,7 @@ void Io_ReadWordTest( char * pFileName )
return
;
Wlc_WriteVer
(
pNtk
,
"test.v"
,
0
,
0
);
pNew
=
Wlc_NtkBitBlast
(
pNtk
,
NULL
,
0
,
0
);
pNew
=
Wlc_NtkBitBlast
(
pNtk
,
NULL
,
-
1
,
0
,
0
,
0
);
Gia_AigerWrite
(
pNew
,
"test.aig"
,
0
,
0
);
Gia_ManStop
(
pNew
);
...
...
src/base/wlc/wlcSim.c
View file @
2f866673
...
...
@@ -129,7 +129,7 @@ Vec_Ptr_t * Wlc_NtkSimulate( Wlc_Ntk_t * p, Vec_Int_t * vNodes, int nWords, int
{
Gia_Obj_t
*
pObj
;
Vec_Ptr_t
*
vOne
,
*
vRes
;
Gia_Man_t
*
pGia
=
Wlc_NtkBitBlast
(
p
,
NULL
,
0
,
0
);
Gia_Man_t
*
pGia
=
Wlc_NtkBitBlast
(
p
,
NULL
,
-
1
,
0
,
0
,
0
);
Wlc_Obj_t
*
pWlcObj
;
int
f
,
i
,
k
,
w
,
nBits
,
Counter
=
0
;
// allocate simulation info for one timeframe
...
...
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