|
Memory speed is a crucial component of
system performance. Currently, the most
common form of memory used is synchronous
dynamic random access memory
(SDRAM).
The late 1990s saw major jumps in
SDRAM memory speeds and technology
because systems required faster performance
and larger data storage capabilities.
By 2002, double-data-rate (DDR)
SDRAM became the standard to meet
this ever-growing demand, with
DDR266 (initially), DDR333, and
recently DDR400 speeds.
DDR SDRAM is an evolutionary
extension of “single-data-rate” SDRAM
and provides the benefits of higher speed,
reduced power, and higher density components.
Data is clocked into or out of the
device on both the rising and falling edges
of the clock. Control signals, however, still
change only on the rising clock edge.
DDR memory is used in a wide range
of systems and platforms and is the computing
memory of choice. You can use
Xilinx® Spartan™-3 devices to implement
a custom DDR memory controller on
your board.
Interfacing Spartan-3
Devices with DDR SDRAMs
Spartan-3 platform FPGAs offer an ideal
connectivity solution for low-cost systems,
providing the system-level building blocks
necessary to successfully interface to the
latest generation of DDR memories.
Included in all Spartan-3 FPGA
input/output blocks (IOB) are three pairs
of storage elements. The storage-element
pair on either the output path or the threestate
path can be used together with a special
multiplexer to produce DDR
transmission. This is accomplished by taking
data synchronized to the clock signal’s
rising edge and converting it to bits synchronized
on both the rising and falling
edge. The combination of two registers and
a multiplexer is referred to as double-datarate
D-type flip-flop (FDDR).
Memory Controllers Made Fast and Easy
Xilinx has created many tools to get designers
quickly through the process of building
and testing memory controllers for Spartan
devices. These tools include reference
designs and application notes, the Memory
Interface Generator (MIG), and more
recently, a hardware test platform.
Xilinx application note XAPP454,
“DDR2 SDRAM Memory Interface for
Spartan-3 FPGAs,” describes the use of a
Spartan-3 FPGA as a memory controller,
with particular focus on interfacing to a
Micron MT46v32M16TG-6T DDR
SDRAM. This and other application notes
illustrate the theory of operations, key challenges,
and implementations of a Spartan-3 FPGA-based memory controller.
DDR memories use non-free-running
strobes and edge-aligned read data
(Figure 1). For 333 Mbps data speeds, the
memory strobe must be used for higher
margins. Using local clocking resources, a
To maximize resources within the FPGA,
you can explore design techniques such as
using the LUTs as RAMs for data capture –
while at the same time minimizing the use
of global clock buffers (BUFGs) and digital
clock managers (DCMs) – as explained in
the Xilinx application notes. Results are
given with respect to the maximum data
width per FPGA side for either right and left
or top and bottom
implementations.
Implementation challenges
such as these are
mitigated with the
new Memory Interface
Generator.
Xilinx created the
Memory Interface
Generator (MIG 007)
to take the guesswork
out of designing your
own controller. To create
the interface, the
tool requires you to
input data including
FPGA device, frequency,
data width, and
banks to use. The interactive
GUI (Figure 2)
generates the RTL,
EDIF, SDC, UCF, and
related document files.
As an example, we
created a DDR 64-bit
interface for a Spartan
XC3S1500-5FG676 using MIG. The results in Table 1 show
that the implementation would use 17% of
the slices, leaving more than 80% of the
device free for data-processing functions.
Table 1 – Device utilization for a DDR 64-bit interface in an XC3S1500 FPGA
|
Feature | Utilization | Percent Used |
| Number of Slices | 2,277 out of 13,312 | 17% |
| Number of DCMs | 1 out of 4 | 25% |
| Number of External IOBs | 147 out of 487 | 30% |
Testing Out Your Designs
The last sequence in a design is the verification
and debug in actual hardware.
After using MIG 007 to create your customized
memory controller, you can
implement your design on the Spartan-3
Memory Development Kit, HW-S3-SL361, as shown in Figure 3. The $995
kit is based on a Spartan-3 1.5M-gate
FPGA (the XC3S1500) and includes
additional features such as:
- 64 MB of DDR SDRAM Micron
MT5VDDT1672HG-335, with an
additional 128 MB DDR SDRAM
DIMM for future expansion
- Two-line LCD
- 166 MHz oscillator
- Rotary switches
- Universal power supply 85V-240V, 50-60 MHz
Conclusion
With the popularity of DDR memory
increasing in system designs, it is only natural
that designers use Spartan-3 FPGAs as
memory controllers. Implementing the
controller need not be difficult.
For more information about the application
notes, GUI, and development board,
please visit www.xilinx.com/products/design_resources/mem_corner/index.htm.
delayed strobe can be centered in the data
window for data capture.
Printable PDF version of this article with graphics. (4/18/05) 220 KB |