Programming mode selection with jtag circuits

Abstract: A technique to provide higher system performance by increasing amount of data that may be transferred in parallel is to increase the number of external pins available for the input and output of user data (user I/O). Specifically, a technique is to reduce the number of dedicated pins, leaving more external pins available for user I/O. The dedicated pins used to implement a function such as the JTAG boundary scan architecture may be also be used to provide other functionality, such as to select the programming modes. In a specific embodiment, a JTAG instruction code that is not already used for a JTAG boundary scan instruction stored in an instruction register (220) may be used to replace the programming mode select pins (252) in a programmable logic device (PLD).

Description: BACKGROUND OF THE INVENTION The present invention relates to the field of integrated circuits, and more specifically to techniques to effectively provide greater number of external pins for input and output of data. Semiconductor technology continues to improve. This technology allows greater and greater functionality to be provided by a single integrated circuit or "chip." Signals are input to and output from the chip using external pins or pads. The chip interfaces to external circuitry, possibly on other chips, using the external pins. The performance of a system depends in part on the amount or rate at which data can be transferred on and off the chip. This transfer rate may be referred to as the data bandwidth. One technique for increasing system performance is to provide more rapid transfer rates. This may be accomplished by improvements in process technology or circuit design. Another technique to increase system performance is to transfer a greater amount of data at one time (or "in parallel"). Therefore, for greater performance, it is important there are many external pins available for input and output of user data. In an integrated circuit, certain pins are sometimes dedicated to functions other than user data I/O. For example, in a programmable integrated circuit such as a PLD or FPGA, some pins may be dedicated to the programming and testing (such as JTAG boundary scan testing) of the device. These dedicated external pin reduce the number of pins available for user I/O. The performance of the chip may be detrimentally affected since not as many user I/O signals may be transferred in parallel. Consequently, there is a need for techniques of effectively providing greater number of external pins for input and output to obtain higher performance. Specifically, there is a need for techniques to reduce the number of external pins dedicated to functions other than user I/O, which would make greater number of external pins available for the input and output of user data. EP-A- 0639006 describes an in-system programmable device, in which in-system programming and boundary scan testing are performed using the same pins, by means of a control logic block that controls JTAG testing and programming of the device. SUMMARY OF THE INVENTION The present invention is a technique to provide higher system performance by increasing the amount of data that may be transferred in parallel by increasing the number of external pins available for the input and output of user data (user I/O). One technique is to reduce the number of dedicated pins used for functions other than user I/O, leaving more external pins available for user I/O. The dedicated pins used to implement a function such as the JTAG boundary scan architecture may be also be used to provide other functionality, such as to select the programming modes. In a specific embodiment, a JTAG instruction code that is not already used for a JTAG boundary scan instruction may be used to replace the programming mode select pins in a programmable logic device (PLD). In a technique of the present invention, the JTAG instruction used to replace the mode pins is shifted into a JTAG instruction register as are regular JTAG instructions. A JTAG boundary scan control logic block generates control signals to a programming mode decoder. Based on the instruction, the programming mode decoder selects the proper programming mode, and generates the appropriate programming mode signals. The programming mode signals are provided to the programming circuitry, and integrated circuit will be appropriately configured. In a specific implementation, each single bit of the JTAG instruction code may be used to replace one programming mode select pin. In another implementation, the whole JTAG instruction code may be used to replace one mode select pin after instruction decoding. Technically, by doing this, many, or all, the mode pins can be eliminated, thus increasing the number of total available I/O pins. This concept provides advantages compared to JTAG programming and in-system programming (ISP) in such a way that a PLD device may be configured for different modes including test, scan, and programming modes. The advantages of using JTAG instructions to replace programming the mode select pins of a programmable integrated circuit include saving device package costs and leaving space for more user I/Os. Overall, this increases the available functionality and value of the devices. There is relatively little cost to implement the circuits to implement PLD programming mode selection with JTAG circuits. In a specific embodiment, the present invention is a method of configuring a programmable integrated circuit. An instruction is provided to a JTAG instruction register. The instruction is passed to a JTAG boundary scan control logic block. The JTAG boundary scan control logic block generates a control signal. The control signal is passed to a programming mode decoder. Based on the control signal, a programming mode signal is generated to place the programmable integrated circuit in a configuration mode. Further, the present invention is a programmable integrated circuit including a JTAG state machine; an instruction register coupled to the JTAG state machine; a JTAG boundary scan control logic block coupled to the instruction register; and a programming mode decoder coupled to receive a mode signal from the JTAG boundary scan control logic block. Another aspect of the present invention includes the use of JTAG circuitry resident on a programmable integrated circuit to select a programming mode of the integrated circuit. Further, the present invention includes the use of an instruction input to a JTAG instruction register, where this instruction is not used to perform a IEEE 1149.1 standard function, to place a programmable integrated circuit into a specific programming mode identified by the instruction. A still further aspect of the present invention is the use of JTAG circuits on a programmable logic device to place the programmable logic device in a configuration mode. Other objects, features, and advantages of the present invention will become apparent upon consideration of the following detailed description and the accompanying drawings, in which like reference designations represent like features throughout the figures. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 shows a digital system incorporating a programmable logic device; Figure 2 shows an implementation of programming mode selection using JTAG circuitry; Figure 3 shows an implementation of JTAG boundary scan control logic circuitry; Figure 4 shows an implementation of a programming mode decoder; and Figure 5 shows a flow diagram of a technique for configuring an integrated circuit. DESCRIPTION OF THE SPECIFIC EMBODIMENTS Figure 1 shows a block diagram of a digital system. The system may be provided on a single board, on multiple boards, or even within multiple enclosures linked by electrical conductors or a network (e.g., a local area network or the internet). This digital system may be used in a wide variety of applications and industries including networking, telecommunications, automotive, control systems, consumer electronics, computers, workstations, military, industrial, digital processing, and many others. In the embodiment of Figure 1, a processing unit 101 is coupled to a memory 105 and an I/O 111. Further, a programmable logic device (PLD) 121 is incorporated within this digital system. PLD 121 may be specially coupled to memory 105 through connection 131 and to I/O 111 through connection 135. Programmable logic devices (PLDs) are sometimes also referred to as PALs, PLAs, FPLAs, CPLDs, EPLDs, EEPLDs, LCAs, or FPGAs. PLDs are well-known integrated circuits that provide the advantages of fixed integrated circuits with the flexibility of custom integrated circuits. Such devices allow a user to electrically program standard, off-the-shelf logic elements to meet a user's specific needs. See, for example, U.S. Patent 4,617,479. Such devices are currently represented by, for example, Altera's MAX® and FLEX® series of devices. The former are described in, for example, U.S. Patents 5,241,224 and 4,871,930, and the Altera Data Book, June 1996, all incorporated herein by reference in their entirety for all purposes. The latter are described in, for example, U.S. Patents 5,258,668, 5,260,610, 5,260,611, and 5,436,575, and the Altera Data Book , June 1996. Processing unit 101 may direct data to an appropriate system component for processing or storage, execute a program stored in memory 105 or input using I/O 111, or other similar function. Processing unit 101 may be a central processing unit (CPU), microprocessor, floating point coprocessor, graphics coprocessor, hardware controller, microcontroller, programmable logic device programmed for use as a controller, or other processing unit. Memory 105 may be a random access memory (RAM), read only memory (ROM), fixed or flexible disk media, PC Card flash disk memory, tape, or any other storage retrieval means, or any combination of these storage retrieval means. PLD 121 may serve many different purposes within the system in Fig. 1. PLD 121 may be a logical building block of processing unit 101, supporting its internal and external operations. PLD 121 is programmed or configured to implement the logical functions necessary to carry on its particular role in system operation. In a PLD, the number of available external pins limits the amount of data that may be input and output of the PLD at the same time. The number of available external pins depends in part on the size and configuration of the package selected. Although larger package sizes provide greater numbers of external pins, it may not be desirable to use a larger package size since it will be more expensive, use more board space, and may have increased parasitics. Therefore, it is important to maximally use the available external pins for a given package. On a typical PLD, some pins are dedicated for a particular purpose and other pins (i.e., I/O pins) are for input and output of logical data. For example, dedicated pins may be for testing or configuring the PLD. I/O pins are used to input and output user data. Dedicated pins cannot generally be used for user I/O. Therefore, the number of dedicated pins reduces the pins available for user I/O. Saving even a single dedicated pin, and using this pin instead for user I/O, may provide a great cost savings. For example, saving a single dedicated pin may avoid the use of the next larger package size. In a PLD, there are typically dedicated pins for configuration and for testing. Configuration signals (e.g., pattern information) are input via a first set of dedicated pins. Test instructions and data (e.g., JTAG information) are input via a second set of dedicated pins. A technique to reduce the number of dedicated pins is to share the dedicated pins used for configuration and testing. The same amount of functionality would then be obtained using fewer dedicated pins This would increase the available number pins for user I/O. Although described with respect to PLDs, the techniques of the present invention are also applicable to other types of integrated circuits such as ASICs, microprocessors, and memories where it is desirable to reduce the number of dedicated pins and instead use these pins for user I/O. Figure 2 shows a specific embodiment of the present invention. Figure 2 shows a block diagram of JTAG circuitry and programming mode selection circuitry. JTAG circuitry is discussed in some detail in Altera's Application Note 39, "IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices," November 1995. In brief, the JTAG circuitry implements the IEEE 1149.1 specification or boundary-scan testing architecture. The JTAG circuitry can test pin connections without using physical test probes and can capture functional data while a device is operating normally. The circuitry has JTAG dedicated pins TMS, TRST, TCLK, TDI, and TDO. Note that TRST pin may not be present in some embodiments. The TMS, TRST, and TCLK pins are coupled to a JTAG state machine 210. JTAG state machine 210 is a state machine providing output signals SHFTIR, CLKIR, UPDTIR, SHFTDR, CLKDR, and UPDTDR based on the TMS, TRST, TCLK inputs. JTAG state machine 210 controls the sequential operation of the circuitry. TDI is a serial input to an instruction register 220, and TDO is a serial output. JTAG state machine 210 controls the serially shifting of an instruction from TDI into instruction register 220. The instruction may be serially shifted out through TDO. Further, the instruction may also be output in parallel via INST0, INST1, and INST2 lines. In the JTAG circuitry, there are also data registers (such as a boundary-scan register) that are not explicitly shown in Figure 2. A description of the JTAG data registers may be found in Application Note 39. The instruction is coupled to a JTAG boundary control scan control logic 230 via parallel INST0, INST1, and INST2 lines. JTAG boundary scan control logic 230 generates JTAG scan control signal 235. JTAG scan control signals 235 are routed to the appropriate JTAG circuitry to control JTAG operation. Further, JTAG boundary scan control logic 230 also generates a mode select signal 240 provided to a programming mode decoder 250. Programming mode decoder also has inputs from mode select pin 1 (252) and mode select pin 2 (253), and generates programming mode signals 255. Figure 3 shows a specific implementation of circuitry within JTAG boundary scan control logic 230. The input signals are INST0, INST2, NINST0, NINST1, and NINST2. NINST0, NINST1, and NINST2 are the complements of INST0, INST1, and INST2, respectively. For example, NINST0, NINST1, and NINST2 may be obtained by inverting the INST0, INST1, and INST2 using inverters. Output signals are JTEST, SAMPLE, and EXTEXT. The circuitry includes NAND gates 310, 320, and 330. NAND gate 310 has as inputs NINST0, NINST1, and INST2. NAND 310 couples to an inverter 340 to output JTEST. NAND gate 320 has as inputs INST0, NINST1, and INST2. NAND 320 couples to an inverter 350 to output SAMPLE. NAND gate 330 has as inputs NINST0, NINST1, and NINST2. NAND 330 couples to an inverter 360 to output EXTEST. The JTAG boundary scan control logic 230 circuitry determines which mode the PLD will be in based on the instruction input by the user. In this embodiment, the instruction has three bits, INST0, INST1, and INST2. In other embodiments, there may be more or less than three bits depending on the desired number of different instructions. For example, in some embodiments, the instruction has ten bits. With three bits, up to eight different instructions can be implemented. With ten bits, up to 2 10 different instructions can be implemented. The circuitry in Figure 3 decodes the instructions as follows. A "001" indicates a JTEST mode (where INST0 is 0,-INST1 is 0, and INST2 is 1). A "101" indicates a SAMPLE mode. A "000" indicates an EXTEST mode. SAMPLE and EXTEST are JTAG modes. JTEST is a configuration or programming mode. Therefore, by using the same dedicated pins are used to input JTAG instructions, a programming mode may also be indicated. This means a separate dedicated pin to indicate a programming mode is not needed, thus saving a dedicate pin which may be used instead for user I/O. Furthermore, there may be other JTAG modes (not shown in Figure 3) such as BYPASS which is typically indicated by a "111" instruction. In the SAMPLE and EXTEXT modes, the corresponding SAMPLE and EXTEST signals will be logic high. And, in the JTEST mode, the JTEST signal will be a logic high. SAMPLE and EXTEXT are examples of JTAG control signals 235. JTEST is an example of mode select signal 240. Figure 4 shows circuitry for programming mode decoder 250. Inputs are ENA, JTEST, and MSEL. ENA is an enable signal to enable decoder 250. JTEST is generated by JTAG boundary scan control logic 230 (such as the circuitry shown in Figure 3). MSEL is representative of mode select pins 252 and 253. However, the implementation Figure 4 only shows one mode select pin in order to illustrate the principles of the present invention. In practice, there may be as many or as few mode select pins as desired to obtain the number of desired modes. Outputs of decoder 250 are TEST, SCAN, ASYNC-SERIAL, and SERIAL. These signals are routed to the appropriate programming circuitry to configure the PLD. The programming circuitry may generate high voltages such as those used in the programming of Flash, EEPROM, EPROM, and other nonvolatile memory cells. The programming circuitry may also be used to configure other types of memory cells such as SRAM and DRAM cells. The circuitry includes NAND gates 410, 420, 430, and 440. NAND gate 410 has inputs JTEST, ENA, and MSEL. NAND gate 410 outputs through a pair of serially coupled inverters to generate TEST. NAND gate 420 has inputs JTEST, ENA, and BB (i.e., complement of MSEL). NAND gate 420 outputs through a pair of serially coupled inverters to generate SCAN. NAND gate 430 has inputs CB (i.e., complement of JTEST), ENA, and MSEL. NAND gate 430 outputs through a pair of serially coupled inverters to generate ASYNC-SERIAL. NAND gate 440 has inputs CB, ENA, and BB. NAND gate 440 outputs through a pair of serially coupled inverters to generate SERIAL. In operation, a "test" programming mode is entered when ENA is high, JTEST is high, and MSEL is high. A "scan" programming mode is entered when ENA is high, JTEST is high, and MSEL is low. An "async-serial" programming mode is entered when ENA is high, JTEST is low, and MSEL is high. A "serial" mode is entered when ENA is high, JTEST is low, and MSEL is low. In practice, there are many implementations of the boundary scan control logic circuitry 230 and programming mode decoder 250 shown in Figures 3 and 4. Other implementations may use other selections for the decoding and other logical structures including AND and OR gates or look-up tables, to name a few examples. For example, other specific instructions may be used to indicate a programming mode. Standard JTAG instructions are identified by 101, 000, and 111. Consequently, a programming mode control signal may be implemented by using an instruction not already used by JTAG. The available instructions are 001, 010, 011, 100, and 110. In Figure 3, the choice of the specific instruction to indicate the JTEST programming mode was 001. However, any of the other available instructions could have been selected, and the appropriate changes made to the circuitry. Furthermore, Figure 3 only shows a single JTEST programming mode; however, circuitry may provide for more than one programming mode signal. With a 3-bit instruction, there can be up to five programming mode instructions. The circuitry can be modified to provide more than one programming mode instruction, and thus save greater numbers of dedicated mode select pins. The circuitry shown in Figures 3 and 4 illustrates (by way of an specific example) a technique to eliminate one mode select pin by implementing a JTEST instruction. The JTEST instruction is recognized by the JTAG circuitry to indicate a programming mode. Using the JTEST signal, programming mode decoder 250 provides four modes, taking as input only one dedicated mode select pin. Without the JTEST instruction, two dedicated mode select pins would have been required to have four different programming modes. The JTEST instruction saves one mode select pin. Therefore, using the technique of the present invention, fewer dedicated pins are required to implement the programming modes, leaving more external pins for user I/O. In further embodiments of the present invention, dedicated pins to indicate the programming modes may be eliminated altogether. In that case, the programming modes would be determined entirely by the instruction in instruction register 220. And there may be multiple JTEST signals. For example, an instruction may be decoded to provide JTEST1, JTEST2, and JTEST3 signals used to distinguish between up to eight programming modes. As discussed above, the number of available programming modes depends on the number of available instructions not being used to implement JTAG modes. The techniques and circuitry of the present invention are also applicable for in-system programming (ISP) of a PLD, where the PLD is programmed while resident on a printed circuit board. Figure 5 shows a flow diagram of a technique of the present invention. The technique of the present invention permits the programming or configuration of an integrated circuit using the JTAG circuitry. In a step 501, an instruction is input into JTAG instruction register 220 of the integrated circuit. The instruction may be serially shifted in via the TDI pin according to the control signals from JTAG state machine 210. In a specific embodiment, the instruction may have three bits INST0, INST1, and INST2 In a step 505, the instruction in the instruction register is decoded. The instruction is passed in parallel to JTAG boundary scan control logic 220. JTAG boundary scan control logic 220 generates the appropriate control signal to indicate a JTAG mode or a programming mode. For example, SAMPLE and EXTEST are JTAG modes, and JTEST is a programming mode. In a step 510, the JTEST signal is generated by JTAG boundary scan control logic 220 to indicate a programming mode. The JTEST signal may be implemented using an available instruction which is not used as a JTAG instruction. In a step 515, the JTEST signal is passed to programming mode decoder 250. In a step 520, using the JTEST signal, the programming mode decoder 250 generates programming mode signals 255 (such as TEST, SCAN, ASYNC-SERIAL, and SERIAL) that are passed to the programming circuitry. Based on programming mode signals 255, the integrated circuit will be configured by the programming circuitry. The configuration of the integrated circuit may be in an in-system programming (ISP) mode.

Claims: A method of configuring a programmable integrated circuit comprising: providing an instruction to a JTAG instruction register (501), passing the instruction to a JTAG boundary scan control logic block wherein the JTAG boundary scan control logic generates JTAG scan control signals; generating in the JTAG boundary scan control logic block a control signal (510); characterized by passing the control signal to a programming mode decoder; and based on the control signal, generating a programming mode signal to place the programmable integrated circuit in a configuration mode (520). The method of claim 1 wherein the instruction is not an instruction according to the JTAG IEEE Standard 1149.1. The method of claim 1 wherein the instruction is shifted serially into the JTAG instruction register. The method of claim 1 wherein the instruction is passed in parallel to the JTAG boundary scan control logic block. The method of claim 1 wherein the control signal is not a JTAG scan control signal. The method of claim 1 further comprising: in the configuration mode, loading configuration information into the programmable integrated circuit through non-JTAG external pins. The method of claim 1 wherein the programming mode signal is generated by the programming mode decoder. The method of claim 1 wherein the programming mode decoder is enabled by an enable signal. The method of claim 1 wherein the JTAG boundary scan control logic block outputs the JTAG scan control signals on a first signal line and the programming mode decoder outputs the programming mode signals on a second signalline. The method of claim 1 wherein the number of configuration modes is not limited by a width of the instruction according to the JTAG IEEE Standard 1149.1. A programmable integrated circuit comprising: a JTAG state machine (210); an instruction register (220) coupled to the JTAG state machine (210); a JTAG boundary scan control logic block (230) coupled to the instruction register (220); characterized by a programming mode decoder (250) coupled to receive a mode signal (240) from the JTAG boundary scan control logic block (230). The programmable integrated circuit of claim 11 wherein the programming mode decoder (250) generates a programming mode signal (255) based on the mode signal and a mode select pin (252, 253) input. The programmable integrated circuit of claim 11 wherein the programmable integrated circuit is placed in a configuration mode based on aninstruction in the instruction register (220), and the instruction is not an instruction according to the JTAG IEEE Standard 1149.1. The programmable integrated circuit of claim 11 wherein the JTAG boundary scan control logic block (230) comprises: a plurality of NAND gates (310, 320, 330), one NAND gate to generate each of a plurality of JTAG scan control signals and the mode signal, wherein each bit of the instruction is coupled in parallel to the plurality of NAND gates. The programmable integrated circuit of claim 14 wherein only one of the plurality of JTAG scan control signals or the mode signal is asserted based on the instruction. The programmable integrated circuit of claim 11 wherein the programming mode decoder (250) comprises: a plurality of NAND gates (410, 420, 430, 440), one NAND gate to generate each of a plurality of programming mode signals, wherein the mode select signal and an external mode select input is coupled to the plurality of NAND gates. The programmable integrated circuit of claim 16 wherein an enable signal is coupled to the plurality of NAND gates (410, 420, 430, 440) to enable the plurality of programming mode signals. The programmable integrated circuit of claim 16 wherein only one of the programming mode signals is asserted based on the mode select signal and the external mode select signal. The programmable integrated circuit of claim 11 wherein every programming mode of the programmable integrated circuit is selectable by providing an appropriate instruction to the instruction register. The programmable integrated circuit of claim 11, wherein the programming mode decoder is coupled to receive an enable signal from the JTAG boundary scan control logic block. The programmable integrated circuit of claim 11, wherein a JTAG scan control signal is coupled to the JTAG boundary scan control logic block on a first signal line (235) and a programming mode signal is coupled to the programming mode decoder on a second signal line (240). The programmableintegrated circuit of claim 11, wherein the programming mode decoder is coupled to non-JTAG external pins.

Inventors: CLIFF RICHARD G, HUANG JOSEPH, NGUYEN KHAI, SUNG CHIAKANG, WANG BONNIE, WANG XIAOBAO, CLIFF, RICHARD G., HUANG, JOSEPH, NGUYEN, KHAI, SUNG, CHIAKANG, WANG, BONNIE, WANG, XIAOBAO
Applicants: ALTERA CORP, ALTERA CORPORATION
Application year: 1998
Main classification: G01R31
IPC codes: G01R31, H03K19, G06F11