Professional Documents
Culture Documents
I/O Buffer Megafunction (ALTIOBUF) User Guide
I/O Buffer Megafunction (ALTIOBUF) User Guide
User Guide
UG-01024-1.0
ii Altera Corporation
I/O Buffer Megafunction (ALTIOBUF) User GuidePreliminary November 2007
Contents
Chapter 3. Specifications
Ports and Parameters ............................................................................................................................ 3–1
iv Altera Corporation
I/O Buffer Megafunction (ALTIOBUF)
About this User Guide
Revision History The following table displays the revision history for the chapters in this
user guide.
Date and
Changes Made Summary
Document Version
November 2007 Initial Release
v1.0
How to Contact For the most up-to-date information about Altera products, refer to the
following table.
Altera
Contact
Contact (1) Address
Method
Technical Support Website www.altera.com/mysupport/
Technical training Website www.altera.com/training
Email custrain@altera.com
Product literature Website www.altera.com/literature
Altera literature services Email literature@altera.com
Non-technical support(General) Email nacomp@altera.com
(Software Licensing) Email authorization@altera.com
Note to table:
(1) You can also contact your local Altera sales office or sales representative.
Altera Corporation v
November 2007 I/O Buffer Megafunction (ALTIOBUF) User Guide
Typographic Conventions
Conventions
Variable names are enclosed in angle brackets (< >) and shown in italic type.
Example: <file name>, <project name>.pof file.
Initial Capital Letters Keyboard keys and menu names are shown with initial capital letters. Examples:
Delete key, the Options menu.
“Subheading Title” References to sections within a document and titles of on-line help topics are
shown in quotation marks. Example: “Typographic Conventions.”
Courier type Signal and port names are shown in lowercase Courier type. Examples: data1,
tdi, input. Active-low signals are denoted by suffix n, for example, resetn.
Anything that must be typed exactly as it appears is shown in Courier type. For
example: c:\qdesigns\tutorial\chiptrip.gdf. Also, sections of an
actual file, such as a Report File, references to parts of files (for example, the
AHDL keyword SUBDESIGN), as well as logic function names (for example, TRI)
are shown in Courier.
1., 2., 3., and Numbered steps are used in a list of items when the sequence of the Items is
a., b., c., etc. important, such as the steps listed in a procedure.
■ ● • Bullets are used in a list of items when the sequence of the items is not important.
v The checkmark indicates a procedure that consists of one step only.
1 The hand points to information that requires special attention.
A caution calls attention to a condition or possible situation that can damage or
c
destroy the product or the user’s work.
A warning calls attention to a condition or possible situation that can cause injury
w
to the user.
r The angled arrow indicates you should press the Enter key.
f The feet direct you to more information about a particular topic.
vi Altera Corporation
I/O Buffer Megafunction (ALTIOBUF) User Guide November 2007
1. About this Megafunction
Device Family The ALTIOBUF supports the following target Altera® device families:
All paths share a similar configuration, in which the delay cells are
getting their delay control signal from the IO_CONFIG component. For
the input path, IO_CONFIG’s PADTOINPUTREGISTERDELAYSETTING
output port drives DELAY_CHAIN’s (input delay cell) DELAYCTRLIN
input port. For the output and oe path, use IO_CONFIG’s
OUTPUTDELAYSETTING 1 and 2 output ports to drive the DELAYCTRLIN
port of the first and second output delay cells, respectively.
Figure 1–1. Sample ALTIOBUF (Input Buffer Mode) Architecture when NUMBER_OF_CHANNELS = 2
ibufa_1
datain[1..0] I input_dyn_delay_chaina_1
datain_b[1..0] IBAR O DATAIN
DELAYCTRLIN[3..0] DATAOUT
STRATIXIII_IO_IBUF STRATIXIII_DELAY_CHAIN
ioconfiga_1
DATAIN
CLK
PADTOINPUTREGISTERDELAYSETTING[3..0]
ENA
UPDATE
STRATIXIII_IO_CONFIG
ibufa_0
I input_dyn_delay_chaina_0
IBAR O DATAIN
DELAYCTRLIN[3..0] DATAOUT dataout[1..0]
STRATIXIII_IO_IBUF STRATIXIII_DELAY_CHAIN
ioconfiga_0
io_config_datain DATAIN
io_config_clk CLK
PADTOINPUTREGISTERDELAYSETTING[3..0]
io_config_clkena[1..0] ENA
io_config_update UPDATE
STRATIXIII_IO_CONFIG
Input Buffer
The input buffer megafunction uses the input path of the dynamic delay
chain. The datain and datain_b input ports of the ALTIOBUF (input
buffer mode) megafunction connect to the i and ibar (if differential
mode enabled) ports of the input buffer, respectively. In the input path,
the value of the input buffer’s dataout port is passed into the input
delay chain. The dataout port of the ALTIOBUF (input buffer mode)
megafunction is the output of the dataout delay chain.
ibufa_0
datain[0..0] I O
STRATIXIII_IO_IBUF
ioconfiga_0 input_dyn_delay_chaina_0
io_config_datain DATAIN DATAIN
io_config_clk CLK PADTOINPUTREGISTERDELAYSETTING[3..0] DELAYCTRLIN[3..0] DATAOUT dataout[0..0]
io_config_clkena[0..0] ENA STRATIXIII_DELAY_CHAIN
io_config_update UPDATE
STRATIXIII_IO_CONFIG
Figure 1–3. ALTIOBUF (Input Buffer Mode) Megafunction Connected to the External Flipflop
inddc01_w1:altiobuf_in
Output Buffer
The ALTIOBUF (output buffer mode) megafunction uses the output and
oe path of the dynamic delay chain, where both share the same
IO_CONFIG settings.
Contrary to the input path in the output and oe paths, users can add two
optional registers, which are external to the megafunction. One is for
output path and the other is for the oe (output enable) path.
Instead of connecting the input data to the datain port of the ALTIOBUF
(output buffer mode) megafunction, it is connected to the input of the
registers that are external to the megafunction. The output of the register
is then driven to the datain port of the first output delay chain port. In
a similar way, the inverted input oe is connected to the oe register that is
external to the megafunction, which drives the datain port of the first oe
delay chain port. Figure 1–4 shows how to connect the output and oe
registers to the ALTIOBUF megafunction.
Figure 1–4. ALTIOBUF (Output Buffer Mode) Megafunction Connected with the External Flipflops
tc_out01:altiobuf_out
io_config_clk io_config_clk
output_ff io_config_datain
PRN io_config_update dataout[0..0] dataout
datain D Q datain[0..0]
outffclk io_config_clkena[0..0]
ENA oe[0..0]
CLR
oe_ff
PRN
oe D Q
ENA
CLR
io_config_clkena
io_config_datain
io_config_update
Each of the output and oe delay chains are built from two cascaded
output delay chains. The first output delay chain’s dataout is connected
to the second output delay chain’s datain. Depending on the parameter
chosen (use_out_dynamic_delay_chain1 or
use_out_dynamic_delay_chain2), one or both of the output delay
chains can be dynamic. In this megafunction, users can set the delay only
for the dynamic delay chains.
Bidirectional Buffer
The bidirectional buffer essentially combines the input buffer and the
output buffer, incorporating the input path, output path, and oe path. By
combining the input and output buffers, the output path and the oe path
are placed before the buffer and the input path is placed after the buffer,
as illustrated in Figure 1–6.
Figure 1–7. ALTIOBUF (Bidirectional Buffer Mode) Megafunction Connected with External Flipflops
tc_bidir_01:altiobuf_bidir
oe_ff
PRN
oe D Q
ENA
CLR
dataio
io_config_clkena
io_config_datain
io_config_update
inffclk
Minimum Maximum
Available Step Value (ps)
Delay Chain Type (1) Settings Delay Settings Delay
Settings (4)
Value (ps) (5) Value (ps) (5)
Input Delay Chain (D1) (7) 16 (2) 50 ps 0 ps 750 ps
Output Delay Chain 1 (D5) (6), (7) 16 (2) 50 ps 0 ps 750 ps
Minimum Maximum
Available Step Value (ps)
Delay Chain Type (1) Settings Delay Settings Delay
Settings (4)
Value (ps) (5) Value (ps) (5)
Output Delay Chain 2 (D6) (6), (7) 8 (3) 50 ps 0 ps 350 ps
To allow this particular design to be fit, add the following line in the
Quartus Setting File (.qsf):
You can also use the Assignment Editor, as shown in Figure 1–9, and set
the column fields as shown in Table 1–2.
Column Setting
From u2|test_output_iobuffer_iobuf_out_kk21:test_output_iobuffer_iobuf_
out_kk21_component|obufa_0
To u2|test_output_iobuffer_iobuf_out_kk21:test_output_iobuffer_iobuf_
out_kk21_component|obufa_0
Assignment MEMORY_INTERFACE_DATA_PIN_GROUP
Name
Value 4
Enable Yes
The design example associated with this user guide has this assignment.
Common The I/O buffers have standard capabilities such as bus-hold circuitry,
differential mode, open-drain output and output enable port.
Applications
f For details about these featured applications, refer to the Stratix III Device
I/O Feature chapter in the Stratix III Device Handbook or the Cyclone III
Device I/O Feature chapter in the Cyclone III Device Handbook.
One of the key applications for this megafunction is to have more direct
termination control of the buffers. By enabling series and parallel
termination control ports for I/O output buffers and I/O bidirectional
buffers, you can connect these ports to the ALTOCT megafunction to
enable dynamic calibration for on-chip termination. For more
information, refer to the ALTOCT Megafunction User Guide, the Stratix III
Device I/O Feature chapter in the Stratix III Device Handbook, or the
Cyclone III Device I/O Feature chapter in the Cyclone III Device Handbook.
Another key application for this megafunction is for dynamic delay chain
in the I/O buffer. Dynamic I/O delay allows implementing automatic
deskew, especially for memory interfaces, such as DDR3, which is
handled by the memory interface IP. You should dynamically deskew and
not calculate manually because a lot of the skew can come from the I/O
buffers of either the FPGA or the other device the FPGA is interfacing (for
example, memory). Even if the trace lengths are matched, there can still
be electrical skew in the system. Also, this skew changes and can change
from device to device. Having the ability to deskew from the fabric allows
you to remove uncertainties that would have to be considered in the
timing budget. This enables you to gain more timing margin, which
allows higher frequencies. Figure 1–10 shows an example.
For example, if the input (or output) bus signals are DQ[0] and DQ[1],
board trace skew, transmitter device skew, or even FPGA package skew
could cause signals that were initially aligned to become misaligned. The
third waveform shows the window available to the receiver for capturing
the data. If DQ[0] was delayed a bit to match DQ[1], a wider window
would become available to the receiver.
Resource For details about the resource utilization of the ALTIOBUF (input buffer
mode, output buffer mode, or bidirectional buffer mode) megafunction in
Utilization and various devices, and the performance of devices that include these
Performance megafunctions, refer to the MegaWizard® Plug-In Manager and the
compilation reports for each device.
System The instructions in this section require the following hardware and
software:
Requirements
■ Quartus® II software
■ Refer to the following:
www.altera.com/support/software/os_support/oss-index.html for
operating system support information
MegaWizard The MegaWizard® Plug-In Manager creates or modifies design files that
contain custom megafunction variations that can then be instantiated in a
Plug-In Manager design file. The MegaWizard Plug-In Manager provides a wizard that
Customization allows you to specify options for the ALTIOBUF megafunction. You can
use the wizard to set the ALTIOBUF megafunction features in the design.
Start the MegaWizard Plug-In Manager using one of the following
methods:
Figure 2–3. MegaWizard Plug-In Manager - ALTIOBUF [Page 3 of 5], as an Input Buffer
Figure 2–4. MegaWizard Plug-In Manager - ALTIOBUF [page 3 of 6], as an Output Buffer
Figure 2–5. MegaWizard Plug-In Manager - ALTIOBUF [page 3 of 6], as a Bidirectional Buffer
Function Description
Currently selected Specify the device family you want to use. Options are Stratix III or Cyclone III.
device family:
How do you want to Specify whether it is an input buffer, output buffer, or bidirectional buffer.
configure this
module?
What is the number Specify the number of buffers to be used. This defines the size of the buffer.
of buffers to be
instantiated?
Use bus hold If enabled, the bus-hold circuitry can weakly hold the signal on an I/O pin at its
circuitry? last-driven state. Available in Stratix III and Cyclone III devices. Available in input buffer,
output buffer, or bidirectional buffer.
Function Description
Use differential If enabled, datain /datain_b is used for input buffers, both dataout/dataout_b
mode? are used for output buffers, and both dataio/dataio_b are used for bidirectional
buffers. For Stratix III devices, differential mode is available for input buffers, output
buffers, and bidirectional buffers. For Cyclone III devices, no differential mode option is
available.
Use open drain If enabled, the open drain output enables the device to provide system-level control
output? signals (for example, interrupt and write-enable signals) that can be asserted by multiple
devices in your system. For Stratix III and Cyclone III devices, this option is available for
output buffers and bidirectional buffers, but not for input buffers.
Use output enable If enabled, there will be a port used to control when the output is enabled. For Stratix III
port? and Cyclone III devices, this option is available for output buffers and bidirectional
buffers, but not for input buffers.
Use dynamic If enabled, this port receives the command to select either Rs code (when input value
termination control? = low) or Rt code (when input value = high) from the core. Rt should only be enabled
when the bi-directional I/O is receiving input. Otherwise, it should be disabled so that
the output performance and power dissipation is optimal. Available only for Stratix III
device bidirectional buffers. Not available in Cyclone III devices.
For more information about the dynamic chain, refer to “I/O Buffer and
Dynamic Delay Integration” on page 1–1.
Function Description
Enable input buffer If enabled, the input or bidirectional buffer incorporates the user-driven dynamic delay
dynamic delay chain chain in the megafunction; that is, the IO_CONFIG and the input delay cell. Additional
input ports are enabled: io_config_clk, io_config_clkena,
io_config_update, and io_config_datain. Only applies to Stratix III
devices. Does not apply to Cyclone III devices.
Enable output buffer If enabled, the output or bidirectional buffer incorporates the user-driven dynamic
dynamic delay chain 1 delay chain in the megafunction; that is, the IO_CONFIG and the first output delay cell.
Additional input ports are enabled: io_config_clk, io_config_clkena,
io_config_update, and io_config_datain. Only applies to Stratix III
devices. Does not apply to Cyclone III devices.
Enable output buffer If enabled, the output buffer or bidirectional buffer incorporates a user-driven dynamic
dynamic delay chain 2 delay chain in the megafunction; that is, the IO_CONFIG and the second output delay
cell. Additional input ports are enabled: io_config_clk, io_config_clkena,
io_config_update, and io_config_datain. Only applies to Stratix III
devices. Does not apply to Cyclone III devices.
Create a clkena port If enabled, there will be a port used to control when the configuration clock is enabled.
Applies only to Stratix III devices.
Page 5 lists the simulation model files needed to simulate the generated
design files (Figure 2–4 on page 2–4). On this page, you can enable the
Quartus II software to generate a synthesis area and timing estimation
netlist for this megafunction for use by third-party tools.
f For more information about the ports and parameters for this
megafunction, refer to the Chapter 3, Specifications.
Instantiating When you use the MegaWizard Plug-In Manager to customize and
parameterize a megafunction, it creates a set of output files that allow you
Megafunctions to instantiate the customized function in your design. Depending on the
in HDL Code language you choose in the MegaWizard Plug-In Manager, the wizard
instantiates the megafunction with the correct parameter values and
generates a megafunction variation file (wrapper file) in Verilog HDL (.v),
VHDL (.vhd), or AHDL (.tdf), along with other supporting files.
Quartus II Simulation
You can perform functional and timing simulations with the Quartus II
Simulator. Functional simulation enables you to verify the logical
operation of your design without taking into consideration the timing
delays in the FPGA. This simulation is performed using only your RTL
code. When performing a functional simulation, add only signals that
exist before synthesis. You can find these signals with the Registers:
Pre-Synthesis, Design Entry, or Pin filters in the Node Finder. The
top-level ports of megafunctions are found using these three filters.
EDA Simulation
Depending on your preferred simulation tool, refer to the appropriate
chapter in the Simulation section in volume 3 of the Quartus II Handbook.
The Quartus II Handbook chapters describe how to perform functional and
gate-level timing simulations that include the megafunctions, with
details about the files that are needed and the directories where the files
are located.
Design Example This section presents a design example that uses the ALTIOBUF
megafunction to configure the delay chains dynamically for the Stratix III
1: Dynamically device during user mode. This example compiles the megafunction as an
Changing Delay output buffer and the circuitry is in Technology Map Viewer. You can
analyze the behavior of the dynamic delay chains with ModelSim-Altera.
Chains in Output
Buffer of Design Files
Stratix III The design example files are available in the User Guides section on the
Literature page of the Altera website at www.altera.com.
Example
In this example, you will complete the following tasks:
5. For Which device family will you be using?, select Stratix III.
7. For Which type of output file do you want to create?, select Verilog
HDL.
Option
Option Selection
Section
— Currently selected device family Stratix III
Module How do you want to configure this As an output
module? buffer
Configuration What is the number of buffers to be 1
instantiated?
Use bus hold circuitry Not selected
Use differential mode Not selected
Use open drain output Not selected
Use output enable port Selected
Use dynamic termination control Not selected
Use series and parallel termination control Not selected
Option Selection
Enable input buffer dynamic delay chain Not selected
Enable output buffer dynamic delay chain 1 Selected
Enable output buffer dynamic delay chain 2 Selected
Create a clkena port Selected
13. This shows the EDA tab. Click Next. Page 6 appears.
Figure 2–9. Viewing the Design via the Technology Map Viewer
When dynamic delay chains are enabled, two key primitives are used
together with the IO_OBUF (output buffer) primitive. They are the
IO_CONFIG primitive and the DELAY_CHAIN primitive. The IO_CONFIG
primitive functions to control the configuration of the necessary delay
settings. The necessary delay settings are set into the respective
DELAY_CHAIN primitive that delays the data that passes through the
delay chain based on the delay settings before going through the
IO_OBUF (output buffer) primitive.
The design uses the output and output enable (oe) path of the dynamic
delay chain, where both share the same IO_CONFIG settings.
Each of the output and oe delay chains is built from two cascaded output
delay cells. In this case, xxx_dyn_delay_chain1a_0, the first output
delay cell’s dataout is connected to xxx_dyn_delay_chain2a_0, the
second output delay cell’s datain, where xxx represents either the
output path or oe path. This is because the parameters chosen during the
megafunction creation are use_out_dynamic_delay_chain1 and
use_out_dynamic_delay_chain2). Note the cascaded nature of the
delays. xxx_dyn_delay_chain1a_0, the first output delay cell’s
delayctrlin inputs are 4 bits. This actually signifies the possible delay
settings (taps value) available for this DELAY_CHAIN primitive, which are
0 to 15 taps. Each taps represents 50 ps of delay. This allows a total delay
2. Start ModelSim-Altera.
4. Select the folder in which you unzipped the files. Click OK.
You can rearrange signals, remove signals, add signals, and change
the radix by modifying the script in ALTIOBUF_ex1_msim.do.
The first part of the simulation, at time before 502288 ps, out_datain
and out_dataout do not have any delays. But at 502288 ps (Cursor 8) to
1054392 ps (Cursor 9), out_io_config_clkena is asserted for
approximately 11 clock cycles.
■ datain values set during the first four clock cycles (this is "b0000").
This is not relevant in this case because the output buffer does not
have an input delay cell.
■ datain values set during the next three clock cycles (this is "b000")
for the second output delay cell (xxx_dyn_delay_chain2a_0);
therefore, the total delay is 0 ps ( 0 * 50).
■ datain values set during the last four clock cycles (this is "b0001")
for the first output delay cell (xxx_dyn_delay_chain1a_0);
therefore, the total delay is 50 ps (1*50).
The total effective delay is the sum of both delay chains, because the delay
chains are cascaded (0 + 50 = 50 ps).
■ datain values set during the first four clock cycles (this is "b0000").
This is not relevant in this case because the output buffer does not
have an input delay cell.
■ datain values set during the next three clock cycles (this is "b000")
for the second output delay cell (xxx_dyn_delay_chain2a_0);
therefore, total delay is 0 ps (0 * 50).
■ datain values set during the last four clock cycles (this is "b1111")
for the first output delay cell (xxx_dyn_delay_chain1a_0);
therefore, total delay is 750 ps (15*50).
The total effective delay is the sum of both delay chains, because the delay
chains are cascaded (0 + 750 = 750 ps).
■ datain values set during the first four clock cycles (this is "b0000").
This is not relevant in this case because output buffer does not have
input delay cells.
■ datain values set during the next three clock cycles (this is "b001")
for the second output delay cell (xxx_dyn_delay_chain2a_0);
therefore, total delay is 50 ps (1 * 50).
■ datain values set during the last four clock cycles (this is "b1111")
for the first output delay cell (xxx_dyn_delay_chain1a_0 );
therefore, total delay is 750 ps (15*50).
The total effective delay is the sum of both delay chains, because the delay
chains are cascaded (50 + 750 = 800 ps).
For the final part of the simulation, at 4302377 ps (Cursor 21) to 4851327
ps (Cursor 22), out_io_config_clkena is asserted for approximately
11 clock cycles.
■ datain values set during the first four clock cycles (this is "b0000").
This is not relevant in this case because the output buffer does not
have an input delay cell.
■ datain values set during the next three clock cycles (this is "b111")
for the second output delay cell (xxx_dyn_delay_chain2a_0);
therefore, total delay is 350 ps (7 * 50).
■ datain values set during the last four clock cycles (this is "b1111")
for the first output delay cell (xxx_dyn_delay_chain1a_0);
therefore, total delay is 750 ps (15*50).
The total effective delay is the sum of both delay chains because the delay
chains are cascaded (350 + 750 = 1100 ps).
Ports and The parameter details are only relevant for users who bypass the
MegaWizard® Plug-In Manager interface and use the megafunction as a
Parameters directly parameterized instantiation in their design. The details of these
parameters are hidden from MegaWizard Plug-In Manager interface
users. The options listed in this section describe all of the ports and
parameters that are available to customize the ALTIOBUF megafunction
according to your application.
For the most current information about the ports and parameters for this
megafunction, refer to the latest version of the Quartus® II Help.
Table 3–1 shows the input ports for ALTIOBUF (as input buffer),
Table 3–2 shows the output ports for ALTIOBUF (as input buffer), and
Table 3–3 shows the parameters for ALTIOBUF (as input buffer).
Table 3–1. ALTIOBUF (As Input Buffer) Megafunction Input Ports (Part 1 of 2)
Table 3–1. ALTIOBUF (As Input Buffer) Megafunction Input Ports (Part 2 of 2)
Table 3–4 shows the input ports for ALTIOBUF (as output buffer),
Table 3–5 shows the output ports for ALTIOBUF (as output buffer),
and Table 3–6 shows the parameters for ALTIOBUF (as output buffer).
Table 3–4. ALTIOBUF (As Output Buffer) Megafunction Input Ports (Part 1 of 2)
Table 3–4. ALTIOBUF (As Output Buffer) Megafunction Input Ports (Part 2 of 2)
Table 3–7 shows the input ports for ALTIOBUF (as bidirectional buffer),
Table 3–8 shows the output ports for ALTIOBUF (as bidirectional buffer),
Table 3–9 shows the bidirectional ports for ALTIOBUF (as bidirectional
buffer), and Table 3–10 shows the parameters for ALTIOBUF (as
bidirectional buffer).
Table 3–7. ALTIOBUF (As Bidirectional Buffer) Megafunction Input Ports (Part 1 of 2)
Table 3–7. ALTIOBUF (As Bidirectional Buffer) Megafunction Input Ports (Part 2 of 2)