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
4530ef64
Commit
4530ef64
authored
Aug 29, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alternative way to bit-blast a divisor.
parent
4f74e004
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
5 deletions
+40
-5
src/base/wlc/wlcBlast.c
+39
-4
src/map/mapper/mapperTime.c
+1
-1
No files found.
src/base/wlc/wlcBlast.c
View file @
4530ef64
...
...
@@ -288,6 +288,10 @@ void Wlc_BlastFullAdderCtrl( Gia_Man_t * pNew, int a, int ac, int b, int c, int
int
And
=
Abc_LitNotCond
(
Gia_ManHashAnd
(
pNew
,
a
,
ac
),
fNeg
);
Wlc_BlastFullAdder
(
pNew
,
And
,
b
,
c
,
pc
,
ps
);
}
void
Wlc_BlastFullAdderSubtr
(
Gia_Man_t
*
pNew
,
int
a
,
int
b
,
int
c
,
int
*
pc
,
int
*
ps
,
int
fSub
)
{
Wlc_BlastFullAdder
(
pNew
,
Gia_ManHashXor
(
pNew
,
a
,
fSub
),
b
,
c
,
pc
,
ps
);
}
void
Wlc_BlastMultiplier
(
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
;
...
...
@@ -357,14 +361,45 @@ void Wlc_BlastDivider( Gia_Man_t * pNew, int * pNum, int nNum, int * pDiv, int n
Wlc_VecCopy
(
vRes
,
pQuo
,
nNum
);
ABC_FREE
(
pQuo
);
}
// non-restoring divider
void
Wlc_BlastDivider2
(
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
);
assert
(
nNum
>
0
&&
nDiv
>
0
);
assert
(
Vec_IntSize
(
vRes
)
<
nNum
+
nDiv
);
for
(
i
=
0
;
i
<
nNum
+
nDiv
;
i
++
)
pRes
[
i
]
=
i
<
nNum
?
pNum
[
i
]
:
0
;
for
(
i
=
nNum
-
1
;
i
>=
0
;
i
--
)
{
int
Cntrl
=
i
==
nNum
-
1
?
1
:
pQuo
[
i
+
1
];
int
Carry
=
Cntrl
;
for
(
k
=
0
;
k
<=
nDiv
;
k
++
)
Wlc_BlastFullAdderSubtr
(
pNew
,
k
<
nDiv
?
pDiv
[
k
]
:
0
,
pRes
[
i
+
k
],
Carry
,
&
Carry
,
&
pRes
[
i
+
k
],
Cntrl
);
pQuo
[
i
]
=
Abc_LitNot
(
pRes
[
i
+
nDiv
]);
}
if
(
fQuo
)
Wlc_VecCopy
(
vRes
,
pQuo
,
nNum
);
else
{
int
Carry
=
0
,
Temp
;
for
(
k
=
0
;
k
<
nDiv
;
k
++
)
{
Wlc_BlastFullAdder
(
pNew
,
pDiv
[
k
],
pRes
[
k
],
Carry
,
&
Carry
,
&
Temp
);
pRes
[
k
]
=
Gia_ManHashMux
(
pNew
,
pQuo
[
0
],
pRes
[
k
],
Temp
);
}
Vec_IntShrink
(
vRes
,
nDiv
);
}
ABC_FREE
(
pQuo
);
}
void
Wlc_BlastDividerSigned
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pDiv
,
int
nDiv
,
int
fQuo
,
Vec_Int_t
*
vRes
)
{
Vec_Int_t
*
vNum
=
Vec_IntAlloc
(
nNum
);
Vec_Int_t
*
vDiv
=
Vec_IntAlloc
(
nDiv
);
Vec_Int_t
*
vRes00
=
Vec_IntAlloc
(
nNum
);
Vec_Int_t
*
vRes01
=
Vec_IntAlloc
(
nNum
);
Vec_Int_t
*
vRes10
=
Vec_IntAlloc
(
nNum
);
Vec_Int_t
*
vRes11
=
Vec_IntAlloc
(
nNum
);
Vec_Int_t
*
vRes00
=
Vec_IntAlloc
(
nNum
+
nDiv
);
Vec_Int_t
*
vRes01
=
Vec_IntAlloc
(
nNum
+
nDiv
);
Vec_Int_t
*
vRes10
=
Vec_IntAlloc
(
nNum
+
nDiv
);
Vec_Int_t
*
vRes11
=
Vec_IntAlloc
(
nNum
+
nDiv
);
Vec_Int_t
*
vRes2
=
Vec_IntAlloc
(
nNum
);
int
k
,
iDiffSign
=
Gia_ManHashXor
(
pNew
,
pNum
[
nNum
-
1
],
pDiv
[
nDiv
-
1
]
);
Wlc_BlastMinus
(
pNew
,
pNum
,
nNum
,
vNum
);
...
...
src/map/mapper/mapperTime.c
View file @
4530ef64
...
...
@@ -285,7 +285,7 @@ float Map_MatchComputeReqTimes( Map_Cut_t * pCut, int fPhase, Map_Time_t * ptArr
void
Map_TimePropagateRequired
(
Map_Man_t
*
p
)
{
Map_Node_t
*
pNode
;
Map_Time_t
tReqOutTest
,
*
ptReqOutTest
=
&
tReqOutTest
;
//
Map_Time_t tReqOutTest, * ptReqOutTest = &tReqOutTest;
Map_Time_t
*
ptReqIn
,
*
ptReqOut
;
int
fPhase
,
k
;
...
...
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