You are on page 1of 3

2009 International Conference on Advances in Computing, Control, and Telecommunication Technologies

Conventional versus Vedic mathematical method for


Hardware implementation of a multiplier

Parth Mehta, Dhanashri Gawali


Department of Electronic and Telecommunication,
Maharashtra Academy of Engineering, Alandi(D),
Pune, India
smilingparth@ymail.com, Dhanashree.gawali@gmail.com

Suppose we have to multiply 12 by 13


Abstract- Aim of this paper is to compare and prove (i) We multiply the most significant digit 1 of
implementation of normal multiplication and Vedic
multiplicand vertically by most significant digit 1 of the
multiplication (using Urdhva Tiryakbhyam Sutra) on
digital hardware requires same number of multiplication multiplier, get their product 1 and set it down as the most
and addition operations.It makes difference only for mental significant part of the answer
calculations. Few VHDL codes has been developed for this. (ii) We then multiply 1 and 3, and 1 and 2 crosswise, add
All multipliers has been tested for 16X16 multiplications for the two, get 5 as the sum and set it down as the middle
comparison. Test vectors has been given through a text file. part of the answer and
Implementation has been done for the Xilinx FPGA device, (iii) We multiply 2 and 3 vertically, get 6 as their product
Virtex XCV 300 -6PQ240. Various multiplier and put it down as the last the right hand most part of the
implementations such as Array multiplier, Multiplier answer.
Macro, Vedic multiplier with full partitioning, Vedic
Thus 12 x 13 = 156. It bears a simple extendible form in
multiplier using 4 bit macro, multiplier using 4 bit macro,
fully Recursive Vedic multiplier, Vedic multiplier using 8 a similar way for multi-digit multiplication [10].
bit macro have been tested and compared for optimum area
and speed.

Keywords- Vedic mathematics, hardware multiplier.

I. INTRODUCTION

We appreciate the efforts put by Jagadguru Swami Sri


Bharati Krishna Tirthaji Maharaja to introduce Vedic
Mathematics and acknowledge the work of various The process is ascent and a descent, going forward with
people regarding Vedic Mathematics. However the digits on the upper row and coming crossway with
conventional mathematics is an integral part of the digits on the lower row.
engineering education as most engineering system
designs are based on various mathematical approaches. II. CONVENTIONAL VS. VEDIC MULTIPLICATION
A multiplier is one of the key hardware blocks in most SCHEME
digital signal processing systems. With advances in
technology, many researchers have tried to design Looking at figure 1(A) below, one can easily realize that
multipliers which offer either of the following- high Vedic method probably makes difference for mental
speed, low power consumption, regularity of layout and calculations only. For mental calculations it can be
hence less area or even combination of them in proved more convenient; as we can easily visualize
multiplier. The Vedic mathematics approach is totally Vedic multiplication line diagram. If one tries to do
different and considered very close to the way a human multiplication mentally, in a conventional method, one
mind works. would have to remember first row, then second row and
The multiplication of numbers utilizing like wise; and then add all of them. In this case it might
conventional mathematical methods (successive be difficult to remember these many numbers at a time.
additions) needs no explanation. The Urdhva – But in Vedic method, to visualize line diagram and keep
Tiryagbhyam sutra under vedic mathematics is the adding two consecutive product terms is easier for
general formula applicable to all cases of multiplication. mental calculations. When it is done one need to
The formula being very short and terse, consists of only memorize only few numbers. So, one may find Vedic
one compound word and means “vertically and multiplication faster or more convenient for mental
crosswise”. The application of this sutra will ensure calculations.
simpler means to solve typical multiplication problems However, on digital hardware, it will not result in a new
encountered in the engineering environment. A simple circuit or strategy. Irrespective of whether you are
example will suffice to clarify the operation thinking it in a Vedic way or conventional way,

978-0-7695-3915-7/09 $26.00 © 2009 IEEE 640


DOI 10.1109/ACT.2009.162

Authorized licensed use limited to: Shri Ramswaroop Memorial Col of Eng and Management. Downloaded on March 20,2010 at 11:13:35 EDT from IEEE Xplore. Restrictions apply.
performance of the multiplier circuit will ultimately FPGA device, Virtex XCV 300 -6PQ240 to prove above
depend upon how effectively you utilize hardware theory is true with practical results. Tool used is Xilinx
resources on which you are implementing multiplier. ISE 8.1i, for simulations Modelsim and for synthesis
From the perspective of digital hardware, there is no Xilinx Synthesis Tool has been used. Multipliers have
difference in conventional multiplication and Vedic been demonstrated for seven different implementation
multiplication. styles and compared. All are 16X16 multipliers.
Implementations shown in a, b, c, d are based on Vedic
mathematical method while e, f, g are based on
conventional mathematical method.
[a] Fully partitioned Vedic multiplier: Here, 16*16
multiplication is done as proposed in [1, 4 and 9]; Here
each 4*4 bit sub-multiplication is also done using Vedic
multiplication. For 1 bit sub-multiplication, AND gate
has been used.
[b] Fully partitioned Recursive Vedic multiplier: It is
implemented based on [6]. In [6], author has tried to
show that using Vedic multiplication how 4*4 multiplier
can be used for building 8*8 Multiplier and 8*8
multiplier for 16*16 multiplier and so on. We have
extended author’s work and made recursive VHDL code,
Fig.1 (A) Multiplication scheme using conventional which is generalized code for this kind of multiplication.
method (B) Multiplication scheme using Urdhva – Same code can be used for multiplication of 4*4, 8*8,
Tiryagbhyam sutra with line diagram 16*16, 32*32 bits and so on. For 2*2 bit multiplication
separate VHDL code has been written.
Both are combinational multipliers requiring [c] Vedic multiplier using 4 bit macro: It is same as that
same number of addition and multiplication operations of [a]; except the fact that here 4*4 bit sub-
and hence the same amount of hardware. In both cases multiplication is done using VHDL multiplication
sub-multiplications can be performed in parallel. In fact operator “*”.
it is the same thing, which few people view differently. [d] Vedic Multiplier using 8 bit macro: Here 8*8 bit sub-
No. of Additions in fig. 1(A) := 0 9 multiplication has been done using VHDL operator “*”.
No. of Multiplications in fig. 1(A) := 16 Then it is used for building 16*16 multiplier using Vedic
No. of Additions in fig. 1(B) := 09 scheme as shown in [6].
No. of Multiplications in fig. 1(B) : = 16 [e] Array multiplier: It is an array multiplier with each
In [7] author has put good efforts to show, how Vedic cell operating as one bit multiplier and full adder.
Multiplication gains benefits against conventional [f] Simple Multiplier: It is 16*16 multiplication done
multiplication. But from implementation point of view, using VHDL operator “*”.
there is no need of added zeros in shifted rows in [g] Multiplier using 4 bit macro: This has been made to
conventional multiplication method. This way it shows demonstrate and compare the multiplier demonstrated in
conventional multiplication requires more number of [c] for Vedic and conventional multiplication method.
additions. However it is not true.In [6] author has put
III. TESTING AND RESULTS:
good efforts to show, how Vedic Multiplication can be
used for building faster multipliers. Figure 1(A) is Xilinx ISE 8.1i Tool has been used for design and testing
obtained from [6] itself. Author has generated whole various multiplier implementations. Design entered in
hardware keeping this figure in mind. There is no the form of VHDL .Various simulations are done for
difference in both from a circuit designer’s view. early testing. Input has been given through a text file.
Essentially both are same. Whatever difference one gets Synthesis reports and simulations (Post-route simulation)
on hardware is just because of the implementation have been done for device Virtex XCV 300 -6PQ240.
strategy or coding style. Both will require same number For simulation, random test vectors are applied and for
of sub-operations for performing multiplication those test vectors, each method’s waveforms are
operation. compared for speed.
II. MULTIPLIER IMPLEMENTATION ON DIGITAL A. SIMULATION RESULT
HARDWARE
The results shown here are post place & route
Few multipliers have been designed using VHDL, simulations for all the above implementations (a to g).
simulated, synthesized and implemented on Xilinx

641

Authorized licensed use limited to: Shri Ramswaroop Memorial Col of Eng and Management. Downloaded on March 20,2010 at 11:13:35 EDT from IEEE Xplore. Restrictions apply.
hardware implementation point of view. Both require
same number of addition and multiplication operations.
Among above all; [D], [E] and [F] implementations are
(a) found to be the most efficient in terms of area and speed.
Hence for FPGA, with latest EDA tools, one may prefer
macros generated by compiler for hardware multiplier.
Among these; area wise [D] is more efficient but speed
(b)
wise it is slower than the other two, since it uses more
granular macros. [B] Utilizes less granular addition
macros than [A]. Hence, [B] is more optimized for area
and speed compare to [A]. The difference in hardware is
(c) due to the implementation strategy or coding style. It is
not due to Vedic mathematical method; fundamentally it
is not a different method from conventional method.
Both require same number of sub-operations for
(d)
performing multiplication operation.

REFERENCES

[1] Himanshu Thapliyal, “Vedic Mathematics for Faster Mental


(e) Calculations and High Speed VLSI Arithmetic”, Invited talk at
IEEE Computer Society Student Chapter, University of South
Florida, Tampa, FL, Nov 14 2008.
[2] S. Kumaravel, Ramalatha Marimuthu, "VLSI
Implementation of High Performance RSA Algorithm Using
Vedic Mathematics," ICCIMA, vol. 4, pp.126-128,
(f) International Conference on Computational Intelligence and
Multimedia Applications (ICCIMA 2007), 2007
[3] Himanshu Thapliyal; Srinivas, M.B. “An efficient method
of elliptic curve encryption using Ancient Indian Vedic
Mathematics” Vol. 1, pp. 826 – 828, 48th Midwest Symposium
(g) on Circuits and Systems, 2005
Fig.2 Post place & route simulation waveforms. [4] Thapliyal, H.; Kotiyal, S.; Srinivas, M.B.” Design and
analysis of a novel parallel square and cube architecture based
B. SYNTHESIS RESULT on ancient Indian Vedic mathematics ” Vol. 2, pp.1462 – 1465,
48th Midwest Symposium on Circuits and Systems, 2005
Table.2: Synthesis Result [5] Purushottam D. Chidgupkar and Mangesh T. Karad. “The
Implementation of Vedic Algorithms in Digital Signal
S.
No. of No. of Maximum Processing” Global J. of Engng. Educ., Vol.8, No.2, UICEE
Method slices out LUTs out combinational 2004
N.
of 3072 of 6144 Path Delay [6] Akhter S., “VHDL implementation of fast NxN multiplier
Fully partitioned 42.360 based on Vedic mathematic
A 384 672
Vedic multiplier ns
” pp. 472 – 475, ECCTD 2007.
Fully partitioned
B Recursive Vedic 350 598
39.285 [7] Shripad Kulkarni, “Discrete Fourier Transform (DFT) by
ns using Vedic Mathematics”Papers on implementation of DSP
multiplier
Vedic multiplier 38.949 algorithms/VLSI structures using Vedic Mathematics, 2006,
C 237 391 www.edaindia.com, IC Design portal.
using 4 bit macro ns
Vedic multiplier 25.398 [8] S.G. Dani, Vedic Maths’: facts and myths, One India One
D 180 296
using 8 bit macro ns People, Vol 4/6,January 2001, pp. 20-21; (available on
88.718 www.math.tifr.res.in/ dani).
E Array multiplier 293 509
ns [9] M.C. Hanumantharaju, H. Jayalaxmi, R.K. Renuka, M.
Simple 20.205 Ravishankar, "A High Speed Block Convolution Using Ancient
F 148 265
Multiplier ns
Indian Vedic Mathematics," ICCIMA, vol. 2, pp.169-173,
Multiplier using 50.713
G
4 bit macro
183 320
ns
International Conference on Computational Intelligence and
Multimedia Applications, 2007
CONCLUSION [10] Jagadguru Swami Sri Bharati Krsna Tirthaji Maharaja,
“Vedic mathematics”, Motilal Banarsidass Publishers Pvt Ltd,
Vedic mathematical method is not very different Delhi, 2001.
multiplication method from normal multiplication from

642

Authorized licensed use limited to: Shri Ramswaroop Memorial Col of Eng and Management. Downloaded on March 20,2010 at 11:13:35 EDT from IEEE Xplore. Restrictions apply.

You might also like