TELKOM
NIKA
, Vol.11, No
.3, March 2
0
1
3
, pp. 1579 ~ 1586
ISSN: 2302-4
046
1579
Re
cei
v
ed
No
vem
ber 1, 20
12; Re
vised Janua
ry 2
3
, 20
13; Accepted
February 3, 2
013
SOPC Based Multi-Channel Sliding Correlation
Processing System
Xin Liu*, Dajun Sun, Tingting Teng
Scienc
e an
d T
e
chn
o
lo
g
y
on
Und
e
r
w
ater Ac
oustic La
bor
ator
y
,
Har
b
i
n
En
gin
eeri
ng U
n
iv
ersit
y
,
Harbi
n
, 150
00
1, P. R. China
*Corres
p
o
ndi
n
g
author, e-ma
i
l
: 1226
88
188
@
qq.com
A
b
st
r
a
ct
Real ti
me
multi-ch
ann
el sl
idin
g corre
lati
on proc
essin
g
is w
i
dely appli
ed i
n
un
d
e
rw
ater
communic
a
tion system
or underwater positioning system
. The traditional im
plem
entation in FPGA
always
empl
oys p
a
ral
l
e
l
meth
od w
h
ic
h red
u
ces th
e
desi
gn w
o
rk, h
o
w
e
ver w
a
stes
consi
der
abl
e
F
P
GA resourc
e
s.
T
h
is paper d
e
s
c
ribe
d a new
kind of SOPC structur
e w
h
ich base
d
on AVA
LON bus, taken NIOS CPU as
system contro
ll
er, DMA used for accurate d
a
ta trans
missio
n
betw
een co
mp
utin
g units. This kind of time-
mu
ltipl
e
xe
d processi
ng structure
impr
ove
d
controlli
ng fle
x
ibil
ity and
sa
ved F
P
GA re
sources. Syste
m
stability w
a
s pr
oved by l
a
ke e
x
peri
m
e
n
ts.
Ke
y
w
ords
: SOPC, F
P
GA, slid
ing corr
elati
on,
NIOS
Copy
right
©
2013 Un
ive
r
sita
s Ah
mad
Dah
l
an
. All rig
h
t
s r
ese
rved
.
1. Introduc
tion
Sliding co
rrel
ation com
put
ation is always
the foundati
on of advanced algo
rithm in many
fields, su
ch
a
s
acqui
sition
for pseud
o code in
DS
co
mmuni
cation
system [1], [2], digital pulse
comp
re
ssion
of SAR [3], time-d
elay esti
mation in po
sitioning sy
ste
m
[4] etc.
The real time
slidin
g corre
l
ation alg
o
rith
m ca
n be im
plemente
d
in
DSP chi
p
o
r
FPGA
chip. Tra
d
itio
nally, the hardwa
r
e platform of underwater po
sitioni
ng or com
m
u
n
icatio
n syst
em
often co
mpo
s
ed of DSP
ch
ip for real
-time sig
nal
p
r
o
c
essing and F
P
GA
chip
fo
r
logic and da
ta
transmissio
n
controlling.
Due to the limi
t
ation of
pro
c
essing
ca
pacity, the DSP chip
hardly h
a
s
sufficie
n
t time to accom
p
lish
su
ccessive algo
rith
m after a l
ong poi
nt sl
iding correla
t
ion
comp
utation
(more than
8
192 p
o
ints). The de
si
g
n
prop
osed by
this pa
per
utilize
s
FPG
A
to
comp
ute re
a
l
time multi-cha
nnel
slidi
ng co
rr
elatio
n pro
c
e
ssi
ng
, liberates t
he DSP from
correl
ation work, an
d finall
y
improves th
e real
time si
gnal processi
ng ca
pa
city of entire syste
m
.
In FPGA, real time correla
tion processi
ng sy
stem is usually com
posed of data buffer,
band pa
ss filter, sliding correlator, lo
w pass f
ilter and data tran
smissi
on interf
ace
s
. Wh
en the
cha
nnel nu
m
ber in
crea
se
s, the traditional parall
e
l pat
tern de
sign
re
quire
s mo
re
FPGA resource
s
due to the pa
rallel pla
c
e
m
ent of modul
es. Although
the desi
gn work i
s
sim
p
lified, the re
sou
r
ce
s
requi
re
d will be unacce
ptable whe
n
the length of correlati
on gro
w
s la
rge
r
. Moreov
er
,
sometim
e
s, whe
n
interna
l
data results are r
equired
to
output or control, an addition
al data
synchro
n
ization mo
dule
an
d data o
u
tput
module
ha
s t
o
be a
dde
d, cau
s
e
s
extra
wa
ste of FPG
A
resou
r
ces u
n
doubte
d
ly.
A kind of SO
PC implemen
tation raise
d
by this paper is based on Avalon bus a
nd NIOS
CPU
system. By controlling internal data-flow an
d hardware m
o
dules
accu
rately, it achieves a
maximum mu
ltiplicity of internal m
odule
s
and me
mori
es so finally meets
syste
m
deman
ds.
2. Rese
arch
Metho
d
2.1. Sy
stem
Architec
ture
Internal ha
rd
ware structu
r
e of FPGA is
sh
owe
d
in Figure 1. System ope
rate
s unde
r
control of NIOS. In consi
deration
of
flexibility and tran
smissi
on efficiency
,
the
data
transmissio
ns betwee
n
computing a
n
d
memory
u
n
its employ
dire
ctly memory acce
ss to
minimize time delay; oth
e
rs em
ploy DMA met
hod
for the
flexible transmission pa
ramet
e
rs
control.
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 2302-4
046
TELKOM
NIKA
Vol. 11, No
. 3, March 20
13 : 1579 – 1
586
1580
Figure 1. Hardwa
re st
ru
ctu
r
e of FPGA
2.2. Processi
ng Procedur
e
As mentione
d above, the whole syste
m
is
cond
uct
ed by NIOS
CPU, not onl
y data
transmissio
n and calculati
on but asl
o
controllin
g of
every comp
uting units. The
prog
ram flo
w
of
NIOS is illust
rated in Figure 2.
Figure 2. NIO
S
program flo
w
diag
ram
Signal ge
nerator unit o
u
tp
uts 8
cha
nnel
s’ a
c
qui
sition
data from A
D
. The o
u
tpu
t
data is
filled into 8 F
I
FO units, once a FIFO reach
e
s its
pre
s
et trigge
r co
ndition, it will trigger NIOS
’
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
SOPC Based Multi-Channel Sliding Corr
elation Processing Syste
m
(Xin Liu)
1581
hard
w
a
r
e int
e
rrupt. NIOS will config FIFO DM
A controlle
r, the latter then transmit every
cha
nnel
s’ dat
a from FIFO to corre
s
p
ondi
ng add
re
ss in
SSRAM0.
After 8 chann
els’ ra
w data
moved into SSRAM
0, FIR DMA cont
roll
er will re
ad raw data
of first chan
n
e
l in SSRAM
0 and
write it into FIR
RA
M whi
c
h i
s
th
e input d
a
ta
sou
r
ce of b
a
n
d
pass
FI
R filter. NIOS then s
t
arts
the filter an
d out
puts the
filter re
sults to
sli
d
ing
co
rrel
a
tion
pro
c
e
s
sor, which i
s
demo
n
strate
d in Fi
gure 3.
Figure 3. Structure of
slidin
g correl
ation
pro
c
e
s
sor
NIOS open MUX unit, saves the filter’s result
s to dual port RAM
1
. When the filter ends
its comp
utation,
NIOS will
be notice
d
b
y
interrupt si
gnal
. It switches (I
)FFT u
n
it to FFT mode,
leadin
g
the FFT re
sults
sto
r
ed in du
al po
rt RAM2.
NIOS will get interrupt sig
nal after FFT comput
ation
finished as
well, it starts compl
e
x
multiplier. Thi
s
unit fetches the local
signal co
mplex
data sto
r
ed i
n
ROM, an
d
multiplies it with
FFT results.
This time,
NI
OS ch
ang
es MUX’s mod
e
, save
s the
multiple
re
sults to d
ual
port
RAM1 ag
ain.
The (I)F
FT m
odule turned
to IFFT mode after
com
p
lex multiplicati
on, the IFFT results
(ori
ginal unscaled sliding
correlation
results)
will be stored i
n
to dual port RAM2
. The dual port
RAMs a
nd (I)FFT unit are
all time-multi
plexed unit
s
.
Original sliding
correl
ation
results
will be transmitted f
r
om
dual port
RAM2 to
FIR RAM2
unde
r
FIR DMA
Controlle
r2’s co
ntrol. After
scal
ed
and tra
n
sfo
r
med to integ
e
r
, the low
pa
ss FIR
filter starts to
comp
ute and
the final resul
t
s will be sto
r
ed in RES RAM.
This d
e
si
gn i
s
requi
red to
o
u
tput intern
al
comp
uted inf
o
rmatio
n, the
r
efore the FI
R RAMs
dual po
rt RAMs and
RES RAM are all conn
ecte
d into Avalon data bus t
herefo
r
e
can
be
acce
ssed by EMIF
DMA. Once any informatio
n from the RAMs is neede
d, the system
can
output co
rre
spondi
ng re
su
lts throug
h changi
ng the
sou
r
ce add
re
ss of EMIF DMA simply by
NIOS.
2.4. Data
Bu
ffering
The pro
c
e
s
si
ng pro
c
ed
ure
of FFT and
IFFT
are based on data block rathe
r
than data
strea
m
, so FI
FOs a
nd RA
Ms are nee
d
ed to buffer
the data. To
simplify the sliding correlat
ion
pro
c
e
s
sor, this desi
gn ad
opts overl
ap-save
metho
d
[5], conseq
uently the data posting
and
fetching
sho
u
l
d be ca
refull
y arran
ged.
The len
g
th o
f
sliding
co
rrelation i
s
81
92
poi
nts, an
d local sequ
ence len
g
th i
s
51
92.
Previou
s
300
0 points in S
S
RAM0 are u
pdated fr
o
m
FIFO each time. The data
access procedure
in SSRAM0 is detaile
d in Figure 4.
As the Fi
gure 4, FIFO
DMA write
s
3
000 p
o
in
ts to
SSRAM0, the writing
ad
dre
s
s ad
ded
su
ccessively and circula
r
ly,
henc
e the trigger th
re
sh
o
l
d sh
ould b
e
3000. FIR
DMA read
s 8
4
4
7
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 2302-4
046
TELKOM
NIKA
Vol. 11, No
. 3, March 20
13 : 1579 – 1
586
1582
points of data from SSRAM0 each time, the form
er 255 points a
r
e used to initialize the ba
nd
pass filter an
d the latter 81
92 point
s are
the valid data
.
3000 p
o
ints
from FIFO
0
3000
6000
844
7
Fi
rst r
ead
3000 p
o
ints
from FIFO
0
3000
6000
844
7
S
econd read
New 3000 po
ints
from FIO
New 2447
poin
t
s from FIFO
0
3000
6000
844
7
Thir
d
r
ead
3000 po
ints
fr
om
FI
FO
New 553 po
ints
fr
om
FI
FO
FI
R DMA Read Positi
on
Figure 4. Address a
rra
nge
ment
of overl
ap-save meth
od
2.5. Sliding
Correla
tion
Process
or
The mo
dule
s
in slidi
ng
correlation p
r
o
c
e
s
sor
are
(I)F
F
T
IP Core wit
h
co
ntrolle
r, complex
multiplier
and
two du
al po
rt RAMs. (I)FF
T
IP
Core
is gene
rated by
cu
stomizi
ng the
paramete
r
s
of the sta
nda
rd (I
)FFT IP
Core p
r
ovide
d
by Al
tera.
The in
put da
ta is
compl
e
x signe
d 24
b
i
ts,
8192 in lengt
h
,
an
d outp
u
t data is 24bits+6bits ex
pone
nts.
This IP Core uses blo
c
k-float
ing-
point arithm
etic intern
ally to perform
cal
c
ulatio
n
s
and for minimi
zing
the RAM usa
ge, burst mod
e
is ch
osen for
I/O data flow.
Compl
e
x multiplier is used
to
multiply t
he data from FFT by local
sequen
ce
s stored in
on chi
p
ROM
with 32bit
s
width, 819
2 in length. Th
e
output of co
mplex multipli
er is p
r
ovide
d
for
IFFT comp
utation. (I)FFT
controlle
r and
complex
-
mu
l
t
iplier co
ntroll
er are written
in Verilog.
2.6. Scaling Unit
(I)FFT IP Co
re output
s its re
sult expo
nentially, therefore
to improve the pro
c
e
ssi
ng
pre
c
isi
on and
reduce syste
m
re
so
urce consumed, ex
pone
nts are
buffered an
d did not take part
in the previo
us co
mputati
on. Sliding correl
ation p
r
o
c
e
s
sor will g
enerate two expone
nts e
a
ch
time when computing FF
T and IFFT. Scaling u
n
it gets the final
exponent by adding the two
expone
nts to
gether. It tra
n
s
form
s
slidin
g
co
rrel
a
tion
re
sult from
exp
onential type
to integral type.
The integral result is scale
d
to referen
c
e le
vel given by NIOS and stored in FIR RAM2 for low
pass filter access co
nvenie
n
tly.
2.7. Dual Port RAM
The dual po
rt RAM in sliding co
rrelat
ion pro
c
e
s
so
r has a fun
c
tion to conn
ect the
comp
uting un
it with AVALON data bu
s. For direct
ly access by either the comp
u
t
ing unit or DMA
controller or NIOS CPU on AVALON, a dual por
t
RAM unit with AVALON interface logi
c is
desi
gne
d, the archite
c
tu
re i
s
sh
own in Figure 5.
As is
sho
w
n,
NIOS CP
U or DMA co
ntroll
er c
an read
d
a
ta throu
gh A
port of the d
ual po
rt
RAM; the front side comp
uting unit can
write
data through B port by enabling the WR_E
N sig
nal
while the su
b
s
eq
uent co
m
puting unit ca
n r
ead data
by enabling the
RD_EN si
gnal. Com
pared
with triple port RAM design
,
this plan sa
ves a half
of
RAM usa
ge, it is im
portant esp
e
ci
ally wh
en
slidin
g co
rrelation length i
s
long (819
2 poi
nts) and d
a
ta width is
wide (du
a
l 24bi
ts).
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
SOPC Based Multi-Channel Sliding Corr
elation Processing Syste
m
(Xin Liu)
1583
Figure 5. Inner structu
r
e o
f
dual-po
r
t RAM
3. Results a
nd Analy
s
is
3.1. Resou
r
c
e
Usag
e
Con
s
id
era
b
le
FPGA re
so
urces i
s
sav
ed by
time-multiplexed p
r
ocessin
g
archite
c
ture
and mo
dule
s
. Every chan
nel’s p
r
o
c
e
ssiong an
d correlation
pro
c
essing
call
s
a sam
e
sli
d
i
n
g
correl
ation p
r
oce
s
sor, me
a
n
whil
e the proce
s
sor it
self
reali
z
ed by ti
me-multipl
exed memo
ry u
n
its
and computin
g units too.
Table 1. Re
source
s usage
of key modul
es
EP2S90F780
Combinational
ALUTS
Dedicated Logic
Registers
Block Memory
Bits
DSP
Elements
Complex Multiplier
109
122
0
32
FIR IP Co
re1
12858
13933
233
0
NIOS CP
U
5645
3936
2316800
0
Signal Generat
or
514
403
262144
0
(I)F
FT81
92 IP C
o
re
2554
3894
442752
8
FIR IP Co
re2
10458
12714
224
0
Local Sequences ROM
34
2
262144
0
Total(%
)
46
56
73
14
Table 1 sho
w
s that the
RAM re
sou
r
ces u
s
ag
e is large
r
while the logi
c re
so
urces a
nd
DSP element
s usage is
compa
r
atively less. That mean
s it has potential to impleme
n
t more
algorith
m
or f
unctio
nal logi
c. It has two
rea
s
on
s for l
a
rge
RAM o
c
cup
a
n
c
y, one
is due to long
slidin
g co
rrelation length (8192 p
o
ints), secondly the
implement o
f
8 chann
els’
FIFO on FPGA
con
s
um
ed lot
s
of RAM resource
s.
Improvement can
be ca
rri
ed o
u
t in future to
solve the RAM
usa
ge proble
m
, so that the system can
pro
c
e
ss m
o
re
chan
nel
s’ da
ta in real time
.
3.2. Timing
Analy
s
is
The system is requi
red to pro
c
e
ss 8 ch
annel
s’
acq
u
i
s
ition data in real time. 3000 points
of data are u
pdated ea
ch
time, while the sampl
e
rat
e
is 200KSp
s, so the system has 15
m
s
to
accompli
sh
8
chan
nel
s’ sli
d
ing correlati
on proc
ess a
nd data o
u
tp
ut, the time seque
nce is
shown
in Figure 6.
The
s
y
s
t
em is
triggered by 1PPS s
i
gnal
. After 15ms
’
ac
quis
i
tion data is
obtained
,
the
system sta
r
ts to process. Whe
n
the band pass filter of first chann
el finished its work, NIOS send
Frame Sync pulse, followe
d by Channel
Sync pulse
,
whi
c
h mean
s the
filter result transmi
ssi
on
towards
DSP
has
beg
un (P
hase A in Fig
u
re 6
)
. Simila
rly, when
slidi
ng correlation
pro
c
e
s
sor
an
d
low pass filter finished the
i
r work, NIOS sends
Ch
a
nnel Sync pulse
s and st
arts to transmit
corre
s
p
ondin
g
re
sults
(Ph
a
se B & C i
n
Figure 6), th
en the sy
ste
m
turn a
r
ou
n
d
to pro
c
e
s
s
next
cha
nnel until 8 chan
nel
s’ data has all be
en pro
c
e
s
sed
and transmitt
ed. 8 chann
el
’s pro
c
e
s
s an
d
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 2302-4
046
TELKOM
NIKA
Vol. 11, No
. 3, March 20
13 : 1579 – 1
586
1584
transmissio
n
will spend the system 2
4
.38ms-1
5
ms
=9.38m
s, mu
ch less than
15ms, so this
system me
ets its timing re
quire
m
ent
s a
nd ha
s potent
ial to extend.
Figure 6. Time seq
uen
ce
waveform
3.3. Analy
s
is
of Real Te
sts
The syste
m
can be fully tested with LF
M signal
stored in ROM.
Paramete
rs o
f
LFM is
listed in Tabl
e 2.
Table 2. LF
M Signal Parameters
Item Signal
T
y
pe
Band(kHz)
Length(mS
)
SampleRate(kHz
)
Amplitude
Value LFM
9-14
25
200
±32767
The results o
b
tained from
FPGA of LF
M sign
al pa
ssed th
rou
gh
band p
a
ss filter, slidi
ng
correl
ation proce
s
sor a
nd low pa
ss filter are sho
w
n in
Figure 7 to Figure 9. And the com
pari
s
o
n
betwe
en FPG
A
result
s and
MATLAB resu
lts is p
r
esen
ted in Figure 10.
Figure 7. Orig
inal LFM an
d results after b
and
pass filter
Figure 8. Sliding co
rrel
at
ion
result
s sim
u
l
a
t
ed
by MATLAB and compute
d
by FPGA
Figure 10 sh
o
w
s the totally system
erro
r in dB after sliding co
rrel
a
tio
n
and low pa
ss filter
comp
ared
with MATLAB. It can b
e
see
n
that t
he m
a
ximum e
rro
r is ap
proximately -80dB
a
fter
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
SOPC Based Multi-Channel Sliding Corr
elation Processing Syste
m
(Xin Liu)
1585
slidin
g correl
ation, and this error maint
a
ins the
sa
m
e
level after low pa
ss filter, so con
c
lu
sion
can b
e
made
that the pre
c
ision of this
system fully sati
sfies the d
e
m
and
s.
Figure 9. Low pass filter
re
sult
s
simulat
e
d by
MATLAB and
compute
d
by FPGA
Figure 10. To
tal erro
r after
slidin
g co
rrelation
and lo
w pa
ss
filter
4. Conclusio
n
The pap
er d
i
scusse
d imp
l
ement of multi-ch
ann
el real time co
rrelation p
r
o
c
essing
system in FP
GA. The advantages of
this design reflect in less re
source usage,
higher utilizati
on
of reso
urce
s
and sy
stem flexibility.
A kind of 8 chan
ne
l 200kSp
s rea
l
time correlat
ion pro
c
e
s
sin
g
sy
st
em b
a
se
d on t
h
is de
sign i
s
su
c
c
e
ssf
ully
imple
m
ented on F
P
GA chip type EP2S90 fro
m
Altera corp. T
he stability is
proved by lake experim
ent.
Ackn
o
w
l
e
dg
ements
The finan
cia
l
supp
ort of
National
Natural Sci
e
n
c
e Fo
und
ation of Chi
n
a
(Grant
No.50
909
029
), Scien
c
e
and Te
ch
nol
ogy on Und
e
rwater A
c
o
u
stic
Labo
ra
tory Foun
dat
ion
9140
C2
0040
6110
C2
001 a
nd 201
0AA09
3901 a
r
e g
r
at
efully ackno
w
ledge
d.
Referen
ces
[1]
W
e
i Li, Ji
ngh
o
ng GUO, Xiao
hu Yo
u. T
he Rese
arch
of M
obil
e
Statio
n F
a
st Cel
l
Searc
h
in W
CDM
A
Sy
s
t
e
m
.
Jia
ngs
u Co
mmu
n
icati
on T
e
chn
o
l
ogy
. 2001; 17: 1-4.
[2]
Don
g
ji
n Z
hu.
Desig
n
a
nd I
m
pleme
n
tai
o
n
of PN C
o
d
e
Acquis
i
tio
n
B
a
sed
on F
P
G
A
.
Inform
ation
Research.
20
1
0
; 36(11): 4
8
-5
0.
[3]
Song
Ha
n, Xi
aoli
Ni
u. Rea
l
-T
ime Digital
Pulse
Compr
e
ssion
of SAR.
Systems E
n
g
i
ne
erin
g a
n
d
Electron
ics.
20
02; 24(6): 5
7
-5
9, 62.
[4]
Yichu
n
Yang,
Chizh
ou Ma, Xiao
don
g Li, Jin
g
T
i
an.
Algorithm stud
y
of fa
st and accurat
e
time-del
a
y
estimatio
n
w
i
th
fine interp
ol
ati
on of correl
a
tio
n
peak.
Acta Acustica.
200
3; 28(2): 15
9-1
6
6
.
[5]
Che
n
g
y
i
ng Lu.
Stud
y
of
T
e
chniq
ue of F
a
st
Ac
quis
i
tioi
n Pseud
o Nois
e Co
de Based o
n
Overlap-S
a
ve
Method and FFT.
Modern Def
ence T
e
ch
no
lo
gy.
2007; 3
5
(4)
:
95-99.
Evaluation Warning : The document was created with Spire.PDF for Python.