US20020044484A1 - Interface circuit and method for writing data into a non-volatile memory, and scan register - Google Patents

Interface circuit and method for writing data into a non-volatile memory, and scan register Download PDF

Info

Publication number
US20020044484A1
US20020044484A1 US09/953,166 US95316601A US2002044484A1 US 20020044484 A1 US20020044484 A1 US 20020044484A1 US 95316601 A US95316601 A US 95316601A US 2002044484 A1 US2002044484 A1 US 2002044484A1
Authority
US
United States
Prior art keywords
data
register
scan
memory
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US09/953,166
Other versions
US6442092B1 (en
Inventor
Shozo Tomita
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lapis Semiconductor Co Ltd
Original Assignee
Shozo Tomita
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shozo Tomita filed Critical Shozo Tomita
Priority to US09/953,166 priority Critical patent/US6442092B1/en
Publication of US20020044484A1 publication Critical patent/US20020044484A1/en
Application granted granted Critical
Publication of US6442092B1 publication Critical patent/US6442092B1/en
Assigned to OKI SEMICONDUCTOR CO., LTD. reassignment OKI SEMICONDUCTOR CO., LTD. CHANGE OF NAME (SEE DOCUMENT FOR DETAILS). Assignors: OKI ELECTRIC INDUSTRY CO., LTD.
Assigned to Lapis Semiconductor Co., Ltd. reassignment Lapis Semiconductor Co., Ltd. CHANGE OF NAME (SEE DOCUMENT FOR DETAILS). Assignors: OKI SEMICONDUCTOR CO., LTD
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/04Arrangements for selecting an address in a digital store using a sequential addressing device, e.g. shift register, counter
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C2216/00Indexing scheme relating to G11C16/00 and subgroups, for features not directly covered by these groups
    • G11C2216/12Reading and writing aspects of erasable programmable read-only memories
    • G11C2216/30Reduction of number of input/output pins by using a serial interface to transmit or receive addresses or data, i.e. serial access memory

Definitions

  • the present invention relates to an interface circuit and method for programming a non-volatile memory, and to a type of scan register useful in this circuit.
  • Non-volatile memory is a basic component of many integrated-circuit devices, including so-called ‘system-on-chip’ devices. Such devices often use a reprogrammable type of non-volatile memory, such as electrically erasable and programmable read-only memory (EEPROM), or flash memory (also referred to as flash ROM). Flash memory, which is electrically erasable in large blocks, is often used to store program code and parameter data in microcontroller chips, and in system-on-a-chip devices having a microcontroller core.
  • EEPROM electrically erasable and programmable read-only memory
  • flash memory also referred to as flash ROM
  • flash memory in these devices enables software changes to be implemented and tested with very short turn-around times, even enabling devices installed on printed-circuit boards to be reprogrammed in the field.
  • on-board reprogramming has become an essential capability, as it is virtually impossible to foresee all eventualities during the software design stage.
  • Reprogrammability is useful for debugging, for customizing devices to user specifications, for updating parameters and other data stored in tables, and for extending the life cycle of a device or system through frequent software revisions.
  • serial interface circuit To minimize the number of LSI terminals needed to implement the interface protocol, reprogramming is usually carried out through a serial interface circuit.
  • Different manufacturers have used different serial interfaces, including the one described in IEEE Standard 1149.1-1990, which specifies a standard test access port and boundary-scan architecture.
  • This interface standard is also known as JTAG revision 2.0, because of developmental work done by the Joint Test Action Group, and the associated technology is often referred to as JTAG technology.
  • LSI stands for large-scale integrated circuit
  • IEEE for the Institute of Electrical and Electronics Engineers.
  • a device employing JTAG technology has a test access port (TAP) with a test data input terminal, a test data output terminal, and boundary scan circuits chained serially between these two terminals, enabling the input and output signals of the device to be observed and manipulated inside the device. If multiple devices of this type are mounted on the same printed-circuit board, their test access ports can be linked together to form a single boundary scan chain providing test access to all of the devices, enabling both internal device functions and interconnections between the devices to be tested.
  • TEP test access port
  • JTAG technology has also been used as an interface for debugging the software of the microcontroller core of a system-on-a-chip, by providing a debugging scan chain, separate from the boundary scan chain, between the test data input and output terminals. It would be convenient if the same interface could also be used to program flash memory in the chip, so that debugging and reprogramming could be carried out in the same environment simply by connecting a debugger and a terminal device to the test access port, without the need for special equipment or wiring. Similarly, manufactured products could be programmed with customized software and then tested, using the same test access port for both purposes. A specialized flash-memory programming device, referred to below as a flash programmer, could also be connected to the test access port for on-board reprogramming in the field.
  • test access port for debugging, programming, and testing is a way to reduce system costs.
  • a conventional way to enable on-chip flash memory to be programmed through the JTAG test access port is to provide a separate chain of memory-access registers between the test data input and output terminals.
  • the memory-access register chain needs to include an address register for supplying address signals to the flash memory, a data register for storing read and write data, and a control register for supplying control signals to the flash memory.
  • these three registers are connected serially, the output data of one register becoming the input data of the next register in the chain.
  • a problem with the conventional memory-access register chain is that to read or write each word of flash-memory data, the associated address signals and control signals, as well as the data, must be shifted into or out of the memory-access registers. Input data destined for the register farthest from the test data input terminal must first be shifted through the other two registers. The total number of shift operations that must be performed per read or write access is therefore equal to the combined bit length of the address, data, and control registers.
  • the shift operations are synchronized with a test clock signal, which is supplied from the flash programmer or other host device that accesses the flash memory.
  • the test clock frequency is limited, typically to one megahertz or less, because of the presence of electrical noise and other disturbing factors.
  • the flash memory may have a capacity of several hundred kilobytes. Transferring this amount of data through a conventional register chain, with a test clock frequency of one megahertz or less, can easily take more than a minute. This delay is inconvenient during debugging, and intolerable in factory tests and inspections.
  • a further problem is that flash-memory storage capacity, sector size, and word width differ from one device to another. Consequently, the bit lengths of the address and data registers in the memory-access scan chain differ from one device to another.
  • flash programmer With pre-stored information describing the flash-memory parameters of every device that might need to be programmed. The alternative is to enter this information manually when the flash programmer is used, or to use different flash programmers for different types of devices, but both of these procedures are inconvenient and invite errors such as inadvertent entry of incorrect data or use of the wrong flash programmer.
  • An object of the present invention is to speed up serial access to a non-volatile memory disposed in an integrated circuit.
  • Another object of the invention is to enable automatic set-up of a communication protocol between the integrated circuit and a programming device.
  • Yet another object is to increase the amount of parallel parameter data that can be captured and scanned out by a scan register.
  • the invented interface circuit comprises a plurality of memory-access scan registers coupled in common to a data input terminal of an integrated circuit in which the non-volatile memory is disposed, receiving serial data related to access to the non-volatile memory from the data input terminal.
  • the interface circuit also has at least one selection scan register coupled to the data input terminal, receiving a code selecting at least one of the memory-access scan registers, and has at least one multiplexer coupling the memory-access scan registers and selection scan register to a data output terminal of the integrated circuit, for serial output of data from these registers.
  • the memory-access scan registers include, for example, a data register storing data to be written in the non-volatile memory, an address register storing address information for the non-volatile memory, a function command register storing a code for controlling the non-volatile memory, and a profile register.
  • the profile register captures parallel parameter data from the integrated circuit for serial output at the data output terminal.
  • the parallel parameter data may include various parameters of the non-volatile memory.
  • the interface circuit may have an instruction register to which instruction codes are provided from the data input terminal.
  • Each memory-access scan register may be selected by a different instruction code, or all of the memory-access scan registers may be selected by a single instruction code. In the latter case, the interface circuit may have another selection scan register or scan branch register that receives different codes selecting the memory-access scan registers individually.
  • the above scan registers can be controlled by a test access port controller.
  • the invented interface circuit When the invented interface circuit is used for serial access to the non-volatile memory, the access is speeded up because each of the memory-access scan registers can be accessed individually, with no need to shift data through the other memory-access scan registers.
  • parameters of the non-volatile memory are stored in a profile register, these parameters can be read from the data output terminal and analyzed to determine the bit lengths of the memory-access scan registers, whereby a protocol for communicating with the interface circuit can be set up automatically.
  • the invention also provides a scan register receiving serial scan input data and parallel capture data, and generating serial scan output data and update data, having a selector selecting the parallel capture data according to at least one bit of the update data. The amount of data that can be captured and scanned out is thereby increased.
  • This type of scan register can be advantageously used as the above-mentioned profile register.
  • FIG. 1 is a block diagram showing an interface circuit illustrating a first embodiment of the invention
  • FIG. 2 is a block diagram of the flash memory in FIG. 1;
  • FIG. 3 is a block diagram of the memory-access register block in FIG. 1;
  • FIG. 4 is a circuit diagram of a generic scan register on which the scan registers in the first embodiment are based;
  • FIG. 5 is a block diagram showing part of the memory-access register block in more detail
  • FIG. 6 is a block diagram of the TAP circuit in FIG. 1;
  • FIG. 7 is a state transition diagram for the TAP controller in FIG. 6;
  • FIG. 8 is a circuit diagram of the instruction register in FIG. 6, showing the associated logic block and decoder;
  • FIG. 9 is a circuit diagram showing the logic block of a typical scan data register in FIG. 3;
  • FIG. 10 is a circuit diagram showing the logic block of the scan branch register in FIG. 3;
  • FIG. 11 is a circuit diagram showing the logic block of the data register in FIG. 3;
  • FIG. 12 is a circuit diagram of the multiplexers in FIG. 3;
  • FIG. 13 is a circuit diagram of the multiplexer in FIG. 6;
  • FIG. 14 summarizes the instruction codes used in the first embodiment
  • FIG. 15 is a block diagram showing an interface circuit illustrating a second embodiment of the invention.
  • FIG. 16 is a block diagram of the TAP circuit in the second embodiment
  • FIG. 17 summarizes the instruction codes used in the second embodiment
  • FIG. 18 is a block diagram of a memory-access register block illustrating a third embodiment of the invention.
  • FIG. 19 summarizes the instruction codes used in the third embodiment
  • FIG. 20 is a circuit diagram of a scan register illustrating a fourth embodiment of the invention.
  • FIG. 21 shows the capture data and update data format of a profile register exemplifying the fourth embodiment
  • FIG. 22 indicates how the storage capacity can be coded in FIG. 21;
  • FIG. 23 indicates how the sector size can be coded in FIG. 21.
  • FIG. 24 is a block diagram illustrating a conventional interface circuit.
  • FIG. 1 shows an interface circuit 2 that forms part of a large-scale integrated circuit chip.
  • the core of the chip is a microcontroller unit (MCU) that executes a program stored in a flash memory 4 .
  • MCU microcontroller unit
  • the MCU core and the signal lines connecting it to the flash memory 4 have been omitted to simplify the drawing. Also omitted are circuits implementing MCU debugging functions, and various other functions that may be integrated on the same chip.
  • the interface circuit 2 receives a Test Data In signal TDI, a Test Clock signal TCK, a Test Mode Select signal TMS and a Test Reset signal nTRST (n denotes negative logic) from corresponding external terminals (not visible) of the large-scale integrated circuit chip, and supplies a Test Data Out signal TDO to another external terminal (not visible) of the chip.
  • the TDI, TDO, TMS, TCK, and nTRST terminals constitute the test access port or TAP of the chip, as specified in the IEEE 1149.1 standard.
  • the interface circuit 2 and flash memory 4 communicate by signals denoted S 1 to S 5 .
  • the interface circuit 2 comprises a memory-access register block 6 , a TAP circuit 8 , and a scan decoder 10 .
  • the memory-access register block 6 is coupled to the TDI terminal, and communicates with the flash memory 4 by means of signals denoted S 1 to S 5 .
  • the TAP circuit 8 is coupled to all five terminals of the test access port, and performs the usual functions specified in the IEEE 1149.1 standard, together with certain other functions related to flash memory access. For example, the TAP circuit 8 supplies an output signal S 6 to the scan decoder 10 , which in turn supplies a decoded signal S 7 to the memory-access register block 6 .
  • the TAP circuit 8 also receives a multiplexed output signal S 8 from the memory-access register block 6 .
  • Signal S 7 selects the memory-access register block 6 , enabling access to its registers, as will be described later.
  • the scan decoder 10 also generates other signals (not visible) that select other registers and functions on the chip, such as a boundary scan register (not visible), and the above-mentioned MCU debugging functions.
  • the flash memory 4 comprises a memory cell array 12 , a row address decoder 14 , a column address decoder 16 , a sector buffer 18 , a control circuit 20 , a plurality of sense amplifiers 22 , only one of which is shown in the drawing, and other components, not directly relevant to the present embodiment, which have been omitted for simplicity.
  • the memory cell array 12 comprises a plurality of non-volatile memory elements (not visible) that can be programmed and erased electrically. These memory elements are organized into sectors and words, each sector comprising a plurality of words, each word comprising a plurality of memory elements.
  • the row address decoder 14 selects a sector 24 to be read, programmed, or erased. In read access, the sense amplifiers 22 amplify signals from the memory elements in the selected sector 24 , and the column address decoder 16 selects one word of amplified data for output.
  • the sector buffer 18 temporarily stores the data to be programmed, each word being stored in a location selected by the column address decoder 16 . When all necessary data have been stored in the sector buffer 18 , all memory elements in the selected sector 24 in the memory cell array 12 are programmed simultaneously. In an erasing operation, an entire sector 24 is erased at once.
  • the control circuit 20 controls all of these operations.
  • a word may comprise any fixed number of bits.
  • a word may correspond to one byte (eight bits), a plurality of bytes, or a fraction of a byte.
  • Signal S 1 is an m-bit address signal A[m-1:0] received from the interface circuit 2 .
  • the n least significant bits A[n-1:0] are supplied to the column address decoder 16 as a word address code.
  • the m-n most significant bits A[m-1:n] are supplied to the row address decoder 14 as a row or sector address code. All address bits are also supplied to the control circuit 20 .
  • the numbers m and n are positive integers (0 ⁇ n ⁇ m).
  • Signal S 2 is a p-bit data output signal DO[p-1:0], where p (another positive integer) is the number of bits per word. This signal is output to the interface circuit 2 from the sense amplifiers 22 selected by the column address decoder 16 .
  • Signal S 3 is a p-bit data input signal DI[p-1:0] received from the interface circuit 2 and supplied to the sector buffer 18 .
  • Signal S 4 is a multiple-bit control signal, including a v-bit control code C[v-1:0] (v being a positive integer), a read enable signal nRE, and a write enable signal nWE. These signals are received by the control circuit 20 from the interface circuit 2 .
  • the control code C[v-1:0] gives commands for various non-volatile memory operations such as sector write, read, program, and erase.
  • Signal S 5 is a busy status signal supplied from the control circuit 20 to the interface circuit 2 to indicate that a non-volatile memory operation is in progress.
  • the memory-access register block 6 comprises a scan branch register (SCBN) 26 , a profile register (PRF) 28 , a sector address register (SECADR) 30 , a data register (DR) 32 , a function command register (FCR) 34 , a word counter (WCTR) 36 , a control circuit (CTL) 38 , a branch decoder (B-DEC) 40 , and a pair of multiplexers (MPXs) 42 , 44 .
  • SCBN scan branch register
  • PRF profile register
  • SECADR sector address register
  • DR data register
  • FCR function command register
  • WCTR word counter
  • CTL control circuit
  • B-DEC branch decoder
  • MPXs pair of multiplexers
  • the scan branch register 26 , the profile register 28 , the sector address register 30 , the data register 32 , and the function command register 34 share a basic structure that is illustrated by a generic scan register 46 in FIG. 4.
  • the generic scan register 46 is essentially a shift register with N bit stages, denoted B 1 - 1 to B 1 -N, each storing one data bit. N may be any positive integer (1 ⁇ N).
  • Each bit stage B1 ⁇ j (1 ⁇ j ⁇ N) comprises a selector circuit 48 -j and a pair of D-type flip-flops (D-FFs) 50 -j, 52 -j.
  • the operation of the generic scan register 46 is controlled by a capture select signal (CAPTURE_SEL), a shift clock signal (SHIFT_CK), an update clock signal (UPDATE_CK), and an update reset signal (UPDATE_RST).
  • CAPTURE_SEL is supplied to a selection (S) input terminal of the selector circuit 48 -j, SHIFT_CK to a clock (CK) input terminal of the first D-FF 50 -j, UPDATE_CK to a clock (CK) input terminal of the second D-FF 52 -j, and UPDATE_RST to a reset (R) input terminal of the second D-FF 52 -j (1 ⁇ j ⁇ N).
  • Each selector has A and B input terminals.
  • the A input terminal of the first selector circuit 48 - 1 receives a scan input signal SCAN_IN.
  • the A input terminal of the other selector circuits 48 -j (1 ⁇ j) receive the Q output signal of D-FF 50 -(j- 1 ) in the preceding bit stage.
  • the B input terminal of each selector circuit 48 -j (1 ⁇ j ⁇ N) receives a capture data bit (Capturej).
  • Input A is selected when CAPTURE_SEL is at the ‘0’ logic level
  • input B is selected when CAPTURE_SEL is at the ‘1’ logic level
  • the selected input is supplied from an output terminal O to the data input terminal D of the first D-FF 50 -j in the same stage.
  • the first D-FF 50 -j in each bit stage latches its D input in synchronization with SHIFT_CK, and supplies the latched data bit from its output terminal Q to the data input terminal D of the second D-FF 52 -j.
  • the output signals of D-FFs 50 - 1 to 50 -(N- 1 ) are also supplied to the selectors in the next stage, as described above, while the output of the last D-FF 50 -N becomes a scan output signal (SCAN_OUT).
  • the selectors 48 -j and D-FFs 50 -j (1 ⁇ j ⁇ N) form a shift register.
  • the second D-FF 52 -j in each bit stage latches its D input in synchronization with UPDATE_CK, and supplies the latched data bit from its output terminal Q as one bit of update data (Updatej).
  • Updatej update data
  • These D-FFs 52 -j form a parallel update latch. Input of an UPDATE_RST signal resets the update data to the ‘0’ logic level.
  • a capture operation is carried out by setting CAPTURE_SEL to the ‘1’ logic level and supplying a SHIFT_CK pulse, causing the selectors 48 -j to select the capture data and the D-FFs 50 -j to latch the N capture data bits (Capturel to CaptureN) in parallel.
  • a shift operation is carried out by setting CAPTURE_SEL to the ‘0’ logic level and supplying a SHIFT_CK pulse, causing D-FF 50 - 1 to latch the scan input signal SCAN_IN, and causing D-FF 50 -j to latch the data held previously in D-FF 50 -(j- 1 ).
  • N pulses can be supplied to shift a new N-bit value into the generic scan register 46 from the SCAN_IN signal line, while shifting N bits of data out onto the SCAN_OUT signal line.
  • An update operation is carried out by supplying an UPDATE_CK pulse, causing D-FF 52 -j to latch the output of D-FF 50 -j in each bit stage.
  • the structure of the scan branch register 26 , the profile register 28 , the sector address register 30 , the data register 32 , and the function command register 34 in FIG. 3 is obtained from the generic scan register 46 by varying the bit length N.
  • the bit lengths of the sector address register 30 , the data register 32 , and the word counter 36 are determined by the sector size and other parameters of the flash memory 4 .
  • the bit lengths of the scan branch register 26 and the profile register 28 are independent of the flash memory 4 .
  • Certain other modifications may be made to the basic structure of the generic scan register 46 .
  • the sector address register 30 and data register 32 do not receive an update reset signal, and their second D-FFs 52 - 1 to 52 -N have no reset (R) input terminal.
  • FIG. 5 shows further details of the memory-access register block 6 , omitting the scan input and output signals, the scan branch register, the profile register, the branch decoder, and the multiplexers that were shown in FIG. 3.
  • the memory-access register block 6 has logic blocks 54 , 56 , 58 , 60 that generate the necessary control signals (CAPTURE_SEL, SHIFT_CK, UPDATE_CK, UPDATE_RST) for the sector address register 30 , the data register 32 , and the function command register 34 , and a reset signal for the word counter 36 .
  • the input signals to the logic blocks 54 , 56 , 58 , 60 include the Test Clock signal TCK, and other signals that will be described later.
  • the sector address register 30 generates the sector address bits A[m ⁇ 1:n] of the address signal S 1 as update data, and receives these same bits A[m ⁇ 1:n] as capture data.
  • the data register 32 receives the data output signal S 2 from the flash memory 4 as capture data, and sends the data input signal S 3 to the flash memory 4 as update data.
  • the function command register 34 captures the busy status signal S 5 from the flash memory 4 , and generates an instruction code as update data.
  • the instruction code is supplied to the control circuit 38 .
  • the word counter 36 is an n-bit counter that counts up in response to the update clock signal of the data register 32 , and generates the least significant n bits A[n ⁇ 1:0] of the address signal S 1 as parallel count data.
  • the control circuit 38 receives the update clock signal of the data register 32 , the update data of the function command register 34 , and a write enable flag signal (wren) from the profile register 28 . From these input signals, the control circuit 38 generates the control signal S 4 supplied to the flash memory 4 . For example, if the write enable flag (wren) is set, then whenever the data register 32 is updated, the control circuit 38 generates a write enable (nWE) pulse that writes the update data from the data register 32 into the sector buffer 18 in the flash memory 4 .
  • nWE write enable
  • the capture data supplied to the profile register 28 include coded parameter data related to the flash memory 4 .
  • the profile register 28 permits the parameter data to be captured in parallel form, then read out through the multiplexers 42 , 44 and test access port in serial form.
  • the parameter data provide information from which the bit lengths of the sector address register 30 , data register 32 , and word counter 36 can be determined, so that a host device connected to the test access port can establish a correct communication protocol with the interface circuit 2 .
  • the parameter data are generated within the integrated circuit and are hard-wired.
  • the branch decoder 40 By decoding the update data of the scan branch register 26 , the branch decoder 40 generates selection signals PRF_SEL, SECADR_SEL, DR_SEL, FCR_SEL that select the profile register 28 , the sector address register 30 , the data register 32 , and the function command register 34 , respectively.
  • SECADR_SEL, DR_SEL, and FCR_SEL are supplied to the corresponding logic blocks 54 , 56 , 58 in FIG. 5.
  • Arbitrary capture data may be supplied to the scan branch register 26 .
  • Multiplexer 42 selects the serial output of the profile register 28 , the sector address register 30 , the data register 32 , or the function command register 34 .
  • Multiplexer 44 selects the output of the multiplexer 42 or the serial output of the scan branch register 26 , thereby generating the multiplexed output signal S 8 .
  • the TAP circuit 8 basically has the structure described in the IEEE 1149.1 standard, comprising an instruction register (IR) 62 , a bypass register (BP) 64 , a scan number register (SCN) 66 , an instruction decoder (I-DEC) 68 , a multiplexer 70 , a latch 72 , and a TAP controller 74 .
  • the instruction register 62 , the bypass register 64 , and the scan number register 66 have the generic structure described in FIG. 4. The bit lengths of these registers are unrelated to the sector size and other parameters of the flash memory 4 .
  • the serial data scanned into the instruction register 62 constitute an instruction code, which is decoded by the instruction decoder 68 .
  • the instruction register 62 receives fixed data specified in the IEEE 1149 . 1 standard.
  • the instruction decoder 68 By decoding the instruction code, the instruction decoder 68 generates various selection signals that will be described later.
  • bypass register 64 When the bypass register 64 is selected, it passes the scan input signal to the multiplexer 70 with a one-bit delay, enabling a host device connected to the test access port to confirm electrical continuity between the test access port and TAP circuit 8 . As capture data, the bypass register 64 receives fixed data specified in the IEEE 1149.1 standard.
  • the scan number register 66 When the scan number register 66 is selected, it receives the scan input signal from the TDI terminal. The scan output signal of the scan number register 66 is supplied to the multiplexer 70 . The contents of the scan number register 66 are also output in parallel to the scan decoder 10 as the output signal code S 6 . Arbitrary capture data may be supplied to the scan number register 66 .
  • the multiplexer 70 receives the scan output signals from the instruction register 62 , the bypass register 64 , and the scan number register 66 , and the multiplexer output signal S 8 from the memory-access register block 6 ; selects one of these signals; and stores the selected signal in the latch 72 in synchronization with the fall of the test clock signal (TCK). From the latch 72 , the signal is supplied to the TDO terminal.
  • the TAP controller 74 is a state machine that receives the TCK, TMS, and nTRST signals, and controls the operations performed by registers 26 , 28 , 30 , 32 , 34 , 62 , 64 , 66 in the register block 6 and TAP circuit 8 .
  • the TAP controller 74 generates three signals (CAPTURE_DR, SHIFT_DR, and UPDATE_DR) that are supplied to logic blocks 54 , 56 , 58 in the memory-access register block 6 , and a TEST_LOGIC RESET signal that is supplied to logic block 60 .
  • FIG. 7 The sixteen states of the TAP controller 74 , and the main transitions among them, are illustrated in FIG. 7.
  • the illustrated state transitions occur at the rise of the test clock signal (TCK), according to the logic level of the test mode select signal (TMS).
  • TCK test clock signal
  • TMS test mode select signal
  • the TAP controller 74 When the nTRST terminal is driven to the ‘0’ logic level, the TAP controller 74 immediately returns to the Test-Logic Reset state, regardless of its current state, and regardless of the logic levels at the TMS and TCK terminals. A transition to the Test-Logic Reset state resets the scan branch register 26 , the profile register 28 , the function command register 34 , the word counter 36 , the instruction register 62 , and the scan number register 66 .
  • the instruction register 62 captures fixed data.
  • the TAP controller 74 is in the Shift-IR state, the contents of the instruction register 62 are shifted one bit, in the direction toward the TDO terminal, at each TCK cycle. This state can be held for a number of TCK cycles equal to the bit length of the instruction register 62 to load a complete new instruction code into the instruction register 62 .
  • the TAP controller 74 is in the Update-IR state, the instruction register 62 updates its parallel output data (update data).
  • the other states shown in FIG. 7 are temporary states that do not directly affect the operation of the scan registers 26 , 28 , 30 , 32 , 34 , 62 , 64 , 66 .
  • the TAP controller 74 when the TAP controller 74 is in the Capture-IR, Shift-IR, Update-IR, and Test-Logic Reset states, it sends corresponding signals (CAPTURE_IR, SHIFT_TR, UPDATE_IR, TEST_LOGIC RESET) to a logic block 76 that generates the control signals for the instruction register 62 .
  • These control signals CAPTURE_SEL, SHIFT_CK, UPDATE_CK, UPDATE_RST
  • the scan input and output signals (SCAN_IN and SCAN_OUT) operate as in the generic scan register in FIG. 4.
  • the fixed capture data correspond to Capturel to CaptureN in FIG. 4.
  • CAP, SFT, UPD, and RST mean capture, shift, update, and reset, respectively.
  • the instruction register 62 performs a capture operation when CAPTURE_IR and TCK are both in the logical ‘1’ state, a shift operation when SHIFT_IR and TCK are both in the logical ‘1’ state, an update operation when UPDATE_IR and TCK are both in the logical ‘1’ state, and an update reset operation whenever TEST_LOGIC RESET is in the logical ‘1’ state.
  • the SHIFT_CK signal is needed in both capture and shift operations, so it is generated from TCK when either CAPTURE_IR or SHIFT_IR is in the logical ‘1’ state.
  • the instruction decoder 68 By decoding the update data output from the instruction register 62 , the instruction decoder 68 generates a BP_SEL signal that selects the bypass register 64 , an SCN_SEL signal that selects the scan number register 66 , an SCBN_SEL signal that selects the scan branch register 26 , and an INTEST signal that collectively selects the profile register 28 , the sector address register 30 , the data register 32 , and the function command register 34 .
  • the name INTEST incidentally, indicates that these registers 28 , 30 , 32 , 34 are internal registers, rather than boundary scan registers.
  • the TAP controller 74 When the TAP controller 74 is in the Capture-DR, Shift-DR, Update-DR, and Test-Logic Reset states, it sends corresponding signals (CAPTURE_DR, SHIFT_DR, UPDATE_DR, TEST_LOGIC RESET) to the logic blocks that generate control signals for the data scan registers. These logic blocks have the generic structure shown in FIG. 9, which is essentially the structure shown in FIG. 8 with input of an additional selection signal, denoted X_SEL.
  • the signal denoted X_SEL is derived in various ways, described below, from the selection signals output by the instruction decoder 68 and the branch decoder 40 , and the decoded signal S 7 output by the scan decoder 10 .
  • a capture operation is performed when X_SEL and CAPTURE_DR are both in the logical ‘1’ state.
  • X_SEL must also be in the logical ‘1’ state when shift and update operations take place.
  • FIG. 10 illustrates the logic block 78 that controls the scan branch register 26 .
  • the signal that was denoted X_SEL in FIG. 9 is obtained as the logical AND of the SCBN_SEL signal output from the instruction decoder 68 and the decoded signal S 7 output from the scan decoder 10 .
  • the branch decoder 40 By decoding the update data from the scan branch register 26 , the branch decoder 40 generates the selection signals (PRF_SEL, SECADR_SEL, DR_SEL, FCR_SEL) mentioned above.
  • FIG. 11 illustrates the logic block 56 that controls the data register 32 .
  • the signal denoted X_SEL in FIG. 9 is now obtained as the logical AND of the INTEST signal from the instruction decoder 68 , the decoded signal S 7 from the scan decoder 10 , and the DR_SEL signal from the branch decoder 40 .
  • the X_SEL signals for the profile register 28 , the sector address register 30 , and the function command register 34 are obtained as the logical AND of INTEST, S 7 , and the appropriate selection signal (PRF_SEL, SECADR_SEL, or FCR_SEL) from the branch decoder 40 .
  • FIG. 12 illustrates the structure of the multiplexers 42 , 44 in the memory-access register block 6 .
  • the SHIFT_DR and EXITl_DR signals are state signals output by the TAP controller 74 in the corresponding states, shown in FIG. 7.
  • multiplexer 42 selects the scan outputs of the profile register 28 , the sector address register 30 , the data register 32 , and the function command register 34 when the TAP controller 74 is in the Shift-DR or Exit 1 -DR state and the corresponding selection signal (PRF_SEL, SECADR_SEL, DR_SEL, or FCR_SEL) is in the logical ‘1’ state.
  • Multiplexer 44 selects the scan output of the scan branch register 26 when the TAP controller 74 is in the Shift-DR or Exitl-DR state and SCBN_SEL is in the logical ‘1’ state. Multiplexer 44 selects the output of multiplexer 42 when INTEST is in the logical ‘1’ state and SCBN_SEL is in the logical ‘0’ state. The signal selected by multiplexer 44 becomes the multiplexed output signal S 8 of the memory-access register block 6 .
  • FIG. 13 illustrates the structure of the multiplexer 70 in the TAP circuit 8 .
  • the SHIFT_IR and EXITl_IR signals are state signals output by the TAP controller 74 in the corresponding states, shown in FIG. 7.
  • multiplexer 70 selects the scan output of the instruction register 62 when the TAP controller 74 is in the Shift-IR or Exitl-IR state.
  • Multiplexer 70 selects the scan output of the bypass register 64 or scan number register 66 when the TAP controller 74 is in the Shift-DR or Exitl-DR state and the corresponding selection signal (BP_SEL or SCN_SEL) is in the logical ‘1’ state.
  • Multiplexer 70 selects the multiplexed output signal S 8 from the memory-access register block 6 when the TAP controller 74 is not in the Shift-IR or Exit 1 -IR state and BP_SEL and SCN_SEL are both in the logical ‘0’ state.
  • the signal selected by the multiplexer 70 is supplied to the latch 72 .
  • the three multiplexers 42 , 44 , 70 supply the latch 72 with the scan output signal from the instruction register 62 during instruction scan operations, and with the scan output signal from a selected data scan register 26 , 28 , 30 , 32 , 34 , 64 , or 66 during data scan operations.
  • the signal supplied to the latch 72 is stored and output at the TDO terminal in synchronization with the test clock signal TCK.
  • An external host device uses the TDI, TCK, TMS, and nTRST terminals of the test access port to access the scan registers 26 , 28 , 30 , 32 , 34 , 62 , 64 , 66 and control the operation of the interface circuit 2 .
  • the host device can also obtain parameter values of the flash memory 4 and determine the internal state of the interface circuit 2 from the information scanned out at the TDO terminal.
  • the host device uses the instruction codes listed in FIG. 14 to select the register.
  • the bypass register 64 , the scan number register 66 , and the scan branch register 26 are selected by individual instruction codes respectively denoted BYPASS, SCAN_N, and SCAN_BN.
  • a further instruction code denoted INTEST selects the profile register 28 , the sector address register 30 , the data register 32 , and the function command register 34 as a group.
  • These four registers are then selected individually by a code set in the scan branch register 26 , referred to below as the SCBN code.
  • the above instruction codes and SCBN code are scanned into the interface circuit 2 through the TDI terminal.
  • An instruction code is shifted into the instruction register 62 by manipulating the logic level at the TMS terminal to bring the TAP controller 74 into the Shift-IR state, as indicated in FIG. 7, and remaining in that state for the necessary number of TCK cycles while the instruction code is supplied bit by bit to the TDI terminal.
  • the TMS input is then changed to move the TAP controller 74 into the Update-IR state, thereby performing an update operation on the instruction register 62 and making the instruction code available to the instruction decoder 68 .
  • the instruction decoder 68 decodes the instruction code and generates a scan data register selection signal. This entire operation will be described below by saying that the instruction code is scanned into the instruction register 62 and decoded.
  • the scan branch register 26 is selected.
  • the TMS logic level can now be manipulated as indicated in FIG. 7 to bring the TAP controller 74 into the Shift-DR state and shift an SCBN code into the scan branch register 26 .
  • the TMS logic level is changed to bring the TAP controller 74 into the Update-DR state, thereby supplying the SCBN code to the branch decoder 40 .
  • the branch decoder 40 decodes the SCBN code and generates a further scan data register selection signal. This entire operation will be described below by saying that the SCBN code is scanned into the scan branch register 26 and decoded.
  • the INTEST instruction code can be scanned into the instruction register 62 and decoded to have the instruction decoder 68 generate the INTEST signal needed for access to the data scan register selected by the branch decoder 40 .
  • a flash programmer is connected as the host device to the test access port. To begin programming, the flash programmer drives the nTRST terminal to the ‘0’ logic level, placing the TAP controller 74 in the Test-Logic Reset state, and initializing the word counter 36 and the scan number register 66 .
  • the SCAN_N instruction code is scanned into the instruction register 62 and decoded, selecting the scan number register 66 .
  • a predetermined code is then scanned into the scan number register 66 and decoded by the scan decoder 10 .
  • This predetermined code causes the scan decoder 10 to set signal S 7 to the ‘1’ logic level, selecting the memory-access register block 6 , thereby enabling the scan registers in the memory-access register block 6 to be selected.
  • the profile register 28 is now selected as described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0000’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded.
  • the flash programmer By decoding the capture data scanned out from the profile register 28 , the flash programmer obtains parameters describing the memory capacity, word width, and sector size of the flash memory 4 . From these parameters, the flash programmer determines the bit length of the sector address register 30 , the data register 32 , and the word counter 36 . In subsequent access to the interface circuit 2 , the flash programmer uses a communication protocol adjusted to these parameters and bit lengths.
  • the sector address register 30 is selected by the procedure described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0010’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded.
  • the sector address code A[m ⁇ 1:n] of the sector 24 to be programmed is now scanned into the sector address register 30 and the sector address register 30 is updated, setting the sector address code A[m ⁇ 1:n] in the upper bits of the address signal SI. Since the word counter 36 was reset by the initial nTRST signal, the word address code A[n ⁇ 1:0] in the address signal S 1 also has a known value at this point.
  • the data register 32 is selected by the procedure described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0100’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded. Data words are then scanned into the data register 32 one by one, each word having the bit length of the data register 32 . After each word is scanned in, the data register 32 is updated, thereby sending the word to the sector buffer 18 , which stores the word at the address indicated by the address signal S 1 .
  • each word is stored at a different address in the sector buffer 18 .
  • the update operation on the data register 32 also triggers the output of a write pulse by the control circuits 20 , 38 in the flash memory 4 and memory-access register block 6 .
  • the control circuit 38 sets the nWE bit in the control signal S 4 for a certain interval, and the control circuit 20 sends corresponding write data to the sector buffer 18 .
  • the function command register 34 is selected by the procedure described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0001’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded. A programming command code is scanned into the function command register 34 , and the function command register 34 is updated.
  • the control circuit 38 in the memory-access register block 6 passes the programming command code to the control circuit 20 in the flash memory 4 , using the C[v ⁇ 1:0] bits in control signal S 4 .
  • Control circuit 20 then initiates operations that automatically erase the selected sector 24 in the memory cell array 12 , and write all of the data stored in the sector buffer 18 simultaneously into the erased sector 24 .
  • the busy status signal S 5 is set to the ‘1’ logic level while these operations are in progress, and reset to the ‘0’ logic level when programming is completed.
  • the flash programmer After giving the programming command, the flash programmer repeatedly scans a No Operation command code into the function command register 34 , also carrying out capture and update operations on the function command register 34 .
  • the function command register 34 repeatedly captures the busy status signal S 5 from the flash memory 4 , scans this signal out at the TDO terminal, and sends No Operation commands to control circuit 38 .
  • the control circuit 20 in the flash memory 4 continues erasing and programming the selected sector of memory cells. By checking the busy status signal, the flash programmer recognizes the completion of programming of the selected sector 24 , and can then proceed with operations for programming the next sector.
  • the host device drives the nTRST terminal to the ‘0’ logic level, resetting the word counter 36 , the profile register 28 , and the scan number register 66 .
  • the write enable flag (wren) output from the profile register 28 is thereby reset, disabling the write enable bit nWE in the control signal S 4 sent to the flash memory 4 .
  • the SCAN_N code is scanned into the instruction register 62 and decoded to select the scan number register 66 .
  • the predetermined code mentioned above is scanned into the scan number register 66 and decoded by the scan decoder 10 , setting the decoded signal S 7 to the ‘1’ logic level and selecting the memory-access register block 6 .
  • the SCAN_BN instruction code is scanned into the instruction register 62 and decoded, the ‘0010’ SCBN code is scanned into the scan branch register 26 and decoded, and the INTEST instruction code is scanned into the instruction register 62 and decoded, selecting the sector address register 30 .
  • the sector address code A[m ⁇ 1:n] of the sector 24 to be read is scanned into the sector address register 30 and set in the upper bits of the address signal S 1 .
  • the word address code A[n ⁇ 1:0] in the address signal S 1 has the known value set when the word counter 36 was reset by the nTRST signal.
  • the SCAN_BN instruction code is scanned into the instruction register 62 and decoded, the ‘0100’ SCBN code is scanned into the scan branch register 26 and decoded, and the INTEST instruction code is scanned into the instruction register 62 and decoded, selecting the data register 32 .
  • Capture, shift, and update operations are performed on the data register 32 , whereby the data register 32 captures the word of data output by the flash memory 4 from the address designated by the address signal S 1 , and scans this word out at the TDO terminal.
  • Each update of the data register 32 increases the word count in the word counter 36 , thereby increasing the word address code A[n ⁇ 1:0] in the address signal S 1 .
  • the capture, shift, and update operations can be repeated to read a desired number of words from consecutive addresses in the selected sector 24 in the memory cell array 12 .
  • the control signal S 4 output from control circuit 38 holds the flash memory 4 in the read state.
  • the actual reading of the output data signal S 2 from the sense amplifiers 22 takes place during the TCK pulse that occurs when the TAP controller 74 is in the Capture-DR state.
  • the TCK frequency is normally one megahertz or less, and the read access time of the flash memory 4 is much less than one microsecond, an ample timing margin is left.
  • a basic advantage of the first embodiment is that scan data registers 28 , 30 , 32 , 34 in the memory-access register block 6 are not connected in a single chain, but are disposed on parallel paths between the TDI and TDO terminals. Once selected, each of these scan data registers can accordingly be accessed directly, without the need to shift data in or out through other registers in the memory-access register block 6 .
  • Another advantage is that once a sector address has been set in the sector address register 30 , addresses within the sector are generated automatically by the word counter 36 , so it is not necessary to scan in a separate address for every word of data written or read.
  • a further advantage of the first embodiment is that information describing the memory capacity, sector size, and word width of the flash memory 4 is hard-wired into the interface circuit 2 as capture data for the profile register 28 , and can be scanned out and read by the flash programmer.
  • the flash programmer can thereby determine the bit lengths of the sector address register 30 and the data register 32 , and set itself up automatically for the correct communication protocol. Besides preventing programming mistakes, this enables the flash memory to be designed without the worry that a particular design might not be compatible with the flash programmer's capabilities.
  • the scan decoder 10 can be adapted to generate a separate selection signal for each memory-access register block by decoding a corresponding code placed in the scan number register 66 .
  • a final advantage is that MCU resources do not have to be used for flash-memory programming.
  • the second embodiment differs from the first embodiment in that the memory-access register block 6 is always selected.
  • the interface circuit 80 in the second embodiment includes a memory-access register block 6 and a TAP circuit 82 , but no scan decoder.
  • the memory-access register block 6 has the structure described in the first embodiment, except that no decoded signal S 7 is required to select its scan data registers.
  • the signals S 1 , S 2 , S 3 , S 4 , S 5 exchanged between the memory-access register block 6 and the flash memory 4 are the same as in the first embodiment, as is the multiplexed signal S 8 output from the memory-access register block 6 to the TAP circuit 82 .
  • the TAP circuit 82 comprises an instruction register 62 , a bypass register 64 , an instruction decoder 68 , a multiplexer 70 , a latch 72 , and a TAP controller 74 , substantially as described in the first embodiment.
  • the instruction decoder 68 does not generate an SCN_SEL signal, there being no scan number register for this signal to select.
  • the multiplexer 70 selects the signal S 8 output from the memory-access register block 6 when the instruction register 62 and the bypass register 64 are not selected, and the TAP controller 74 is not in the Shift-IR or Exitl-IR state.
  • the instruction codes used in the second embodiment include the BYPASS, SCAN_BN, and INTEST instruction codes described in the first embodiment, and the SCAN_BN instruction code selecting the scan branch register 26 .
  • the INTEST instruction code is scanned in and decoded, one scan data register among the profile register 28 , sector address register 30 , data register 32 , and function command register 34 is selected according to the contents of the scan branch register 26 , as explained in the first embodiment. There is no SCAN_N instruction code.
  • Flash-memory access operations are performed by the procedures described in the first embodiment, except that the scan data registers 26 , 28 , 30 , 32 , 34 in the memory-access register block 6 can be accessed immediately after the TAP controller 74 and the word counter 36 have been reset by the nTRST signal. It is not necessary to scan in and decode a SCAN_N instruction code and then scan in and decode another code that selects the memory-access register block 6 .
  • the second embodiment accordingly provides even faster access to the flash memory 4 than the first embodiment.
  • the second embodiment also enables a flash programmer to scan out flash-memory parameters and automatically select the correct communication protocol, as in the first embodiment.
  • the TAP circuit 82 in the second embodiment is used only for controlling the memory-access register block 6 , and not for other functions such as debugging.
  • the interface circuit 80 operates as an independent functional block, completely independent of the MCU core and other functional bocks that may be integrated onto the same chip.
  • the second embodiment can be usefully employed in chips having an MCU core that does not support JTAG functions, for example.
  • the third embodiment uses a separate instruction code to select each scan data register.
  • the memory-access register block 84 in the third embodiment comprises a profile register 28 , a sector address register 30 , a data register 32 , a function command register 34 , a word counter 36 , a control circuit 38 , and a multiplexer 42 , substantially as described in the first embodiment.
  • the multiplexed signal S 8 is output directly from the multiplexer 42 .
  • the third embodiment uses substantially the same TAP circuit as in the first embodiment, except that the instruction decoder generates a separate selection signal for each scan data register, by decoding a separate instruction code.
  • the instruction codes used in the third embodiment include the BYPASS instruction code that selects the bypass register 64 , the SCAN_N instruction code that selects the scan number register 66 , a PROFILE instruction code that selects the profile register 28 , an SECADR instruction code that selects the sector address register 30 , a DRRDWR (data register read-write) instruction code that selects the data register 32 , and a FCMD instruction code that selects the function command register 34 .
  • a flash programmer connected to the test access port first drives the nTRST terminal to the ‘0’ logic level, placing the TAP controller 74 in the Test-Logic Reset state and initializing the word counter 36 and the scan number register 66 .
  • the SCAN_N instruction code is scanned into the instruction register 62 and decoded, selecting the scan number register 66 , and a predetermined code is scanned into the scan number register 66 and decoded, selecting the memory-access register block 84 .
  • PROFILE instruction code is now scanned into the instruction register 62 and decoded, selecting the profile register 28 . Capture, shift, and update operations are performed, setting the write enable flag (wren), and providing flash-memory parameter information to the flash programmer. The flash programmer thereby determines the bit lengths of the sector address register 30 , data register 32 , and word counter 36 .
  • the SECADR instruction code is scanned into the instruction register 62 and decoded, selecting the sector address register 30 .
  • the desired sector address code A[m ⁇ 1:n] is scanned into the sector address register 30 and the sector address register 30 is updated, setting the sector address code in the upper bits of the address signal S 1 .
  • the DRRDWR instruction code is scanned into the instruction register 62 and decoded, selecting the data register 32 .
  • Data words are then scanned into the data register 32 and transferred to the sector buffer 18 as explained in the first embodiment.
  • the FCMD instruction code is scanned into the instruction register 62 and decoded, selecting the function command register 34 .
  • the remaining operations are performed as described in the first embodiment.
  • the flash programmer scans a programming instruction code into the function command register 34 to initiate the erasing and programming of the selected sector in the memory cell array 12 , then repeatedly scans in No Operation instruction codes and checks the value of the busy status signal, which is scanned out at the TDO terminal, to determine when programming has been completed.
  • the flash programmer To read data from the flash memory 4 , the flash programmer first drives the nTRST terminal to the ‘0’ logic level, resetting the word counter 36 , the profile register 28 , the scan number register 66 , and the write enable flag (wren). Next, after the nTRST terminal has been returned to the ‘1’ logic level, the SCAN_N instruction code is scanned into the instruction register 62 and decoded, selecting the scan number register 66 , and the above-mentioned predetermined code is scanned into the scan number register 66 and decoded, selecting the memory-access register block 84 .
  • the SECADR instruction code is scanned into the instruction register 62 and decoded, selecting the sector address register 30 .
  • the sector address code A[m ⁇ 1:n] of the sector to be read is scanned into the sector address register 30 and set in the upper bits of the address signal S 1 .
  • the DRRDWR instruction code is now scanned into the instruction register 62 and decoded, selecting the data register 32 . Data words are then captured in the data register 32 and scanned out as described in the first embodiment.
  • the third embodiment speeds up access to the flash memory 4 by simplifying the procedure for selecting the scan data registers in the memory-access register block 84 .
  • the internal structure of the memory-access register block 84 is also simplified, as there is no scan branch register and only one multiplexer. Other effects are the same as in the first embodiment.
  • the third embodiment is advantageous when the instruction register 62 has enough bits to permit a separate instruction code to be used for selecting each data scan register.
  • the scan decoder 10 is eliminated from the interface circuit, the scan number register 66 is eliminated from the TAP circuit 8 , and the memory-access register block 84 is always selected, as described in the second embodiment.
  • the fourth embodiment is an M-bit scan register 86 , where M is an integer equal to or greater than two (2 ⁇ M).
  • the first bit stage B 2 - 1 comprises a selector 88 - 1 and a pair of D-FFs 90 - 1 , 92 - 1 that are controlled by the CAPTURE_SEL, SHIFT_CK, UPDATE_CK, and UPDATE_RST signals described in the first embodiment.
  • Selector 88 - 1 has three input terminals (A, B, S) and an output terminal (O).
  • Input terminal A receives a scan input signal (SCAN_IN) from the TDI terminal.
  • Input terminal B receives the Q output signal, denoted u-back, of D-FF 92 - 1 .
  • Input terminal S receives the CAPTURE_SEL signal.
  • the scan input signal (SCAN_IN) is selected when CAPTURE_SEL is at the ‘0’ logic level; the u_back input signal is selected when CAPTURE_SEL is at the ‘1’ logic level.
  • the selected input signal is supplied from the output terminal (O) to the data input terminal (D) of D-FF 90 - 1 .
  • D-FF 90 - 1 latches the output signal from selector 88 - 1 in synchronization with the SHIFT_CK signal, which is received at a CK input terminal.
  • the latched signal is supplied from the Q output terminal of D-FF 90 - 1 to the D input terminal of D-FF 92 - 1 , and to the A input terminal of a selector 88 - 2 in the second bit stage B 2 - 2 (not visible).
  • D-FF 92 - 1 latches the output signal from D-FF 90 - 1 in synchronization with the UPDATE_CK signal, which is received at a CK input terminal.
  • the latched signal is supplied as the u_back signal to the B input terminal of selector 90 - 1 , and to the S input terminals of selectors 94 -k in other bit stages B 2 -k (2 ⁇ k ⁇ M). If necessary, the u_back signal can also be supplied as an update data signal to another circuit (not visible).
  • the u_back output signal is reset by input of the UPDATE_RST signal at the R input terminal of D-FF 92 - 1 .
  • Each of the other bit stages B 2 -k (2 ⁇ k ⁇ M) comprises a pair of selectors 94 -k, 88 -k and a D-FF 90 -k. These stages are controlled by the CAPTURE_SEL, SHIFT_CK, and u_back signals.
  • Selector 94 -k has three input terminals (A, B, S) and an output terminal (O).
  • the A and B input terminals receive two different capture signals, denoted Frontk and Backk.
  • the S input terminal receives the u-back signal, as noted above.
  • the A input signal (Frontk) is selected when u_back is at the ‘0’ logic level; the B input signal (Backk) is selected when u_back is at the ‘1’ logic level.
  • the selected input signal (Frontk or Backk) is supplied from the output terminal (O) to the B input terminal of selector 88 -k.
  • Selector 88 -k likewise has three input terminals (A, B, S) and an output terminal (O).
  • the A input terminal receives the Q output signal from D-FF 90 -(k ⁇ 1) in the preceding bit stage B 2 -(k- 1 ).
  • the S input terminal receives the CAPTURE_SEL signal.
  • the A input signal is selected when CAPTURE_SEL is at the ‘0’ logic level; the B input signal is selected when CAPTURE_SEL is at the ‘1’ logic level.
  • the selected input signal is supplied from the output terminal (O) to the D input terminal of D-FF 90 -k.
  • D-FF 90 -k latches the output signal from selector 88 -k in synchronization with the SHIFT_CK signal, which is received at a CK input terminal.
  • the latched signal is supplied from the Q output terminal of D-FF 90 -k to the B input terminal of selector 88 -(k+1) in the next bit stage (not visible), except that the Q output signal from D-FF 90 -M in the last bit stage B 2 -M becomes the scan output signal (SCAN_OUT).
  • Capture operations are performed during cycles of the SHIFT_CK signal in which the CAPTURE_SEL signal is at the ‘1’ logic level. If the u_back signal is at the ‘0’ logic level, the Frontk data are captured: D-FF 90 - 1 latches the u_back signal (‘0’) , and D-FFs 90 -k (2 ⁇ k ⁇ M) latch the Frontk signals. If the u_back signal is at the ‘1’ logic level, the Backk data are captured: D-FF 90 - 1 latches the u_back signal (‘1’), and D-FFs 90 -k (2 ⁇ k ⁇ M) latch the Backk signals.
  • Shift operations are performed during cycles of the SHIFT_CK signal in which the CAPTURE_SEL signal is at the ‘0’ logic level.
  • the value held in each D-FF 90 -k (1 ⁇ k ⁇ M ⁇ 1) is shifted into the next D-FF 90 -(k+1).
  • D-FF 90 - 1 receives and stores the SCAN_IN signal.
  • An update operation is performed when an UPDATE_CK pulse is supplied, causing D-FF 92 - 1 to latch the current contents of D-FF 90 - 1 , and begin output of the latched logic level as the u_back signal.
  • An update reset operation is performed when the UPDATE_RST signal is driven to the ‘1’ logic level, resetting the u_back signal to the ‘0’ logic level. Only the first bit stage B 2 - 1 responds to the UPDATE_CK and UPDATE_RST signals. The other bit stages B 2 -k (2 ⁇ k ⁇ M) do not generate update data.
  • the u_back signal is set to the ‘0’ logic level by input of an UPDATE_RST signal.
  • the SHIFT_CK signal is cycled M times.
  • the CAPTURE_SEL signal is placed at the ‘1’ logic level, causing D-FF 90 - 1 to latch the ‘0’ logic level of the u_back signal, and the other D-FFs 90 -k (2 ⁇ k ⁇ M) to latch the Frontk signals.
  • D-FF 90 -M begins output of the FrontM signal as the SCAN_OUT signal.
  • the CAPTURE_SEL signal is held at the ‘0’ logic level, causing the Frontk signals to be shifted as data through D-FFs 90 - 2 to 90 -M and scanned out on the SCAN_OUT signal line.
  • the M successive values of the SCAN_OUT signal are FrontM, Front(M- 1 ), Front 2 , ‘0’, the final ‘0’ being the u_back logic level.
  • the SCAN_IN signal is placed at the ‘1’ logic level, which is latched by D-FF 90 - 1 .
  • an update operation is performed, setting u_back to the ‘1’ logic level.
  • the back capture data are now captured and shifted out in the manner described above, by cycling the SHIFT_CK signal M times, with CAPTURE_SEL at the ‘1’ logic level during the first cycle and at the ‘0’ logic level during the remaining M- 1 cycles.
  • the M successive values of the SCAN_OUT signal are BackM, Back(M- 1 ), . . . , Back 2 , ‘1’, the final ‘1’ being the u_back logic level.
  • the SCAN_IN signal can be placed at the ‘0’ logic level during the M-th SHIFT_CK cycle to scan a ‘0’ into D-FF 90 - 1 , and an update operation can then be performed to reset u_back to the ‘0’ logic level.
  • This scan register 86 is particularly suitable for use in the first three embodiments as the profile register 28 , which may need to capture a large amount of parameter data, but has to provide only one update data bit (wren).
  • a nine-bit scan register 86 can be used to capture a four-bit code (strage ⁇ 3:0>) indicating the flash-memory storage capacity, a three-bit code (sector ⁇ 2:0>) indicating the sector size, and eight bits of parameter data describing other options, such as the word width, as well as two flag bits (c_back 0 and c_back 1 ).
  • the storage capacity and sector size may be coded as indicated in FIGS. 22 and 23, for example.
  • Another alternative would be to provide two separate nine-bit profile registers, selected by different instruction codes or SCAN_BN codes. In this case, however, to obtain all of the capture data, two instruction codes or SCAN_BN codes would have to be scanned in and decoded to select both profile registers in turn.
  • the fourth embodiment permits all of the capture data to be obtained after just one register selection operation.
  • the fourth embodiment thus has the advantage of providing efficient access to both large and small amounts of capture data. Another advantage of the fourth embodiment is that the circuit size of the scan register 86 is reduced, as compared with either of the two alternatives mentioned above.
  • additional sets of capture data are provided, and two or more update data bits are used to select a particular set of capture data. It suffices to provide D-FFs 92 -k to latch update data in a plurality of bit stages B 2 -k, and use selectors 94 -k with more data input terminals and selection-signal input terminals. A very large amount of capture data can thereby be obtained from a scan register with a comparatively small number of bit stages.
  • one or more of the capture data bits can be output as updatable flag data. It suffices to add additional D-FFs 92 -k to latch the flag bits as update data. In FIG. 21, for example, the most significant bit of capture data is used as a flag (c_back 0 or c_back 1 ).
  • the conventional interface circuit 100 provides a TAP circuit 102 generally similar to the TAP circuit in the second embodiment, comprising an instruction register 106 , a bypass register 108 , an instruction decoder 110 , a multiplexer 112 , a latch 114 , and a TAP controller 116 .
  • the address register 120 supplies an address signal S 11 as update data to the flash memory 4 .
  • the data register 122 receives read data S 12 from the flash memory 4 as capture data, and supplies write data S 13 to the flash memory 4 as update data.
  • the control register 124 supplies a control signal S 14 to the flash memory 4 as update data.
  • the memory-access register chain 118 is selected when an INTEST instruction code is scanned into the instruction register 106 and decoded.
  • the three registers 120 , 122 , 124 in the chain 118 operate as if they were a single scan data register, shift operations and update operations being carried out on all three registers simultaneously.
  • a further source of delay is that even when only a control code is scanned in, it must be shifted through the address register 120 and the data register 122 before it can reach the control register 124 . Similarly, data scanned out from the data register 122 must pass through the control register 124 before reaching the test data output terminal TDO.
  • the present invention provides access to flash memory data without the need for repeated scanning in of addresses and control codes, and enables large amounts of flash-memory parameter data to be captured and scanned out.
  • the present invention can be practiced in any large-scale integrated circuit having a test access port of the general type described in the IEEE 1149.1 standard, regardless of whether or not the test access port is also used to implement boundary-scan functions or debugging functions. If these other functions are present, the TAP circuit may be shared with them. Alternatively, the TAP circuit in the interface circuit may be an independent unit, the boundary-scan functions and/or debugging functions being implemented by another TAP circuit.
  • the invention has been described in relation to the control protocol given in the IEEE 1149.1 standard, but is not limited to this protocol. Any protocol that enables capture, shift, and update operations to be carried out on the data scan registers in the memory-access register block can be employed.
  • the controller in the interface circuit does not have to follow the state transitions shown in FIG. 7.
  • the invention is not limited to the use of a flash memory with a sector buffer. If the flash memory does not have a sector buffer, each word of write data can be programmed immediately after being transferred from the memory-access register block to the flash memory. In this case, the codes written in the function command register 34 and the control signals generated by the control circuit 38 will naturally differ from those described above, and the methods of generating write enable signals and word addresses may also differ.
  • the parameter information stored in the profile register is not limited to the storage capacity, sector size, and word width of the flash memory. Examples of other information that may be stored include information specifying electrical characteristics of the flash memory, information specifying flash memory access or programming methods, and information related to circuits other than the flash memory. If a large amount of parameter information must be stored, the profile register can be provided with multiple sets of capture data as described in the fourth embodiment. Needless to say, the profile register is not limited to the capture data format shown in FIG. 21. For example, the u_back flag does not have to be the most significant bit of update data, but can be located in any bit location.
  • the invention is not limited to flash memory, but can be applied in relation to any type of embedded non-volatile memory to which external serial access might be necessary.

Abstract

An interface circuit providing serial access to a non-volatile memory in an integrated circuit has at least two memory-access scan registers and at least one selection scan register coupled in common to a data input terminal of the integrated circuit. These registers are also coupled through a multiplexer to a data output terminal of the integrated circuit. The memory-access scan registers receive serial data such as address data and data to be written in the non-volatile memory at the specified addresses. The selection scan register receives a code for selecting the memory-access scan registers. Serial access to the non-volatile memory is speeded up because the memory-access scan registers can be accessed individually.

Description

    BACKGROUND OF THE INVENTION
  • The present invention relates to an interface circuit and method for programming a non-volatile memory, and to a type of scan register useful in this circuit. [0001]
  • Non-volatile memory is a basic component of many integrated-circuit devices, including so-called ‘system-on-chip’ devices. Such devices often use a reprogrammable type of non-volatile memory, such as electrically erasable and programmable read-only memory (EEPROM), or flash memory (also referred to as flash ROM). Flash memory, which is electrically erasable in large blocks, is often used to store program code and parameter data in microcontroller chips, and in system-on-a-chip devices having a microcontroller core. [0002]
  • One advantage of flash memory in these devices is that it enables software changes to be implemented and tested with very short turn-around times, even enabling devices installed on printed-circuit boards to be reprogrammed in the field. For devices with large system programs, on-board reprogramming has become an essential capability, as it is virtually impossible to foresee all eventualities during the software design stage. Reprogrammability is useful for debugging, for customizing devices to user specifications, for updating parameters and other data stored in tables, and for extending the life cycle of a device or system through frequent software revisions. [0003]
  • To minimize the number of LSI terminals needed to implement the interface protocol, reprogramming is usually carried out through a serial interface circuit. Different manufacturers have used different serial interfaces, including the one described in IEEE Standard 1149.1-1990, which specifies a standard test access port and boundary-scan architecture. This interface standard is also known as JTAG revision 2.0, because of developmental work done by the Joint Test Action Group, and the associated technology is often referred to as JTAG technology. [0004]
  • Incidentally, LSI stands for large-scale integrated circuit, and IEEE for the Institute of Electrical and Electronics Engineers. [0005]
  • A device employing JTAG technology has a test access port (TAP) with a test data input terminal, a test data output terminal, and boundary scan circuits chained serially between these two terminals, enabling the input and output signals of the device to be observed and manipulated inside the device. If multiple devices of this type are mounted on the same printed-circuit board, their test access ports can be linked together to form a single boundary scan chain providing test access to all of the devices, enabling both internal device functions and interconnections between the devices to be tested. [0006]
  • Recently, JTAG technology has also been used as an interface for debugging the software of the microcontroller core of a system-on-a-chip, by providing a debugging scan chain, separate from the boundary scan chain, between the test data input and output terminals. It would be convenient if the same interface could also be used to program flash memory in the chip, so that debugging and reprogramming could be carried out in the same environment simply by connecting a debugger and a terminal device to the test access port, without the need for special equipment or wiring. Similarly, manufactured products could be programmed with customized software and then tested, using the same test access port for both purposes. A specialized flash-memory programming device, referred to below as a flash programmer, could also be connected to the test access port for on-board reprogramming in the field. [0007]
  • Aside from convenience, using the same test access port for debugging, programming, and testing is a way to reduce system costs. [0008]
  • A conventional way to enable on-chip flash memory to be programmed through the JTAG test access port is to provide a separate chain of memory-access registers between the test data input and output terminals. The memory-access register chain needs to include an address register for supplying address signals to the flash memory, a data register for storing read and write data, and a control register for supplying control signals to the flash memory. In the conventional scheme, these three registers are connected serially, the output data of one register becoming the input data of the next register in the chain. [0009]
  • A problem with the conventional memory-access register chain is that to read or write each word of flash-memory data, the associated address signals and control signals, as well as the data, must be shifted into or out of the memory-access registers. Input data destined for the register farthest from the test data input terminal must first be shifted through the other two registers. The total number of shift operations that must be performed per read or write access is therefore equal to the combined bit length of the address, data, and control registers. [0010]
  • The shift operations are synchronized with a test clock signal, which is supplied from the flash programmer or other host device that accesses the flash memory. The test clock frequency is limited, typically to one megahertz or less, because of the presence of electrical noise and other disturbing factors. The flash memory may have a capacity of several hundred kilobytes. Transferring this amount of data through a conventional register chain, with a test clock frequency of one megahertz or less, can easily take more than a minute. This delay is inconvenient during debugging, and intolerable in factory tests and inspections. [0011]
  • A further problem is that flash-memory storage capacity, sector size, and word width differ from one device to another. Consequently, the bit lengths of the address and data registers in the memory-access scan chain differ from one device to another. As new devices are constantly being developed, it is impractical to provide a flash programmer with pre-stored information describing the flash-memory parameters of every device that might need to be programmed. The alternative is to enter this information manually when the flash programmer is used, or to use different flash programmers for different types of devices, but both of these procedures are inconvenient and invite errors such as inadvertent entry of incorrect data or use of the wrong flash programmer. [0012]
  • An example of a conventional memory-access register chain and a more detailed description of these problems will be given later. [0013]
  • SUMMARY OF THE INVENTION
  • An object of the present invention is to speed up serial access to a non-volatile memory disposed in an integrated circuit. [0014]
  • Another object of the invention is to enable automatic set-up of a communication protocol between the integrated circuit and a programming device. [0015]
  • Yet another object is to increase the amount of parallel parameter data that can be captured and scanned out by a scan register. [0016]
  • The invented interface circuit comprises a plurality of memory-access scan registers coupled in common to a data input terminal of an integrated circuit in which the non-volatile memory is disposed, receiving serial data related to access to the non-volatile memory from the data input terminal. The interface circuit also has at least one selection scan register coupled to the data input terminal, receiving a code selecting at least one of the memory-access scan registers, and has at least one multiplexer coupling the memory-access scan registers and selection scan register to a data output terminal of the integrated circuit, for serial output of data from these registers. [0017]
  • The memory-access scan registers include, for example, a data register storing data to be written in the non-volatile memory, an address register storing address information for the non-volatile memory, a function command register storing a code for controlling the non-volatile memory, and a profile register. The profile register captures parallel parameter data from the integrated circuit for serial output at the data output terminal. The parallel parameter data may include various parameters of the non-volatile memory. [0018]
  • As a selection scan register, the interface circuit may have an instruction register to which instruction codes are provided from the data input terminal. Each memory-access scan register may be selected by a different instruction code, or all of the memory-access scan registers may be selected by a single instruction code. In the latter case, the interface circuit may have another selection scan register or scan branch register that receives different codes selecting the memory-access scan registers individually. [0019]
  • The above scan registers can be controlled by a test access port controller. [0020]
  • When the invented interface circuit is used for serial access to the non-volatile memory, the access is speeded up because each of the memory-access scan registers can be accessed individually, with no need to shift data through the other memory-access scan registers. [0021]
  • If parameters of the non-volatile memory are stored in a profile register, these parameters can be read from the data output terminal and analyzed to determine the bit lengths of the memory-access scan registers, whereby a protocol for communicating with the interface circuit can be set up automatically. [0022]
  • The invention also provides a scan register receiving serial scan input data and parallel capture data, and generating serial scan output data and update data, having a selector selecting the parallel capture data according to at least one bit of the update data. The amount of data that can be captured and scanned out is thereby increased. This type of scan register can be advantageously used as the above-mentioned profile register.[0023]
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • In the attached drawings: [0024]
  • FIG. 1 is a block diagram showing an interface circuit illustrating a first embodiment of the invention; [0025]
  • FIG. 2 is a block diagram of the flash memory in FIG. 1; [0026]
  • FIG. 3 is a block diagram of the memory-access register block in FIG. 1; [0027]
  • FIG. 4 is a circuit diagram of a generic scan register on which the scan registers in the first embodiment are based; [0028]
  • FIG. 5 is a block diagram showing part of the memory-access register block in more detail; [0029]
  • FIG. 6 is a block diagram of the TAP circuit in FIG. 1; [0030]
  • FIG. 7 is a state transition diagram for the TAP controller in FIG. 6; [0031]
  • FIG. 8 is a circuit diagram of the instruction register in FIG. 6, showing the associated logic block and decoder; [0032]
  • FIG. 9 is a circuit diagram showing the logic block of a typical scan data register in FIG. 3; [0033]
  • FIG. 10 is a circuit diagram showing the logic block of the scan branch register in FIG. 3; [0034]
  • FIG. 11 is a circuit diagram showing the logic block of the data register in FIG. 3; [0035]
  • FIG. 12 is a circuit diagram of the multiplexers in FIG. 3; [0036]
  • FIG. 13 is a circuit diagram of the multiplexer in FIG. 6; [0037]
  • FIG. 14 summarizes the instruction codes used in the first embodiment; [0038]
  • FIG. 15 is a block diagram showing an interface circuit illustrating a second embodiment of the invention; [0039]
  • FIG. 16 is a block diagram of the TAP circuit in the second embodiment; [0040]
  • FIG. 17 summarizes the instruction codes used in the second embodiment; [0041]
  • FIG. 18 is a block diagram of a memory-access register block illustrating a third embodiment of the invention; [0042]
  • FIG. 19 summarizes the instruction codes used in the third embodiment; [0043]
  • FIG. 20 is a circuit diagram of a scan register illustrating a fourth embodiment of the invention; [0044]
  • FIG. 21 shows the capture data and update data format of a profile register exemplifying the fourth embodiment; [0045]
  • FIG. 22 indicates how the storage capacity can be coded in FIG. 21; [0046]
  • FIG. 23 indicates how the sector size can be coded in FIG. 21; and [0047]
  • FIG. 24 is a block diagram illustrating a conventional interface circuit.[0048]
  • DETAILED DESCRIPTION OF THE INVENTION
  • Embodiments of the invention will be described with reference to the attached drawings, in which similar parts are indicated by similar reference characters. [0049]
  • Illustrating a first embodiment, FIG. 1 shows an [0050] interface circuit 2 that forms part of a large-scale integrated circuit chip. The core of the chip is a microcontroller unit (MCU) that executes a program stored in a flash memory 4. The MCU core and the signal lines connecting it to the flash memory 4 have been omitted to simplify the drawing. Also omitted are circuits implementing MCU debugging functions, and various other functions that may be integrated on the same chip.
  • The [0051] interface circuit 2 receives a Test Data In signal TDI, a Test Clock signal TCK, a Test Mode Select signal TMS and a Test Reset signal nTRST (n denotes negative logic) from corresponding external terminals (not visible) of the large-scale integrated circuit chip, and supplies a Test Data Out signal TDO to another external terminal (not visible) of the chip. The TDI, TDO, TMS, TCK, and nTRST terminals constitute the test access port or TAP of the chip, as specified in the IEEE 1149.1 standard. The interface circuit 2 and flash memory 4 communicate by signals denoted S1 to S5.
  • The [0052] interface circuit 2 comprises a memory-access register block 6, a TAP circuit 8, and a scan decoder 10. The memory-access register block 6 is coupled to the TDI terminal, and communicates with the flash memory 4 by means of signals denoted S1 to S5. The TAP circuit 8 is coupled to all five terminals of the test access port, and performs the usual functions specified in the IEEE 1149.1 standard, together with certain other functions related to flash memory access. For example, the TAP circuit 8 supplies an output signal S6 to the scan decoder 10, which in turn supplies a decoded signal S7 to the memory-access register block 6. The TAP circuit 8 also receives a multiplexed output signal S8 from the memory-access register block 6.
  • Signal S[0053] 7 selects the memory-access register block 6, enabling access to its registers, as will be described later. The scan decoder 10 also generates other signals (not visible) that select other registers and functions on the chip, such as a boundary scan register (not visible), and the above-mentioned MCU debugging functions.
  • Referring to FIG. 2, the [0054] flash memory 4 comprises a memory cell array 12, a row address decoder 14, a column address decoder 16, a sector buffer 18, a control circuit 20, a plurality of sense amplifiers 22, only one of which is shown in the drawing, and other components, not directly relevant to the present embodiment, which have been omitted for simplicity.
  • The [0055] memory cell array 12 comprises a plurality of non-volatile memory elements (not visible) that can be programmed and erased electrically. These memory elements are organized into sectors and words, each sector comprising a plurality of words, each word comprising a plurality of memory elements. The row address decoder 14 selects a sector 24 to be read, programmed, or erased. In read access, the sense amplifiers 22 amplify signals from the memory elements in the selected sector 24, and the column address decoder 16 selects one word of amplified data for output. In programming, the sector buffer 18 temporarily stores the data to be programmed, each word being stored in a location selected by the column address decoder 16. When all necessary data have been stored in the sector buffer 18, all memory elements in the selected sector 24 in the memory cell array 12 are programmed simultaneously. In an erasing operation, an entire sector 24 is erased at once. The control circuit 20 controls all of these operations.
  • A word may comprise any fixed number of bits. For example, a word may correspond to one byte (eight bits), a plurality of bytes, or a fraction of a byte. [0056]
  • Signal S[0057] 1 is an m-bit address signal A[m-1:0] received from the interface circuit 2. The n least significant bits A[n-1:0] are supplied to the column address decoder 16 as a word address code. The m-n most significant bits A[m-1:n] are supplied to the row address decoder 14 as a row or sector address code. All address bits are also supplied to the control circuit 20. The numbers m and n are positive integers (0<n<m).
  • Signal S[0058] 2 is a p-bit data output signal DO[p-1:0], where p (another positive integer) is the number of bits per word. This signal is output to the interface circuit 2 from the sense amplifiers 22 selected by the column address decoder 16.
  • Signal S[0059] 3 is a p-bit data input signal DI[p-1:0] received from the interface circuit 2 and supplied to the sector buffer 18.
  • Signal S[0060] 4 is a multiple-bit control signal, including a v-bit control code C[v-1:0] (v being a positive integer), a read enable signal nRE, and a write enable signal nWE. These signals are received by the control circuit 20 from the interface circuit 2. The control code C[v-1:0] gives commands for various non-volatile memory operations such as sector write, read, program, and erase.
  • Signal S[0061] 5 is a busy status signal supplied from the control circuit 20 to the interface circuit 2 to indicate that a non-volatile memory operation is in progress.
  • Referring to FIG. 3, the memory-[0062] access register block 6 comprises a scan branch register (SCBN) 26, a profile register (PRF) 28, a sector address register (SECADR) 30, a data register (DR) 32, a function command register (FCR) 34, a word counter (WCTR) 36, a control circuit (CTL) 38, a branch decoder (B-DEC) 40, and a pair of multiplexers (MPXs) 42, 44.
  • The [0063] scan branch register 26, the profile register 28, the sector address register 30, the data register 32, and the function command register 34 share a basic structure that is illustrated by a generic scan register 46 in FIG. 4. The generic scan register 46 is essentially a shift register with N bit stages, denoted B1-1 to B1-N, each storing one data bit. N may be any positive integer (1<N). Each bit stage B1−j (1<j<N) comprises a selector circuit 48-j and a pair of D-type flip-flops (D-FFs) 50-j, 52-j.
  • The operation of the [0064] generic scan register 46 is controlled by a capture select signal (CAPTURE_SEL), a shift clock signal (SHIFT_CK), an update clock signal (UPDATE_CK), and an update reset signal (UPDATE_RST). In each bit stage B1-j, CAPTURE_SEL is supplied to a selection (S) input terminal of the selector circuit 48-j, SHIFT_CK to a clock (CK) input terminal of the first D-FF 50-j, UPDATE_CK to a clock (CK) input terminal of the second D-FF 52-j, and UPDATE_RST to a reset (R) input terminal of the second D-FF 52-j (1<j<N).
  • Each selector has A and B input terminals. The A input terminal of the first selector circuit [0065] 48-1 receives a scan input signal SCAN_IN. The A input terminal of the other selector circuits 48-j (1<j) receive the Q output signal of D-FF 50-(j-1) in the preceding bit stage. The B input terminal of each selector circuit 48-j (1<j<N) receives a capture data bit (Capturej). Input A is selected when CAPTURE_SEL is at the ‘0’ logic level, input B is selected when CAPTURE_SEL is at the ‘1’ logic level, and the selected input is supplied from an output terminal O to the data input terminal D of the first D-FF 50-j in the same stage.
  • The first D-FF [0066] 50-j in each bit stage latches its D input in synchronization with SHIFT_CK, and supplies the latched data bit from its output terminal Q to the data input terminal D of the second D-FF 52-j. The output signals of D-FFs 50-1 to 50-(N-1) are also supplied to the selectors in the next stage, as described above, while the output of the last D-FF 50-N becomes a scan output signal (SCAN_OUT). The selectors 48-j and D-FFs 50-j (1<j<N) form a shift register.
  • The second D-FF [0067] 52-j in each bit stage latches its D input in synchronization with UPDATE_CK, and supplies the latched data bit from its output terminal Q as one bit of update data (Updatej). These D-FFs 52-j form a parallel update latch. Input of an UPDATE_RST signal resets the update data to the ‘0’ logic level.
  • A capture operation is carried out by setting CAPTURE_SEL to the ‘1’ logic level and supplying a SHIFT_CK pulse, causing the selectors [0068] 48-j to select the capture data and the D-FFs 50-j to latch the N capture data bits (Capturel to CaptureN) in parallel.
  • A shift operation is carried out by setting CAPTURE_SEL to the ‘0’ logic level and supplying a SHIFT_CK pulse, causing D-FF [0069] 50-1 to latch the scan input signal SCAN_IN, and causing D-FF 50-j to latch the data held previously in D-FF 50-(j-1). N pulses can be supplied to shift a new N-bit value into the generic scan register 46 from the SCAN_IN signal line, while shifting N bits of data out onto the SCAN_OUT signal line.
  • An update operation is carried out by supplying an UPDATE_CK pulse, causing D-FF [0070] 52-j to latch the output of D-FF 50-j in each bit stage.
  • The structure of the [0071] scan branch register 26, the profile register 28, the sector address register 30, the data register 32, and the function command register 34 in FIG. 3 is obtained from the generic scan register 46 by varying the bit length N. The bit lengths of the sector address register 30, the data register 32, and the word counter 36 are determined by the sector size and other parameters of the flash memory 4. The bit lengths of the scan branch register 26 and the profile register 28 are independent of the flash memory 4. Certain other modifications may be made to the basic structure of the generic scan register 46. For example, the sector address register 30 and data register 32 do not receive an update reset signal, and their second D-FFs 52-1 to 52-N have no reset (R) input terminal.
  • FIG. 5 shows further details of the memory-[0072] access register block 6, omitting the scan input and output signals, the scan branch register, the profile register, the branch decoder, and the multiplexers that were shown in FIG. 3.
  • The memory-[0073] access register block 6 has logic blocks 54, 56, 58, 60 that generate the necessary control signals (CAPTURE_SEL, SHIFT_CK, UPDATE_CK, UPDATE_RST) for the sector address register 30, the data register 32, and the function command register 34, and a reset signal for the word counter 36. The input signals to the logic blocks 54, 56, 58, 60 include the Test Clock signal TCK, and other signals that will be described later.
  • The [0074] sector address register 30 generates the sector address bits A[m−1:n] of the address signal S1 as update data, and receives these same bits A[m−1:n] as capture data.
  • The data register [0075] 32 receives the data output signal S2 from the flash memory 4 as capture data, and sends the data input signal S3 to the flash memory 4 as update data.
  • The [0076] function command register 34 captures the busy status signal S5 from the flash memory 4, and generates an instruction code as update data. The instruction code is supplied to the control circuit 38.
  • The word counter [0077] 36 is an n-bit counter that counts up in response to the update clock signal of the data register 32, and generates the least significant n bits A[n−1:0] of the address signal S1 as parallel count data.
  • The [0078] control circuit 38 receives the update clock signal of the data register 32, the update data of the function command register 34, and a write enable flag signal (wren) from the profile register 28. From these input signals, the control circuit 38 generates the control signal S4 supplied to the flash memory 4. For example, if the write enable flag (wren) is set, then whenever the data register 32 is updated, the control circuit 38 generates a write enable (nWE) pulse that writes the update data from the data register 32 into the sector buffer 18 in the flash memory 4.
  • Referring again to FIG. 3, the capture data supplied to the [0079] profile register 28 include coded parameter data related to the flash memory 4. The profile register 28 permits the parameter data to be captured in parallel form, then read out through the multiplexers 42, 44 and test access port in serial form. The parameter data provide information from which the bit lengths of the sector address register 30, data register 32, and word counter 36 can be determined, so that a host device connected to the test access port can establish a correct communication protocol with the interface circuit 2. The parameter data are generated within the integrated circuit and are hard-wired.
  • By decoding the update data of the [0080] scan branch register 26, the branch decoder 40 generates selection signals PRF_SEL, SECADR_SEL, DR_SEL, FCR_SEL that select the profile register 28, the sector address register 30, the data register 32, and the function command register 34, respectively. SECADR_SEL, DR_SEL, and FCR_SEL are supplied to the corresponding logic blocks 54, 56, 58 in FIG. 5. Arbitrary capture data may be supplied to the scan branch register 26.
  • [0081] Multiplexer 42 selects the serial output of the profile register 28, the sector address register 30, the data register 32, or the function command register 34. Multiplexer 44 selects the output of the multiplexer 42 or the serial output of the scan branch register 26, thereby generating the multiplexed output signal S8.
  • Referring to FIG. 6, the [0082] TAP circuit 8 basically has the structure described in the IEEE 1149.1 standard, comprising an instruction register (IR) 62, a bypass register (BP) 64, a scan number register (SCN) 66, an instruction decoder (I-DEC) 68, a multiplexer 70, a latch 72, and a TAP controller 74. The instruction register 62, the bypass register 64, and the scan number register 66 have the generic structure described in FIG. 4. The bit lengths of these registers are unrelated to the sector size and other parameters of the flash memory 4.
  • The serial data scanned into the [0083] instruction register 62 constitute an instruction code, which is decoded by the instruction decoder 68. As capture data, the instruction register 62 receives fixed data specified in the IEEE 1149.1 standard. By decoding the instruction code, the instruction decoder 68 generates various selection signals that will be described later.
  • When the [0084] bypass register 64 is selected, it passes the scan input signal to the multiplexer 70 with a one-bit delay, enabling a host device connected to the test access port to confirm electrical continuity between the test access port and TAP circuit 8. As capture data, the bypass register 64 receives fixed data specified in the IEEE 1149.1 standard.
  • When the [0085] scan number register 66 is selected, it receives the scan input signal from the TDI terminal. The scan output signal of the scan number register 66 is supplied to the multiplexer 70. The contents of the scan number register 66 are also output in parallel to the scan decoder 10 as the output signal code S6. Arbitrary capture data may be supplied to the scan number register 66.
  • The [0086] multiplexer 70 receives the scan output signals from the instruction register 62, the bypass register 64, and the scan number register 66, and the multiplexer output signal S8 from the memory-access register block 6; selects one of these signals; and stores the selected signal in the latch 72 in synchronization with the fall of the test clock signal (TCK). From the latch 72, the signal is supplied to the TDO terminal.
  • The [0087] TAP controller 74 is a state machine that receives the TCK, TMS, and nTRST signals, and controls the operations performed by registers 26, 28, 30, 32, 34, 62, 64, 66 in the register block 6 and TAP circuit 8. The TAP controller 74 generates three signals (CAPTURE_DR, SHIFT_DR, and UPDATE_DR) that are supplied to logic blocks 54, 56, 58 in the memory-access register block 6, and a TEST_LOGIC RESET signal that is supplied to logic block 60.
  • The sixteen states of the [0088] TAP controller 74, and the main transitions among them, are illustrated in FIG. 7. The illustrated state transitions occur at the rise of the test clock signal (TCK), according to the logic level of the test mode select signal (TMS). Each state transition is indicated by an arrow in FIG. 7, with the corresponding TMS logic level shown next to the arrow.
  • When the nTRST terminal is driven to the ‘0’ logic level, the [0089] TAP controller 74 immediately returns to the Test-Logic Reset state, regardless of its current state, and regardless of the logic levels at the TMS and TCK terminals. A transition to the Test-Logic Reset state resets the scan branch register 26, the profile register 28, the function command register 34, the word counter 36, the instruction register 62, and the scan number register 66.
  • The rightmost column of seven states in FIG. 7, with state names ending in -IR, perform capture, shift, and update operations on the [0090] instruction register 62. These operations will also be referred to as instruction scan operations. The adjacent column of seven states, with state names ending in -DR, perform capture, shift, and update operations on a selected one of registers 26, 28, 30, 32, 34, 64, 66. These registers will be referred to collectively as data scan registers, and the operations performed on them will be referred to as data scan operations.
  • When the [0091] TAP controller 74 is in the Capture-IR state, the instruction register 62 captures fixed data. When the TAP controller 74 is in the Shift-IR state, the contents of the instruction register 62 are shifted one bit, in the direction toward the TDO terminal, at each TCK cycle. This state can be held for a number of TCK cycles equal to the bit length of the instruction register 62 to load a complete new instruction code into the instruction register 62. When the TAP controller 74 is in the Update-IR state, the instruction register 62 updates its parallel output data (update data).
  • Similar capture, shift, and update operations are carried out on the data scan registers [0092] 26, 28, 30, 32, 34, 64, 66 when the TAP controller 74 is in the Capture-DR, Shift-DR, and Update-DR states.
  • The other states shown in FIG. 7 are temporary states that do not directly affect the operation of the scan registers [0093] 26, 28, 30, 32, 34, 62, 64, 66.
  • Instruction scan and data scan operations are carried out by logic that will be described next. [0094]
  • Referring to FIG. 8, when the [0095] TAP controller 74 is in the Capture-IR, Shift-IR, Update-IR, and Test-Logic Reset states, it sends corresponding signals (CAPTURE_IR, SHIFT_TR, UPDATE_IR, TEST_LOGIC RESET) to a logic block 76 that generates the control signals for the instruction register 62. These control signals (CAPTURE_SEL, SHIFT_CK, UPDATE_CK, UPDATE_RST) and the scan input and output signals (SCAN_IN and SCAN_OUT) operate as in the generic scan register in FIG. 4. The fixed capture data correspond to Capturel to CaptureN in FIG. 4. The abbreviations CAP, SFT, UPD, and RST mean capture, shift, update, and reset, respectively. The instruction register 62 performs a capture operation when CAPTURE_IR and TCK are both in the logical ‘1’ state, a shift operation when SHIFT_IR and TCK are both in the logical ‘1’ state, an update operation when UPDATE_IR and TCK are both in the logical ‘1’ state, and an update reset operation whenever TEST_LOGIC RESET is in the logical ‘1’ state. The SHIFT_CK signal is needed in both capture and shift operations, so it is generated from TCK when either CAPTURE_IR or SHIFT_IR is in the logical ‘1’ state.
  • By decoding the update data output from the [0096] instruction register 62, the instruction decoder 68 generates a BP_SEL signal that selects the bypass register 64, an SCN_SEL signal that selects the scan number register 66, an SCBN_SEL signal that selects the scan branch register 26, and an INTEST signal that collectively selects the profile register 28, the sector address register 30, the data register 32, and the function command register 34. The name INTEST, incidentally, indicates that these registers 28, 30, 32, 34 are internal registers, rather than boundary scan registers.
  • When the [0097] TAP controller 74 is in the Capture-DR, Shift-DR, Update-DR, and Test-Logic Reset states, it sends corresponding signals (CAPTURE_DR, SHIFT_DR, UPDATE_DR, TEST_LOGIC RESET) to the logic blocks that generate control signals for the data scan registers. These logic blocks have the generic structure shown in FIG. 9, which is essentially the structure shown in FIG. 8 with input of an additional selection signal, denoted X_SEL. The signal denoted X_SEL is derived in various ways, described below, from the selection signals output by the instruction decoder 68 and the branch decoder 40, and the decoded signal S7 output by the scan decoder 10. A capture operation is performed when X_SEL and CAPTURE_DR are both in the logical ‘1’ state. X_SEL must also be in the logical ‘1’ state when shift and update operations take place.
  • FIG. 10 illustrates the [0098] logic block 78 that controls the scan branch register 26. The signal that was denoted X_SEL in FIG. 9 is obtained as the logical AND of the SCBN_SEL signal output from the instruction decoder 68 and the decoded signal S7 output from the scan decoder 10. By decoding the update data from the scan branch register 26, the branch decoder 40 generates the selection signals (PRF_SEL, SECADR_SEL, DR_SEL, FCR_SEL) mentioned above.
  • The logic block that controls the [0099] profile register 28 and the logic blocks 54, 56, 58 shown in FIG. 5 have the basic structure shown in FIG. 9, with minor modifications such as the removal of unnecessary reset signal inputs. As an example, FIG. 11 illustrates the logic block 56 that controls the data register 32. The signal denoted X_SEL in FIG. 9 is now obtained as the logical AND of the INTEST signal from the instruction decoder 68, the decoded signal S7 from the scan decoder 10, and the DR_SEL signal from the branch decoder 40. Similarly, the X_SEL signals for the profile register 28, the sector address register 30, and the function command register 34 are obtained as the logical AND of INTEST, S7, and the appropriate selection signal (PRF_SEL, SECADR_SEL, or FCR_SEL) from the branch decoder 40.
  • Drawings of the logic blocks associated with the [0100] bypass register 64 and the scan number register 66 will be omitted. For these two registers, X_SEL is obtained from the corresponding selection signal (BP_SEL or SCN_SEL) output from the instruction decoder 68.
  • FIG. 12 illustrates the structure of the [0101] multiplexers 42, 44 in the memory-access register block 6. The SHIFT_DR and EXITl_DR signals are state signals output by the TAP controller 74 in the corresponding states, shown in FIG. 7. Thus, multiplexer 42 selects the scan outputs of the profile register 28, the sector address register 30, the data register 32, and the function command register 34 when the TAP controller 74 is in the Shift-DR or Exit1-DR state and the corresponding selection signal (PRF_SEL, SECADR_SEL, DR_SEL, or FCR_SEL) is in the logical ‘1’ state. Multiplexer 44 selects the scan output of the scan branch register 26 when the TAP controller 74 is in the Shift-DR or Exitl-DR state and SCBN_SEL is in the logical ‘1’ state. Multiplexer 44 selects the output of multiplexer 42 when INTEST is in the logical ‘1’ state and SCBN_SEL is in the logical ‘0’ state. The signal selected by multiplexer 44 becomes the multiplexed output signal S8 of the memory-access register block 6.
  • FIG. 13 illustrates the structure of the [0102] multiplexer 70 in the TAP circuit 8. The SHIFT_IR and EXITl_IR signals are state signals output by the TAP controller 74 in the corresponding states, shown in FIG. 7. Thus, multiplexer 70 selects the scan output of the instruction register 62 when the TAP controller 74 is in the Shift-IR or Exitl-IR state. Multiplexer 70 selects the scan output of the bypass register 64 or scan number register 66 when the TAP controller 74 is in the Shift-DR or Exitl-DR state and the corresponding selection signal (BP_SEL or SCN_SEL) is in the logical ‘1’ state. Multiplexer 70 selects the multiplexed output signal S8 from the memory-access register block 6 when the TAP controller 74 is not in the Shift-IR or Exit1-IR state and BP_SEL and SCN_SEL are both in the logical ‘0’ state. The signal selected by the multiplexer 70 is supplied to the latch 72.
  • Taken together, the three [0103] multiplexers 42, 44, 70 supply the latch 72 with the scan output signal from the instruction register 62 during instruction scan operations, and with the scan output signal from a selected data scan register 26, 28, 30, 32, 34, 64, or 66 during data scan operations. The signal supplied to the latch 72 is stored and output at the TDO terminal in synchronization with the test clock signal TCK.
  • A description will now be given of the operation of the [0104] interface circuit 2.
  • An external host device uses the TDI, TCK, TMS, and nTRST terminals of the test access port to access the scan registers [0105] 26, 28, 30, 32, 34, 62, 64, 66 and control the operation of the interface circuit 2. The host device can also obtain parameter values of the flash memory 4 and determine the internal state of the interface circuit 2 from the information scanned out at the TDO terminal.
  • When accessing a data scan register, the host device uses the instruction codes listed in FIG. 14 to select the register. The [0106] bypass register 64, the scan number register 66, and the scan branch register 26 are selected by individual instruction codes respectively denoted BYPASS, SCAN_N, and SCAN_BN. A further instruction code denoted INTEST selects the profile register 28, the sector address register 30, the data register 32, and the function command register 34 as a group. These four registers are then selected individually by a code set in the scan branch register 26, referred to below as the SCBN code. The above instruction codes and SCBN code are scanned into the interface circuit 2 through the TDI terminal.
  • An instruction code is shifted into the [0107] instruction register 62 by manipulating the logic level at the TMS terminal to bring the TAP controller 74 into the Shift-IR state, as indicated in FIG. 7, and remaining in that state for the necessary number of TCK cycles while the instruction code is supplied bit by bit to the TDI terminal. The TMS input is then changed to move the TAP controller 74 into the Update-IR state, thereby performing an update operation on the instruction register 62 and making the instruction code available to the instruction decoder 68. The instruction decoder 68 decodes the instruction code and generates a scan data register selection signal. This entire operation will be described below by saying that the instruction code is scanned into the instruction register 62 and decoded.
  • If the instruction code is the SCAN_BN code, the [0108] scan branch register 26 is selected. The TMS logic level can now be manipulated as indicated in FIG. 7 to bring the TAP controller 74 into the Shift-DR state and shift an SCBN code into the scan branch register 26. Next, the TMS logic level is changed to bring the TAP controller 74 into the Update-DR state, thereby supplying the SCBN code to the branch decoder 40. The branch decoder 40 decodes the SCBN code and generates a further scan data register selection signal. This entire operation will be described below by saying that the SCBN code is scanned into the scan branch register 26 and decoded.
  • After the SCBN code has been scanned into the [0109] scan branch register 26 and decoded, the INTEST instruction code can be scanned into the instruction register 62 and decoded to have the instruction decoder 68 generate the INTEST signal needed for access to the data scan register selected by the branch decoder 40.
  • The above operations, involving the BYPASS, the SCAN_N, the SCAN_BN, and the INTEST instruction codes and the SCBN code, enable any one of the data scan registers [0110] 26, 28, 30, 32, 34, 64, 66 to be selected. Arbitrary information can then be scanned into the selected data scan register from the host device through the TDI terminal, or scanned out from the selected data scan register to the host device through the TDO terminal. Information scanned into the scan number register 66 can be output to the scan decoder 10, by updating the scan number register 66, whereupon the information is decoded by the scan decoder 10 to generate the decoded signal S7.
  • To program the [0111] flash memory 4, a flash programmer is connected as the host device to the test access port. To begin programming, the flash programmer drives the nTRST terminal to the ‘0’ logic level, placing the TAP controller 74 in the Test-Logic Reset state, and initializing the word counter 36 and the scan number register 66.
  • Next, after the nTRST terminal has been returned to the ‘1’ logic level, the SCAN_N instruction code is scanned into the [0112] instruction register 62 and decoded, selecting the scan number register 66. A predetermined code is then scanned into the scan number register 66 and decoded by the scan decoder 10. This predetermined code causes the scan decoder 10 to set signal S7 to the ‘1’ logic level, selecting the memory-access register block 6, thereby enabling the scan registers in the memory-access register block 6 to be selected.
  • The [0113] profile register 28 is now selected as described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0000’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded.
  • When the [0114] profile register 28 has been selected in this way, data scan operations are carried out to load capture data into the profile register 28, scan this capture data out at the TDO terminal, and update the profile register 28. The update operation sets the write enable flag (wren), which is necessary in order for the control circuit 38 to transfer data from the data register 32 to the sector buffer 18.
  • By decoding the capture data scanned out from the [0115] profile register 28, the flash programmer obtains parameters describing the memory capacity, word width, and sector size of the flash memory 4. From these parameters, the flash programmer determines the bit length of the sector address register 30, the data register 32, and the word counter 36. In subsequent access to the interface circuit 2, the flash programmer uses a communication protocol adjusted to these parameters and bit lengths.
  • Next, the [0116] sector address register 30 is selected by the procedure described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0010’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded. The sector address code A[m−1:n] of the sector 24 to be programmed is now scanned into the sector address register 30 and the sector address register 30 is updated, setting the sector address code A[m−1:n] in the upper bits of the address signal SI. Since the word counter 36 was reset by the initial nTRST signal, the word address code A[n−1:0] in the address signal S1 also has a known value at this point.
  • To transfer the data to be programmed to the [0117] sector buffer 18, the data register 32 is selected by the procedure described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0100’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded. Data words are then scanned into the data register 32 one by one, each word having the bit length of the data register 32. After each word is scanned in, the data register 32 is updated, thereby sending the word to the sector buffer 18, which stores the word at the address indicated by the address signal S1. Since the update operation increases the word count in the word counter 36, thereby increasing the word address code A[n−1:0] in the address signal S1, each word is stored at a different address in the sector buffer 18. The update operation on the data register 32 also triggers the output of a write pulse by the control circuits 20, 38 in the flash memory 4 and memory-access register block 6. Specifically, the control circuit 38 sets the nWE bit in the control signal S4 for a certain interval, and the control circuit 20 sends corresponding write data to the sector buffer 18.
  • When a number of words equivalent to the sector size has been transferred into the [0118] sector buffer 18, the function command register 34 is selected by the procedure described above: the SCAN_BN instruction code is scanned into the instruction register 62 and decoded; the ‘0001’ SCBN code is scanned into the scan branch register 26 and decoded; and the INTEST instruction code is scanned into the instruction register 62 and decoded. A programming command code is scanned into the function command register 34, and the function command register 34 is updated. The control circuit 38 in the memory-access register block 6 passes the programming command code to the control circuit 20 in the flash memory 4, using the C[v−1:0] bits in control signal S4. Control circuit 20 then initiates operations that automatically erase the selected sector 24 in the memory cell array 12, and write all of the data stored in the sector buffer 18 simultaneously into the erased sector 24. The busy status signal S5 is set to the ‘1’ logic level while these operations are in progress, and reset to the ‘0’ logic level when programming is completed.
  • After giving the programming command, the flash programmer repeatedly scans a No Operation command code into the [0119] function command register 34, also carrying out capture and update operations on the function command register 34. The function command register 34 repeatedly captures the busy status signal S5 from the flash memory 4, scans this signal out at the TDO terminal, and sends No Operation commands to control circuit 38. The control circuit 20 in the flash memory 4 continues erasing and programming the selected sector of memory cells. By checking the busy status signal, the flash programmer recognizes the completion of programming of the selected sector 24, and can then proceed with operations for programming the next sector.
  • Next, the procedure for reading the contents of the [0120] flash memory 4 through the test access port will be described. This procedure can be used by the flash programmer or another host device to confirm that correct data are stored in the flash memory 4.
  • To begin this procedure, the host device drives the nTRST terminal to the ‘0’ logic level, resetting the [0121] word counter 36, the profile register 28, and the scan number register 66. The write enable flag (wren) output from the profile register 28 is thereby reset, disabling the write enable bit nWE in the control signal S4 sent to the flash memory 4.
  • Next, after the nTRST terminal has been returned to the ‘1’ logic level, the SCAN_N code is scanned into the [0122] instruction register 62 and decoded to select the scan number register 66. The predetermined code mentioned above is scanned into the scan number register 66 and decoded by the scan decoder 10, setting the decoded signal S7 to the ‘1’ logic level and selecting the memory-access register block 6.
  • Next, the SCAN_BN instruction code is scanned into the [0123] instruction register 62 and decoded, the ‘0010’ SCBN code is scanned into the scan branch register 26 and decoded, and the INTEST instruction code is scanned into the instruction register 62 and decoded, selecting the sector address register 30. The sector address code A[m−1:n] of the sector 24 to be read is scanned into the sector address register 30 and set in the upper bits of the address signal S1. The word address code A[n−1:0] in the address signal S1 has the known value set when the word counter 36 was reset by the nTRST signal.
  • Next, the SCAN_BN instruction code is scanned into the [0124] instruction register 62 and decoded, the ‘0100’ SCBN code is scanned into the scan branch register 26 and decoded, and the INTEST instruction code is scanned into the instruction register 62 and decoded, selecting the data register 32. Capture, shift, and update operations are performed on the data register 32, whereby the data register 32 captures the word of data output by the flash memory 4 from the address designated by the address signal S1, and scans this word out at the TDO terminal. Each update of the data register 32 increases the word count in the word counter 36, thereby increasing the word address code A[n−1:0] in the address signal S1. The capture, shift, and update operations can be repeated to read a desired number of words from consecutive addresses in the selected sector 24 in the memory cell array 12.
  • As long as the write enable flag (wren) remains in its reset state, the control signal S[0125] 4 output from control circuit 38 holds the flash memory 4 in the read state. The actual reading of the output data signal S2 from the sense amplifiers 22 takes place during the TCK pulse that occurs when the TAP controller 74 is in the Capture-DR state. As can be seen from FIG. 7, there is an interval of at least two TCK pulses from the update operation to the next capture operation. If this interval is equal to or greater than the read access time of the flash memory 4, correctly read data will be captured and scanned out at the TDO terminal. As the TCK frequency is normally one megahertz or less, and the read access time of the flash memory 4 is much less than one microsecond, an ample timing margin is left.
  • A basic advantage of the first embodiment is that scan data registers [0126] 28, 30, 32, 34 in the memory-access register block 6 are not connected in a single chain, but are disposed on parallel paths between the TDI and TDO terminals. Once selected, each of these scan data registers can accordingly be accessed directly, without the need to shift data in or out through other registers in the memory-access register block 6.
  • Another advantage is that once a sector address has been set in the [0127] sector address register 30, addresses within the sector are generated automatically by the word counter 36, so it is not necessary to scan in a separate address for every word of data written or read.
  • Yet another advantage is that the necessary control signals for reading or writing each word of data are generated automatically by the [0128] control circuit 38 in the memory-access register block 6, so it is not necessary to scan in a new control code for access to each word.
  • As a result, once a sector address has been scanned into the [0129] sector address register 30 and the data register 32 has been selected, data can be read from the flash memory 4, or transferred into the sector buffer 18, at a comparatively high speed. The number of shift operations needed to transfer each word of data is only equal to the bit length of the data register 32, instead of being equal to the combined bit length of the data register and other registers.
  • A further advantage of the first embodiment is that information describing the memory capacity, sector size, and word width of the [0130] flash memory 4 is hard-wired into the interface circuit 2 as capture data for the profile register 28, and can be scanned out and read by the flash programmer. The flash programmer can thereby determine the bit lengths of the sector address register 30 and the data register 32, and set itself up automatically for the correct communication protocol. Besides preventing programming mistakes, this enables the flash memory to be designed without the worry that a particular design might not be compatible with the flash programmer's capabilities.
  • It is even possible to design a chip with two or more flash memory modules, each having its own memory-[0131] access register block 6. The scan decoder 10 can be adapted to generate a separate selection signal for each memory-access register block by decoding a corresponding code placed in the scan number register 66.
  • It is also an advantage that all of the scan data registers in the memory-[0132] access register block 6 can be selected by the use of just two instruction codes (SCAN_BN and INTEST in FIG. 14). Although the bit length of the instruction register 62 is not specified in the IEEE 1149.1 standard, whatever length the instruction register 62 has limits the number of available instruction codes. If only two of these instruction codes are used for flash-memory programming, the number of instruction codes available for other purposes, such as debugging functions, is increased accordingly.
  • The capability to program the flash memory through the standard IEEE 1149.1 test access port and then test or debug the programmed device through the same IEEE 1149.1 test access port is also advantageous. [0133]
  • A final advantage is that MCU resources do not have to be used for flash-memory programming. [0134]
  • Next, a second embodiment will be described. The second embodiment differs from the first embodiment in that the memory-[0135] access register block 6 is always selected.
  • Referring to FIG. 15, the [0136] interface circuit 80 in the second embodiment includes a memory-access register block 6 and a TAP circuit 82, but no scan decoder. The memory-access register block 6 has the structure described in the first embodiment, except that no decoded signal S7 is required to select its scan data registers. The signals S1, S2, S3, S4, S5 exchanged between the memory-access register block 6 and the flash memory 4 are the same as in the first embodiment, as is the multiplexed signal S8 output from the memory-access register block 6 to the TAP circuit 82.
  • Referring to FIG. 16, the [0137] TAP circuit 82 comprises an instruction register 62, a bypass register 64, an instruction decoder 68, a multiplexer 70, a latch 72, and a TAP controller 74, substantially as described in the first embodiment. The instruction decoder 68 does not generate an SCN_SEL signal, there being no scan number register for this signal to select. The multiplexer 70 selects the signal S8 output from the memory-access register block 6 when the instruction register 62 and the bypass register 64 are not selected, and the TAP controller 74 is not in the Shift-IR or Exitl-IR state.
  • Referring to FIG. 17, the instruction codes used in the second embodiment include the BYPASS, SCAN_BN, and INTEST instruction codes described in the first embodiment, and the SCAN_BN instruction code selecting the [0138] scan branch register 26. When the INTEST instruction code is scanned in and decoded, one scan data register among the profile register 28, sector address register 30, data register 32, and function command register 34 is selected according to the contents of the scan branch register 26, as explained in the first embodiment. There is no SCAN_N instruction code.
  • Flash-memory access operations are performed by the procedures described in the first embodiment, except that the scan data registers [0139] 26, 28, 30, 32, 34 in the memory-access register block 6 can be accessed immediately after the TAP controller 74 and the word counter 36 have been reset by the nTRST signal. It is not necessary to scan in and decode a SCAN_N instruction code and then scan in and decode another code that selects the memory-access register block 6.
  • The second embodiment accordingly provides even faster access to the [0140] flash memory 4 than the first embodiment. The second embodiment also enables a flash programmer to scan out flash-memory parameters and automatically select the correct communication protocol, as in the first embodiment.
  • The [0141] TAP circuit 82 in the second embodiment is used only for controlling the memory-access register block 6, and not for other functions such as debugging. The interface circuit 80 operates as an independent functional block, completely independent of the MCU core and other functional bocks that may be integrated onto the same chip. The second embodiment can be usefully employed in chips having an MCU core that does not support JTAG functions, for example.
  • Next, a third embodiment will be described. The third embodiment uses a separate instruction code to select each scan data register. [0142]
  • Referring to FIG. 18, the memory-[0143] access register block 84 in the third embodiment comprises a profile register 28, a sector address register 30, a data register 32, a function command register 34, a word counter 36, a control circuit 38, and a multiplexer 42, substantially as described in the first embodiment. There is no scan branch register or branch decoder, and there is only one multiplexer 42. The multiplexed signal S8 is output directly from the multiplexer 42.
  • The third embodiment uses substantially the same TAP circuit as in the first embodiment, except that the instruction decoder generates a separate selection signal for each scan data register, by decoding a separate instruction code. Referring to FIG. 19, the instruction codes used in the third embodiment include the BYPASS instruction code that selects the [0144] bypass register 64, the SCAN_N instruction code that selects the scan number register 66, a PROFILE instruction code that selects the profile register 28, an SECADR instruction code that selects the sector address register 30, a DRRDWR (data register read-write) instruction code that selects the data register 32, and a FCMD instruction code that selects the function command register 34. There is no SCAN_BN instruction code or INTEST instruction code.
  • To program the [0145] flash memory 4, a flash programmer connected to the test access port first drives the nTRST terminal to the ‘0’ logic level, placing the TAP controller 74 in the Test-Logic Reset state and initializing the word counter 36 and the scan number register 66. Next, after the nTRST terminal has been returned to the ‘1’ logic level, the SCAN_N instruction code is scanned into the instruction register 62 and decoded, selecting the scan number register 66, and a predetermined code is scanned into the scan number register 66 and decoded, selecting the memory-access register block 84.
  • The PROFILE instruction code is now scanned into the [0146] instruction register 62 and decoded, selecting the profile register 28. Capture, shift, and update operations are performed, setting the write enable flag (wren), and providing flash-memory parameter information to the flash programmer. The flash programmer thereby determines the bit lengths of the sector address register 30, data register 32, and word counter 36.
  • Next, the SECADR instruction code is scanned into the [0147] instruction register 62 and decoded, selecting the sector address register 30. The desired sector address code A[m−1:n] is scanned into the sector address register 30 and the sector address register 30 is updated, setting the sector address code in the upper bits of the address signal S1.
  • Next, the DRRDWR instruction code is scanned into the [0148] instruction register 62 and decoded, selecting the data register 32. Data words are then scanned into the data register 32 and transferred to the sector buffer 18 as explained in the first embodiment.
  • After all necessary data words have been transferred, the FCMD instruction code is scanned into the [0149] instruction register 62 and decoded, selecting the function command register 34. The remaining operations are performed as described in the first embodiment. The flash programmer scans a programming instruction code into the function command register 34 to initiate the erasing and programming of the selected sector in the memory cell array 12, then repeatedly scans in No Operation instruction codes and checks the value of the busy status signal, which is scanned out at the TDO terminal, to determine when programming has been completed.
  • To read data from the [0150] flash memory 4, the flash programmer first drives the nTRST terminal to the ‘0’ logic level, resetting the word counter 36, the profile register 28, the scan number register 66, and the write enable flag (wren). Next, after the nTRST terminal has been returned to the ‘1’ logic level, the SCAN_N instruction code is scanned into the instruction register 62 and decoded, selecting the scan number register 66, and the above-mentioned predetermined code is scanned into the scan number register 66 and decoded, selecting the memory-access register block 84.
  • Next, the SECADR instruction code is scanned into the [0151] instruction register 62 and decoded, selecting the sector address register 30. The sector address code A[m−1:n] of the sector to be read is scanned into the sector address register 30 and set in the upper bits of the address signal S1.
  • The DRRDWR instruction code is now scanned into the [0152] instruction register 62 and decoded, selecting the data register 32. Data words are then captured in the data register 32 and scanned out as described in the first embodiment.
  • Compared with the first embodiment, the third embodiment speeds up access to the [0153] flash memory 4 by simplifying the procedure for selecting the scan data registers in the memory-access register block 84. The internal structure of the memory-access register block 84 is also simplified, as there is no scan branch register and only one multiplexer. Other effects are the same as in the first embodiment. The third embodiment is advantageous when the instruction register 62 has enough bits to permit a separate instruction code to be used for selecting each data scan register.
  • In a variation of the third embodiment, the [0154] scan decoder 10 is eliminated from the interface circuit, the scan number register 66 is eliminated from the TAP circuit 8, and the memory-access register block 84 is always selected, as described in the second embodiment.
  • As a fourth embodiment, a type of scan register with an increased number of capture bits will now be described. This register can be employed as the profile register in any of the preceding embodiments. [0155]
  • Referring to FIG. 20, the fourth embodiment is an M-[0156] bit scan register 86, where M is an integer equal to or greater than two (2<M).
  • The first bit stage B[0157] 2-1 comprises a selector 88-1 and a pair of D-FFs 90-1, 92-1 that are controlled by the CAPTURE_SEL, SHIFT_CK, UPDATE_CK, and UPDATE_RST signals described in the first embodiment.
  • Selector [0158] 88-1 has three input terminals (A, B, S) and an output terminal (O). Input terminal A receives a scan input signal (SCAN_IN) from the TDI terminal. Input terminal B receives the Q output signal, denoted u-back, of D-FF 92-1. Input terminal S receives the CAPTURE_SEL signal. The scan input signal (SCAN_IN) is selected when CAPTURE_SEL is at the ‘0’ logic level; the u_back input signal is selected when CAPTURE_SEL is at the ‘1’ logic level. The selected input signal is supplied from the output terminal (O) to the data input terminal (D) of D-FF 90-1.
  • D-FF [0159] 90-1 latches the output signal from selector 88-1 in synchronization with the SHIFT_CK signal, which is received at a CK input terminal. The latched signal is supplied from the Q output terminal of D-FF 90-1 to the D input terminal of D-FF 92-1, and to the A input terminal of a selector 88-2 in the second bit stage B2-2 (not visible).
  • D-FF [0160] 92-1 latches the output signal from D-FF 90-1 in synchronization with the UPDATE_CK signal, which is received at a CK input terminal. The latched signal is supplied as the u_back signal to the B input terminal of selector 90-1, and to the S input terminals of selectors 94-k in other bit stages B2-k (2<k<M). If necessary, the u_back signal can also be supplied as an update data signal to another circuit (not visible). The u_back output signal is reset by input of the UPDATE_RST signal at the R input terminal of D-FF 92-1.
  • Each of the other bit stages B[0161] 2-k (2<k<M) comprises a pair of selectors 94-k, 88-k and a D-FF 90-k. These stages are controlled by the CAPTURE_SEL, SHIFT_CK, and u_back signals.
  • Selector [0162] 94-k has three input terminals (A, B, S) and an output terminal (O). The A and B input terminals receive two different capture signals, denoted Frontk and Backk. The S input terminal receives the u-back signal, as noted above. The A input signal (Frontk) is selected when u_back is at the ‘0’ logic level; the B input signal (Backk) is selected when u_back is at the ‘1’ logic level. The selected input signal (Frontk or Backk) is supplied from the output terminal (O) to the B input terminal of selector 88-k.
  • Selector [0163] 88-k likewise has three input terminals (A, B, S) and an output terminal (O). The A input terminal receives the Q output signal from D-FF 90-(k−1) in the preceding bit stage B2-(k-1). The S input terminal receives the CAPTURE_SEL signal. The A input signal is selected when CAPTURE_SEL is at the ‘0’ logic level; the B input signal is selected when CAPTURE_SEL is at the ‘1’ logic level. The selected input signal is supplied from the output terminal (O) to the D input terminal of D-FF 90-k.
  • D-FF [0164] 90-k latches the output signal from selector 88-k in synchronization with the SHIFT_CK signal, which is received at a CK input terminal. The latched signal is supplied from the Q output terminal of D-FF 90-k to the B input terminal of selector 88-(k+1) in the next bit stage (not visible), except that the Q output signal from D-FF 90-M in the last bit stage B2-M becomes the scan output signal (SCAN_OUT).
  • Capture operations are performed during cycles of the SHIFT_CK signal in which the CAPTURE_SEL signal is at the ‘1’ logic level. If the u_back signal is at the ‘0’ logic level, the Frontk data are captured: D-FF [0165] 90-1 latches the u_back signal (‘0’) , and D-FFs 90-k (2<k<M) latch the Frontk signals. If the u_back signal is at the ‘1’ logic level, the Backk data are captured: D-FF 90-1 latches the u_back signal (‘1’), and D-FFs 90-k (2<k<M) latch the Backk signals.
  • Shift operations are performed during cycles of the SHIFT_CK signal in which the CAPTURE_SEL signal is at the ‘0’ logic level. In each SHIFT_CK cycle, the value held in each D-FF [0166] 90-k (1<k<M−1) is shifted into the next D-FF 90-(k+1). D-FF 90-1 receives and stores the SCAN_IN signal.
  • An update operation is performed when an UPDATE_CK pulse is supplied, causing D-FF [0167] 92-1 to latch the current contents of D-FF 90-1, and begin output of the latched logic level as the u_back signal.
  • An update reset operation is performed when the UPDATE_RST signal is driven to the ‘1’ logic level, resetting the u_back signal to the ‘0’ logic level. Only the first bit stage B[0168] 2-1 responds to the UPDATE_CK and UPDATE_RST signals. The other bit stages B2-k (2<k<M) do not generate update data.
  • The operation of the [0169] scan register 86 in capturing and shifting out first the front capture data, then the back capture data, will be described below.
  • To capture and shift out the front capture data, first the u_back signal is set to the ‘0’ logic level by input of an UPDATE_RST signal. Next, the SHIFT_CK signal is cycled M times. During the first SHIFT_CK cycle, the CAPTURE_SEL signal is placed at the ‘1’ logic level, causing D-FF [0170] 90-1 to latch the ‘0’ logic level of the u_back signal, and the other D-FFs 90-k (2<k<M) to latch the Frontk signals. During this first cycle of the SHIFT_CK signal, D-FF 90-M begins output of the FrontM signal as the SCAN_OUT signal. During the next M-1 SHIFT_CK clock cycles, the CAPTURE_SEL signal is held at the ‘0’ logic level, causing the Frontk signals to be shifted as data through D-FFs 90-2 to 90-M and scanned out on the SCAN_OUT signal line. The M successive values of the SCAN_OUT signal are FrontM, Front(M-1), Front2, ‘0’, the final ‘0’ being the u_back logic level.
  • During the M-th SHIFT_CK cycle, the SCAN_IN signal is placed at the ‘1’ logic level, which is latched by D-FF [0171] 90-1. Next, an update operation is performed, setting u_back to the ‘1’ logic level.
  • The back capture data are now captured and shifted out in the manner described above, by cycling the SHIFT_CK signal M times, with CAPTURE_SEL at the ‘1’ logic level during the first cycle and at the ‘0’ logic level during the remaining M-[0172] 1 cycles. The M successive values of the SCAN_OUT signal are BackM, Back(M-1), . . . , Back2, ‘1’, the final ‘1’ being the u_back logic level.
  • If necessary, the SCAN_IN signal can be placed at the ‘0’ logic level during the M-th SHIFT_CK cycle to scan a ‘0’ into D-FF [0173] 90-1, and an update operation can then be performed to reset u_back to the ‘0’ logic level.
  • The above operations enable an M-[0174] bit scan register 86 to capture and scan out considerably more than M bits of parameter data or other data.
  • This [0175] scan register 86 is particularly suitable for use in the first three embodiments as the profile register 28, which may need to capture a large amount of parameter data, but has to provide only one update data bit (wren). Referring to FIG. 21, a nine-bit scan register 86 can be used to capture a four-bit code (strage<3:0>) indicating the flash-memory storage capacity, a three-bit code (sector<2:0>) indicating the sector size, and eight bits of parameter data describing other options, such as the word width, as well as two flag bits (c_back0 and c_back1). The storage capacity and sector size may be coded as indicated in FIGS. 22 and 23, for example.
  • When this nine-bit scan register is used as the profile register, the least significant bit (bit [0176] 0) of update data (wren) is supplied to the control circuit 38 to enable or disable the generation of write pulses, as described in the first embodiment. The meaning of the most significant bit (bit 8) will be described later.
  • One alternative to the use of this nine-bit profile register would be to provide a single eighteen-bit profile register, but then eighteen SHIFT_CK cycles would be needed to access the least significant bit. In FIG. 21, any bit can be accessed in at most nine SHIFT_CK cycles. [0177]
  • Another alternative would be to provide two separate nine-bit profile registers, selected by different instruction codes or SCAN_BN codes. In this case, however, to obtain all of the capture data, two instruction codes or SCAN_BN codes would have to be scanned in and decoded to select both profile registers in turn. The fourth embodiment permits all of the capture data to be obtained after just one register selection operation. [0178]
  • The fourth embodiment thus has the advantage of providing efficient access to both large and small amounts of capture data. Another advantage of the fourth embodiment is that the circuit size of the [0179] scan register 86 is reduced, as compared with either of the two alternatives mentioned above.
  • In a variation of the fourth embodiment, additional sets of capture data are provided, and two or more update data bits are used to select a particular set of capture data. It suffices to provide D-FFs [0180] 92-k to latch update data in a plurality of bit stages B2-k, and use selectors 94-k with more data input terminals and selection-signal input terminals. A very large amount of capture data can thereby be obtained from a scan register with a comparatively small number of bit stages.
  • In another variation, one or more of the capture data bits can be output as updatable flag data. It suffices to add additional D-FFs [0181] 92-k to latch the flag bits as update data. In FIG. 21, for example, the most significant bit of capture data is used as a flag (c_back0 or c_back1).
  • For comparison with the embodiments above, a brief description will now be given of the conventional interface circuit, in which the memory-access registers are chained serially between the test data input and output terminals. [0182]
  • Referring to FIG. 24, the [0183] conventional interface circuit 100 provides a TAP circuit 102 generally similar to the TAP circuit in the second embodiment, comprising an instruction register 106, a bypass register 108, an instruction decoder 110, a multiplexer 112, a latch 114, and a TAP controller 116. There is also a memory-access register chain 118 comprising an address register (ADDR) 120, a data register (DR) 122, and a control register (CTLREG) 124, coupled in series between the TDI terminal and the multiplexer 112. The address register 120 supplies an address signal S11 as update data to the flash memory 4. The data register 122 receives read data S12 from the flash memory 4 as capture data, and supplies write data S13 to the flash memory 4 as update data. The control register 124 supplies a control signal S14 to the flash memory 4 as update data.
  • The memory-[0184] access register chain 118 is selected when an INTEST instruction code is scanned into the instruction register 106 and decoded. The three registers 120, 122, 124 in the chain 118 operate as if they were a single scan data register, shift operations and update operations being carried out on all three registers simultaneously.
  • When the [0185] flash memory 4 is programmed, for each word of write data, it is necessary to scan a control code, the data word, and an address into the register chain 118. Moreover, to generate write pulses that satisfy setup and hold time requirements with respect to the address and data, this scan operation must be repeated at least three times per word, changing the control code each time. The need for so much repeated scanning greatly delays the programming operation.
  • During read access, it is basically necessary to scan a control code into the [0186] control register 124, scan an address into the address register 120, perform an update operation to send control and address signals to the flash memory 4, perform a capture operation to capture the data output by the flash memory 4, and then scan the captured data out from the data register 122, through the control register 124. Thus read access is also greatly delayed, as compared with the present invention.
  • A further source of delay is that even when only a control code is scanned in, it must be shifted through the [0187] address register 120 and the data register 122 before it can reach the control register 124. Similarly, data scanned out from the data register 122 must pass through the control register 124 before reaching the test data output terminal TDO.
  • As explained above, the present invention provides access to flash memory data without the need for repeated scanning in of addresses and control codes, and enables large amounts of flash-memory parameter data to be captured and scanned out. [0188]
  • The present invention can be practiced in any large-scale integrated circuit having a test access port of the general type described in the IEEE 1149.1 standard, regardless of whether or not the test access port is also used to implement boundary-scan functions or debugging functions. If these other functions are present, the TAP circuit may be shared with them. Alternatively, the TAP circuit in the interface circuit may be an independent unit, the boundary-scan functions and/or debugging functions being implemented by another TAP circuit. [0189]
  • The invention has been described in relation to the control protocol given in the IEEE 1149.1 standard, but is not limited to this protocol. Any protocol that enables capture, shift, and update operations to be carried out on the data scan registers in the memory-access register block can be employed. The controller in the interface circuit does not have to follow the state transitions shown in FIG. 7. [0190]
  • The invention is not limited to the use of a flash memory with a sector buffer. If the flash memory does not have a sector buffer, each word of write data can be programmed immediately after being transferred from the memory-access register block to the flash memory. In this case, the codes written in the [0191] function command register 34 and the control signals generated by the control circuit 38 will naturally differ from those described above, and the methods of generating write enable signals and word addresses may also differ.
  • The parameter information stored in the profile register is not limited to the storage capacity, sector size, and word width of the flash memory. Examples of other information that may be stored include information specifying electrical characteristics of the flash memory, information specifying flash memory access or programming methods, and information related to circuits other than the flash memory. If a large amount of parameter information must be stored, the profile register can be provided with multiple sets of capture data as described in the fourth embodiment. Needless to say, the profile register is not limited to the capture data format shown in FIG. 21. For example, the u_back flag does not have to be the most significant bit of update data, but can be located in any bit location. [0192]
  • The invention is not limited to flash memory, but can be applied in relation to any type of embedded non-volatile memory to which external serial access might be necessary. [0193]
  • Those skilled in the art will recognize that further variations are possible within the scope claimed below. [0194]

Claims (19)

What is claimed is:
1. An interface circuit for writing data into a nonvolatile memory in an integrated circuit having a data input terminal and a data output terminal, comprising:
a plurality of memory-access scan registers coupled in common to the data input terminal, for receiving serial input data related to access to the non-volatile memory from the data input terminal;
at least one selection scan register coupled to the data input terminal, for receiving a code selecting at least one of the memory-access scan registers from the data input terminal; and
at least one multiplexer coupling said memory-access scan registers and said at least one selection scan register to the data output terminal, for serial output of data from said memory-access scan registers and said at least one selection scan register to the data output terminal.
2. The interface circuit of claim 1, wherein said memory-access scan registers include a data register providing the serial input data received from the data input terminal as parallel update data to the non-volatile memory.
3. The interface circuit of claim 2, further comprising a counter generating address signals for the non-volatile memory in response to output of said parallel update data from the data register.
4. The interface circuit of claim 2, wherein the data register also receives parallel capture data from the non-volatile memory for output as serial output data to the data output terminal.
5. The interface circuit of claim 1, wherein said memory-access scan registers include an address register providing the serial input data received from the data input terminal as address signals to the non-volatile memory.
6. The interface circuit of claim 1, wherein said memory-access scan registers include a function command register providing the serial input data received from the data input terminal as a command code for controlling the non-volatile memory.
7. The interface circuit of claim 1, wherein said memory-access scan registers include a profile register capturing at least one set of parallel parameter data from within the integrated circuit for provision to the data output terminal.
8. The interface circuit of claim 7, wherein the parallel parameter data include parameters of the non-volatile memory.
9. The interface circuit of claim 7, wherein the profile register also generates a write enable flag for the non-volatile memory.
10. The interface circuit of claim 7, wherein the profile register captures at least two sets of said parallel parameter data, selecting the set of parallel data to be captured according to at least one bit already stored in the profile register.
11. A method of using the interface circuit of claim 10 to access the non-volatile memory, comprising the steps of:
receiving the serial output of the profile register from the data output terminal, thereby reading the parallel parameter data captured by the profile register;
analyzing the parallel parameter data to determine bit lengths of the memory-access scan registers; and
determining a protocol for communicating with the interface circuit according to the bit lengths of the memory-access scan registers.
12. The interface circuit of claim 1, wherein one said selection scan register is an instruction register receiving an instruction code as the serial input data received from the data input terminal.
13. The interface circuit of claim 12, wherein the instruction register receives a different instruction code for selecting each one of the memory-access scan registers.
14. The interface circuit of claim 12, wherein the instruction register receives a single instruction code selecting all of the memory-access scan registers.
15. The interface circuit of claim 14, wherein another said selection scan register is a scan branch register receiving different codes, selecting the memory-access scan registers individually, as the serial input data received from the data input terminal.
16. The interface circuit of claim 1, further comprising a test access port controller controlling said memory-access scan registers and said at least one selection scan register.
17. A scan register receiving serial scan input data and parallel capture data, and providing output of serial scan output data and update data, comprising:
a selector selecting among different sets of said parallel capture data according to at least one bit of the update data.
18. The scan register of claim 17, further comprising:
a shift register selectively receiving said serial input data from the data input terminal and the parallel capture data selected by the selector, storing the selectively received data, and supplying the stored data as said serial output data; and
a latch receiving at least part of the data stored in the shift register, and storing said at least part of the data as said update data.
19. The scan register of claim 18, wherein said at least one bit of the update data is also supplied to said shift register as part of said parallel capture data, when said shift register receives said parallel capture data selected by the selector.
US09/953,166 1999-09-09 2001-09-17 Interface circuit and method for writing data into a non-volatile memory, and scan register Expired - Lifetime US6442092B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US09/953,166 US6442092B1 (en) 1999-09-09 2001-09-17 Interface circuit and method for writing data into a non-volatile memory, and scan register

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP255750/99 1999-09-09
JP25575099A JP2001084787A (en) 1999-09-09 1999-09-09 Rewrite circuit for nonvolatile memory, rewriting method for nonvolatile memory and scan register
JP11-255750 1999-09-09
US09/605,760 US6324096B1 (en) 1999-09-09 2000-06-28 Interface circuit and method for writing data into a non-volatile memory, and scan register
US09/953,166 US6442092B1 (en) 1999-09-09 2001-09-17 Interface circuit and method for writing data into a non-volatile memory, and scan register

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US09/605,760 Division US6324096B1 (en) 1999-09-09 2000-06-28 Interface circuit and method for writing data into a non-volatile memory, and scan register

Publications (2)

Publication Number Publication Date
US20020044484A1 true US20020044484A1 (en) 2002-04-18
US6442092B1 US6442092B1 (en) 2002-08-27

Family

ID=17283120

Family Applications (2)

Application Number Title Priority Date Filing Date
US09/605,760 Expired - Fee Related US6324096B1 (en) 1999-09-09 2000-06-28 Interface circuit and method for writing data into a non-volatile memory, and scan register
US09/953,166 Expired - Lifetime US6442092B1 (en) 1999-09-09 2001-09-17 Interface circuit and method for writing data into a non-volatile memory, and scan register

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US09/605,760 Expired - Fee Related US6324096B1 (en) 1999-09-09 2000-06-28 Interface circuit and method for writing data into a non-volatile memory, and scan register

Country Status (2)

Country Link
US (2) US6324096B1 (en)
JP (1) JP2001084787A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103341A1 (en) * 2002-11-27 2004-05-27 Demeo Dana C. Disaster recovery port in a portable computer
US20070297229A1 (en) * 2006-06-15 2007-12-27 Samsung Electronics Co., Ltd. Flash memory device including multi-buffer block
US20090031289A1 (en) * 2007-07-28 2009-01-29 Sam Michael Memory management for remote software debuggers and methods
US20100205490A1 (en) * 2007-02-23 2010-08-12 Micron Technology, Inc. Input/output compression and pin reduction in an integrated circuit
CN103077747A (en) * 2012-12-20 2013-05-01 北京航天测控技术有限公司 Electrically erasable programmable read-only memory (EEPROM) modeling method and boundary scan test program loading method
CN115202438A (en) * 2022-09-16 2022-10-18 四川奥库科技有限公司 Implementation method of full-synchronous eFlash controller based on single clock

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463516B1 (en) * 2000-04-25 2002-10-08 Advanced Micro Devices, Inc. Variable sector size for a high density flash memory device
US6691270B2 (en) * 2000-12-22 2004-02-10 Arm Limited Integrated circuit and method of operation of such a circuit employing serial test scan chains
JP4282919B2 (en) * 2001-04-27 2009-06-24 インターナショナル・ビジネス・マシーンズ・コーポレーション register
JP4136359B2 (en) * 2001-11-15 2008-08-20 株式会社ルネサステクノロジ Microcomputer
US6925583B1 (en) * 2002-01-09 2005-08-02 Xilinx, Inc. Structure and method for writing from a JTAG device with microcontroller to a non-JTAG device
US7162644B1 (en) 2002-03-29 2007-01-09 Xilinx, Inc. Methods and circuits for protecting proprietary configuration data for programmable logic devices
EP1367598A1 (en) * 2002-05-31 2003-12-03 STMicroelectronics S.r.l. Testing method and device for non volatile memories having a LPC (low pin count) communication serial interface
DE60224107T2 (en) * 2002-07-03 2008-12-04 Telefonaktiebolaget Lm Ericsson (Publ) METHOD AND UNIT FOR PROGRAMMING A MEMORY
US20040098643A1 (en) * 2002-11-18 2004-05-20 Jurgen Schulz Method and apparatus for accessing internal RAMs during diagnostic testing
US7152194B2 (en) * 2003-08-20 2006-12-19 Lsi Logic Corporation Method and circuit for scan testing latch based random access memory
US7099985B2 (en) * 2003-12-23 2006-08-29 Intel Corporation Using a processor to program a semiconductor memory
US7404128B2 (en) * 2004-02-17 2008-07-22 Texas Instruments Incorporated Serial data I/O on JTAG TCK with TMS clocking
US7380438B2 (en) 2004-09-16 2008-06-03 Cidra Corporation Apparatus and method for providing a fluid cut measurement of a multi-liquid mixture compensated for entrained gas
US7406878B2 (en) * 2005-09-27 2008-08-05 Endress + Hauser Flowtec Ag Method for measuring a medium flowing in a pipeline and measurement system therefor
DE102006017768A1 (en) * 2006-04-15 2007-10-18 Infineon Technologies Ag Integrated memory module and method for operating an integrated memory module
US8225022B2 (en) * 2006-08-08 2012-07-17 Dataram, Inc. Methods for eliminating intermediate bussing and bridging requirements between a solid state memory device with PCI controller and a main system bus
US10303895B1 (en) 2017-01-19 2019-05-28 Intuit Inc. System and method for perpetual rekeying of various data columns with respective encryption keys and on alternating bases
DE112019007374T5 (en) * 2019-05-31 2022-02-17 Micron Technology, Inc. DIRECT MEMORY ACCESS WITH JTAG CELL ADDRESS
DE112019007386T5 (en) * 2019-05-31 2022-02-17 Micron Technology, Inc. IMPROVED JTAG REGISTERS WITH SIMULTANEOUS INPUTS

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2535670B2 (en) * 1991-01-28 1996-09-18 株式会社東芝 Boundary scan cancel for bidirectional input / output terminals
JP2727930B2 (en) * 1993-10-04 1998-03-18 日本電気株式会社 Boundary scan test circuit
JPH08147186A (en) 1994-11-24 1996-06-07 Nippondenso Co Ltd Microcomputer with built-in flash memory
US5938782A (en) * 1996-09-24 1999-08-17 Vlsi Technology, Inc. Scan flip-flop and methods for controlling the entry of data therein
JPH10105456A (en) 1996-09-30 1998-04-24 Hitachi Ltd Method for rewriting flash memory and data processing system
US5937423A (en) * 1996-12-26 1999-08-10 Intel Corporation Register interface for flash EEPROM memory arrays
US6137738A (en) * 1999-11-30 2000-10-24 Lucent Technologies, Inc. Method for in-system programming of serially configured EEPROMS using a JTAG interface of a field programmable gate array

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103341A1 (en) * 2002-11-27 2004-05-27 Demeo Dana C. Disaster recovery port in a portable computer
WO2004051915A1 (en) * 2002-11-27 2004-06-17 Symbol Technologies, Inc. Disaster recovery port in a portable computer
US6973588B2 (en) 2002-11-27 2005-12-06 Symbol Technologies, Inc. Disaster recovery port in a portable computer
US20070297229A1 (en) * 2006-06-15 2007-12-27 Samsung Electronics Co., Ltd. Flash memory device including multi-buffer block
US7489565B2 (en) * 2006-06-15 2009-02-10 Samsung Electronics Co., Ltd. Flash memory device including multi-buffer block
US20100205490A1 (en) * 2007-02-23 2010-08-12 Micron Technology, Inc. Input/output compression and pin reduction in an integrated circuit
US8024629B2 (en) * 2007-02-23 2011-09-20 Micron Technology, Inc. Input/output compression and pin reduction in an integrated circuit
US20090031289A1 (en) * 2007-07-28 2009-01-29 Sam Michael Memory management for remote software debuggers and methods
US9092570B2 (en) * 2007-07-28 2015-07-28 Sam Michael Memory management for remote software debuggers and methods
CN103077747A (en) * 2012-12-20 2013-05-01 北京航天测控技术有限公司 Electrically erasable programmable read-only memory (EEPROM) modeling method and boundary scan test program loading method
CN115202438A (en) * 2022-09-16 2022-10-18 四川奥库科技有限公司 Implementation method of full-synchronous eFlash controller based on single clock

Also Published As

Publication number Publication date
US6442092B1 (en) 2002-08-27
JP2001084787A (en) 2001-03-30
US6324096B1 (en) 2001-11-27

Similar Documents

Publication Publication Date Title
US6324096B1 (en) Interface circuit and method for writing data into a non-volatile memory, and scan register
US7047467B1 (en) Structure and method for verifying data in a non-JTAG device from a JTAG device with microcontroller
US5869980A (en) Programming programmable transistor devices using state machines
JP4527181B2 (en) Method and apparatus for controlling input / output processing of a memory unit via a JTAG port
US5848026A (en) Integrated circuit with flag register for block selection of nonvolatile cells for bulk operations
US7610528B2 (en) Configuring flash memory
US6826101B2 (en) Semiconductor device and method for testing the same
JPH0773696A (en) Self-time type memory-array and testing method thereof
JP2008310955A (en) Method for preventing consumption of time to program address in defective column
US7447962B2 (en) JTAG interface using existing I/O bus
US6816420B1 (en) Column redundancy scheme for serially programmable integrated circuits
US6427216B1 (en) Integrated circuit testing using a high speed data interface bus
CN107271884A (en) A kind of eFlash serial ports test circuits of high reliability and high integration
JP3484181B1 (en) Semiconductor test circuit
US7088627B1 (en) Column redundancy scheme for non-volatile flash memory using JTAG input protocol
CN113950721B (en) JTAG-based architectures that allow multi-core operation
US8166358B2 (en) Test access port with address and command capability
US6757844B1 (en) Architecture and logic to control a device without a JTAG port through a device with a JTAG port
CN113939880B (en) Improved JTAG register with concurrent input
US20060036803A1 (en) Non-volatile memory device controlled by a micro-controller
US6714040B1 (en) Automated boundary-scan chain composition method using a device database and access mechanism for storing and retrieving situation-dependent operation options
US6785174B2 (en) Testing method and device for non-volatile memories having a LPC (low pin count) communication serial interface
JP4122824B2 (en) Data transfer control circuit for nonvolatile storage device, rewrite circuit for nonvolatile storage device, and communication control device
JPH07192481A (en) Semiconductor memory device
CN117234831B (en) Chip function test method and system based on multi-core CPU

Legal Events

Date Code Title Description
STCF Information on status: patent grant

Free format text: PATENTED CASE

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

AS Assignment

Owner name: OKI SEMICONDUCTOR CO., LTD., JAPAN

Free format text: CHANGE OF NAME;ASSIGNOR:OKI ELECTRIC INDUSTRY CO., LTD.;REEL/FRAME:022399/0969

Effective date: 20081001

Owner name: OKI SEMICONDUCTOR CO., LTD.,JAPAN

Free format text: CHANGE OF NAME;ASSIGNOR:OKI ELECTRIC INDUSTRY CO., LTD.;REEL/FRAME:022399/0969

Effective date: 20081001

FPAY Fee payment

Year of fee payment: 8

FPAY Fee payment

Year of fee payment: 12

AS Assignment

Owner name: LAPIS SEMICONDUCTOR CO., LTD., JAPAN

Free format text: CHANGE OF NAME;ASSIGNOR:OKI SEMICONDUCTOR CO., LTD;REEL/FRAME:032495/0483

Effective date: 20111003