CPLD Jtag
CPLD Jtag
Cypress Semiconductor Corporation • 3901 North First Street • San Jose • CA 95134 • 408-943-2600
November 9, 2001
Design Considerations for ISR Programming of Cypress CPLDs
PC
TO PARALLEL PORT
TMS (SMODE) – Mode Control useful for monitoring purposes or for user logic that controls
During programming, this is the mode control input that di- any dual-function ISR pins of specific Ultra37000(V) or
rects the Test Access Port (TAP) controller state machine con- FLASH370i devices, as discussed in Appendix A. If on-board
tained within the ISR interface on the device. logic uses this signal, ISR* should be pulled-up to VCC
through a pull-up resistor on the circuit board to handle the
JTAGen (ISRen) – Enables the 4-pin JTAG Interface case when no cable is attached.
This pin is present on packages of Ultra37000(V) or The ISR Programming Cables
FLASH370i devices where the JTAG pins share their function- The simplest method to program ISR devices is to use a PC
ality with I/O pins. Dual-mode device details are found in Ap- as shown in Figure 1. The ISR programming cable connects
pendix A. For the Ultra37000(V), when the JTAGen pin is at a the parallel port of the PC to a cable header on the user’s
TTL HIGH level the JTAG pin functionality is selected. When board where the ISR devices are soldered. The header on the
it is at a TTL LOW level the I/O pin functionality is selected. user’s board connects to traces that route to the JTAG pins on
For the FLASH370i devices the JTAG pin functionality is select- the ISR device itself. The ISR software runs on the PC and
ed when it is at a supervoltage of 12.0V and the I/O pin func- drives these pins on the board, through the cable and header,
tionality is selected when it is at a TTL LOW level. This func- to program the devices with the appropriate bitstream.
tional difference in the JTAGen pin for these two ISR device
families is important and is discussed later in this application Since each cable contains active components that buffer sig-
note. All other ISR device families do not use JTAGen. nals driven between the user’s board and the PC, the cable
must receive power from the user’s board. It is recommended
ISR* – Indicates Active ISR Operation Taking Place that the PC be powered-off prior to plugging in an ISR PC
This additional signal is not used by any CPLD device for cable.
programming. Rather, it is present on the ISR header to allow Table 1 shows the available Cypress ISR programming cables
the programming source (e.g., ISR PC cable) to signal to the and their appropriate usage.
user’s board when ISR operations are occurring. This can be
Table 1. Available ISR PC Programming Cables
Programming Cable Part Number Supported ISR Signal Voltages Supported Devices
C3ISR C3ISR.02 (rev. 0.02) 5V, 3.3V, 2.5V, 1.8V Delta39K, Quantum38K, PSI,
Ultra37000, Ultra37000V
UltraISR 37KISR.03 (rev. 0.03) 5V, 3.3V Delta39K, Quantum38K, PSI,
Ultra37000, Ultra37000V
ISRPCCABLE ISRPCCABLE.03A 5V FLASH370i, Ultra37000
(rev 0.03A) (with 12V supervoltage on ISRen) (Ultra37000V not supported)
2
Design Considerations for ISR Programming of Cypress CPLDs
The C3ISR cable offers the most flexible choice of program- The ISRPCCABLE, on the other hand, is the only cable with
ming voltage and device support. Any selection of 5V, 3.3V, a built-in 5V-to-12V DC/DC converter to produce the 12V su-
2.5V, or 1.8V can power the cable (VCC of ISR connector pin), pervoltage to the ISRen pin required for FLASH370i program-
allowing TTL, LVTTL, LVCMOS, LVCMOS2, or LVCMOS18 ming, supplied by 5V from the user’s board. The schematic
ISR signal levels. The C3ISR cable is the recommended for the ISRPCCABLE, used for programming the FLASH370i
choice for ISR designs if the user does not need to program devices, is shown in Figure 4.
FLASH370i devices. A schematic of the C3ISR cable is shown The ISRPCCABLE allows programming of the FLASH370i and
in Figure 2. Ultra37000 device families (but not Ultra37000V). The ISR-
The UltraISR PC cable contains a simple buffer capable of 5V PCCABLE (revision 0.03A or greater) can be used to program
and 3.3V signaling. The UltraISR cable schematic is shown Ultra37000 devices because their JTAGen pin, if present on
in Figure 3. Both the C3ISR and UltraISRPCCABLE can be the selected package, is 12V tolerant. This means that the
used to program all ISR families at 3.3V or 5V levels, with the application of 12V on the Ultra37000’s JTAGen pin is equiva-
exception of FLASH370i devices (since these require a 12V lent to placing a TTL HIGH value on the pin.
supervoltage generated by the cable on the ISRen pin).
1 2 3 4
VCC_BOOST VCCIO
VCC
2
5.6k R6 R15 R25
10 20k
+ +
2
JP1 5.6k R7
L1 C6 C5
1 5.6k R8 DO3316P-103
D 14 D
5.6k R9 VCC_BOOST
2 U1 100uF 100uF VCC
1
15 1 16
I.C. I.C.
3 TDI_PAR 2 15
1
2
6 8 9 C1 R26 1 8
ONA I.C. 9.1k C2 C7 IN OUT
19 C3 2 7
0.22uF
21 1 MAX604CSA 1k
9 VCC VCCIO C8 0.1uF
R10
22 R32 0
4.7k GND VCCIO_clamped
10 U5 VCC
R31 0 (NP) R18
23 CONNECT GND PLANES U2A 1 24
GND GATE VCCIO
11 (ONE .020 TRACE) 1 2 23
G A1 B1 200k
C 24 18 TCK_3 R1 39 TCK_4 3 22 TCK_10PIN C
Y1 A2 B2
12 TCK_PAR 100 R19 TCK_2 2 16 4 21
A1 Y2 A3 B3 R13
25 4 14 TMS_3 R2 39 TMS_4 5 20 TMS_10PIN
A2 Y3 A4 B4 200
13 100 R20 TMS_2 6 12 TDI_3 R3 39 TDI_4 6 19 TDI_10PIN
A3 Y4 A5 B5
100 R21 TDI_2 8 ISR*_3 R4 39 ISR*_4 7 18 ISR*_10PIN
A4 A6 B6 VCCIO_clamped
PARALLEL PORT JTAGenable_3 R5 39 JTAGenable_4 8 17 JTAGen_10PIN
A7 B7 C14 C15
SN74HC244DW 9 16 C16 +
100 R22 ISR*_2 VCC A8 B8
R30 R29 10 15 D3 0.1uF 0.01uF
A9 B9
11 14 10uF
1k A10 B10
30 (NP) 12 13
A11 B11
3.9V ZENER (AZ23C3V9DICT-ND)
R14 SN74TVC3010
30 VCC
0.1uF 0.01uF
P2
1
8
U3
2
B U2B 3 B
2
19 4
7 G
9 5
3 Y1
11 7 6
A1 Y2
13 5 7
LT1719 A2 Y3
15 3 8
A3 Y4 R27
SHDN 6
5
4
17 9
A4
VCC 0 (NP) 10
GND
VEE
20 10 R28
VCC GND
VCCIO_clamped 0 10P HEADER
R12 R11 SN74LVC244A
C
20K
R23 1K
2.2k
Q1
B
2N2222A
R24
1.6k
E
A A
VCC D4
R17 D2
1 2 3 4
3
Design Considerations for ISR Programming of Cypress CPLDs
10k
TCK(4)
small PC board mounted inside the parallel port connector
10 pf
Data2(4)
100
DA1 OA1
33
TMS(2)
casing.
100
DA2 OA2
33 The ISRPCCABLE is a six-foot cable with one foot as a de-
Data1(3) TDI(6)
tachable, flexible 10-wire ribbon cable. The ribbon cable sec-
Ack(10)
100
OB3 DB3 TDO(9)
tion is connected to the 12V converter box at the end of a five-
foot cable.
1k
DB0 OB0
33
JTAGen(3)
The user may need a parallel port extension cable since there
1k
Data3(5) 2n3904-nd
may not be enough cable length from the parallel port on the
1k
PC to the circuit board. A high-performance IEEE-1284 cable
33
DB1 OB1 ISR*(5) extension is recommended for distances greater than six feet.
All ISR programming cables plug into the female parallel port
OB2 VCC(7)
PE(12) DB2
of the PC or the female end of an extension cable. However,
DA3 OA3 signal integrity problems may arise with long parallel cable
2.2uf tantalum
0.1uf
extensions.
/OEA /OEB
Connecting the ISR Cables to the Circuit Board
GND(23,24) GND(1,10)
To connect the cable to the system, a 10-pin, 2 x 5, boxed
Data4(6)
Port Sense
header male connector is mounted on the board. The ISR
Busy(11)
programming cable plugs into the boxed header. This boxed
header connector has a small opening in the box on one side
(the key) that allows the ISR programming cable to be
Figure 3. UltraISR Cable Schematic rev 0.03 plugged in one way only. The pins are on 0.100" centers. The
length of each pin is 0.230", and the pin cross-section is
0.025" x 0.025". This boxed header connector is available as
a straight-pin connector and as a right-angle connector. Ad-
Parallel Port Cable Head User Board
HCT244 CMOS buffer
ditionally, an open header can be used. Part numbers for two
compatible connectors are:
DA0 OA0
Data0(2) Sclk(4)
• DIGI-KEY part # S2012-05-ND
Data2(4)
DA1 OA1
Smode(2) (straight-pin connector)
DA2 OA2 • DIGI-KEY part # S2112-05-ND
Data1(3) SDI(6) (right-angle connector)
100 ohmsOB0 DB0
Ack(10) SDO(9) All ISR programming cables provided by Cypress have a fe-
male end which plugs into these ISR connectors installed on
ISR(5)
the user’s board. The position of the signal pins on the con-
DC/DC Converter nector is shown in Figure 5. The orientation of this figure is
+5.0V +12.0V such that the pin 1 location is the GND signal, which is located
+Vin +Vout ISRVPP(3) directly below the arrow on the female connector. The notch
D
DA3 OA3 G
S
PICO on the female connector is located near the ISR* signal, as
DATA3(5) 5GR12S
Si9433DY
-Vin -Vout
shown. If the right-angle connector is used, make sure the
raised key of the cable connector faces up so that it can be
0.01uf
20k
plugged into the boxed header without PCB interference.
OB1 DB1
PE(12) VCC(7)
OEA OEB 0.1 µf
PIN 1
GND(23) GND(1)
GND(24) GND(10)
TDO VCC ISR* JTAGen GND
Data7(9)
Port Sense
Error(15)
GND NC TDI TCK TMS
4
Design Considerations for ISR Programming of Cypress CPLDs
To program a single ISR device using any ISR programming With this configuration, it is recommended to place a 10-nF
cable described here, route the TDI, TDO, TCK, TMS, and capacitor located at the 10-pin header connector on the circuit
JTAGen pins from the cable connector to the TDI, TDO, TCK, board from the ISRen pin to ground. If the ISR cable is hot-
TMS, and JTAGen (if present on the package) pins of the ISR socket connected to the user’s board, which is not recom-
device, respectively. If no ISR devices use JTAGen, this pin mended, then this capacitor insures that a proper, slow ramp
can float. Multiple devices can be programmed in a single ISR up to 12V is applied to the devices to be programmed under
programming chain, explained later in this application note. all operating conditions, with no risk of damage to the ISRen
For multiple devices in the chain, the TDI and TDO pins are pin. Since the ISR cable could easily be hot-socket connected
connected in a serial chain such that the TDO of the first de- by accident, it is advisable and simple to incorporate this de-
vice in the chain connects to the TDI of the next device in the coupling capacitor. Again, this only applies if the
chain. The TDO of the last device in the chain then returns ISRPCCABLE is used.
back to the 10-pin header TDO pin.
In addition to these programming pins, there is an additional Simple ISR Device Cascading
signal available from the cable called ISR*. The purpose of You can cascade many ISR devices in a system. That is, you
this signal is to allow the user to monitor when ISR operations can daisy-chain the devices together and connect their pro-
are in progress. If ISR* is a logic LOW, it indicates that gramming pins in such a way that all devices can be pro-
JTAGen is asserted (at 12V supervoltage for FLASH370i de- grammed from a single connection to the ISR programming
vices) and ISR operations, such as programming, are in pro- source.
cess on the board. If ISR* is a logic HIGH, it indicates JTAGen
is 0V and no ISR operations are being performed. The ISR* To do this, simply tie all of the TCK and TMS pins (and
pin is needed when using the JTAG/IO pins in both ISR JTAGen if present) of each device to the corresponding pins
(JTAG) and functional (IO) modes, as supported by certain of the ISR connector. You then connect the TDI pin from the
packages of the Ultra37000 and FLASH370i families. It is used connector to the TDI pin of the first device in the chain, then
by on-board logic to determine when the JTAG signals should connect the TDO output of that device to the TDI input of the
be enabled and other driving signals to the ISR device should next device in the chain, and so forth, until you finally connect
be placed in the high-impedance state (three-stated). This is the TDO output of the last device in the chain to the TDO pin
discussed in detail in Appendix A. When the ISR cable is con- of the cable connector or other programming source (see Fig-
nected, this signal is driven appropriately to a HIGH or LOW ure 6).
level. When the cable is disconnected, the ISR* signal must
be pulled up on the circuit board, using a pull-up resistor to Cascading With Other IEEE 1149.1-Compliant Devices
the VCC pin of the ISR connector to indicate to the board that Other vendor IEEE 1149.1-compliant devices can be included
no ISR operation is in progress. in the chain. The ISR programming software will load the non-
There are three other connection points on the cable and ca- Cypress device’s instruction register with the proper BYPASS
ble header: VCC, GND, and NC. VCC connects to the VCC instruction.
plane on the board containing the ISR devices. It supplies
power to the active components within the ISR cable. This is
necessary for any ISR programming cable to be able to buffer Other JTAG
ISR Device ISR Device
JTAG signals or translate voltage levels. On the UltraISR PC Compliant
cable, VCC simply supplies power to the buffer in the cable for Device
the JTAG signals. On the C3ISR cable, VCC from the user’s TDI TDI TDO TDI TDO TDI TDO
board supplies power to the buffer and voltage translation log-
ic of the cable. GND provides a common ground reference TMS TCK TMS TCK TMS TCK
between the board and the ISR programming cable. NC is a
“no connect” pin and is not used. For boards containing both TCK
5V and 3.3V, it is recommended to connect 5V to the VCC TMS
header pin instead of 3.3V. This doesn’t apply for Delta39K,
Quantum38K, or PSI devices, which cannot tolerate 5V. TDO
Connecting the ISRPCCABLE to the Board Figure 6. Simple Cascading of ISR Devices
Since the ISRPCCABLE provides a high voltage (12V) to the
device, it is recommended that the ISR cable be plugged into Cascading Ultra37000 and FLASH370i ISR Devices
the PC and the customer’s board before power is applied to In addition to the optional external circuitry required to take
the board. (This is not as important for the C3ISR or UltraISR advantage of dual JTAG/IO functions per dual-mode ISR de-
PC cables since there are no 12V signals generated in the vice, the JTAGen pin has slightly different functionality be-
cables.) Once the cable is connected, the user can power up tween the FLASH370i and the Ultra37000 families. For details
the board. This assures a normal slew rate on the ISRen pin on Ultra37000 and FLASH370i cascading, see Appendix B.
for all possible conditions. It is also recommended that the
user run the ISR software after the cable is plugged into the
user’s board and PC parallel port. This allows the software to
correctly set the ISR pins to their appropriate initialized state
on the parallel port of the PC. All of the ISR signals are buff-
ered in the ISR cables and are permanently enabled.
5
Design Considerations for ISR Programming of Cypress CPLDs
6
Design Considerations for ISR Programming of Cypress CPLDs
Notching possible at
ISR device #1
ISR ISR
TCK Buffer #2 #3
1.5V
ISR
BAD #1 ISR
#5
Layout ISR
#4
Improper termination for daisy-chain
Long stubs promote ringing, notching
ISR
device
TCK Buffer ISR
ISR
device
VCC
device R1
R2
ISR
GOOD device
ISR
device
Layout
Parallel termination at end of daisy-chain
Short stubs minimize impedance discontinuities and reflections
divider effect between the source impedance of the buffer and the chain at device #5. Making the clock trace the same length
the characteristic impedance of the transmission line ZO. As to device #1 as device #5, as shown in Figure 9, can remove
illustrated in the “bad layout” above, the long stubs and asso- this notching effect. In general it is good to avoid stubs on the
ciated impedance mismatches cause reflections at each clock line to minimize this effect.
node. As the initial voltage wavefront propagates to the end
of the transmission line, reflections from adjacent nodes can
affect the voltage waveform at earlier receivers by creating PCB
notching. If the notch resides near the trip point of the ISR
#2 #4
device, (1.5V for both Delta39K LVTTL levels and Ultra37000
devices), then it could result in a false-clock scenario resulting Better clock #1 #3
trace layout
in ISR operation failure. This effect more typically occurs with with equal trace
multiple devices in the ISR chain because of differing clock lengths for each #6 #8
line trace lengths and improper trace layout. ISR device to
#5 #7
prevent notching
The daisy chain set-up shown in the “bad layout” example of
Figure 8 is not recommended. With source termination, as
used in all ISR programming cables, all load devices should Figure 9. Clock Trace Layout
be lumped at the end of the line. As this is not practical for
more than one ISR device, a buffering scheme must be adopt- While this scheme can be effective, its implementation on a
ed. A better layout practice is shown in the “good layout” ex- PCB may not be practical. This is due to the fact that the split
ample, yet this layout may still be susceptible to ringing or traces must be impedance matched to the feed wire in order
notching depending on the precise layout. Recall that since to prevent reflections and ringing between junctions.
all ISR programming cables employ series termination, an on-
board buffer is necessary. Other schemes for providing the An example implementation is shown in Figure 10. Here, the
best signal integrity are described in detail below. split trace widths are scaled smaller such that the parallel
combination of the split traces matches with the characteristic
TCK Clock Layout impedance of the feed trace. The example shows a clock tree
distributed to four ISR devices, each end terminated to a
The layout of the clock shown in Figure 9 can make a big proper Thevenin termination voltage. The characteristic im-
difference in reducing the transmission line effect of notching. pedance of the feed wire, ZO, matches with the four thin
If the clock trace is laid out exactly as shown in Figure 8, then scaled 4*ZO traces in parallel. While this configuration results
the first device can experience a notch of duration 2T, where in optimal signal integrity, it is little used on PCBs. This is due
T is the transmission line delay from device #1 to the end of
7
Design Considerations for ISR Programming of Cypress CPLDs
uneven impedances when driving high and low for logic fam-
ilies such as TTL. This trade-off can still produce acceptable
signal integrity.
ISR
Extra buffering with termination is recommended wherever
device
VT the impedance of the trace changes greatly, such as at the
connection between a PCB and an add-on card. If large num-
bers of ISR devices are required in the ISR programming
4 ZO chain, the clock buffer outputs can feed a clock tree layout, or
VT
TCK Buffer can alternatively feed a daisy chain of cascaded ISR devices
(replacing source termination with end termination). This
4 ZO ISR combines the configuration shown in Figure 11 with one of
ZO Figure 9 or Figure 8.
VT device
8
Design Considerations for ISR Programming of Cypress CPLDs
Device-Specific ISR Design Considerations Ultra37000 CPLDs differ from Delta39K in that certain device
packages offer dual-function pins that operate as ISR signals
The In-System Reprogammability feature is available on a in programming mode or as regular input/output in I/O mode.
wide range of Cypress programmable devices. While the These are typically smaller packages with a restricted pin
board layout recommendations discussed herein apply to all count. For these dual-function devices, the pin called JTAGen
ISR devices, there are some notable ISR design consider- controls the multiplex between modes. When programming
ations that are distinct for each family. (JTAGen is HIGH), JTAGen enables the ISR interface for dual-
Board-level design issues addressed in this section include: mode devices. When the JTAGen signal disables the ISR in-
the state of ISR programming pins when floating, bus-hold pin terface (JTAGen is LOW), the ISR device will start driving
differences between the FLASH370i and the Ultra37000, and some of its output pins, based upon the functionality of the
supported I/O levels for JTAG signaling. design.
The Delta39K, Quantum38K, PSI, and Ultra37000 ISR device The user can configure a dual-function pin as an input, output,
families incorporate internal weak pull-ups on the JTAG pins or bidirectional input/output. This requires additional external
TDI and TMS as required by the IEEE 1149.1 specification. logic to mediate between JTAG signals and I/O signals. This
This is to ensure that, if a solder fault results in an open circuit external logic requirement is discussed in detail in Appendix
on a JTAG pin, the internal TAP controller in the device will A.
enter the predictable, safe Test-Logic-Reset state. The While specific FLASH370i devices also support dual-mode
FLASH370i family has a bus-hold structure on these pins. pins, there are small differences between ISRen for
While still JTAG compliant, this family alone does not support FLASH370i and JTAGen for Ultra37000 to take into consider-
boundary scan capability. ation. Simple cascading of single- and dual-function devices
It is important to consider that noise from a large number of of both families is discussed in Appendix B.
I/Os switching simultaneously during boundary scan opera-
tions can affect functionality. Therefore, it is highly recom- State of ISR Pins When the ISR Pins Float for Ultra37000
mended that these boundary scan tests be done in a relative- Devices
ly low noise environment. The ISR pins can be floating if, for example, a programming
cable is not attached to the on-board ISR header. The only
Delta39K/Quantum38K/PSI Families ISR programming difference between the Ultra37000 and
The Delta39K, Quantum38K and PSI families permit flexible FLASH370i family is the connection of the bus-hold latches on
signal levels on the ISR pins, including 3.3V, 2.5V, and 1.8V, the ISR interface pins. Specifically, for Ultra37000 CPLDs the
supporting LVTTL, LVCMOS, LVCMOS2, and LVCMOS18 I/O bus-hold latches are disconnected from the JTAG pins TCK,
standards. Each voltage can be selected by applying the de- TMS, TDI, and TDO when the JTAGen pin is HIGH, thereby
sired target voltage to the VCCJTAG pin. The recommended enabling the JTAG port. The bus-hold latches are connected
voltage for JTAG port signals is 3.3V. These devices have when the JTAGen pin is LOW, thereby disabling the JTAG
single-function dedicated JTAG pins. port. For the single-function devices there is no JTAGen pin
and the ISR interface is permanently enabled; therefore, the
Since these families lack 5V tolerance, they cannot directly be bus-hold latches for JTAG pins are permanently disabled.
driven by 5V levels without additional board components. These differences allow the Ultra37000 family to support
Consequently, Delta39K, Quantum38K, and PSI devices can- JTAG Boundary Scan testing. (Bus-hold latches could have
not directly follow an Ultra37000 or a FLASH370i device driving caused significant DC loading on the JTAG drivers of TCK and
5V within a scan chain cascade, since TDI will violate input TMS depending on the source impedance of the drivers and
voltage specs. Board-level solutions for interfacing Delta39K, the number of devices connected in the ISR chain. This could
Quantum38K or PSI I/Os to 5V is described in the Cypress occur because these signals, TCK and TMS, are connected
application note: “Interfacing Delta39K and Quantum38K in parallel to all the devices in the ISR chain.)
CPLDs to 5V Devices.”
An additional difference is that internal pull-up resistors are
These families, based on volatile SRAM technology, require enabled on the TDI and TMS JTAG pins when the ISR inter-
configuration at power-up prior to normal operation. I/Os are face is enabled. This change allows conformance to the IEEE
enabled only after configuration is complete. Up to this time, 1149.1 specification and is necessary to place the Test Ac-
I/Os are three-stated and can be subjected to live signals. For cess Port (TAP) controller of a JTAG device in a known benign
the case of a self-boot solution, the initial data stored on the state such as Test-Logic-Reset if solder open faults occur in
internal FLASH ensures I/Os three-state after device config- the ISR chain. The bus-hold latch is still permanently enabled
uration completes. For volatile devices requiring external con- on the JTAGen pin and powers up in the HIGH state. To de-
figuration, they will continually restart configuration cycles un- termine whether external resistors are needed we once again
til either a valid configuration bitstream is downloaded from must consider the single- and dual-function mode cases.
the boot EEPROM or JTAG instructions program the part.
More information on Delta39K configuration can be found in For single-function mode devices the only pin that needs an
the Cypress application note: “Configuring external resistor pull-down is the TCK pin since there are al-
Delta39K/Quantum38K.” ready internal pull-ups for TDI and TMS and the TDO pin is a
dedicated output pin.
Ultra37000 Family For dual-function mode devices operating in single-function
Ultra37000 devices support 5V or 3.3V I/Os (including the mode or dual-function mode no external pull-ups are neces-
ISR pins) since the I/O power supply, VCCIO, is split from the sary since the bus-hold latches are reconnected to the ISR
core power supply. Ultra37000V devices support only 3.3V, pins once the ISR interface is disabled.
yet have I/Os which are tolerant to 5V inputs.
9
Design Considerations for ISR Programming of Cypress CPLDs
The value of this pull-down resistor for TCK is not crucial since ISR design considerations involved and adherence to the rec-
the external JTAG pin driver simply has to be strong enough ommended layout and termination practices, a printed circuit
to overpower the resistor. Typical values are 10 kΩ or 4.7kΩ. board designer can implement a reliable method for device
reconfiguration or in-system test using boundary scan.
FLASH370i Family
The Cypress ISR PC programming cables provide the sim-
Like the Ultra37000 family, FLASH370i CPLDs have a separate plest method to build In-System Reprogrammability of pro-
I/O power supply, VCCIO, which can support 5V or 3.3V levels. grammable devices into systems. In-System Reprogramma-
Only the ISRPCCABLE can program an ISR chain containing bility (ISR) of a programmable device has several benefits. It
FLASH370i devices. This is because this cable alone produces allows engineering development and debugging to occur
the required 12V supervoltage on the ISRen pin required for without having to socket the ISR devices and without having
device programming. This cable, however, does not support to remove them and reprogram them in a device programmer.
3.3V ISR signaling so it cannot be used with any 3.3V ISR This saves time regardless of the package type used. ISR is
device like the Delta39K. especially valuable when fine-pitch packages like TQFPs and
Smaller FLASH370i packages contain pins which offer dual- FBGAs are used. This not only saves time, it can also avoid
mode functionality between ISR programming mode and nor- the high likelihood of bending leads on very fine-leaded de-
mal I/O mode, similar to the Ultra37000 family. The necessary vices. Also, by allowing soldering of TQFP packages directly
external logic to support dual functionality is detailed in Ap- onto a board without sockets, it helps to avoid spending time
pendix A. Specific design considerations with cascading sin- simply checking device-to-socket-lead connections during
gle- and dual-function Ultra37000 and FLASH370i devices are debugging. ISR also allows for designs which can be recon-
found in Appendix B. figured in the field, either by a software update or by other
input from the system. The superior routability and flexible
Additional FLASH370i device and board-level design consider- architecture of the Cypress ISR CPLDs enhance the value of
ations are found in Appendix C. all of these benefits greatly by allowing design changes to be
State of General Cypress ISR Device I/Os at Power-Up made during prototyping, debugging, or field operation and
still successfully route to the already-defined pinout, even on
When ISR devices are shipped from Cypress, the devices designs that utilize most or all of the device’s resources.
have already been programmed, erased, and programmed
again as part of the testing process. They will not, therefore, This application note explains the available Cypress program-
be blank when they first come out of the tube. They will, how- ming cables and the signals they use, and also covers many
ever, be programmed such that all of the I/Os are three-stated design techniques and considerations that show how to easily
after power-up. Furthermore, all I/Os (except TDO) are three- use the capabilities of ISR devices. These include: descrip-
stated during device programming. This allows soldering of tion of the logic needed when using the dual-function pins on
ISR devices directly onto a user’s board without having to applicable ISR devices, connecting ISR devices in a program-
erase them first. It allows the user to power-up a board and ming chain, and ISR differences between the programmable
program the ISR devices on it without worrying whether their logic device families.
initial, non-blank state will cause any problems such as output Designing a daisy-chain of ISR devices is straightforward pro-
contention with other devices on the board. vided that the designer follows the layout guidelines set forth
The ISR programming procedure is to take ISR devices di- in this document. By following the recommended layout prac-
rectly from the tube, solder them onto the board, connect the tices, board-level problems will be eliminated and a highly
programming source (such as the ISR programming cable reliable programming method results.
attached to a PC), turn on the power to the board, and then
program the devices for the first time. Since many of the I/Os References
on the ISR device(s) are undoubtedly inputs, other devices on 1. Cypress Application Note. “System Design Considerations
the board could be driving those pins immediately upon pow- When Using Cypress CMOS Circuits,” 1993.
ering up the system. By having all of the ISR I/Os initially
programmed to be three-stated, and by guaranteeing the 2. IEEE Std 1149.1-1990 Test Access Port and Boundary
same three-state during ISR programming, you are assured Scan Architecture, IEEE Computer Society, May 1990.
that the ISR device will not also drive those pins. This pre- 3. Johnson, H. and Graham M. “High-Speed Digital Design,”
vents bus contention, and prevents the ISR devices or other Prentice-Hall, Inc., 1993.
devices on the board from being damaged. ISR devices can
be programmed for the first time in-system without fear that
other board components driving the CPLD will negatively ef-
fect operation.
As previously discussed, all ISR device I/Os will initially three-
state after first power-up regardless of whether the CPLD
contains volatile or non-volatile configuration bits.
Summary
The In-System Reprogrammable feature of Cypress ISR de-
vices provides the critical capability to manipulate program-
mable device configuration without the need to desolder com-
ponents from a user’s board. With a good understanding of
10
Design Considerations for ISR Programming of Cypress CPLDs
Designs That Use Devices With Dual-Function Program- There are cases where you may need or want to take advan-
ming Pins tage of the dual functionality of the dual-function program-
ming pins. For example, you may not have enough I/O pins
There are two ways to design with devices that have dual- for your design if you do not use the dual-function ISR pro-
function programming pins. First, you could use the dual- gramming pins as I/Os when the device is in normal opera-
function pins as single-function pins. That is, you could decide tion. Other times, you may want to use the dual-function ISR
to use only the JTAG function of the pins and not use those
11
Design Considerations for ISR Programming of Cypress CPLDs
pins as I/Os in normal operation because their physical posi- the ISR device, and you do not want the normal operating
tion makes your board layout easier. If you want to do this in signal to drive, affect, or be affected by the programming logic
your design, you can do it fairly easily; it simply requires a little when the ISR device is operating normally in the system. The
bit of extra logic and some additional small components. This basic strategy in all of the cases listed above is to use three-
next section shows you how to do this. state buffers or multiplexers on these signals, and to have
The TDI, TCK, and TMS programming pins are all inputs to those buffers or multiplexers controlled by the ISR* signal
the device during programming, and they always share pins from the programming cable. The ISR* signal, recall, is a sig-
with bidirectional I/Os when they are dual-function pins. The nal from the programming cable that is a logic LOW when
TDO programming pin, on the other hand, is an output pin JTAGen is enabling the ISR interface.
from the device during programming. It, too, always shares a Dual-Function Mode Operation: I/O Pin Used as an Input
pin with a bidirectional I/O when it is a dual-function pin.
These I/O pins, in turn, can be used as input only, output only, First, consider the case of the ISR programming pins that are
or bidirectional I/Os in any design, based upon the function- inputs to the device during programming; TDI, TCK, and TMS.
ality that is described for these pins in the programmable logic When one of these device pins is being used as an input
chip’s design description. The result is that there are six dif- during normal operating mode, you simply have to select be-
ferent cases to consider: An ISR input programming pin (TDI, tween one of two inputs based on whether you are in pro-
TCK, TMS) can share a pin with a signal that is an input, an gramming mode or in operating mode. This is implemented
output, or an I/O; and you can have an ISR output program- very easily by using a 2:1 multiplexer where ISR* is the select
ming pin (TDO) sharing a pin with a signal that is an input, an line, as shown in Figure 14(a). Alternatively, you could imple-
output, or an I/O. We next look at each of these six cases ment this by having two three-state buffers whose inputs are
individually. TDI (or TMS or TCK) and signal, whose outputs are tied to-
gether and to the TDI/IO pin, and whose enable lines are
What you are trying to accomplish in all of these cases is controlled by opposite values of ISR*. This is shown in Figure
fundamentally the same. You are trying to isolate the pro- 14(b). One way you could implement this logic is with FCT-
gramming signals from the normal operating signals on the family devices. For example, you could use one of the four 2:1
board. You do not want the programming signal to drive or multiplexers in a 74FCT257T to implement the logic shown in
affect anything else on the board when you are programming Figure 14(a). Alternatively, you could use a pair of transceiv-
12
Design Considerations for ISR Programming of Cypress CPLDs
ers or pass-transistors from a 74FCT244T or a Texas Instru- The inverter shown in Figure 14(e) can be eliminated by im-
ments SN74CBT3384A, for example, to implement the logic plementing an inversion within the SN74CBT3384A device.
shown in Figure 14(b). The connections for the FCT257T, This requires using only an external resistor and a few addi-
FCT244T, and SN74CBT3384A are shown in Figure 14(c), tional connections. An inversion of the connection to pin BE1*
(d), and (e), respectively. To reduce unnecessary noise it is a is accomplished by connecting +5V to pin A1 and connecting
good idea to tie the unused inputs on the FCT devices to one end of a resistor to GND and the other end to pin B1. B1
ground instead of letting them float. is then the inverse of the input connected to BE1*, which is
TDI 0
TDI TDI/IO
TDI/IO
y
Signal 1 S
Signal
ISR
ISR* ISR
ISR*
ISR*
1
S
2
TDI I0a 4
3 TDI/IO
Ya
Signal I1a
FCT257T
DIP/SOIC/QSOP
ISR
1
ISR*
OEA
19
OEB
TDI 2
DA0 18 TDI/IO
OA0
Signal 17
DB0 3
OB0
FCT244T
DIP/SOIC/QSOP
ISR
1
ISR*
BE1
13
BE2
3
TDI 2
A0 TDI/I/O
14 B0 TDI/IO
Signal A5 15
B5
SN74CBT3384A
DIP/SOIC/QSOP
ISR
Figure 14. Design for Dual-Function Pins: TDI/TCK/TMS used with Input
13
Design Considerations for ISR Programming of Cypress CPLDs
TDI W
b1
X
Signal b2 b4 TDI/I/O
Y ISR
b3 b5
ISR*
dir
Figure 16. Design for Dual-Function Pins: TDI/TCK/TMS Used With an I/O
14
Design Considerations for ISR Programming of Cypress CPLDs
TDI TDI/I/O
b1
Signal b2
ISR
b3
ISR*
To understand why this is necessary, consider just combining The only difference is that TDO is an output during program-
the logic from Figure 14(b) and Figure 15. The result would ming mode instead of an input. Therefore, the only difference
be the logic shown in Figure 17, which is different from Figure in the logic is the orientation of some of the buffers. The
16 in that buffers b4 and b5 were eliminated and intermediate solutions for the TDO case are presented without further ex-
signals w, x, and y are now all simply connected together and planation. The logic diagram for the case where TDO is con-
to the TDI/IO pin. In the logic of Figure 17, when the ISR nected to an I/O used only as an input is shown in Figure 18.
device is in normal operation mode and ISR* is HIGH, buffers The logic diagram for the case where TDO is connected to an
b2 and b3 would both be enabled. If Signal were an input at I/O used only as an output is shown in Figure 19. The logic
that time, it would drive the input to buffer b2, whose output diagram for the case where TDO is connected to an I/O really
would drive the input to buffer b3. The output of buffer b3 used as a bidirectional pin is shown in Figure 20. You can
would be driving the input of b2 again, resulting in a feedback alternatively use the SN74CBT3384A solution presented in
loop that could produce undesired affects. The same thing Figure 14(e) in each of these three cases.
would happen if Signal were an output at that time.
Buffers b4 and b5 in Figure 16 prevent this. In the logic of
Figure 16, when signal is an output from the ISR device, b5
is enabled and b4 is disabled; when Signal is an input to the
device, b4 is enabled and b5 is disabled. In both cases, both
the function and value at the pin of the device and the function TDO TDO/I/O
and value of Signal are the same, correct, and only driven by
one source. There is no dangerous self-driving feedback sys-
tem like there is in Figure 17.
The limitation of this solution is that it requires the extra signal ISR
Signal
dir. This signal may be already available; in fact, it may be an
input to the ISR device itself for use as the OE-control on the
pin in question. If it is not already available, you will need to
generate it using other logic on the board. If you cannot do it
using other logic on your board, you should certainly be able ISR*
to generate it using logic inside the ISR device itself, because,
as pointed out above, it should be the same signal as the OE Figure 18. Design for Dual-Function Pins:
used on that pin internally. To get the signal out of the ISR, TDO Used With an Input
however, requires an additional pin. If you are using the logic
in Figure 16 to save a pin, having to use a pin on the device
to generate dir will not gain you anything. If generating one dir TDO TDO/I/O
will help you save two or three pins by allowing you to use two
or three of TDI, TCK, and TMS as dual-function pins, then you
will still have a net savings of one or two pins and it may be
worth it.
As was mentioned in the case where the TDI (or TMS or TCK) Signal
dual-function pin was being used with an input-only pin or with
an output-only pin, you can also use the SN74CBT3384A so- ISR
lution of Figure 14(e) when trying to use the TDI (or TMS or
TCK) dual-function pin as a bidirectional I/O pin in normal ISR*
operating mode.
The logic for using the dual-functionality of the TDO/IO pin is Figure 19. Design for Dual-Function Pins:
essentially the same as is shown in the above three cases. TDO Used With an Output
15
Design Considerations for ISR Programming of Cypress CPLDs
TDO TDO/I/O
Signal
ISR
ISR* dir
Figure 20. Design for Dual-Function Pins: TDO Used With an I/O
Dual-Function Summary
To summarize this section, there are many ways to accom-
plish programming when using devices with dual-function
pins. The easiest way to use the dual-function device is in
single-function mode. This uses the dual-function pins as pro-
gramming pins only, and is easily accomplished using the
pin_avoid and pin_numbers directives in the Warp design file.
There are also going to be cases where you will want to use
the dual-functionality, most likely because you need some or
all of the four ISR programming pins as inputs, outputs, or
I/Os during normal operation to get all the signals you need
into and out of the device for your design. The circuits needed
to share these pins are relatively straightforward and require
only buffers or pass-transistors. These are circuits you can
implement using FCT or other logic, or you may be able to
implement them using extra gates and pins of an ASIC,
FPGA, or another PLD you already have on the board.
16
Design Considerations for ISR Programming of Cypress CPLDs
ISR Programming
Cable Connector
JTAGen ISRen
TDI TDI CY7C374i
TDO TDO PLCC
TCK TCK
TMS TMS
TDI Ultra37512
TDO BGA
TCK
TMS
JTAGen
TDI Ultra37256
TDO TQFP
TCK
TMS
17
Design Considerations for ISR Programming of Cypress CPLDs
tion devices. For the FLASH370i it is permissible to actually let JTAGen pin. Again the need for external biasing may not be
the JTAGen pin float to retain the I/O capability of dual-mode needed in many case because of the pull-down device incor-
pins. For the Ultra37000 devices this pin must be driven to a porated on the Ultra37128 devices and smaller and to be in-
LOW level to ensure the I/O functionality. For Ultra37128 and cluded on the Ultra37256 as well.
smaller devices a weak pull-down device replaces the bus-
hold latch on the JTAGen pin. This pull-down device (see the Using an External Component to Drive the JTAGen Pin
data sheet parameter IJTAG, which shows the strength of the LOW to Use the I/O Function of the Dual-Function Pins
pull-down device) keeps the pin in the LOW state after pro- The JTAGen pin can be driven LOW using any of the solutions
gramming and prevents the need for external biasing on the already presented in Figure 14 regarding using the dual-
JTAGen pin if a Ultra37000 device replaces a FLASH370i de- function pins in dual-function mode. The only difference is that
vice. Early Ultra37256P160 silicon did not have this pull down the JTAG input is JTAGen, which is tied to VCC instead of one
device on the JTAGen pin but more recent silicon has this of the four JTAG pins and the “signal” input is connected to
device. If the pull-down device is not employed then a bus- ground. You may be able to use unused resources in the ex-
hold latch is employed and this latch could hold a HIGH value ternal component solutions presented in Figure 14 to imple-
on the pin. With multiple devices in the chain, some devices ment this logic. Any of these solutions can be used for multiple
being Ultra37128 and smaller and some being Ultra37000 devices ganged together. Figure 22 shows two
Ultra37256P160 early silicon or FLASH370i devices, it is still examples for driving the JTAGen pin from the control of signal
possible for the JTAGen pin to be pulled into the HIGH state. ISR*. As mentioned before, a pull-up resistor is also needed
Two methods for driving the JTAGen pin LOW, using a exter- on the ISR* signal at the 10-pin header connector.
nal pull-down resistor and using an external component are
presented.
Rpulldown = Vtrip/(N*(IBHHO))
where Vtrip is 1.5V and IBHHO is –500 µA (maximum current Figure 22. JTAGen Driven for the Ultra37000
that is guaranteed to invert the state of a single bus-hold
latch). Rpulldown is 3 kΩ for 1 device, 600Ω for 5 devices, and Figure 23 shows the JTAGen pin driven by an extra I/O pin of
300Ω for 10 devices in the chain. It is recommended that the the Ultra37000 device by simply inverting the ISR* control
number of devices in the chain be limited to 5 devices if the signal. This would seem to be a simple alternative to adding
other devices in the chain are all FLASH370i devices. The extra components. This solution, however, won’t work. The
above limitation of 5 devices in the chain is suggested be- problem is that the I/O pins of the device enter three-state
cause the resistor value would need to be reduced which when the ISR mode is enabled (JTAGen driven HIGH). Be-
would place too high a DC current load on the JTAGen signal cause the I/O is three-stated there is no way to drive the
driven to 12V from the ISR cable. With a pull-down resistance JTAGen pin LOW. The dual-function pins are stuck in the
of 600Ω, the DC current load on the JTAGen pin is 12/600 or JTAG function because the bus-hold latch, which is always
20 mA, which is an acceptable load. Resistor values less than enabled, has latched a HIGH level on the pin. Figure 24
600Ω would require a higher wattage resistor than the stan- shows how to combine dual-function FLASH370i and
dard 1/4 watt rating, assuming 12V is needed for program- Ultra37000 devices in the same chain with the appropriate
ming FLASH370i devices in the same chain. If only JTAGen connections assuming the user wants to use one
Ultra37256P160 early silicon devices are in the chain and the dual-function pin in dual-function mode for each of the
UltraISRPCCABLE is used then the JTAGen pin only goes to Ultra37000 devices. The figure shows that one mux can be
a TTL HIGH so the number of devices in the chain can be used for two Ultra37000 devices but many more devices can
increased to 10. The above restriction of the pull-down resis- use the same mux output signal. In this example the TMS pin
tor can be avoided by using an external component to choose on both Ultra37000 devices is used in dual-function mode
between a TTL HIGH level and a TTL LOW level on the where the I/Os are used as JTAG pins and as input pins. The
18
Design Considerations for ISR Programming of Cypress CPLDs
ISR Programming
Cable Connector
JTAGen ISRen
TDI TDI
TDO TDO CY7C375i-125AC
TCK TCK
TMS TMS
ISR* vcc
0 y
JTAGen
1
vcc S TDI Ultra37128P160
10 kΩ
TDO
TCK
0 y TMS
input1
1
S
JTAGen
TDI
Ultra37256P160
TDO
TCK
S
0 y TMS
input2
1
Figure 24. Cascading Dual-Function Ultra37000 and FLASH370i Devices in the Same Chain
19
Design Considerations for ISR Programming of Cypress CPLDs
In-System Reprogrammable, ISR, FLASH370i, Delta39K, Quantum38K, Ultra37000, Programmable Serial Interface, and PSI are
trademarks and Warp is a registered trademark of Cypress Semiconductor Corporation.
PAL is a registered trademark of Advanced Micro Devices.
© Cypress Semiconductor Corporation, 2001. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use
of any circuitry other than circuitry embodied in a Cypress Semiconductor product. Nor does it convey or imply any license under patent or other rights. Cypress Semiconductor does not authorize
its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress
Semiconductor products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress Semiconductor against all charges.