PATENT ABSTRACT
A non-volatile semiconductor memory device that includes an address buffer block, a matrix of memory cells, and an output buffer block. The address buffer block receives input signals external to the memory device, that in a first operating mode are controlled by devices outside to the memory device, and transmit signals to the matrix of memory cells, which are adapted to decode the received signals and to transmit in turn output decoded signals through the output buffer block. A command block is provided that is activatable through an external control signal and once activated, it puts the memory device in a second operating mode in which the command block receives at least a part of the signals in output of said matrix of memory cells and, after having processed them, transmits internal address signals to the address buffer block. This provides a feedback inside the memory device capable of making the same able to autonomously execute a succession of instructions stored in the matrix of memory cells.

PATENT DESCRIPTION
TECHNICAL FIELD 
     The present invention relates to a non-volatile memory capable of executing a program independently from a microprocessor. 
     BACKGROUND OF THE INVENTION 
     The families of the non-volatile memories, among which are the EEPROMs and the Flash EEPROM, share a fundamental property: They all effect a conversion of binary codes. Such conversion is performed by decoding the code that is introduced in input, getting a number of distinct signal lines, resulting from all the possible combinations of the bits of the input code; these lines are then encoded in the desired output word through a circuit called an encoder. The memory matrix produces therefore the desired functional relationship between input and output. 
     From this point of view it is reasonable to classify a non-volatile matrix as a combinatorial circuit, not as a sequential circuit because the outputs depend entirely from the actual inputs and not from the preceding history of the circuit. What is stored is the functional relationship between inputs and outputs. 
     In the electronic devices comprising microcomputers, that is computers in which a microprocessor is present, the non-volatile memory is used to store the program that must be performed by the microprocessor. 
     The microprocessor is an integrated circuit that contains a control unit and an arithmetic-logic unit and has an internal state that is usually controllable from the outside through a programmable fixed memory. 
     The microprocessor is a very complex unit, capable of performing programs involving operations of calculation, of comparison of data, of timing and other usually essential operations in the actual electronic devices. 
     The structure of a microcomputer essentially consists of a central processing unit (microprocessor), a memory, and input/output devices. The program that must be performed by the microprocessor is stored in a non-volatile memory. During operation the microprocessor extracts the instructions from the memory, performing them in succession and elaborating therefore the data according to the program. During elaboration the results of the same can be provided to the outside through the output devices. The memory has therefore the purpose to preserve the program, i.e., the instructions and the data necessary to the operation of the microprocessor. 
     In FIG. 1 there is schematically represented a block diagram of a microcomputer in which a non-volatile memory  1  is present that contains the control program of the system, a microprocessor  2 , a RAM memory  3  that temporarily stores instructions and data, these last written in memory locations each one having a respective address. Also present is an input/output I/O unit  4  that receives signals  5  of input and output. The various elements are connected by a data bus  6 , bidirectionally carrying the data among the different sections of the microcomputer, and by an address and control bus  7 , unidirectional and adapted to transmit the address of the memory location which is desired to be read or written, or of the input or output device that must be activated, and to carry the control signals necessary for example to enable the memory to operate in reading or writing or to enable the circuits of input-output interface. 
     In FIG. 2 the functional structure of the non-volatile memory  1  of FIG. 1 is schematically shown. The input signals  8 , comprising control and address signals, are sent through input buffers  10  to a matrix of memory cells  11  that decodes them and sends respective coded signals  9  to output buffers  12  connected to the data bus  6 . 
     The elements shown in FIG. 2 are present in any non-volatile memory and they constitute the fundamental structure thereof, even if other functional blocks are generally foreseen, such as for instance circuits of control or verification. 
     In several applications, the power of calculation, essential for instance in a computer, is not necessary and the execution of a program is reduced to the simple execution in sequential way of the instructions contained in the memory. For instance, the distributors of drinks perform a sequential program, which uses in reality few instructions, performing only a series of timed operations that, in principle, do not require the use of a microprocessor. Other examples are found in appliances such as dishwashers, washing machines or refrigerators, which perform some identical cycles in time that need not a great flexibility. 
     SUMMARY OF THE INVENTION 
     The present invention provides a non-volatile memory configured to behave as a RISC (Reduced Instruction Set Computer) machine, performing a limited set of instructions that substantially make the non-volatile memory a sequential machine. This additional intelligence of the non-volatile memory does not pose it at the same level of a microcontroller; however, it could allow the memory itself to perform some simple tasks, leaving more difficult tasks to the microprocessor. 
     Additionally, such memory would, if the particular application makes it possible, avoid the use of a microprocessor with a significant reduction of costs. 
     The present invention provides a non-volatile memory semiconductor device having an address buffer block, a matrix of memory cells, and an output buffer block, the address buffer block receiving input signals external to the memory device, that in a first operating condition are controlled by devices external to the memory device, and transmitting signals to the matrix of memory cells, adapted to decode the received signals and to transmit in turn decoded signals in output through the output buffer block. Further included is a command block, activatable by an external control signal that, once activated, sets the memory device in a second operating condition in which the command block receives at least a part of the signals in output from the matrix of memory cells and, after having processed them, transmits internal address signals to the address buffer block to get a feedback inside the memory device suitable for making the memory device able to perform a succession of instructions memorized in the matrix of memory cells autonomously. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The features and advantages of the present invention will be evident from the following detailed description of one embodiment thereof, illustrated by way of a non-limiting example in the annexed drawings, wherein: 
     FIG. 1 schematically shows a block diagram of a microcomputer; 
     FIG. 2 schematically shows the functional structure of a non-volatile memory; 
     FIG. 3 schematically shows an embodiment of a block diagram functional structure of a non-volatile memory according to the present invention; 
     FIG. 4 shows a functional structure of the non-volatile memory of FIG. 3, expanded in some parts thereof; 
     FIG. 5 shows in a chart the bits used for the execution of the code in an example of active mode of the memory; and 
     FIG. 6 shows in a chart a sample set of instructions according to the bits of FIG.  5 . 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     In FIG. 3 a functional structure of the non-volatile memory  1  of FIG. 1 is schematically shown, modified according to the present invention. Reference numeral  8  denotes a set of signal lines comprising address signals  8 ′ and generic control signals. The address signals  8 , through an input buffer  10 , are sent to the matrix  11 . With  11  a matrix of cells of memory is schematically indicated, as well as circuits for addressing the cells and for reading the same. The matrix  11  furnishes in output a set of signals  14  that carry a code depending on the current code on the address signals  8 ′. At least a portion  14 ′ of the output signals  14  from the matrix  11  are directed to a command unit  13 , that generally comprises a command interpreter, a program counter and an internal timer, so that the command unit processes them and therefore transmits a set of signals  15  to the address buffers  10 . In this way a feedback is obtained in the memory device that makes it autonomous and capable of performing a predefined set of instructions stored in the matrix  11 . The input signals  8  are also supplied, all or partly, directly to the command block  13 , for driving and controlling the same, and additionally external signals  16  can also be supplied directly feeding block  13 . 
     To realize this type of functionality of the memory, it is for instance necessary that an external control pin is activated, the external control pin being included in the external signals  16 , so to switch the memory from the “passive” operating mode, in which the memory depends on the microprocessor, to an “active” operating mode in which the memory is autonomous. 
     In FIG. 4 a functional block diagram similar to that of FIG. 3 is depicted, showing a Flash-type non-volatile memory, in which already existing elements are used to form the command block  13  of FIG.  3 . 
     Particularly, between the matrix  11  and the outputs buffers  12  a latch circuit  17  is provided that temporarily stores the outputs of the matrix  11  and, during the active operating mode of the memory, transmits such outputs, through a feedback line  20 , to a command interpreter  18  (CUI), connected to all the units present in the memory; the command interpreter processes the aforesaid signals  20 , working as a microprocessor, and sends suitable commands  21  to the address buffers  10 , so to have an active feedback of the whole circuit, and to make the memory perform a prescribed determined instruction, the memory working as a sequential machine. 
     The CUI  18  also receives input signals  8  and external control signals  16 , among which a control signal for activating the active operating mode and a clock signal, and it interacts with an internal counter  19  that can be used for keeping track of the performed operations and for calculating the correct memory address of the following instruction that must be executed, when the current one has been completed. 
     The outputs  9  of the memory can drive, through multiplexers, possible actuators, without the necessity of passing the outputs  9  through a microprocessor. 
     In FIG. 4 the possibility is also shown of providing a direct connection  22  among the address buffers  10  and the output buffers  12 , so that a microprocessor can use the Flash memory as an expanded I/O connection device, directly sending the inputs to the outputs and so exploiting the output buffers  12  of the memory as drivers of signal lines. 
     Once the external driving pin is activated, the memory switches to the active operating mode and signals  14  at the output of the matrix  11 , that in this particular example constitute a set of 16 lines, are stored by the latch circuit  17 , so that they are transmitted to the CUI  18  and act as program instructions to be executed. In the case the CUI  18  processes codes of 32 bits, as supposed in this particular example, the latch circuit  17  stores the 16 bits at the output of the matrix  11  in two following cycles, so to provide to the CUI  18  a microinstruction with a suitable number of bits. Obviously the use of microinstructions formed by any number of bits can be envisaged, providing suitable latch circuits capable of storing such codes in more subsequent cycles before transmitting them to the CUI  18  for the processing. 
     The CUI  18  processes such code and sends suitable internal address signals to the address buffers  10  and from these to the matrix  11 , that decodes them and puts on the output lines  14  a corresponding code. Such code can be transferred, through the outputs buffers  12 , to the output signals  9 , for instance to drive possible external actuators without passing through a microprocessor. In alternative, such code can be interpreted by the CUI  18  as a new microinstruction. 
     In the chart of FIG. 5 there are shown the bits used by the CUI  18  for the execution of the code, in an example in which the memory is put in active operating mode to autonomously execute a program. The single bits have the following meaning: 
     C 1 -C 4 : the first four bits are dedicated to identify the type of instruction; four bits mean sixteen possible executable instructions and these bits cannot take different meanings in the different instructions; 
     O 0 -O 15 : they are sixteen bits of the microinstruction that contain the datum to load on the sixteen outputs  9  in particular types of instruction, each output assuming the same value of the corresponding bit; 
     ck 0 -ck 11 : they represent the value, binary coded, selected for a timing; such value, multiplied for the period of the clock signal furnished by the outside, determines a wait time varying between 1 and 4096 times the period of external clock signal (for example, for a wait time equal to 4096 times such period, all the bits ck will be set to “1”); 
     r 1 -r 4 : they are the coded expression of the sixteen outputs, when it is desired to address just one of it; 
     in 0 -in 18 : they are the 19 bits of the microinstruction elaborated by the CUI  18  that, in some types of microinstruction, assume the meaning of code of comparison with the address signals  8 ′ coming from the outside of the memory; 
     S: it is a bit that allows to decide if the selected configuration is active at “1” or at “0”; 
     A 0 -A 18 : they are the 19 bits of the microinstruction that, in some types of microinstruction, assume the meaning of a new address to furnish to the memory matrix  11  to fetch the next microinstruction. 
     In the chart of FIG. 6 there is shown a possible set of instructions according to the bits of the chart of FIG. 5 (X denotes a non influential bit), and each one of the sixteen instructions has the following meaning: 
     1. It is the instruction NOP, it doesn&#39;t perform anything; 
     2. the sixteen outputs  9  are loaded with the assigned value, specified in the microinstruction, i.e., O 0 -O 15 ; 
     3. the only output correspondent to the binary value of r 1 -r 4  of the sixteen outputs  9  is loaded; 
     4. the only output correspondent to the expression of r 1 -r 4  is loaded, but only when, externally to the memory the external address signal  8 ′ corresponding to the bit that, among the bits in 0 -in 18  of the microinstruction, is set to “1”, is set to “1”; for instance if in 7 =“1”, the loading of the output  9  correspondent to the binary value of r 1 -r 4  takes only place when the eighth bit of the external address signal  8 ′ is set to “1”; if more than one among the bits in 0 -in 18  of the microinstruction result to “1”, the loading of the encoded output in r 1 -r 4  occurs only when the logical OR operator of the correspondent external address signals  8 ′ is satisfied; 
     5. this is an instruction identical to the preceding one except for the fact that the operator logical AND of the external address signals  8 ′ must be satisfied, when more bits in 0 -in 18  of the microinstruction are set to “1”; 
     6. the only output given by r 1 -r 4  is loaded when externally to the memory an address signal is set to “1” that corresponds to that, among the bits in 0 -in 11  of the microinstruction, that is set to “1”, or at the expiration of a timing set through the value specified in the bits ck 0 -ck 11  of the microinstruction (if more than one among the bits in 0 -in 11  are to “1” the OR of the correspondents address signals  8 ′ must be satisfied); 
     7. it is an instruction identical to the preceding one except for the fact that the logical AND operator of the address signals  8 ′ must be satisfied, when more bits in 0 -in 11  of the microinstruction are set to “1”; 
     8. it is an instruction of unconditional jump: the program is directed to the address given by the bits A 0 -A 18  of the microinstruction; 
     9. the program is directed to the address given by A 0 -A 18  at the arrival of a logical signal on an external pin, with S it is possible to choose if the logical signal on the external pin will be active in the low or high state; 
     10. the program is directed to the address given by A 0 -A 18  at the arrival of a logical signal on an external pin, with S it is possible to choose if the logical signal on the external pin will be active in the low or high state, or because a timing set through the bits ck 0 -ck 7  of the microinstruction has expired; 
     11. it is an instruction of wait: the program jumps to the following address at the expiring of a timing set through the bits ck 0 -ck 11 ; 
     12. as the preceding one, this one is an instruction of wait: the program jumps to the following address at the expiring of a timing set through the bits ck 0 -ck 11  or because the address signal  8 ′ indicated by the bits in 0 -in 11 , or the AND of the indicated address signals, has arrived; 
     13. a data string is sent, specified in the bits O 0 -O 15  of the microinstruction, synchronously with the clock signal, on an external pin (useful, for instance, for the connection to a display); this operation is performed independently from the following ones and, to every hit of clock, a single bit O 0 , O 1  . . . O 15  is transmitted; 
     14. the address specified by the bits A 0 -A 18  is loaded into a possible RAM register or in a battery of latches to be added to the memory; 
     15. the address defined by the bits A 0 -A 18  is fetched from the RAM register, such address becoming the following one to be executed; and 
     16. it is the END instruction, that stops the program and the Flash memory returns in the passive operating mode or points to a preset address that contains a program of wait. 
     Other codes that can result are, for example, a command that can make the Flash memory become an I/O expander so that the microprocessor uses the Flash only as a set of output buffers; another interesting command could allow the microprocessor to load the RAM register with the instructions  14  and  15 , interrupting the program of the Flash memory and subsequently making it restart from the selected address. 
     Clearly the aforesaid instructions are only an example of implementation and they do not exhaust all the possibilities necessary to make the memory work as a sequential machine, but this set of instructions could already relieve the microprocessor from performing a quantity of tasks that in some applications can be very substantial.