DDR3 Demo For The ECP5™ and ECP5-5G™ Versa Development Boards User Guide
DDR3 Demo For The ECP5™ and ECP5-5G™ Versa Development Boards User Guide
Introduction
This document provides technical information and instructions for using the ECP5™ and ECP5-5G™ DDR3 demo
design. This demo design demonstrates the functionality of the Lattice DDR3 IP operating core at a speed of 400
MHz and 800 Mbps using the ECP5 Versa Development Board and the ECP5-5G Versa Development Board. This
document provides a circuit description of the demo logic as well as instructions for running the DDR3 demo.
The ECP5/ECP5-5G Versa Development Board has an on-board 16-bit DDR3 SDRAM. The demo design gener-
ates 16-bit test data, and writes it to the onboard DDR3 SDRAM. The design reads the DDR3 SDRAM data and
compares it with original expected data. When there is a mismatch between the standard and read data, the design
will flag an error signal. The demo design also allows the user to run the design with different parameters using on-
board DIP switches.
2
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
Further sections describe the sub-modules in the user logic design in detail. Figure 2 illustrates a block diagram of
the demo design.
3
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
ECP5 DDR_ulogic
Command Generator
(State Machine)
DDR3 Memory
Controller
Local User
Address Generator
Interface
DDR3
Inteface
On-Board
DDR3
Write Data Generator
SDRAM
5-Bit DIP Switch
User Logic
The user logic implemented in the DDR3 demo design provides the following functions:
• Command Generation State machine programs the mode registers and controls DDR3 read and write operations
• Address generation
• Write data generation
• Read data validation
• Control and observation
4
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
repeated up to 32 times in the same way as the write command sequence. The read command sequence that fol-
lows the write command sequence always includes the same number of commands as the write command
sequence. The state machine makes sure that both the write and the following read command sequences are
always the same even when the user test configuration is changed at any time during the command sequences.
This allows the DDR3 demo to be dynamically reconfigurable.
Address Generation
The address generation block provides the start address for the current user read/write command which is gener-
ated by the state machine. When the burst command mode is enabled, the address generation block automatically
calculates the next address according to the demo control input.
DDR3 Memory
The ECP5/ECP5-5G Versa Development Board has on-board 16-bit DDR3 memory. The DDR3 memory module
on the board that is used for the DDR3 demo is a 96-pin unbuffered DDR3 SDRAM. The demo design uses up to
1GB of memory space with one chip select configuration.
5
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
Table 2 lists all the interfaces which are available to the user to either dynamically configure the parameters of the
design (input mode) or observe the running status of the demo (output mode).
6
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
7
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
Table 5 indicates the status of all LEDs during successful operation of the demo.
8
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
The subfolder ddr3_ecp5_impl is the implementation folder for ECP5 Versa Development Kit and
ddr3_ecp5_5G_impl is the implementation folder for ECP5-5G Versa Development Kit. The subfolder src contains
all the source files other than IP core. The subfolder ddr3_ip_inst is the generated IP core using Clarity Designer.
2. Power up the board with 12 V power supply. Connect the board to a PC with a USB cable.
3. Launch the Diamond Programmer software.
Figure 4. Getting Started
9
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
4. If the device is not detected, scan the JTAG chain by selecting the Scan button.
5. Select the LFE5UM-45F device.
Figure 5. Selecting the Device
6. Select Fast Program and the bitstream DDR3_demo\bitstream\ddr3_ecp5.bit to be programmed then start
programming.
7. Programming the Device
Figure 6. Device Properties
Status LEDs on the board should be illuminated or blinking once the FPGA programming is completed.
10
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
8. Refer to Table 5 to verify whether LEDs are blinking as mentioned. If the red LED-D26 (Error) blinks and all
segments of 14-segment display blink together, press the GSRN button (SW1) to clear the error counter and
reset the design.
Table 5. Expected LED Status from Successful Demo
Name Expected Status Remark
D23 Rotating clockwise and Character “0” pulse rate is about 45 beats per second with
(Segment LED) character “0” pulse SW3 all OFF position
D25 Blink Yellow LED with constant blinking rate
D24 Blink Yellow LED
D22 Blink Green LED
D21 OFF
D26 OFF
D27 ON Red LED
D28 ON Red LED
D29 ON Red LED
11
DDR3 Demo for the ECP5 and ECP5-5G
Versa Development Boards
1. The ECP5 pinout with respect to the on-board DIP switches and LEDs has been updated for Revision B of the
hardware. Specifically the SEG1 assignment in the demo project is location L18 for Revision B. SEG1 is
assigned to location L19 for Revision A.
2. The demo bitstreams have been built with Diamond 3.8 for use with Revision B of the ECP5 Versa Develop-
ment Board. The demo project must be rebuilt with Diamond 3.4 for use with Revision A.
References
The following documents provide more information:
Revision History
Date Version Change Summary
October 2016 1.2 Document title changed to DDR3 Demo for the ECP5™ and ECP5-
5G™ Versa Development Boards User Guide.
Added support for ECP5-5G Versa Development Board.
Updated the demo package directory structure.
Updated Diamond version to 3.8.
Added EB103 to References section.
August 2015 1.1 Added support for ECP5 Versa Development Board Rev B.
Updated Technical Support Assistance section.
April 2015 1.0 Initial release.
© 2016 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as
listed at www.latticesemi.com/legal. All other brand or product names are trademarks or registered trademarks of
their respective holders. The specifications and information herein are subject to change without notice.
12