1 Combined LNS Adder/Subtractors for DCT Hardware Jie Ruan & Mark G. Arnold.

Slides:



Advertisements
Similar presentations
Arithmetic in Computers Chapter 4 Arithmetic in Computers2 Outline Data representation integers Unsigned integers Signed integers Floating-points.
Advertisements

Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Copyright © 2008 Pearson Education Canada2-1 Chapter 2 Review of Basic Algebra Contemporary Business Mathematics with Canadian Applications Eighth Edition.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
Chapter 3 Arithmetic for Computers. Multiplication More complicated than addition accomplished via shifting and addition More time and more area Let's.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 10 Thursday 02/19/02.
1  2004 Morgan Kaufmann Publishers Chapter Three.
UNIVERSITY OF MASSACHUSETTS Dept
Low power and cost effective VLSI design for an MP3 audio decoder using an optimized synthesis- subband approach T.-H. Tsai and Y.-C. Yang Department of.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
Ch. 21. Square-rootingSlide 1 VI Function Evaluation Topics in This Part Chapter 21 Square-Rooting Methods Chapter 22 The CORDIC Algorithms Chapter 23.
CS 105 Digital Logic Design
Fixed-Point Negative Numbers Two Common Forms: 1.Signed-Magnitude Form 2.Complement Forms Signed-Magnitude Numbers First Digit is Sign Digit, Remaining.
Prepared by: Hind J. Zourob Heba M. Matter Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering.
Lecture 12: Computer Arithmetic Today’s topic –Numerical representations –Addition / Subtraction –Multiplication / Division 1.
Properties of Logarithms
Dr. Bernard Chen Ph.D. University of Central Arkansas
Arithmetic for Computers
Unrestricted Faithful Rounding is Good Enough for Some LNS Applications Mark Arnold Colin Walter University of Manchester Institute of Science and Technology.
Multiplication CPSC 252 Computer Organization Ellen Walker, Hiram College.
Computer Arithmetic Nizamettin AYDIN
Unit 11, Part 2: Day 1: Introduction To Logarithms.
Unit 11, Part 2: Introduction To Logarithms. Logarithms were originally developed to simplify complex arithmetic calculations. They were designed to transform.
Computing Systems Basic arithmetic for computers.
Quiz 1) Convert log 2 4 = x into exponential form 2) Convert 3 y = 9 into logarithmic form 3) Graph y = log 4 x 2 x = 4 log 3 9 = y y = log 4 x.
Department of Computer Systems Engineering, N-W.F.P. University of Engineering & Technology. DSP Presentation Computing Multiplication & division using.
Efficient FPGA Implementation of QR
ECE232: Hardware Organization and Design
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /14/2013 Lecture 16: Floating Point Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
A Fast Hardware Approach for Approximate, Efficient Logarithm and Anti-logarithm Computation Suganth Paul Nikhil Jayakumar Sunil P. Khatri Department of.
Mohammad Reza Najafi Main Ref: Computer Arithmetic Algorithms and Hardware Designs (Behrooz Parhami) Spring 2010 Class presentation for the course: “Custom.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Intro to Logarithms Goes along with 4.4 (GREEN book) Quiz: 1/12/10 Logs Test: 1/21/10.
Floating Point Arithmetic
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Chapter 8 – Exponents and Exponential Functions 8.1/8.3 – Multiplication and Division Properties of Exponents.

1 Ó1998 Morgan Kaufmann Publishers Chapter 4 計算機算數.
Chapter 3 Arithmetic for Computers. Chapter 3 — Arithmetic for Computers — 2 Arithmetic for Computers Operations on integers Addition and subtraction.
Floating Point Numbers Representation, Operations, and Accuracy CS223 Digital Design.
Binary Arithmetic.
1 ELEN 033 Lecture 4 Chapter 4 of Text (COD2E) Chapters 3 and 4 of Goodman and Miller book.
Other Arithmetic Functions Section 4-5
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Recursive Architectures for 2DLNS Multiplication RESEARCH CENTRE FOR INTEGRATED MICROSYSTEMS - UNIVERSITY OF WINDSOR 11 Recursive Architectures for 2DLNS.
Exponents – Logarithms xy -31/8 -2¼ ½ xy 1/8-3 ¼-2 ½ The function on the right is the inverse of the function on the left.
Logarithmic Properties Exponential Function y = b x Logarithmic Function x = b y y = log b x Exponential Form Logarithmic Form.
Implementation of Public Key Encryption Algorithms
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Chapter 6 Overview Number Systems and Radix Conversion Fixed point.
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Arithmetic for Computers Chapter 3 1. Arithmetic for Computers  Operations on integers  Addition and subtraction  Multiplication and division  Dealing.
8 – Properties of Exponents No Calculator
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
CS 232: Computer Architecture II
Outline Introduction Floating Point Arithmetic Adder Multiplier.
Arithmetic Logical Unit
1-D DISCRETE COSINE TRANSFORM DCT
UNIVERSITY OF MASSACHUSETTS Dept
Chapter 4 計算機算數.
UNIVERSITY OF MASSACHUSETTS Dept
Presentation transcript:

1 Combined LNS Adder/Subtractors for DCT Hardware Jie Ruan & Mark G. Arnold

2 Outline Logarithmic Number System (LNS) Discrete Cosine Transform (DCT) Combined LNS adder/subtractor

3 LNS (Logarithmic Number System) Represents a number by a sign bit and an exponent to a certain base b Exponent (n-1 bits)S F (Precision)

4 Properties of LNS Large dynamic range Easy for multiplications, divisions and exponentiations Additions are not linear operations for LNS Cost of adders is exponential to word lengths Have advantages at low precisions

5 LNS Arithmetic Units Multiplication log b (XY) = log b X + log b Y The cost is a fixed-point adder Addition More complex process than multiplication E.g., when calculating log b (X+Y), (x=log b X, y=log b Y) 1. Calculate z=x-y Z=X/Y 2. Table-lookup s b (z)=log b (1+b z ) 1+X/Y 3. log b (X+Y)=y+s b (z) Y(1+X/Y)=X+Y Subtraction d b (z)=log b |1-b z |

6 LNS Multiplication and Addition s b (z) d b (z) z s b (z)=log b (1+2 z ) =y+s b (z) _ + x y log b (X+Y) d b (z)=log b |1-2 z | x y + LNS multiplicationLNS addition log b (XY) =x+y x=log b X, y=log b Y (=y+d b (z) when S x ≠S y )

7 Discrete Cosine Transform An important part in MPEG encoding 2 Dimensional 8x8 DCT 2-D DCT usually performed through 2 rounds of 1-D DCT to reduce the hardware cost

8 LNS DCT in MPEG encoding Floating-point cost is too high for portable systems LNS has the same visual result as fixed-point at the same precisions LNS have shorter word length than fixed-point numbers At the same dynamic range and precisions for MPEG-1 Fixed-point (12+F) bits LNS (6+F) bits

9 Fast DCT algorithm Chen’s 1-D DCT algorithm (one cycle) Directly factorizes the DCT matrix 16 multiplications 26 additions Perform one 8-point 1-D DCT in one cycle Two-cycle version by reusing hardware 14 adders 10 multipliers Perform one 8-point 1-D DCT in two cycles

10 Diagram of Chen’s 1-D DCT S(1/4) C(1/4) S(1/8) C(1/8) S(1/8) -C(1/8) C(1/4) S(1/4) S(1/16) C(1/16) -S(7/16) C(7/16) S(5/16) C(5/16) -S(3/16) C(3/16) f(0) f(1) f(2) f(3) f(4) f(5) f(6) f(7) F(0) F(4) F(2) F(6) F(1) F(5) F(3) F(7) - S(m/n)=sin(mπ/n), C(m/n)=cos(mπ/n)

11 Many computational units as below in DCT Combined LNS adders/subtractors X+Y X-Y - The above two computation always access different s b (z) table and d b (z) table Share table-lookup part and some combinational parts in the above two computations =

12 Combined LNS adder/subtractors 1. z=x-y 2. Table-lookup s b (z)=log b (1+2 z ) 3. y+s b (z) X+Y x=log b X, y=log b Y 1. z=x-y 2. Table-lookup d b (z)=log b |1-2 z | 3. y+d b (z) X-Y Same hardware Same address for different tables

13 Combined LNS adder/subtractors (type 1) s b (z) d b (z) z=x-y =y+s b (z)_ + x y log b (X+Y) (=y+d b (z) when S x ≠S y ) + =y+d b (z) log b |X-Y| (=y+s b (z) when S x ≠S y )

14 Combined LNS adder/subtractors (type 1) s b (z) d b (z) z=x-y =y+s b (z)_ + x y log b (X+Y) (=y+d b (z) when S x ≠S y ) + =y+d b (z) log b |X-Y| (=y+s b (z) when S x ≠S y )

15 Diagram of Chen’s 1-D DCT S(1/4) C(1/4) S(1/8) C(1/8) S(1/8) -C(1/8) C(1/4) S(1/4) S(1/16) C(1/16) -S(7/16) C(7/16) S(5/16) C(5/16) -S(3/16) C(3/16) f(0) f(1) f(2) f(3) f(4) f(5) f(6) f(7) F(0) F(4) F(2) F(6) F(1) F(5) F(3) F(7) S(m,n)=sin(mπ/n), C(m,n)=cos(mπ/n) S(1/8) C(1/8) -C(1/8) S(1/8) C(1/8) S(1/8) -C(1/8) S(1/8) C(1/8) -C(1/8) S(1/8)

16 Some computation units perform blow computations Combined LNS adder/subtractors a 1 X+a 2 Y -a 2 X+a 1 Y (a 1, a 2 are constants) S(1/8) C(1/8) S(1/8) -C(1/8) Access different tables in an LNS adder Share table-lookup part Add some extra combinational hardware The table-lookup of the two computations use different addresses =

17 Combined LNS adder/subtractors (type 2) s b (z) d b (z) =y+s b (z 1 )_ + log b a 2 X log b (a 1 X+a 2 Y) (=y+d b (z 1 ) when S x ≠S y ) + =y+d b (z 2 ) log b (-a 2 X+a 1 Y) (=y+s b (z 2 ) when S x ≠S y ) _ log b a 2 Y log b a 1 X log b a 1 Y z2z2 z1z1

18 Portions of table-lookup part in LNS adders

19 ROM size with/without combined LNS adder/subtractors

20 Hardware comparison for LNS adder and LNS adder/subtractors

21 LNS adder/subtractors in Chen’s hardware LNS adders OrdinaryType 1Type 2 Direct inferred hardware Two-cycle version hardware 14432

22 Hardware comparison for Chen’s DCT algorithm at F=4

23 Conclusion Significant area savings by combined LNS adder/subtractors in DCT hardware Suitable to reduce area in portable MPEG devices Some overhead when converting to/from fixed-point