Design and Implementation of IEEE-754 Decimal Floating Point Adder, Subtractor and Multiplier

Similar documents
An FPGA Based Floating Point Arithmetic Unit Using Verilog

Figurel. TEEE-754 double precision floating point format. Keywords- Double precision, Floating point, Multiplier,FPGA,IEEE-754.

Double Precision Floating Point Core VHDL

Implementation of IEEE-754 Double Precision Floating Point Multiplier

COMPARISION OF PARALLEL BCD MULTIPLICATION IN LUT-6 FPGA AND 64-BIT FLOTING POINT ARITHMATIC USING VHDL

Design and Simulation of Pipelined Double Precision Floating Point Adder/Subtractor and Multiplier Using Verilog

ISSN Vol.02, Issue.11, December-2014, Pages:

Pipelined High Speed Double Precision Floating Point Multiplier Using Dadda Algorithm Based on FPGA

Implementation of Double Precision Floating Point Multiplier in VHDL

Architecture and Design of Generic IEEE-754 Based Floating Point Adder, Subtractor and Multiplier

AN IMPROVED FUSED FLOATING-POINT THREE-TERM ADDER. Mohyiddin K, Nithin Jose, Mitha Raj, Muhamed Jasim TK, Bijith PS, Mohamed Waseem P

An Efficient Implementation of Floating Point Multiplier

FPGA based High Speed Double Precision Floating Point Divider

University, Patiala, Punjab, India 1 2

An FPGA based Implementation of Floating-point Multiplier

An Implementation of Double precision Floating point Adder & Subtractor Using Verilog

International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering

Implementation of Floating Point Multiplier Using Dadda Algorithm

A High Speed Binary Floating Point Multiplier Using Dadda Algorithm

VHDL IMPLEMENTATION OF FLOATING POINT MULTIPLIER USING VEDIC MATHEMATICS

A Decimal Floating Point Arithmetic Unit for Embedded System Applications using VLSI Techniques

Design of Double Precision Floating Point Multiplier Using Vedic Multiplication

International Journal of Research in Computer and Communication Technology, Vol 4, Issue 11, November- 2015

Implementation of IEEE754 Floating Point Multiplier

Design and Optimized Implementation of Six-Operand Single- Precision Floating-Point Addition

Run-Time Reconfigurable multi-precision floating point multiplier design based on pipelining technique using Karatsuba-Urdhva algorithms

A Pipelined Fused Processing Unit for DSP Applications

Implementation of Double Precision Floating Point Multiplier Using Wallace Tree Multiplier

Fused Floating Point Arithmetic Unit for Radix 2 FFT Implementation

ADDERS AND MULTIPLIERS

Implementation of Double Precision Floating Point Multiplier on FPGA

THE INTERNATIONAL JOURNAL OF SCIENCE & TECHNOLEDGE

International Journal Of Global Innovations -Vol.6, Issue.II Paper Id: SP-V6-I1-P01 ISSN Online:

Review on Floating Point Adder and Converter Units Using VHDL

FPGA Implementation of Single Precision Floating Point Multiplier Using High Speed Compressors

AN EFFICIENT FLOATING-POINT MULTIPLIER DESIGN USING COMBINED BOOTH AND DADDA ALGORITHMS

IJCSIET--International Journal of Computer Science information and Engg., Technologies ISSN

FLOATING POINT ADDERS AND MULTIPLIERS

Design of a Floating-Point Fused Add-Subtract Unit Using Verilog

Development of an FPGA based high speed single precision floating point multiplier

VHDL implementation of 32-bit floating point unit (FPU)

VLSI Based Low Power FFT Implementation using Floating Point Operations

Computer Architecture and Organization

Chapter 4. Operations on Data

A comparative study of Floating Point Multipliers Using Ripple Carry Adder and Carry Look Ahead Adder

Computer Arithmetic Ch 8

Computer Arithmetic Ch 8

FLOATING POINT NUMBERS

International Journal of Advanced Research in Computer Science and Software Engineering

Comparison of Adders for optimized Exponent Addition circuit in IEEE754 Floating point multiplier using VHDL

CPE300: Digital System Architecture and Design

Fig.1. Floating point number representation of single-precision (32-bit). Floating point number representation in double-precision (64-bit) format:

FPGA Implementation of Low-Area Floating Point Multiplier Using Vedic Mathematics

Implementation of a High Speed Binary Floating point Multiplier Using Dadda Algorithm in FPGA

Low Power Floating-Point Multiplier Based On Vedic Mathematics

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

A Novel Efficient VLSI Architecture for IEEE 754 Floating point multiplier using Modified CSA

Prachi Sharma 1, Rama Laxmi 2, Arun Kumar Mishra 3 1 Student, 2,3 Assistant Professor, EC Department, Bhabha College of Engineering

VHDL IMPLEMENTATION OF IEEE 754 FLOATING POINT UNIT

IMPLEMENTATION OF DOUBLE PRECISION FLOATING POINT RADIX-2 FFT USING VHDL

Floating Point Arithmetic

Principles of Computer Architecture. Chapter 3: Arithmetic

Design and Implementation of Floating Point Multiplier for Better Timing Performance

REALIZATION OF AN 8-BIT PROCESSOR USING XILINX

VLSI DESIGN OF FLOATING POINT ARITHMETIC & LOGIC UNIT

Floating Point. The World is Not Just Integers. Programming languages support numbers with fraction

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3

FPGA Implementation of Multiplier for Floating- Point Numbers Based on IEEE Standard

EC2303-COMPUTER ARCHITECTURE AND ORGANIZATION

Signed Multiplication Multiply the positives Negate result if signs of operand are different

FPGA IMPLEMENTATION OF FLOATING POINT ADDER AND MULTIPLIER UNDER ROUND TO NEAREST

International Journal Of Global Innovations -Vol.1, Issue.II Paper Id: SP-V1-I2-221 ISSN Online:

FFT REPRESENTATION USING FLOATING- POINT BUTTERFLY ARCHITECTURE

DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTOR SUPPORT

International Journal of Advanced Research in Computer Science and Software Engineering

Evaluation of High Speed Hardware Multipliers - Fixed Point and Floating point

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Double Precision Floating-Point Multiplier using Coarse-Grain Units

ARCHITECTURAL DESIGN OF 8 BIT FLOATING POINT MULTIPLICATION UNIT

Implementation of 64-Bit Pipelined Floating Point ALU Using Verilog

Pipelined Quadratic Equation based Novel Multiplication Method for Cryptographic Applications

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Chapter 5 : Computer Arithmetic

ISSN: X Impact factor: (Volume3, Issue2) Analyzing Two-Term Dot Product of Multiplier Using Floating Point and Booth Multiplier

ECE 30 Introduction to Computer Engineering

By, Ajinkya Karande Adarsh Yoga

CO212 Lecture 10: Arithmetic & Logical Unit

An Effective Implementation of Dual Path Fused Floating-Point Add-Subtract Unit for Reconfigurable Architectures

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

C NUMERIC FORMATS. Overview. IEEE Single-Precision Floating-point Data Format. Figure C-0. Table C-0. Listing C-0.

Chapter 2 Data Representations

Double Precision Floating-Point Arithmetic on FPGAs

Number Systems. Readings: , Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs

Inf2C - Computer Systems Lecture 2 Data Representation

Vendor Agnostic, High Performance, Double Precision Floating Point Division for FPGAs

Comparison of pipelined IEEE-754 standard floating point multiplier with unpipelined multiplier

Number Systems and Computer Arithmetic

Fused Floating Point Three Term Adder Using Brent-Kung Adder

Data Representations & Arithmetic Operations

Design and Analysis of Inexact Floating Point Multipliers

Transcription:

International Journal of Engineering and Advanced Technology (IJEAT) ISSN: 2249 8958, Volume-4 Issue 1, October 2014 Design and Implementation of IEEE-754 Decimal Floating Point Adder, Subtractor and Multiplier S. Murali, B. Srinivas Abstract This paper describes the development of a Decimal Floating Point adder/subtractor multiplier and division for ALU in verilog with the help of ModelSim and will be synthesized by using Xilinx tools. These are available in single cycle and pipeline architectures and fully synthesizable with performance comparable to other available high speed implementations. The design is described as graphical schematics and code. This representation is very valuable as allows for easy navigation over all the components of the units, which allows for a faster understanding of their inter relationshipss and the different aspects of a Floating Point operation. The presented DFP adder/subtractor supports operations on the decimal 64 format and our extension is decimal floating point multiplier. The fixedpoint design is extended to support floating-poinby adding several components including exponent generation, multiplication rounding, shifting, and exception handling. And DFP multiplier is compared with the booth multiplier technique. Keywords DFP, Booth multiplier, IEEE Floating point multiplication. I. INTRODUCTION 754-1985 standard, Decimal arithmetic plays a key role in many commercial and financial applications, which process decimal values and perform decimal rounding. However, current software implementations are prohibitively slow prompting hardware manufacturers such as IBM to add decimal floating point (DFP)arithmetic support to their microprocessors. Furthermore, the IEEE has developed the newly IEEE 754-2008standard for Floating-Point Arithmetic adding the decimal representation to the IEEE754-1985 standard. Floating-point operations have been acknowledged to be useful for many real-time graphic and multimedia applications since it provides a wide dynamic range of representable real numbers. Most modern processors perform floating-point operation according to the IEEE 754-1985 Standard for binary floating-point arithmetic which has been recently revised to include specifications for decimal floating-point arithmetic (IEEE 754R). IEEE 754-1985 floating-point multiplication is typically performed by first generating the partial products of two n-bit (n=24 or 53) normalized significand in parallel, followed by reducing these partial products with an addition tree into the sum (s) and carry (c) terms. Next, a carry-propagate adder is used to sum up these two 2n-bit terms to produce a 2n-bit product P, which is then normalized and rounded to produce the final rounded n-bit product. The exponent of the product is the sum of the exponents with proper bias adjustment and increment if the prenormalized product requires a 1-bit normalization shift. Figure 1. IEEE-754 double precision floating point format 2. Implementation of Double Precision Floating Point Adder/Subtractor The black box view and block diagram of double precision floating point adder/subtractor is shown in Figures 2 and 3 respectively. The input operands are separated into their sign, mantissa and exponent components. This module has inputs opa and opb of 64-bit width and clk, enable, rst are of 1-bit width. One of the operands is applied at opa and other operand at opb. Larger operand goes into mantissa_large and exponent_large, similarly the smaller operand goes into mantissa_small and exponent_small. To determine which operand is larger, compare only the exponents of the two operands, so in fact, if the exponents are equal, the smaller operand might populate the mantissa_large and exponent_large registers. This is not an issue because the reason the operands are compared is to find the operand with the larger exponent, so that the mantissa of the operand with the smaller exponent can be right shifted before performing the addition. If the exponents are equal, the mantissas are added without shifting. The inter-connection of sub-modules of double precession floating point adder/subtractor is shown in Figure 4. Subtraction is similar to addition in that you need to calculate the difference in the exponents between the two operands, and then shift the mantissa of the smaller exponent to the right before subtracting. Manuscript Received on October 2014. S. Murali, Department of Electronics and Communication, MVGR College of Engineering, Vizianagaram, India. B. Srinivas, Dept. of Electronics and Communication, MVGR College of Engineering, Vizianagaram, India. Figure 2. Black box view of double precision floating point adder/ /subtractor 161

Design and Implementation of IEEE-754 Decimal Floating Point Adder, Subtractor and Multiplier Figure 3. Block diagram of double precision floating point adder/subtractor Figure 4. Inter-connection of sub-modules of double precision floating point adder/subtractor 162

International Journal of Engineering and Advanced Technology (IJEAT) ISSN: 2249 8958, Volume-4 Issue 1, October 2014 2.1 Algorithm 1. Compare exponent and mantissa of both numbers. Find the large exponent and mantissa and small exponent and mantissa. 2. If both exponents are equal then put leading 1 and 0 in front of each mantissa for overflow, i.e., 52+2 bits. 3. If overflow occurs the exponent must be increased by one. 54th bit will be shifted out of mantissa and this will be saved for rounding purpose. 4. The leftmost 1 in the result becomes leading 1 of mantissa and next 52 bits are actual mantissa. 5. If there is overflow 1 in result, the exponent of larger operand is increased by one. Then add both mantissas. 6. If one exponent is larger than other then subtract smaller exponent from larger exponent, and difference is saved. 7. Now shift smaller mantissa by that subtracted exponent difference. 8. If exponents are equal, i.e., larger exponent is equal to smaller exponent after shifting then put leading 1 in both mantissas and perform addition for mantissas. 9. For subtraction if both exponents are equal then put implied 1 in front of mantissa and perform subtraction. 10. Store that result in diff register. Count the number of zeros in diff before the left most 1. 11. Reduce the large operand exponent by number of zeros in front of least 1. 12. The left most 1 will be leading 1 in front of mantissa. 13. Finally rounding and normalization is done. 3. Implementation of Double Precision Floating Point Multiplier 3.1 Floating Point Multiplication Algorithm Multiplying two numbers in floating point format is done by 1. Adding the exponent of the two numbers then subtracting the bias from their result. 2. Multiplying the significand of the two numbers 3. Calculating the sign by XORing the sign of the two numbers. In order to represent the multiplication result as a normalized number there should be 1 in the MSB of the result (leading one).the following steps are necessary to multiply two floating point numbers. 1. Multiplying the significand, i.e., (1.M1*1.M2) 2. Placing the decimal point in the result 3. Adding the exponents, i.e., (E1 + E2 Bias) 4. Obtaining the sign i.e. s1 xor s2 5. Normalizing the result, i.e., obtaining 1 at the MSB of the results significand 6. Rounding the result to fit in the available bits 7. Checking for underflow/overflow occurrence 3.2 Implementation In this paper we implemented a double precision floating point multiplier with exceptions and rounding. Figure 5 shows the multiplier structure that includes exponents addition, significand multiplication, and sign calculation. Figure 6 shows the multiplier, exceptions and rounding that are independent and are done in parallel. Figure 5. Multiplier Structure Figure 6. Multiplier structure with rounding and exceptions 3.2.1 Multiplier The black box view of the double precision floating point multiplier is shown in figure 8.The Multiplier receives two 64-bit floating point numbers. First these numbers are unpacked by separating the numbers into sign, exponent, and mantissa bits. The sign logic is a simple XOR. The exponents of the two numbers are added and then subtracted with a bias number i.e., 1023. Mantissa multiplier block performs multiplication operation. After this the output of mantissa division is normalized, i.e., if the MSB of the result obtained is not 1, then it is left shifted to make the MSB 1. If changes are made by shifting then corresponding changes has to be made in exponent also. Figure 7. Black box view of floating point double precision multiplier 163

Design and Implementation of IEEE-754 Decimal Floating Point Adder, Subtractor and Multiplier exception, and invalid will be each case exist. II. BOOTH MULTIPLIER asserted if the conditions for Table design summary of DFP multiplier The multiplication operation is performed in the module (fpu_mul). The mantissa of operand A and the leading 1 (for normalized numbers) are stored in the 53-bit register (mul_a). The mantissa of operand B and the leading 1 (for normalized numbers) are stored in the 53-bit register (mul_b). Multiplying all 53 bits of mul_a by 53 bits of mul_b would result in a 106-bit product. 53 bit by 53 bit multipliers are not available in the most popular Xilinx and Altera FPGAs, so the multiply would be broken down into smaller multiplies and the results would be added together to give the final 106-bit product. The module (fpu_mul) breaks up the multiply into smaller 24-bit by 17-bit multiplies. The Xilinx Virtex-6 device contains DSP48E1 slices with 25 by 18 two s complement multipliers, which can perform a 24- bit by 17-bit unsigned multiply. A. Schematic block Figure 8 Booth Multiplier Figure 9: Schematic block booth multiplier B. Synthesis Report Table1: Design summary Table Rounding modes selected for various bit combinations of rmode 4. Rounding and Exceptions The IEEE standard specifies four rounding modes round to nearest, round to zero, round to positive infinity, and round to negative infinity. Table shows the rounding modes selected for various bit combinations of rmode. Based on the rounding changes to the mantissa corresponding changes has to be made in the exponent part also. In the exceptions module, all of the special cases are checked for, and if they are found, the appropriate output is created, and the individual output signals of underflow, overflow, inexact, 164

International Journal of Engineering and Advanced Technology (IJEAT) ISSN: 2249 8958, Volume-4 Issue 1, October 2014 Table design summary of booth multiplier Comparison between booth multiplier and decimal floating point multiplier VI. RESULTS III. DFP DIVISION VII. DFP ADDER OUTPUT. IV. INTERNAL SCHMATIC BLOCK DIAGRAM VIII. DFP SUBTRACTOR OUTPUT V. DESIGNSUMMARY 165

Design and Implementation of IEEE-754 Decimal Floating Point Adder, Subtractor and Multiplier IX. DFP MULTIPLIER OUTPUT X. DFP DIVISION OUTPUT XI. CONCLUSION In these paper DFP adder/subtractor/division are implemented and DFP multiplier is compared with booth multiplier by using Xilinx software.in booth multiplier 327.997ns delay is obtained, but in floating point multiplier the delay has reduced to 4.283ns. So from the obtained results, it is clear that the floating point multiplier can perform better performance than the existed booth multiplier. REFERENCES [1] Improved Architectures for a Fused Floating-Point Add-Subtract Unit Jongwook Sohn, StudentMember, IEEE, and Earl E. Swartzlander, Jr., Life Fellow, IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS I: REGULAR PAPERS, VOL. 59, NO. 10, OCTOBER 2012. [2] IEEE Standard for Floating-Point Arithmetic, ANSI/IEEE Standard 754-2008, New York: IEEE, Inc., Aug. 29, 2008. [3] E. Hokenek, R. K. Montoye, and P. W. Cook, Second-generation RISC floating point with multiply-add fused, IEEE J. Solid-State Circuits, vol. 25, no. 5, pp. 1207 1213, Oct. 1990. [4] T. Lang and J. D. Bruguera, Floating-point fused multiply-add with reduced latency, IEEE Trans. Comput., vol. 53, no. 8, pp. 988 1003, Aug. 2004. [5] IEEE Standard for Floating-Point Arithmetic, pp. 1 58, 2008, ieee Std 754-2008. [6] M. F. Cowlishaw, Decimal floating-point: algorism for computers, in Proc. 16th IEEE Symp. Computer Arithmetic, 2003, pp. 104 111. 166