US20010044872A1 - Method for controlling a cache memory in a computer system - Google Patents
Method for controlling a cache memory in a computer system Download PDFInfo
- Publication number
- US20010044872A1 US20010044872A1 US09/179,236 US17923698A US2001044872A1 US 20010044872 A1 US20010044872 A1 US 20010044872A1 US 17923698 A US17923698 A US 17923698A US 2001044872 A1 US2001044872 A1 US 2001044872A1
- Authority
- US
- United States
- Prior art keywords
- cache
- memory
- configuration
- tag data
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0864—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using pseudo-associative means, e.g. set-associative or hashing
Definitions
- the present invention relates generally to circuitry and protocols associated with operating cache memory in a computer system, and more particularly, to methods for controlling variously configured cache memory in a computer system.
- the cache memory subsystem 200 includes a cache data array 202 that stores a subset of data stored in a computer system's main memory.
- a cache tag array 204 stores tag data associated with main memory addresses of the data currently copied in the cache data array 202 .
- a cache controller 206 is coupled with the cache data array 202 and the cache tag array 204 to monitor and control operation thereof.
- a processor When a processor wishes to read data from main memory, it drives an address on an address bus 208 , which is coupled with the cache memory subsystem 200 .
- a lower portion of the address bits carried on the address bus 208 indicate which of the various lines in the cache data array 202 may include a copy of the requested data.
- the lower portion of the address is applied to the cache tag array 204 , which responsively produces a corresponding tag value stored in the cache tag array. This tag value corresponds with the upper address bits of the data copied in the cache data array 202 .
- the cache controller 206 includes comparison circuitry (not shown) that compares the tag data output by the cache tag array 204 with an upper portion of the address bits carried on the address bus 208 .
- the cache controller 206 applies a plurality of control signals controlling access to the requested data copied in the cache data array 202 .
- the requested data is then provided to the processor via a data bus 210 coupling the processor with the cache memory subsystem 200 .
- cache system configurations or organizations are commonly available for inclusion in computer systems.
- a “direct-mapped” cache system is organized such that for each addressed location in main memory, there exists one and only one location in the cache data array that could include a copy of such data.
- the cache is configured such that for any one addressed location in main memory, there exists two possible locations within the cache data array that might include a copy of such data.
- cache controller circuitry that monitors and controls a direct-mapped cache configuration is quite different from cache controller circuitry that monitors and controls a two-way set-associative cache configuration.
- a method for controlling a cache memory in a computer system. The method includes determining in which of first and second cache configurations the cache memory is organized. A memory address is received, and corresponding tag data stored in the cache memory is then retrieved. If the cache memory is of the first configuration, then first tag data is retrieved and compared to the memory address. If the cache memory is of the second cache configuration, then second tag data is retrieved and compared to the memory address.
- the first and second cache configurations may be direct-mapped and two-way set-associative configurations, respectively. Determining cache configuration may include receiving a configuration signal and determining which of first and second states the signal has. The first and second tag data may be compared to different first and second portions of the memory address, respectively. If the cache memory is of the second configuration, the first tag data may be retrieved and compared to the second portion of the memory address.
- FIG. 1 is a functional block diagram depicting a cache memory subsystem in accordance with the prior art.
- FIG. 2 is a functional block diagram depicting a computer system adapted to perform a method in accordance with an embodiment of the present invention.
- FIG. 3 is a functional block diagram depicting certain details of a cache memory and a cache controller included in the computer system of FIG. 2.
- FIGS. 4 and 5 are process flow diagrams depicting a method of controlling a cache memory in accordance with an embodiment of the present invention.
- FIG. 2 shows a computer system 20 that is adapted to perform a method in accordance with an embodiment of the present invention.
- a central processing unit such as a microprocessor 22
- a system controller 26 also known as corelogic
- the system controller 26 includes a memory controller 28 for accessing a system memory 30 via a memory bus 32 .
- the microprocessor 22 may be any of a wide variety of processors, such as Pentium-type processors manufactured by Intel or other x86-type architecture processors manufactured by AMD, Cyrix, and others.
- the system memory 30 may include any of a wide variety of suitable memory devices.
- Example memory devices include DRAMs manufactured by Micron Technology, Inc., such as asynchronous DRAMs, synchronous DRAMs, SLDRAMs, etc.
- the system controller 26 also includes CPU interface circuitry 34 that couples the microprocessor 22 with other components of the system controller.
- the system controller 26 also functions as a bridge circuit (sometimes called the host bus bridge or North bridge) between the processor bus 24 and a system bus, such as I/O bus 36 .
- the I/O bus 36 may itself be a combination of one or more bus systems with associated interface circuitry (e.g., AGP bus and PCI bus with connected SCSI and ISA bus systems).
- Multiple I/O devices 38 - 46 are coupled with the I/O bus 36 .
- Such I/O devices include a data input device 38 (such as a keyboard, mouse, etc.), a data output device 40 (such as a printer), a visual display device 42 (commonly coupled with the system controller 26 via a high speed PCI or AGP bus), a data storage device 44 (such as a disk drive, tape drive, CD-ROM drive, etc.), and a communications device 46 (such as a modem, LAN interface, etc.). Additionally, expansion slots 48 are provided for future accommodation of other I/O devices not selected during the original design of the computer system 20 .
- FIG. 2 depicts the computer system 20 as including a single microprocessor 22 , a single system memory 30 , and a single system controller 26 , with the various I/O devices 38 - 46 being coupled with the system controller via a single shared I/O bus 36 and an I/O interface 50 integrated within the system controller.
- the computer system 20 could include multiple processors, memory systems, system controllers, and bus systems.
- one or more of the I/O devices 38 - 46 may have separately dedicated interface connections, in which case the single depicted I/O interface 50 will be understood as a representation for a plurality of separately dedicated and adapted I/O interfaces.
- one or more of the I/O devices 38 - 46 may be coupled with the system controller 26 via a multiple bus and bridge network. Indeed those skilled in the art will understand the depiction of FIG. 2 to encompass any of a wide variety of computer systems including processing circuitry, memory circuitry, I/O circuitry, controller circuitry, bridge/network circuitry, and associated interconnections.
- the computer system 20 also includes a cache memory 52 coupled with the processor bus 24 and with the system controller 26 .
- the cache memory 52 may include any of a wide variety of suitable high-speed memory devices, such as synchronous SRAM modules manufactured by Micron Technology, Inc.
- a cache controller 54 is integrated within the system controller 26 and controls operations of the cache memory 52 via a control bus 56 .
- the cache controller 54 is easily reconfigurable to control operations to any of a plurality of configurations or organizations of the cache memory 52 .
- the cache controller 54 is configurable by a programmable configuration control circuit 58 integrated within the system controller 26 .
- the microprocessor 22 determines the configuration of the cache memory 52 and correspondingly programs the cache configuration control circuit 58 to set the configuration control of the cache controller 54 .
- FIG. 3 depicts certain details of the configurable cache controller 54 and the cache memory 52 .
- a cache controller is shown which can be readily configured to address a direct-mapped or a two-way set-associative cache memory configuration.
- Those skilled in the art will appreciate, however, that the principles described in connection with this embodiment may be readily extended to provide cache controller circuitry that is configurable to control cache memories in any of a wide variety of known or future-developed configurations.
- the cache memory 52 may include first and second cache data arrays 62 and 64 respectively.
- a first cache tag array 66 is associated with the first cache data array 62
- a second cache tag array 68 is associated with the second cache data array 64 .
- Each of the cache data arrays 62 , 64 is coupled with an address bus portion 70 and a data bus portion 72 of the processor bus 24 shown in FIG. 2.
- the cache memory 52 is a one megabyte direct-mapped cache with a 32 byte (four quadword) line width.
- the data bus carries 64 parallel data bits (one quadword), and the cache data array 62 includes four 32 k ⁇ 64 SRAM memory devices.
- the associated first cache tag array 66 includes a 32 k ⁇ 8 SRAM device with processor address bits A 5 -A 19 being the lower portion of the address that is applied to the first cache tag array 66 to select one of the 32 k cache lines.
- the tag data output by the cache tag array 66 then corresponds to address bits A 20 -A 27 .
- the lower portion of the address applied to the first cache data array 62 corresponds with processor address bits A 3 -A 19 , with address bits A 3 and A 4 used to select one of the four quadwords stored in each cache line.
- the second cache data array 64 and associated cache tag array 68 either do not exist or are circuits that are disabled.
- the cache memory 52 is a one megabyte two-way set-associative cache with a 32 byte line width. In this case, both the first and second cache data array 62 and 64 and associated cache tag arrays 66 and 68 are populated.
- Each of the cache data arrays 62 and 64 includes two 32 k ⁇ 64 SRAM memory devices, and each of the cache tag array 66 and 68 includes a 16 k ⁇ 8 SRAM device.
- the processor address bits A 5 -A 18 are applied to the cache tag arrays to address the 16 k lines in the cache.
- the cache data arrays 62 and 64 receive the processor address bit A 3 -A 18 applied thereto, with address bits A 3 and A 4 used to select one of four quadwords of data stored in each cache line.
- the tag data output by the cache tag array 66 and 68 corresponds with address bits Al 9 -A 26 .
- the cache controller 54 includes first and second comparators 72 and 74 , respectively.
- the first comparator 72 receives the tag data from the cache tag array 66 and compares it with the associated upper portion of the address carried on the address bus 70 .
- the second comparator 74 receives the tag data from the cache tag array 68 and compares it with the associated upper portion of the address on the address bus 70 .
- a configuration signal is applied to each of the first and second comparators 72 and 74 by the configuration control circuit 58 (see FIG. 2).
- the configuration signal selectively enables the first and second comparators 72 and 74 .
- the configuration signal has first and second states, with the first state enabling solely the first comparator 72 and the second state enabling both the first and second comparators 72 and 74 . In this way, the configuration signal of first and second states selectively enables comparators for comparing tag data output by tag caches associated with either a direct-mapped or two-way set-associative cache configuration.
- the cache controller 54 also includes first and second control circuits 76 and 78 , respectively.
- the first control circuit 76 is enabled in response to a comparison match or asserted hit signal produced by the first comparator 72 .
- the second control circuit 78 is enabled in response to a comparison match or asserted hit signal produced by the second comparator 74 .
- Each of the control circuits 76 and 78 is coupled with a respective one of the first and second cache data arrays 62 and 64 and controls the operations thereof.
- each of the first and second control circuits 76 and 78 produces a plurality of well-known control signals in a well-known sequence to control access to data stored in a respective one of the cache data arrays 62 and 64 .
- Examples of such well-known control signals include the various cache write enable signals, the cache output enable signal, byte write enable signals, chip select signals, synchronous address status control signals, etc.
- the upper portion of the address corresponding to the output tag data may vary depending upon the particular cache configuration.
- the first comparator 72 compares the tag data output by the first cache tag data array 66 to a first upper portion of the address in response to a configuration signal of the first state and to a second upper portion of the address in response to a configuration signal of the second state.
- process flow charts depict operations 100 and 120 that are included in a method of controlling a cache memory in accordance with an embodiment of the present invention.
- the operations 100 and 102 may be performed using the circuitry described above in connection with FIGS. 2 and 3.
- operations 100 begin at step 102 with receipt of an address, such as by presentation of the address to the cache controller 54 on the address bus portion 70 of the processor bus 24 .
- conditional branch test step 104 a determination is made of the cache configuration, such as by determining the state of the cache configuration signal. If the configuration is a direct-mapped cache configuration, a comparison address is set in step 106 to be a first upper portion of the address.
- the comparison address is set in step 108 to be a second upper portion of the address.
- a conditional branch test is performed in step 110 , in which it is determined whether tag data (such as that output by the first cache tag array 66 ) matches the respective first or second upper portions of the address. If a match occurs, data transfer operations are initiated in step 112 , such as by the first comparator 72 asserting the hit signal to enable operations of the first control circuit 76 . If a match does not occur, the hit signal remains deasserted. Operations 100 then cease pending receipt of another address.
- operations 120 also begin upon receipt of the address at step 122 .
- conditional branch test step 124 the cache configuration is determined. If the configuration is the direct-mapped cache configuration, operations 120 end, with, for example, the second comparator 74 producing a deasserted hit signal. If the configuration is instead the two-way set-associative cache configuration, the comparison address is set in step 126 to be the second upper portion of the address. A conditional branch test is then performed at step 128 , in which it is determined whether tag data (such as that output by the second cache tag array 68 ) matches the second upper portion of the address.
- tag data such as that output by the second cache tag array 68
- step 130 data transfer operations are initiated in step 130 , such as by the second comparator 74 asserting the hit signal to enable operations of the second control circuit 78 . If no match occurs, the hit signal produced by the second comparator 74 remains deasserted. Operations 120 then cease pending receipt of another address.
- the above-described embodiment of the cache controller 54 provides a readily configurable cache controller that can control both direct-mapped and two-way set-associative cache configurations via a two-state programmed configuration control circuit, such as a simple flip-flop.
- the comparators 72 and 74 could themselves include a register input programmed upon system initialization to selectively enable operations during subsequent system operations. While the above-described embodiment shows a programmable reconfigurable cache controller that can be configured to address one of two cache system configurations, those skilled in the art will appreciate that the above-described principles can be extended to other cache configurations.
- FIGS. 2 and 3 represent just one of many possible implementations of a configurable cache controller that may be programmed to monitor and control a variety of cache memory configurations.
- FIGS. 2 and 3 represent just one of many possible implementations of a configurable cache controller that may be programmed to monitor and control a variety of cache memory configurations.
- FIGS. 2 and 3 represent just one of many possible implementations of a configurable cache controller that may be programmed to monitor and control a variety of cache memory configurations.
- FIGS. 2 and 3 is of a type known in the art. Therefore, one skilled in the art will be readily able to adapt such circuits in the described combination to practice this invention. Particular details of these circuits are not critical to the invention, and a detailed description of the internal circuit operation need not be provided.
- each one of the process steps described in connection with FIGS. 4 and 5 is of a type well-known in the art, and may itself be a sequence of operations that need not be described in detail in order for one skilled in the art to practice the invention.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
- The present invention relates generally to circuitry and protocols associated with operating cache memory in a computer system, and more particularly, to methods for controlling variously configured cache memory in a computer system.
- As processor speeds have rapidly increased in today's computer systems, the speed of economical memory devices has increased at a much slower pace. Thus, to take full advantage of the improved performance of today's faster and more powerful processors, faster and more expensive memory devices must be used. In order to reduce costs, however, most computer systems include a main memory populated by relatively economical (and slow) memory devices and a smaller cache memory populated by relatively expensive (and fast) memory devices. Commonly, the economical memory devices used in the main memory include dynamic random access memory devices (DRAMs), and the more expensive memory devices used in the cache include static random access memory devices (SRAMs). During computer system operation, the cache memory stores a subset of the data stored in the main memory. When a processor requests access to data stored in the main memory, that data may be more quickly provided if a copy is resident in the cache memory.
- Referring to FIG. 1, a prior art
cache memory subsystem 200 is depicted. Thecache memory subsystem 200 includes acache data array 202 that stores a subset of data stored in a computer system's main memory. Acache tag array 204 stores tag data associated with main memory addresses of the data currently copied in thecache data array 202. Acache controller 206 is coupled with thecache data array 202 and thecache tag array 204 to monitor and control operation thereof. - When a processor wishes to read data from main memory, it drives an address on an
address bus 208, which is coupled with thecache memory subsystem 200. A lower portion of the address bits carried on theaddress bus 208 indicate which of the various lines in thecache data array 202 may include a copy of the requested data. The lower portion of the address is applied to thecache tag array 204, which responsively produces a corresponding tag value stored in the cache tag array. This tag value corresponds with the upper address bits of the data copied in thecache data array 202. Thecache controller 206 includes comparison circuitry (not shown) that compares the tag data output by thecache tag array 204 with an upper portion of the address bits carried on theaddress bus 208. In the event the tag data and the upper portion of the address bits match (known as a “cache hit”), thecache controller 206 applies a plurality of control signals controlling access to the requested data copied in thecache data array 202. The requested data is then provided to the processor via adata bus 210 coupling the processor with thecache memory subsystem 200. - As is known to those skilled in the art, a wide variety of cache system configurations or organizations are commonly available for inclusion in computer systems. For example, a “direct-mapped” cache system is organized such that for each addressed location in main memory, there exists one and only one location in the cache data array that could include a copy of such data. In a “two-way set-associative” cache system, the cache is configured such that for any one addressed location in main memory, there exists two possible locations within the cache data array that might include a copy of such data. Typically, cache controller circuitry that monitors and controls a direct-mapped cache configuration is quite different from cache controller circuitry that monitors and controls a two-way set-associative cache configuration.
- For the purposes of computer system performance and cost trade off studies, it is important that more than one cache configuration design be available for testing in a given computer system. Ideally, reconfiguration of the cache memory system would be straightforward and inexpensive to reduce testing time and expense. In today's computer systems, different cache memory configurations require different cache controller hardware. This requires two or more separate system design revisions to be developed in order to test multiple cache memory configurations in a given computer system. This leads to longer design cycles and, if more than one cache configuration is to be included in manufactured products, additional inventory must be maintained. In the case of today's computer systems including the Intel Pentium-type processors, different L2 cache configurations require different motherboard designs with significantly different components. Computer systems having readily reconfigurable cache memory subsystems are not currently available.
- In accordance with the present invention, a method is provided for controlling a cache memory in a computer system. The method includes determining in which of first and second cache configurations the cache memory is organized. A memory address is received, and corresponding tag data stored in the cache memory is then retrieved. If the cache memory is of the first configuration, then first tag data is retrieved and compared to the memory address. If the cache memory is of the second cache configuration, then second tag data is retrieved and compared to the memory address.
- The first and second cache configurations may be direct-mapped and two-way set-associative configurations, respectively. Determining cache configuration may include receiving a configuration signal and determining which of first and second states the signal has. The first and second tag data may be compared to different first and second portions of the memory address, respectively. If the cache memory is of the second configuration, the first tag data may be retrieved and compared to the second portion of the memory address.
- FIG. 1 is a functional block diagram depicting a cache memory subsystem in accordance with the prior art.
- FIG. 2 is a functional block diagram depicting a computer system adapted to perform a method in accordance with an embodiment of the present invention.
- FIG. 3 is a functional block diagram depicting certain details of a cache memory and a cache controller included in the computer system of FIG. 2.
- FIGS. 4 and 5 are process flow diagrams depicting a method of controlling a cache memory in accordance with an embodiment of the present invention.
- The following describes a novel method for controlling a cache memory in a computer system. Certain details are set forth to provide a sufficient understanding of the present invention. However, it will be clear to one skilled in the art, that the present invention may be practiced without these particular details. In other instances, well-known circuits, control signals, timing protocols, and software operations have not been shown in detail in order to avoid unnecessarily obscuring the invention.
- FIG. 2 shows a
computer system 20 that is adapted to perform a method in accordance with an embodiment of the present invention. A central processing unit (CPU), such as amicroprocessor 22, is coupled with a system controller 26 (also known as corelogic) by a host orprocessor bus 24 that carries address, data and control signals therebetween. Thesystem controller 26 includes amemory controller 28 for accessing asystem memory 30 via amemory bus 32. Themicroprocessor 22 may be any of a wide variety of processors, such as Pentium-type processors manufactured by Intel or other x86-type architecture processors manufactured by AMD, Cyrix, and others. Thesystem memory 30 may include any of a wide variety of suitable memory devices. Example memory devices include DRAMs manufactured by Micron Technology, Inc., such as asynchronous DRAMs, synchronous DRAMs, SLDRAMs, etc. Thesystem controller 26 also includesCPU interface circuitry 34 that couples themicroprocessor 22 with other components of the system controller. - The
system controller 26 also functions as a bridge circuit (sometimes called the host bus bridge or North bridge) between theprocessor bus 24 and a system bus, such as I/O bus 36. The I/O bus 36 may itself be a combination of one or more bus systems with associated interface circuitry (e.g., AGP bus and PCI bus with connected SCSI and ISA bus systems). Multiple I/O devices 38-46 are coupled with the I/O bus 36. Such I/O devices include a data input device 38 (such as a keyboard, mouse, etc.), a data output device 40 (such as a printer), a visual display device 42 (commonly coupled with thesystem controller 26 via a high speed PCI or AGP bus), a data storage device 44 (such as a disk drive, tape drive, CD-ROM drive, etc.), and a communications device 46 (such as a modem, LAN interface, etc.). Additionally,expansion slots 48 are provided for future accommodation of other I/O devices not selected during the original design of thecomputer system 20. - FIG. 2 depicts the
computer system 20 as including asingle microprocessor 22, asingle system memory 30, and asingle system controller 26, with the various I/O devices 38-46 being coupled with the system controller via a single shared I/O bus 36 and an I/O interface 50 integrated within the system controller. Those skilled in the art will appreciate that thecomputer system 20 could include multiple processors, memory systems, system controllers, and bus systems. Also, those skilled in the art will understand that one or more of the I/O devices 38-46 may have separately dedicated interface connections, in which case the single depicted I/O interface 50 will be understood as a representation for a plurality of separately dedicated and adapted I/O interfaces. Alternatively, one or more of the I/O devices 38-46 may be coupled with thesystem controller 26 via a multiple bus and bridge network. Indeed those skilled in the art will understand the depiction of FIG. 2 to encompass any of a wide variety of computer systems including processing circuitry, memory circuitry, I/O circuitry, controller circuitry, bridge/network circuitry, and associated interconnections. - The
computer system 20 also includes acache memory 52 coupled with theprocessor bus 24 and with thesystem controller 26. Thecache memory 52 may include any of a wide variety of suitable high-speed memory devices, such as synchronous SRAM modules manufactured by Micron Technology, Inc. Acache controller 54 is integrated within thesystem controller 26 and controls operations of thecache memory 52 via acontrol bus 56. In accordance with the present invention, thecache controller 54 is easily reconfigurable to control operations to any of a plurality of configurations or organizations of thecache memory 52. In one embodiment, thecache controller 54 is configurable by a programmableconfiguration control circuit 58 integrated within thesystem controller 26. During power-on self-test and system initialization operations, themicroprocessor 22 determines the configuration of thecache memory 52 and correspondingly programs the cacheconfiguration control circuit 58 to set the configuration control of thecache controller 54. - FIG. 3 depicts certain details of the
configurable cache controller 54 and thecache memory 52. In this particular depiction, a cache controller is shown which can be readily configured to address a direct-mapped or a two-way set-associative cache memory configuration. Those skilled in the art will appreciate, however, that the principles described in connection with this embodiment may be readily extended to provide cache controller circuitry that is configurable to control cache memories in any of a wide variety of known or future-developed configurations. - Referring to FIG. 3, the
cache memory 52 may include first and second 62 and 64 respectively. A firstcache data arrays cache tag array 66 is associated with the firstcache data array 62, and a secondcache tag array 68 is associated with the secondcache data array 64. Each of the 62, 64 is coupled with ancache data arrays address bus portion 70 and adata bus portion 72 of theprocessor bus 24 shown in FIG. 2. In one embodiment, thecache memory 52 is a one megabyte direct-mapped cache with a 32 byte (four quadword) line width. The data bus carries 64 parallel data bits (one quadword), and thecache data array 62 includes four 32 k×64 SRAM memory devices. The associated firstcache tag array 66 includes a 32 k×8 SRAM device with processor address bits A5-A19 being the lower portion of the address that is applied to the firstcache tag array 66 to select one of the 32 k cache lines. The tag data output by thecache tag array 66 then corresponds to address bits A20-A27. The lower portion of the address applied to the firstcache data array 62 corresponds with processor address bits A3-A19, with address bits A3 and A4 used to select one of the four quadwords stored in each cache line. - In the direct-mapped configuration of the
cache memory 52, the secondcache data array 64 and associatedcache tag array 68 either do not exist or are circuits that are disabled. In another embodiment, thecache memory 52 is a one megabyte two-way set-associative cache with a 32 byte line width. In this case, both the first and second 62 and 64 and associatedcache data array 66 and 68 are populated. Each of thecache tag arrays 62 and 64 includes two 32 k×64 SRAM memory devices, and each of thecache data arrays 66 and 68 includes a 16 k×8 SRAM device. In this case, the processor address bits A5-A18 are applied to the cache tag arrays to address the 16 k lines in the cache. Thecache tag array 62 and 64 receive the processor address bit A3-A18 applied thereto, with address bits A3 and A4 used to select one of four quadwords of data stored in each cache line. In this two-way set-associative configuration, the tag data output by thecache data arrays 66 and 68 corresponds with address bits Al9-A26.cache tag array - The
cache controller 54 includes first andsecond comparators 72 and 74, respectively. Thefirst comparator 72 receives the tag data from thecache tag array 66 and compares it with the associated upper portion of the address carried on theaddress bus 70. The second comparator 74 receives the tag data from thecache tag array 68 and compares it with the associated upper portion of the address on theaddress bus 70. A configuration signal is applied to each of the first andsecond comparators 72 and 74 by the configuration control circuit 58 (see FIG. 2). The configuration signal selectively enables the first andsecond comparators 72 and 74. In particular, the configuration signal has first and second states, with the first state enabling solely thefirst comparator 72 and the second state enabling both the first andsecond comparators 72 and 74. In this way, the configuration signal of first and second states selectively enables comparators for comparing tag data output by tag caches associated with either a direct-mapped or two-way set-associative cache configuration. - The
cache controller 54 also includes first and 76 and 78, respectively. Thesecond control circuits first control circuit 76 is enabled in response to a comparison match or asserted hit signal produced by thefirst comparator 72. Thesecond control circuit 78 is enabled in response to a comparison match or asserted hit signal produced by the second comparator 74. Each of the 76 and 78 is coupled with a respective one of the first and secondcontrol circuits 62 and 64 and controls the operations thereof.cache data arrays - When the configuration signal has the first state, the
first comparator 72 is enabled, while the second comparator 74 is disabled. Thus thesecond control circuit 78 will never receive an applied hit signal and is likewise disabled. When the configuration signal has the second state, both the first andsecond comparator 72 and 74 are enabled, and each of thecontrol circuits 76 may be selectively enabled in response to an asserted hit signal produced by a respective one of the comparators. As is well known to those skilled in art, each of the first and 76 and 78 produces a plurality of well-known control signals in a well-known sequence to control access to data stored in a respective one of thesecond control circuits 62 and 64. Examples of such well-known control signals include the various cache write enable signals, the cache output enable signal, byte write enable signals, chip select signals, synchronous address status control signals, etc.cache data arrays - As described above, the upper portion of the address corresponding to the output tag data may vary depending upon the particular cache configuration. In the above-described exemplary embodiments, therefore, the
first comparator 72 compares the tag data output by the first cachetag data array 66 to a first upper portion of the address in response to a configuration signal of the first state and to a second upper portion of the address in response to a configuration signal of the second state. - Referring to FIGS. 4 and 5, process flow charts depict
100 and 120 that are included in a method of controlling a cache memory in accordance with an embodiment of the present invention. Theoperations 100 and 102 may be performed using the circuitry described above in connection with FIGS. 2 and 3. Referring to FIG. 4,operations operations 100 begin atstep 102 with receipt of an address, such as by presentation of the address to thecache controller 54 on theaddress bus portion 70 of theprocessor bus 24. In conditionalbranch test step 104, a determination is made of the cache configuration, such as by determining the state of the cache configuration signal. If the configuration is a direct-mapped cache configuration, a comparison address is set instep 106 to be a first upper portion of the address. If the configuration is instead a two-way set-associative cache configuration, the comparison address is set instep 108 to be a second upper portion of the address. Following either of 106 or 108, a conditional branch test is performed insteps step 110, in which it is determined whether tag data (such as that output by the first cache tag array 66) matches the respective first or second upper portions of the address. If a match occurs, data transfer operations are initiated instep 112, such as by thefirst comparator 72 asserting the hit signal to enable operations of thefirst control circuit 76. If a match does not occur, the hit signal remains deasserted.Operations 100 then cease pending receipt of another address. - Referring to FIG. 5,
operations 120 also begin upon receipt of the address atstep 122. In conditionalbranch test step 124, the cache configuration is determined. If the configuration is the direct-mapped cache configuration,operations 120 end, with, for example, the second comparator 74 producing a deasserted hit signal. If the configuration is instead the two-way set-associative cache configuration, the comparison address is set instep 126 to be the second upper portion of the address. A conditional branch test is then performed atstep 128, in which it is determined whether tag data (such as that output by the second cache tag array 68) matches the second upper portion of the address. If a match occurs, data transfer operations are initiated instep 130, such as by the second comparator 74 asserting the hit signal to enable operations of thesecond control circuit 78. If no match occurs, the hit signal produced by the second comparator 74 remains deasserted.Operations 120 then cease pending receipt of another address. - Those skilled in the art will appreciate that the above-described embodiment of the
cache controller 54 provides a readily configurable cache controller that can control both direct-mapped and two-way set-associative cache configurations via a two-state programmed configuration control circuit, such as a simple flip-flop. Alternatively, thecomparators 72 and 74 could themselves include a register input programmed upon system initialization to selectively enable operations during subsequent system operations. While the above-described embodiment shows a programmable reconfigurable cache controller that can be configured to address one of two cache system configurations, those skilled in the art will appreciate that the above-described principles can be extended to other cache configurations. - While the present invention has been described in connection with reading data stored in a cache memory, those skilled in the art will understand the operation of the above-described circuitry and associated protocols used in connection with writing data to a cache memory. Therefore, a detailed description of such write operations is neither required nor provided. Those skilled in the art will also understand that while a cache memory is typically implemented with separate cache tag and cache data memory devices, such separation is functional only and can instead be implemented within a single memory device or array structure. Similarly, while a two-way set-associate cache memory is commonly implemented with two separate cache tag memory devices and two separate cache data devices, other functionally equivalent implementations are possible. Thus, the present invention is not limited solely to methods for controlling cache memory systems having multiple and physically distinct memory devices or arrays, but instead encompasses cache memory systems having a wide variety of configurations that may be particularly implemented in a wide variety of ways.
- Those skilled in the art will appreciate that the present invention may be accomplished with circuits other than those depicted and described in connection with FIGS. 2 and 3. These figures represent just one of many possible implementations of a configurable cache controller that may be programmed to monitor and control a variety of cache memory configurations. Those skilled in the art will also understand that each of the circuits whose function, method of operation, and interconnection is described in connection with FIGS. 2 and 3 is of a type known in the art. Therefore, one skilled in the art will be readily able to adapt such circuits in the described combination to practice this invention. Particular details of these circuits are not critical to the invention, and a detailed description of the internal circuit operation need not be provided. Similarly, each one of the process steps described in connection with FIGS. 4 and 5 is of a type well-known in the art, and may itself be a sequence of operations that need not be described in detail in order for one skilled in the art to practice the invention.
- It will be appreciated that, although specific embodiments of the invention have been described for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the invention. Those skilled in the art will appreciate that many of the advantages associated with the circuits and processes described above may be provided by other circuit configurations and processes. Indeed, a number of suitable circuit components can be adapted and combined in a variety of circuit topologies to implement methods of controlling variously configured cache memories in accordance with the present invention. Accordingly, the invention is not limited by the particular disclosed embodiments, but instead the scope of the invention is determined by the following claims.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US09/179,236 US6425056B2 (en) | 1998-10-26 | 1998-10-26 | Method for controlling a direct mapped or two way set associative cache memory in a computer system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US09/179,236 US6425056B2 (en) | 1998-10-26 | 1998-10-26 | Method for controlling a direct mapped or two way set associative cache memory in a computer system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| US20010044872A1 true US20010044872A1 (en) | 2001-11-22 |
| US6425056B2 US6425056B2 (en) | 2002-07-23 |
Family
ID=22655773
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US09/179,236 Expired - Lifetime US6425056B2 (en) | 1998-10-26 | 1998-10-26 | Method for controlling a direct mapped or two way set associative cache memory in a computer system |
Country Status (1)
| Country | Link |
|---|---|
| US (1) | US6425056B2 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050086417A1 (en) * | 2003-10-17 | 2005-04-21 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US20060271347A1 (en) * | 2002-08-29 | 2006-11-30 | Micron Technology, Inc. | Method for generating commands for testing hardware device models |
| US20100088460A1 (en) * | 2008-10-07 | 2010-04-08 | Micron Technology, Inc. | Memory apparatus, systems, and methods |
| KR20170070920A (en) * | 2015-12-14 | 2017-06-23 | 삼성전자주식회사 | Nonvolatile memory module, computing system having the same, and operating method thereof |
| GB2627528A (en) * | 2023-02-27 | 2024-08-28 | Imagination Tech Ltd | Flexible cache structure for caching compressed and uncompressed data |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3748895B2 (en) * | 1997-02-13 | 2006-02-22 | 三菱電機株式会社 | Encoding apparatus, decoding apparatus, encoding method, and decoding method |
| JP4097883B2 (en) * | 2000-07-04 | 2008-06-11 | 松下電器産業株式会社 | Data transfer apparatus and method |
| US6848024B1 (en) * | 2000-08-07 | 2005-01-25 | Broadcom Corporation | Programmably disabling one or more cache entries |
| US6760272B2 (en) * | 2000-12-07 | 2004-07-06 | International Business Machines Corporation | Method and system for supporting multiple cache configurations |
| KR100445630B1 (en) * | 2001-02-13 | 2004-08-25 | 삼성전자주식회사 | Low Power Consumption Cache Memory And Method of Determining Hit/Miss Thereof |
| US6789169B2 (en) * | 2001-10-04 | 2004-09-07 | Micron Technology, Inc. | Embedded DRAM cache memory and method having reduced latency |
| US7307905B2 (en) * | 2002-08-09 | 2007-12-11 | The Governing Council Of The University Of Toronto | Low leakage asymmetric SRAM cell devices |
| US20080201528A1 (en) * | 2005-04-06 | 2008-08-21 | Mediatek Inc. | Memory access systems for configuring ways as cache or directly addressable memory |
| US9582430B2 (en) * | 2015-03-27 | 2017-02-28 | Intel Corporation | Asymmetric set combined cache |
| US10019367B2 (en) | 2015-12-14 | 2018-07-10 | Samsung Electronics Co., Ltd. | Memory module, computing system having the same, and method for testing tag error thereof |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4928225A (en) * | 1988-08-25 | 1990-05-22 | Edgcore Technology, Inc. | Coherent cache structures and methods |
| US5014195A (en) * | 1990-05-10 | 1991-05-07 | Digital Equipment Corporation, Inc. | Configurable set associative cache with decoded data element enable lines |
| US5497458A (en) * | 1993-07-06 | 1996-03-05 | Dell Usa, L.P. | Cache testability circuit for embedded diagnostics |
| US5548742A (en) * | 1994-08-11 | 1996-08-20 | Intel Corporation | Method and apparatus for combining a direct-mapped cache and a multiple-way cache in a cache memory |
| US5900012A (en) * | 1995-05-10 | 1999-05-04 | Advanced Micro Devices, Inc. | Storage device having varying access times and a superscalar microprocessor employing the same |
| JPH0950401A (en) * | 1995-08-09 | 1997-02-18 | Toshiba Corp | Cache memory and information processing apparatus including the same |
| US5701438A (en) * | 1995-09-29 | 1997-12-23 | Intel Corporation | Logical relocation of memory based on memory device type |
| US5845317A (en) * | 1995-11-17 | 1998-12-01 | Micron Technology, Inc. | Multi-way cache expansion circuit architecture |
| US5708791A (en) * | 1996-02-02 | 1998-01-13 | National Semiconductor Corporation | System and method for detecting the DRAM architecture in a computer |
| US5978888A (en) * | 1997-04-14 | 1999-11-02 | International Business Machines Corporation | Hardware-managed programmable associativity caching mechanism monitoring cache misses to selectively implement multiple associativity levels |
-
1998
- 1998-10-26 US US09/179,236 patent/US6425056B2/en not_active Expired - Lifetime
Cited By (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060271347A1 (en) * | 2002-08-29 | 2006-11-30 | Micron Technology, Inc. | Method for generating commands for testing hardware device models |
| US9652412B2 (en) | 2003-10-17 | 2017-05-16 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US8806152B2 (en) | 2003-10-17 | 2014-08-12 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US7779212B2 (en) | 2003-10-17 | 2010-08-17 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US20100299440A1 (en) * | 2003-10-17 | 2010-11-25 | Meyer James W | Method and apparatus for sending data from multiple sources over a communications bus |
| US8095748B2 (en) | 2003-10-17 | 2012-01-10 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US20050086417A1 (en) * | 2003-10-17 | 2005-04-21 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US8327089B2 (en) | 2003-10-17 | 2012-12-04 | Micron Technology, Inc. | Method and apparatus for sending data from multiple sources over a communications bus |
| US8949538B2 (en) | 2008-10-07 | 2015-02-03 | Micron Technology, Inc. | Interface device accessing a stack of memory dice and a solid state disk |
| US20100088460A1 (en) * | 2008-10-07 | 2010-04-08 | Micron Technology, Inc. | Memory apparatus, systems, and methods |
| US9542102B2 (en) | 2008-10-07 | 2017-01-10 | Micron Technology, Inc. | Stacked memory devices, systems, and methods |
| US8583870B2 (en) | 2008-10-07 | 2013-11-12 | Micron Technology, Inc. | Stacked memory devices, systems, and methods |
| US8281074B2 (en) | 2008-10-07 | 2012-10-02 | Micron Technology, Inc. | Interface device for memory in a stack, storage devices and a processor |
| US9990144B2 (en) | 2008-10-07 | 2018-06-05 | Micron Technology, Inc. | Stacked memory devices, systems, and methods |
| US10430086B2 (en) | 2008-10-07 | 2019-10-01 | Micron Technology, Inc. | Stacked memory devices, systems, and methods |
| KR20170070920A (en) * | 2015-12-14 | 2017-06-23 | 삼성전자주식회사 | Nonvolatile memory module, computing system having the same, and operating method thereof |
| KR102491651B1 (en) | 2015-12-14 | 2023-01-26 | 삼성전자주식회사 | Nonvolatile memory module, computing system having the same, and operating method thereof |
| GB2627528A (en) * | 2023-02-27 | 2024-08-28 | Imagination Tech Ltd | Flexible cache structure for caching compressed and uncompressed data |
Also Published As
| Publication number | Publication date |
|---|---|
| US6425056B2 (en) | 2002-07-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7213082B2 (en) | Memory hub and method for providing memory sequencing hints | |
| EP1665058B1 (en) | Memory module and method having on-board data search capabilites and processor-based system using such memory modules | |
| US8195918B2 (en) | Memory hub with internal cache and/or memory access prediction | |
| US6192458B1 (en) | High performance cache directory addressing scheme for variable cache sizes utilizing associativity | |
| US5857084A (en) | Hierarchical bus structure access system | |
| US5809280A (en) | Adaptive ahead FIFO with LRU replacement | |
| US6425056B2 (en) | Method for controlling a direct mapped or two way set associative cache memory in a computer system | |
| US7461286B2 (en) | System and method for using a learning sequence to establish communications on a high-speed nonsynchronous interface in the absence of clock forwarding | |
| US7222213B2 (en) | System and method for communicating the synchronization status of memory modules during initialization of the memory modules | |
| US7310752B2 (en) | System and method for on-board timing margin testing of memory modules | |
| US7434081B2 (en) | System and method for read synchronization of memory modules | |
| US5249284A (en) | Method and system for maintaining data coherency between main and cache memories | |
| US6157980A (en) | Cache directory addressing scheme for variable cache sizes | |
| US6219765B1 (en) | Memory paging control apparatus | |
| US5555209A (en) | Circuit for latching data signals from DRAM memory | |
| EP0509994B1 (en) | Centralized reference and change table for a multiprocessor virtual memory system | |
| JP3886189B2 (en) | Microprocessor device supporting burstable and non-cacheable memory access | |
| US6219764B1 (en) | Memory paging control method | |
| US6591332B1 (en) | Apparatus and method for tracking flushes of cache entries in a data processing system | |
| US6055600A (en) | Method and apparatus for detecting the presence and identification of level two cache modules | |
| US5809534A (en) | Performing a write cycle to memory in a multi-processor system | |
| US6484238B1 (en) | Apparatus and method for detecting snoop hits on victim lines issued to a higher level cache | |
| US5960456A (en) | Method and apparatus for providing a readable and writable cache tag memory | |
| US6507878B1 (en) | Bus snoop control circuit | |
| JPH10228412A (en) | Method and device for using edo memory device in memory system designed for fpm memory device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AS | Assignment |
Owner name: MICRON ELECTRONICS, INC., IDAHO Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MEYER, JAMES W.;REEL/FRAME:009809/0930 Effective date: 19990112 |
|
| AS | Assignment |
Owner name: MICRON TECHNOLOGY, INC., IOWA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MICRON ELECTRONICS, INC.;REEL/FRAME:010763/0572 Effective date: 20000317 |
|
| STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
| FPAY | Fee payment |
Year of fee payment: 4 |
|
| FPAY | Fee payment |
Year of fee payment: 8 |
|
| FPAY | Fee payment |
Year of fee payment: 12 |
|
| AS | Assignment |
Owner name: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT, CALIFORNIA Free format text: SECURITY INTEREST;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:038669/0001 Effective date: 20160426 Owner name: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGEN Free format text: SECURITY INTEREST;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:038669/0001 Effective date: 20160426 |
|
| AS | Assignment |
Owner name: MORGAN STANLEY SENIOR FUNDING, INC., AS COLLATERAL AGENT, MARYLAND Free format text: PATENT SECURITY AGREEMENT;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:038954/0001 Effective date: 20160426 Owner name: MORGAN STANLEY SENIOR FUNDING, INC., AS COLLATERAL Free format text: PATENT SECURITY AGREEMENT;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:038954/0001 Effective date: 20160426 |
|
| AS | Assignment |
Owner name: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT, CALIFORNIA Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE REPLACE ERRONEOUSLY FILED PATENT #7358718 WITH THE CORRECT PATENT #7358178 PREVIOUSLY RECORDED ON REEL 038669 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY INTEREST;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:043079/0001 Effective date: 20160426 Owner name: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGEN Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE REPLACE ERRONEOUSLY FILED PATENT #7358718 WITH THE CORRECT PATENT #7358178 PREVIOUSLY RECORDED ON REEL 038669 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY INTEREST;ASSIGNOR:MICRON TECHNOLOGY, INC.;REEL/FRAME:043079/0001 Effective date: 20160426 |
|
| AS | Assignment |
Owner name: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT, ILLINOIS Free format text: SECURITY INTEREST;ASSIGNORS:MICRON TECHNOLOGY, INC.;MICRON SEMICONDUCTOR PRODUCTS, INC.;REEL/FRAME:047540/0001 Effective date: 20180703 Owner name: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT, IL Free format text: SECURITY INTEREST;ASSIGNORS:MICRON TECHNOLOGY, INC.;MICRON SEMICONDUCTOR PRODUCTS, INC.;REEL/FRAME:047540/0001 Effective date: 20180703 |
|
| AS | Assignment |
Owner name: MICRON TECHNOLOGY, INC., IDAHO Free format text: RELEASE BY SECURED PARTY;ASSIGNOR:U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT;REEL/FRAME:047243/0001 Effective date: 20180629 |
|
| AS | Assignment |
Owner name: MICRON TECHNOLOGY, INC., IDAHO Free format text: RELEASE BY SECURED PARTY;ASSIGNOR:MORGAN STANLEY SENIOR FUNDING, INC., AS COLLATERAL AGENT;REEL/FRAME:050937/0001 Effective date: 20190731 |
|
| AS | Assignment |
Owner name: MICRON SEMICONDUCTOR PRODUCTS, INC., IDAHO Free format text: RELEASE BY SECURED PARTY;ASSIGNOR:JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT;REEL/FRAME:051028/0001 Effective date: 20190731 Owner name: MICRON TECHNOLOGY, INC., IDAHO Free format text: RELEASE BY SECURED PARTY;ASSIGNOR:JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT;REEL/FRAME:051028/0001 Effective date: 20190731 |