Cache memory and method for addressing

Information

  • Patent Application
  • 20040015644
  • Publication Number
    20040015644
  • Date Filed
    July 15, 2003
    21 years ago
  • Date Published
    January 22, 2004
    20 years ago
Abstract
In a cache memory whose addresses are split into tag, index and offset parts, a transformation device is provided in hardware form for performing a transformation between a respective tag part of the address and a coded tag address that is unambiguous in both directions. In addition, the index field of the addresses of the cache memory can be encoded by another mapping procedure that maps the index field onto a coded index field and is unambiguous in both directions. A hardware unit of suitable configuration is also used for this purpose.
Description


BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention


[0003] The invention relates to a cache memory used in a security controller.


[0004] Cache memories are generally relatively small but fast buffer memories that are used for reducing the latency of processor access to slow external memories. The cache memory effectively covers selected address areas of the external memory, and contains both temporarily modified data and information associated with it, such as information for locating the data. The article by Alan Jay Smith titled “Cache Memories” in Computing Surveys, Vol. 14, No.3, September 1982, pages 473-530, provides an overview of cache memories. Hardware-implemented cache memories can be characterized in general as N-way set-associative memory arrays. The extreme cases are given by N=1, representing a direct mapped memory, and N=M, representing a fully associative cache memory, where M is the total number of entries in the memory.


[0005] In general the data is saved in blocks of 2b bytes per memory entry. In the general case of a set-associative cache memory with N=2n ways, a p-bit wide address of the item of data is normally split into n bits for the index, b bits for the offset and the remaining p-n-b bits for the tag. This is illustrated in the attached figure.


[0006] When accessing an item of data in the cache memory, e.g. in a read or write process, the index field is used to address a set directly. The tag field is saved with the respective block in order to identify it uniquely within a set. In an associative search for the block, the tag field of the address is compared with the tag fields of the selected set in order to locate the relevant block. The offset entry is used in order to address the item of data within the block.


[0007] In Published, Non-Prosecuted German Patent Application DE 199 57 810 A1, a scatter-mapping method is described for a cache-memory device. In the method, significant bits that are added to the tag address are used to assign the tag addresses to different areas of the memory by use of a tag mapping table.


[0008] By this method it is possible to select different memory areas whose contents can be transferred to the cache memory, without needing to extend the tag address itself.


[0009] Cache memories of this kind represent easily identifiable regular structures in security controllers. In addition to bus lines and registers, the cache memories therefore constitute preferred physical targets for unauthorized scrutiny or manipulation of security-related data, e.g. by needle attacks or the like. In external memories, security-critical data is normally protected by a hard-to-crack code, which may be implemented as hardware for instance. Even for a hardware-implemented solution, the hard encoding and decoding process using relevant algorithms introduces high latency into the memory operation, which is added to the latency of the memory itself and may well be the predominant factor. This kind of encoding is unsuitable for cache memories, which are typically supposed to allow access in one or at most a very few clock cycles. Cache memories therefore constitute a weak point in the security design of this type of security controller unless other protection is provided.



SUMMARY OF THE INVENTION

[0010] It is accordingly an object of the invention to provide a cache memory and a method for addressing that overcome the above-mentioned disadvantages of the prior art devices and methods of this general type, which defines a facility for effective and practical protection of a cache memory in a security controller.


[0011] With the foregoing and other objects in view there is provided, in accordance with the invention, a cache memory. The cache memory contains addresses split into a tag part, an index part and an offset part. Means are provided for performing a transformation between the tag part of an address and a coded tag address that is unambiguous in both directions.


[0012] In addition, the means may perform a transformation between the index part of the address and a coded index address that is unambiguous in both directions.


[0013] With the foregoing and other objects in view there is provided, in accordance with the invention, a method for addressing a cache memory. The method includes the step of performing a transformation between a tag part of a cache address and a coded tag address that is unambiguous in both directions.


[0014] In accordance with a further mode of the invention, there is the step of performing a transformation between an index part of the cache address and a coded index address that is unambiguous in both directions.


[0015] Other features which are considered as characteristic for the invention are set forth in the appended claims.


[0016] Although the invention is described herein as embodied in a cache memory and a method for addressing, it is nevertheless not intended to be limited to the details described, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims.


[0017] The construction and method of operation of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of specific embodiments.







BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The single FIGURE of the drawing is an illustration of a p-bit wide address setup for a cache memory.







DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] In a cache memory according to the invention, means are provided for performing a transformation between the respective tag part of the address and a coded tag address that is explicit in both directions. The means preferably exist in hardware. The addressing method according to the invention applies a transformation between a tag part of a cache address and a coded tag address that is explicit in both directions, and which is preferably performed using dedicated hardware.


[0020] The solution according to the invention specifies the means and procedure of a method that can be used to increase the security level of items of data and their addresses in cache memories without increasing the access time, or at most increasing it only marginally.


[0021] In set-associative cache memories, as described in the introduction, data is saved and retrieved using an index field and a tag field. According to the invention, mapping that is explicit in both directions (one-to-one mapping) is used to map the tag field of the address onto a coded tag field and vice versa. Blocks are then saved in the cache memory with the coded tag field. Efficient protection of the data block address information is provided by the means. The reversibly explicit mapping is performed here by a dedicated hardware unit. In preferred embodiments this is designed so that the transformation can be performed within one clock cycle, i.e. on the fly, which results in that the cache memory access time is not increased.


[0022] In a further embodiment of the invention, the index field of the cache memory addresses can also be encoded using another mapping procedure that maps the index field onto a coded index field and is explicit in both directions. Once again, a hardware unit of suitable design is used. This performs so-called set scrambling, where the block to be handled in the cache memory is saved in a set that cannot be found by trivial means. This extra form of encoding is preferably implemented if the processor architecture is not configured for unaligned data access, where data extends across block boundaries.


[0023] An embodiment of a cache memory according to the invention is particularly preferred in cache memories in security controllers.


Claims
  • 1. A cache memory, comprising: addresses split into a tag part, an index part and an offset part; and means for performing a transformation between the tag part of an address and a coded tag address being unambiguous in both directions.
  • 2. The cache memory according to claim 1, wherein said means performs a transformation between the index part of the address and a coded index address that is unambiguous in both directions.
  • 3. A method for addressing a cache memory, which comprises the step of: performing a transformation between a tag part of a cache address and a coded tag address being unambiguous in both directions.
  • 4. The method according to claim 3, which further comprises performing a transformation between an index part of the cache address and a coded index address being unambiguous in both directions.
  • 5. A cache memory, comprising: addresses split into a tag part, an index part and an offset part; and a transformation device performing a transformation between the tag part of an address and a coded tag address being unambiguous in both directions.
  • 6. The cache memory according to claim 5, wherein said transformation device performs a transformation between the index part of the address and a coded index address that is unambiguous in both directions.
Priority Claims (1)
Number Date Country Kind
101 01 552.6 Jan 2001 DE
CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application is a continuation of copending International Application PCT/DE01/04821, filed Dec. 20, 2001, which designated the United States and which was not published in English.

Continuations (1)
Number Date Country
Parent PCT/DE01/04821 Dec 2001 US
Child 10619979 Jul 2003 US