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
373c5ecc
Commit
373c5ecc
authored
Jul 07, 2023
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiment with multipliers.
parent
01b1bd10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
src/base/wlc/wlcBlast.c
+21
-0
No files found.
src/base/wlc/wlcBlast.c
View file @
373c5ecc
...
@@ -575,6 +575,26 @@ void Wlc_BlastMultiplier( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA,
...
@@ -575,6 +575,26 @@ void Wlc_BlastMultiplier( Gia_Man_t * pNew, int * pArgA, int * pArgB, int nArgA,
Wlc_BlastFullAdderCtrl
(
pNew
,
1
,
pArgC
[
a
],
pArgS
[
a
],
Carry
,
&
Carry
,
&
pRes
[
nArgB
+
a
],
0
);
Wlc_BlastFullAdderCtrl
(
pNew
,
1
,
pArgC
[
a
],
pArgS
[
a
],
Carry
,
&
Carry
,
&
pRes
[
nArgB
+
a
],
0
);
//Vec_IntWriteEntry( vRes, nArgA + nArgB, Carry );
//Vec_IntWriteEntry( vRes, nArgA + nArgB, Carry );
}
}
void
Wlc_BlastMultiplierC
(
Gia_Man_t
*
pNew
,
int
*
pArgA
,
int
*
pArgB
,
int
nArgA
,
int
nArgB
,
Vec_Int_t
*
vTemp
,
Vec_Int_t
*
vRes
,
int
fSigned
)
{
int
*
pRes
,
*
pArgC
,
*
pArgS
,
a
,
b
,
Carry
=
!
fSigned
;
// change
assert
(
nArgA
>
0
&&
nArgB
>
0
);
assert
(
fSigned
==
0
||
fSigned
==
1
);
Vec_IntFill
(
vRes
,
nArgA
+
nArgB
,
0
);
pRes
=
Vec_IntArray
(
vRes
);
Vec_IntFill
(
vTemp
,
2
*
nArgA
,
1
);
// change
pArgC
=
Vec_IntArray
(
vTemp
);
pArgS
=
pArgC
+
nArgA
;
for
(
b
=
0
;
b
<
nArgB
;
b
++
)
for
(
a
=
0
;
a
<
nArgA
;
a
++
)
Wlc_BlastFullAdderCtrl
(
pNew
,
pArgA
[
a
],
pArgB
[
b
],
pArgS
[
a
],
pArgC
[
a
],
&
pArgC
[
a
],
a
?
&
pArgS
[
a
-
1
]
:
&
pRes
[
b
],
!
(
fSigned
&&
((
a
+
1
==
nArgA
)
^
(
b
+
1
==
nArgB
)))
);
// change
pArgS
[
nArgA
-
1
]
=
!
fSigned
;
// change
for
(
a
=
0
;
a
<
nArgA
;
a
++
)
Wlc_BlastFullAdderCtrl
(
pNew
,
1
,
pArgC
[
a
],
pArgS
[
a
],
Carry
,
&
Carry
,
&
pRes
[
nArgB
+
a
],
0
);
for
(
b
=
0
;
b
<
nArgA
+
nArgB
;
b
++
)
// change
pRes
[
b
]
=
Abc_LitNot
(
pRes
[
b
]);
}
void
Wlc_BlastDivider
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
)
void
Wlc_BlastDivider
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
)
{
{
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
...
@@ -1817,6 +1837,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
...
@@ -1817,6 +1837,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
Wlc_BlastMultiplier3
(
pNew
,
pArg0
,
pArg1
,
nRange0
,
nRange1
,
vRes
,
Wlc_ObjIsSignedFanin01
(
p
,
pObj
),
pPar
->
fCla
,
NULL
);
Wlc_BlastMultiplier3
(
pNew
,
pArg0
,
pArg1
,
nRange0
,
nRange1
,
vRes
,
Wlc_ObjIsSignedFanin01
(
p
,
pObj
),
pPar
->
fCla
,
NULL
);
else
else
Wlc_BlastMultiplier
(
pNew
,
pArg0
,
pArg1
,
nRangeMax
,
nRangeMax
,
vTemp2
,
vRes
,
fSigned
);
Wlc_BlastMultiplier
(
pNew
,
pArg0
,
pArg1
,
nRangeMax
,
nRangeMax
,
vTemp2
,
vRes
,
fSigned
);
//Wlc_BlastMultiplierC( pNew, pArg0, pArg1, nRangeMax, nRangeMax, vTemp2, vRes, fSigned );
if
(
nRange
>
Vec_IntSize
(
vRes
)
)
if
(
nRange
>
Vec_IntSize
(
vRes
)
)
Vec_IntFillExtra
(
vRes
,
nRange
,
fSigned
?
Vec_IntEntryLast
(
vRes
)
:
0
);
Vec_IntFillExtra
(
vRes
,
nRange
,
fSigned
?
Vec_IntEntryLast
(
vRes
)
:
0
);
else
else
...
...
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