Method for simultaneous programming of in-system programmable integrated circuits

Abstract: Multiple in-system programmable devices are connected in series to a programming controller for simultaneous programming. One embodiment puts all such in-system programmable devices in programming mode, and to receive programming data and programming instruction simultaneously. In that configuration, all devices begins programming and stops programming simultaneously.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates to programmable integrated circuits, and in particular, the present invention relates to techniques for programming multiple programmable devices simultaneously. 2. Discussion of the Related Art Electronique Radioplan, nr. 569, April 1995, pages 23-27, "La programmation 'Daisy Chain' des composants isp Lattice", discloses a plurality of in-system programmable integrated circuits (isp devices) connected to a computer using a daisy chain configuration. This document provides a mere description of the arrangement and premisses that are required to perform the programming of all of the devices at the same time. Programmable devices that can be programmed and reprogrammed without being removed from its application environment are widely preferred because programming and reprogramming of such devices can be performed with ease. One type of such devices is the "In-system programmable logic devices" or "ISP PLDs", available from Lattice Semiconductor Corporation. (To simplify reference, in the following description, such and similar devices are all referred to as "ISP PLDs". It should be understood, however, that the teachings in the following description are applicable to all types of field programmable devices, including programmable logic devices, programmable memories, and programmable analog circuits). The design and use of ISP PLDs are disclosed in the prior art, e.g. (i) U.S. Patent 5,329,179 entitled "Arrangement For Parallel Programming Of In-system Programmable IC Logical Devices", to Tang et al, filed on October 5, 1992 and issued on July 12, 1994. (ii) U.S. Patent 5,237,218, entitled "Structure and Method for Multiplexing Pins for In-system Programming", to G. Josephson et al, filed on May 3, 1991 and issued on August 13, 1993; (iii) U.S. Patent 4,879,688, entitled "In-system Programmable Logic Devices" to Turner et al, filed on May 13, 1986, issued on Nov. 7, 1989; and (iv) U.S. Patent 4,855,954, entitled "In-system Programmable Logic Device with Four Dedicated Terminals" to Turner et al, filed on October 25, 1988, and issued on August 8, 1989. In the prior art, each ISP PLD in a system board containing multiple ISP PLDs is individually and sequentially programmed. To program multiple ISP PLDs simultaneously requires both additional hardware and special configurations of the ISP PLDs. For example, where simultaneous programming of multiple ISP PLDs is possible, additional circuits for signal multiplexing are typically required. When devices in an application are programmed individually and sequentially, the devices to be programmed are chained serially and hence the total programming time of the serial chain of devices is the sum of the times required to program each device individually. An ISP PLD contains a large number of programmable logic components, e.g. the "min-terms" of a programmable gate array. In some ISP PLDs, a linear address space is provided, and the programmable logic components of an ISP PLD are programmed in ascending address order until all the programmable logic components of the entire ISP PLD are programmed. Thus, even when simultaneous programming is provided, the total programming time of a system board is often determined by the sum of the time required to program that ISP PLD on the system board which has the most number of programmable components, and the time required to send data to all the ISP PLDs of the serial chain. In the prior art, a "programming command generator" is given a data file which contains only the pattern necessary to program the ISP PLDs on a given system board. The programming command generator derives from the data file all the device dependent parameters, and provides the commands for the programming to occur. SUMMARY OF THE INVENTION In accordance with the present invention, a method according to claim 1 is provided. According to an embodiment of the present invention, such method includes the steps of: (i) connecting field programmable devices serially in a chain configuration; (ii) constructing a data stream file which contains a data stream for programming the field programmable devices simultaneously, such that the programmable devices are simultaneously scheduled under the data stream (a) to receive instructions, (b) to shift programming data into the field programmable devices, (c) to execute instructions and (d) to shift data out of the field programmable devices; (iii) retrieving from each of a number of program data files, for each of the field programming devices, an individual programming data stream; (iv) filling the data stream file with programming data from each of the individual programming data streams thus retrieved; and (v) programming the field programmable devices simultaneously using the data stream file thus composed. In accordance with a further embodiment of the present invention, the individual programming data stream includes programming instructions and programming data. Under this further embodiment, programming data are sorted such that rows having a predetermined data pattern (e.g. all '1's) are placed behind rows not having the predetermined data pattern. In one embodiment, the predetermined data pattern corresponds to a default data pattern of the field programmable device when it is unprogrammed. In accordance with the present invention, programming for such rows can be omitted. The present invention achieves the advantage of programming simultaneously the devices in a serially connected chain of field programmable devices, thereby minimizing total programming time. The present invention achieves such advantage using conventional programming hardware without requiring additional circuitry. In accordance with one embodiment of the present invention, the devices programmed by the method of the present invention are not necessarily programmed in ascending or descending address order. By grouping programming data units (e.g. rows) in accordance to whether a predetermined pattern exists in the programming data in a given programming unit, so as to allow such programming unit to be omitted, minimum programming time can be realized. In the present invention, substantial savings in programming time can be achieved by omitting programming in such programming unit having such predetermined data pattern. The present invention further reduces programming time by lining up the addresses of rows which do not require programming. This invention simplifies the software program portion of a programming command generator by the use of a composite file (ispSTREAM file) which includes the ID stream, the address stream, the instruction stream and the programming data stream. When applying these data streams to multiple ISP PLDs simultaneously, setup times of the serially connected ISP PLDs are common, thereby achieving substantial savings in programming time. In accordance with yet another embodiment of the present invention, a data file is prepared representing a data stream including programming data bit patterns, programming addresses and programming instructions. Preparation of such a data file simplifies the task for the Programming Command Generator. The present invention is better understood upon consideration of the detailed description below and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 shows an array map of an ispGAL22V10 device. Figure 2 shows an array map of an ispLSI 1016 device. Figure 3 shows an array map of an ispLSI 1032 device. Figure 4 shows an embodiment of the present invention in which three ISP PLDs 401, 402 and 403 are connected to a programming command generator 404. Figure 5 shows a configuration description file 500 for specifying programming of the ISP PLDs 401, .402 and 403 of Figure 4. Figure 6 is a JEDEC file illustrative of the "22V10.jed" file referenced in Figure 5 for ISP PLD 401. Figure 7 is a JEDEC file illustrative of the "1016.jed" file referenced in Figure 5 for ISP PLD 402. Figure 8 is a JEDEC file illustrative of the "1032.jed" file referenced in Figure 5 for ISP PLD 403. Figure 9 illustrates the composite array map for serially connected chain 400 of Figure 4. Figure 10a shows actual instructions and program data bits, which are derived from the JEDEC files of Figures 6-8, provided to ispSTREAM file 1000 of Figure 10b below. Figure 10b shows the format of an ispSTREAM file 1000 for serially connected chain 400 of Figure 4; serially connected chain 400 includes PLD ISPs 401, 402 and 403. Figure 10c shows the instruction set executable by the programming state machine of an ispGAL22V10 type device. Figure 10d shows the instruction set executable by the programming state machine of an ispLSI type device. Figure 11 is a signal protocol diagram showing transitions of signals ispEN, MODE, SCLK, and SDI when placing an ISP PLD into a "shift" state or an "execute" state. Figure 12 is a schematic diagram showing address bits that are shifted into shift address registers 202 and 302. Figure 13 shows the contents of data registers 103, 203a and 303a, after executing step 1516 illustrated in Figure 15c. Figure 14 is a flow diagram 1400 illustrating the creation of an ispSTREAM file in accordance with the present invention. Figures 15a shows a portion 1500a of a flow diagram 1500, which shows a method for processing and downloading data of ispSTREAM file 1000 to target devices of serially connected chain 400 of Figure 4. Figures 15b shows a portion 1500b of a flow diagram 1500, which shows a method of processing and downloading data of ispSTREAM file 1000 to target devices of serially connected chain 400 of Figure 4. Figures 15c shows a portion 1500c of a flow diagram 1500, which shows a method for processing and downloading data of ispSTREAM file 1000 to target devices of serially connected chain 400 of Figure 4. Figures 15d shows a portion 1500d of a flow diagram 1500, which shows a method for processing and downloading data of ispSTREAM file 1000 to target devices of serially connected chain 400 of Figure 4. Figures 15e shows a portion 1500e of a flow diagram 1500, which shows a method for processing and downloading data of ispSTREAM file 1000 to target devices of serially connected chain 400 of Figure 4. Figure 16a is a portion 1600a of a flow diagram 1600 which illustrates allocation of the ispSTREAM file 1000 shown in Figures 10a and 10b. Figure 16b is a portion 1600b of a flow diagram 1600 which illustrates allocation of the ispSTREAM file 1000 shown in Figures 10a and 10b. Figure 17a shows, as a portion 1700a of a flow diagram 1700, on the left hand side, steps 1701-1714 taken to fill program data into ispSTREAM file 1000 and, on the right side, actual program data which are filled into data structures 1001-1014 of ispSTREAM file 1000 shown in Figure 10b. Figure 17b shows, as a portion 1700b of a flow diagram 1700, on the left hand side, steps 1701-1714 taken to fill program data into ispSTREAM file 1000 and, on the right side, actual program data which are filled into data structures 1001-1014 of ispSTREAM file 1000 shown in Figure 10b. Figure 18a shows the states of the three ID registers 104, 204 and 304 in ISP PLDs 401, 402 and 403 of serially connected chain 400. Figure 18b shows the contents of 5-bit instruction registers 105, 205 and 305 of ISP PLDs 401-403, respectively, after the shift address instructions are downloaded at step 1510. Figure 18c shows the contents of 5-bit instruction registers 105, 205 and 305 of ISP PLDs 401-403, respectively, after the programming instructions are downloaded at step 1519.. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention, which is described in detail below, is provided by a software program written in the familiar "C" programming language. This software program, which is subject to copyright protection, is provided in source code form in the accompanying Appendix A. While the copyright owner permits anyone to make facsimile copies of this source code, as it appears in the files of the U.S. Patent and Trademark Office in connection with this patent document or patent disclosure, the copyright owner explicitly reserves all other rights with respect to this software program. The present invention is described herein by reference to two types of ISP PLDs, both available from Lattice Semiconductor Corporation, the Assignee of this Patent Application. The first ISP PLD type is represented by the ispGAL22V10, which includes four programming pins: Mode, SCLK (Serial Clock), SDI (Serial Data In), and SDO (Serial Data Out). The operations of these programming pins are described in the "ISP Manual 1994", available from Lattice Semiconductor Corporation. The ispGAL22V10 device is placed in the programming mode when the Mode signal is asserted, while the signal on the SCLK pin is pulsed. Once in the programming mode, programming operations are controlled by the programmer via signals on the Mode and SDI pins. The second ISP PLD type is the Lattice ispLSI devices. In the ispLSI devices, an ISP PLD is programmed using five pins, which are designated: ispEN ("in-system programming Enable"), Mode, SCLK, SDI, and SDO. Unlike a ispGAL22V10 type device, an ispLSI type device is placed in the programming mode when the ispEN pin is asserted. Once in the programming mode, programming is controlled by the Mode, SDI and SCLK pins. The structures and operations of ispLSI devices are also fully described in the ISP Manual 1994 referenced above. Figure 4 shows an embodiment of the present invention in which three ISP PLDs 401, 402 and 403 are connected to a programming command generator 404. As shown in Figure 4, ISP PLD 401, 402 and 403 have their SDI and SDO terminals connected in a serial fashion ("serial chain" 400), so that serial programming data from programming command generator 404 to ISP PLD 403 can be provided via the SDI and SDO terminals of ISP PLDs 401 and 402. Likewise, serial programming data can be shifted into ISP PLD 402 through the SDI and SDO terminals of ISP PLD 401. This serial connection is known as a "serial chain". In this embodiment, ISP PLD 401 is an ispGAL22V10 device, ISP PLD 402 is an ispLSI type device (specifically, an ispLSI 1016) and ISP PLD 403 is also an ispLSI type device (an ispLSI 1032). The Mode and SCLK pins of ISP PLDs 401, 402 and 403 are commonly connected. In addition, the ispEn pins of ISP PLDs 402 and 403 are commonly connected. Figure 1 shows an array map of the ispGAL22V10 device. As shown in Figure 1, an ispGAL22V10 device is programmed by setting programmable fuses for a 44 X 132-bit AND array and a 64-bit "user electronic signature" (UES). Programming is accomplished one row at a time by serially shifting a 6-bit row address and 132 bits of program data bits into address/data shift register 102 through the SDI terminal. The 6-bit row address specifies which of the 44 rows of the AND array, or the 64-bit UES, is to be programmed. The 132 bits of programming bits are then provided to implement the desired configuration of the AND array at the specified row or the UES. An 8-bit ID shift register and a 20-bit architectural shift register 104 are provided, respectively, for storing an identification pattern and for specifying configuration information of the ispGAL22V10 device. Figure 2 shows the array map of an ispLSI 1016 device. As shown in Figure 2, an ispLSI 1016 device includes a 96 X 160-bit E 2 CMOS (Electrically erasable Complementary Metal-Oxide Semiconductor) cell array 201. As in the ispGAL22V10 device, cell array of the ispLSI 1016 device is programmed row by row. However, instead of specifying a multi-bit address, a 96-bit address shift register 202 is provided. Each bit in address shift register 202 corresponds to a 160-bit row in cell array 201. A 160-bit data register 203, divided into 80-bit (half-row) high order register 203a and 80-bit low order shift register 203b, is provided for holding the program data bits. Since separate commands are required to load or read each half-row in data register 203 (i.e. a separate command is required for loading each of data registers 203a and 203b), for the purpose of the remaining discussion, the data input and output unit of ispLSI 1016 device can be considered to be the 80-bit half-row. To program the ispLSI 1016 device, a single '1' bit is shifted into address shift register 202. The position of the single '1' bit in address shift register 202 indicates the row to be programmed. Programming is carried out by two program instructions, "PRGMH" (program high half-row) or "PRGML" (program low half-row), each instruction writes a half-row program data bits in the corresponding one of data registers 203a and 203b into the corresponding half-row at the address indicated by the single '1' bit in address register 202. An 8-bit ID shift register 204 is provided for holding an 8-bit identification code. Programming an ispLSI 1032 device is similar to programming the ispLSI 1016 device described above with respect to Figure 2. Figure 3 shows the array map of an ispLSI 1032 device. An ispLSI 1032 device includes a 108 by 320-bit E 2 CMOS array 301. Thus, the ispLSI 1032 device includes a 108-bit address shift register 302 and a 320-bit data register 303, which is divided into higher order half-row data register 303a and low order half-row data register 303b. Again, since separate commands are required for loading or reading each of half-row data registers 303a and 303b, the input and output unit for data transfer in such the ispLSI 1032 device is 160 bits. The method of the present invention first creates in memory an "ispSTREAM" file, which is a file containing both programming instructions and data, in the order the programming instructions and the data are subsequently used to program the ISP PLDs simultaneously. The steps for creating such a file are illustrated by Figure 14. Step 1401, which represents a subroutine "pack_jedec_file" in the source code provided in Appendix A, begins compilation of the ispSTREAM file by invoking a subroutine "dl_read_dldfile". In Figure 14, execution of subroutine "dl_read_dldfile" is represented by step 1402. At step 1402, a configuration description file (identified by the ".dld" file extension) is read. An example of such a configuration description file is shown in Figure 5. As shown in Figure 5, configuration description file 500 includes 3 lines of text, each line corresponding to one device in the serial chain 400 of Figure 4 to be programmed. On each line of configuration description file 500 is provided three fields, which correspond to a (i) device field, (ii) a programming directive field, and (iii) a programming bit pattern field (i.e. the name of a "JEDEC file"). JEDEC is an industry standard format for specifying test vectors known to those skilled in the art. The device field identifies the type of the device to be programmed, so that device-specific commands and parameters can.be properly handled by programming command generator 404. In Figure 5, configuration description file 500 specifies 22V10 (i.e. the ispGal22v10 device), 1016 (an ispLSI device with 16 generic logic blocks) and 1032 (an ispLSI device with 32 generic logic blocks). At present, four types of programming directives are used: (i) "PV", which indicates both programming and verification are to be performed; (ii) "NOP", which indicates no operation; (iii) "V", which indicates only verification is to be performed, and (iv) "E", which indicates only the function "erase" is to be performed. Verification involves reading the programming data from a programmed logic device and comparing the data thus read-back with the expected bit pattern. The function "erase" erases all programming from a ISP PLD. The "JEDEC file" field of configuration description file 500 provides the name of the JEDEC file containing a programming bit pattern for use by Programming command generator 404 when carrying out the specified programming directive. In addition, step 1402 (Figure 14) identifies, for each device listed on the configuration description file 500, the number of rows and the size in bit number of each row. Step 1402 also identifies which of the devices in the serially connected chain 400 has the largest number of programmable units, defined as the largest number of rows in the ispGAL22V10 type devices, or the largest number of half-rows in the ispLSI type devices, whichever is larger. Upon completion of Step 1402 described above, step 1403 is invoked to calculate a "composite array map". The present invention considers serially connected chain 400 as if it is a device having a number of rows equal to the largest number of programmable units, as identified in step 1402 above. For example, the serially connected chain of Figure 4 is considered a device having (i) 45 rows (rows 0-44) of 378 bits; (ii) one row (row 45) of 260 bits, (iii) 146 (rows 46-191) of 240 bits, and (iv) 24 rows (rows 192-215) of 160 bits. Figure 9 illustrates this composite array map for the serially connected chain 400 of Figure 4. As shown in Figure 9, in rows 0-44, one row from ISP PLD 401 and two half-rows from each of the ISP PLDs 402 and 403 can be programmed simultaneously. Thus, the total number of bits programmed in each of rows 0-44 would be the sum of 138 bits, 80 bits and 160 bits, i.e. 378 bits. Row 45 represents the programming of the 20 architectural bits and one half-row each of ISP PLDs 402 and 403. Thus, the number of bits to be programmed in row 45 is the sum of 20, 80 and 160, i.e. 260 bits. For rows 46-191, since ISP PLD 401 does not have these rows, the number of bits to be programmed is the sum of two half-rows of ISP PLDs 402 and 403. Thus, the number of bits programmed in rows 46-191 is the sum of 80 and 160, i.e. 240 bits. Finally, in rows 192-215, only ISP PLD 403 need to be programmed. Hence, the number of bits to be programmed in rows 192-215 is one half-row of ISP PLD 403, i.e. 160 bits. According to this composite array map, a bit stream file ("ispSTREAM file") is created in memory. The ispSTREAM file holds the bit stream data necessary to shift data and instructions into the serially connected chain of ISP PLDs (e.g. serially connected chain 400 of Figure 4) to be programmed. Figure 10b shows the format of an ispSTREAM file 1000 for the serially connected chain 400 of ISP PLDs 401-403 of Figure 4. To build ispSTREAM file 1000, the memory cells required for the ispSTREAM file is allocated. To perform this allocation, the procedure outlined in the flow diagram 1600, which is shown in two portions 1600a and 1600b in Figures 16a and 16b, is used. In Figure 16a, step 1602 allocates 24 bits. These 24 bits are provided to contain the three 8-bit ID code for each of ISP PLDs 401, 402 and 403. At step 1603, 15 bits are allocated for holding a 5-bit instruction of each of ISP PLDs 401, 402 and 403 for a bulk erase instruction. The instruction sets executable by the state machines of the ispGAL22V10 type devices (e.g. ISP PLD 401) and the ispLSI type devices (e.g. ISP PLDs 402 and 403) are shown in Figures 10c and 10d respectively. Figures 10c and 10d provide, for each instruction, the opcode for the instruction, a mnemonic of the instruction and a short description of the function of the instruction. As shown in Figure 10b, for example, the bulk erase instruction in an ispLSI type device has an opcode '00011' (binary) and an mnemonic "UBE". The UBE instruction erases the programming in the entire device by setting all the programmable bits to a binary '1'. Then, at step 1604, 15 bits (bits 1003) are allocated for shifting into ISP PLDs 402 and 403 the 5-bit "ADDSHFT" instruction (Figure 10c), and shifting into ISP PLD 401 the 5-bit "FLOWTHRU" (or "PASS") instruction. The FLOWTHRU instruction is provided ISP PLD 401 because an ispGAL22V10 type device does not have an address register, address being specified as the first 6 bits of data register 103. Then, 204 bits (bits 1004) are allocated, at step 1605 for the actual address bits to be shifted in the address registers 202 and 302 of ISP PLDs 402 and 403, respective. Since ISP PLDs 402 and 403 have 96 and 108 rows, respectively, the total number of bits allocated in bits 1004 for the actual address bits of ISP PLDs 402 and 403 is 204. At step 1606, 15 bits (bits 1005) are allocated for the data shifting instructions. ("DATASHFT" or "SHIFT_DATA" in Figures 10c and 10d) for shifting data bits into data registers 102a, 203a and 303a. Then, at step 1607, a number of bits (bits 1006) are allocated for data to be shifted into in the first row (i.e. row 0) of composite array 900 (Figure 9) constructed above. In the embodiment of Figure 4, as explained above, row 0 includes 378 data bits, including 6 address bits and 132 data bits for ISP PLD 401, 80 data bits for ISP PLD 402 and 160 data bits for ISP PLD 403. In the next two steps, i.e. steps 1608 and 1609, 30 bits (bits 1007 and 1008) are allocated for the program instructions ("PROGRAM" and "PRGMH") and the verify instructions ("VER/LDH" or "VERIFY") used in programming ISP PLDs 401-403. PRGMH and VER/LDH are instructions which program and verify, respectively, using data in the higher half-row portion of the data registers of the ispLSI devices (e.g. half-row data registers 203a and 303a). Step 1610 allocates 15 bits (bits 1010) for holding the "DATASHFT" and "SHIFT_DATA" instructions for shifting data out of data registers PLD ISPs 402 and 403, and ISP PLD 401 respectively. Steps 1611-1615 (steps 1612-1615 shown in Figure 16b) are steps corresponding to steps 1606-1610 described above. Steps 1611-1615 are provided for processing the next row of ISP PLD 401 and the lower 160-bit and 360-bit half-rows of ISP PLDs 402 and 403, at the address specified by address registers 202 and 302, respectively. Steps 1611-1615 allocate in the ispSTREAM file structures 1010-1014. Steps 1604-1615 are repeated for rows 2 to 215 of composite array map 900 until row 215 (see Figure 9) is processed. This repetitive loop and the termination decision point are represented by decision point 1616. For row 45, the data bits allocated for step 1612 is 260, as discussed above. Similarly, for rows 46-191 the data bits allocated for steps 1607 and 1612 are 240 bits. For rows 192-215, the data bits allocated for steps 1607 and 1612 are 160 bits. For rows 192-195, since all rows in ISP PLD 402 are programmed, the number of bits allocated for the address bits of step 1605 is 108, which is the number of rows for ISP PLD 403. Referring back to Figure 14, upon allocation of ispSTREAM file 1000, step 1403 is completed. Then, the next step, i.e. step 1404 (execution of subroutine "pack_jedec_files" continues), invokes a subroutine "read_jedec_files". Step 1404 reads the JEDEC files referenced in configuration description file 500 one by one, and converts the information in each JEDEC file (provided in ASCII characters) into a packed binary map in memory, organized row by row. As each JEDEC file is read, each row (for ispGAL22V10 type device) or half-row (for ispLSI type device) that is all '1's (i.e. all program bits in the row are binary '1's) is marked. In a preferred embodiment, after all program bits in the JEDEC file are read into the packed binary map in memory, the rows or half-rows in the packed binary map are sorted. In ispGAL22V10 devices, the rows are sorted such that the rows that are not all binary '1's are arranged in ascending address order, followed by the all '1's rows in ascending address order. In ispLSI devices, the rows are sorted in the data structure in the order: 1) in ascending address order, all rows which are not all '1's in both the higher and the lower half-rows of an address; (ii) in ascending address order, all rows which have all '1's in one of the half-rows, and not all '1's in the other half-row; and (iii) in ascending address order, all rows which are all '1's in both half-words. Figures 6, 7 and 8 are JEDEC files illustrative of the JEDEC files referenced in Figure 5 for ISP PLDs 401, 402 and 403 respectively. As shown in Figure 6, a JEDEC file for an ispGAL22V10 device reads program bits from a 44 X 132-bit array 601. Each column of bit array 601 corresponds to the 132 programming bits for a row in the AND array 101 of Figure 1. In combination with a 6-bit address generated by programming command generator 404 (Figure 4), these 132 bits programming bits are shifted into address/data shift register 102 to program a row of AND array 101. The remaining portions of the JEDEC file provides information such as the 20 architectural bits, and the 64-bit UES. The format for a JEDEC file used with an ispGAL22V10 device is known to skilled in the art. Figure 7 shows a JEDEC file for an ispLSI 1016 device, illustrative of the "1016.jed" file referenced in Figure 5 for ISP PLD 402 of Figure 4. As shown in Figure 7, program bits are read by Programming command generator 404 from a 192 X 80-bit array 701. Unlike array 601, i.e. the program bits array of a JEDEC file for an ispGAL22V10 device, where each column represents a row of programmable components in the device, every two rows of array 701 represent the program bits for either the higher order half-row or the lower order half-row of a corresponding row in the E 2 CMOS array of the ispLSI device. Programming is achieved when the program bits are downloaded, by executing the appropriate programming command, onto the target ISP PLD from data registers 203a and 203b. Figure 8, which shows a JEDEC file illustrative of the JEDEC file "1016.jed" referenced in Figure 5 for ISP PLD 402, contains a 108 X 160-bit array 801 which is interpreted in the same manner as array 701 of Figure 7. Of course, every two rows in array 801 has 160 bits, corresponding to either the 160-bit higher order half-row, or the 160-bit lower order half-row, for a 320-bit row of the E 2 CMOS array 201 of a ispLSI 1032 device. As an example, Figure 7 shows that the higher order half-row of program bits at address 7 is all '1's. Similarly, Figure 8 shows that both half-rows of the program bits at address 64 are all '1's. The next step in step 1404 is to fill actual program and command data into the ispSTREAM file 1000. The procedure for filling ispSTREAM file 1000 is provided as procedure 1700 in Figures 17a and 17b. Figures 17a and 17b are portions 1700a and 1700b of procedure 1700 respectively. Figure 17a shows, on the left hand side, steps 1701-1710 taken to fill program data into ispSTREAM file 1000 and, on the right side, the actual program bits which are filled into data structures 10011-1019 of ispSTREAM file 1000 shown in Figure 10b. Figure 17b shows, on the left hand side, steps 1711-1717 taken to fill program data into ispSTREAM file 1000 and, on the right side, the actual program bits which are filled into data structures 1011-1014 of ispSTREAM file 1000 shown in Figure 10b. Initially, as shown in Figure 17a, program bits related to the last device in serially connected chain 400 is first processed. Thus, at step 1701, the 8-bit ID code filled the last 8 bits in data structure 1001 of ispSTREAM file 1000. Then, at the step 1702, the "UBE" instruction (user bulk erase) is entered into the corresponding 5 bits (i.e. the last 5 bits) of data structure 1002. The opcode corresponding to the "ADDSHFT" (address shift) instruction is then, at step 1703, entered into the last 5 bits of data structure 1003. The address bits to be shifted into address register 302 are provided in the last 108 bits of the data structure 1004. The opcode corresponding to the "DATASHFT" (data shift) instruction is then provided, at step 1705, to the last 5 bits of data structure 1005. Then, at step 1706, 160 program data bits, corresponding to the higher order half-row of the first row in the packed binary map for ISP PLD 403, are provided to the last 160 bits of the data structure 1006. At steps 1707 and 1708, the opcodes for "PRGMH" (program higher order half-row) and "VER/LDH" (verify or load higher order half-row) are provided into the corresponding bits of data structures 1007 and 1008. At step 1709, the opcode for the "DATASHFT" instruction is provided in the corresponding bits of data structure 1009. This "DATASHFT" instruction will be used to shift out the higher order half-word of ISP PLD 403, at the address specified in address register 303, for verification. The steps 1710-1714 provide, for the lower half-row of an ispLSI device, steps for filling the instruction opcodes and program data bits in data structures 1010-1014. Step 1715 tests if the command and program data bits for all rows of ISP PLD 403 are provided to ispSTREAM file 1000. If not all instructions and program data bits of ISP PLD 403 are provided to ispSTREAM file 1000, process 1700 repeats steps 1703-1714, until done. When all instructions and program data bits of this last device in serially connected chain 400 are provided to ispSTREAM file 1000, the next JEDEC file in configuration description 500 is read. Steps 1701-1715 are then repeated for filling in actual command and program data bits in ispSTREAM file 1000 corresponding to the next device in the serially connected chain 400 of Figure 4. Process 1700 continues until commands and program data bits for all devices in serially connected chain 400 are provided into ispSTREAM file 1000. The result of process 1700 on serially connected chain 400, using program data bits from Figures 6-8, are shown in Figure 10b. At this point, the subroutine "pack_jedec_files" is completed. Simultaneous programming for the devices in the serially connected chain 400 can proceed then from the ispSTREAM file 100 thus filled. In this embodiment, a procedure "ispstream_pump". is provided for performing programming and verification from the ispSTREAM file. The ispstream_pump procedure is provided in source code form in Appendix A. A hardware and software system which is capable of downloading the output data of the ispstream_pump procedure for programming and verification in the devices of the serially connected chain is described in the ISP Manual 1994 referenced above. In particular, the hardware and software system and the operational procedures for operating such a system are discussed in Chapter 3 of the ISP Manual 1994, entitled "In-System Programming on a PC or Sun Workstation". The teachings of ISP Manual 1994 are hereby incorporated by reference in it's entirety. Specifically, a procedure for processing and downloading the data of ispSTREAM file 1000 to target devices in the serially connected chain 400 of Figure 4 is illustrated in the flow diagram 1500, which is shown in 5 portions 1500a-1500e in Figures 15a-e. Figure 15a shows a portion 1500a, including steps 1501-1507 of process 1500. As shown in figure 15a, at step 1501, the subroutine "ispstream_pump" is invoked to begin the process of processing and downloading data from ispSTREAM file 1000 to the target devices of serially connected chain 400 of Figure 4. The subroutine "ispstream_pump" calls at step 1502, a subroutine "move_to_id_state", which causes all devices in the serially connected chain 400 to go into idle state. Idle state is entered when Programming command generator 404 (Figure 4) provides the following signal protocol: (i) setting ispEN, SDI, SCLK and MODE signals each to logic low; (ii) following (i), setting MODE signal to logic high; (iii) following (ii), pulsing signal SCLK; and (iv) following (iii), resetting MODE signal to logic low. Figure 18a shows the states of the three ID registers 104, 204 and 304 in ISP PLDs 401, 402 and 403 of serially connected chain 400. At step 1503, command program generator 404 is caused to pulse the SCLK signal 24 times, so as to output as the values of signal SDO the respective ID codes of ISP PLDs 401, 402 and 403. These ID codes are then compared with the ID code values in data structure 1001 of ispSTREAM file 1000. At step 1504, the ispstream_pump subroutines calls the subroutine "execute()" to place the devices in serially connected chain 400 into the "shift" state. The shift state is entered by causing command program generator 404 to execute the protocol: (i) setting ispEN, SDI, SCLK, MODE signals at logic low; (ii) thereafter, setting MODE and SDI signals to logic high; (iii) pulsing the SCLK signal once, and (iv) bringing the MODE and SDI signals to logic low. In the "shift" state, an in-circuit programmable device is ready to receive instructions for executing a command in a command register of the in-circuit programmable device. At step 1505, the instructions for bulk erase, i.e. "BULK_ERASE", for an ispGAL22V10 type device and "UBE", for an ispLSI type device, are taken from data structure 1002 of ispSTREAM file 1000 and downloaded through signal SDI into ISP PLDs 401, 402 and 403, by pulsing the SCLK signal 15 times. Next, at step 1506, the devices of serially connected chain 400 are placed into the "execute" state by Programming command generator 404, executing the signal protocol illustrated in Figure 11. The bulk erase function is then executed at step 1507 by setting ispEN, SDI, SCLK and Mode signals logic low and then pulsing signal SCLK. Figure 5b shows portion 1500b of flow diagram 1500, which covers steps 1508-1515. Step 1508 is a waiting step to wait for the completion of the bulk erase instruction. Since ISP PLDs devices 401, 402 and 403 are bulk-erased simultaneously, waiting step 1508 is completed when bulk erase is completed in the device requiring the most time. At step 1509, ISP PLDs 401, 402 and 403 are placed again in "shift" state, in the manner described above, for receiving further instructions. At step 1510, the shift address instructions (i.e. the "ADDSHFT" instruction for each of ISP PLDs 402 and 403 and the "FLOWTHRU" instruction for ISP PLD 401, as discussed above) are then retrieved from data structure 1003 of ispSTREAM file 1000 and downloaded into ISP PLDs 401, 402 and 403. Figure 18b shows the contents of 5-bits instruction registers 105, 205 and 305 of ISP PLDs 401-403, respectively, after the shift address instructions are downloaded. At step 1511, ISP PLDs 401, 402 and 403 are placed in the "execute" state in the manner described above. The addresses bits (204) are then retrieved, at step 1512, from data structure 1004 of ispSTREAM file 1000 and shifted into ISP PLDs 402 and 403, by pulsing the SCLK signal 204 times. Figure 12 is a schematic diagram showing shifting address bits into shift address registers 202 and 302. At steps 1514-1516 (Figure 15c), the shift data instruction and programming data bits are retrieved from data structures 1005 and 1006, and shifted into data registers 103, 203a and 303a of ISP PLDs 401, 402 and 403. Steps 1514-1516 perform, respectively, the functions of (i) placing ISP PLDs 401-403 in "shift" state, (ii) shifting in the data shift instructions of data structure 1005, (iii) placing ISP PLDs 401-403 in "execute"state, (iv) shifting the program data bits of data structure 1006 into data registers 103, 203a and 203b. Figure 13 shows the contents of data registers 103, 203a and 303a, after the step 1516. ISP PLDs 401-403 are then placed in "shift" mode again to receive the program instructions. If the data shifted into data registers 103, 203a and 303a are all '1's, programming can be skipped. Thus, at step 1518, if the data in data registers 103, 203a and 303a are all '1's, the next step is step 1524 (Figure 15c); otherwise, step 1519 retrieves from data structure 1007 of ispSTREAM file 1000 the program instructions for ISP PLDs 401-403. At step 1520, ISP PLDs 401-403 are then placed into the "execute" state, in the manner explained above. Programming is initiated at step 1521 by setting ispEN, MODE, SDI and SCLK signal to logic low and then pulsing the SCLK signal. State 1522 is a timing state, in which command generator 404 waits a predetermined required time period to ensure successful programming. Thus, simultaneous programming is achieved. ISP PLDs 401-403 are then returned to the shift state for receiving further instructions. Figure 18c shows the contents of 5-bits instruction registers 105, 205 and 305 of ISP PLDs 401-403, respectively, after the shift address instructions are downloaded at step 1519. Figure 18c also shows that, when the program bits in data register 203a is all '1's, but if neither data register 103 nor data register 303a is all '1's, then programming proceeds with ISP PLD 402's instruction register 205 set to a NOP (no operation) instruction. It is found that, with the sorting at step 1404 of programming data bits into the two groups, for an ispGAL22V10 type device, and three groups, for an ispLSI device, substantial programming time is saved because programming steps 1519-1523 can then be skipped. Verify instructions are then retrieved from data structure 1008 of ispSTREAM file 100 and provided to ISP PLDs 401-403 at step 1524. At step 1525, ISP PLDs 401-403 are placed in the "execute" state. At step 1526, data verify operations are initiated by the protocol: (i) setting ispEN, SDI, SCK, and MODE signals to logic low and (ii) thereafter, the SCLK clock signal is pulsed. State 1527 then waits for a period sufficient for each ISP PLD device to read the memory for programmed data bits stored at steps 1519-1523. The data to be verified are then shifted out of data registers 103, 203a and 203b by (i) placing, at step 1528, ISP PLDs 401-403 into the "shift state; (ii) at step 1529, retrieving from data structure 1014 of ispSTREAM file 1000 the data shift instructions, and shifting such instructions into ISP PLDs 401-403; (iii) at step 1530, placing ISP PLDs 401-403 into the "execute" state, and (iv) at step 1531, pulsing signal SCLK 378 times to output at signal SDO, the data bits of data registers 103, 203a and 303a. If the data shifted out of ISP PLDs 401-403 are identical to the data in data structure 1006 of ispSTREAM file 1000, ISP PLDs 401-403 are properly programmed. At step 1532 (Figure 15e), ISP PLDs 401-403 are placed in the "shift" state to continue programming of ISP PLDs 401-403. Steps 1514-1532 are repeated to program the next row in ISP PLD 401, and the next half-row in each of ISP PLDs 402-403. Thereafter, at decision point 1534, ispSTREAM file 1000 is checked to determined all data in ispSTREAM file 1000 have been downloaded into the devices in serially connected chain 400. If there remains more data to download into ISP PLDs 401-403, procedure 1500 returns to step 1514; otherwise, procedure 1500 is completed. The above detailed description is provided to illustrate specific embodiments of the present invention and is not intended to be limiting. Numerous variations and modifications within the scope of the present invention are possible. For example, as mentioned above, the present invention is applicable to all types of field programmable devices, including programmable logic devices, programmable memories, and programmable analog circuits. The present invention is set forth in the claims appended below.

Claims: A method for programming multiple field programmable devices (401, 402, 403) simultaneously, comprising connecting said field programmable devices (401, 402, 403) serially in a chain configuration, the method characterized by : constructing a data stream file which represents a composite data stream (1000) for simultaneously programming said field programmable devices (401, 402, 403); retrieving from a plurality of program data files, an individual programming data stream for each of said field programmable devices (401, 402, 403); filling said data stream file with said individual programming data streams to form said composite data stream (1000); retrieving from said data stream file said composite data stream; serially shifting said composite data stream (1000) into said field programmable devices (401, 402, 403); and programming said field programmable devices (401, 402, 403) simultaneously using said composite data stream (1000). A method as in claim 1, wherein said composite data stream (1000) shifts instructions sequentially into said field programmable devices (401, 402, 403), shifts programming data into said field programmable devices(401, 402, 403) sequentially, causes said instructions to be executed simultaneously, and causes data to be shifted out of said field programmable devices (401, 402, 403) sequentially. A method as in claim 1, wherein said individual programming data stream comprising programming instructions and programming data, and wherein said step of retrieving an individual programming data stream comprises the steps of: organizing said retrieved programming data as rows, each row corresponding to data associated with an address unit of the field programmable devices (401, 402, 403) corresponding to said individual data stream; and rearranging said programming data such that rows having a predetermined data pattern are placed behind rows not having said predetermined data pattern. A method as in claim 3, wherein said predetermined data pattern corresponds to a default data pattern of said field programmable device when unprogrammed. A method as in claim 1, wherein one of said field programmable devices (401, 402, 403) comprises a serial input pin(SDI) a serial output pin (SDO), a clock pin (SLCK), and a mode pin (MODE). A method as in claim 1, wherein one of said field programmable devices (401, 402, 403) is a programmable device which comprises a programming enable pin (ispEN), a serial input pin (SDI), a serial output pin (SDO), a clock pin (SCLK), and a mode pin (MODE). A method as in claim 1, wherein said field programmable devices (401, 402, 403) comprises first and second field programmable devices, said first and second field programmable devices having, respectively, first and second gate arrays of unequal sizes. A method as in claim 1, wherein said field programmable devices (401, 402, 403) comprises first and second field programmable devices having, respectively, first and second gate arrays of equal sizes. A method as in claim 1, wherein said field programmable devices (401, 402, 403) comprises first and second field programmable devices, said first and second field programmable devices having dissimilar addressing schemes. A method as in claim 1, wherein said field programmable devices (401, 402, 403) comprises first and second field programmable devices, said first and second field programmable devices having the same addressing scheme.

Inventors: TANG HOWARD Y M, TANG, HOWARD Y.M.
Applicants: LATTICE SEMICONDUCTOR CORP, LATTICE SEMICONDUCTOR CORPORATION
Application year: 1996
Main classification: G06F17
IPC codes: H03K19, G06F17, G06F9