data bit inversion tracking in cache memory to reduce data bits written for write operations is disclosed. In one aspect, a cache memory including a cache controller and a cache array is provided. The cache array includes one or more cache entries, each of which includes a cache data field and a bit change track field. The cache controller compares a current cache data word to a new data word to be written and stores a bit track change word representing the difference (i.e., inverted bits) between the current cache data word and the new data word in the bit change track field. By using the bit track change word stored in the bit change track field to determine whether fewer bit writes are required to write data in an inverted or a non-inverted form, power consumption can be reduced for write operations through reduced bit write operations.
|
21. A method of storing data in response to a write operation, comprising:
receiving a write request comprising a memory address and a write data word;
comparing the write data word to a current cache data word stored in a cache data field in a cache entry among one or more cache entries in a cache array corresponding to the memory address of the write request;
generating a bit change track word in a bit change track field of the cache entry, the bit change track word indicating a bit inversion state based on bit inversions determined by the comparing;
determining if the write data word is to be stored in an inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
1. A cache memory, comprising:
a cache array comprising one or more cache entries, each comprising a cache data field and a bit change track field; and
a cache controller configured to write data in the one or more cache entries of the cache array;
the cache controller configured to:
receive a write request comprising a memory address and a write data word;
generate a bit change track word in the bit change track field in a cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request, the bit change track word indicating a bit inversion state based on bit inversions determined by a comparison between the write data word and a current cache data word stored in the cache data field in the cache entry;
determine if the write data word is to be stored in an inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, cause the write data word to be stored in association with the memory address of the write request in the inverted form.
20. A cache memory, comprising:
a means for storing cache data in one or more cache entries each comprising a data field and a bit change track field; and
a means for writing cache data in the one or more cache entries of the means for storing cache data;
the means for writing cache data comprising:
a means for receiving a write request comprising a memory address and a write data word;
a means for generating a bit change track word in the bit change track field in a cache entry among the one or more cache entries in the means for storing cache data corresponding to the memory address of the write request, the bit change track word indicating a bit inversion state based on bit inversions determined by a comparison between the write data word and a current data word stored in the data field in the cache entry;
a means for determining if the write data word is to be stored in an inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, a means for causing the write data word to be stored in association with the memory address of the write request in the inverted form.
30. A memory system comprising:
a higher-level memory comprising one or more memory entries, each associated with a memory address and each comprising a data field; and
a cache memory comprising:
a cache array comprising one or more cache entries, each cache entry associated with a memory entry among the one or more memory entries of the higher-level memory and each cache entry comprising a cache data field and a bit change track field;
a cache controller configured to write data in the one or more cache entries of the cache array, the cache controller configured to:
receive a write request comprising a memory address associated with one of the one or more memory entries of the higher-level memory and a write data word;
generate a bit change track word in the bit change track field in a cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request, the bit change track word indicating a bit inversion state based on bit inversions between the write data word and a current cache data word stored in the cache data field in the cache entry;
determine if the write data word is to be stored in an inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, cause the write data word to be stored in association with the memory address of the write request in the inverted form;
the higher-level memory configured to store the write data word in the inverted form in a data field of one of the one or more memory entries.
2. The cache memory of
3. The cache memory of
each of the one or more cache entries in the cache array further comprises a bit invert field configured to store a bit invert indicator indicating an inversion state;
the cache controller is further configured to set the bit invert indicator in the bit invert field in the cache entry corresponding to the memory address of the write request based on the bit inversion state of the bit change track word; and
the cache controller is configured to:
determine if the write data word is to be stored in the inverted form based on the inversion state of the bit invert indicator; and
responsive to determining that the write data word is to be stored in the inverted form, cause the write data word to be stored in association with the memory address of the write request in the inverted form.
4. The cache memory of
5. The cache memory of
wherein the cache controller is further configured to determine if the write request incurs a cache hit or a cache miss in the cache array based on the memory tag in the cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request; and
responsive to the occurrence of a cache hit in the cache array for the write request, the cache controller is configured to:
generate the bit change track word in the bit change track field in the cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request, the bit change track word indicating the bit inversion state based on the bit inversions between the write data word and the current cache data word stored in the cache data field in the cache entry;
determine if the write data word is to be stored in the inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, cause the write data word to be stored in association with the memory address of the write request in the inverted form.
6. The cache memory of
send a read request comprising the memory address of the write request to a higher-level memory;
receive a higher-level data word corresponding to the memory address of the write request in response to the read request; and
store the higher-level data word as the current cache data word in the cache data field in the cache entry corresponding to the memory address of the write request.
7. The cache memory of
generate the bit change track word in the bit change track field in the cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request, the bit change track word indicating the bit inversion state based on the bit inversions between the write data word and the current cache data word stored in the cache data field in the cache entry;
determine if the write data word is to be stored in the inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, cause the write data word to be stored in association with the memory address of the write request in the inverted form.
8. The cache memory of
9. The cache memory of
10. The cache memory of
11. The cache memory of
generate an error-correcting code (ECC) for the write data word based on the inverted form of the write data word; and
cause the ECC to be stored in association with the memory address of the write request.
12. The cache memory of
generate an error-correcting code (ECC) word for the write data word based on the non-inverted form of the write data word; and
cause the ECC word to be stored in association with the memory address of the write request.
13. The cache memory of
receive a higher-level error-correcting code (ECC) word corresponding to the memory address of the write request; and
decode the received higher-level ECC word associated with the received higher-level data word.
14. The cache memory of
15. The cache memory of
determine a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the number of the bit inversions in the bit change track word is greater than one-half a number of bits of the write data word, cause the write data word to be stored in association with the memory address of the write request in the inverted form;
responsive to determining that the number of the bit inversions in the bit change track word is less than or equal to one-half the number of bits of the write data word, cause the write data word to be stored in association with the memory address of the write request in a non-inverted form.
16. The cache memory of
determine a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the number of the bit inversions in the bit change track word is greater than or equal to one-half a number of bits of the write data word, cause the write data word to be stored in association with the memory address of the write request in the inverted form;
responsive to determining that the number of the bit inversions in the bit change track word is less than one-half the number of bits of the write data word, cause the write data word to be stored in association with the memory address of the write request in a non-inverted form.
17. The cache memory of
read the bit invert indicator stored in the bit invert field in the cache entry corresponding to the memory address of the write request;
determine whether the bit invert indicator indicates a first logic state or a second logic state;
determine a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the bit invert indicator indicates the first logic state and that the number of the bit inversions in the bit change track word is greater than one-half a number of bits of the write data word, set the bit invert indicator in the bit invert field to indicate the second logic state and cause the write data word to be stored in association with the memory address of the write request in the inverted form;
responsive to determining that the bit invert indicator indicates the first logic state and that the number of the bit inversions in the bit change track word is less than or equal to one-half the number of bits of the write data word, cause the write data word to be stored in association with the memory address of the write request in a non-inverted form;
responsive to determining that the stored bit invert indicator indicates the second logic state and that the number of the bit inversions in the bit change track word is greater than or equal to one-half the number of bits of the write data word, cause the write data word to be stored in association with the memory address of the write request in the inverted form;
responsive to determining that the stored bit invert indicator indicates the second logic state and that the number of the bit inversions in the bit change track word is less than one-half the number of bits of the write data word, set the bit invert indicator in the bit invert field to indicate the first logic state and cause the write data word to be stored in association with the memory address of the write request in the non-inverted form.
19. The cache memory of
22. The method of
23. The method of
setting a bit invert indicator stored in a bit invert field in the cache entry to indicate an inversion state corresponding to the memory address of the write request based on the bit inversion state of the bit change track word;
determining if the write data word is to be stored in the inverted form based on the inversion state of the bit invert indicator; and
responsive to determining that the write data word is to be stored in the inverted form, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
24. The method of
determining if the write request incurs a cache hit or a cache miss in the cache array based on a memory tag in a cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request; and
responsive to the occurrence of a cache hit in the cache array for the write request:
generating the bit change track word in the bit change track field in the cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request, the bit change track word indicating the bit inversion state based on the bit inversions between the write data word and the current cache data word stored in the cache data field in the cache entry;
determining if the write data word is to be stored in the inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
25. The method of
sending a read request comprising the memory address of the write request to a higher-level memory;
receiving a higher-level data word corresponding to the memory address of the write request in response to the read request;
storing the higher-level data word as the current cache data word in the cache data field in the cache entry corresponding to the memory address of the write request;
generating the bit change track word in the bit change track field in the cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request, the bit change track word indicating the bit inversion state based on the bit inversions between the write data word and the current cache data word stored in the cache data field in the cache entry;
determining if the write data word is to be stored in the inverted form based on the bit inversion state; and
responsive to determining that the write data word is to be stored in the inverted form, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
26. The method of
determining a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the number of the bit inversions in the bit change track word is greater than one-half a number of bits of the write data word, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
27. The method of
determining a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the number of the bit inversions in the bit change track word is less than or equal to one-half the number of bits of the write data word, causing the write data word to be stored in association with the memory address of the write request in a non-inverted form.
28. The method of
determining a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the number of the bit inversions in the bit change track word is greater than or equal to one-half a number of bits of the write data word, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
29. The method of
determining a number of the bit inversions in the bit change track word stored in the bit change track field in the cache entry in the cache array; and
responsive to determining that the number of the bit inversions in the bit change track word is less than one-half the number of bits of the write data word, causing the write data word to be stored in association with the memory address of the write request in a non-inverted form.
31. The memory system of
the cache controller is further configured to, responsive to determining that the write data word is to be stored in a non-inverted form:
generate an error-correcting code (ECC) word for the write data word based on the non-inverted form of the write data word; and
cause the ECC word to be stored in association with the memory address of the write request; and
the higher-level memory is further configured to store the ECC word in association with the memory address of the write request.
|
The technology of the disclosure relates generally to memory systems provided in processor-based systems for storing data, and more particularly to memory systems that include the capability of storing data in an inverted form in memory to reduce data bit write operations.
Semiconductor storage devices are incorporated in integrated circuits (ICs) in electronic devices to provide data storage. One example of a semiconductor storage device is static random access memory (SRAM). Another example of a semiconductor storage device is magneto-resistive random access memory (MRAM). It may be advantageous to use MRAM in place of SRAM for memory applications because MRAM is non-volatile memory in which data is stored by programming a magnetic tunnel junction (MTJ) as part of an MRAM bit cell. An advantage of MRAM is that MTJs in MRAM bit cells can retain stored information even when power is turned off. This is because data is stored in the MTJ as a small magnetic element rather than as an electric charge or current.
In this regard, an MTJ comprises a free ferromagnetic layer (“free layer”) disposed above or below a fixed or pinned ferromagnetic layer (“pinned layer”). The free and pinned layers are separated by a tunnel junction (also known as a tunnel barrier) formed by a thin non-magnetic dielectric layer. The magnetic orientation of the free layer can be changed, but the magnetic orientation of the pinned layer is fixed or “pinned.” Data can be stored in the MTJ according to the magnetic orientation between the free and pinned layers. When the magnetic orientations of the free and pinned layers are anti-parallel (AP) to each other, a first memory state exists (e.g., a logical ‘1’). When the magnetic orientations of the free and pinned layers are parallel (P) to each other, a second memory state exists (e.g., a logical ‘0’). The magnetic orientations of the free and pinned layers can be sensed to read data stored in the MTJ by sensing a resistance when current flows through the MTJ. Data can also be written and stored in the MTJ by generating a write current across the MTJ to induce a spin transfer torque (STT). In this manner, the spin polarization of carrier electrons can be used to change the orientation of the free layer to either a P or AP magnetic orientation with respect to the pinned layer.
However, compared to SRAM, MRAM write operations typically require more power because a sufficient current must be generated to cause the free layer in an MRAM bit cell to set its magnetic orientation. For example, at an operation frequency of 200 megahertz (MHz), an SRAM may require a write current of 3.6 milliamperes (mA) while an MRAM may require a write current of 18 mA. To reduce the power consumed by MRAM during write operations, conventional MRAM systems may employ a read-modify-write (RMW) scheme, which can reduce the number of written bits to conserve power. In an RMW scheme, every write operation first incurs a read operation and a modify operation.
For example,
While the MRAM controller 106 in the MRAM macro 102 in
Aspects disclosed in the detailed description include data bit inversion tracking in cache memory to reduce data bits written for write operations. Reducing the number of data bits written to memory can reduce power consumption as an example. In this regard, in exemplary aspects disclosed herein, a memory system is provided that includes a main memory or system memory for storing data. The memory system also includes a cache memory for storing cached versions of the data stored in the main memory. The cache memory includes a cache controller and a cache array. The cache array includes one or more cache entries, each of which includes a cache data field for storing cached data from the main memory and a corresponding bit change track field. In a write operation, in response to a cache hit in the cache memory, the cache controller is configured to compare a current cache data word stored in a cache entry corresponding to a memory address of the write operation to a new data word in the write operation to be written. The cache controller is configured to store a bit change track word in the bit change track field in the cache entry representing the difference (i.e., inverted bits) between the current cache data word in the cache entry and the new data word. If the bit change track word has fewer inverted bits than non-inverted bits, then writing the new data word back to the main memory in a non-inverted form may require fewer bits to be written (e.g., for a write-through or write-back scheme). However, if the bit change track word has more inverted bits than non-inverted bits, then writing the new data word in the main memory in an inverted form may require fewer bits to be written. By using the bit change track word stored in the bit change track field of the cache entry to determine whether fewer bit writes are required to write data in an inverted or a non-inverted form, power consumption can be reduced for write operations through reduced bit write operations.
Thus, by providing data bit inversion tracking in the cache memory, the cache controller can perform data bit inversion operations for write operations without having to first read the current data word from the main memory if a cache hit occurs in response to the write operation. Therefore, for example, a read-modify-write (RMW) scheme can be avoided if desired for performing data bit inversion operations for write operations that result in a cache hit to the cache memory. Also, by providing data bit inversion tracking in the cache memory, new data words stored in the cache memory can be written back to the main memory without having to first perform a read operation to the main memory. For example, data words stored in the cache memory may be written back to the main memory in a write-through scheme, or in response to an eviction of a cache entry from the cache memory as part of a write-back scheme.
In other exemplary aspects disclosed herein, if a cache miss occurs in the cache memory in response to a write operation, the cache controller can first read the current data word from the main memory at the memory address of the write operation into the cache memory before performing the data bit comparison operation discussed above. In other exemplary aspects disclosed herein, the cache controller can also be configured to generate an error-correcting code (ECC) for write operations based on whether the new data word is written in the inverted or the non-inverted form. Data bit inversion tracking in cache memory can be employed in many types of memory systems to reduce the number of data bits written for write operations. However, data bit inversion tracking in cache memory may be particularly advantageous in memory systems that include magneto-resistive random access memory (MRAM), where higher power consumption may be incurred for write operations over other memory systems, such as static random access memory (SRAM) systems for example.
In this regard in one aspect, a cache memory including a cache array and a cache controller is provided. The cache array includes one or more cache entries, and each cache entry includes a cache data field and a bit change track field. The cache controller is configured to write data in the one or more cache entries of the cache array. In this regard, the cache controller is configured to receive a write request comprising a memory address and a write data word. The cache controller is further configured to generate a bit change track word in the bit change track field in a cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request. The bit change track word indicates a bit inversion state based on bit inversions between the write data word and a current cache data word stored in the cache data field in the cache entry. The cache controller is also configured to determine if the write data word is to be stored in an inverted form based on the bit inversion state. Responsive to determining that the write data word is to be stored in the inverted form, the cache controller is configured to cause the write data word to be stored in association with the memory address of the write request in the inverted form.
In another aspect, a cache memory including a means for storing cache data and a means for writing cache data is provided. The means for storing cache data includes one or more cache entries, and each cache entry includes a data field and a bit change track field. The means for writing cache data in the one or more cache entries of the means for storing cache data includes a means for receiving a write request including a memory address and a write data word. The means for writing cache data further includes a means for generating a bit change track word in the bit change track field in a cache entry among the one or more cache entries in the means for storing cache data corresponding to the memory address of the write request. The bit change track word indicates a bit inversion state based on bit inversions between the write data word and a current cache data word stored in the data field in the data entry. The means for writing cache data also includes a means for determining if the write data word is to be stored in an inverted form based on the bit inversion state. Responsive to determining that the write data word is to be stored in the inverted form, a means for causing the write data word to be stored in association with the memory address of the write request in the inverted form is also provided.
In another aspect, a method of storing data in response to a write operation is provided. The method includes receiving a write request comprising a memory address and a write data word. The method also includes generating a bit change track word in a bit change track field in a cache entry among one or more cache entries in a cache array corresponding to the memory address of the write request. The bit change track word indicates a bit inversion state based on bit inversions between the write data word and a current cache data word stored in a cache data field in the cache entry. The method includes determining if the write data word is to be stored in an inverted form based on the bit inversion state and, responsive to determining that the write data word is to be stored in the inverted form, causing the write data word to be stored in association with the memory address of the write request in the inverted form.
In another aspect, a memory system including a higher-level memory and a cache memory is provided. The higher-level memory includes one or more memory entries, each associated with a memory address and each comprising a data field. The cache memory includes a cache array and a cache controller. The cache array includes one or more cache entries, and each cache entry is associated with a memory entry among the one or more memory entries of the higher-level memory and includes a cache data field and a bit change track field. The cache controller is configured to write data in the one or more cache entries of the cache array. In this regard, the cache controller is configured to receive a write request including a memory address associated with one of the one or more memory entries of the higher-level memory and a write data word. The cache controller is further configured to generate a bit change track word in the bit change track field in a cache entry among the one or more cache entries in the cache array corresponding to the memory address of the write request. The bit change track word indicates a bit inversion state based on bit inversions between the write data word and a current cache data word stored in the cache data field in the cache entry. The cache controller is also configured to determine if the write data word is to be stored in an inverted form based on the bit inversion state. The cache controller is configured to, responsive to determining that the write data word is to be stored in the inverted form, cause the write data word to be stored in association with the memory address of the write request in the inverted form. The higher-level memory is configured to store the write data word in the inverted form in a data field of one of the one or more memory entries.
With reference now to the drawing figures, several exemplary aspects of the present disclosure are described. The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.
Aspects disclosed in the detailed description include data bit inversion tracking in cache memory to reduce data bits written for write operations. Reducing the number of data bits written to memory can reduce power consumption as an example. In this regard, in exemplary aspects disclosed herein, a memory system is provided that includes a main memory or system memory for storing data. The memory system also includes a cache memory for storing cached versions of the data stored in the main memory. The cache memory includes a cache controller and a cache array. The cache array includes a plurality of cache entries, each of which include a cache data field for storing cached data from the main memory and a corresponding bit change track field. In a write operation, in response to a cache hit in the cache memory, the cache controller is configured to compare a current cache data word stored in a cache entry corresponding to a memory address of the write operation to a new data word in the write operation to be written. The cache controller is configured to store a bit change track word in the bit change track field in the cache entry representing the difference (i.e., inverted bits) between the current cache data word in the cache entry and the new data word. If the bit change track word has fewer inverted bits than non-inverted bits, then writing the new data word back to the main memory in a non-inverted form may require fewer bits to be written (e.g., for a write-through or write-back operation). However, if the bit change track word has more inverted bits than non-inverted bits, then writing the new data word in the main memory in an inverted form may require fewer bits to be written. By using the bit change track word stored in the bit change track field of the cache entry to determine whether fewer bit writes are required to write data in an inverted or a non-inverted form, power consumption can be reduced for write operations through reduced bit write operations.
Thus, by providing data bit inversion tracking in the cache memory, the cache controller can perform data bit inversion operations for write operations without having to first read the current data word from the main memory if a cache hit occurs in response to the write operation. Therefore, for example, a read-modify-write (RMW) scheme can be avoided if desired for performing data bit inversion operations for write operations that result in a cache hit to the cache memory. Also, by providing data bit inversion tracking in the cache memory, new data words stored in the cache memory can be written back to the main memory without having to first perform a read operation to the main memory. For example, data words stored in the cache memory may be written back to the main memory in a write-through scheme, or in response to an eviction of a cache entry from the cache memory as part of a write-back scheme.
In other exemplary aspects disclosed herein, if a cache miss occurs in the cache memory in response to a write operation, the cache controller can first read the current data word from the main memory at the memory address of the write operation into the cache memory before performing the data bit comparison operation discussed above. In other exemplary aspects disclosed herein, the cache controller can also be configured to generate an error-correcting code (ECC) for write operations based on whether the new data word is written in the inverted or the non-inverted form. Data bit inversion tracking in cache memory can be employed in many types of memory systems to reduce the number of data bits written for write operations. However, data bit inversion tracking in cache memory may be particularly advantageous in memory systems that include magneto-resistive random access memory (MRAM), where higher power consumption may be incurred for write operations over other memory systems, such as static random access memory (SRAM) systems for example.
With continuing reference to
It may be desired for the memory system 204 to employ a data bit inversion storage scheme to store data in the main memory 208 in an inverted form based on a bit change track word 326(0) and indicated by a bit invert indicator 328(0). Employing such a data bit inversion storage scheme in response to a write request 330 may be desired because doing so may require fewer bits to be changed from the current main memory data word 322(0) at the memory address 316(0) associated with the write request 330. If storing data in response to the write request 330 in a non-inverted form requires fewer bits to be changed at the memory address 332 associated with the write request 330 in the main memory 208, then the memory system 204 may be configured to store data in the non-inverted form. In either scenario, writing fewer bits for the write request 330 can reduce power consumption for the write operation. To determine whether it would require fewer bits to be written to write a write data word 334 of the write request 330 to the main memory 208, the bit states (i.e., whether the bit is in a ‘1’ state or a ‘0’ state) of the current main memory data word 322(0) at the memory address 316(0) in the main memory 208 must be known. A read operation could be performed to read the current main memory data word 322(0) at the memory address 316(0) in the main memory 208 in response to the write request 330, but doing so would require more steps and would consume more power. Thus, it is desired to be able to determine whether it would require fewer bits to be written to write a write data word for a write request to main memory in either an inverted or a non-inverted form without having to first read a current main memory data word at a memory address in main memory in response to a write request, if possible.
In this regard, as will be discussed in more detail below, the cache memory 206 in
In response to the cache hit in the cache memory 206 for the write request 330, the cache controller 300 is configured to compare the current cache data word 324(0) of the cache entry 304(0) corresponding to the memory address 332 of the write request 330 to the write data word 334 in the write request 330 to be written. This is because the cache array 302 contains the cache entry 304(0) that corresponds to the memory address 332 of the write request 330. The cache controller 300 is configured to store the bit change track word 326(0) in the bit change track field 312 in the cache entry 304(0) representing the difference (i.e., inverted bits) between the current cache data word 324(0) corresponding to the memory address 332 of the write request 330 and the write data word 334 of the write request 330. If the bit change track word 326(0) has fewer inverted bits than non-inverted bits, then writing the write data word 334 of the write request 330 back to the higher-level cache memory 226 and/or the main memory 208 in a non-inverted form may require fewer bits to be written (e.g., for a write-through or write-back operation). However, if the bit change track word 326(0) has more inverted bits than non-inverted bits, then writing the write data word 334 in the main memory 208 in an inverted form may require fewer bits to be written. By using the bit change track word 326(0) stored in the bit change track field 312 of the cache entry 304(0), for example, to determine whether fewer bit writes are required to write data in an inverted or a non-inverted form, power consumption can be reduced for write operations by reducing bit write operations.
In this regard, the bit invert indicator 328(0) can be stored in the bit invert field 308 for the corresponding cache entry 304(0) to indicate whether write data is stored in an inverted or a non-inverted form. By providing such data bit inversion tracking in the cache memory 206, the cache controller 300 can perform data bit inversion operations for write operations without having to first read data from the main memory 208 if a cache hit occurs in response to a write request. Therefore, for example, an RMW scheme can be avoided if desired for performing data bit inversion operations for write operations that result in a cache hit to the cache memory 206. Also, by providing data bit inversion tracking in the cache memory 206, a write data word stored in the cache memory 206 can be written back to the main memory 208 without having to first perform a read operation to the main memory 208. For example, the write data word 334 that can be stored in the cache memory 206 may be written back to the main memory 208 in a write-through scheme, or in response to an eviction from the cache memory 206 as part of a write-back scheme.
With reference to
Performing the bit-by-bit comparison includes comparing a bit in a given position in the current cache data word 324(0) to a bit in a corresponding position in the write data word 334. For example, the leftmost bit in the current cache data word 324(0) in
The cache controller 300 in
In this regard, the cache controller 300 is configured to determine if the write data word 334 should be stored in an inverted form based on the bit inversion state, which is based on the bit inversions between the write data word 334 and the current cache data word 324(0) (block 408 of
Given a current cache data word 324(0) having an even word size, in this example, there are four cases where varying the number of bit inversions, the word size of the current cache data word 324(0), and the value previously stored in the bit invert field 308 can reduce the number of bit write operations for a given write request. In a first case, if the number of bit inversions in the bit change track word 326(0) is greater than one-half the word size of the current cache data word 324(0), and the value previously stored in the bit invert field 308 is a ‘0’ (indicating a first logical state), then writing a ‘1’ to the bit invert field 308 and storing an inverted form of the write data word 334 would reduce the number of bit write operations for the write request 330. For example, if the write data word provided by the write request is ‘00000000’ and the current cache data word is ‘00011111,’ then the bit change track word would be ‘0001111E’ Assuming that the bit invert field previously contained a ‘0’ (which can be determined by reading the bit invert field in an earlier step), writing the write data word in a non-inverted form would require performing five bit write operations for each ‘1’ in the bit change track word. However, writing the write data word in an inverted form would only require four bit write operations; three for each ‘0’ in the bit change track word and one to write a ‘1’ to the bit invert field, which previously held a ‘0.’ In this case, where the bit invert field previously contained a ‘0,’ the number of bit inversions in the bit change track word (five) was greater than one-half the word size (one-half of the word size of the current cache data word, eight, is a value of four). Thus, writing a ‘1’ to the bit invert field and storing an inversion of the write data word reduces the number of bit write operations for the write request.
In a second case, if the number of bit inversions in the bit change track word 326(0) is less than or equal to one-half the word size of the current cache data word 324(0), and the value previously stored in the bit invert field 308 is a ‘0,’ then not writing to the bit invert field 308 and storing a non-inverted form of the write data word 334 would reduce the number of bit write operations for the write request 330. For example, if the write data word provided by the write request is ‘00000000’ and the current cache data word is ‘00000111,’ then the bit change track word would be ‘0000011E’ Assuming that the bit invert field previously contained a ‘0,’ writing the write data word in a non-inverted form would require performing three bit write operations for each ‘1’ in the bit change track word. However, writing the data word in an inverted form would require six bit write operations; five for each ‘0’ in the bit change track word and one to write a ‘1’ to the bit invert field, which previously held a ‘0.’ In this case, where the bit invert field previously contained a ‘0,’ the number of bit inversions in the bit change track word (three) was less than one-half the word size (one-half of the word size of the current cache data word, eight, is a value of four). Thus, not writing to the bit invert field and storing a non-inverted form of the write data word would reduce the number of bit write operations for the write request.
In a third case, if the number of bit inversions in the bit change track word 326(0) is greater than or equal to one-half the word size of the current cache data word 324(0), and the value previously stored in the bit invert field 308 is a ‘1’ (indicating a second logical state), then not writing to the bit invert field 308 and storing an inverted form of the write data word 334 would reduce the number of bit write operations for the write request 330. For example, if the write data word provided by the write request is ‘00000000’ and the current cache data word is ‘00001111,’ then the bit change track word would be ‘0000111E’ Assuming that the bit invert field previously contained a ‘1,’ writing the write data word in a non-inverted form would require performing four bit write operations for each ‘1’ in the bit change track word and one bit write operation for writing a ‘0’ to the bit invert field—resulting in a total of five bit write operations. However, writing the write data word in an inverted form would only require performing four bit write operations; four bit write operations for each ‘0’ in the bit change track word and no bit write operations for the bit invert field because it is already set to ‘1.’ In this case, where the bit invert field previously contained a ‘1,’ the number of bit inversions in the bit change track word (four) was equal to one-half the word size (one-half of the word size of the current cache data word, eight, is a value of four). Thus, not writing to the bit invert field and storing an inverted form of the write data word would reduce the number of bit write operations for the write request.
In a fourth case, if the number of bit inversions in the bit change track word 326(0) is less than one-half the word size of the current cache data word 324(0), and the value previously stored in the bit invert field 308 is a ‘1,’ then writing to the bit invert field 308 and storing a non-inverted form of the write data word 334 would reduce the number of bit write operations for the write request 330. For example, if the write data word provided by the write request is ‘00000000’ and the current cache data word is ‘00000111,’ then the bit change track word would be ‘0000011E’ Assuming that the bit invert field previously contained a ‘1,’ writing the write data word in a non-inverted form would require performing three bit write operations for each ‘1’ in the bit change track word and one bit write operation for writing a ‘0’ to the bit invert field—resulting in a total of four bit write operations. However, writing the write data word in an inverted form would require performing a total of five bit write operations; four bit write operations for each ‘0’ in the bit change track word and no bit write operations for the bit invert field because it is already set to ‘1.’ In this case, where the bit invert field previously contained a ‘1,’ the number of bit inversions in the bit change track word (three) was less than one-half the word size (one-half of the word size of the current cache data word, eight, is a value of four). Thus, writing a ‘0’ to the bit invert field and storing a non-inverted form of the write data word would reduce the number of bit write operations for the write request. Aspects disclosed herein can also be applied to odd word sizes. However, in the case of odd word sizes, algorithms for reducing the number of bit write operations for a given write request may be different from those discussed above with regard to even word sizes.
In each of the above four cases, the cache controller 300 is configured to determine if the write data word 334 should be stored in an inverted form based on the number of bit inversions, the size of the current cache data word 324(0), and the value previously stored in the bit invert field 308. By using these three pieces of information, the cache controller 300 is able to determine the bit inversion state which reduces the number of bit write operations for a given write request.
With further respect to
In the case of a cache miss occurring, the current main memory data word 322(0) may not be included in the cache memory 206, which means that the process discussed above would not have the data necessary to determine whether to store the write data word 334 in the inverted or the non-inverted form. Therefore, the cache controller 300, in conjunction with the memory controller 220, may be configured to first read in data from the main memory 208 in response to a cache miss occurring. For example, if the memory address 332 of the write request 330 corresponds to the main memory data word 322(0), the cache controller 300 can read the main memory data word 322(0) into the cache memory 206 before performing the data bit comparison operation discussed above. Thus, by employing data bit inversion tracking in cache memory, the number of data bits written for write operations can be reduced to reduce power consumption.
In this regard,
While the aspects discussed above have been applied to a binary digital logic number system, aspects disclosed herein may also apply to digital logic number systems of varying bases, such as ternary, quaternary, quinary, senary, septenuary, octal, decimal, duo-decimal, and/or hexadecimal, as non-limiting examples. Further, the above processes and configurations may be performed at varying devices in a processor system and may be performed or configured through hard-coded logic and/or software. Aspects also include using exclusive OR (XOR) gates or any combination of logic gates, such as AND, NAND, OR, NOR, NOT, and/or XNOR, or logic which can be configured to perform such logical operations, such as in a field programmable gate array (FPGA), to perform processes such as determining if the write data word 334 should be stored in an inverted form based on the bit inversion state. Aspects disclosed herein also include generating an ECC for the write data based on the bit inversion state as discussed above. In this regard, generating and decoding an ECC can include error-detecting code (EDC)/ECC (EDC/ECC) techniques and ECC/ECC techniques. ECC words generated as a consequence of such techniques can be stored or decoded in association with the memory address 332 of the write request 330, as illustrated in
In another aspect, a cache memory is provided that includes a means for storing cache data in one or more cache entries each including a data field and a bit change track field. The means for storing the cache data can include the cache array 302 in
Data bit inversion tracking in cache memory to reduce data bits written for write operations according to aspects disclosed herein may be provided in or integrated into any processor-based device. Examples, without limitation, include a set top box, an entertainment unit, a navigation device, a communications device, a fixed location data unit, a mobile location data unit, a global positioning system (GPS) device, a mobile phone, a cellular phone, a smart phone, a session initiation protocol (SIP) phone, a tablet, a phablet, a server, a computer, a portable computer, a mobile computing device, a wearable computing device (e.g., a smart watch, a health or fitness tracker, eyewear, etc.), a desktop computer, a personal digital assistant (PDA), a monitor, a computer monitor, a television, a tuner, a radio, a satellite radio, a music player, a digital music player, a portable music player, a digital video player, a video player, a digital video disc (DVD) player, a portable digital video player, an automobile, a vehicle component, avionics systems, a drone, and a multicopter.
In this regard,
Other master and slave devices can be connected to the system bus 802. As illustrated in
The CPU(s) 202(0)-202(N) may also be configured to access the display controller(s) 814 over the system bus 802 to control information sent to one or more displays 818. The display controller(s) 814 sends information to the display(s) 818 to be displayed via one or more video processors 820, which process the information to be displayed into a format suitable for the display(s) 818. The display(s) 818 can include any type of display, including, but not limited to, a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, a light emitting diode (LED) display, etc.
Those of skill in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithms described in connection with the aspects disclosed herein may be implemented as electronic hardware, instructions stored in memory or in another computer readable medium and executed by a processor or other processing device, or combinations of both. The master devices, and slave devices described herein may be employed in any circuit, hardware component, IC, or IC chip, as examples. Memory disclosed herein may be any type and size of memory and may be configured to store any type of information desired. To clearly illustrate this interchangeability, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. How such functionality is implemented depends upon the particular application, design choices, and/or design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The various illustrative logical blocks, modules, and circuits described in connection with the aspects disclosed herein may be implemented or performed with a processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices (e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration).
The aspects disclosed herein may be embodied in hardware and in instructions that are stored in hardware, and may reside, for example, in Random Access Memory (RAM), flash memory, Read Only Memory (ROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, a hard disk, a removable disk, a CD-ROM, or any other form of computer readable medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a remote station. In the alternative, the processor and the storage medium may reside as discrete components in a remote station, base station, or server.
It is also noted that the operational steps described in any of the exemplary aspects herein are described to provide examples and discussion. The operations described may be performed in numerous different sequences other than the illustrated sequences. Furthermore, operations described in a single operational step may actually be performed in a number of different steps. Additionally, one or more operational steps discussed in the exemplary aspects may be combined. It is to be understood that the operational steps illustrated in the flowchart diagrams may be subject to numerous different modifications as will be readily apparent to one of skill in the art. Those of skill in the art will also understand that information and signals may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Kim, Jung Pill, Kim, Sungryul, Shin, Hyunsuk
Patent | Priority | Assignee | Title |
10783033, | Oct 30 2017 | Samsung Electronics Co., Ltd. | Device and method for accessing in-band memory using data protection |
11086791, | Aug 29 2019 | Micron Technology, Inc | Methods for supporting mismatched transaction granularities |
11374595, | Aug 29 2019 | Commissariat a l Energie Atomique et aux Energies Alternatives | Method for selectively inverting words to be written to a memory and device for implementing same |
11467979, | Aug 29 2019 | Micron Technology, Inc. | Methods for supporting mismatched transaction granularities |
Patent | Priority | Assignee | Title |
3656130, | |||
4413317, | Nov 14 1980 | SPERRY CORPORATION, A CORP OF DE | Multiprocessor system with cache/disk subsystem with status routing for plural disk drives |
4425615, | Nov 14 1980 | SPERRY CORPORATION, A CORP OF DE | Hierarchical memory system having cache/disk subsystem with command queues for plural disks |
5271022, | Sep 29 1989 | Eastman Kodak Company; Eastman Kodak Comany | Digital optical sound system |
5530960, | Dec 17 1991 | Dell USA, L.P. | Disk drive controller accepting first commands for accessing composite drives and second commands for individual diagnostic drive control wherein commands are transparent to each other |
5610872, | Feb 17 1994 | Kabushiki Kaisha Toshiba | Multi-bank synchronous memory system with cascade-type memory cell structure |
5958414, | Sep 03 1997 | AVANT IMMUNOTHERAPEUTICS, INC | Composition to protect a mammal against Bartonella henselae infection |
8606982, | Mar 10 2008 | Polaris Innovations Limited | Derivative logical output |
9047969, | Jan 31 2011 | Everspin Technologies, Inc | Method of writing to a spin torque magnetic random access memory |
9070467, | Sep 07 2012 | Samsung Electronics Co., Ltd. | Memory system including nonvolatile memory device and control method thereof |
9324072, | Aug 22 2008 | IXYS Intl Limited | Bit-flipping memory controller to prevent SRAM data remanence |
9454432, | Jan 31 2011 | Everspin Technologies, Inc. | Method of reading and writing to a spin torque magnetic random access memory with error correcting code |
9502089, | Sep 30 2014 | Everspin Technologies, Inc. | Short detection and inversion |
9830988, | Mar 04 2015 | TAHOE RESEARCH, LTD | Apparatus to reduce retention failure in complementary resistive memory |
20050152234, | |||
20080130428, | |||
20100054022, | |||
20130332799, | |||
20140136764, | |||
20140372814, | |||
20150092502, | |||
20150269991, | |||
20170132140, | |||
20180068714, | |||
20180074892, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Aug 09 2017 | Qualcomm Incorporated | (assignment on the face of the patent) | / | |||
Sep 05 2017 | SHIN, HYUNSUK | Qualcomm Incorporated | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 043598 | /0951 | |
Sep 05 2017 | KIM, JUNG PILL | Qualcomm Incorporated | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 043598 | /0951 | |
Sep 05 2017 | KIM, SUNGRYUL | Qualcomm Incorporated | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 043598 | /0951 |
Date | Maintenance Fee Events |
Mar 09 2022 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Oct 30 2021 | 4 years fee payment window open |
Apr 30 2022 | 6 months grace period start (w surcharge) |
Oct 30 2022 | patent expiry (for year 4) |
Oct 30 2024 | 2 years to revive unintentionally abandoned end. (for year 4) |
Oct 30 2025 | 8 years fee payment window open |
Apr 30 2026 | 6 months grace period start (w surcharge) |
Oct 30 2026 | patent expiry (for year 8) |
Oct 30 2028 | 2 years to revive unintentionally abandoned end. (for year 8) |
Oct 30 2029 | 12 years fee payment window open |
Apr 30 2030 | 6 months grace period start (w surcharge) |
Oct 30 2030 | patent expiry (for year 12) |
Oct 30 2032 | 2 years to revive unintentionally abandoned end. (for year 12) |