Conditional-Sum Adders Parallel Prefix Network Adders

Slides:



Advertisements
Similar presentations
UNIVERSITY OF MASSACHUSETTS Dept
Advertisements

CPE 626 CPU Resources: Adders & Multipliers Aleksandar Milenkovic Web:
Chapter 4 -- Modular Combinational Logic. Decoders.
Datorteknik ArithmeticCircuits bild 1 Computer arithmetic Somet things you should know about digital arithmetic: Principles Architecture Design.
Lecture Adders Half adder.
CSE-221 Digital Logic Design (DLD)
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 4.
1 Design of a Parallel-Prefix Adder Architecture with Efficient Timing-Area Tradeoff Characteristic Sabyasachi Das University of Colorado, Boulder Sunil.
Chapter # 5: Arithmetic Circuits Contemporary Logic Design Randy H
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 4.
Chapter # 5: Arithmetic Circuits
5-1 Programmable and Steering Logic Chapter # 5: Arithmetic Circuits.
Csci 136 Computer Architecture II – Constructing An Arithmetic Logic Unit Xiuzhen Cheng
Design of a 32-Bit Hybrid Prefix-Carry Look-Ahead Adder
Computing Systems Designing a basic ALU.
Fast Adders: Parallel Prefix Network Adders, Conditional-Sum Adders, & Carry-Skip Adders ECE 645: Lecture 5.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
ECE 645 – Computer Arithmetic Lecture 6: Multi-Operand Addition ECE 645—Computer Arithmetic 3/5/08.
Block p and g Generators. Carry Determination as Prefix Computations Two Contiguous (or Overlapping) Blocks (g’, p’) and (g’’, p’’) Merged Block (g, p)
Unrolling Carry Recurrence
Conditional-Sum Adders Parallel Prefix Network Adders
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
Multioperand Addition
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
Carry-Lookahead, Carry-Select, & Hybrid Adders ECE 645: Lecture 2.
Carry-Lookahead & Carry-Select Adders
Computer Arthmetic Chapter Four P&H.
Somet things you should know about digital arithmetic:
Lecture 12 Logistics Last lecture Today HW4 due today Timing diagrams
UNIVERSITY OF MASSACHUSETTS Dept
Chapter 4 -- Modular Combinational Logic
Lecture Adders Half adder.
Sequential Multipliers
Divide-and-Conquer Design
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
CSE 575 Computer Arithmetic Spring 2005 Mary Jane Irwin (www. cse. psu
Basic Adders and Counters
ECE/CS 552: Carry Lookahead
VLSI Arithmetic Lecture 5
Radix 2 Sequential Multipliers
ECE 331 – Digital System Design
Tree and Array Multipliers
CSE Winter 2001 – Arithmetic Unit - 1
Lecture 14 Logistics Last lecture Today
Arithmetic Circuits (Part I) Randy H
Digital Integrated Circuits A Design Perspective
Instructor: Prof. Chung-Kuan Cheng
ARM implementation the design is divided into a data path section that is described in register transfer level (RTL) notation control section that is viewed.
CS 140 Lecture 14 Standard Combinational Modules
UNIVERSITY OF MASSACHUSETTS Dept
Basic Adders and Counters Implementation of Adders
Review: Basic Building Blocks
Part III The Arithmetic/Logic Unit
Multioperand Addition
CSE 140 Lecture 14 Standard Combinational Modules
Instructor: Alexander Stoytchev
Lecture 14 Logistics Last lecture Today
Tree and Array Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
74LS283 4-Bit Binary Adder with Fast Carry
Sequential Multipliers
Carry-Lookahead, Carry-Select, & Hybrid Adders
Carry-Lookahead, Carry-Select, & Hybrid Adders
Carry-Lookahead & Carry-Select Adders
UNIVERSITY OF MASSACHUSETTS Dept
Conditional-Sum Adders Parallel Prefix Network Adders
Lecture 2 Adders Half adder.
Presentation transcript:

Conditional-Sum Adders Parallel Prefix Network Adders ECE 645: Lecture 3 Conditional-Sum Adders and Parallel Prefix Network Adders FPGA Optimized Adders

Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 7.4, Conditional-Sum Adder Chapter 6.4, Carry Determination as Prefix Computation Chapter 6.5, Alternative Parallel Prefix Networks

Add-Add-Multiplex Carry Select Adder

Two-level k-bit Carry Select Adder

Add-Add-Multiplex (AAM) Carry Select Adder + stands for the Ripple Carry Adder CCC stands for the Carry Computation Circuit CR stands for the Carry Recovery Circuit

Carry Computation Circuit

Carry Recovery Circuit

Carry & Control Logic in Virtex 4

Carry & Control Logic in Virtex 5

Homework 2 - Bonus Analytical Problem: Find analytically an optimal value of the word size, w, for which a 1024-bit AAM Carry Select Adder has the smallest latency. Implementation Problem: Find experimentally an optimal value of the word size, w, for which a 1024-bit AAM Carry Select Adder has the smallest latency.

Conditional-Sum Adders

One-level k-bit Carry-Select Adder

Two-level k-bit Carry Select Adder

Conditional Sum Adder Extension of carry-select adder One-level using k/2-bit adders Two-level using k/4-bit adders Three-level using k/8-bit adders Etc. Assuming k is a power of two, eventually have an extreme where there are log2k-levels using 1-bit adders This is a conditional sum adder

Conditional Sum Adder: Top-Level Block for One Bit Position

Three Levels of a Conditional Sum Adder xi+3 yi+3 xi+2 yi+2 xi+1 yi+1 xi yi branch point 1-bit conditional sum block concatenation c=1 c=0 c=1 c=0 c=1 c=0 c=1 c=0 2 2 2 2 2 2 2 2 1 1 1+1 1 1 2 2 1 1 2 2 1 1 c=1 c=0 c=1 c=0 3 3 3 3 1 2+1 1 2 2 3 3 block carry-in determines selection 5 4+1 5 c=0 c=1

16-Bit Conditional Sum Adder Example

Conditional Sum Adder Metrics

Parallel Prefix Network Adders

Parallel Prefix Network Adders Basic component - Carry operator (1) g p B” B’ B g” p” g’ p’ g = g” + g’p” p = p’p” (g, p) = (g’, p’) ¢ (g”, p”) = (g” + g’p”, p’p”)

Parallel Prefix Network Adders Basic component - Carry operator (2) g p overlap okay! B” B’ B g” p” g’ p’ g = g” + g’p” p = p’p” (g, p) = (g’, p’) ¢ (g”, p”) = (g” + g’p”, p’p”)

Properties of the carry operator ¢ Associative [(g1, p1) ¢ (g2, p2)] ¢ (g3, p3) = (g1, p1) ¢ [(g2, p2) ¢ (g3, p3)] Not commutative (g1, p1) ¢ (g2, p2)  (g2, p2) ¢ (g1, p1)

Parallel Prefix Network Adders Major concept Given: (g0, p0) (g1, p1) (g2, p2) …. (gk-1, pk-1) Find: (g[0,0], p[0,0]) (g[0,1], p[0,1]) (g[0,2], p[0,2]) … (g[0,k-1], p[0,k-1]) block generate from index 0 to k-1 ci = g[0,i-1] + c0p[0,i-1]

Similar to Parallel Prefix Sum Problem Given: x0 x1 x2 … xk-1 Find: x0 x0+x1 x0+x1+x2 … x0+x1+x2+ …+ xk-1 Parallel Prefix Adder Problem Given: x0 x1 x2 … xk-1 Find: x0 x0 ¢ x1 x0 ¢ x1 ¢ x2 … x0 ¢ x1 ¢ x2 ¢ … ¢ xk-1 where xi = (gi, pi)

Parallel Prefix Sums Network I

Parallel Prefix Sums Network II (Brent-Kung)

8-bit Brent-Kung Parallel Prefix Network

4-bit Brent-Kung Parallel Prefix Network 2 –bit B-K PPN s7’ s5’ s3’ s1’

8-bit Brent-Kung Parallel Prefix Network Adder

Critical Path gi = xi yi pi = xi  yi 1 gate delay g = g” + g’ p” p = p’ p” 2 gate delays C ci+1 = g[0,i] + c0 p[0,i] 2 gate delays S si = pi  ci 1 gate delay

Brent-Kung Parallel Prefix Graph for 16 Inputs

Kogge-Stone Parallel Prefix Graph for 16 Inputs

Parallel Prefix Network Adders Comparison of architectures Network 2 Brent-Kung Hybrid Kogge-Stone Delay(k) 2 log2k - 2 log2k+1 log2k Cost(k) 2k - 2 - log2k k/2 log2k k log2k - k + 1 Delay(16) 6 5 4 Cost(16) 26 32 49 Delay(32) 8 6 5 57 80 Cost(32) 129

Latency vs. Area Tradeoff

Hybrid Brent-Kung/Kogge-Stone Parallel Prefix Graph for 16 Inputs

Parallel Prefix Sums Network I

Parallel Prefix Sums Network I – Cost (Area) Analysis Cost = C(k) = 2 C(k/2) + k/2 = = 2 [2C(k/4) + k/4] + k/2 = 4 C(k/4) + k/2 + k/2 = = …. = = 2 log k-1C(2) + k/2 (log2k-1) = = k/2 log2k 2 C(2) = 1 Example: C(16) = 2 C(8) + 8 = 2[2 C(4) + 4] + 8 = = 4 C(4) + 16 = 4 [2 C(2) + 2] + 16 = = 8 C(2) + 24 = 8 + 24 = 32 = (16/2) log2 16

Parallel Prefix Sums Network I – Delay Analysis Delay = D(k) = D(k/2) + 1 = = [D(k/4) + 1] + 1 = D(k/4) + 1 + 1 = = …. = = log2k D(2) = 1 Example: D(16) = D(8) + 1 = [D(4) + 1] + 1 = = D(4) + 2 = [D(2) + 1] + 2 = = 4 = log2 16

Parallel Prefix Sums Network II (Brent-Kung)

Parallel Prefix Sums Network II – Cost (Area) Analysis Cost = C(k) = C(k/2) + k-1 = = [C(k/4) + k/2-1] + k-1 = C(k/4) + 3k/2 - 2 = = …. = = C(2) + (2k - 2k/2(log k-1)) - (log2k-1) = = 2k - 2 - log2k 2 C(2) = 1 Example: C(16) = C(8) + 16-1 = [C(4) + 8-1] + 16-1 = = C(2) + 4-1 + 24-2 = 1 + 28 - 3 = 26 = 2·16 - 2 - log216

Parallel Prefix Sums Network II – Delay Analysis Delay = D(k) = D(k/2) + 2 = = [D(k/4) + 2] + 2 = D(k/4) + 2 + 2 = = …. = = 2 log2k - 1 D(2) = 1 Example: D(16) = D(8) + 2 = [D(4) + 2] + 2 = = D(4) + 4 = [D(2) + 2] + 4 = = 7 = 2 log2 16 - 1

Parallel Prefix Network High-Radix Parallel Prefix Network Adders (GMU CERG Research)

Traditional Parallel-Prefix Network Adder

Kogge-Stone Parallel-Prefix Network

Brent-Kung Parallel-Prefix Network

High-Radix Parallel-Prefix Network Adder

Generate-Propagate-Sum (GPS) Unit

Sum Unit

Modular Addition

High-Radix Parallel-Prefix Network Modular Adder

Test Circuit for Benchmarking Adders and Modular Adders