Abstract:
A flash memory includes input/output buffers, a memory array having memory cells coupled to the input/output buffers, and row and column decoders, and a voltage-generator circuit coupled to the row and column decoders. A microcontroller is coupled to the command user interface. Switch-instruction circuitry selectively provides instructions to the microcontroller from the read-only memory and from off chip through on-board t-latches coupled to the input/output buffers under control of a command user interface.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates in general to non-volatile memories. More particularly, the present invention relates to non-volatile memories in which an embedded algorithm executed from a ROM is required. 
         [0003]    2. The Prior Art 
         [0004]    Current flash memories execute embedded algorithms to handle all modify operations. All these operations have become increasingly complex both because the number of allowed operations have been increased and because technology problems require very complex flows of digital and analog operations to be managed by an embedded microcontroller. 
         [0005]    It is possible to check a lot of single circuitry functionality on a prototype chip, but usually the algorithm flows can only be verified in the on-chip implemented version. It is not possible to change these flows because the microcontroller executes instructions from a read-only memory (ROM) and a change to one or more masks is needed to change the stored code. 
         [0006]    Current flash memories have a great complexity and the embedded algorithm has to execute numerous tasks such as factory programming, enhanced factory programming, non-volatile protection of sectors, etc. In particular there are multi-level devices that require very complex algorithms. The fact that process evolution has become increasingly faster causes great variations in technology parameters. Subsequent changes in parameters such as the applied voltages and timing during modify operations are required in order to match the technological requirements. All these issues necessitate changes in the algorithm flow. These changes may occur more than one time from first prototype chip to the final production of the device, and often the changes must be directly checked on silicon. 
         [0007]    All modify operations in a flash memory device are obtained by applying well-defined voltage values to selected and not selected memory cells. These voltages are different accordingly to each operation and must be applied for timings that depend on the specific technology. Each modify operation employs a very high number of sequences that in the latest-generation devices requires several thousands of instructions. Usually a microcontroller decodes and executes the right sequence of instructions for the operation required from the user. All these instructions are usually stored in a ROM (Read Only Memory) that has both the advantages of a low area occupation and of a non-volatile memory. The memory that stores algorithm instructions has to be non-volatile because the flow has to be available after the power on of the device. Even if a dedicated flash area could be used to store the algorithm, this would require a high area cost and would not allow a fast access to execute the algorithm since reading from a ROM is much faster than from flash cells. On the other hand, the great disadvantage of using a ROM to store the algorithm instructions is the need of a mask set request in order to modify any flow, as previously explained. 
         [0008]    It is sometimes necessary to modify an algorithm in order to correct design bugs. The algorithm flow is fixed in the prototype chip in an embedded ROM by a VIA mask. It is not possible to change these flows without at least a new mask release. If, for instance, there is a bug in a specific flow, the right correction can be only simulated but a mask request is needed in order to check the real behavior of the modifications on the new silicon. 
         [0009]    In one possible approach to address the problem, programmable fuses are used in order to create the option to alter critical circuits, to match some ill-defined technology parameters. A first disadvantage is the high area cost because options are programmable fuses that by their nature require a particular array organization and dedicated algorithm to be programmed and erased. Another disadvantage is that with this method the variables—and their ranges that can be changed via fuses—should be known and hence fixed before first prototype chip is out. Obviously, possible bugs cannot be known before they appear, so in some cases the fuses could not be able to correct these bugs or could not help in finding a different solution to problems that arise. 
         [0010]    Another possible approach consists in introducing an embedded RAM that could be used during testing operations instead of the embedded ROM, in order to check each flow modification. Once the optimal code has been found, it could be implemented by one definitive mask that allows changing the on-chip ROM. The disadvantage of this approach is in terms of area since a RAM core is introduced with the related cells needed for decoding during read and write access. Moreover, new routines to manage the RAM controller must be introduced in the existent algorithm. 
         [0011]      FIG. 1  is a diagram showing the architecture for a typical prior-art flash memory. The microcontroller  10  executes instructions from ROM  12  and controls all the circuitry for voltage generation and management in voltage generator  14  and address decoding for row decoder  16  and column decoder  18  coupled to memory array  20 . Output data from the memory array  20  is presented by output buffers  22 . Moreover, information concerning timings, fails, and attempts is stored in dedicated digital circuitry  24 . 
         [0012]    The particular code that has to be executed depends on the command issued by the user and interpreted by the Command User Interface (CUI)  26 . The T-latch block  28  in  FIG. 1  includes a group of dedicated latches (t-latches) used only during the tests of the device whether to check the functionality of some circuitry or to execute some operations not accessible by the user. A well-defined command sequence (not known by the user) is provided to the CUI  26  to set these t-latches. 
         [0013]    The CUI  26  sends commands to the microcontroller  10 . To execute the commands, the microcontroller sends selection signals to digital circuitry  24  and voltage generator  14  and receives query signals from digital circuitry  24 . The digital circuitry  24  sends decoding signals to the row decoder  16  and column decoder  18  to select cells for testing or for user-mode standard operations such as read, program, and erase. 
         [0014]      FIG. 2  is a diagram illustrating the matrix organization and decoding of instructions from a prior-art ROM such as ROM  12  shown in  FIG. 1 . In an exemplary ROM  12  storing 1,024 instructions, the instructions available to the microcontroller  10  of  FIG. 1  are stored in the ROM matrix array  20 , organized in 64 rows and 256 columns. As is well understood by persons of ordinary skill in the art, each instruction is read by using row decoder  16  to select one row (by activating the corresponding ROW_SEL signal) and using column decoder  18  to select a group of sixteen columns (a word) from among the 256 available (by activating the corresponding COL_SEL signal). The ROM address (ROM_ADD) is a 10-bit bus in which four lines (ROM_ADD&lt; 3 : 0 &gt;) decode the selected group of sixteen of the column lines (COL_SEL&lt; 15 : 0 &gt;) while the other six lines (ROM_ADD&lt; 9 : 4 &gt;) decode the selected one of the row lines (ROW_SEL&lt; 63 : 0 &gt;). 
       BRIEF DESCRIPTION OF THE INVENTION 
       [0015]    The present invention provides a very low cost new apparatus and method to check algorithm modifications or to introduce new algorithm flows in a flash memory device. The architecture of the present invention implements a method that makes it possible not only to test all desired code modifications of each routine, but also makes it possible to test new routines not present in the original code. 
         [0016]    A flash memory includes input/output buffers, a memory array having memory cells coupled to the input/output buffers, and row and column decoders, and a voltage-generator circuit coupled to the row and column decoders. A microcontroller is coupled to the command user interface. An instruction read-only memory has an address bus coupled to the microcontroller and an instruction-data bus coupled to the ROM instruction data bus through switch instruction circuitry. A plurality of t-latches have inputs coupled to the input/output buffers and to a command user interface. Digital control circuitry has inputs coupled to the instruction data bus of the read-only memory and to the switch instruction circuitry, and outputs coupled to the row and column decoders. The switch instruction circuitry selectively routes instructions to the microcontroller from one of the read-only memory and the t-latches and routing test data from the t-latches to the digital circuitry. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWING FIGURES 
         [0017]      FIG. 1  is a diagram showing an illustrative prior-art flash memory architecture. 
           [0018]      FIG. 2  is a diagram illustrating the matrix organization and decoding of instructions from a prior-art ROM such as the one shown in  FIG. 1 . 
           [0019]      FIG. 3  is a diagram that illustrates an architecture for a memory according to one aspect of the present invention that includes switch instruction circuitry. 
           [0020]      FIG. 4A  is a diagram illustrating the input and output signals of the t-latch block of the circuit of  FIG. 3 . 
           [0021]      FIG. 4B  is a diagram illustrating the input and output signals of the SIC block of the circuit of  FIG. 3 . 
           [0022]      FIG. 5A  is a block diagram showing exemplary circuitry that may be used to implement the features of the t-latch block of  FIG. 4A . 
           [0023]      FIG. 5B  is a block diagram showing exemplary circuitry that may be used to implement the features of the SIC block of  FIG. 4B . 
           [0024]      FIG. 6  illustrates a proposed communication protocol that may be used to enter and implement SAMM modality according to the present invention. 
           [0025]      FIG. 7  is a block diagram showing exemplary circuitry that may be used to implement the features of the SIC block of  FIG. 4B  that allows the execution of JUMP or SUBROUTINE CALL instructions according to the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0026]    Persons of ordinary skill in the art will realize that the following description of the present invention is illustrative only and not in any way limiting. Other embodiments of the invention will readily suggest themselves to such skilled persons. 
         [0027]    The present invention provides a very low cost new apparatus and method to check algorithm modifications or to introduce new algorithm flows in a flash memory device. The architecture of the present invention implements a method that makes it possible not only to test all desired code modifications of each routine, but also makes it possible to test new routines not present in the original code. 
         [0028]    According to the present invention, the existing t-latches are combined with dedicated switch instruction logic to provide substitute instructions for all or a part of the instruction set stored in the ROM. 
         [0029]    By way of a non-limiting example of the present invention, consider a flash memory having sixteen groups of t-latches, each group having sixteen t-latches. The group size depends on the data bus length, (e.g., usually 16 bits for the latest generation flash memories). Persons of ordinary skill in the art will appreciate that the number of groups in any circuit fabricated according to the principles of the present invention depends on the complexity of the design and on the circuitry that has to be checked during test. Persons of ordinary skill in the art will appreciate that the principles of the present invention can be applied to devices with different data bus or ROM configurations and with a different number of t-latches. 
         [0030]    Referring now to  FIG. 3 , a block diagram illustrates an architecture  30  that implements one aspect of the present invention. Some of the circuit elements in  FIG. 1  are also present in  FIG. 3  and will be referred to using the same reference numerals used in  FIG. 1 . 
         [0031]    The architecture of  FIG. 3  differs from the prior arrangement shown in  FIG. 1  by the introduction of the switch instruction circuitry (SIC) block  32  that routes instructions to the microcontroller  10 . The SIC block  32  is switching circuitry added in order to implement the present invention by selectively supplying the microcontroller with instructions stored in ROM  12  or with instructions supplied from off chip through the t-latch block  28 . The COL_SEL&lt; 15 : 0 &gt; signals used inside SIC circuitry  32  are the same ones generated in the ROM column decoder  18  of  FIG. 1  shown in more detail in  FIG. 2 . 
         [0032]    In the prior-art approach shown in  FIG. 1 , data stored in t-latch groups are used to check circuits in the device. Each t-latch (if set) permits checking a specific circuit by driving the digital circuitry  24 . This function of the t-latch circuits is well understood by persons of ordinary skill in the art. In the architecture according to the present invention, the outputs of the t-latches in t-latch block  28  are provided to the SIC block  32 , which manages providing t-latch data to the digital circuitry  24  as in the prior art systems as well as providing off-chip instructions to the microcontroller  10 . In this way the prior-art functionality of the t-latches is maintained and their functionality is enhanced according to the present invention. 
         [0033]    Referring now to  FIGS. 4A and 4B , the input and output signals of the t-latch block  28  and SIC block  32  are shown. Depending on the signals from t-latch block  28  and from ROM  12 , the SIC block  32  provides instructions to the microcontroller  10  (placed on the 16-bit bus MBUS) that serve to implement both the prior-art t-latch functions and the features of the present invention. The SIC block  32  also provides the signals to properly drive the digital circuitry  24  to implement all of the testing functionalities. 
         [0034]    Referring now to  FIG. 4A , the inputs to t-latch block  28  are signals DBUS&lt; 15 : 0 &gt; from I/O buffers  22  of  FIG. 3  and signals TBUS&lt; 15 : 0 &gt; from CUI  26 . The outputs from t-latch block  28  include signal groups INT_TL_GRP_ 0 &lt; 15 : 0 &gt; through INT_TL_GRP_ 14 &lt; 15 : 0 &gt; that are provided to SIC block  26 , together with signal groups INT_TL_GRP_ 15 &lt; 15 : 1 &gt;, and the signal TM_ALGO (and its complement TM_ALGO_N). Both TM_ALGO and TM_ALGO_N are used by the SIC block  32 . 
         [0035]    Referring now to  FIG. 4B , the inputs to SIC block  32  are the COL_SEL&lt; 15 : 0 &gt; signals and ROM_MBUS&lt; 15 : 0 &gt; signals from ROM  12 , the signals in the groups INT_TL_GRP_ 0 &lt; 15 : 0 &gt; through INT_TL_GRP_ 14 &lt; 15 : 0 &gt;, the signals in the group INT_TL_GRP_ 15 &lt; 15 : 1 &gt;, and the signals TM_ALGO and its complement TM_ALGO_N from t-latch block  28 . The outputs from SIC block  32  are TL_GROUP_ 0 &lt; 15 : 0 &gt; through TL_GROUP_ 14 &lt; 15 : 0 &gt; and TL_GROUP_ 15 &lt; 15 : 1 &gt; that are provided to digital circuitry  24  and MBUS&lt; 15 : 0 &gt; provided to the microcontroller  10 . 
         [0036]    As can be seen from an examination of  FIGS. 4A and 4B , the t-latch block  28  and the SIC block  32  act together to provide the prior-art function of supplying t-latch data to use in testing as in the prior art systems, and to provide the additional function of using the t-latch block  28  to provide instructions from off chip through the I/O buffers  22  to be executed by the microcontroller  10 . 
         [0037]    Referring now to  FIGS. 5A and 5B , block diagrams show exemplary circuitry that may be used to implement the features of the SIC and t-latch blocks. Referring now to  FIG. 5A , representative ones of the latches for groups  0  through  15  in t-latch block  28  are shown at reference numerals  34 - 0 ,  34 - 1 ,  34 - 14 , and  34 - 15 . Each latch is 16 bits wide and the data inputs of all latches are coupled to the data bus lines DBUS&lt; 15 : 0 &gt;. All latches are clocked by a corresponding one of the TBUS lines TBUS&lt; 0 &gt; through TBUS&lt; 15 &gt; from CUI  32 . 
         [0038]    The output line for INT_TL_GRP_ 15 &lt; 0 &gt; is the TM_ALGO line. The signal TM_ALGO is complemented in inverter  36  to produce the signal TM_ALGO_N. 
         [0039]    Referring now to  FIG. 5B , the SIC block includes a set of buffers and AND gates for each set of signals INT_TL_GRP_ 0 &lt; 15 : 0 &gt; through INT_TL_GRP_ 14 &lt; 15 : 0 &gt; and the signals INT_TL_GRP_ 15 &lt; 15 : 1 &gt;. Representative ones of the buffers and AND gates for groups  0  through  15  in SIC block  32  are shown at reference numerals  38 - 0  and  40 - 0 ,  38 - 1  and  40 - 1 , and  38 - 15  and  40 - 15 . Group  15  is used only for memory device testing and not to provide external instructions, since its first bit &lt; 0 &gt; is the TM_ALGO signal. 
         [0040]    Two operating modes can be chosen by setting or not the bit &lt; 0 &gt; of t-latch  34 - 15  whose output is TM_ALGO. The first mode is a conventional test mode. When TM_ALGO is low (i.e. the bit &lt; 0 &gt; of t-latch  34 - 15  is not set), the outputs of the t-latches  34 - 0  through  34 - 15  are passed on the TL_GROUP_ 0 &lt; 15 : 0 &gt; through TL_GROUP_ 15 &lt; 15 : 1 &gt; lines by the AND gates  40 - 0  through  40 - 15  because the signal TM_ALGO_N is high. These control signals can be used in the prior-art testing modality to check any single circuit or chip functionality. In this mode, multiplexer  42  passes the instruction data from the embedded ROM (ROM_MBUS&lt; 15 : 0 &gt;) to the microcontroller instruction bus (MBUS) through DFF  44  on the microcontroller clock. In this mode the microcontroller executes the code stored in the ROM. 
         [0041]    The second mode is a simple algorithm modify mode (SAMM). When TM_ALGO is high (i.e. the bit &lt; 0 &gt; of t-latch  34 - 15  is set), all the TL_GROUP_ 0 &lt; 15 : 0 &gt; through TL_GROUP_ 15 &lt; 15 : 1 &gt; lines are disabled by the AND gates  40 - 0  through  40 - 15  since the TM_ALGO_N signal is low. Buffers  38 - 0  through  38 - 15  are enabled by the corresponding COL_SEL&lt; 0 &gt; through COL_SEL&lt; 15 &gt; signals used to decode the column address of the ROM (see  FIG. 2 ), thus sequentially passing the outputs of the t-latches  34 - 0  through  34 - 14  plus the fixed 16-bit instruction “WAIT-CE#” to TL_MBUS&lt; 15 : 0 &gt; and through the multiplexer  42  to the MBUS through DFF  44 . In this mode, the microcontroller  10  will execute the instructions sequentially placed on the bus TL_MBUS&lt; 15 : 0 &gt;, i.e. the instructions externally set into the t-latches by the testing machine. 
         [0042]    The architecture depicted in  FIGS. 5A and 5B  will operate correctly in the second mode if no JUMP or SUBROUTINE CALL instructions are decoded on the TL_MBUS&lt; 15 : 0 &gt; bus. If this rule is respected, the address counter implemented to generate the decoding signals ROM_ADD&lt; 9 : 0 &gt; for the ROM matrix will increment the decoded address at each clock cycle, and hence the COL_SEL&lt; 15 : 0 &gt; will be automatically scanned from the 0th to the 15th and the INT_TL_GRP_ 0 &lt; 15 : 0 &gt; through INT_TL_GRP_ 14 &lt; 15 : 0 &gt; plus the instruction “WAIT-CE#” will be sequentially placed on the TL_MBUS&lt; 15 : 0 &gt; line. In the approach of the present invention depicted in the figures, the ROM_ADD&lt; 9 : 4 &gt; states of the bits decoding the ROM matrix row are don&#39;t care. The count is a 16-module count, since only the COL_SEL&lt; 15 : 0 &gt; signals are significant. 
         [0043]    Note that the group of t-latches  15  (that contains the TM_ALGO output signal) are not used to store instructions, since the instruction pointed by COL_SEL&lt; 15 &gt; is the fixed instruction “WAIT CE#”. The reason of this is explained further herein. 
         [0044]    In a complete COL_SEL&lt; 15 : 0 &gt; scanning, only 15 (+1 “WAIT CE#”) instructions can be executed. A communication protocol that would allow the execution of an arbitrary number of instructions is implemented according to the present invention. A proposed protocol is shown in  FIG. 6 . 
         [0045]      FIG. 6  illustrates execution of a proposed communication protocol that may be used to enter and implement the SAMM modality according to the present invention. First, as shown at reference numeral  50 , the TM_ALGO t-latch is set in the same way a typical t-latch is set. Next, at reference numeral  52 , the first 15 groups of t-latches are loaded with the first 15 instructions of algorithm that should be implemented. Next, at reference numeral  54 , the desired command that can be recognized by the device CUI (e.g., word program, buffered program, erase, etc.) is provided. Upon receipt of the command, the system clock starts and the microcontroller executes the first 15 instructions stored in the INT_TL_GR_ 0 &lt; 15 : 0 &gt; through INT_TL_GR_ 14 &lt; 15 : 0 &gt; and automatically selected by the COL_SEL&lt; 15 : 0 &gt; signals in the order COL_SEL&lt; 0 &gt;, COL_SEL&lt; 1 &gt; . . . COL_SEL&lt; 14 &gt;. 
         [0046]    At the sixteenth instruction window when the COL_SEL&lt; 15 &gt; signal is active, the instruction provided to the microcontroller  10  through buffer  38 - 15  in  FIG. 5B  is “WAIT CE#” as shown at reference numeral  56 . This instruction causes the algorithm to freeze until a low-to-high transition is sensed on the CE# I/O pad of the chip. The next 15 groups of t-latches are loaded with the next 15 instructions at reference numeral  58  while the CE# pad is kept low. During this operation the algorithm is frozen in the “WAIT CE#” state. 
         [0047]    When the instruction loading has been completed, a pulse on the CE# I/O pad is needed, having a “1” state with a width that must be longer than 1 microcontroller clock period and shorter than 15 clock periods. As a consequence the microcontroller recognizes the “1” state of the CE# pad and at reference numeral  60  exits the “WAIT CE#” state: the new 15 instructions loaded on the INT_TL_GRP_ 0 &lt; 15 : 0 &gt; through INT_TL_GRP_ 14 &lt; 15 : 0 &gt; will be executed. After 15 clock periods the algorithm will enter a new “WAIT CE#” frozen state. This is repeated until all the desired instructions have been loaded and executed. 
         [0048]    The algorithm is stopped by loading the preferred instruction “SET END_OP”, that will be internally recognized by the microcontroller as the last instruction executed in any algorithm flow as shown at reference numeral  62 . This instruction switches off the clock system and ends the algorithm. 
         [0049]      FIG. 7  is a block diagram showing exemplary circuitry that may be used to implement the features of the SIC block of  FIG. 4B  that allows the execution of JUMP or SUBROUTINE CALL instructions to be decoded on the TL_MBUS&lt; 15 : 0 &gt; line according to the present invention. 
         [0050]    Basically the circuitry shown in the same as that of  FIG.5B , with the exception of the block CONTROL LOGIC  46 , whose output drives the multiplexer MUX fed by ROM_MBUS&lt; 15 : 0 &gt; and TL_MBUS&lt; 15 : 0 &gt; lines. The inputs of the CONTROL LOGIC block are the TM_ALGO signal and the JUMP, CALL, and RETURN signals. The CONTROL LOGIC  46  may be configured in any way that implements the following rules. 
         [0051]    The multiplexer  42  input is switched to ROM_MBUS&lt; 15 : 0 &gt; and hence the instructions executed by the microcontroller are the ones stored in the ROM matrix under the condition where TM_ALGO is low or TM_ALGO is high and a CALL (or JUMP) instruction has been read on the TL_MBUS&lt; 15 : 0 &gt; line. The instructions of the called subroutines are subsequently executed from the ROM matrix, until a RETURN instruction is read. This will cause the CONTROL LOGIC  46  to switch the input of multiplexer  42  back to the TL_MBUS&lt; 15 : 0 &gt; line. 
         [0052]    The input of multiplexer  42  is switched to TL_MBUS&lt; 15 : 0 &gt; and hence the executed instructions are the ones decoded by the INT_TL_GRP(j)&lt; 15 : 0 &gt; buses when TM_ALGO is high and no SUBROUTINE CALL or JUMP instruction has been read on TL_MBUS&lt; 15 : 0 &gt; line. If a SUBROUTINE CALL or JUMP instruction is placed on TL_MBUS&lt; 15 : 0 &gt; line, the CONTROL LOGIC switches the input of multiplexer  42  to the ROM_MBUS&lt; 15 : 0 &gt; lines, the subroutine instructions are executed from the ROM matrix, and if a RETURN instruction occurs, the CONTROL LOGIC  46  switches the input of multiplexer  42  back to the TL_MBUS&lt; 15 : 0 &gt; lines. 
         [0053]    The above-described modality is referred to as extended algorithm modify mode (EAMM), and is a more flexible and powerful way of implementing the proposed invention. Nevertheless, a simple CONTROL LOGIC circuit  46  is needed to control the multiplexer whose output feeds to the microcontroller the instruction to be executed. 
         [0054]    The ability of the present invention to change the algorithm on the existing silicon is useful for two major reasons. First, the results of the proposed corrections are available in real time and there is no need to invest additional time and money to design and implement new masks before the implemented solution can be tested on-silicon. In addition, the proposed corrections in the algorithm flows are safe only once they are tested on silicon and the present invention allows such testing. The present invention is therefore advantageous in terms of reliability and saving of on-chip area, money and time. 
         [0055]    In addition, the advantages of the present invention in terms of reliability and area occupation arise from the fact that it allows performance testing of modified and new algorithms by using most of the circuitry already present in a typical flash memory, along with the aforementioned saving of time and money. 
         [0056]    The present invention offers great flexibility for checking any algorithm flow without or with JUMP or SUBROUTINE CALL instructions, in order to test some existing or new routines without writing the ROM matrix. Additional area occupation is very small because only the simple control logic of the SIC circuitry has been added. The solution is innovative because it solves the problem of how to test a new algorithm by using existing test-dedicated on-chip circuitry, without the introduction of any new memory location to implement the alternative algorithm. The approach offered by the present invention also ensures that any bug correction is ok before the request of a new mask set, hence saving time and money in the production. 
         [0057]    While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims.