Free Essay

Vedic Multipier

In:

Submitted By ash007
Words 2343
Pages 10
VHDL IMPLEMENTATION OF FLOATING POINT
MULTIPLIER USING VEDIC MATHEMATICS
I.V.VAIBHAV1, K.V.SAICHARAN1, B.SRAVANTHI1, D.SRINIVASULU2
1

Students of Department of ECE,SACET, Chirala, AP, India
Associate Professor of the Dept ECE, SACET, Chirala, AP, India
3
Electronics and Comunication Department, St.Ann‟s college of engineering & Technology, Chirala, india.
E-mail:innamurivaibhav1@gmail.com, kota.saicharan@gmail.com, sravanthi.408b@gmail.com, seenu_dasari@rediffmail.com 2

Abstract: This project presents a binary floating point multiplier based on Vedic algorithm. To improve power efficiency a new algorithm called URDHVA-TRIYAKBHYAM has been implemented for 24 X 24 bit multiplier design. By using this approach number of components can be decreased and complexity of hardware circuit can be decrease. In this project, Vedic multiplication technique is used to implement IEEE 754 floating point multiplier. The Urdhava-Triyakbhym sutra is used for the multiplication of Mantissa i.e., 24x24 bits. The sign bit of the result is calculated using one XOR gate and a Carry Save
Adder is used for adding the two biased Exponents. The underflow and overflow cases are handled. The inputs to the multiplier are provided in IEEE 754, 32 bit format. The multiplier is implemented in VHDL and Spartan3E FPGA is used.
The result consists of 32 bit binary number of which MSB represent sign, next 8 bit represents Exponent and remaining 23 bits represents Mantissa.
Keywords: Vedic Mathematics, Urdhva -Triyakbhyam sutra, Floating Point multiplier, Field Programmable Gate Array (
FPGA), Carry Save Adder

main aims of designing floating point units (FPUs) for reconfigurable hardware implementation are: (a) to parameterise the precision and range of the floating-point format to allow optimizing the FPUs for specific applications, and (b) to support optional inclusion of features such as gradual underflow and rounding. An approach meeting these aims will achieve effective design trade-off between performance and required resources.
The Binary
Floating - Point representation is in two formats i.e.,
i) Single Precision ii) Double Precision.

I. INTRODUCTION:
Floating-point operations are useful for computations involving large dynamic range, but they require significantly more resources than integer operations.
The rapid advance in Field-Programmable Gate Array
(FPGA) technology makes such devices increasingly attractive for implementing floating-point arithmetic.
FPGAs offer reduced development time and costs compared to application specific integrated circuits, and their flexibility enables field upgrade and adaptation of hardware to run-time conditions. Our

International Conference on Electrical, Electronics and Communications-ICEEC-21st June 2014-ISBN-978-93-81693-66-03
110

VHDL Implementation of Floating Point Multiplier Using Vedic Mathematics

The following Figure I represents the format of the
IEEE 754 standard Single and Double Precision structure. In the Single Precision it contains 32 bits,and the Mantissa has the length 23 bits and 1bit is added to the MSB for normalization, Exponent has the length of 8 bits which is biased to 127, actually the Exponent is represented in excess 127 bit format and MSB of Single is reserved for Sign bit.

II. FLOATING POINT MULTIPLIER
In order to enhance the performance of the multiplier, three pipelining stages are used to divide the critical path thus increasing the maximum operating frequency of the multiplier.
The pipelining stages are imbedded at the following locations: If the sign bit is „1‟ it represents that the number is negative and when the sign bit is „0‟ it represents that the number is positive. In the Double Precision it contains 64 bits and the Mantissa has the length 52 bits and 1bit is added to the MSB for normalization, the Exponent has the length of 11 bits which is biased to 1023 and the MSB of Double is reserved for sign bit.

1) In the middle of the significand multiplier, and in the middle of the exponent adder (before the bias subtraction). 2) After the significand multiplier, and after the exponent adder.
3) At the floating point multiplier outputs (sign, exponent and mantissa bits).

Multiplication of two floating point numbers represented in IEEE 754 format is done by multiplying the normalized 24 bit mantissa, adding the biased 8 bit exponent and resultant is converted in excess 127 bit format and for the biasing result we are using Carry Save Adder, for the sign calculation the input sign bits are XORed.

Three pipelining stages mean that there is latency in the output by three clocks. The synthesis tool
“retiming” option was used so that the synthesizer uses its optimization logic to better place the pipelining registers across the critical path.

The exponent can only represent positive numbers 0 through 255. To represent both positive and negative exponents, a fixed value, called a bias, is subtracted from the exponent field to obtain the true exponent.
Bias-127 exponent, e = E + bias: This gives us an exponent range from Emin = -126 to Emax =127. The mantissa is the set of 0‟s and 1‟s to the right of the radix point of the normalized (when the digit to the left of the radix point is 1) binary number.

partial products are generated simultaneously which itself reduces delay and makes this method fast. The method for multiplication of two, 3 BITs number.
Consider the numbers A and B where A = a2a1a0 and
B = b2b1b0. The LSB of A is multiplied with the
LSB of B: s0=a0b0; Then a0 is multiplied with b1, and b0 is multiplied with a1 and the results are added together as: c1s1=a1b0+a0b1; III. MULTIPLICATION STEPS OF URDHVATRIYAKBHYAM

Here c1 is carry and s1 is sum. Next step is to add c1 with the multiplication results of a0 with b2, a1 with b1 and a2 with b0. c2s2=c1+a2b0+a1b1 + a0b2;
Next step is to add c3 with the multiplication results of a1 with b2 and a2 with b1. c3s3=c2+a1b2+a2b1; Similarly the last step

The Vedic multiplication system is based on 16 Vedic sutras or aphorisms, which describes natural ways of solving a whole range of mathematical problems. Out of these 16 Vedic Sutras the Urdhva-triyakbhyam sutra is suitable for this purpose. In this method the

International Conference on Electrical ,Electronics and Communications-ICEEC-21st June 2014-ISBN-978-93-81693-66-03
111

VHDL Implementation of Floating Point Multiplier Using Vedic Mathematics

c4s4=c3+a2b2;

2. If the leading one is at bit 47 then the intermediate product is shifted to the right and the exponent is incremented by 1.

Now the final result of multiplication of A and B is c4s4s3s2s1s0. The shift operation is done using combinational shift logic made by multiplexers. Fig shows a simplified logic of a Normaliser that has an 8 bit intermediate product input and a6bit intermediate exponent input.
After addition the result is again biased to excess 127 bit Code. For this purpose 127 is subtracted from the result. Two‟s complement subtraction using addition is incorporated for this purpose. If ER is the final resultant exponent then, ER = EA + EB – 127 where
EA and EB are the exponent parts of operands A and
B respectively. In this case ER = 10000110. Mantissa multiplication is done using the 24 bit Vedic
Multiplier. The mantissa is expressed in 23 bit which is normalized to 24 BIT by adding a 1 at MSB.

Algorithm Steps:
1. Multiplying the significand(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 result‟s significand.
6. Checking for underflow/overflow occurrence

The block diagram of 24x24 BIT multiplier is shown in Figure 5.This multiplier is modelled using structural style of modelling using VHDL. In this paper first a 3x3 Vedic multiplier is implemented using the above mentioned method.

The result of the significant multiplication
(intermediate product) must be normalized to have a leading „1‟ just to the left of the decimal point (i.e. in the bit 46 in the intermediate product). Since the inputs are normalized numbers then the intermediate product has the leading one at bit 46 or 47

The 6x6 is designed using four 3x3 multipliers. After that the 12x12 is implemented using four 6x6 BIT multiplier. Finally the 24x24 BIT multiplier is made using four 12x12 BIT multipliers. The 24x24 BIT multiplier requires four 12x12 BIT multipliers and two 24 BIT ripple carry adders and 36 BIT ripple carry adders.

1. If the leading one is at bit 46 (i.e. to the left of the decimal point) then the intermediate product is already a normalized number and no shift is needed.

front augmented with “000000000000” now second block 24 bits and above 24 generate bits are added and 24 bits sum is generated using 24 bit ripple carry adder. A 24*24 Vedic multiplier is design by using four
12*12 Vedic multipliers based urdhva Triyakbhyam.
Here first block 12X12 multiplier consists of lower
12 bits of x i.e. x(11 down to 0) and y(11 down to 0), second block 12*12 Vedic multiplier inputs are x(23 down to 12) and y(11 down to 0) out off 24 bit output of first block lower adder 12 bits are separated and higher order bits are appended as 12 lower bits in

Higher order 12 bit of y(23 down to 12) and lower order 12 bits of x i.e x(11 down to 0) are multiplier and appended infront with “000000000000” to make
36 data similarly both higher order 12 bits of x and y

International Conference on Electrical ,Electronics and Communications-ICEEC-21st June 2014-ISBN-978-93-81693-66-03
112

VHDL Implementation of Floating Point Multiplier Using Vedic Mathematics

i.e x(23 downto 12) and y(23 downto 12) are multiplier and 36 bit data is formed by appending
“000000000000”.
The above two 36 bits are added to generate a 36 bit data in the right side resultant 36 bits are added to

generate final 36 bits the resultant of 24*24 multiplier is 48 bits consists of 36 higher bits from 36 bit adder output and lower order 12 bits 36+12=48 bits.

The number of LUTs and slices required for the
Vedic Multiplier is less and due to which the power consumption is reduced.

required for computing multiplication is less than the other multiplication techniques.
An Overflow or Underflow case occurs when the result Exponent is higher than the 8 BIT or lower than
8 BIT respectively. Overflow may occur during the

Also the repetitive and regular structure of the multiplier makes it easier to design. And the time

International Conference on Electrical ,Electronics and Communications-ICEEC-21st June 2014-ISBN-978-93-81693-66-03
113

VHDL Implementation of Floating Point Multiplier Using Vedic Mathematics

addition of two Exponents which can be compensated at the time of subtracting the bias from the exponent result. When overflow occurs the overflow flag goes up. The under flow can occur after the subtraction of bias from the exponent, it is the case when the number goes below 0 and this situation can be handled by adding 1 at the time of normalization.
When the underflow case occur the under flow flag goes high.

SIMULATION RESULTS
3*3 Vedic multiplier:

Example of 32 bit Multiplier
The Mantissa Calculation Unit requires a 24 bit multiplier if 32 bit single IEEE 754 format is considered. In this paper we propose the
Multiplication of two, 24 bit mantissa is done using the Vedic Multiplier. In this case 48 bit result obtained after the multiplication of mantissa is
25.375---- 010000011100101100000000
25.375----010000011100101100000000
643.890625---1010000011111001000000000000000000000000000
00000
Mantissa
Output----0
10001000
01000001111100100000000
This result is deduced as
AxB = 25.375*25.375 = (643.890625)10 =
(1010000011.111001)2
CONCLUSION AND RESULT
The multiplier is designed in VHDL and simulated using I- Simulator. The design is synthesized using
Xilinx ISE 12.1 tool targeting the Xilinx Spartan3E
FPGA. A test bench is used to generate the stimulus and the multiplier operation is verified. The over flow and under flow flags are incorporated in the design in order to show the over flow and under flow cases.
The result shows the Vedic multiplication method is the efficient way of multiplying two floating point numbers. The lesser number of LUTs shows that the hardware requirement is reduced, thereby reducing the power consumption. The power is reduced affectively still not compromising delay so much.
This project presents an implementation of a floating point multiplier that supports the IEEE 754-32 format; the multiplier doesn‟t implement rounding and just presents the significant multiplication result as is (48 bits); this gives better precision if the whole
48 bits are utilized in another unit. The ripple carry addition design has been implemented on a Xilinx
Spartan3E FPGA.
The below table shows the summary of the multiplier tested: REFERENCES
[1]
[2]

Table I : Comparison of results.

IEEE 754-2008,
Arithmetic, 2008.

IEEE

Standard

for

Floating-Point

Brian Hickmann, Andrew Krioukov, and Michael Schulte,
Mark Erle,”A Parallel IEEE 754 Decimal Floating-Point

International Conference on Electrical ,Electronics and Communications-ICEEC-21st June 2014-ISBN-978-93-81693-66-03
114

VHDL Implementation of Floating Point Multiplier Using Vedic Mathematics
Multiplier,” In 25th International Conference on Computer
Design ICCD, Oct. 2007.
[3]

[4]

[5]

[6]

Jagadguru Swami Sri Bharati Krisna Tirthaji Maharaja,
“Vedic Mathematics Sixteen Simple Mathematical
Formulae from the Veda,”1965.

Chetana Nagendra, Robert Michael Owens, and mary Jane
Irwin, “Power-Delay Characteristics of CMOSAdders”,
IEEE Transactions on Very Large Scale Integration (VLSI)
Systems, Vol. 2, No. 3, September 1994.
S. S. Kerur, Prakash Narchi, Jayashree C N, Harish M
Kittur, Girish V A, “Implementation of Vedic Multiplier for
Digital Signal Processing,” International Journal of
Computer Applications (IJCA) 2011.

Kavita Khare, R.P.Singh, Nilay Khare,”Comparison of pipelined IEEE- 754 standard floating point multiplier with npipelined multiplier”.



International Conference on Electrical ,Electronics and Communications-ICEEC-21st June 2014-ISBN-978-93-81693-66-03
115

Similar Documents

Free Essay

History Project

...------------------------------------------------- ECONOMY IN ANCIENT INDIA:FROM EARLY VEDIC PERIOD TO 712 A.D. HISTORY Submitted by: Suyogaya Awasthy 2014127 ------------------------------------------------- SEMESTER I DAMODARAM SANJIVAYYA NATIONAL LAW UNIVERSITY Visakhapatnam ------------------------------------------------- OCTOBER 2014 TABLE OF CONTENT TITTLE | PAGE NO. | ACKNOWLEDGMENT | 4 | INTRODUCTION | 5 | SECTION TITLE * Economy: During Early Vedic Age * Economy: During Later Vedic Age * Economy: During Gupta Period * Economy: During Mauryan Period * Guild System:The base of Ancient Economic India | 7891012 | CONCLUSION | 19 | BIBLIOGRAPHY | 20 | | ACKNOWLEDGEMENT I have endeavored to attempt this project. However, it would not have been feasible without the valuable support and guidance of Dr.Vishwachandra Madasu. I would like to extend my sincere thanks to her. I am also highly indebted to Damodaram Sanjivayya National Law University Library Staff, for their patient co-operation as well as for providing necessary information & also for their support in completing this project. My thanks and appreciations also go to my classmates who gave their valuable insight and help in developing this project. INTRODUCTION Condition of Economy: Early Vedic to later Vedic period The agriculture was the main economic activity of the people in the Vedic age but with the second urbanization a number...

Words: 2074 - Pages: 9

Free Essay

Ancient History

...Indus Valley Civilization – The Indus Valley Civilization was a Bronze Age civilization (3300–1300 BC; mature period 2600–1900 BC) extending from what today is northeast Afghanistan to Pakistan and northwest India. Along with Ancient Egypt and Mesopotamia it was one of three early civilizations of the Old World, and of the three the most widespread. It flourished in the basins of the Indus River, one of the major rivers of Asia, and the Ghaggar-Hakra River, which once coursed through northwest India and eastern Pakistan. The Indus Valley Civilization is also known as the Harappan Civilization, after Harappa, the first of its sites to be excavated in the 1920s, in what was then the Punjab province of British India, and is now in Pakistan. A uniform culture had developed at settlements spread across nearly 500,000 square miles, including parts of Punjab, Uttar Pradesh, Gujarat, Baluchistan, Sindh and the Makran coast. It was a highly developed civilization and derived its name from the main river of that region— Indus. |Year |Site |Discovered by | |1920 |Harappa |Rai Bahadur Daya Ram Sahni | |1922 |Mohenjodaro |R. D. Banerjee | |1927 |Sutkagen dor |R. L. Staine ...

Words: 16723 - Pages: 67

Free Essay

Sahil

...government h)Name two all Indian national political parties i)What is the election symbol of BJP j)What do you mean by single citizenship Maximum Marks: 80 No of pages:2 m co Attempt all questions from this part [1*10=10] Question 2: a)What were eight fold Path b)State two cause for Muryan Downfall c)What was the importance of Ajantha caves d)What are Fundamental rights and duties of citizen e) What are function general council f)Name the three tiers of Panchayati Raj g)What are election Petitions h)How is Indian national congress i)what are advantage of nyaya panchayat j)Why are seats reserved for minority PART II (50marks) Question 3: a)Name the crop grown by Harappans b)How was the early vedic society c)List any 5 difference between early vedic period and later vedic period Question 4: a) What was the importance of Sangam Literature .e du rit e. [2*10=20] w w w [1m] [4m] [5m] [4m] b)What is Tamil brahmi c)Why is Sangama literature importance for understanding of ages Question5: a)What was the important work of Kalidasa b)Features of Gupta temples c)What was the impact of Islam on the Indian life and culture Question 6: a)How was the invention of printing press b)Who was Thomas More c)What was the impact of Renaissance on Reformation Question 7: a) What were the cause for Industrial Revolution b)Name the factors responsible for rise of nation states c)Who were Jesuits? What...

Words: 451 - Pages: 2

Premium Essay

History and Development of Hinduism

...History and Development of Hinduism * Hinduism is the oldest and perhaps the most complex of religious systems. It is difficult to provide adequate history of Hinduism because it has no specific founder or theology. * The earliest product of Indian literature, the Rig Veda, contains the songs of the Aryan invaders who were beginning to make a home in India. Thus, Hinduism is commonly regarded as the offspring of an Aryan religion, brought into India by invaders from the north and modified by contact with Dravidian civilization. (Elliot, 1921) * The literature of Vedic Aryans is relatively ancient and full and there is no available information about old Dravidians comparable with it. Yet, some argue that it is more correct to describe Indian religion as Dravidian religion modified by the ideas of the Aryan invaders. * This is accentuated by the fact that major deities of Hinduism (Siva, Krishna, Rama, Durga), and some of its core doctrines, are either totally unknown to the Veda or obscurely indicated in it. * The chief characteristics of mature Indian religion are characteristics of an area, not of a race, and they differ from those of other ancient religions in Persia, Greece, Egypt or other Aryan lands. (Mamandram.Org, 2011) * The word “Hindu” is an incorrect term given to a follower of the Vedas. The true name of the religion is “Sanatana Dharma”, meaning “the eternal religion”. * Ancient Arabians gave rise to the term as they were...

Words: 3656 - Pages: 15