An 428
An 428
Design Guidelines
Attention: The extended industrial temperature support is no longer available for MAX II devices.
Refer to KDB link: Are MAX® II devices still offered in Extended Industrial Temperature grade?.
The design guidelines in this application note are categorized under the
following sections:
CPLD Selection The MAX II CPLD family offers various device densities to cater to
different user needs. Here are some factors you should consider when
choosing the MAX II device:
Altera Corporation 1
AN-428-1.1
MAX II CPLD Design Guidelines
Note to Table 1:
(1) Packages available in lead-free versions only.
Logic Density
MAX II CPLDs have 240 to 2,210 logic elements (LEs), or typically 192 to
1,700 equivalent macrocells for you to implement different functions. For
example, the EPM240 device has 240 LEs; this means it has 240 registers
available in the device.
For more information about the low power applications for MAX II
f devices, refer to AN 422: Power Management in Portable Systems Using
MAX II CPLDs.
2 Altera Corporation
Hardware Setup Checklist
Temperature Grade
The MAX II family offers three different temperature grades: commercial,
industrial, and extended temperature grades. Select the correct
temperature grade according to your application. Table 2 shows the
operating temperature range for devices of the three temperature grades.
Operating Temperature
Temperature Grade Unit
Minimum Maximum
Commercial 0 85 °C
Industrial –40 100 °C
Automotive –40 125 °C
Note to Table 2:
(1) MAX IIZ devices are available only in commercial grade.
Hardware Setup This section lists some of the items you should check when considering
your hardware setup.
Checklist
■ “VCCINT and VCCIO Voltages” on page 4
■ “Power-Up Sequencing” on page 4
■ “Input Pin Connection” on page 4
■ “Unused Pin Connection” on page 5
■ “Input Pin Voltages” on page 5
■ “Output Pin Source Current” on page 6
■ “JTAG Pins Pull Up/Down” on page 6
■ “JTAG Chain Connection for Programming” on page 7
■ “JTAG Chain Containing Devices with Different VCCIO” on page 7
■ “JTAG Signal Buffering” on page 8
■ “Device Output-Enable Pin” on page 9
■ “Chip-Wide Reset” on page 10
■ “Register Power-Up Level” on page 10
■ “Latch-Up Prevention” on page 11
Altera Corporation 3
MAX II CPLD Design Guidelines
The MAX II family has the MultiVolt™ core and I/O features. The
MultiVolt core feature allows the device to support different VCCINT
voltages. The MAX II device accepts 2.5-V or 3.3-V VCCINT, while MAX IIG
and MAX IIZ devices accept 1.8-V VCCINT. The MultiVolt I/O feature
allows the device to support 1.5-V, 1.8-V, 2.5-V, and 3.3-V VCCIO voltages.
Each I/O bank is powered up individually by the VCCIO pins of that
particular bank, and is independent of the VCCIO of other I/O banks.
f For information about the power regulation for MAX II devices, refer to
Power Management Reference Guide for Altera FPGAs & CPLDs at
www.altera.com/support/devices/vendors/pow-vendors.html.
Power-Up Sequencing
MAX II devices support hot-socketing. They are designed to operate in
multiple-voltage environments, so they can tolerate any power-up
sequence. You can either power up VCCINT or VCCIO first, or both at the
same time. Input signals of 3.3, 2.5, 1.8, or 1.5 V can drive the devices
without special precautions before VCCINT or VCCIO is applied. Normal
operation does not occur until both power supplies are in their
recommended operating range.
The MAX II I/O Characteristics During Hot Socketing white paper shows
f
the I/O pin characteristics for different power-up sequences.
4 Altera Corporation
Hardware Setup Checklist
■ GND*
■ RESERVED
■ RESERVED_INPUT
■ RESERVED_INPUT_WITH_WEAK_PULLUP
■ RESERVED_INPUT_WITH_BUS_HOLD
depending on how you set the unused pins in the Quartus II software.
The MultiVolt I/O feature allows the device to interface with systems of
different supply voltages. Each I/O bank is powered up independently
by the VCCIO pins of that bank. Assign the pins that work with the same
voltage level in the same I/O bank so that you can use the other I/O
banks for other VCCIO voltages.
Altera Corporation 5
MAX II CPLD Design Guidelines
Using the device I/O pin to power up another device can source a large
amount of current from the pin as well. Do not use I/O pins as a direct
power source. If you need to use the MAX II device to control the
power-up of another device, use the MAX II I/O pin to control a switch,
for example, a relay or a transistor, that powers up the device.
In addition, do not source more than 170 mA of current for a set of I/O
pins between any two VCCIO pads, or sink more than 130 mA of current
for a set of I/O pins between any two GNDIO pads. For example, the
EPM240 device has six GNDIO pads, which provide six I/O regions that
can sink up to 130 mA. If you need to sink 15 mA for the outputs, you can
have eight outputs per region. With the six I/O regions between GNDIO
pads, there are 48 possible outputs, each sinking 15 mA.
f For information about the maximum sink and source current for the
MAX II device, refer to AN 286: Implementing LED Drivers in MAX &
MAX II Devices.
The JTAG circuitry is activated when VCCINT is powered up. If the TMS
and TCK pins that are connected to VCCIO and VCCIO are not powered up,
the JTAG signals are left floating. Any transition on the TCK pin can cause
the JTAG state machine to transition to an unknown state, leading to
incorrect operation when VCCIO is finally powered up. To disable the
JTAG state machine during power-up, the TCK pin should be pulled low
to ensure that an inadvertent rising edge does not occur on TCK pin.
6 Altera Corporation
Hardware Setup Checklist
1kΩ
As the download cable interfaces with the JTAG pins of your device,
ensure that the download cable operating voltage and the JTAG pin
voltage are compatible. Refer to the datasheet for each download cable for
the operating voltage.
In a JTAG chain containing devices with different VCCIO, the devices with
a higher VCCIO level should drive the devices with the same or lower
VCCIO level. You only need one level shifter at the end of the chain with
Altera Corporation 7
MAX II CPLD Design Guidelines
At any time, when a cable must drive three or more devices, buffer the
signal at the cable connector to prevent signal deterioration. Of course,
this also depends on the board layout, loads, connectors, jumpers, and
switches on the board. Anything added to the board that affects the
inductance or capacitance of the JTAG signals increases the likelihood of
a buffer to be added to the chain.
For the TCK and TMS signals that drive in parallel, each buffer should
drive no greater than eight loads. If jumpers or switches are added to the
path, decrease the number of loads.
8 Altera Corporation
Hardware Setup Checklist
Altera Corporation 9
MAX II CPLD Design Guidelines
Chip-Wide Reset
The MAX II device has a chip-wide reset pin (DEV_CLRn) for resetting all
registers in the device. If this option in enabled, you can clear the device's
registers by asserting this pin low because this chip-wide reset overrides
all other control signals of the MAX II device.
In a system where not all the devices are powered up and start
functioning simultaneously, you can hold this pin low before or during
power-up to prevent the MAX II device from starting to function until the
other devices go into user mode. The DEV_CLRn pin functions as a
normal user I/O pin if this option is not used.
You can set the registered outputs to drive high upon power-up through
the Quartus II software. The Quartus II software uses the “NOT Gate
Push-Back” method to set the output high.
To set this in the Quartus II software, go to the Assignment Editor and set
the Power-Up Level assignment for the register to High. Figure 4 shows
the register power-up level setting in the Assignment Editor.
10 Altera Corporation
Hardware Setup Checklist
Latch-Up Prevention
Parasitic bipolar transistors are present inside all CMOS devices. Under
normal operating conditions, the base-emitter and base-collector
junctions of these parasitic transistors, as shown in Figure 5, are not
forward-biased and are not turned on. However, excessive current forced
into or out of I/O pins, especially during power-up, can turn on those
parasitic transistors.
N+ P+ P+ N+ P+ N+ N+ P+
Q1 R1
Q2
N-Well
R2
P-Substrate
Altera Corporation 11
MAX II CPLD Design Guidelines
Design Checklist This section lists some of the items you should pay attention to when you
create your design.
Design Entry
The Quartus II software allows you to create your design through
schematic/block diagram or HDL coding. The commonly used HDL
formats supported are Verilog and VHDL. For simple designs, using
schematic/block diagram makes your task of creating the design easier.
But for more complex designs, using HDL coding gives you the flexibility
you need and makes your design more efficient.
The Quartus II software is able to generate the symbol or HDL files for the
megafunctions you create and allows you to integrate the megafunction
into your design, regardless of the design entry method.
12 Altera Corporation
Design Checklist
Global Clock
Each MAX II device has four dual-purpose dedicated clock pins
(GCLK[3..0]) that can be used to drive the global clock network for
clocking or as normal I/O pins. The four global clock lines in the global
clock network drive throughout the entire device. The global clock
network provides clocks for all resources within the device including
logic elements (LEs), LAB local interconnect, input/output elements
(IOEs), and the user flash memory (UFM) block.
Assign the clock sources in your design to these pins so that you have a
fixed and predictable delay for the clock signals. In the Quartus II
Assignment Editor, assign the clock pins in your design to the device's
clock pins. After that, under Assignment Name, choose Global Signal.
Then under Value, select Global Clock. Enable this assignment. Figure 6
shows the global clock pin assignment in the Assignment Editor.
If you do not use these four clock pins to drive the global clock network,
you can use them as general-purpose I/O pins.
Register Inputs
Input signals to your design may not always be stable and can have
glitches or noise. To prevent the wrong signal from propagating into your
design and affecting your system's functionality, have the input signal go
through a register before going into the design, as shown in Figure 7. As
the input of the register is only sampled and transferred to the design on
every active edge of the clock, glitches, or instability of the input signal do
not propagate further into the design.
Altera Corporation 13
MAX II CPLD Design Guidelines
Input
D Q Logic
Clock
Synchronous Design
In a synchronous design, signal changes depend on the clock signal. On
every active edge of the clock, the data inputs of registers are sampled
and transferred to outputs.
Use a single clock source to clock the registers in your design, as shown
in Figure 8. If two cascaded registers are triggered on different clock
sources or edges, there is the risk that the second register will not have
enough time to resolve the metastable output from the first register
because of setup time violation, and thus clocking in an incorrect value.
D Q D Q
Clock
If the combinational logic output from your design feeds to another part
of the design, have the signal go through a register, as in Figure 9. This
applies if you are using the combinational logic output as a clock signal
or as an asynchronous reset signal. Changes to the combinational output
may trigger a period of instability due to propagation delays through the
logic as the signal goes through a number of transitions before the output
settles down to a new value.
As the input of the register is only sampled and transferred to the design
on every active edge of the clock, changes happening on data inputs of
the register do not affect the register output/input to the other part of the
design until the next active clock edge. As long as the setup and hold time
of the register are not violated, the register will effectively isolate any
glitches or instable input signal from other logic.
14 Altera Corporation
Design Checklist
Logic 1 D Q Logic 2
Clock
Also, your design should not rely on delay paths within the architecture
of a device because any change in timing to a specific path could affect its
functionality. Factors such as temperature, voltage, process change, or
placement and routing change could affect the timing of logic paths in a
device and cause unwanted functional changes. Synchronization
eliminates unwanted functional changes.
Design Simulation
With the appropriate input vectors, the Quartus II software allows you to
simulate your design with either functional or timing simulation.
Functional simulation allows you to check whether your design is
logically functioning. This is suitable for designs that are not time- critical,
for example, combinational designs or designs that use low frequency
clocks.
Altera Corporation 15
MAX II CPLD Design Guidelines
Timing Violation
The Quartus II Timing Analyzer checks for any timing violation during
compilation. The timing analysis report shows the fMAX, tSU, tCO, tH, and
tPD for your design. Check for any warning or timing violation.
f For more information about the timing analysis, refer to the Quartus
Timing Analysis section in volume 3 of the Quartus II Handbook.
f For the actual current strength for the maximum and minimum settings,
refer to the MAX II Device Handbook.
Pin Assignments
Sometimes the design does not work correctly because you have not
made the correct pin assignments in the Quartus II software—especially
for input pins! It is extremely critical that you assign all the used pins to
the correct locations. If left unassigned, the Quartus II software
automatically assigns the pins to certain locations. Your design may not
function and worse still, this may cause contention.
For unused pins, you can set them to be either output pins driving
unspecified signals, output pin driving ground, or tri-stated input pins
(with or without weak pull-up or bus-hold) in the Quartus II software. If
you connect these pins to other devices on the same board, it is best to set
16 Altera Corporation
Design Checklist
the pins as tri-stated input pins to prevent them from affecting other
devices. Tri-stated inputs do not drive out and only sink or source a
maximum current of 10 µA. Setting the unused pins to the wrong state
may cause contention and can damage the device.
To set the pins in the Quartus II software, on the Assignments menu, click
Settings. On the Settings dialog box, click Device and then click Device
and Pin Options. Click the Unused Pins tab and reserve all unused pins
as input tri-stated, as shown in Figure 11.
Altera Corporation 17
MAX II CPLD Design Guidelines
Additional Some additional development tools and references to help you use the
MAX II devices are:
Development
Tools and ■
■
MAX II Development Kit
MAX II PowerPlay Early Power Estimator
References ■ MAX II Device Family Errata Sheet
18 Altera Corporation
Conclusion
Conclusion With the necessary information and guidelines, using CPLDs in your
system can be an easy task. This application note is written based on the
problems users commonly face when using CPLDs and provides a
checklist and easy-to-follow guidelines to ensure the correct operation of
Altera MAX II devices.
Altera Corporation 19
MAX II CPLD Design Guidelines
Revision History
20 Altera Corporation
Hardware Setup Checklist
Hardware Setup This checklist provides a summary of the guidelines described in this
document. Use the checklist to verify that you have followed the
Checklist guidelines for each stage of your design.
Project Name:
Date:
3 Ensure that all input pins including bidirectional input pins are driven by either VCC or
ground. Floating input pins have undefined values and may cause additional noise.
4 Connect all GND pins to ground to improve the device’s immunity to noise.
5 Leave all RESERVE I/O pins unconnected as these I/O pins drive out unspecified signals.
6 Voltage level should meet the high-level (VIH) and low-level (VIL) input voltages of the device.
Do not drive pin outside the recommended input voltage (VI) range.
7 Assign pin that works with the same voltage level in the same I/O bank so that you can use
the other I/O banks for other VCCIO voltages.
8 Do not tie output or input pin directly to GND or VCC. Sourcing or sinking large amounts of
current from output pins continuously can damage the device.
9 If certain pins need to be pulled high or low, pull the pins through external resistors.
Altera Corporation 21
MAX II CPLD Design Guidelines
10 Pull the TCK pin low and the TMS pin high through a 10-kΩresistor to disable the JTAG state
machine during power-up.
11 Connect the JTAG pins of the device to the download cable header correctly.
12 Connect the TDO pin of a device to the TDI pin of the next device if you have more than one
device in the chain.
13 Ensure that the download cable operating voltage and the JTAG pin voltage are compatible.
14 Ensure that the device with a higher VCCIO level should drive the device with the same or
lower VCCIO level in a JTAG chain that contains devices of different VCCIO.
15 It is recommended to buffer the signals at the connector because cables and board
connectors tend to make bad transmission lines and introduce noise to the signal.
16 Add buffers other than the initial buffer when the device chain gets longer or whenever the
signals must cross a board connector.
17 Enable chip-wide output-enable DEV_OE pin to control output enable for all output pins in
your design. All outputs operate normally when DEV_OE is asserted. When the pin is
deasserted, all outputs are tri-stated.
18 Enable chip-wide reset DEV_CLRn pin to reset all the registers in the device. This pin
overrides all other control signals of the MAX II device.
22 Altera Corporation
Hardware Setup Checklist
19 Depending on the design, set the output to drive high in the Quartus II software for a specific
duration upon power-up or until the system is properly initialized.
20 If your system permits, apply ground to the device first, then VCCINT and VCCIO, and finally
inputs to minimize the chances of inducing latch-up during power-up.
21 Apply the reverse order for power-down: the inputs are removed first, then VCCINT and VCCIO,
and finally ground.
Altera Corporation 23
MAX II CPLD Design Guidelines
Design Checklist This checklist provides a summary of the guidelines described in this
document. Use the checklist to verify that you have followed the
guidelines for each stage of your design.
Project Name:
Date:
1 Consider the trade-off between schematics or HDL for your design entry based on your
design’s complexity.
2 Other than the Quartus II software, consider building your design with third-party EDA tools,
SOPC Builder, DSP Builder, or IP cores.
3 If you are using HDL for design entry, use the recommended coding styles.
4 If you are using third-party synthesis tools to synthesize your design, use the netlist
generated by the synthesis tools for the Quartus II Fitter to do the place-and-route
procedure.
5 Pay attention to your design’s clocks. Use clock pins, the global clock network, clock control
blocks, and the PLL for your clock signals.
6 Assign the clock sources in your design to clock pins so that you will have a fixed and
predictable delay for the clock signals.
7 To prevent the wrong signal from propagating into your design and affecting your system's
functionality, have the input signal go through a register before going into the design.
8 Use either the MAX II device's internal oscillator or an external clock signal as the clock
source of the register.
24 Altera Corporation
Design Checklist
10 For combinational logic that feeds to another part of the design, for example, as a clock
signal or as an asynchronous reset signal, route the signal through a register.
11 Ensure that the setup and hold time of the register are not violated in order for the register
to be able to isolate any glitches or instable input signal from other logic.
13 Assign the appropriate input vector to allow the Quartus II software to simulate your design
with either functional or timing simulation.
15 Use the correct current strength and slew rate on output or bidirectional pins to prevent
signal overshoot or undershoot for signal noise reduction, or to prevent stair-step output
from the pins.
16 Ensure all pin assignments are assigned correctly especially the input pins.
17 Set the unused pin to either output pin driving unspecified signals, output pin driving ground,
or tri-stated input pins (with or without weak pull-up or bus hold) in the Quartus II software.
Altera Corporation 25
MAX II CPLD Design Guidelines
Copyright © 2007 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company,
the stylized Altera logo, specific device designations, and all other words and logos that are identified as
trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera
Corporation in the U.S. and other countries. All other product or service names are the property of their re-
spective holders. Altera products are protected under numerous U.S. and foreign patents and pending
101 Innovation Drive applications, maskwork rights, and copyrights. Altera warrants performance of its semiconductor products
San Jose, CA 95134 to current specifications in accordance with Altera's standard warranty, but reserves the right to make chang-
www.altera.com es 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
Technical Support: herein except as expressly agreed to in writing by Altera Corporation. Altera customers
www.altera.com/support/ are advised to obtain the latest version of device specifications before relying on any pub-
Literature Services: lished information and before placing orders for products or services.
literature@altera.com
26 Altera Corporation