Docsity

high speed multiplier, Slides of Electronics

Toggle sidebar
bg1
Mini Project Report Cover Sheet
Title of the Project :
REPORT VERIFICATION
Staff Name : Dr. Arijit Bardhan Roy
Signature :
AARIYA.S.S
RA2411004010752
VIJAYA DHELEP
K.S
RA2411004010748
SOMYASMITH
MAHAPATRA
RA2411004010761
Particulars
Max.
Marks
Objective
5
Design Methodology
5
Implementation
10
Simulation and Synthesis
5
Presentation & Viva
5
Report
5
IEEE Paper Format
5
Total
40
21ECC311L – VLSI DESIGN LABORATORY
Semester V, 2026-2027(Odd semester)
SRM Institute of Science and Technology
College of Engineering and Technology
Department of Electronics and Communication Engineering
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download high speed multiplier and more Slides Electronics in PDF only on Docsity!

Mini Project Report Cover Sheet

Title of the Project : REPORT VERIFICATION Staff Name : Dr. Arijit Bardhan Roy Signature : AARIYA.S.S RA VIJAYA DHELEP K.S RA24110040107 48 SOMYASMITH MAHAPATRA RA24110040107 61 Particulars Max. Marks Objective 5 Design Methodology 5 Implementation 10 Simulation and Synthesis 5 Presentation & Viva 5 Report 5 IEEE Paper Format 5 Total 40

21ECC311L – VLSI DESIGN LABORATORY

Semester V, 202 6 - 2027 (Odd semester)

SRM Institute of Science and Technology

College of Engineering and Technology

Department of Electronics and Communication Engineering

Design and PPA Optimization of an 8-Bit Signed and Unsigned Radix-

4 Booth–Braun–Wallace Hybrid Multiplier on FPGA

Abstract This mini project is the improved, second version of the earlier 8-bit Wallace tree multiplier. It presents an 8-bit multiplier that supports both signed (two’s-complement) and unsigned operands, selected by a control input signed_mode, and it is organised as a Booth–Braun– Wallace hybrid. The overview below covers the problem tackled, the implementation, and the results and impact. Problem tackled: The first design formed eight partial-product rows from AND gates, supported unsigned operands only, and, in the Xilinx ISE comparison, used more area and delay than the tool-inferred A * B reference (140 against 42 LUTs and 21.12 ns against 11. ns). The new work aims to reduce the number of partial products and logic depth, add signed- number support, and re-measure power, performance and area (PPA) fairly. Implementation: Operands are extended to 10 bits, modified radix-4 Booth encoding reduces the partial products from eight to five rows, three 20-bit carry-save adders (a staged Wallace- style chain) compress the five rows to two, and one 20-bit final adder produces the result, of which the lower 16 bits form Product[15:0]. The design is split into separate Verilog modules, simulated in ModelSim, and synthesised in Xilinx ISE. Results and impact: ModelSim simulation confirms the signed and unsigned outputs for 128 × 127 = 16256 (0x3F80), −128 × 127 = −16256 (0xC080) and 255 × 128 = 32640 (0x7F80). Structurally the reduction stage needs 3 × 20 = 60 carry-save bit positions against 6 × 16 = 96 in the first design (37.5 % fewer), and uses 3 instead of 4 sequential CSA levels. The measured LUT, slice, delay, frequency and power values for the hybrid are entered in the PPA table and compared with both the A * B reference and the first Wallace design.

1. Introduction 1.1 Motivation and Background Multipliers dominate the area, delay and power of many arithmetic units, so improving them gives a direct system-level benefit. The first version of this project, an 8-bit unsigned Wallace- style multiplier, was verified in simulation but, when measured in Xilinx ISE, it was larger and slower than the A * B reference. That is a valid result, but it also shows where improvement is possible: the AND-array generated eight 16-bit rows, six CSA blocks were needed to reduce

and Dadda reduced the number of adders needed [2]. Hybrid multipliers combine these ideas: Booth recoding to reduce rows, carry-save compression to add them quickly, and one carry- propagate adder at the end [6]. 2.2 Gaps Identified Many hybrid designs are presented only with gate-count or theoretical delay arguments. On an FPGA the tool optimises the A * B operator well, and the first version of this project showed that a hand-built tree can lose to it for 8-bit operands. The gap addressed here is a measured, like-for-like comparison of an improved Booth-based hybrid that also supports signed operands, against both the tool-inferred multiplier and the earlier design.

3. System Design 3.1 Architecture Overview The design is purely combinational. Inputs A[7:0], B[7:0] and signed_mode feed an operand- extension block that produces 10-bit values A_ext and B_ext. Five Booth encoders and partial- product generators then form five 20-bit rows pp0 to pp4. Three csa20 blocks reduce them to final_sum and final_carry, and a 20-bit final adder produces the result, whose lower 16 bits are Product[15:0]. Fig. 1. Datapath of the 8-bit signed/unsigned Booth–Braun–Wallace hybrid multiplier. 3.2 Flowcharts / Algorithm Flow Fig. 2 shows the algorithm flow of one multiplication, and Fig. 3 shows the design and verification flow used for the project. For each input vector the operands are extended, Booth groups are decoded, partial products are generated and shifted, the rows are compressed by the CSA chain, and the final adder gives the product.

Fig. 2. Algorithm flow of one multiplication in the hybrid multiplier. Fig. 3. Design, verification and PPA comparison flow.

Table 3. Modified radix-4 Booth encoding Booth group Operation 000 or 111 0 001 or 010 +A 011 +2A 100 −2A 101 or 110 −A // Booth windows used by booth_partial_products (B_ext is 10 bits) {B_ext[1:0], 1'b0} // group 0 - > shift 0 B_ext[3:1] // group 1 - > shift 2 B_ext[5:3] // group 2 - > shift 4 B_ext[7:5] // group 3 - > shift 6 B_ext[9:7] // group 4 - > shift 8 Table 4. Partial-product row positions Row Left shift pp0 0 bits pp1 2 bits pp2 4 bits pp3 6 bits pp4 8 bits Carry-save adder. For every bit the sum is the XOR of the three input bits and the carry is their majority, moved one place left, so no carry travels along the word at this stage. module csa20(input [19:0] a, b, c, output [19:0] sum, carry); assign sum = a ^ b ^ c; // bitwise sum assign carry = ((a & b) | (b & c) | (a & c)) << 1; // majority, shifted left endmodule Reduction and final addition. The three csa20 blocks form a staged chain: u1 compresses pp0, pp1, pp2; u2 compresses pp3, pp4 and sum1; u3 compresses carry1, carry2 and sum2. The final adder is the only carry-propagating addition, and the top module keeps the lower 16 bits. This chain is Wallace-style reduction but not a fully balanced Wallace tree. // wallace_reduction: five rows - > two rows (staged carry-save chain) csa20 u1(pp0, pp1, pp2, sum1, carry1); csa20 u2(pp3, pp4, sum1, sum2, carry2); csa20 u3(carry1, carry2, sum2, final_sum, final_carry); assign Product_full = final_sum + final_carry; // final_adder (20 bits) assign Product = Product_full[15:0]; // multiplier_top Worked example, −128 × 127 (signed). B = 01111111, so B_ext = 0001111111. The groups are 110 → −A (shift 0), 111 → 0, 111 → 0, 011 → +2A (shift 6, that is +128A) and 000 → 0. Hence the product is 128A − A = 127A = 127 × (−128) = −16256 = 0xC080, which matches the simulation.

Worked example, 255 × 128 (unsigned). B_ext = 0010000000, so the non-zero groups are 100 → −2A at shift 6 (−128A) and 001 → +A at shift 8 (+256A). The sum is 128A = 128 × 255 = 32640 = 0x7F80. 5.3 Input / Output Formats Table 5. Port description of multiplier_top Port Direction Width Description A Input 8 bits Multiplicand B Input 8 bits Multiplier signed_mode Input 1 bit 0 = unsigned, 1 = signed (two’s complement) Product Output 16 bits A × B in the selected mode 5.4 Screenshots (Schematic and Console Outputs) Fig. 4 shows the top-level block generated by ISE with its ports A(7:0), B(7:0), signed_mode and Product(15:0). Fig. 5 shows the overall schematic of the four stages: operand extension, Booth partial products, reduction and final adder. Figs. 6 to 9 show the expanded schematics of each stage. Fig. 4. Top-level block of multiplier_top in Xilinx ISE (A, B, signed_mode, Product[15:0]). Fig. 5. Overall schematic: operand extension, Booth partial products, reduction and final adder.

Fig. 9. Expanded final adder: unsigned 20-bit adder of final_sum and final_carry giving the product.

6. Testing and Evaluation 6.1 Test Cases (Sample Input / Output) Each module was first simulated on its own in ModelSim: all eight Booth encoder input patterns, selected positive and negative partial products, a carry-save reduction example and final-adder examples. The complete multiplier was then tested at top level with the vectors below. The three cases marked as verified were read directly from the ModelSim waveforms (Figs. 10 to 13). Table 6. Top-level test vectors and results Mode A B Expected (dec) Expected (hex) Unsigned 255 128 32640 7F Unsigned 128 127 16256 3F Signed −128 127 −16256 C Signed −1 −128 128 0080 Signed 25 10 250 00FA Fig. 10. ModelSim, signed_mode = 0: A = 10000000, B = 01111111, Product = 0011111110000000

(16256). Fig. 11. ModelSim, signed_mode = 1: A = 10000000 (−128), B = 01111111 (127), Product = 1100000010000000 (−16256). Fig. 12. Waveform with signed_mode = 0: 255 × 128 gives 0111111110000000 (32640).

Table 7. PPA comparison (enter the hybrid values from the ISE reports) Metric A * B reference Hybrid (this work) LUTs 42 189 Slices 24 110 Critical-path delay (ns) 11.85 26. Maximum frequency (MHz) 84.38 38. Estimated power (mW) 18.5 30 Percentage change = (Reference − Hybrid) / Reference × 100 for LUTs, slices, delay and power, and (Hybrid − Reference) / Reference × 100 for frequency. A positive value means the hybrid is better. Compare the hybrid with the first design in the same way to show the improvement.

7. Results and Discussion 7.1 Summary of Outputs The simulations show correct 16-bit products in both modes for the verified vectors: 128 × 127 = 16256 (0x3F80) in unsigned mode, −128 × 127 = −16256 (0xC080) in signed mode and 255 × 128 = 32640 (0x7F80) in unsigned mode. The schematics generated by ISE confirm the intended structure: operand extension, five Booth partial-product rows, three csa20 blocks and a 20-bit final adder. 7.2 Interpretation of Performance The first design showed that a straightforward Wallace tree can be larger and slower than the tool-inferred A * B for 8-bit operands (140 against 42 LUTs, 21.12 against 11.85 ns). The hybrid addresses the two largest causes: it has fewer rows to add and a shorter CSA chain, and it adds signed capability. Its structure suggests an improvement over the first design in area and depth, while the Booth encoders and selection logic add overhead, so it may or may not reach the A * B reference. The conclusion must follow the measured values in Table 7; if the hybrid is still behind A * B, the result is still valid and shows that for 8-bit widths the synthesis tool’s own multiplier mapping is hard to beat, whereas the gain of Booth-based hybrids is expected to grow with wider operands. 8. Conclusion and Future Scope 8.1 Summary of Project Achievement The first Wallace multiplier was improved into a modular 8-bit signed and unsigned Booth–

Braun–Wallace hybrid multiplier. Functional correctness was demonstrated on signed and unsigned vectors in ModelSim, the schematic structure was inspected in ISE, and a three-way PPA comparison with the A * B reference and the first design was set up.

9. References [1] C. S. Wallace, “A suggestion for a fast multiplier,” IEEE Trans. Electron. Comput., vol. EC-13, no. 1, pp. 14–17, Feb. 1964. [2] L. Dadda, “Some schemes for parallel multipliers,” Alta Frequenza, vol. 34, pp. 349–356,

[3] A. D. Booth, “A signed binary multiplication technique,” Quart. J. Mech. Appl. Math., vol. 4, pt. 2, pp. 236–240, 1951. [4] O. L. MacSorley, “High-speed arithmetic in binary computers,” Proc. IRE, vol. 49, no. 1, pp. 67–91, Jan. 1961. [5] E. L. Braun, Digital Computer Design: Logic, Circuitry, and Synthesis. New York, NY, USA: Academic Press, 1963. [6] B. Parhami, Computer Arithmetic: Algorithms and Hardware Designs, 2nd ed. New York, NY, USA: Oxford Univ. Press, 2010. [7] N. Weste and D. Harris, CMOS VLSI Design: A Circuits and Systems Perspective, 4th ed. Boston, MA, USA: Addison-Wesley, 2010. [8] S. Palnitkar, Verilog HDL: A Guide to Digital Design and Synthesis, 2nd ed. Upper Saddle River, NJ, USA: Prentice Hall, 2003. 10. Appendix A. Full Source Code (key modules) // operand_extension: zero or sign extension to 10 bits assign A_ext = signed_mode? {{2{A[7]}}, A} : {2'b00, A}; assign B_ext = signed_mode? {{2{B[7]}}, B} : {2'b00, B}; // Booth windows used by booth_partial_products (B_ext is 10 bits) {B_ext[1:0], 1'b0} // group 0 - > shift 0 B_ext[3:1] // group 1 - > shift 2 B_ext[5:3] // group 2 - > shift 4 B_ext[7:5] // group 3 - > shift 6 B_ext[9:7] // group 4 - > shift 8 module csa20(input [19:0] a, b, c, output [19:0] sum, carry); assign sum = a ^ b ^ c; // bitwise sum assign carry = ((a & b) | (b & c) | (a & c)) << 1; // majority, shifted left endmodule