20
1 EE290C - Spring 2004 Advanced Topics in Circuit Design High-Speed Electrical Interfaces Lecture 12 Components Viterbi Decoder Borivoje Nikolic March 4, 2004. 2 Outline Viterbi decoder How it works What is it used for Digital implementations Analog implementations

Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

1

EE290C - Spring 2004Advanced Topics in Circuit DesignHigh-Speed Electrical Interfaces

Lecture 12Components

Viterbi DecoderBorivoje NikolicMarch 4, 2004.

2

Outline

Viterbi decoderHow it worksWhat is it used forDigital implementations

Analog implementations

Page 2: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

2

3

Viterbi AlgorithmExample of dynamic programming [Bellman’57]Invented by A. Viterbi in 1967Explained by Forney in 1972,1973Used for:

Decoding convolutional codesDecoding trellis codesMaximum likelihood detectionSpeech recognition, etc.

Types:Hard-input, hard-outputSoft-input, hard-outputSoft-input, soft-output

4

Jared’s Trip to Berkeley

Page 3: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

3

5

Jared’s Trip to Berkeley

6

Trellis

States + edgesNo loopsWeights in minutes

Mountain View

PaloAlto

MilpitasUnionCity

San Mateo

Hayward Oakland

San Francisco

Berkeley

5

15

10

15

15 1515

20 20

2040

20

40

Page 4: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

4

7

Shortest Time to Get to Berkeley?

What is the best path to take to:Union City?Hayward?

Mountain View

PaloAlto

MilpitasUnionCity

San Mateo

Hayward Oakland

San Francisco

Berkeley

5

15

10

15

15 1515

20 20

2040

20

40

Choose the minimum cost at each point (state)

8

Shortest Time to Get to Berkeley?

What is the best path to take to:Union City?

Mountain View

PaloAlto(5)

Milpitas(15)

UnionCity(20)

San Mateo

Hayward Oakland

San Francisco

Berkeley

5

15

10

15

20

20

Page 5: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

5

9

Shortest Time to Get to Berkeley?

What is the best path to take to:Hayward?

Mountain View

PaloAlto(5)

Milpitas

UnionCity(20)

San Mateo

Hayward(35) Oakland

San Francisco

Berkeley

5

15

15

15

20 20

20

40

10

Shortest Time to Get to Berkeley?

Mountain View

PaloAlto(5)

Milpitas

UnionCity(20)

San Mateo

Hayward(35)

Oakland(50)

San Francisco

Berkeley(65)

5

15

15

15 1515

20 20

Page 6: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

6

11

Digital Baseband Transceiver

12

Convolutional Codes

Adding redundancy

D D

+

+

di di-1di-2

Channel

0110

1+D2

1+D+D2

0111

0100

(00, 11, 10, 10)

Generators:G1 = 101G2 = 111

Page 7: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

7

13

State Transition Diagrams

00

1101

10

0/00

1/11

0/01

1/10

0/11

1/00

0/10

1/01

14

Error Sequences

a = 00

b = 01

d = 11

c = 10

00

11

00

01

10

01

10

11

a b c

d

a

w=2 w=2w=0

w=1

w=1

w=1

w=1

Minimum distance error event is 4 bits

Page 8: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

8

15

Decisions at Each Step

00

01

10

11

i i+1 i+2

State (path)metrics

Branchmetrics

In Gaussian channel:bm = (yk – sk)2

In BSC:bm = dH(yk, sk) = |yk – sk|

dH is Hamming distanceIf received yk = 10dH(10, 00) = 1dH(10, 01) = 2

16

Trellis Diagram

00

01

10

11

i i+1 i+2

Time-indexed state diagram

i+3 i+4

0/00

1/11

0/00

1/11

0/11

1/00

Page 9: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

9

17

The Viterbi Algorithm

Illustrated by 2-state trellis

sm n1 1−

sm n2 1−

sm n1

sm n2

timetn−1 tn

bm1

bm2 bm3

bm4

( )( )

sm sm bm sm bm

sm sm bm sm bm

n n n

n n n

1 1 1 2 3

2 1 2 2 4

1 1

1 1

= + +

= + +

− −

− −

min ,

min ,

Add AddCompareSelect

18

Viterbi Decoder

Implements Viterbi algorithm

Three main componentsBranch metric calculationPath metric accumulation (add-compare-select recursion)Survivor path decode

Page 10: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

10

19

Viterbi Decoder

D

Branchmetrics

unit

Add-Compare-

Select

Survivorpath

decode

Branch metrics unitCalculates the distances between the received signal and the ideal signals

Add-Compare-Select unitAccumulates path metrics

Survivor path decodeKeeps track of the path through the trellis

Inputs Decoded bits

20

Calculating Branch Metrics

Assume G1 and G2 both output a 0Soft decoder inputs are 0.1 and 0.25 insteadBranch metrics:

bm00 = |0 – 0.1| + |0 – 0.25| = 0.35bm01 = |0 – 0.1| + |1 – 0.25| = 0.85bm10 = |1 – 0.1| + |0 – 0.25| = 1.15bm11 = |1 – 0.1| + |1 – 0.25| = 1.65

Page 11: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

11

21

Calculating Branch Metrics

Euclidean distances (AWGN channel)bmi = (yk – sk)2

sk are usually integersbmi = yk

2 -2Ciyk + Ci2

Since yk terms are common to all branch metrics they drop out in ACS comparison, and can be eliminated.

Ci2 are precomputed and 2Ciyk are shifts and adds.

22

Conventional add-compare-select unit

Add-Compare-Select Recursion

Eight state trellis

Page 12: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

12

23

Add-Compare-Select Recursion

Adder

Adder

Subtractor

2:1 Multiplexer

Register

sm1 sm2

bm1

bm2

MSB

DecisionNew State Metric

5

5

8 8

8 8

8

24

Add-Compare-Select Recursion

sm20

bm20

sm21

bm21

sm22

bm22

sm23

bm23

sm24

bm24

sm25

sm26

sm27

+

+

+

+

+

+

+

+

+ −

+

+

+

+

+

+

+

sm10

sm0

sm1

sm2

sm3

sm14 sm

4

bm10

bm11

bm12

bm13

bm14

sm15 sm

5

sm16 sm

6

sm17 sm

7

diff

Page 13: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

13

25

Add-Compare-Select Recursion

Bit

1 2 3 4 5 6 70

Select

Register

Register

Time

Add

CC

CC

CC

CC

26

Radix-4 add-compare-select unit

Add-Compare-Select Recursion

One step lookaheadapplied to an eight-state trellis

Page 14: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

14

27

Add-Compare-Select RecursionAdder

Adder

Subtractor

4:1 Multiplexer

Register

sm1 sm2

bm1

bm2

MSB

DecisionNew State Metric

Adder

Subtractor

Subtractor

sm3

Sele

ct

MSB

MSB

bm3

Adder

Subtractor

Subtractor

Subtractor

sm4

bm4

MSB

MSB

MSB

Inhi

bit

sm3

Inhi

bit s

m4

5

5

5

5

8 8 8 8

8 8 8 8

8

4-way ACS:2 additions + 6 comparisons

28

Add-Compare-Select Recursion

Concurrent add and compare

Sridharan, Carley, JSSC’00

Page 15: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

15

29

Add-Compare-Select Recursion

Retimed ACS

Fettweiss, Globecom’95

30Parallel compare-select-add unit

Add-Compare-Select Recursion

Page 16: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

16

31Area comparison of various ACS structures

Add-Compare-Select Recursion

32Power comparison of various ACS structures

Add-Compare-Select Recursion

Page 17: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

17

33

Extreme ACSs

LSB-first computation MSB-first computation

Fettweiss, Meyr, TCom’90Yeung, Rabaey, ISSCC’95Drawings by Haratsch

34

RNS-Based ACS

si ∈ {0, 1, 2}, and are two-bit encoded as si ∈ {00, 01, 11}

∑−

==

1

02

w

i

iisS

smx0,y0

bm0

s0

co0 sx1

sy1smx1,y1

bm1

s1

co1 sx2

sy2smx2,y2

bm2

s2

co2

sx7

sy7smx0,y0

bm7 = 0

s7

co7

sx0 = 00

sy0 = s0

normalization

c6

Page 18: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

18

35

Bit-Level Pipelined ACS

ADD3 ADD3

ADD2 ADD2ADD1 ADD1

Clk

ADD0 ADD0

ADD3

ADD2

SEL3 SEL3SEL2 SEL2

SEL1

SEL0

Yeung, Rabaey, ISSCC’95

36

Analog ACS

Fukahori, ISSCC’98

Page 19: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

19

37

Interleaved Analog ACS

38

State metrics sm i and sm j represented on a number circle

Metric Normalization

Page 20: Outline - University of California, Berkeleybwrcs.eecs.berkeley.edu/Classes/EE290C_S04/lectures/...What is the best path to take to: Hayward? Mountain View Palo Alto (5) Milpitas Union

20

39

0

1

2

3

nn−1n−2n−3n−4n−5

4-state trellis example

Survivor Path Decode

40

Register Exchange