Implementation of Optimized Floating Point Adder On FPGA
Implementation of Optimized Floating Point Adder On FPGA
e-ISSN: 2278-2834,p- ISSN: 2278-8735.Volume 10, Issue 4, Ver. I (Jul - Aug .2015), PP 46-51
www.iosrjournals.org
Vipul Agrawal
Research Scholar
Dept. of Electronics and Communication Engineering,
Trinity Institute of Science & Research, Bhopal,
[email protected]
Assist. Prof.
Dept. of Electronics and Communication Engineering
Trinity Institute of Science & Research, Bhopal,
[email protected]
Abstract: This paper presents the FPGA implementation of a Decimal Floating Point (DFP) adder. The design
performs addition on 64-bit operands that use the IEEE 754-2008 DPD encoding of DFP numbers. The design
uses an equal bypass adder, this adder reduces the power consumption and it also reduces the delay by
reducing the gate count. The design also uses barrel shifter instead of sequential shifter. The design has a
maximum combinational delay of 45ns on a Virtex-5 with a latency of 1 cycle. The proposed DFP adder
supports operations on the decimal64 format and it is easily extendable for the decimal128 format.
Keywords: Floating point adder, FPGA, Delay, Area overhead
I.
Introduction
The binary floating point (BFP) arithmetic has certain flaws namely; it cannot provide correct decimal
rounding and cannot precisely represent some decimal fractions such as 0.001, 0.0475 etc [1]. There are many
applications where a precision is required such as billing, insurance, currency conversion, banking and some
scientific applications. European Union requires that currency conversion to and from EURO is to be calculated
to six decimal digits [2]. One study estimates that errors generating from BFP arithmetic can sum up to a yearly
billing of over dollar 5 million for a large billing organization [3]. Therefore decimal floating point (DFP)
arithmetic becomes very important in many current and future applications as it has ability to represent decimal
fractions precisely. DFP arithmetic also has the ability to provide correct decimal rounding that will mimic the
manual rounding.
Applications which cannot tolerate errors generating from BFP arithmetic, these application use
software platforms to perform DFP arithmetic [1]. There are many software packages which are available for
example: the java BigDecimal library [5] and IBMs decNumber library [4]. Also Intel published results for a
decimal arithmetic library which uses Binary integer decimal (BID) encoding. These software packages are
good enough for current applications, but trends towards globalization and e-commerce are increasing, so faster
response of these systems is required. Software designs to these systems may be inadequate with the increasing
performance demands of future systems. So hardware implementation of these systems is the need of the hour.
In 2008, the IEEE 754-1985 floating point standard has been revised and the new standard called the
IEEE 754-2008 floating point standard was setup [6], which includes specifications for DFP formats, encoding
and operations. The IEEE 754-2008 standard includes an encoding format for DFP numbers in which the
significand and the exponent (and the payloads of NaNs) can be encoded in two ways namely; binary encoding
and decimal encoding. [7]
Both the encoding formats break a number into a sign bit s, an exponent E, and a p-digit significand c.
The value encoded is (1)s 10E c. In both formats the range of possible values is identical, but the
significand c is encoded differently. In the decimal encoding, it is encoded as a series of p decimal digits using
the densely packed decimal encoding (DPD). In the binary encoding also known as binary integer decimal
(BID) encoding, it is encoded as a binary number.
In this paper a floating point adder unit is proposed. This floating point adder unit is IEEE P754 2008
complaint and based on densely packed decimal (DPD) encoding for DFP arithmetic. The proposed floating
point adder unit uses low power equal bypass adder to reduce the power consumption of the design.
II.
In IEEE 754-2008, the value of a finite DFP number with an integer significand is
v= (1)s 10q c
where S is the sign, q is the unbiased exponent, and C is the significand. The precision or the length of the
significand is denoted as p, which is equal to 7, l6, or 34 digits, for decimal32, decimal64, or decimall28,
respectively. Figure 1.1 shows the double precision decimal64 Decimal Floating Point format.
DOI: 10.9790/2834-10414651
www.iosrjournals.org
46 | Page
Combination
field
abcde
11 a b c
11110
11111
Exponents
Bits
ab
ab
..
..
Significand
MSD
0cde
100e
....
....
www.iosrjournals.org
47 | Page
III.
The floating point adder shown in figure 1.3 uses a 16 digit BCD adder for the addition of mantissa Am
and Bm. Figure 1.4 shows the 4 bit BCD adder, this BCD adder uses two 4 bit ripple carry adder, these 4 bit
ripple carry adder uses conventional full adder.
DOI: 10.9790/2834-10414651
www.iosrjournals.org
48 | Page
DOI: 10.9790/2834-10414651
www.iosrjournals.org
49 | Page
All logics were described in VHDL. The design has been implemented on Xilinx Virtex-5 device XC5VLX30FF324-3. Resource utilization is shown in table 2. Design statics are shown in table 3.
Table 2: Device Utilization Summary
S.No.
1
2
Resource
Number of slice registers
Number of slice LUTs
Utilization
5/19200
803/19200
Cell
BELS
GND
LUT2
LUT3
LUT4
LUT5
LUT6
MUXF7
FLIP FLOPS/LACTHES
LD
LDCP
IO Buffers
IBUF
OBUF
Usage
840
1
9
101
82
180
431
36
7
5
2
193
129
64
Frequency
10 Mhz
50 Mhz
100 Mhz
200 Mhz
Static
379 mw
380 mw
382 mw
385 mw
Dynamic
24 mw
118 mw
235 mw
471 mw
Total
403mw
498 mw
617 mw
856 mw
V.
Conclusion
IEEE P754 compliant decimal floating point adder is successfully implemented on Virtex-5 device.
The design was tested with several test vectors and no errors are found, so the design is behaving correctly. We
have replaced the full adder of the BCD adder by a low power low delay full adder to reduce the power
consumption and the delay of the design. The design has a maximum combinational delay of 45 ns with the
latency of 1 clock cycle.
The low power low delay adder can be further used in the implementation of multiplier and divider
circuit and the complete floating point arithmetic and logic unit can be implemented on FPGA. This will reduce
the power consumption of the complete design. Further clock gating techniques can be used to reduce the clock
power.
References
[1].
[2].
[3].
[4].
[5].
[6].
[7].
[8].
[9].
[10].
[11].
[12].
[13].
M.F. Cowlishaw, Decimal Floating-Point: Algorism for Computers, Proc. IEEE 16th Symp. Computer Arithmetic, pp. 104-111,
2003.
IBM Corporation, The Telco benchmark, http://speleotrove.com/Decimal/telcoSpec.html, 2005.
D.-G. for Economic and F. A. C. from the Commission to the European Council, Review of the Introduction of Euro Notes and
Coins, EURO PAPERS, Apr. 2002.
M.F. Cowlishaw The decNumber library, v3.68. IBM, http://speleotrove.- com/decimal/decnumber.pdf, 2013.
S.
Microsystems
BigDecimal
Class,
Java
2
Platform
Standard
ed.
5.0,
APISpecification,http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html, 2013.
M. Cornea, C. Anderson, J. Harrison, P.T.P. Tang, E. Schneider, and C.Tsen, A Software Implementation of the IEEE 754R
Decimal Floating-Point Arithmetic Using the Binary Encoding Format, Proc. IEEE 18 th Symp.
ANSI/IEEE 754-1985, Standard for Binary Floating-Point Arithmetic.
.K. Yu, G.B. Zyner, 167 MHz radix-4 floating point multiplier, Proceedings 12th Symposium on Computer Arithmetic, 1995, pp.
149-154.
C. Gamez, R. Pang, Apparatus and method for rounding operands, U.S. patent 5258943, 1993.
M. Saishi, T. Minemaru, Multiplication circuit having rounding function, U.S. patent 5500812, 1996.
Guy Even, Silvia M. Mueller, Peter-Michael Seidel A dual precision IEEE Floating-point multiplier Elsevier INTEGRATION,
the VLSI journal 29 (2000) 167-180.
C. Tsen, M.J. Schulte, and S.G. Navarro, Hardware Design of a Binary Integer Decimal Based IEEE P754 Rounding Unit, Proc.
IEEE 18th Intl Conf. Application-Specific Systems, Architectures and Processors, pp. 115-121, 2007.
B.J. Hickmann, A. Krioukov, M.J. Schulte, and M.A. Erle, A Parallel IEEE P754 Decimal Floating-Point Multiplier, Proc. IEEE
25th Intl Conf. Computer Design, 2007.
DOI: 10.9790/2834-10414651
www.iosrjournals.org
50 | Page
[17].
[18].
[19].
[20].
[21].
C. Tsen, S.G. Navarro, M.J. Schulte, B. Hickmann, and K. Compton, A Combined Decimal and Binary Floating-Point Multiplier,
Proc. IEEE 20th Intl Conf. Application-Specific Systems, Architectures, and Processors, pp. 8-15, 2009.
J. Di and J. S. Yuan, Power-aware pipelined multiplier design based on 2-dimensional pipeline gating, in 13th Great Lakes
Symposium on VLSI. ACM, 2003, pp. 6467.
Sunjoo Hong, Taehwan Roh and Hoi-Jun Yoo, a 145w 88 parallel multiplier based on optimized bypassing architecture,
department of electrical engineering, Korea advanced institute of science and technology (KAIST), Daejeon, Republic of Korea,
IEEE, pp.1175-1178, 2011.
in-Tsung Hwang, Jin-Fa Lin, Ming-Hwa Sheu and Chia-Jen Sheu, low power multipliers using enhenced row bypassing schemes,
department of electronic engineering, National Yunlin University of science & technology, Touliu, Yunlin, Taiwan, IEEE, pp.13 6140, 2007.
George Economakos, Dimitris Bekiaris and Kiamal Pekmestzi, a mixed style architecture for low power multipliers based on a
bypass technique, national technical University of Athens, school of electrical and computer engineering, heroon polytechniou 9,
GR-15780 Athens, Greece, IEEE, pp.4-6, 2010.
Meng-Lin Hsia and Oscal T.-C. Chen, low power multiplier optimized by partial-product summation and adder cells, dept. of
electrical engineering, national chung cheng University, chia-yi, 621, Taiwan, IEEE, pp.3042-3045, 2009. [12] P. C. H. Meier,
analysis and design of low power digital multipliers, Ph.D. thesis, Carnegie Mellon University, dept. of electrical and computer
engineering, Pittsburgh, Pennsylvania, 1999.
Carlos Minchola, Martin Vazquez and Gustavo Sutter A FPGA IEEE 754 2008 decimal floating point adder subtractor 2011
IEEE.
Yanyu Ding, Deming Wang, Jianguo Hu and Hongzhou Tan, A Low power Parallel Multiplier Based on Optimized-EqualBypassing-Technique, Third International Conference on Information Science and Technology March, 2013 IEEE, China.
DOI: 10.9790/2834-10414651
www.iosrjournals.org
51 | Page