1. Field
This disclosure relates generally to memory systems, and more specifically, to method of operating an emulated electrically erasable (EEE) memory.
2. Related Art
Emulated electrically erasable (EEE) memories typically use a random access memory and a non-volatile memory that is electrically erasable combined to provide a memory system that has increased endurance over a regular non-volatile memory for a comparable size to that of the random access memory. This is achieved using a non-volatile memory much larger than the random access memory but EEE memory operates as if it were only the size of the random access memory. Thus the EEE memory emulates an electrically erasable memory of a reduced size from that which is used by the EEE memory but with an increase in endurance. This is useful in situations in which endurance is very important such as automotive applications in which data is updated often and must be stored in a non-volatile manner. This also useful by having smaller erasable units.
One problem common to EEE memories is that there can occasionally be long delays in being able to write data into the non-volatile memory because of too many locations in a sector in the non-volatile memory have data that is divided between valid data and invalid data. So before those locations can be written again, the sector must be erased but before the erase operation the locations with valid data must be written elsewhere. When this occurs. there may be a substantial amount of time required to perform all the necessary operations to perform the write operation. Sequential reading is time consuming as well. Also of concern in operation is that it can take significant time to identify which location in the non-volatile memory has the valid data.
Accordingly, there is a need to provide an EEE memory that improves upon the issue described above.
The present invention is illustrated by way of example and is not limited by the accompanying figures, in which like references indicate similar elements. Elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale.
In one aspect an emulated electrically erasable (EEE) memory has a RAM and an NVM divided into sectors. Using either a copy down to the RAM or an update to the NVM, sectors are identified that do not have valid data and that thus need not be accessed to determine if they have valid data. This can also be effective when the RAM, volatile memory, is a software version which would also be volatile. This is better understood by reference to the drawings and the following description.
In one embodiment, a flash array is used as the NVM. In one example, and as used herein, programming refers to storing a logic level zero to a bitcell and erasing refers to storing a logic level one to a bitcell. However, in alternate embodiments, programming may refer to storing a logic level one to a bitcell and erasing may refer to storing a logic level zero to a bitcell. A logic level zero may also be referred to as a logic low and a logic level one may also be referred to as a logic high.
As used herein, the term “bus” is used to refer to a plurality of signals or conductors which may be used to transfer one or more various types of information, such as data, addresses, control, or status. The conductors as discussed herein may be illustrated or described in reference to being a single conductor, a plurality of conductors, unidirectional conductors, or bidirectional conductors. However, different embodiments may vary the implementation of the conductors. For example, separate unidirectional conductors may be used rather than bidirectional conductors and vice versa. Also, plurality of conductors may be replaced with a single conductor that transfers multiple signals serially or in a time multiplexed manner. Likewise, single conductors carrying multiple signals may be separated out into various different conductors carrying subsets of these signals. Therefore, many options exist for transferring signals.
The terms “assert” or “set” and “negate” (or “deassert” or “clear”) are used herein when referring to the rendering of a signal, status bit, or similar apparatus into its logically true or logically false state, respectively. If the logically true state is a logic level one, the logically false state is a logic level zero. And if the logically true state is a logic level zero, the logically false state is a logic level one.
Processor 14 can be any type of processor, such as a microprocessor, digital signal processor, etc., or may be any other type of interconnect master which can access EEE memory system 18. In one form, system interconnect 12 is a system bus. Other forms of interconnect may be used including, for example, crossbars, point-to-point connections, and optical and wireless transmission techniques. Other modules 16 may include any type of module, such as, for example, another memory, another processor, another interconnect master, a peripheral, an input/output (I/O) device, etc. Alternatively, no other modules may be present in system 10.
In operation, processor 14 can send access requests (read or write access requests) to memory system 18. The access requests from processor 14, which include an access address, and, in the case of a write access, associated write data, are provided to RAM 20. In the case of a read access, RAM 20 provides processor 14 the data stored at the received access address location. In the case of a write access, RAM 20 stores the received write data at the received access address location. In the case of a write access, memory controller 22 may detect an update of RAM 20 and selectively store the received access address and associated write data to flash array 24 in a logically sequential manner. For example, in the case of an update (a write) to RAM 20, the received access address and associated write data are used to form a record that is written to flash array 24 at the next available location. This next available location is logically sequential to a location that was loaded during an immediately preceding loading of flash array 24. (Note that, referring to
Shown in
Shown in
Shown in
Thus at the beginning of the next sector, a “yes” at start of sector 208 results in recognizing that flag set question 218 is yes which results in a record being made of a newly found ORS at record location of new ORS 220. This fact is ultimately recorded in the status locations of the sector that is obsolete and the sector immediately below the obsolete sector. The status location of the obsolete sector will have added to it “skip forward,” and the immediately following sector will have its status location updated with “skip backward.” This is shown in skip forward question 216 which indicates that skip forward is to be entered. The status location has enough bits that each newly added piece of information can be achieved without erasing any of the previously added information in the status locations. Thus, updating can occur without requiring erasing and thus the status locations can be part of the flash array that has its sectors normally erased only during compression.
Then with skip forward question 216 answered in the affirmative, the address is incremented, and since it is not at the end and not at a start of a sector, the process of determining if the record is valid or not continues. As described before, when the record is valid it is copied to RAM and the flag is cleared and then the address is incremented again. When the record is not valid, the address is incremented. In this way the address is incremented and a determination is made if the record is valid for all of the records in the sector. If the record is valid, it is copied. The flag is cleared and stays cleared after the first valid record is found. When the end of the record has been reached, if the flag is still set, then that record has no valid data and the appropriate status locations are updated. In this way, each record is processed to copy its valid data and determine if it is obsolete or skipped by increment sector 217. Only records at the beginning of a sector are checked for skip forward. Ultimately, end of search 206 will determine that the search has been completed. After first determining that there is an obsolete record and having the appropriate status location updated, that record will be skipped in method 200 as long as the updated status location remains in that state by increment sector 217.
Shown in
In the case of method 300, there is no certainty as to how many, if any, full sectors will be searched, but if a complete sector is searched and if all of the records are obsolete, then that fact can be stored and used to improve efficiency of searching for future searches by skipping that sector. The discovery of an ORS during method 300 can improve the efficiency of method 200 because status locations are loaded with skip forward information as a result of method 300. Skip forward is the obsolete indicator when using method 200. Similarly, the discovery of an ORS during method 200 can improve efficiency of method 300 because status locations are loaded with skip back information as a result of method 200. Skip back is the obsolete indicator when using method 300. Status locations can contain both skip back and skip forward obsolete indicators at the same time. This would occur when adjacent sectors are both obsolete.
Methods 200 and 300 both are run using memory controller 20 and under the general capability of a memory controller and further use ORS logic 23 which has configuration not known to having been used such as sector forward/backward and ORS flag 32. These components arise because of the ability to identify sectors that are obsolete and to direct the operations between RAM 20 and flash array 24 to skip sectors of flash array 24 when they are known to not have valid records.
By now it should be appreciated that there has been provided semiconductor memory device that includes a volatile memory and a a non-volatile memory including a plurality of sectors, each of the plurality of sectors configured to store a sector status indicator and a plurality of data records. The semiconductor memory device further includes a control module coupled to the non-volatile memory and the volatile memory, the control module is operable to manage the sectors including a control module coupled to the non-volatile memory and the volatile memory, the control module is operable to manage the sectors including scan the sectors to identify the data records with invalid data, change the sector status indicator of a particular sector when all of the data records in the particular sector are invalid, and discontinue scanning the particular sector while all of the records in the particular sector are invalid. The semiconductor memory device has a further characterization by which the control module is further operable to set an obsolete indicator when starting a scan of one of the sectors to indicate that all of the data records in the one of the sectors is invalid, scan the one of the sectors for data records that are invalid, change the obsolete indicator to indicate that at least one of the data records in the one of the sectors is valid when a valid data record is found in the one of the sectors, record a location of the one of the sectors when the scan of the one of the sectors is complete and the obsolete indicator is still set to indicate all of the data records in the one of the sectors is invalid, and change the status indicator of the one of the sector based on the obsolete indicator. The semiconductor memory device has a further characterization by which the control module is further operable to, when data is received in the non-volatile memory from the volatile memory write the data in a data record that is free in one of the sectors, search the sectors for a previously received version of the data, skip searching the sectors having the status indicator that indicates all of the data records in the particular sector are invalid, and when the previously received version of the data is found, mark the previously received version of the data record as invalid. The semiconductor memory device has a further characterization by which the control module is further operable to decrement an address to scan the sectors in order from most recently filled sectors to oldest filled sectors. The semiconductor memory device has a further characterization by which the control module is further operable to when data is sent to the volatile memory from the non-volatile memory search the sectors for valid versions of data, and when the valid version of data is sent to non-volatile memory, change the obsolete indicator to indicate that the valid version of data was found in the one of the sectors. The semiconductor memory device has a further characterization by which the control module is further operable to increment an address to scan the sectors in order from oldest filled sectors to most recently filled sectors. The semiconductor memory device has a further characterization by which the processing unit is further operable to compress valid data in the non-volatile memory by copying the valid data from sectors that include invalid data into one or more sectors that include only the valid data and change the status indicator for each of the sectors that include only the invalid data.
Also described is a method for managing a semiconductor memory device, wherein the semiconductor memory device includes a volatile memory, a non-volatile memory including a plurality of sectors, each of the plurality of sectors configured to store a plurality of data records, and a control module coupled to the non-volatile memory and the volatile memory. The method further includes setting an obsolete indicator when starting a scan of one of the sectors to indicate that all data records in the one of the sectors is invalid. The method further includes scanning the one of the sectors for invalid data records. The method further includes changing the obsolete indicator to indicate that at least one of the data records in the one of the sectors is valid when a valid data record is found in the sector. The method further includes recording a location of the one of the sectors when the scan of the one of the sectors is complete and the obsolete indicator is still set to indicate all of the data records in the one of the sectors is invalid. The method may further include changing a sector status indicator of the sector based on the obsolete indicator. The method may further include, when data is received in the non-volatile memory from the volatile memory, writing the data in a data record that is free in one of the sectors, searching the sectors for a previously received version of the data, skipping searching the sectors in which data in all of the data records in the particular sector are invalid, and when the previously received version of the data is found, marking the previously received version of the data as invalid. The method may further include decrementing an address to scan the sectors in order from most recently filled sectors to oldest filled sectors. The method may further include, when data is sent to the volatile memory from the non-volatile memory, searching the sectors for valid versions of data, skipping searching the sectors in which all of the records in the particular sector are invalid, and when the valid version of data are sent to non-volatile memory, changing the obsolete indicator to indicate that the valid version of data was found in the one of the sectors. The method may further include incrementing an address to scan the sectors in order from oldest filled sectors to most recently filled sectors. The method may further include compressing valid data in the non-volatile memory by copying the valid data from sectors that include invalid data into one or more sectors that include only the valid data and changing a status indicator for each of the sectors that include only the invalid data.
Described also is a computer processing system including a volatile memory. The computer processing system further including a volatile memory. The computer processing system further including a non-volatile memory including a plurality of sectors, each of the plurality of sectors configured to store one or more data records. The computer processing system further including a control module coupled to the non-volatile memory and the volatile memory, the control module is operable to manage the sectors including search the sectors for valid versions of data, skip searching the sectors in which all of the records in the particular sector are invalid, and when the valid versions of data are sent to the non-volatile memory, change an obsolete indicator to indicate that the valid version of data was found in the one of the sectors. The computer processing system may have a further characterization by which. The computer processing system may have a further characterization by which the control module is further operable to. The computer processing system may have a further characterization by which increment an address to scan the sectors in order from oldest filled sectors to most recently filled sectors. The computer processing system may have a further characterization by which when data is received in the non-volatile memory from the volatile memory, write the data in a free record in one of the sectors, search the sectors for a previously received version of the data, skip searching the sectors in which all of the records in the particular sector are invalid, and when the previously received version of the data is found, mark the previously received version of the data as invalid. The computer processing system may have a further characterization by which wherein the control module is further operable to decrement an address to scan the sectors in order from most recently filled sectors to oldest filled sectors. The computer processing system may have a further characterization by which wherein the control module is further operable to compress valid data in the non-volatile memory by copying the valid data from sectors that include invalid data into one or more sectors that include only the valid data, and change a status indicator for each of the sectors that include only the invalid data. The computer processing system may have a further characterization by which the control module is further operable to set the obsolete indicator when starting a search of one of the sectors to indicate that all of the data in the one of the sectors is invalid, scan the one of the sectors for the invalid data, change the obsolete indicator to indicate that at least one of the data in the one of the sectors is valid when valid data is found in the one of the sectors, and record a location of the one of the sectors when the scan of the one of the sectors is complete and the obsolete indicator is still set to indicate all of the data in the one of the sectors is invalid.
Because the apparatus implementing the present invention is, for the most part, composed of electronic components and circuits known to those skilled in the art, circuit details will not be explained in any greater extent than that considered necessary as illustrated above, for the understanding and appreciation of the underlying concepts of the present invention and in order not to obfuscate or distract from the teachings of the present invention.
Some of the above embodiments, as applicable, may be implemented using a variety of different information processing systems. For example, although
Although the invention is described herein with reference to specific embodiments, various modifications and changes can be made without departing from the scope of the present invention as set forth in the claims below. For example, other features may be incorporated into the process. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present invention. Any benefits, advantages, or solutions to problems that are described herein with regard to specific embodiments are not intended to be construed as a critical, required, or essential feature or element of any or all the claims.
The term “coupled,” as used herein, is not intended to be limited to a direct coupling or a mechanical coupling.
Furthermore, the terms “a” or “an,” as used herein, are defined as one or more than one. Also, the use of introductory phrases such as “at least one” and “one or more” in the claims should not be construed to imply that the introduction of another claim element by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim element to inventions containing only one such element, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an.” The same holds true for the use of definite articles.
Unless stated otherwise, terms such as “first” and “second” are used to arbitrarily distinguish between the elements such terms describe. Thus, these terms are not necessarily intended to indicate temporal or other prioritization of such elements.