Tải bản đầy đủ (.pdf) (51 trang)

Thiết kế các modul trong FPGA

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (181.66 KB, 51 trang )

1
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Modulation and Demodulation
Techniques for FPGAs
Ray Andraka P.E., president,
A
ndraka
C
onsulting
G
roup,
I
nc.
the
16 Arcadia Drive

North Kingstown, RI 02852-1666

USA
401/884-7930 FAX 401/884-7950
2
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
You can do Math
in them things???
3
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Overview
• Introduction
• Digital demodulation for FPGAs
• Filtering in FPGAs
• Comparison to other technologies


•Summary
4
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Digital Communications
• Historically only base-band processing
• High sample rates for down-converters
• Down-conversion traditionally analog
• Digital down-conversion with specialty chips
• FPGAs can compete
5
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Why Digital?
• Frequency agility
• Repeatability
• Cost
6
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Digital Challenges
• A to D converter
• High sample rates
• Arithmetic intensive
7
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
e
-
j
ω
c
t
=

cos(
ω
c
t)-
j
sin(
ω
c
t
)
Decimate
by R
Video
Bandpass
Filter
2
f
(t) cos(
ω
c
t)
Phase
Split
ω
c

c

c
ω

c
-2ω
c
00 0
√2f(t)e
j
ω
ct
Conventional Demodulator
8
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
-
j
sin(
ω
c
t)
cos (
ω
c
t)
Lowpass Filter

2
f
(t)
Lowpass Filter

2
f

(t)
I
Q
Decimate
by R
ω
c

c
-2ω
c
00
-2ω
c
0
e
-j
ω
ct
Re-arranged Demodulator
*
9
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Complex Mixer
Re[A
k
]
Im[A
k
]

Complex
Baseband
Signal
(Passband for
Demodulator)
Complex
Passband
Signal
(Baseband for
Demodulator)
Numerically
Controlled
Oscillator
sin(ω
c
t) cos(ω
c
t)
Re[S
k
]
Im[S
k
]
ω
c
Phase or
frequency
input
10

copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Frequency
Synthesizer
Phase Angle
to Wave
Shape
Conversion
Waveform
Out
Phase Angle
Modulation
Waveform Synthesis (NCOs)
• Various Methods
– Look up table (LUT)
– Partial products
– Interpolation
– Algorithmic
• Most methods use a
frequency synthesizer
11
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
∆ Phase
(phase increment)
Sample Clock
Phase Accumulator Design
• “Direct Digital Synthesis”
• Essentially integrates phase increment
• Increment value may be modulated
– Frequency and PSK modulation
• Binary Angular Measure (BAMs)

– Most significant bit = π
12
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Addr
Data
Phase Angle
(BAMs)
Waveform
Out
Read Only
Memory
Waveform Synthesis by LUT
• Phase resolution limited
• Arbitrary waveshapes
• Sampled waveshape must be
band-limited
• Complex requires 2 lookups
• f
osc
= f
s
/4 special case
13
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Using Symmetry to Extend
LUT Phase Resolution
00NN 00NN
0N0N 0N0N
++
00 01 10 11

++
Q1 Sin
LUT
Q1 Sin
LUT
Q
MSB
MSB-1
remaining
bits
I
Phase MSB’s
Count
sequence
14
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Waveform Synthesizer plus Multiplier
• Obvious Solution
• Separate into functional
parts
• Treat each part
independently
Numerically
Controlled Oscillator
sin(ω
c
t)
cos

c

t)
Re[S
k
]
Im[S
k
]
ω
c
15
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
a Cos(
φ
) phase
signal
000 001 010 011 100 101 110 111
-4 -4 -2.8 0 2.8 -4 2.8 0 -2.8
-3 -3 -2.1 0 2.1 3 2.1 0 -2.1
-2 -2 -1.4 0 1.4 2 1.4 0 -1.4
-1 -1 -0.7 0 0.7 1 0.7 0 -0.7
0 00000000
1 1 0.7 0 -0.7 -1 -0.7 0 0.7
2 2 1.4 0 -1.4 -2 -1.4 0 1.4
3 3 2.1 0 -2.1 -3 -2.1 0 2.1
Look Up Table Modulator
16
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
6-LUT
A[1:0]
6-LUT

A[3:2]
6-LUT
A[5:4]
6-LUT
A[7:6]
<<2
<<2
<<4
Phase[3:0]
n+8
Partial Products Modulator
17
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
6-LUT
I[0]
6-LUT
I[1]
6-LUT
I[2]
6-LUT
I[3]
<<1
<<1
<<2
Phase[3:0]
n+8
Q[1]
Q[2]
Q[3]
Q[0]

Distributed Arithmetic Modulator
18
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
n+8
<<1
serial
inputs
6-LUT
Phase[3:0]
Q[3], Q[2], Q[1], Q[0]
I[3], I[2], I[1], I[0]
Distributed Arithmetic Modulator
(Serial Form)
19
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
CORDIC
Rotator
I
in
Q
in
Phase
Accumulator
I
out
Q
out
Signal In
Modulated
Signal Out

CORDIC Modulator
I
out
= I
in
cosφ - Q
in
sinφ
Q
out
= Q
in
* cosφ + I
in
sinφ
20
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
CORDIC Algorithm Explained
• Coordinate rotation in a plane:
x’ = xcos(φ) - ysin(φ)
y’ = ycos(φ) + xsin(φ)
• Rearranges to:
x’ = cos(φ) [x - ytan(φ)]
y’ = cos(φ) [y + xtan(φ)]
cosφ
sinφ
φ
I
Q
21

copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
>>3
x
0
y
0
z
0
x
n
y
n
z
n
±± ±
>>3 const
sign
>>2
±± ±
>>2 const
sign
>>1
±± ±
>>1 const
sign
>>0
±± ±
>>0 const
sign
>>4

±± ±
>>4 const
sign
CORDIC Structure
22
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Digital Filtering
y[k]=Σx[k-i]•C
i
Z
-1
Z
-1
C
0
C
1
C
i-2
C
i-1
Z
-1
x[k]
• Many Constant
Multipliers
• Delay Queues
• Products Summed
• Advantages
– No tolerance drift

– Low cost
– precise characteristic
23
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Distributed Arithmetic Filter
Shift Reg
Shift Reg
Shift Reg
Shift Reg
C
0
C
1
C
2
C
3
<<1
Scaling Accum
Addr Data
0000 0
0001 C
0
0010 C
1
0011 C
0
+ C
1
1110 C

1
+ C
2
+ C
3
1111 C
0
+ C
1
+ C
2
+ C
3
24
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Take Advantage of Symmetry
SREG
X[k]
SREG
SREG
• Real filters are
symmetric
• Add bits with
like coef’s before
filtering
• Uses Serial
Adders
• Halves taps
SREG
SREG

SREG
SREG
x[k]+x[k-6]
x[k-1]+x[k-5]
x[k-2]+x[k-4]
x[k-3]
25
copyright  1998,1999,2000 Andraka Consulting Group, Inc. All Rights reserved
Decimating FIR Filters
• Low pass filter then discard samples
• Keep only every 4th output
Y
n+0
=a
k
C
0
+a
k-1
C
1
+a
k-2
C
2
+ a
k-3
C
3
+a

k-4
C
4
+…
Y
n+4
= a
k+4
C
0
+a
k+3
C
1
+a
k+2
C
2
+a
k+1
C
3
+a
k
C
4
+…
Y
n+8
=a

k+8
C
0
+a
k+7
C
1
+a
k+6
C
2
+a
k+5
C
3
+a
k + 4
C
4
+…
• reduces to n parallel filters fed every nth sample
• sub-filter results summed to get result

×