Information
-
Patent Application
-
20030182533
-
Publication Number
20030182533
-
Date Filed
February 21, 200321 years ago
-
Date Published
September 25, 200321 years ago
-
Inventors
-
Original Assignees
-
CPC
-
US Classifications
-
International Classifications
Abstract
The invention provides a protocol cycle during which a memory address and all the data bytes to be written are transmitted, and the writing process is carried out only once for all the transmitted data bytes, by writing a first byte in the memory sector corresponding to a first address generated by resetting to zero the 2 least significant bits of the transmitted address and all the other transmitted bytes in successive addresses. The method includes writing a certain number N of data bytes, in consecutive memory addresses in a memory array of a memory device, and includes unprotecting the memory sectors in which data are to be written, communicating the programming command to the memory device, communicating to the memory device the bits to be stored and specifying a relative memory address of a sector to write in, and writing the data bits in the memory.
Description
FIELD OF THE INVENTION
[0001] The present invention relates to memory devices, and, more particularly, to methods of writing a group of data bytes in a memory of a memory device and memory devices that use a Low Pin Count (LPC) protocol.
BACKGROUND OF THE INVENTION
[0002] There are many applications for memory devices capable of storing large amounts of data in a nonvolatile way, to be provided to or made accessible at a later time to a processing system. Typical examples are memory devices for PCBios applications on PCI buses, for digital cameras, electronic agendas, measurement instruments, electronic appliances of vehicles and the like. At the present time, the type of memory devices that are most used in these applications are the so-called FLASH memories.
[0003] Independently from the protocol used for writing a byte of data in a FLASH memory, the following steps are performed: a first protocol cycle for unprotecting the sector or sectors of the matrix of memory cells in which data bits are to be written; a second protocol cycle for communicating the write command to the memory; a third protocol cycle for providing the address of the memory sector to be written, and the relative data byte; and carrying out a memory write algorithm for the data byte to be stored in the memory.
[0004] Depending on the protocol used, each cycle includes distinct phases, during which address bits and data bits or bits of command codes are sent to the memory alternated with synchronization bits, but substantially the data bits are written in the memory by performing the above mentioned steps. To better explain the technical problem being addressed herein, reference will be made hereinafter to an LPC communication protocol, though the same considerations are also valid, with appropriate changes, for all the protocols in which the writing of a data byte is carried out in the above mentioned way, such as the communication protocols between memory and processor on a motherboard.
[0005]
FIG. 1 depicts a typical write cycle of LPC protocol during which an address and a relative byte to be written are input to the memory. The start phase START lasts a clock period CLK and is determined by the switching of an external command LFRAME. A phase CYCTYPE follows, which also lasts a clock period, during which it is specified whether the protocol cycle is a read (READ) or a write (WRITE) cycle, as in the shown example. During a third phase ADDR, which lasts 8 clock periods, the address bits of the sector to be written are transmitted in groups of 4 bits. Then three phases, namely: DATA, TAR and SYNC, are carried out, in a total of 5 clock periods, during which the memory receives the byte of data to be written and confirms that it has been received. Finally, with the last phase TAR, which lasts two clock periods, the memory device releases the control of the system bus that connects it to the external world.
[0006] On the whole, a write cycle of an LPC protocol lasts 17 clock periods and only one byte of data to be written is transmitted. Even an LPC protocol cycle for communicating to the memory device the codes of a command to be executed lasts 17 clock periods. Therefore, in known devices implementing an LPC protocol, for writing a certain number of bytes, it is necessary to repeat the above mentioned two cycles of protocol and the write algorithm for each data byte to be written. In practice, 34 clock periods plus the time taken for carrying out the write algorithm and unprotecting the memory sectors to be written on are necessary for each single byte.
[0007] Neglecting the time needed for unprotecting the memory sectors of interest, and supposing that a clock period last 1 μs, using a 1 Mhz programmer, and supposing that the write algorithm last 10 μs, to write a single data byte in the memory
(2*17*1+10) μs=44 μs (1)
[0008] are necessary. This write (programming) time of a single byte is relatively long. Considering that standard FLASH memory devices have usually a capacity in the order of Mbytes, programming a whole array of FLASH memory cells is a relatively long operation.
SUMMARY OF THE INVENTION
[0009] It is an object of the present invention to provide a method of writing a group of a certain number of data bytes, in a memory core of a memory device, wherein the data bytes are written at the same time and not a byte at the time.
[0010] This is made possible because the method of this invention contemplates a protocol cycle during which a memory address and all the data bytes to be written are transmitted, and the writing algorithm is carried out only once for all the transmitted data bytes, by writing a first byte in the memory sector corresponding to a first address generated by resetting to zero the 2 least significant bits of the transmitted address and all the other transmitted bytes in successive addresses. As it may be easily understood, in this way a non-negligible time saving is obtained in respect to the known methods.
[0011] More precisely, the invention is a method of writing a certain number N of data bytes, in consecutive memory addresses in a memory array of a memory device, comprising unprotecting the memory sectors in which data are to be written, carrying out a protocol cycle for communicating the programming command to the memory device, carrying out another protocol cycle for communicating to the memory device the bits to be stored and specifying a relative memory address of a sector to write in and carrying out a writing algorithm of data bits in the memory.
[0012] The method of this invention provides a faster writing operation of data in the memory because a memory address and the whole group of bytes to be written are transmitted in a single protocol cycle and the writing algorithm is carried out only once for all the data bytes of the group and comprises the operation of writing a first byte of the group in a first address generated by resetting the least significant bits of the address transmitted to the memory device, and the successive bytes in respectively consecutive memory addresses, following the first address.
[0013] A further object of the present invention is to provide a memory device using an LPC communication protocol, that implements the method of the invention for writing groups of bytes of data in a single operation instead of one byte at the time. This is made possible because in memory devices that use an LPC communication protocol, the standard memory core allows the writing of no more than four bytes of data at the time. The memory device of this invention, besides having a memory core, a storage circuit of addresses for where to write in and a data bus that transfers to the memory the bits of data to be written, also has a state machine that receives during a same cycle of the LPC protocol all the data bytes to be written, for a maximum number of four bytes, and a memory address, relative to a first data byte to be written.
[0014] Starting from the received address, the state machine generates all memory addresses in which data are to be written via an internal counter that changes the least significant address bits: the first data byte is written in an address obtained by internally resetting the 2 least significant bits of the received address, while the other bytes are written in consecutive addresses, following such a first address.
BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The different aspects and advantages of the invention will appear even more evident through a detailed description of several embodiments of the invention and by referring to the attached drawings, wherein:
[0016]
FIG. 1 illustrates a cycle of LPC protocol for transmitting a data byte according to a memory device of the prior art;
[0017]
FIG. 2 illustrates a cycle of LPC protocol for transmitting four data bytes to a memory device according to this invention;
[0018]
FIG. 3 is a block diagram of a memory device supporting an LPC transmission protocol according to this invention;
[0019]
FIG. 4 is a timing diagram of the signals in the device of FIG. 3.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] With the method of this invention, the write operation of a plurality of data bytes in the memory is performed through only two protocol cycles after having unprotected the memory sector in which to write. With a first protocol cycle, the command to be executed is communicated to the memory device, while with the second protocol cycle all the data bytes to be written and a memory address are transmitted. The addresses of the sector in which to write are generated internally starting from the address that has been transmitted with the second protocol cycle. Finally the writing algorithm is carried out for all the bytes in a single operation. In this way, a plurality of bytes is written with only two cycles of the protocol, thus achieving a non-negligible time saving.
[0021] In the ensuing specification, the method of this invention will be described by referring to its implementation in a memory device destined to be used with an LPC (Low Pin Count) protocol. Given that in the considered memory devices that uses LPC communication protocols it is possible to write up to 32 bits with a single writing algorithm, hereinafter reference will be made to the case in which a group of four bytes at the time are to be written. Clearly, the method may be implemented also for groups of a different number N of bytes in devices that allow writing of 8*N bits at the time with a single writing algorithm.
[0022] A example timing diagram for a cycle of an LPC protocol in which the address bits and four data bytes are transmitted is shown in FIG. 2. The shown sample cycle differs from that of FIG. 1 because the phase DATA lasts longer, 8 clock periods, and in it four data bytes are transmitted.
[0023] A block diagram of the LPC memory device of the invention is depicted in FIG. 3. It comprises a standard memory, formed by a single array of cells or more commonly by a number of array sectors, MATRIX, by row decoders ROW_DEC and column decoders, COL_DEC, by a programming circuit of the memory cells, PROGRAM_LOAD, and by a command interface, CUI, generating a load data pulse, LOAD DATA. Moreover, there are a multiplexing circuit DATAL_IO that sends to the memory the data bytes to be written and an address storage circuit ADDRESS_COUNTER of the sector of the array in which to write.
[0024] Differently from known memory devices, the device of the invention comprises a state machine STATE_MACHINE that is suitably designed for reading, during the same LPC protocol cycle, four bytes of data to be written and the bits of the transmitted address in which to write a first byte of data, and for generating from the transmitted address four consecutive memory addresses in which to store the four bytes of data. The first address to be internally generated by the state machine is obtained by resetting the 2 least significant bits of the transmitted address during the protocol cycle, while the other three addresses are successive to the first generated address.
[0025] It is essential to reset the 2 least significant bits of the transmitted address by the LPC protocol, otherwise the information on the internally generated successive memory addresses would be lost. The address and data bits are received by the memory device through the input bus DQ_PAD<3:0>. An input buffer PCI_BUFFER, designed to satisfy the PCI specifications (Peripherals Component Interconnect), replicates on a first internal bus DQ_INT<3:0> the read bits.
[0026] The state machine STATE_MACHINE is coupled to the bus DQ_INT<3:0> and receives an externally generated clock signal CLK. It reads the data and the address bits and provides the data bits to the multiplexing circuit DATAL_IO, through a second internal bus DATAL<15:0>, in groups of four bits at the time with a respective synchronization command BANK<7:0> for each group. These groups of bits are sent per bytes to the standard memory, through the data bus DBUS<15:0> when the respective synchronization commands are received by the circuit DATAL_IO and when a write enable command WE generated by the state machine is active.
[0027] In addition, the state machine generates the three other consecutive memory addresses from the read address, after having reset to zero the 2 least significant bits of the read address, via an internal counter that updates sequentially the least significant address bits. In this way the state machine sends in succession to the address storage circuit ADDRESS_COUNTER through the bus ADDLATCHED<31:0>, the addresses in which to write the data bytes present on the data bus DBUS<15:0>. When the state machine generates the write enable command WE, the command interface CUI generates a data load pulse LOAD_DATA in synchronization with it, making the byte available on the data bus DBUS<15:0> be loaded in the circuit PROGRAM_LOAD.
[0028] A particularly convenient mode of realizing the state machine of the memory device of the invention is depicted in FIG. 3. An interface BUS_MANAGER coupled to the internal bus DQ_INT<3:0> produces on the second internal bus DATAL<15:0> data bytes to be written in the memory when it receives the write enabling command WE. This interface BUS_MANAGER sends the address bits to an address generation circuit ADDLATCH, and the data bits on a bus DQ<3:0>. The address generation circuit ADDLATCH, which comprises the above mentioned counter, sends on the bus ADDLATCHED<31:0> all the memory addresses in which the data bytes are to be respectively written when it receives the load data pulse LOAD_DATA.
[0029] A synchronization circuit DQ_MUX comprises an array of latches organized in banks of four latches, receiving bits of data to be written through the bus DQ<3:0>, and a control circuit of these latches. Each bank of latches transfers to the interface BUS_MANAGER the data bits in groups of four, through a second data bus DQ_LATCHED<15:0>, when a respective synchronization command BANK<7:0> is received. The synchronization commands BANK<7:0> are generated by the control circuit that generates also the write enabling command WE.
[0030] To better illustrate the functioning of the state machine, reference will be made to the particular case in which the array of latches is composed of 16 latches. Given that the number of data bits to be written for a group of four bytes of information is 32, as the data bits are received by the circuit DQ_MUX they are immediately transferred on the bus DQ_LATCHED<15:0> in groups of four bits. So, after two clock pulses, the first data byte is present on the bus DQ_LATCHED<7:0> and, after 2 other clock pulses, the second byte is transferred on the bus DQ_LATCHED<15:8> while the first byte has been already transferred on the data bus DBUS<7:0>. The lines DQ_LATCHED<7:0> receive the third byte while the lines DQ_LATCHED<15:8> still contain the second byte, that is successively transferred on the bus DBUS<7:0>. Finally, during the successive 2 clock pulses, the fourth byte of data is loaded on the lines DQ_LATCHED<15:8> while the third byte is transferred on the bus DBUS<15:8>. In this way, while a data byte to be written is transferred on the data bus DBUS<15:0>, the successive data byte is transferred on the bus DQ_LATCHED<15:0> so not to slow down the transfer of bytes to the circuit PROGRAM_LOAD.
[0031]
FIG. 4 represents a timing diagram of the main signals of the circuit of FIG. 3. As the bits read from the bus DQ_PAD<3:0> are acquired by the synchronization circuit DQ_MUX, it generates a respective synchronization command BANK and sends each group of four bits, indicated by a letter or a number of the exadecimal code, on the bus DQ_LATCHED<15:0>. When the interface BUS_MANAGER has received a first byte of data “5a”, the synchronization circuit switches the logic inverted replica WEN of the write command WE, thus transferring the first data byte “5a” on the second internal bus DATAL<15:0> and from there on the data bus DBUS<15:0>.
[0032] The successive group of four bits “b” is placed on the bus DQ_LATCHED<15:0> while the signal WEN is still active, therefore it is immediately transferred on the bus DATAL<15:0>. On the leading edge of the signal WEN, the command interface CUI generates a load data pulse LOAD_DATA and allows the byte “5a” to be loaded in the circuit PROGRAM_LOAD. The content of the circuit PROGRAM_LOAD is depicted in FIG. 4 with the label TO_BE_PROG<31:0>. As it may be clearly noticed, the bits to be written in the memory are loaded in the circuit PROGRAM_LOAD in a negated form.
[0033] When the successive group of four bits “2” is transferred on the bus DQ_LATCHED<15:0>, the signal WEN is high and thus it is necessary to wait for this signal to switch so that it may be transferred on the bus DATAL<15:0>. Once that the byte “2b” is stored in the array of latches DATAL_IO, it is made available on the data bus DBUS<15:0>. When the pulse LOAD_DATA is received, the byte “2b” is finally loaded in the circuit PROGRAM_LOAD, and so on for the other bytes. Meanwhile, the state machine provides on the bus ADDLATCHED<20:0> the address relating to the first data byte, generated by resetting to zero the least significant bits of the received address with the LPC cycle of FIG. 2, and the other consecutive addresses. When all four bytes to be written are loaded in the circuit PROGRAM_LOAD, the writing algorithm of the bytes in the memory cells is started by switching an appropriate signal PROG_COMM, as depicted in FIG. 3.
[0034] On the whole, by neglecting the operation of unprotection, the sample memory device of the invention that has been considered needs 17 clock pulses for the first LPC cycle, during which are transmitted the codes of the write command, 23 clock periods for the second LPC cycle, during which four data bytes are transmitted, plus 10 μs for carrying out the single write algorithm. Supposing that a clock period lasts 1 μs, for writing four bytes:
(17+23+10) μs=50 μs (2)
[0035] are necessary.
[0036] To quantify the advantages obtained by this invention, let us consider the case in which it is necessary to program a whole matrix of memory cells of a 2 Mbytes FLASH memory with a 1 MHz programmer, that is having a clock whose period is 1 μs. By neglecting the time required by the unprotection phase, in a known memory device implementing the LPC protocol, the time required would be:
(2·106·44) μs=88s (3)
[0037] By contrast, with the device of the invention, the time required will be:
1
[0038] In practice, the time required for programming a matrix of memory cells of 2 Mbytes is been reduced of about 70% in respect to the time required by an equivalent known memory device using an LPC communication protocol.
Claims
- 1. A method of writing a group composed of a certain number (N) of data bytes in a standard memory contained in a memory device, comprising the steps of
carrying out a first protocol cycle for unprotecting a memory sector of said standard memory in which to write said data, carrying out a second protocol cycle for communicating a programming command to the memory device, carrying out a third protocol cycle for transmitting to the memory device the whole group of bytes to be written, and a memory address, carrying out a writing algorithm of (8*N) data bits in said standard memory, said writing algorithm being carried out only once for said (N) data bytes and comprises writing a first byte of said group in a first address internally generated by resetting to zero the two least significant bits of said transmitted address and the successive bytes respectively in memory addresses consecutive to said first internally generated address.
- 2. The method of claim 1, wherein said group is constituted by a number (N) of bytes not greater than four.
- 3. A memory device using an LPC communication protocol and implementing the method of claim 2, comprising
a standard memory (PROGRAM_LOAD, COL_DEC, ROW_DEC, CUI, MATRIX) receiving data, through a data bus (DBUS), to be written in the memory when a load data pulse (LOAD_DATA) is received and respective addresses through an address bus (ADD), and having a command interface (CUI) receiving a write enable command (WE) and generating in synchrony with it a load data pulse (LOAD_DATA), an input buffer (PCI_BUFFER) receiving bits of said data to be written in the memory and address bits through an input bus (DQ_PAD) and providing said bits on a first internal bus (DQ_INT), a state machine (STATE_MACHINE) coupled to said first internal bus (DQ_INT), generating, when said load data pulse (LOAD_DATA) is received, memory addresses in which to write bytes of said data, a write enable command (WE), synchronization commands (BANK) and producing on the second internal bus (DATAL) bytes of data to be written in the memory, a multiplexing circuit (DATAL_IO) for transferring bytes of said data from said second internal bus (DATAL) to said data bus (DBUS), when respective synchronization commands (BANK) are received and when said write enable command (WE) is active, an address storage circuit (ADDRESS_COUNTER) of memory addresses generated by said state machine (STATE_MACHINE), transferring said addresses on said address bus (ADD), said state machine (STATE_MACHINE) generating a first address to write a first byte in by resetting to zero the two least significant bits of the address received through said first internal bus (DQ_INT) and comprising a sequential increment counter of the least significant bits of the address starting from zero, incremented by said load data pulse (LOAD_DATA), in order to generates consecutive memory addresses in which to write said bytes of data starting from said first generated address.
- 4. The device of claim 3, wherein said state machine (STATE_MACHINE) comprises an interface (BUS_MANAGER) coupled with said internal bus (DQ_INT), producing on said second internal bus (DATAL) bytes of data to be written in the memory when it receives said write enable command (WE),
an address generating circuit (ADDLATCH) comprising said counter, receiving addresses from said interface (BUS_MANAGER) and generating memory addresses where to access when it receives said load data pulse (LOAD_DATA), a synchronization circuit (DQ_MUX) having an array of latches organized in banks of four latches each, each bank receiving from said interface (BUS_MANAGER) bits of said data to be written and providing to said interface, through a second data bus (DQ_LATCHED), said bits of data in groups of four bits when a respective synchronization command (BANK) is received, a control circuit of said array of latches generating said write enable command (WE) and generating said synchronization command (BANK) for each group of bits.
- 5. The device of claim 4, characterized in that said command interface (CUI) generates said load data pulse (LOAD_DATA) for a byte of data to be written in a certain address, while said synchronization circuit (DQ_MUX) transfers on said second data bus (DQ_LATCHED) the byte of data to be written in the successive address.
- 6. The device of claim 5, wherein said synchronization circuit (DQ_MUX) comprises an array of 16 latches.
Priority Claims (1)
Number |
Date |
Country |
Kind |
VA2002A000016 |
Feb 2002 |
IT |
|