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
6606c18c
Commit
6606c18c
authored
Feb 25, 2022
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Interleaved variable ordering during bit-blasting.
parent
3186a82f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
src/base/wlc/wlcBlast.c
+44
-0
src/base/wlc/wlcCom.c
+16
-3
No files found.
src/base/wlc/wlcBlast.c
View file @
6606c18c
...
...
@@ -2588,6 +2588,50 @@ Gia_Man_t * Wlc_BlastArray( char * pFileName )
return
pNew
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t
*
Wlc_ComputePerm
(
Wlc_Ntk_t
*
pNtk
,
int
nPis
)
{
Vec_Int_t
*
vPerm
=
Vec_IntAlloc
(
100
);
Vec_Int_t
*
vSizes
=
Vec_IntAlloc
(
100
);
Vec_Int_t
*
vOffs
=
Vec_IntAlloc
(
100
);
Wlc_Obj_t
*
pObj
;
int
i
,
k
,
First
,
Size
,
nBitCis
=
0
,
fChange
=
1
;
Wlc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
{
Vec_IntPush
(
vOffs
,
nBitCis
);
Vec_IntPush
(
vSizes
,
Wlc_ObjRange
(
pObj
)
);
nBitCis
+=
Wlc_ObjRange
(
pObj
);
}
for
(
k
=
0
;
fChange
;
k
++
)
{
fChange
=
0
;
Vec_IntForEachEntryTwo
(
vOffs
,
vSizes
,
First
,
Size
,
i
)
if
(
k
<
Size
)
{
Vec_IntPush
(
vPerm
,
First
+
k
);
fChange
=
1
;
}
}
assert
(
Vec_IntSize
(
vPerm
)
==
nBitCis
);
Vec_IntFree
(
vOffs
);
Vec_IntFree
(
vSizes
);
Vec_IntReverseOrder
(
vPerm
);
for
(
i
=
Vec_IntSize
(
vPerm
);
i
<
nPis
;
i
++
)
Vec_IntPush
(
vPerm
,
i
);
//Vec_IntPrint( vPerm );
return
vPerm
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/base/wlc/wlcCom.c
View file @
6606c18c
...
...
@@ -1031,12 +1031,12 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
{
extern
void
Wlc_NtkPrintInputInfo
(
Wlc_Ntk_t
*
pNtk
);
Wlc_Ntk_t
*
pNtk
=
Wlc_AbcGetNtk
(
pAbc
);
Gia_Man_t
*
pNew
=
NULL
;
int
c
,
fMiter
=
0
,
fDumpNames
=
0
,
fPrintInputInfo
=
0
;
Gia_Man_t
*
pNew
=
NULL
;
int
c
,
fMiter
=
0
,
fDumpNames
=
0
,
fPrintInputInfo
=
0
,
fReorder
=
0
;
Wlc_BstPar_t
Par
,
*
pPar
=
&
Par
;
Wlc_BstParDefault
(
pPar
);
pPar
->
nOutputRange
=
2
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"ORAMcombqaydestnizvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"ORAMcombqaydest
r
nizvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -1118,6 +1118,9 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
pPar
->
fCreateMiter
^=
1
;
fMiter
^=
1
;
break
;
case
'r'
:
fReorder
^=
1
;
break
;
case
'n'
:
fDumpNames
^=
1
;
break
;
...
...
@@ -1197,10 +1200,19 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"Finished dumping file
\"
pio_name_map.txt
\"
containing PI/PO name mapping.
\n
"
);
}
}
if
(
fReorder
)
{
extern
Vec_Int_t
*
Wlc_ComputePerm
(
Wlc_Ntk_t
*
pNtk
,
int
nPis
);
Vec_Int_t
*
vPiPerm
=
Wlc_ComputePerm
(
pNtk
,
Gia_ManPiNum
(
pNew
)
);
Gia_Man_t
*
pTemp
=
Gia_ManDupPerm
(
pNew
,
vPiPerm
);
Vec_IntFree
(
vPiPerm
);
Gia_ManStop
(
pNew
);
pNew
=
pTemp
;
}
Abc_FrameUpdateGia
(
pAbc
,
pNew
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%blast [-ORAM num] [-combqaydestnizvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%blast [-ORAM num] [-combqaydest
r
nizvh]
\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
"
,
pPar
->
iOutput
);
Abc_Print
(
-
2
,
"
\t
-R num : the total number of word-level POs to bit-blast [default = %d]
\n
"
,
pPar
->
nOutputRange
);
...
...
@@ -1217,6 +1229,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-e : toggle creating miter with output word bits combined [default = %s]
\n
"
,
pPar
->
fCreateWordMiter
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle creating decoded MUXes [default = %s]
\n
"
,
pPar
->
fDecMuxes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle creating regular multi-output miter [default = %s]
\n
"
,
fMiter
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle using interleaved variable ordering [default = %s]
\n
"
,
fReorder
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-n : toggle dumping signal names into a text file [default = %s]
\n
"
,
fDumpNames
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-i : toggle to print input names after blasting [default = %s]
\n
"
,
fPrintInputInfo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-z : toggle saving flop names after blasting [default = %s]
\n
"
,
pPar
->
fSaveFfNames
?
"yes"
:
"no"
);
...
...
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