Outline Digital CMOS Design Arithmetic Operators Adders - - PowerPoint PPT Presentation

outline
SMART_READER_LITE
LIVE PREVIEW

Outline Digital CMOS Design Arithmetic Operators Adders - - PowerPoint PPT Presentation

Outline Digital CMOS Design Arithmetic Operators Adders Comparators Shifters Multipliers Square rooting Pirouz Bazargan Sabet Digital Design February 2010 Square root An real number using floating point representation


slide-1
SLIDE 1

Pirouz Bazargan Sabet February 2010 Digital Design

Outline

Arithmetic Operators Digital CMOS Design

Adders Comparators Shifters Multipliers Square rooting

slide-2
SLIDE 2

Pirouz Bazargan Sabet February 2010 Digital Design

Square root

An real number

  • using floating point representation

Find a real number

  • such as

( )

y x = +

2

ε

  • Calculation cannot be implemented in hardware
  • Need iterative operation
slide-3
SLIDE 3

Pirouz Bazargan Sabet February 2010 Digital Design

Square root

2

= − y x resolve

  • Direct method
  • Indirect method

digit-by-digit

slide-4
SLIDE 4

Pirouz Bazargan Sabet February 2010 Digital Design

( )

E

M y 2 1 × × − =

( )

2

2 1

E

M y × × − =

E odd ?

[ [

2 , 1 ∈ M

With

( )

E

M y

× ′ × − =

2

2 1

[ [

4 , 1 ∈ ′ M

With

( )

E

M y x

× ′ × − = = 2 1 Find x such as y x =

( )

E

X x

× × − = 2 1

[ [

2 , 1 ∈ X

With

Square root - direct

slide-5
SLIDE 5

Pirouz Bazargan Sabet February 2010 Digital Design

Square root - direct

Find x such as y x =

=

× =

n i i i

x X 2

( )

E

M y

× ′ × − =

2

2 1

[ [

4 , 1 ∈ ′ M

With

( )

E

X x

× × − = 2 1

[ [

2 , 1 ∈ X

With

Iterate on i and evaluate xi

slide-6
SLIDE 6

Pirouz Bazargan Sabet February 2010 Digital Design

Square root - direct

slide-7
SLIDE 7

Pirouz Bazargan Sabet February 2010 Digital Design

Square root

2

= − y x resolve

  • Direct method
  • Indirect method

digit-by-digit

slide-8
SLIDE 8

Pirouz Bazargan Sabet February 2010 Digital Design

y x

tangent initial guess new estimation

Square root - indirect

( )

x f

( )

= x f

Resolving a non linear equation

slide-9
SLIDE 9

Pirouz Bazargan Sabet February 2010 Digital Design

Resolving a non linear equation

( )

= x f Taylor series in the neighborhood of

x

( ) ( ) ( )( ) ( )( )

  • +

− ′ ′ + − ′ + =

2

2 1 x x x f x x x f x f x f 1st order :

( ) ( ) ( )( )

x x x f x f x f − ′ + ≈

Square root - indirect

slide-10
SLIDE 10

Pirouz Bazargan Sabet February 2010 Digital Design

Resolving a non linear equation

( )

= x f Iterative resolution starting from an initial guess x0

( ) ( ) ( )( )

x x x f x f x f − ′ + ≈

( )

= x f

( ) ( )( )

= − ′ + x x x f x f

( ) ( )

x x f x f x + ′ − = Newton-Raphson method

Square root - indirect

slide-11
SLIDE 11

Pirouz Bazargan Sabet February 2010 Digital Design

Resolving y x =

( ) ( ) ( )( )

x x x f x f x f − ′ + ≈ Find a function f such as

( )

= x f for y x =

( )

y x x f − =

2

( ) (

)

( )

2

2 x x x y x x f − + − ≈

( )

= x f

( )

2

2 x x x y x + − =

  • +

= 2 1 x x y x

Square root - indirect

slide-12
SLIDE 12

Pirouz Bazargan Sabet February 2010 Digital Design

  • +

=

+ i i i

x x y x 2 1

1

Each iteration division !!

( )

y x x f − =

2

Square root - indirect

Hard to implement Resolving y x =

slide-13
SLIDE 13

Pirouz Bazargan Sabet February 2010 Digital Design

( ) ( ) ( )( )

u u u f u f u f − ′ + ≈ Find a function f such as

( )

= x f for y x =

( )

y u u f − =

−2

( ) (

)

( )

3 2

2 u u u y u u f − − − ≈

− −

( )

= u f

( )

3 2

2 u u y u u + − =

− −

( )

y u u u

2 0 3

2 1 − = y u 1 =

( )

= u f

Square root - indirect

Resolving y x =

slide-14
SLIDE 14

Pirouz Bazargan Sabet February 2010 Digital Design

Each iteration multiply !!

( )

y u u u

i i i 2 1

3 2 1 − =

+

y u 1 = y u y y y x ⋅ = = =

Square root - indirect

Resolving y x =

slide-15
SLIDE 15

Pirouz Bazargan Sabet February 2010 Digital Design

Resolving y x = y u 1 =

( )

E

M y 2 1 × × − =

( )

2

2 1

E

M y × × − =

E odd ?

[ [

2 , 1 ∈ M

with

( )

E

M y

× ′ × − =

2

2 1

[ [

4 , 1 ∈ ′ M

with

( )

E

M y

× ′ × − = 2 1

( )

E

M M y

× ′ ′ × − = 2 1

Square root - indirect

slide-16
SLIDE 16

Pirouz Bazargan Sabet February 2010 Digital Design

Initial guess M u ′ = 1

[ [

4 , 1 ∈ ′ M

with

u

M′

1

4

2

Square root - indirect

1 0.5

Resolving y x = y u 1 =

0.707

] ]

1 , 5 . ∈ u