DE0-CV User Manual
46
www.terasic.com
May 4, 2015
Figure 5-2 Block diagram of the SDRAM test in Nios II
The system flow is controlled by a program running in Nios II. The Nios II program writes test
patterns into the entire 64MB of SDRAM first before calling the Nios II system function,
alt_dcache_flush_all, to make sure all the data are written to the SDRAM. It then reads data from
the SDRAM for data verification. The program will show the progress in nios-terminal when
writing/reading data to/from the SDRAM. When the verification process reaches 100%, the result
will be displayed in nios-terminal.
D
D
e
e
s
s
i
i
g
g
n
n
T
T
o
o
o
o
l
l
s
s
Quartus II v14.0
Nios II Eclipse v14.0
D
D
e
e
m
m
o
o
n
n
s
s
t
t
r
r
a
a
t
t
i
i
o
o
n
n
S
S
o
o
u
u
r
r
c
c
e
e
C
C
o
o
d
d
e
e
Quartus project directory: DE0_CV_SDRAM_Nios_Test
Nios II Eclipse directory: DE0_CV_SDRAM_Nios_Test \Software
N
N
i
i
o
o
s
s
I
I
I
I
P
P
r
r
o
o
j
j
e
e
c
c
t
t
C
C
o
o
m
m
p
p
i
i
l
l
a
a
t
t
i
i
o
o
n
n
Click “Clean” from the “Project” menu of Nios II Eclipse before compiling the reference design
in Nios II Eclipse.