Title: LNS Subtraction Using Novel Contransformation and/or Interpolation
1LNS Subtraction Using Novel Contransformation
and/or Interpolation
- Panagiotis Vouzis1, Sylvain Collange2, and Mark
Arnold1 - vouzis_at_lehigh.edu, sylvain.collange_at_ens-lyon.fr,
maab_at_lehigh.edu - 1Computer Engineering,
- Lehigh University,
- Bethlehem, USA
- 2École Normale Supérieure de Lyon
- 46 Allée dItalie
- 6934 Lyon Cedex 07, France
2Outline
- Logarithmic Number System
- Addition/Subtraction Optimization
- Cotransformations
- Synthesis, Simulation and Error Behavior
- Conclusions
3Outline
- Logarithmic Number System
- Addition/Subtraction Optimization
- Cotransformations
- Synthesis, Simulation and Error Behavior
- Conclusions
4Use of LNS on Embedded Control
FPGA
Plant
Set point
u(k)
_
5Use of LNS on Embedded Control
- Drug Delivery
- Robotics
- Microfluidic control
6The Logarithmic Number System (LNS)
- x is a twos complement representation with
- k integer bits
- l fractional bits
l
k
I. Koren, Computer Arithmetic Algorithms, MA
Brookside Court Publishers, 1998. Chapter 10
Logarithmic Number System
7Arithmetic Operations in LNS
8Arithmetic Operations in LNS
9Arithmetic Operations in LNS
10Arithmetic Operations in LNS
11Addition/Subtraction with zgt0
x
f(x-y),zs)
(x-y,zs)
Preprocessing
y
t
min(x,y)
12Addition/Subtraction with zlt0
10 20 Memory Savings
x
f(-x-y),zs)
(-x-y,zs)
Preprocessing
y
t
max(x,y)
13Addition/Subtraction
x
(z,zs)
f(z,zs)
Preprocessing
y
t
w
14Outline
- Logarithmic Number System
- Addition/Subtraction Optimization
- Cotransformations
- Synthesis, Simulation and Error Behavior
- Conclusions
15Addition/Subtraction Optimization
16Addition/Subtraction Optimization
- Tabulate only for z 0
E. E. Swartzlander and A. G. Alexopoulos, The
Sign/Logarithm Number System, IEEE Transactions
on Computers, No. 24, vol. 12, pp. 12381242,
Dec. 1975.
17Addition/Subtraction Optimization
- Tabulate only for z 0
- Tabulate only for sb(z)gt2l, db(z)lt2l
T. Stouraitis. Logarithmic Number System Theory,
Analysis, and Design. PhD thesis, Univ. of
Florida, Gainesville, Florida, 1986.
18Addition/Subtraction Optimization
- Tabulate only for z 0
- Tabulate only for sb(z)gt2l, db(z)lt2l
- InterpolateMultipartite Tables
D. M. Lewis, An Architecture for Addition and
Subtraction of Long Word Length Numbers in the
Logarithmic Number System, IEEE Transactions on
Computers, vol. 39, no. 11, pp. 13251336,
1990. F. de Dinechin, and A. Tisserand, Some
Improvements on Multipartite Table Methods, In
Proceedings of the 15th Symposium on Computer
Arithmetic, pp. 128135, Vail, Colorado, 1113
June 2001.
19Addition/Subtraction Optimization
- Tabulate only for z 0
- Tabulate only for sb(z)gt2l, db(z)lt2l
- InterpolateMultipartite Tables
- Cotransformation db(z)f(sb(t))
M. G. Arnold, An Improved Cotransformation for
Logarithmic Subtraction, In Proceedings of the
International Symposium on Circuits and Systems,
pp. 752755, Scottsdale, AZ, 2629 May 2002.
20Outline
- Logarithmic Number System
- Addition/Subtraction Optimization
- Cotransformations
- Synthesis, Simulation and Error Behavior
- Conclusions
21No Cotransformation
x
z lt 0
-x-y max
s/d
y
Advantages z lt 0 means narrower s(z)
width Fastest logic
Disadvantages size of d(z) gt size of s(z) Large
d(z) table
22Colemans Cotransformation
x
z lt 0
Coleman t1 t2
-x-y max
s/d
y
Advantages z lt 0 means s(z) width slightly
narrower size of d(z) ? size of s(z)
Disadvantage still need d(z)
23Arnolds Cotransformation
x
z gt 0
Arnold t1 t2
x-y min
s
y
Advantage Can eliminate d(z) low cost fast
s(z) table
Disadvantage z gt 0 means slightly wider s
24Vouzis Cotransformation
x
z lt 0
Vouzis t1 t2 t3
-x-y max
s
y
Advantages Can eliminate d(z) low cost fast
s(z) table z lt 0 means s(z) width slightly
narrower Easiest HDL coding/fix bug in 2002
improved Arnold
Disadvantage Need extra cotransformation table
25Novel Cotransformation
x
z lt 0
Novel t1 t2
x-y min/max
s
y
Advantages Can eliminate d(z) low cost fast
s(z) table z lt 0 means s(z) width slightly
narrower No extra cotransformation table
Disadvantage Tiny extra mux logic
26Colemans Cotransformation
z1
z2
J. N. Coleman, Simplification of Table Structure
in Logarithmic Arithmetic, IEE Electronic
Letters, vol 31, no. 22, pp. 1905-1906, 26 Oct.
1996.
27Colemans Cotransformation
z1
db(z1)
x
sb(z)
(-x-y)
Mux 1 0
Preprocessing
db(z2)
(-x-y)
y
t
zs
max(x,y)
28Arnolds Cotransformation
z1
z2
M. G. Arnold, T. A. Bailey, J. R. Cowles, and M.
D. Winkel, Arithmetic Cotransformations in the
Real and Complex Logarithmic Number Systems,
IEEE Transactions on Computers, vol. 47, pp.
777-786, July 1998.
29Arnolds Cotransformation
30Improved Cotransformation
zh (k(l j) bits)
zl (j bits)
100 . . . 0 (?h2j l, i.e.,
smallest zh ? 0)
M. G. Arnold, An Improved Cotransformation for
Logarithmic Subtraction, In Proceedings of the
International Symposium on Circuits and Systems,
pp. 752755, Scottsdale, AZ, 2629 May 2002.
31Vouzis Cotransformation
P. Vouzis, S. Collange, and M. Arnold,
Cotransformation providesArea and Accuracy
Improvements in an HDL library for LNS
Subtraction, Accepted for The 10th EuroMicro
Conference on Digital Systems and Design, Lübeck,
Germany, 2731 August, 2007.
32Graphics Example
Corrected by using a 2-value LUT
Caused by absence of new special case
k5, l8, j5
33Novel Cotransformation Combination
- Addition Precondition z lt 0
- Subtraction Precondition z gt 0
Special cases needed for z1 0 and z2
0. Special cases can be eliminated by storing
appropriate values in the LUTs.
34Eliminating Special Cases
l
zH (kn bits)
zL (l-n bits)
k
n
- Let
- Case A z1 0, z2 gt 0
- It is proven that t min(x,y)db(z2)
- Case A z1 gt 0, z2 0
- It is proven than t min(x,y)db(z1)
35Outline
- Logarithmic Number System
- Addition/Subtraction Optimization
- Cotransformations
- Synthesis, Simulation and Error Behavior
- Conclusions
36Area and Latency of Vouzis vs. Novel
Cotransformation
l
l
Area
Latency
37Guard-bit Simulation
Minimal cotransformation guard bits and
next-nearest probabilities.
Effect of (g) interpolator- and (h)
cotransformation-guard bits on error and rounding
for l12.
l
38Optimized Interpolation/Cotransformation Hybrid
l
k
zH
zL
11110
Assume power-of-two partitioning
n
Partial Interpolation (kl-2m)2n
Cotransformation 22m
Full Interpolation (kl-n)2n
39Error Behavior
sb(z) by 2nd-ord. multip. db(z) by vouzis cotran.
sb(z) by 1st-ord. interp. db(z) by novel cotran.
sb(z) by 2nd-ord. multip. db(z) by 2nd-ord.
multip.
sb(z) by multip. db(z) by multip.
sb(z) by multip. db(z) by cotran.
40Outline
- Logarithmic Number System
- Addition/Subtraction Optimization
- Cotransformations
- Synthesis, Simulation and Error Behavior
- Conclusions
41Conclusions
- LNS is useful for application-specific systems
- Overview of existing techniques for LNS
addition/subtraction - Overview of existing cotransformation techniques
- New cotransformation proposed
- New cotransformation studied in terms of area,
latency, and error behavior - Cotransformation improves error behavior and
area, with a slight cost for latency
42Acknowledgements
- Nicolas Frantzen and Jesus Garcia for their
contributions - The ASAP organizing committee for the shared
best-paper award
43Thank you for your attention