Example Project Walkthrough
Page 47
© November 2008
Altera Corporation
AN 436: Using DDR3 SDRAM in Stratix III and Stratix IV Devices
'define sg25
'define x8
The two define statements prepare the DDR3 SDRAM interface model.
The first statement specifies the memory device speed grade as –25. The second
statement specifies the memory device width per DQS.
3. Open the testbench in a text editor, instantiate the downloaded memory model,
and connect its signals to the rest of the design.
4. Delete the
START
and
END
MEGAWIZARD
comments to ensure the MegaWizard
Plug-In Manager does not overwrite the changes when the controller is
regenerated.
Run Simulation with NativeLink
To run the simulation with NativeLink, follow these steps:
1. On the Assignments menu, point to
EDA Tool Settings
and click
Simulation
.
2. In the
Category
list expand
EDA Tool Settings
and click
Simulation
.
3. Under
Tool Name
, select a simulator.
4. In
NativeLink
settings, select
Compile test bench
and click
Test Benches
.
5. Click
New
.
6. Enter a name for the
Test bench name
.
7. Enter the name of the automatically generated testbench, <
variation
name
>
_example_top_tb
, in
Top level module in test bench
.
8. Enter the name of the top-level instance in Design instance in test bench.
9. Under
Simulation period
, set
End simulation
to 100
μ
s.
10. Add the testbench files and automatically-generated memory model files. In the
File name field browse to the location of the memory model and the testbench,
click
Open
and then click
Add
. The testbench is <
variation
name
>
_example_top_tb.v
; memory model is <
variation name
>
_mem_model.v
.
11. In the
New Testbench Settings
dialog box, click
OK
.
12. Click
OK
.
13. 13. On the Processing menu point to
Start
and click
Start Analysis and
Elaboration.
14. On the Tools menu, point to
EDA Simulation Tool
and click
Run EDA RTL
Simulation
. This step creates the
\simulation
directory in your project directory
and a script that compiles all necessary files and runs the simulation.
f
For example waveforms, refer to the
DDR3 SDRAM High-Performance Controller User
Compile Design and Verify Timing
To compile the design, on the Processing menu, click
Start Compilation
.