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
a79dc18e
Commit
a79dc18e
authored
Mar 01, 2023
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling generation of non-restoring divider.
parent
8742534d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
src/base/wlc/wlcBlast.c
+15
-8
src/base/wlc/wlcCom.c
+1
-1
No files found.
src/base/wlc/wlcBlast.c
View file @
a79dc18e
...
...
@@ -623,7 +623,7 @@ void Wlc_BlastDivider( Gia_Man_t * pNew, int * pNum, int nNum, int * pDiv, int n
ABC_FREE
(
pQuo
);
}
// non-restoring divider
void
Wlc_BlastDivider
2
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
)
void
Wlc_BlastDivider
NR
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
)
{
int
i
,
*
pRes
=
Vec_IntArray
(
vRes
);
int
k
,
*
pQuo
=
ABC_ALLOC
(
int
,
nNum
);
...
...
@@ -653,7 +653,14 @@ void Wlc_BlastDivider2( Gia_Man_t * pNew, int * pNum, int nNum, int * pDiv, int
}
ABC_FREE
(
pQuo
);
}
void
Wlc_BlastDividerSigned
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
)
void
Wlc_BlastDividerTop
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
,
int
fNonRest
)
{
if
(
fNonRest
)
Wlc_BlastDividerNR
(
pNew
,
pNum
,
nNum
,
pDiv
,
nDiv
,
fQuo
,
vRes
);
else
Wlc_BlastDivider
(
pNew
,
pNum
,
nNum
,
pDiv
,
nDiv
,
fQuo
,
vRes
);
}
void
Wlc_BlastDividerSigned
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
,
int
fNonRest
)
{
Vec_Int_t
*
vNum
=
Vec_IntAlloc
(
nNum
);
Vec_Int_t
*
vDiv
=
Vec_IntAlloc
(
nDiv
);
...
...
@@ -665,10 +672,10 @@ void Wlc_BlastDividerSigned( Gia_Man_t * pNew, int * pNum, int nNum, int * pDiv,
int
k
,
iDiffSign
=
Gia_ManHashXor
(
pNew
,
pNum
[
nNum
-
1
],
pDiv
[
nDiv
-
1
]
);
Wlc_BlastMinus
(
pNew
,
pNum
,
nNum
,
vNum
);
Wlc_BlastMinus
(
pNew
,
pDiv
,
nDiv
,
vDiv
);
Wlc_BlastDivider
(
pNew
,
pNum
,
nNum
,
pDiv
,
nDiv
,
fQuo
,
vRes00
);
Wlc_BlastDivider
(
pNew
,
pNum
,
nNum
,
Vec_IntArray
(
vDiv
),
nDiv
,
fQuo
,
vRes01
);
Wlc_BlastDivider
(
pNew
,
Vec_IntArray
(
vNum
),
nNum
,
pDiv
,
nDiv
,
fQuo
,
vRes10
);
Wlc_BlastDivider
(
pNew
,
Vec_IntArray
(
vNum
),
nNum
,
Vec_IntArray
(
vDiv
),
nDiv
,
fQuo
,
vRes11
);
Wlc_BlastDivider
Top
(
pNew
,
pNum
,
nNum
,
pDiv
,
nDiv
,
fQuo
,
vRes00
,
fNonRest
);
Wlc_BlastDivider
Top
(
pNew
,
pNum
,
nNum
,
Vec_IntArray
(
vDiv
),
nDiv
,
fQuo
,
vRes01
,
fNonRest
);
Wlc_BlastDivider
Top
(
pNew
,
Vec_IntArray
(
vNum
),
nNum
,
pDiv
,
nDiv
,
fQuo
,
vRes10
,
fNonRest
);
Wlc_BlastDivider
Top
(
pNew
,
Vec_IntArray
(
vNum
),
nNum
,
Vec_IntArray
(
vDiv
),
nDiv
,
fQuo
,
vRes11
,
fNonRest
);
Vec_IntClear
(
vRes
);
for
(
k
=
0
;
k
<
nNum
;
k
++
)
{
...
...
@@ -1817,9 +1824,9 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
fSigned
);
int
*
pArg1
=
Wlc_VecLoadFanins
(
vTemp1
,
pFans1
,
nRange1
,
nRangeMax
,
fSigned
);
if
(
fSigned
)
Wlc_BlastDividerSigned
(
pNew
,
pArg0
,
nRangeMax
,
pArg1
,
nRangeMax
,
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
,
vRes
);
Wlc_BlastDividerSigned
(
pNew
,
pArg0
,
nRangeMax
,
pArg1
,
nRangeMax
,
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
,
vRes
,
pPar
->
fNonRest
);
else
Wlc_BlastDivider
(
pNew
,
pArg0
,
nRangeMax
,
pArg1
,
nRangeMax
,
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
,
vRes
);
Wlc_BlastDivider
Top
(
pNew
,
pArg0
,
nRangeMax
,
pArg1
,
nRangeMax
,
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
,
vRes
,
pPar
->
fNonRest
);
Vec_IntShrink
(
vRes
,
nRange
);
if
(
!
pPar
->
fDivBy0
)
Wlc_BlastZeroCondition
(
pNew
,
pFans1
,
nRange1
,
vRes
);
...
...
src/base/wlc/wlcCom.c
View file @
a79dc18e
...
...
@@ -1222,7 +1222,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-o : toggle using additional POs on the word-level boundaries [default = %s]
\n
"
,
pPar
->
fAddOutputs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggle creating boxes for all multipliers in the design [default = %s]
\n
"
,
pPar
->
fMulti
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle generating radix-4 Booth multipliers [default = %s]
\n
"
,
pPar
->
fBooth
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-q : toggle generating non-restoring square root
[default = %s]
\n
"
,
pPar
->
fNonRest
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-q : toggle generating non-restoring square root
and divider [default = %s]
\n
"
,
pPar
->
fNonRest
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle generating carry-look-ahead adder [default = %s]
\n
"
,
pPar
->
fCla
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-y : toggle creating different divide-by-0 condition [default = %s]
\n
"
,
pPar
->
fDivBy0
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle creating dual-output multi-output miter [default = %s]
\n
"
,
pPar
->
fCreateMiter
?
"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