Patrol scrubbing cycle for data storage circuitry

By using age indication and error check code management in the data storage circuit without a check cycle, the problem of high error check costs in the patrol scrubbing cycle is solved, and storage efficiency and energy saving are improved.

CN118626306APending Publication Date: 2024-09-10ARM LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410213985.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-09
Filing Date
2024-02-27
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

When existing data storage circuits perform error checking in the patrol scrubbing cycle, the energy cost is high, and due to the limited retention time, the probability of data loss increases over time, affecting storage efficiency.

Method used

By introducing the age indication and error check code into the data storage circuit, it is determined whether the entry has entered the verification-free cycle. If it has entered, error checking is omitted. If it has not entered, the age indication is updated and the verification-free cycle is restarted. Reduce the number of error checks in patrol scrubbing cycles.

Benefits of technology

It effectively reduces the average power consumption in the patrol scrubbing cycle and improves the storage efficiency of the data storage circuit. It is especially suitable for cache scenarios, reducing the number of error checks and reducing energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626306A
    Figure CN118626306A
Patent Text Reader

Abstract

The data storage circuitry has entries to store data in accordance with a data storage technique that supports non-destructive reading, each entry being associated with an error check code (ECC) and an age indication. The scrubbing circuitry performs a patrol scrubbing cycle to visit each entry of the data storage circuitry within a scrubbing cycle. At a given visit to a given entry, a scrubbing operation includes determining, based on the age indication associated with the given entry, whether a check-free period for the given entry has elapsed, and if so, error checking the data for the given entry using the ECC for the entry. And if the check-free period is not passed, the error check is omitted. The check-free period of a write target entry is restarted in response to a request to update the data of the write target entry and the error check code. The check-free period of reading a target entry is restarted in response to a request to cause the data reading the target entry to be non-destructively read and subjected to the error check.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present technology relates to the field of data storage. Background Art

[0002] A data processing system may have one or more instances of a data storage circuit for storing data (e.g., each instance of the data storage circuit may be used as a cache within the data processing system or as a random access memory). Such a data storage circuit may use one of a variety of different data storage technologies. Examples of data storage technologies include static random access memory (SRAM), dynamic random access memory (DRAM), magnetoresistive random access memory (MRAM), phase change random access memory (PRAM), etc. The choice of which memory storage technology to use for a given data storage unit may depend on the design goals of the unit, as each memory storage technology may have advantages and disadvantages in terms of performance parameters such as access latency, dynamic energy cost of accessing data stored in the data storage circuit, static energy cost incurred even when data stored in the data storage circuit is not accessed, and retention time that data can be retained. Even within the same data storage technology, the physical design parameters of the data storage circuit may be adjusted to change these performance parameters. Summary of the invention

[0003] At least some examples provide an apparatus comprising:

[0004] data storage circuitry including a plurality of entries to store data according to a data storage technique that supports non-destructive reading of data capable of being stored in the plurality of entries, each entry being associated with an error checking code and an age indication;

[0005] access control circuitry for controlling access to the data storage circuitry; and

[0006] A scrubbing circuit for performing a patrol scrubbing cycle to visit each entry of the data storage circuit within a scrubbing cycle, wherein at a given visit to a given entry, the

[0007] The scrubbing circuit is configured to perform a scrubbing operation, including:

[0008] determining whether a check-free period for the given entry has elapsed based on the age indication associated with the given entry;

[0009] In response to determining that the no-check period for the given entry has elapsed, error-checking the data of the given entry using the error-checking code associated with the given entry; and

[0010] In response to determining that the no-check cycle for the given entry has not passed, omitting the error check for the given access to the given entry; wherein:

[0011] In response to a request to update the data and the error check code of the write target entry of the data storage circuit, the access control circuit is configured to update the age indication associated with the write target entry to restart the non-verification cycle of the write target entry; and in response to a request to cause the data of the read target entry to be non-destructively read and subjected to the error check, at least when it is determined based on the error check code of the read target entry that the data of the read target entry is error-free, the access control circuit is configured to update the age indication associated with the read target entry to restart the non-verification cycle of the read target entry.

[0012] At least some examples provide a non-transitory storage medium storing computer readable code for manufacture of an apparatus, the non-transitory storage medium comprising:

[0013] data storage circuitry including a plurality of entries to store data according to a data storage technique that supports non-destructive reading of data capable of being stored in the plurality of entries, each entry being associated with an error checking code and an age indication;

[0014] access control circuitry for controlling access to the data storage circuitry; and

[0015] A scrubbing circuit for performing a patrol scrubbing cycle to visit each entry of the data storage circuit within a scrubbing cycle, wherein at a given visit to a given entry, the

[0016] The scrubbing circuit is configured to perform a scrubbing operation, including:

[0017] determining whether a no-check period has elapsed based on the age indication associated with the given entry;

[0018] In response to determining that the no-check period for the given entry has elapsed, error-checking the data of the given entry using the error-checking code associated with the given entry; and

[0019] In response to determining that the no-check cycle for the given entry has not passed, omitting the error check for the given access to the given entry; wherein:

[0020] In response to a request to update the data and the error check code of a write target entry of the data storage circuit, the access control circuit is configured to update the age indication associated with the write target entry to restart the no-check cycle of the write target entry; and

[0021] In response to a request to cause the data of the read target entry to be non-destructively read and subjected to the error check, at least when the data of the read target entry is determined to be error-free based on the error check code of the read target entry, the access control circuit is configured to update the age indication associated with the read target entry to restart the non-checking cycle of the read target entry.

[0022] At least some examples provide a method comprising:

[0023] storing data in a plurality of entries capable of being stored in a data storage circuit according to a data storage technique that supports non-destructive reading of data in the plurality of entries, each entry being associated with an error checking code and an age indication;

[0024] A patrol scrubbing cycle is performed to visit each entry of the data storage circuit within a scrubbing cycle, wherein a scrubbing operation is performed at a given visit to a given entry, including:

[0025] determining whether a no-check period has elapsed based on the age indication associated with the given entry;

[0026] In response to determining that the no-check period for the given entry has elapsed, error-checking the data of the given entry using the error-checking code associated with the given entry; and

[0027] In response to determining that the no-check cycle for the given entry has not passed, omitting the error check for the given access to the given entry;

[0028] In response to a request to update the data and the error check code of a write target entry of the data storage circuit, updating the age indication associated with the write target entry to restart the no-check cycle of the write target entry; and

[0029] In response to a request to cause the data of the read target entry to be non-destructively read and subjected to the error check, at least when it is determined based on the error check code of the read target entry that the data of the read target entry is error-free, the age indication associated with the read target entry is updated to restart the non-check cycle of the read target entry.

[0030] Further aspects, features and advantages of the present technology will be apparent from the following description of examples read in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 An example of a device having a data storage circuit, an access control circuit, and a scrubbing circuit is illustrated;

[0032] Figure 2 Examples of cache and memory devices within a data processing system are illustrated;

[0033] Figure 3 An example of performing a patrol scrubbing cycle is illustrated, wherein when visiting a given entry in the patrol scrubbing cycle, the scrubbing operation includes determining whether to perform or omit error checking for the entry based on an error checking code based on an age indication associated with the given entry;

[0034] Figure 4 A method is illustrated in which the age indication is implemented as an epoch-based coarse time indication;

[0035] Figure 5 A method for determining whether error checking should be performed on a current visit to a given entry during a patrol scrubbing cycle based on a current time indication and an age indication of the given entry is illustrated;

[0036] Figure 6 A method of processing a request to update data in a write target entry of a data storage circuit is illustrated;

[0037] Figure 7 A method of processing a request to read data from a target entry of a data storage circuit is illustrated; and

[0038] Figure 8 A method of performing a patrol scrubbing cycle is illustrated. DETAILED DESCRIPTION

[0039] An apparatus has data storage circuitry including two or more entries to store data. The term "data" is used in a general sense to refer to any information that is stored, and thus "data" may include functional data (e.g., operands for an instruction, or results of a previously executed instruction), instructions, and / or control information (such as tag information or coherence status information associated with a cache entry). Access control circuitry is provided to control access to the data storage circuitry, for example in response to read and write requests.

[0040] For some instances of data storage circuitry, a data storage technology for the data storage circuitry and physical design parameters for a specific instance of the data storage technology may be such that the retention time may be limited such that data stored in a given entry of the data storage circuitry is at risk of being lost within a time frame in which the data may need to be read on demand. While limited retention time may seem like a disadvantage, in practice, design parameters for data storage circuitry may be selected to trade off a number of different properties, and for some use cases, an implementation that provides a shorter retention time may be preferred over an implementation that has a longer retention time, for example, because an implementation that provides a shorter retention time may provide other advantages, such as reduced active energy costs when reading / writing, and / or reduced read or write latency.

[0041] A scrubbing circuit may be provided to perform a patrol scrubbing cycle to visit each entry of the data storage circuit within a scrubbing period. Upon visiting a given entry, a scrubbing operation is performed. The scrubbing operation may include error checking the data of the given entry based on an error checking code associated with the entry. By providing a scrubbing circuit that supports periodic error checking of entries using an error checking code, this allows a data storage design that tolerates shorter retention times.

[0042] However, performing error checking during a scrubbing operation incurs an energy cost due to the power consumed in reading data and error checking codes from a given entry and processing the data and the error checking codes to determine whether the data is erroneous. In order to reduce the error cost of a patrol scrubbing cycle, the scrubbing operation includes checking an age indication associated with a given entry to determine whether a no-check period has elapsed. If the age indication indicates that a no-check period for the given entry has elapsed, the scrubbing operation includes error checking the data for the given entry using the error checking codes associated with the given entry. However, if the age indication for the given entry indicates that a no-check period for the given entry has not elapsed, error checking may be omitted in the current visit to the given entry.

[0043] In response to a request to update data and error checking codes of a write target entry of the data storage circuit, the access control circuit updates an age indication associated with the write target entry to restart a no-check cycle for the write target entry. The request to update the data and error checking codes may be, for example, a write request from a request source (e.g., a CPU or other processing element) requesting a write to a given entry of the data storage circuit, but may also be other forms of requests that may update data in the data storage circuit, such as a cache line fill operation that updates an entry with data read from a memory after an earlier cache miss, or a snoop response message that updates coherence state information stored in a given entry. Since the update in response to such a request causes the data and error checking codes of the write target entry to be refreshed to a known correct initial state, the probability that the data and error checking codes are damaged due to retention loss in a subsequent period may be relatively low, and therefore, by restarting the no-check cycle after the update of the data and error checking codes, the power cost of error checking the entry may be avoided if the next visit to the entry in a patrol scrubbing cycle occurs within the no-check cycle.

[0044] It may be assumed that the age indication of a particular entry of the data storage circuit should be updated to restart the no-check cycle only in response to a write request or other request that actually updates the data and error checking code of that entry. In a data storage circuit implementing a data storage technique in which reading of data stored in the data storage circuit can be performed non-destructively (without modifying the state of the entry being read) so that the data being read does not need to be refreshed after the read, it will be assumed that the no-check cycle should not be restarted on a non-destructive read when the read does not cause the state of the data to change and does not refresh the contents of the entry being read, and when the probability that an error has occurred due to retention loss at any time since the last update increases with time since the last update of the data of the entry.

[0045] However, unexpectedly, the inventors have realised that it may be beneficial to restart the non-checking cycle for a particular entry in response to a read of that entry, at least where an error check performed on that read has found no errors in the stored data. This is because there is a data storage technique where the retention failure mechanism makes the retention failure based on a randomly occurring event (such as thermal noise), so the probability of an error occurring at a given moment may be substantially independent of the length of time between the last update of the data and that given moment. Although the probability of an error occurring at any time in the period since the last write will still increase with the duration of that period (due to the greater number of moments during that period when random errors may occur), if it has been determined (based on the error checking code) that there are no errors in the data being read at the time of the read target entry, then the probability of any error occurring in the period between the last update of the data and the time when the read / error check was performed has been found to be zero. Therefore, the period between the last update of the data and the current moment is irrelevant to determining the probability of any error occurring, and therefore the period relevant to assessing the probability of future errors is restarted at the read / error check. The probability of an error occurring in a future period of a given duration following a read / error check may be substantially similar to the probability of a retention failure in a period of the same given duration immediately following a previous update of the data in the entry. Thus, similar to restarting a no-check cycle for a write or other update of data written to a target entry, restarting a no-check cycle for a read of a target entry may be appropriate.

[0046] Therefore, in response to a request to cause the data of the read target entry to be non-destructively read and subjected to error checking, at least when it is determined based on the error checking code of the read target entry that the data of the read target entry is error-free, the access control circuit is configured to update the age indication associated with the read target entry to restart the no-check cycle of the read target entry. By supporting the restart of the no-check cycle of not only the write target entry but also the read target entry, this increases the probability that the no-check cycle of the given entry has not been passed at a given visit to the given entry during the patrol scrubbing cycle, so that the average power consumption on the scrubbing cycle can be reduced because it is more likely that more scrubbing error checks can be omitted.

[0047] The technology is particularly useful in the case where the data storage circuit is a cache. For example, the cache may be a level 1 cache, a level 2 cache, or another cache in a data processing system. In a specific example, the cache may be a last level cache (e.g., a system cache shared between multiple requesting devices), which is a final level cache before a backing store provided by a main random access memory. The technology of resetting the cache entry without a check cycle when both the entry is read and written may be particularly useful in the case of a cache, because for a cache, it is expected that the replacement policy implemented by the cache is likely to distribute read / write accesses across the cached entries (because less frequently accessed entries are preferentially replaced compared to more frequently accessed entries), and therefore, compared to a main random access memory that acts as a backing store (in the case of a backing store, some entries may be accessed very infrequently), it is less likely that any given entry of the cache will not encounter any demand request that causes an update of the data of the entry or a read of the data of the entry within a given period. Thus, the portion of entries that may be omitted from error checking during patrol scrubbing cycles may be much larger in the case of a cache than in the case of a random access memory acting as a backing store. Thus, a cache may achieve greater power savings than the power savings of a backing store memory, and thus this technique may be particularly useful in the case of a cache.

[0048] More specifically, the technique is particularly useful in the case where the cache is a last level cache that serves as a final level cache prior to a backing store provided by main memory. For example, if there is a cache miss in the last level cache, a line fill request to allocate data to the cache will be serviced based on obtaining the data from the backing store memory without any possibility of the line fill being serviced by an intermediate cache. Data storage techniques that enable non-destructive reads but may be subject to limited retention times are more likely to be used for the last level cache than for caches closer to the CPU or other processing elements (such as level 1 or level 2 caches) because these data storage techniques may typically have access latencies that are, that is, too slow to be used as a level 1 cache. For the last level cache, slower access latencies can be tolerated, and therefore it may be useful to use data storage techniques that achieve lower access energy costs or lower leakage power at the expense of limited retention times. For such storage technology, the scrubbing circuit described above that skips error checking when an age indication indicates that a check-free cycle has passed and the access control circuit that updates the age indication as described above to restart reading target entries and writing target entries without a check-free cycle may be particularly useful for reducing the energy cost of scrubbing while tolerating reduced retention times.

[0049] The data storage circuit may include a first set of storage circuit locations for storing at least data and error checking codes for each entry according to a first data storage technology, for which the loss of stored data due to retention failure is a stochastic (random) process. For example, the loss of retention of a stored state in a storage cell according to the first data storage technology may be a stochastic occurrence event that depends on a stochastic physical phenomenon, such as, for example, thermal noise. The probability that a given entry of the data storage circuit loses its state in a period starting from a write time at which the entry is written to a given future time after the write time will increase as the duration between the write time and the given future time increases. However, it has been recognized that for data storage technologies with stochastic retention failure mechanisms, although the total probability of loss of retention of a stored state at any time during a time window increases as the duration of the time window increases, due to the stochastic nature of the failure event, the probability of loss of retention of a stored state in a given entry during a time window of a fixed length (e.g., 1 ns) may be substantially equal, regardless of the length of time between the most recent write to the entry and the start of the fixed length time window. This is different from memory technologies with leakage-based retention failure mechanisms, such as dynamic random access memory (DRAM), where retention failures are deterministic because charge continuously leaks from memory cells over time, making the probability of failure in a fixed length period greater when the fixed length period occurs a longer period of time after the most recent write than when the fixed length period occurs a shorter period of time after the most recent write, and therefore, restarting the no-verify cycle in response to a read request would be inappropriate. Therefore, for memory technologies with random retention failure mechanisms, it may be useful to restart the no-verify cycle not only for writing target entries but also for reading target entries to achieve greater power savings in the scrubbing cycle as described above.

[0050] In one specific example, the first data storage technology includes MRAM (magnetoresistive random access memory) storage technology, which is a form of data storage technology that uses the magnetoresistive effect (the dependence of the resistance of a storage cell on the relative orientation of the magnetization of a ferromagnetic material layer) to detect a stored binary state. For example, whether the magnetizations of two ferromagnetic material layers are parallel or anti-parallel can be used to represent binary states 0 and 1, respectively (or vice versa). An MRAM cell may have a higher resistance in an anti-parallel state than in a parallel state, which resistance can be detected to read the state of the cell. More specifically, the first data storage technology may be a spin transfer torque magnetoresistive random access memory (STT-MRAM), which is a form of MRAM that uses a spin-polarized current to program the state of the MRAM. MRAM, and in particular STT-MRAM, is increasingly attractive for use as a last level cache in data processing systems (e.g., replacing static random access memory (SRAM) that might otherwise be used for caching) due to its lower leakage power and higher density (reduced circuit area for a given amount of stored data), but this comes at the expense of longer write latency and higher dynamic write energy. The dynamic write energy cost can be reduced by selecting physical design parameters for the MRAM instance that trade off write energy cost with retention time (e.g., reducing the size of the energy barrier that must be overcome for state switching between parallel / antiparallel magnetization states can reduce dynamic write energy cost but also reduce retention time). Therefore, in order to support lower dynamic write energy cost, it may be desirable to design the system by providing the scrubbing circuit described above so that lower retention of MRAM storage can be tolerated. However, scrubbing error checking itself incurs an energy cost that may be high in the case where only writes are restartable without a verify cycle and reads are not restartable without a verify cycle. Therefore, the above-described technique which also allows restarting entries on read without a verify cycle may be particularly useful when the data storage circuit is based on MRAM storage technology.

[0051] In some examples, the storage circuit location used to store the age indication for a given entry can be designed according to the same storage cell design as the storage circuit location used to store the data or error checking code for the given entry. For example, the cells used to store the data, error checking code, and age indication can all use the same data storage technology and, within the limits of manufacturing tolerances, use the same physical cell design parameters (e.g., the dimensions and materials of the components of the cell are the same).

[0052] However, since the age indication may need to be read on each visit to a given entry during a patrol scrubbing cycle (to determine whether a no-check cycle has passed), and the data and error checking code do not need to be read for visits that have not passed a no-check cycle, it may be beneficial to store the age indication in a second set of storage circuit locations that have reduced access latency and / or reduced read access energy cost compared to the first set of storage circuit locations that store at least the data and error checking code. This may help improve the performance and / or energy efficiency of performing patrol scrubbing cycles.

[0053] Reduced access latency and / or reduced read access energy cost of the second set of storage circuit locations may be provided in different ways.

[0054] In one example, the first group of storage circuit locations and the second group of storage circuit locations use the same data storage technology but have different physical design parameters. The different design parameters may provide different performance parameters for the first group of storage circuit locations / the second group of storage circuit locations, such as differences in retention time, access latency, and / or read / write access energy cost. For example, the first group of storage circuit locations and the second group of storage circuit locations may both use MRAM data storage technology, but the physical parameters of the storage cells (e.g., the size of the layers of the MRAM storage cells, the materials used, etc.) may be different for the first group of storage circuit locations used for data and error correction codes compared to the second group of storage circuit locations used for age indication. For example, an MRAM variant with a longer retention time may be used for age indication (compared to an MRAM variant with a shorter retention time for data and error correction codes), which may help reduce the chance of errors in the age indication due to retention loss and / or reduce the write energy cost of updating the age indication in response to each update / read request.

[0055] In another example, the second set of storage circuit locations may use a second data storage technology that is different than the first data storage technology used for the first set of storage circuit locations.

[0056] For example, the first data storage technology may be MRAM and the second data storage technology may be SRAM (static random access memory). Implementing the storage circuit location for the age indication in the SRAM may help reduce the access time and read access energy for checking the age indication (which may be performed at each visit to the entry during a patrol scrubbing cycle), but since the age indication may have relatively few bits compared to the data and error correction code, this does not significantly reduce the leakage and density advantages of implementing the storage circuit location for storing data and error correction code in MRAM instead of SRAM. Therefore, the combination of MRAM for data and error correction code and SRAM for age indication may provide a better balance between performance, read energy cost, leakage power, and storage density.

[0057] The error checking code can be implemented in different ways. In some examples, the error checking code can be an error detection code (EDC), which supports detecting errors in the stored data but does not support the ability to correct errors based on the error detection code to restore the original value of the erroneous data. Alternatively, the error checking code can be an error correction code (ECC), which not only supports detecting errors in the stored data, but also supports determining the correct error-free value from the combination of the stored data and the error correction code. Any error detection or correction scheme can be used to generate the error checking code, which includes, for example, a hash function (such as a cyclic redundancy check or a cryptographic hash function), a checksum or any other form of error checking process, ECC (error correction code), DED (double error detection code) and SECDED (single error correction double error detection) code.

[0058] In some examples, in response to a request to cause the data of the read target entry to be read non-destructively, updating the age indication to restart the no-check cycle can be conditional on determining that the data of the read target entry is error-free based on the error check code of the read target entry. In this case, if the data of the read target entry is determined to be erroneous based on the error check code, the age indication of the read target entry will not be reset to restart the no-check cycle. This may reflect that if the error check code has been used to detect that an error has occurred, the following assumption will not be valid: for a storage unit with a random retention failure mechanism, the probability of an error in an upcoming period equal to the duration of the no-check cycle is similar to the probability of an error in an initial no-check cycle after a previous write.

[0059] However, in other examples, even if the error check based on the error check code finds that the data of the read target entry is wrong, the age indication can be updated in response to the request to read the data of the read target entry non-destructively to restart the no-check cycle. This is still acceptable, depending on the specific response performed when the error check identifies that the data is wrong. For example, if the error handling response causes the error to be corrected and the erroneous data to be rewritten in a correct state, or the error handling response causes the entry with the erroneous data to be marked as erroneous so that it will not be used for any subsequent operation under any circumstances, then even if the data is not determined to be error-free, it is still acceptable to update the age indication to restart the no-check cycle. If the age indication is updated in response to the request to read the data, it is not necessary to be conditioned on the result of the error check that the data is error-free, then the specific implementation of the control logic for updating the age indication to restart the no-check cycle can be simpler and / or provide better timing performance.

[0060] Therefore, while updating the age indication to restart the no-check cycle may occur at least when the data of the read target entry is determined to be error-free, it is not necessary to prevent the update from being performed if the data of the read target entry is determined to be erroneous in the error check performed in response to the read request.

[0061] The age indication may indicate in different ways whether a no-check period is still pending. In one example, the age indication may be reset to an initial value (such as zero) when a no-check period needs to be restarted. Periodic updates may be performed to increment the age indication of each entry of the data storage device. Determining whether a no-check period has passed may be based on whether the age indication of a given entry has exceeded a threshold.

[0062] However, a more efficient approach may be to use a timer to provide a current time indication, and when a no-check period for an entry of the data storage circuit is restarted, the access control circuit updates the age indication of the entry to specify the current time indication provided by the timer. In this case, determining whether a no-check period for a given entry has elapsed may be based on a comparison of the age indication of the given entry with the current time indication provided by the timer. This approach allows the age indication initially written to a given entry when a no-check period is restarted to remain unchanged thereafter (at least until another opportunity when a no-check period needs to be restarted). By allowing the age indication of a given entry to remain static and using a separate timer value to track the passage of time, fewer writes to the age indication are required, thereby saving energy.

[0063] In some examples, the current time indication is a coarse time indication that includes at least one bit indicating the current time epoch. Using a single bit to mark the current time epoch would be sufficient, allowing epochs that alternate between epoch 0 and epoch 1 to be distinguished. However, using a coarse time indication with two or more bits to support four or more epochs may allow for greater energy savings by enabling a larger portion of the entries in the cache to have their error checking omitted when visited in a patrol scrubbing cycle. The coarse time indication need not be particularly precise, and as few as one or two bits in the epoch indication may be sufficient.

[0064] By an epoch-based approach tracked by a relatively coarse time indication, the scrubbing circuit may determine that a no-check period for a given entry has passed when the current time epoch indicated by the current time indication is more than a predetermined number of epochs ahead of the epoch indicated by the age indication for a given entry. For example, the predetermined number may be one or two epochs. In this case, the duration of the no-check period may correspond to a predetermined number of epochs. In some examples, whether the current time epoch is more than a predetermined number of epochs ahead of the epoch indicated by the age indication may be determined based on a truth table indicating whether error checking will be required in a scrubbing operation for the pair of epoch numbers with respect to the epoch number indicated by the current time indication and the epoch number indicated in the age indication for a given entry. In other examples, using a modulo operation, whether the current time epoch is more than a predetermined number of epochs ahead of the epoch indicated by the age indication may be determined by subtracting one of the current epoch indication and the age indication from the other.

[0065] The timer may update the current time epoch indicated by the current time indication at a given update frequency, whereby the period between two consecutive instances in which the timer sets the current time indication to a given epoch value is an epoch cycle period having a duration greater than or equal to twice the scrubbing period. Thus, by ensuring that the epoch cycle period is at least twice the scrubbing period, meaning that during a given scrubbing period the current epoch cycles through half or less of the available epoch values, it is ensured that within a given scrubbing period there is no confusion between entries assigned to earlier epochs and later epochs that have been assigned the same epoch value. In practice, it may be most efficient for the epoch cycle period to be exactly twice the scrubbing period (which will tend to reduce the number of unique epoch values ​​required, and therefore reduce the number of bits in the age indication stored for each entry).

[0066] It may be useful to set the scrubbing period (and thus the epoch cycle period) depending on the retention time of the storage circuit cells of the data storage circuit. However, the retention time may vary depending on operating conditions of the data storage circuit (such as temperature or external magnetic field strength). In some cases, the epoch cycle period and the scrubbing period may be fixed regardless of such operating conditions (e.g., based on worst-case assumptions of retention time under worst-case operating conditions).

[0067] However, in other examples, the timer may update the current time epoch indicated by the current time indication at a given update frequency that is variable depending on at least one operating condition of the data storage circuit. Similarly, the duration of the scrubbing cycle may depend on at least one operating condition of the data storage circuit. For example, the at least one operating condition may be temperature and / or external magnetic field strength. By allowing the scrubbing cycle and epoch cycle period to be adapted based on monitoring external operating conditions, this may help improve energy efficiency because scrubbing operations do not have to be performed as frequently if the current operating conditions are such that the worst case retention condition does not occur.

[0068] The scrubbing operations performed on a given entry of the data storage circuit during a patrol scrubbing cycle may also include other operations that do not involve error checking that can tolerate the limited retention time of the data storage circuit.

[0069] For example, the flushing operation may further include performing a flushing operation to write data of a given entry back to the backing storage when at least one cache flushing condition is satisfied. In a specific implementation where the data storage circuit is used as a cache, if the given entry is already being accessed by the flushing circuit, there may be a good chance that dirty data is flushed from the entry and written back to the storage, which reduces write-back bandwidth that will need to be consumed later if the entry is subsequently evicted.

[0070] Various conditions may be used to determine whether a cleanup operation should actually be performed during a scrubbing operation on a given visit to a given entry during a patrol scrubbing cycle. For example, at least one cache cleanup condition may include at least one of the following:

[0071] A dirty condition, which depends on whether the data of a given entry is dirty. If the data is not dirty, there is no need to clean the entry.

[0072] An age indication condition that depends on whether an age indication associated with a given entry indicates that a no-check period for the given entry has elapsed. If the age indication indicates that a no-check period has not elapsed and therefore no error checking has been performed, then cleaning the entry will cause an additional read of the data for the given entry, thereby reducing the energy savings from skipping error checking. Thus, some implementations may support cleaning operations in cases where a no-check period has elapsed (because the data and error checking codes have already been read for error checking), but omit cleaning operations when a no-check period has not elapsed, to avoid the need to read the data for the entry in that case.

[0073] - An error checking condition, which depends on whether the data for a given entry is determined to be error-free based on the error checking code (it may be preferable not to write erroneous information back to another cache or backing store memory).

[0074] a bandwidth condition that depends on a current utilization of bandwidth on a data path between the data storage circuit and the backing store (when the current utilization of the bandwidth is below a threshold, the cleanup operation may be performed, but when the current utilization of the bandwidth is above the threshold, the cleanup operation may be omitted); and

[0075] ●Use prediction conditions that depend on a prediction of whether the data for a given entry is likely to be needed to service future requests (cleaning operations can be prioritized for entries that are considered unlikely to be needed to service future requests over entries that are more likely to be written again, making current data that may be written back obsolete).

[0076] Any of these conditions may be combined.

[0077] Another operation that may be combined with error checking in a scrubbing operation is dead block prediction (a prediction of whether a given cache entry is likely to be accessed again in a subsequent period). For example, a scrubbing operation may include evicting a given entry (e.g., invalidating the given entry and, if the data is dirty, also writing the dirty data back to another cache or memory). Alternatively, eviction may not occur directly in response to a scrubbing operation, but rather the scrubbing operation may include marking a given entry as a priority for eviction in response to a prediction that the given entry is predicted to be a dead entry (in which case a subsequent replacement decision is more likely to select the given entry as a victim entry to be replaced with new data at a different address).

[0078] For example, the prediction of a dead entry may be based on an age indication associated with the entry. If the age indication indicates an epoch that is more than a predetermined number of epochs after the current epoch, this may indicate that there have been no reads or writes to the entry for a period of time, making the entry a better candidate for eviction than other entries that have been accessed more recently. By performing dead block prediction (and possibly eviction operations, which depend on the dead block prediction) for a given entry when the given entry has been accessed for error checking reasons, this may reduce energy costs compared to approaches in which dead block prediction and / or invalidation operations are performed at a different time than error checking.

[0079] Figure 1An example of an apparatus 2 having a data storage circuit 3 is schematically illustrated. The data storage circuit 3 has a plurality of entries 4 for storing data. Each entry 4 stores the data 5 itself (e.g., functional data, instructions, address tags of cache entries, coherence status information of cache entries, etc.), as well as an error checking code 6 for checking whether the data has encountered an error (e.g., due to retention loss caused by the limited retention time of the storage technology used to store the data 5), ​​and an age indication 7 indicating the period of time that has passed since the data 5 in the entry 4 was read or written. A scrubbing circuit 8 is provided to perform periodic patrol scrubbing cycles, wherein in each scrubbing cycle, the scrubbing circuit 8 visits each entry 4 of the data storage circuit 3 to perform a scrubbing operation, which scrubbing operation includes at least a check based on the error checking code 6 for determining whether the data 5 is erroneous. Access control circuit 9 controls access to the data storage circuit 3 in response to read and write requests (as well as other types of requests that may cause the data 5 of a given entry 4 to be read or updated, such as cache line fill requests, snoop requests or snoop responses, etc.). In response to a request that causes the data 5 of a given entry to be read and a request that causes the data 5 of a given entry to be updated (wherein the error correction code 6 is also updated to match the updated data 5), ​​the age indication 7 of the given entry is updated to restart a no-check cycle during which, if the entry is accessed by the scrubbing circuit 8 before the no-check cycle has passed, no error checking for the scrubbing operation has to be performed. Therefore, during the scrubbing operation, the scrubbing circuit 8 checks the age indication 7 of the current entry 4 being accessed at the current point in the scrubbing cycle, and if the age indication indicates that the no-check cycle for the current entry being scrubbed is still pending (has not yet passed), error checking can be omitted. If the no-check cycle for the current entry has passed, error checking is performed. This means that, for entries that have not yet passed a no-check cycle, only the age indication 7 can be read, thereby reducing energy costs by omitting the reading of the data 5 and error correction code 6 fields of the entry.

[0080] This approach may be particularly useful where the data storage circuit is used as a cache memory, because in the case of a cache, the replacement policy used by the cache may tend to cause infrequently accessed entries to be evicted and replaced with more recently updated data, and thus distribute the frequency of read / write accesses more evenly across the cache than would occur if the data storage circuit were acting as main memory (backing storage, not cache). Thus, for a cache, there is a higher probability that a given entry has been accessed recently enough by read or write for the age indication 7 to indicate that no check cycle is still pending.

[0081] It should be understood that for ease of understanding, Figure 1Although a table structure is illustrated in which each entry includes information 5, 6, 7, not all of this information must be provided in a single combined storage unit. For example, in some examples, the age indication 7 may be stored in a storage unit separate from the data 5 and ECC 6 (in some cases, where the storage technology used for the storage unit storing the age indication 7 is implemented using a different memory storage technology than the storage technology used to store the data 5 and ECC 6).

[0082] Figure 2 An example of a data processing system with a cache that can benefit from this method is schematically illustrated. The system includes a coherent interconnect 12, a system-level cache 14 (also called a last-level cache), and a memory 10. The system also includes two processing clusters 21 and an I / O coherent domain 30. Each processing cluster 21 includes one or more central processing units (CPUs) 22 (in the example shown, each processor includes two CPUs 22), a dedicated cache associated with each CPU (L1 cache 24, L2 cache 26), and a shared cache 28 shared between the CPUs of the cluster 21. The shared cache 28 may include a snoop filter to filter coherent transactions issued between the CPUs 22 in the processing cluster 21. The I / O coherent domain (or unidirectional coherent domain) includes devices that can issue coherent access requests but are not snooped by the coherent interconnect 12. For example, the I / O coherent domain may include a graphics processing unit (GPU) 32. The GPU may have its own private cache, but the private cache is not snooped by the coherent interconnect 12 (e.g., if the GPU cannot write dirty data to the cache, then the private cache may not need to be snooped, for example, if the cache is a translation lookaside buffer that caches address translation information from page tables stored in the memory system, this may be the case). The system-level cache 14 acts as a last-level cache before the main memory 10. It should be understood that Figure 2 Only one possible example of a cache that may be implemented within a data processing system is illustrated, and many other arrangements are possible. However, the techniques discussed below may be particularly applicable to a system level cache 14 (last level cache), where slower access latencies may be better tolerated than in the case of an L1 / L2 cache 24 closer to the CPU 22, making the last level cache more suitable for use with MRAM storage technology as discussed below. However, this is only one example, and in general, Figure 1 The data storage circuit 3 shown may be any cache or memory within a data processing system.

[0083] There is growing interest in using spin-transfer torque magnetoresistive random access memory (STT-MRAM) to replace SRAM for last-level cache (LLC). STT-MRAM is attractive due to its significantly lower leakage power and high density (compared to SRAM); however, STT-MRAM has the disadvantages of long write latency and high dynamic write energy.

[0084] Retention is the ability of an NVM device to maintain and provide the programmed state of a memory cell on demand in the shortest period of time. STT-MRAM has diminishing data retention at elevated temperatures due to the temperature dependence of magnetic anisotropy. In order to increase data retention at elevated temperatures, the magnetic anisotropy of the device must be increased. This in turn results in greater write currents at lower temperatures, thereby reducing the efficiency of the memory and increasing its access time.

[0085] STT-MRAM retention failure is a random process due to thermal noise, so error checking codes (e.g., error detection codes or error correction codes (e.g., SECDED or DECTED)) and memory scrubbing can be used to maintain the chip error rate (CER) within acceptable limits while enabling the use of devices with lower magnetic anisotropy. When writing to location 4 of data storage circuit 3, new error correction code bits 6 are calculated and stored with data 5.

[0086] Memory scrubbing is the process of reading from each memory location, detecting (and if possible, correcting) bit errors (if any) with error checking codes, and writing the corrected data and ECC back to the same location if possible.

[0087] There is a trade-off between retention time and other parameters of STT-MRAM devices. Relaxing the non-volatile time facilitates lower write currents or faster switching speeds. For example, the physical design parameters of the MRAM memory device (such as the physical dimensions and materials used for the various components of the memory cell) can be selected to target behavior that favors longer retention (at the expense of increased write energy costs) or improved energy efficiency (at the expense of shorter retention). The following table shows two exemplary configurations of MRAM memory cells and their properties (again, this is just an illustrative example, and other designs are possible):

[0088] NV-RAM RAM Class density <![CDATA[0.025μm 2 / b]]> <![CDATA[0.018μm 2 / b]]> Write latency 50ns 20ns Read latency 10ns 5ns to 10ns Write Energy 10pJ / b 4pJ / b Reading Energy 1pJ / b 1pJ / b Array Leakage 0 About 1pA / b (from periodic data scrubbing) reserve 10 years 1 second

[0089] For MRAM cells used as cache, one would want to reduce the retention time just enough to hold the cached data for its lifetime (retention times longer than the expected lifetime of the data would not be beneficial and would tend to increase the energy cost of writing to the storage entry).

[0090] In cache memory, most blocks are frequently accessed, but the lifetime of cached data follows a distribution, and therefore, the lifetime of some blocks may be much longer than the average. To prevent corruption of the architectural state, the scrubbing circuit 8 performs patrol scrubbing cycles to ensure that each memory entry 4 is visited within a given scrubbing cycle (selected based on the retention interval of the particular memory technology, and the physical design being used), where the scrubbing cycle is short enough to detect (and ideally, correct) errors caused by random thermal processes.

[0091] Cache lifetimes are on the order of microseconds to milliseconds, but if you reduce the retention time to, say, 1ms, then even though throughput is improved due to reduced latency, a memory bank of, say, 4Mb of data must be flushed in that time. The proportion of bandwidth used will be too high. Considering only the read portion of the flush and assuming 10ns access time and 128b words, this would be 4Mb / 128b*10ns / 1ms = 32% of the available bandwidth to the memory!

[0092] By the method described here, error checking is performed on demand: when reading a location in the STT-MRAM, the ECC check bits are used to detect data corruption. If an error is detected, it is corrected if possible, and the corrected data is written to the memory location.

[0093] It is observed that, since the scrubbing is performed on demand when reading, the block will be error-free whenever it is accessed (whether or not correction is performed). The retention time of such a block restarts. In particular, it is noted that if ECC checking is ensured when reading, this applies to both read access and write access. This is counterintuitive because it can be assumed that the retention time of the block restarts only when the block has been written. However, although this assumption will be effective for refreshing the data in DRAM memory (where the retention failure mechanism is that the DRAM bit cell leaks charge deterministically over time, causing the stored data to change and therefore requiring periodic restoration of charge to maintain data integrity "refresh" operation), for MRAM, if no error is detected, it is not necessary to write the data row because STT-MRAM has non-destructive reading. Moreover, the retention failure mechanism for MRAM is a random (stochastic) process due to random thermal noise, so the probability of retention failure in a given time period depends on the duration of the time period, but is basically independent of the length of time between the most recent write to the entry and the start of the given time period.

[0094] Thus, by restarting the no-check cycle after only requests to non-destructively read the data of a given entry, and not just requests to update the data, this increases the portion of entries whose error checking can be skipped on a given visit in a patrol scrub cycle, thereby reducing the power consumption incurred on average during the patrol scrub cycle.

[0095] The following will refer to Figures 3 to 5 Describe specific examples. Figure 3 In the example of FIG. 4 , each entry 4 includes data 5 (including function data and / or instructions), ECC 6, age indication 7, as well as cache tag 48 and coherency state information 49. Although all of this information is in Figure 3 4 is logically shown as a single combined entry 4, but as explained below, a given entry 4 may be stored across multiple separate storage structures implemented using different storage technologies.

[0096] like Figure 3 As shown, each entry 4 of the data storage circuit 3 is associated with a timestamp that serves as an age indication 7. The age indication 7 of the entry 4 is updated each time the memory location is updated (e.g., for a write request), during an on-demand read operation for error checking, or during a patrol scrub. The timestamp can be generated by a timer 38 as a coarse time indication (age value) of one or more bits that represents the current "epoch". Using more than one bit can increase the portion of the scrub that is bypassed. An epoch counter 39 keeps track of the current epoch. The timestamp value and the epoch value can use an encoding, such as a Gray code, to simplify the comparison logic.

[0097] Each time the location has been scrubbed, either on demand read or write access or by a "patrol" scrub that periodically visits each location row, the current value of the epoch is copied to the timestamp 7 associated with the scrubbed entry 4. Setting the age indication 7 to match the current epoch value provided by the timer 38 restarts the no-check period during which no error checking is performed on the entry if the scrub circuit 8 visits it during a patrol scrub cycle.

[0098] In some examples, the storage unit for storing the age indication 7 may use SRAM memory, which is expected to have lower access time and energy than the associated data stored in STT-MRAM. The age indication 7 may be stored in a cache, for example, along with the tag. Alternatively, the age indication may be stored in an MRAM variant with longer retention (and therefore lower write energy cost) than an MRAM variant for data 5 and ECC 6. The tag 48 and the consistency state 49 may also be stored in SRAM.

[0099] Figure 4The granularity of the patrol scrubbing cycle is illustrated compared to the frequency with which the timer 38 updates the epoch value. The background "patrol" scrubbing process visits each location at least once per retention time. The time it takes for the patrol scrubbing process to pass through the entire array is Figure 4 The scrubbing cycle or "patrol scrubbing time" is shown. During each scrubbing cycle, the epoch count is incremented by half of its maximum count in equal time steps (or if the epoch value is represented by only one bit, it is updated only once per patrol scrubbing cycle). Thus, the epoch cycle period (the period between consecutive times when the epoch is set to a given value (e.g., 0)) is twice the scrubbing cycle. In other examples, the epoch cycle period may be twice as long as the scrubbing cycle.

[0100] When the flushing circuit 8 performs a flushing operation on a given entry 4, it checks the valid state of the timestamp counter plus the memory location. The age of the memory location is the current time indication provided by the epoch counter 39 of the timer 38 minus the age indication of the given entry 4 (in a modulo operation). If the location is valid and its age is such that the location will not be visited again before the retention time has passed, then the location is flushed; otherwise, the location is bypassed. This may be determined based on the difference between the current time indication and the age indication, the difference indicating that more than a predetermined number of epochs have passed since the given entry 4 had its age indication reset.

[0101] Figure 5 The truth table shown illustrates an example of controlling whether error checking is required in a scrubbing operation for a given entry. "Timestamp" refers to the epoch indicated by the age indication 7 of a given entry (which will match the value of the epoch counter 39 when the most recent required read or write was performed). Figure 5 The "current epoch" in refers to the current value of the epoch counter 39 when the flush operation is performed on the given entry. In this example, a binary encoding of the epoch value is used, but as described above, other encodings such as Gray coding may also be used. The combination of the "timestamp" and "current epoch" values ​​selects a truth table entry that, if 0, indicates that no flush error checking is required, and, if 1, indicates that a flush error checking should be performed for the current visit to the given entry. For example, if the current epoch is epoch 1 (0b01), entries with timestamps indicating epoch 3 (0b11) will be error checked in the flush, but entries with timestamps indicating epoch 0 (0b00) will not be error checked (e.g., Figure 4It will be appreciated that the scrubbing circuit may implement circuit logic that controls whether error checking is performed according to the rules shown in the truth table, but it is not necessary to actually use such a truth table to determine whether error checking is required (for example, the comparison may instead be performed by using a modulo operation to subtract the age indication 7 from the current time indication provided by the epoch counter 39 and comparing the resulting value to a threshold).

[0102] By bypassing locations that have already been scrubbed, patrol scrubbing only needs to access the timestamp SRAM (which will have higher available bandwidth and lower access power) instead of the data STT-MRAM. This can significantly reduce the bandwidth and power overhead of the scrubbing process. By enabling the bypass of rows that have already been read, a greater reduction in patrol scrubbing overhead will be achieved compared to patrol scrubbing overhead in the prior art.

[0103] The error checking of patrol scrubbing can be combined with other periodic operations that are performed entry by entry in a cyclic manner over a period of time. For example, if a location is predicted to be a dead block, the location can be invalidated or cleaned, and an additional counter of the number of patrol scrubbings experienced can be associated with each memory location to help identify dead blocks that are not read / written frequently enough to justify keeping them in the cache. Patrol can also be used in combination with patrol for eager writebacks, that is, there is an opportunity to clean cache blocks, especially during periods of low DDR activity. Patrol can also be combined with cleaning or invalidating data from unused partitions. In collaboration with the software driver, the epoch id can also be used to indicate expired data. For these other purposes, it may be useful to make the periodicity of patrol a defined multiple of the OS scheduling beat so that the OS can predict when these operations will be completed.

[0104] The epoch cycle period and the scrubbing period may be a function of temperature (or any other relevant parameter or predetermined value, such as external magnetic field strength) to allow patrol scrubbing to adapt to the retention time. Alternatively, the epoch cycle period and the scrubbing period may be independent of the ambient operating conditions and may be set based on the worst case retention time.

[0105] Figure 61 is a flowchart illustrating a method of processing a request to update data in a write target entry of a data storage circuit 3. The write target entry is selected based on an address specified by the request. At step 100, a request is received by the access control circuit 9. The request may be a write request issued by a requester (e.g., CPU 22 or GPU 32) to update functional data stored in a given cache entry, or may be a cache line fill request to update data 5 of a cache entry 4 based on data read from a memory 10 or a subsequent cache. In some cases where the data 5 includes consistency state information, the request may also be a snoop request or snoop response that causes a change in the consistency state associated with the cached information. In response to the request, at step 102, the access control circuit 9 calculates an error check code corresponding to the updated data, and writes the updated data and the error check code to the write target entry corresponding to the address specified by the request. At step 104, the access control circuit 9 also updates the age indication 7 associated with the write target entry to restart the non-check cycle of the write target entry. For example, the current epoch value provided by the epoch counter 39 of the timer 38 may be written into the age indication 7 of the write target entry.

[0106] Figure 7 1 is a flowchart illustrating a method of processing a request to cause the data of a read target entry to be read non-destructively from the data storage circuit 3. This may be a demand read request issued by a requester (e.g., the CPU 22 or the GPU 32) requesting access to data stored in the data storage circuit 3, or may be other types of requests, such as a coherence message that results in a lookup of the coherence state information included in the data 5 of a given entry 4, or a cache maintenance request that looks up a tag included in the data 5 of a cache entry to determine whether the cached information of a given address exists in the entry. In response to receiving such a request at step 120, at step 122, the access control circuit 9 reads out the data 5 and the error check code 6 of the read target entry (the entry corresponding to the address specified by the request), and uses the data 5 and the error check code 6 for error checking. At step 124, the access control circuit 9 determines whether the data 5 is error-free based on the error check. If so, at step 126, the read data 5 from the read target entry 4 may be returned to the requester. If the data is determined to be in error during error checking, the error is reported and / or corrected at step 128 (if possible, given the nature of the error and the type of error checking code used). If the error is correctable, it may not be necessary to report the occurrence of the error, as the error may be fixed silently. If the error is reported, this may be done in a variety of ways, such as by signaling an abnormal or fault condition, or by updating an error log.

[0107] At least if the data is determined to be error-free in the error check, then at step 130, the age indication associated with the read target entry is updated by the access control circuit 9 to restart the no-check cycle of the read target entry. Again, this can be done by writing the current value of the epoch counter 39 into the age indication field 7 of the read target entry.

[0108] Optionally, in some cases, step 130 may also be performed if an error is identified in the error check. Whether this is acceptable may depend on the nature of the error handling response performed at step 128, for example, if the error handling response results in erroneous data being corrected, then updating the age indication at step 130 may be useful regardless of the occurrence of an error.

[0109] If an error is detected but not corrected (e.g., because the error detection code is used as an error checking code), there may be different ways to handle the error. For example, an interrupt may be signaled, and (optionally) error information may be provided in a software accessible location (e.g., a system register or a memory area designated as an error log), which the software may use to determine what action to take in response to the error (e.g., abort the software process). Another option is to mark the entry as corrupt, so that the fact that the stored entry is corrupt may signal any software that later attempts to access the entry again.

[0110] Figure 8 A method of using a scrubbing circuit 8 to perform a patrol scrubbing cycle is illustrated. At step 150, for a current visit to a given entry during a patrol scrubbing cycle, the scrubbing circuit 8 accesses the given entry. The patrol scrubbing pointer is used to track which entry is currently being visited in the patrol scrubbing cycle. Therefore, the entry indicated by the current value of the patrol scrubbing pointer is read to return the age indication 7 of the entry. At step 152, the scrubbing circuit 8 determines whether a no-check period for the given entry has passed based on the age indication 7 associated with the given entry. For example, this may be based on whether the current epoch indicated by the epoch counter 39 of the timer 38 is more than a predetermined number of epochs ahead of the epoch indicated by the age indication 7. If a no-check period for the given entry has passed, then at step 156, the scrubbing circuit 8 performs error checking on the data 5 of the given entry being scrubbed using the error checking code 6 associated with the entry. At step 158, based on the error checking, the scrubbing circuit 8 determines whether the data is error-free, and if not, reports and / or corrects the error at step 160, similar to Figure 7If the data is determined to be error-free at step 158, or if an error is detected but corrected using ECC 6 at step 160, then the age indication 7 of the given entry is updated at step 161 to restart the no-check cycle (e.g., by copying the current epoch indication tracked by the epoch counter 39 to the age indication field 7 of the given entry being flushed). If the error is uncorrectable, then one of the measures discussed above may be taken (marking the entry as corrupted, and / or signaling an interrupt).

[0111] Optionally, other portions of the scrubbing operation may be performed at step 162, such as flushing data to backing storage if at least one flushing condition is satisfied, and / or evicting a given entry (or marking the entry as a priority for eviction) if the given entry is predicted to be a dead entry that has not been recently accessed by a demand read / write request issued by the requestor.

[0112] On the other hand, if it is determined at step 152 based on the age indication that no check required period has yet to pass, then the error checking steps 156, 158 may be omitted so that it is not necessary to read the data 5 or error check code 6 of a given entry, thereby saving energy. In a specific implementation that combines error checking with other scrubbing operations (such as cleaning or dead block prediction) as at step 162, such operations may also be skipped if no check required period has yet to pass.

[0113] Regardless of whether error checking is performed or omitted, once the scrubbing operation is completed for a given entry, at step 164, the patrol scrub pointer is advanced to indicate the next entry to be visited, and the method returns to step 150 to perform the scrubbing operation for the next entry.

[0114] The concepts described herein may be embodied in computer readable code for fabricating devices embodying the described concepts. For example, the computer readable code may be used at one or more stages of a semiconductor design and fabrication process, including an electronic design automation (EDA) stage, to fabricate integrated circuits including devices embodying the concepts. The above computer readable code may additionally or alternatively enable the definition, modeling, simulation, verification, and / or testing of devices embodying the concepts described herein.

[0115] For example, computer readable code for making an apparatus embodying the concepts described herein may be embodied in code defining a hardware description language (HDL) representation of the concepts. For example, the code may define a register transfer level (RTL) abstraction for defining one or more logic circuits of an apparatus embodying the concepts. The code may define an HDL representation of one or more logic circuits embodying the apparatus in Verilog, SystemVerilog, Chisel, or VHDL (Very High Speed ​​Integrated Circuit Hardware Description Language), as well as intermediate representations such as FIRRTL. The computer readable code may provide definitions embodying concepts using system-level modeling languages ​​such as SystemC and SystemVerilog, or other behavioral representations of concepts that may be interpreted by a computer to enable simulation, functional and / or formal verification, and testing of the concepts.

[0116] Additionally or alternatively, the computer readable code may define a low-level description of an integrated circuit component embodying the concepts described herein, such as one or more netlists or integrated circuit layout definitions, including representations such as GDSII. One or more netlists or other computer readable representations of integrated circuit components may be generated by applying one or more logic synthesis processes to the RTL representation to generate definitions for manufacturing devices embodying the present invention. Alternatively or additionally, one or more logic synthesis processes may generate from the computer readable code a bitstream to be loaded into a field programmable gate array (FPGA) to configure the FPGA to embody the described concepts. The FPGA may be deployed for the purpose of verifying and testing the concepts prior to manufacturing the integrated circuit, or the FPGA may be deployed directly in a product.

[0117] The computer readable code may include a mixture of code representations for making a device, such as a mixture including one or more of an RTL representation, a netlist representation, or another computer readable definition used in a semiconductor design and manufacturing process to make a device embodying the invention. Alternatively or additionally, concepts may be defined in a combination of a computer readable definition used in a semiconductor design and manufacturing process to make a device and computer readable code defining instructions to be executed by the defined device once manufactured.

[0118] Such computer readable code may be provided in any known transient computer readable medium (such as wired or wireless code transmission over a network) or non-transitory computer readable medium such as a semiconductor, a magnetic disk, or an optical disk. An integrated circuit manufactured using the computer readable code may include components such as one or more of the following: a central processing unit, a graphics processing unit, a neural processing unit, a digital signal processor, or other components that embody the concepts alone or collectively.

[0119] In this application, the words "configured to..." are used to mean that elements of a device have a configuration that enables the performance of a defined operation. In this context, "configuration" means the arrangement or manner of interconnection of hardware or software. For example, the device may have dedicated hardware that provides the defined operation, or a processor or other processing device may be programmed to perform the function. "Configured to" does not mean that the device elements need to be changed in any way in order to provide the defined operation.

[0120] In the present application, a feature list beginning with the phrase "at least one of..." means that any one or more of those features can be provided individually or in combination. For example, "at least one of the following: [A], [B], and [C]" covers any of the following options: only A (without B or C), only B (without A or C), only C (without A or B), a combination of A and B (without C), a combination of A and C (without B), a combination of B and C (without A), or a combination of A, B, and C.

[0121] Although exemplary embodiments of the present invention have been described in detail herein in conjunction with the accompanying drawings, it will be appreciated that the invention is not limited to those precise embodiments and that various changes and modifications may be effected therein by those skilled in the art without departing from the scope of the invention as defined by the appended claims.

Claims

1. A device comprising: data storage circuitry including a plurality of entries to store data according to a data storage technique that supports non-destructive reading of data capable of being stored in the plurality of entries, each entry being associated with an error checking code and an age indication; an access control circuit, the access control circuit being used to control access to the data storage circuit; and A scrubbing circuit is configured to perform a patrol scrubbing cycle to visit each entry of the data storage circuit within a scrubbing cycle, wherein upon a given visit to a given entry, the scrubbing circuit is configured to perform a scrubbing operation, the scrubbing operation comprising: determining whether a check-free period for the given entry has elapsed based on the age indication associated with the given entry; In response to determining that the no-check period for the given entry has elapsed, error-checking the data of the given entry using the error-checking code associated with the given entry; and In response to determining that the no-check cycle for the given entry has not passed, omitting the error check for the given access to the given entry; wherein: In response to a request to update the data and the error check code of a write target entry of the data storage circuit, the access control circuit is configured to update the age indication associated with the write target entry to restart the no-check cycle of the write target entry; and In response to a request to cause the data of the read target entry to be non-destructively read and subjected to the error check, at least when it is determined based on the error check code of the read target entry that the data of the read target entry is error-free, the access control circuit is configured to update the age indication associated with the read target entry to restart the non-check-required cycle of the read target entry.

2. The apparatus of claim 1, wherein the data storage circuit is a cache memory.

3. An apparatus according to claim 1 or 2, wherein the data storage circuit comprises a first group of storage circuit locations for storing at least the data and the error check code of each entry according to a first data storage technology, and for the first data storage technology, the loss of stored data due to retention failure is a random process. 4 . The apparatus of claim 3 , wherein the first data storage technology comprises MRAM (Magnetoresistive Random Access Memory) storage technology.

5. The device according to any one of claims 1 to 4, wherein the data storage circuit comprises: a first set of storage circuit locations for storing at least the data and the error checking code for each entry, and A second set of storage circuit locations is provided for storing at least the age indication for each entry, wherein the second set of storage circuit locations has at least one of reduced access latency and reduced read access energy cost compared to the first set of storage circuit locations.

6. The apparatus of claim 5, wherein the first set of storage circuit locations and the second set of storage circuit locations use the same data storage technology but have different physical design parameters, thereby providing at least one of different access latencies and different read access energy costs.

7. The apparatus of claim 5, wherein the second set of storage circuit locations uses a second data storage technology that is different than a first data storage technology used for the first set of storage circuit locations.

8. The apparatus of claim 7, wherein the second data storage technology is SRAM (Static Random Access Memory).

9. An apparatus according to any one of claims 1 to 8, comprising a timer, the timer providing an indication of the current time; in, To restart the check-free period for an entry of the data storage circuitry, the access control circuitry is configured to update the age indication of the entry to specify the current time indication provided by the timer.

10. The apparatus of claim 9, wherein the scrubbing circuit is configured to determine whether the no-check period for the given entry has elapsed based on a comparison of the age indication for the given entry with the current time indication provided by the timer.

11. An apparatus according to claim 9 or 10, wherein the current time indication is a coarse time indication comprising at least one bit indicating a current time epoch.

12. An apparatus according to claim 11, wherein the scrubbing circuit is configured to determine that the no-check period for the given entry has passed when the current time epoch indicated by the current time indication is more than a predetermined number of epochs earlier than the epoch indicated by the age indication of the given entry.

13. An apparatus according to claim 11 or 12, wherein the timer is configured to update the current time epoch indicated by the current time indication at a given update frequency, whereby the period between two consecutive instances in which the timer sets the current time indication to a given epoch value is an epoch cycle period having a duration greater than or equal to twice the scrubbing cycle.

14. An apparatus according to any one of claims 11 to 13, wherein the timer is configured to update the current time epoch indicated by the current time indication at a given update frequency, the given update frequency being variable depending on at least one operating condition of the data storage circuit.

15. The apparatus of claim 14, wherein the at least one operating condition comprises temperature.

16. The apparatus according to any one of claims 1 to 15, wherein the flushing operation further comprises performing a clean operation to write the data of the given entry back to a backing storage when at least one cache clean condition is satisfied.

17. The apparatus of claim 16, wherein the at least one cache clean condition comprises at least one of: a dirty condition, the dirty condition depending on whether the data of the given entry is dirty; an age indication condition, the age indication condition being dependent on whether the age indication associated with the given entry indicates that the check-free period for the given entry has elapsed; an error checking condition, the error checking condition depending on whether the data of the given entry is determined to be error-free based on the error checking code; a bandwidth condition, the bandwidth condition being dependent on a current utilization of bandwidth on a data path between the data storage circuit and the backing store; and A usage prediction condition is based on a prediction of whether the data for the given entry is likely to be needed to service a future request.

18. The apparatus of any one of claims 1 to 17, wherein the scrubbing operation further comprises evicting the given entry or marking the given entry as a priority for eviction in response to a prediction that the given entry is a dead entry.

19. A non-transitory storage medium storing computer readable code for manufacturing a device, the device comprising: data storage circuitry including a plurality of entries to store data according to a data storage technique that supports non-destructive reading of data capable of being stored in the plurality of entries, each entry being associated with an error checking code and an age indication; an access control circuit, the access control circuit being used to control access to the data storage circuit; and A scrubbing circuit is configured to perform a patrol scrubbing cycle to visit each entry of the data storage circuit within a scrubbing cycle, wherein upon a given visit to a given entry, the scrubbing circuit is configured to perform a scrubbing operation, the scrubbing operation comprising: determining whether a no-check period has elapsed based on the age indication associated with the given entry; In response to determining that the no-check period for the given entry has elapsed, error-checking the data of the given entry using the error-checking code associated with the given entry; and In response to determining that the no-check period for the given entry has not elapsed, omitting the error checking for the given access to the given entry; wherein: In response to a request to update the data and the error check code of a write target entry of the data storage circuit, the access control circuit is configured to update the age indication associated with the write target entry to restart the no-check cycle of the write target entry; and In response to a request to cause the data of the read target entry to be non-destructively read and subjected to the error checking, at least when the data of the read target entry is determined to be error-free based on the error checking code of the read target entry, the access control circuit is configured to update the age indication associated with the read target entry to restart the non-checking cycle of the read target entry.

20. A method comprising: storing data in a plurality of entries of a data storage circuit according to a data storage technique that supports non-destructive reading of data capable of being stored in the plurality of entries, each entry being associated with an error checking code and an age indication; A patrol scrubbing cycle is performed to visit each entry of the data storage circuit within a scrubbing cycle, wherein a scrubbing operation is performed at a given visit to a given entry, the scrubbing operation comprising: determining whether a no-check period has elapsed based on the age indication associated with the given entry; In response to determining that the no-check period for the given entry has elapsed, error-checking the data of the given entry using the error-checking code associated with the given entry; and In response to determining that the no-check period for the given entry has not passed, omitting the error check for the given access to the given entry; In response to a request to update the data and the error check code of a write target entry of the data storage circuit, updating the age indication associated with the write target entry to restart the no-check cycle of the write target entry; and In response to a request to cause the data of the read target entry to be non-destructively read and subjected to the error check, at least when it is determined based on the error check code of the read target entry that the data of the read target entry is error-free, the age indication associated with the read target entry is updated to restart the non-check cycle of the read target entry.