Double Data Rate I/O (ALTDDIO - IN, ALTDDIO - OUT, and ALTDDIO - BIDIR) IP Cores User Guide
Double Data Rate I/O (ALTDDIO - IN, ALTDDIO - OUT, and ALTDDIO - BIDIR) IP Cores User Guide
Double Data Rate I/O (ALTDDIO - IN, ALTDDIO - OUT, and ALTDDIO - BIDIR) IP Cores User Guide
2015.07.02
UG-DDRMGAFCTN
Subscribe
Send Feedback
The Altera DDR I/O IP cores configure the DDR I/O registers in APEX II, Arria II, Arria V, Cyclone IV,
Cyclone V, HardCopy, Stratix IV, and Stratix V devices.
You can also use these IP cores to implement DDR registers in the logic elements (LEs). In Arria GX,
Stratix series, HardCopy II, HardCopy Stratix, and APEX II devices, the DDR registers are implemented
in the I/O element (IOE). In Cyclone series devices, the IP cores automatically implement the DDR
registers in the LEs closest to the pin. The ALTDDIO_IN IP core implements the interface for DDR
inputs. The ALTDDIO_OUT IP core implements the interface for DDR outputs. The ALTDDIO_BIDIR
IP core implements the interface for bidirectional DDR inputs and outputs.
ALTDDIO Features
The ALTDDIO IP cores implement a DDR interface and offer the following additional features:
The ALTDDIO_IN IP core receives data on both edges of the reference clock
The ALTDDIO_OUT IP core transmits data on both edges of the reference clock
The ALTDDIO_BIDIR IP core transmits and receives data on both edges of the reference clock
Asynchronous clear and asynchronous set input options available
Synchronous clear and synchronous set input options available for Arrix GX and Stratix series devices.
inclock signal to sample the DDR input
outclock signal to register the data output
Clock enable signals
Bidirectional port for the ALTDDIO_BIDIR IP core
An output enable input for the ALTDDIO_OUT and ALTDDIO_BIDIR IP cores
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
UG-DDRMGAFCTN
2015.07.02
The DDR registers interface with DDR SDRAM, DDR2 SDRAM, RLDRAM II, QDR SRAM, and QDRII
SRAM memory devices. You can also use the DDR I/O registers as a SERDES bypass mechanism in LVDS
applications. This section provides information about the following DDR I/O applications:
DDR SDRAM, DDR2 SDRAM, and RLDRAM II memory interfaces
QDR SRAM and QDRII SRAM memory interfaces
High-speed interface applications
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Description
Width: (bits)
Description
Width: (bits)
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
UG-DDRMGAFCTN
2015.07.02
Parameter
Description
Register oe port
Altera Corporation
Description
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Parameter
Description
Width: (bits)
Register oe port
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
UG-DDRMGAFCTN
2015.07.02
Parameter
Description
Input Configuration
When the IOE is configured as an input pin, input registers AI and BI and latch CI implement the input
path for DDR I/O.
Figure 1: Input DDR I/O Path Configuration for a Stratix Series or APEX II Device
This figure shows an IOE configured for DDR inputs for a Stratix series or APEX II device.
DFF
D
INPUT
DFF
datain
D
dataout_h
Input Register AI
Q
neg_reg_out
Input Register BI
TCHLatch
LA
D
Q
ENA
Logic
Array
dataout_l
Latch C I
inclock
Note: On the falling edge of the clock, the negative-edge triggered register BI acquires the first data bit.
On the corresponding rising edge of the clock, the positive-edge triggered register AI acquires the
second data bit. For a successful data transfer to the logic array, the latch CI synchronizes the data
from register BI to the positive edge of the clock.
Altera Corporation
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Output Configuration
VCCIO
To DQS Logic
Block (3)
sclr/spreset
PCI Clamp(4)
VCCIO
Programmable
Pull-Up
Resistor
On-Chip
Termination
Input Pin to
Input RegisterDelay
Input Register
D
clkin
ce_in
ENA
CLRN/PRN
Bus-Hold
Circuit
aclr/apreset
Chip-Wide Reset
Input Register
D
ENA
CLRN/PRN
Latch
D
ENA
CLRN/PRN
Output Configuration
The dedicated output registers for Stratix series and APEX II devices are labeled AO and BO. These
positive-edge triggered registers and a multiplexer are used to implement the output path for DDR I/O.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
UG-DDRMGAFCTN
2015.07.02
Output Configuration
Figure 3: Output DDR I/O Path Configuration for Stratix Series and APEX II Devices
This figure shows the IOE configuration for DDR outputs in Stratix series and APEX II devices.
OE (1)
DFF
D
OE Reg AOE
(2)
OR2
1
0
(3)
DFF
D
Logic Array
OE Reg B OE
datain_l
(4)
DFF
D
Output Reg Ao
DFF
datain_h
outclock
0
1
TRI
(5)
OUTPUT
dataout
Output Reg Bo
1) The OE is active low, but the Quartus II software implements this as active high and automatically adds an inverter before the input to the AOE
register during compilation. If desired, you can change the OE back to active low.
2) Register AOE generates the enable signal for general-purpose DDR I/O applications.
3) This select line corresponds to the delay switch-on by a half clock cycle option in the Parameter Editor.
4) Register BOE generates the delayed enable signal for DDR SDRAM applications.
5) The tri-state is active high by default. However, you can design it to be active low.
On the positive edge of the clock, a high data bit and a low data bit are captured in registers AO and BO.
The outputs of these two registers are fed to the input of a 2-to-1 multiplexer, which uses the output
register clock as its control signal. A high clock selects the data in register BO, and a low level of the clock
selects the data in register AO. This process doubles the data at the I/O pin.
Altera Corporation
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Bidirectional Configuration
IOE_CLK[7..0]
I/O Interconnect
[15..0]
OE Register
D
Q
Output
tZX Delay
clkout
Output
Enable Clock
Enable Delay
Output Clock
Enable Delay
ENA
CLRN/PRN
OE Register
tCO Delay
aclr/prn
VCCIO
Chip-Wide Reset
sclr
OE Register
D
Q
ENA
CLRN/PRN
Logic Array
to Output
Register Delay
Output Register
D
Q
Logic Array
to Output
Register Delay
Output Register
D
Q
ENA
CLRN/PRN
Optional
PCI Clamp
VCCIO
Used for
DDR SDRAM
Output
Pin Delay
Programmable
Pull-Up
Resistor
clk
ENA
CLRN/PRN
Bus-Hold
Circuit
Bidirectional Configuration
Input and output registers are independent of each other, enabling the bidirectional DDR I/O path to be
implemented entirely in the I/O element for Stratix, Stratix GX, and APEX II devices. The bidirectional
configuration includes an input path, an output path, and two output enable registers.
The bidirectional path consists of two data flow paths:
Input path active
Output path active
When the input path is active, the output enable disables the tri-state buffer, which prevents data from
being sent out on the output path. Disabling the tri-state buffer prevents contention at the I/O pin. The
input path behaves like the input configuration as shown in Figure 31 on page 31. When the output
path is active, the output enable register AOE controls the flow of data from the output registers. During
outgoing transactions, the bidirectional configuration behaves like the output configuration as shown in
Figure 33 on page 33. The second output enable register (BOE) is used for DDR SDRAM interfaces. This
negative-edge register extends the high-impedance state of the pin by a half clock cycle. This option is
useful to provide the write preamble for the DQS strobe in the DDR SDRAM interfaces. This feature is
enabled by using the Delay switch-on by a half clock cycle option in the ALTDDIO_BIDIR IP core in the
Quartus II software. You can bypass the input registers and latch to get a combinational output (combout)
from the pin going into the APEX II or Stratix series device. Furthermore, the input data ports
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
10
UG-DDRMGAFCTN
2015.07.02
Bidirectional Configuration
(dataout_h and dataout_l) can be disabled. These features are especially useful for generating data
strobes like DQS.
Figure 5: Bidirectional DDR I/O Path Configuration
This figure shows the bidirectional DDR I/O configuration for Stratix series and APEX II devices.
OE
DFF
(2)
OR2
(4)
DFF
D
datain_l
Logic Array
Q
0
1
Output Register AO
DFF
datain_h
TRI (6)
Output Register BO
outclock
combout
DFF
dataout_h
dataout_l
inclock
LatchTCHLA
Q
D
ENA
Latch C I
Input Register AI
DFF
neg_reg_out
Q
D
Input Register BI
Related Information
Stratix II Architecture
For more information about clock signals and output enable signals for Stratix series
APEX II Programmable Logic Device Family Data Sheet
For more information about clock signals and output enable signals for APEX II devices
Implementing Double Data Rate I/O Signaling in Cyclone Devices
For more information about the DDR registers in Cyclone devices
Altera Corporation
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
11
D0
E0
XX
D1
E1
D0
D2
D3
E2
D1
D2
D3
dataout_l
XX
D0
D1
D2
dataout_h
XX
E0
E1
E2
This figure shows a functional timing waveform example for the output path with the output enable
registered. In this example, the delay switch-on by a half clock cycle is not turned on, so the second
output enable register (BOE) is not used. The output enable signal OE is active high and can be driven
from a pin or internal logic. The data signals datain_l and datain_h are driven from the logic array to
output registers AO and BO. The dataout signal is the output from the DDR circuitry to the pin.
Figure 7: DDR I/O Output Timing Waveform
outclock
OE
datain_h
XX
D0
D1
D2
D3
XX
datain_l
XX
E0
E1
E2
E3
XX
dataout
ZZ
D0
E0
D1
E1
D2
E2
D3
E3
ZZ
The waveform in this figure reflects the software simulation results. The OE signal is active low in silicon;
however, the Quartus II software implements this as active high and automatically adds an inverter before
the D input of the OE register AOE. You can change the OE back to active low, if desired.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
12
UG-DDRMGAFCTN
2015.07.02
1.
2.
3.
4.
2a
Altera Corporation
Parameter
Value
Stratix
VHDL
alt_bid
Turned off
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Parameter
Editor Page
Parameter
13
Value
Stratix IV
Match project/default
Turned on
Width: (bits)
Turned off
Turned off
Not used
Turned on
Turned off
Turned off
Turned off
Not used
Turned on
Turned off
Turned off
Turned on
Turned off
Register oe port
Turned off
Turned off
Turned off
Turned off
Turned on
Turned off
Generate netlist
Turned off
Variation file
Turned on
Quartus II IP file
Turned on
Turned off
Turned on
Turned on
Turned off
Turned on
Turned on
6. Click Finish.
The ALTDDIO_BIDIR module is now built.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
14
UG-DDRMGAFCTN
2015.07.02
Related Information
2a
Parameter
Value
Which megafunction
would you like to
customize
Stratix
lp_div
Turned off
Stratix IV
Match project/default
Turned on
Altera Corporation
Numerator Representa
tion
Select Unsigned
Denominator Represen
tation
Select Unsigned
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Create a Divider
Parameter
15
Value
Create an Asynchronous
Clear input
Turned off
Turned off
Select Yes
Generate netlist
Turned off
Variation file
Turned on
Quartus II IP file
Turned on
Turned off
Instantiation template
file
Turned on
Turned on
Turned off
VHDL component
declaration file (.cmp)
Turned on
Turned on
4. Click Finish.
The lpm_divide module is now built.
Create a Divider
Use the following steps to combine the ALTDDIO_BIDIR and lpm_divide modules to create a divider.
Follow these steps to create a top-level VHDL file:
1.
2.
3.
4.
5.
In the Quartus II software, with the ex2.qar project open, open the file ex2.vhd.
On the Project menu, click Add/Remove File in Project. The File Settings page displays.
In the File Settings window, click (...) after File name and browse for ex2.vhd in the project folder.
Select ex2.vhd and click Add.
Click OK.
The top-level file is added to the project. You have now created the complete design file.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
16
UG-DDRMGAFCTN
2015.07.02
This design implements the same divider as that in Design Example 1, but the functionality of the
ALTDDIO_IN and ALTDDIO_OUT modules is implemented in a single megafunction, ALTDDIO_BIDIR.
The bidirectional pins DDR_BIDIR8[7..0] receive data at double the clock rate. The
DDRBIDIR8_OUT_H[7..0] signals are the numerator and the DDRBIDIR8_OUT_L[7..0] signals are the
denominator. These two sets of signals are passed to the lpm_divide module where the quotient and
remainder are calculated. The divider calculates the quotient and remainder with a one-stage pipeline.
The quotient and remainder are then fed via signals quotient[7..0] and remain[7..0] back to the
ALTDDIO_BIDIR megafunction. The ALTDDIO_BIDIR megafunction then drives the data out
through pins DDR_BIDIR8[7..0] at double the data rate.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
17
Related Information
dataout_h[ ]
inclock
dataout_l[ ]
inclocken
aclr
aset
(1)
Name
Require
d
datain[]
Yes
DDR input data port. Input port WIDTH wide. The datain port should be directly
fed from an input pin in the top-level design.
inclock
Yes
Clock signal to sample the DDR input. The datain port is sampled on each clock
edge of the inclock signal.
inclocken
No
aclr
No
Asynchronous clear input. The aclr and aset ports cannot be connected at the
same time.
aset
No
Asynchronous set input. The aclr and aset ports cannot be connected at the
same time.
sclr
No
Synchronous clear input. The sclr and sset ports cannot be connected at the
same time. The sclr port is available for Arria GX, Stratix III, Stratix II,
Stratix II GX, Stratix, Stratix GX, HardCopy II, and HardCopy Stratix devices
only. (1)
Description
When designing with Stratix III devices, when sclr is asserted, it synchronously presets both the input
path and resynchronization register.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
18
UG-DDRMGAFCTN
2015.07.02
Name
sset
Require
d
No
Description
Synchronous set input. The sclr and sset ports cannot be connected at the
same time. The sset port is available for Arria GX, Stratix III, Stratix II,
Stratix II GX, Stratix, Stratix GX, HardCopy II, and HardCopy Stratix devices
only. (1)
Require
d
Description
dataout_h[]
Yes
Data sampled from datain[] port at the rising edge of the inclock signal.
dataout_l[]
Yes
Data sampled from datain[] port at the falling edge of the inclock signal.
dataout[ ]
These tables list the input and output ports for the ALTDDIO_OUT IP core.
Table 6: ALTDDIO_OUT Input Ports
Name
Required
Description
datain_h[]
Yes
datain_l[]
Yes
outclock
Yes
outclocken
No
aclr
No
aset
No
Altera Corporation
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Name
Required
19
Description
oe
No
sclr
No
sset
No
Required
Description
dataout[]
Yes
oe_out
No
dataout_h[ ]
dataout_l[ ]
padio[ ]
combout[ ]
dqsundelayedout[ ]
These tables list the output ports and the bidirectional ports for the ALTDDIO_BIDIR IP core.
Table 8: ALTDDIO_BIDIR Input Ports
Name
datain_h[]
Required
Yes
Description
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
20
UG-DDRMGAFCTN
2015.07.02
Name
Required
Description
datain_l[]
Yes
inclock
Yes
inclocken
No
outclock
Yes
outclocken
No
aclr
No
aset
No
oe
No
sclr
No
sset
No
(2)
(3)
(4)
Required
Description
dataout_h[]
Yes
dataout_l[]
Yes
combout[](1)
No
dqsundelayedout[]
No
When designing with Stratix III devices, when sclr is deasserted, it synchronously presents both the
input path and resynchronization register.
This port is available for Stratix series, HardCopy Stratix, Cyclone series, and APEX II devices only.
This port is available for Stratix and HardCopy Stratix devices only.
Altera Corporation
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
UG-DDRMGAFCTN
2015.07.02
Name
Required
No
oe_out
21
Description
Required
Yes
padio[]
Description
Version
Changes
July 2015
2015.07.02
January 2015
2015.01.23
December 2014
2014.12.15
Template update.
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback
Altera Corporation
22
UG-DDRMGAFCTN
2015.07.02
Date
Version
Changes
January 2013
6.1
February 2012
6.0
September 2010
5.0
June 2007
4.2
March 2007
4.1
July 2006
4.0
March 2005
3.0
December 2004
2.0
Altera Corporation
Double Data Rate I/O (ALTDDIO_IN, ALTDDIO_OUT, and ALTDDIO_BIDIR) IP Cores User Guide
Send Feedback