18
Prepared by: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor Supervisor : : Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering Department Digital Signal Processing

Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Embed Size (px)

Citation preview

Page 1: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Prepared by:Prepared by:

Hind J. Zourob 220033212Heba M. Matter 220012336

SupervisorSupervisor::

Dr. Hatem El-Aydi

Faculty Of Engineering Communications & Control Engineering Department

Digital Signal Processing

Page 2: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

OutlinesOutlines

Introduction.Fixed point processors.Q Format.Floating point processors.Overflow and scaling.Scaling.Comparison.Conclusion.

1Digital Signal Processing -

Page 3: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

IntroductionIntroductionDigital Signal Processing can be divided into two

categories,

Fixed point Floating point.

Refer to the format used to store and manipulate numbers within the devices.

2Digital Signal Processing -

Page 4: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Fixed point processorsFixed point processors Represents each number with a minimum of 16

bits.

Numbers are represented and manipulated in integer format.

There are four common ways that these 2^16=65,536 possible bit patterns can represent a number:

unsigned integersigned integerunsigned fraction notationsigned fraction format

3Digital Signal Processing -

Page 5: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Fixed point processors usagesFixed point processors usages

There is simply no need for the floating-point processing in mobile TVs.

Indeed, floating point computations would produce a more precise DCT,

Unfortunately, the DCTs in video codec are designed to be performed on a fixed point processor and are bit-exact.

4Digital Signal Processing -

Page 6: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Q Format (Fractional Representation)Q Format (Fractional Representation) In a 16-bit system, it is not possible to represent

numbers larger than 32767 and smaller than –32768.

To cope with this limitation, numbers are often normalized between -1,1.

This achieved by moving the implied binary point.

Number representations

5Digital Signal Processing -

Page 7: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

ExamplesExamplesExample (1)Example (1)

Consider two Q15 format Consider two Q15 format numbers are multipliednumbers are multipliedwhat the result and how will it what the result and how will it be stored in 16 bit memory?be stored in 16 bit memory?

6Digital Signal Processing -

Page 8: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Example (2)Example (2)

Any multiplication or addition Any multiplication or addition resulting in a number larger than 7 resulting in a number larger than 7 or smaller than –8 will cause or smaller than –8 will cause overflow.overflow.

When 6 is multiplied by 2, we get When 6 is multiplied by 2, we get 12.12. The result will be wrapped The result will be wrapped around the circle to 1100, which is around the circle to 1100, which is –4.–4.How to solve this problem? How to solve this problem?

The third example will answerThe third example will answer

7Digital Signal Processing -

Page 9: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Example (3)Example (3)

8Digital Signal Processing -

Page 10: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

ButBut.….…

It should be realized that some precision is lost.

As a result of discarding the smaller fractional bits.

To solve this problem, the scaling approach will be used (discussed later)

9Digital Signal Processing -

Page 11: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Floating point Number Floating point Number representationrepresentation

Use a minimum of 32 bits to store each value.

The represented numbers are not uniformly spaced.

Composed of a mantissa and exponent

Floating point processor can also support integer representation and calculations.

There are two floating-point data representations on the C67x processor:

single precision (SP) and double precision(DP).

10Digital Signal Processing -

Page 12: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Single precision and double precisionSingle precision and double precision

C67x floating-point data representation.

C67x double precision floating-point representation

11Digital Signal Processing -

Page 13: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Floating point processorsFloating point processorsAll steps needed to perform floating-point

arithmetic are done by the floating-point hardware.

It is inefficient to perform floating-point arithmetic on fixed-point processors , Since all the operations involved, must be done in software.

12Digital Signal Processing -

Page 14: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Floating point processors usagesFloating point processors usages

In military radar, the floating point processor is frequently used because its performance is essential.

Floating point processing is good for doing large FFTs so we can implement the FIR in frequency domain.

Appropriate in systems where gain coefficients are changing with time or coefficients have large dynamic ranges .

13Digital Signal Processing -

Page 15: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

Overflow and scalingOverflow and scalingWhen multiplying two Q15 numbers, which are in

the range of –1 and 1the product will be in the same range.

However, when two Q15 numbers are added, the sum may fall outside this range, leading to an overflow.

Overflows can cause major problems by generating erroneous results.

The simplest correction method for overflow is scaling.

14Digital Signal Processing -

Page 16: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

ScalingScalingThe idea of scaling is to scale down the system input

before performing any processing then to scale up the resulting output to the original size.

Scaling can be applied to most filtering and transform operations.

An easy way to achieve scaling is by shifting.

Since a right shift of 1 is equivalent to a division by 2, we can scale the input repeatedly by 0.5 until all overflows disappear.

The output can then be rescaled back to the total scaling amount.

15Digital Signal Processing -

Page 17: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

ComparisonComparison

Characteristic Floating point Fixed point

Dynamic range much larger smaller

Resolution comparable comparable

Speed comparable comparable

Ease of programming much easier more difficult

Compiler efficiency more efficient less efficient

Power consumption comparable comparable

Chip cost comparable comparable

System cost comparable comparable

Design cost less more

Time to market faster slower

16Digital Signal Processing -

Page 18: Prepared by: Hind J. Zourob 220033212 Heba M. Matter 220012336 Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering

ConclusionConclusionDSP processors are designed as fixed point and

floating point.

Fixed-point◦Partition a binary word into integer and fractional◦Radix point is in a fixed position

Floating-point◦Large dynamic range◦Composed of a mantissa and exponent

Scaling solves the problem of overflow.Comparison between fixed point and floating point

17Digital Signal Processing -