1 / 40

Tree and Array Multipliers

Lecture 8. Tree and Array Multipliers. Required Reading. Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design. Chapter 11, Tree and Array Multipliers Chapter 12.5, The special case of squaring Note errata at: http://www.ece.ucsb.edu/~parhami/text_comp_arit_1ed.htm#errors.

Download Presentation

Tree and Array Multipliers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 8 Tree and Array Multipliers

  2. Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 11, Tree and Array Multipliers Chapter 12.5, The special case of squaring Note errata at: http://www.ece.ucsb.edu/~parhami/text_comp_arit_1ed.htm#errors

  3. Notation a Multiplicand ak-1ak-2 . . . a1 a0 x Multiplier xk-1xk-2 . . . x1 x0 p Product (a  x) p2k-1p2k-2 . . . p2 p1 p0

  4. Multiplication of two 4-bit unsigned binarynumbers in dot notation

  5. Basic Multiplication Equations k-1 x = xi  2i p = a  x i=0 k-1 p = a  x = a  xi  2i = = x0a20 + x1a21 + x2a22 + … + xk-1a2k-1 i=0

  6. Unsigned Multiplication a4 a3 a2 a1 a0 x4 x3 x2 x1 x0 x ax0 20 a4x0 a3x0 a2x0 a1x0 a0x0 ax1 21 a4x1 a3x1 a2x1 a1x1 a0x1 + ax2 22 a4x2 a3x2 a2x2 a1x2 a0x2 ax3 23 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a1x4 a0x4 ax4 24 p1 p0 p9 p5 p7 p3 p2 p8 p6 p4

  7. Full tree multiplier - general structure

  8. 7 x 7 tree multiplier

  9. A slice of a balanced-delay tree for 11 inputs

  10. Tree multiplier with a more regular structure

  11. Layout of a multiplier based on 4-to-2 reduction modules

  12. 2’s Complement Multiplication (1) 23 21 20 -24 22 a4 a3 a2 a1 a0 x4 x3 x2 x1 x0 x  23 21 20 24 22 -a4 a3 a2 a1 a0 -x4 x3 x2 x1 x0 x

  13. 2’s Complement Multiplication (2) -a4 a3 a2 a1 a0 -x4 x3 x2 x1 x0 x -a4x0 a3x0 a2x0 a1x0 a0x0 -a4x1 a3x1 a2x1 a1x1 a0x1 + -a4x2 a3x2 a2x2 a1x2 a0x2 -a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 -a3x4 -a1x4 -a0x4 -a2x4 -p9 p7 p8 p1 p0 p5 p3 p2 p6 p4 22 27 25 26 24 23 21 29 20 28

  14. 2’s Complement Multiplication (3) -p9 p7 p8 p1 p0 p5 p3 p2 p6 p4 22 27 25 26 24 23 21 29 20 28  p9 p7 p8 p1 p0 p5 p3 p2 p6 p4 22 27 25 -29 26 24 23 21 20 28

  15. 2’s Complement Multiplication (4) z = 1 - z z = 1 - z - aj xi = - aj (1 - xi) = aj xi - aj = aj xi + aj - 2 aj - aj xi = - (1- aj ) xi = aj xi - xi = aj xi + xi - 2 xi - aj xi = - (1- aj xi) = aj xi - 1 = aj xi + 1 - 2 -aj = - (1 - aj) = aj - 1 = aj + 1 - 2 -xi = - (1 - xi) = xi - 1 = xi + 1 - 2

  16. -a4x0 -a4x1 -a4x2 + -a4x3 -a4 a4x0 -a4 a4x1 a4 -a4 a4 a4x2 -a4 a4 a4x3 a4 a4 a4x3 a4x2 a4x1 a4x0 -1 a4

  17. -a3x4 -a1x4 -a0x4 -a2x4 + -x4 a0x4 -x4 a1x4 x4 -x4 x4 a2x4 -x4 x4 a3x4 x4 x4 a3x4 a2x4 a1x4 a0x4 x4 -1

  18. 27 25 29 26 24 28 a4 a4x3 a4x2 a4x1 a4x0 -1 a4 x4 a3x4 a2x4 a1x4 a0x4 -1 x4 -1 a4 a4x3 a4x2 a4x1 a4x0 x4 a3x4 a2x4 a1x4 a0x4 a4 x4 1 a4 a4x3 a4x2 a4x1 a4x0 x4 a3x4 a2x4 a1x4 a0x4 a4 x4 -29

  19. Baugh-Wooley 2’s Complement Multiplier -a4 a3 a2 a1 a0 -x4 x3 x2 x1 x0 x a4x0 a3x0 a2x0 a1x0 a0x0 a4x1 a3x1 a2x1 a1x1 a0x1 + a4x2 a3x2 a2x2 a1x2 a0x2 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a0x4 a1x4 a4 a4 x4 x4 1 p9 p7 p8 p1 p0 p5 p3 p2 p6 p4 22 27 25 -29 26 24 23 21 20 28

  20. -a4x0 -a4x1 -a4x2 + -a4x3 a4x0 -1 -1 a4x1 1 -1 1 a4x2 -1 1 a4x3 1 a4x3 a4x1 a4x2 a4x0 -1 1

  21. -a3x4 -a1x4 -a0x4 -a2x4 + -1 a0x4 -1 a1x4 1 -1 1 a2x4 -1 1 a3x4 1 a3x4 a2x4 a1x4 a0x4 1 -1

  22. 27 25 29 26 24 28 a4x3 a4x1 a4x2 a4x0 -1 1 a3x4 a2x4 a1x4 a0x4 1 -1 a4x3 a4x1 a4x2 a4x0 a3x4 a2x4 a1x4 a0x4 -1 1 a4x3 a4x1 a4x2 a4x0 a3x4 a2x4 a1x4 a0x4 1 1 -29

  23. Modified Baugh-Wooley Multiplier -a4 a3 a2 a1 a0 -x4 x3 x2 x1 x0 x a4x0 a3x0 a2x0 a1x0 a0x0 a4x1 a3x1 a2x1 a1x1 a0x1 + a4x2 a3x2 a2x2 a1x2 a0x2 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a0x4 a1x4 1 1 p9 p7 p8 p1 p0 p5 p3 p2 p6 p4 22 27 25 26 24 23 21 -29 20 28

  24. Basic array multiplier

  25. 5 x 5 Array Multiplier

  26. Array Multiplier - Basic Cell cin x FA y cout s

  27. Baugh-Wooley 2’s Complement Multiplier -a4 a3 a2 a1 a0 -x4 x3 x2 x1 x0 x a4x0 a3x0 a2x0 a1x0 a0x0 a4x1 a3x1 a2x1 a1x1 a0x1 + a4x2 a3x2 a2x2 a1x2 a0x2 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a0x4 a1x4 a4 a4 x4 x4 1 p9 p7 p8 p1 p0 p5 p3 p2 p6 p4 22 27 25 -29 26 24 23 21 20 28

  28. Modifications in a 5 x 5 multiplier

  29. Array Multiplier – Modified Basic Cell am ci si-1 xn FA ci+1 si

  30. 5 x 5 Array Multiplier with modified cells

  31. Pipelined 5 x 5 Multiplier

  32. Xilinx FPGA Implementation Equations Z = (2xn-1+xn-2)  Y 2n-2 + … + (2xi+1+xi)  Y 2i + … + +(2x3+x2)  Y 22 + (2x1+x0)  Y 20 (2xi+1+xi)  Y = cm+1pimpi(m-1)…pi2pi1pi0 pij = xiyj xor xi+1yj-1 xor cj cj+1 = (xiyj)(xi+1yj-1) + (xiyj)cj + (xi+1yj-1)cj c0 = c1 = 0

  33. Modified Basic Cell Xilinx FPGA Implementation xi+1 xi cj+1 yj yj-1 FA pij cj

  34. Modified Basic Cell Xilinx FPGA Implementation LUT: xiyj xor xi+1yj-1 cj+1 xi yi xi+1 LUT 0 1 yi-1 pij cj pij = xiyj xor xi+1yj-1 xor cj cj+1 = (xiyj)(xi+1yj-1) + (xiyj)cj + (xi+1yj-1)cj

  35. Xilinx FPGA Multiplier

  36. Optimizations for Squaring (1)

  37. Optimizations for Squaring (2) xi xj xi xj + xi xj = 2 xi xj xj xi xi xj xi xi = xi xi xj xi xj + xi = 2 xi xj - xi xj + xi = = 2 xi xj + xi (1-xj) = = 2 xi xj + xi xj xi xi xj xi xj

  38. Squaring Using Look-Up Tables for relatively small values k output=a2 input=a 0 0 1 1 2 4 9 3 4 16 2k words 2k-bit each . . . i i2 . . . 2k-1 (2k-1)2

  39. Multiplication Using Squaring (a+x)2 - (a-x)2 a  x = 4

More Related