Method for controlling a direct mapped or two way set associative cache memory in a computer system
First Claim
1. A method of controlling a cache memory in a computer system, comprising:
- determining in which of first and second configurations the cache memory is organized during at least one of a plurality of power-on self-test and system initialization operations of the computer system;
generating a configuration signal using a configuration control circuit based on a result of the determination, the configuration signal indicating whether the cache memory is in the first or second configuration;
receiving a memory address;
transmitting the configuration signal to first and second comparators;
if the cache memory is of the first configuration, then enabling the first comparator to retrieve first tag data stored in the cache memory, and comparing the first tag data to the memory address using the first comparator; and
if the cache memory is of the second configuration, then enabling both the first and second comparators to retrieve first and second tag data, respectively, stored in the cache memory, and comparing the first and second tag data to the memory address using the first and second comparators, respectively.
9 Assignments
0 Petitions
Accused Products
Abstract
A method is described for controlling a cache memory that may be either a direct-mapped or two-way set-associative cache. The described method is performed by a configurable cache controller. The cache controller receives a configuration signal having first and second states, with the configuration signal of the first state configuring the cache controller to monitor and control a direct-mapped cache, and the configuration signal of the second state configuring the cache controller to monitor and control a two-way set-associative cache. The cache controller includes first and second comparators, each able to compare respective first and second cache tags to a memory address. Both of the comparators are enabled when monitoring cache hits to a two-way set-associative cache, whereas only one of the comparators is enabled when monitoring a direct-mapped cache. The cache controller also includes first and second control circuits, each receiving a hit signal produced by a respective one of the comparators. Thus, both of these control circuits may operate when the cache controller monitors and controls a two-way set-associative cache, while only one of the control circuits will be selectively enabled when the cache controller monitors and controls a direct-mapped cache. The two-state configuration signal may be conveniently provided by a flip-flop or other programmable element whose value is set during computer system initialization routines.
-
Citations
15 Claims
-
1. A method of controlling a cache memory in a computer system, comprising:
-
determining in which of first and second configurations the cache memory is organized during at least one of a plurality of power-on self-test and system initialization operations of the computer system;
generating a configuration signal using a configuration control circuit based on a result of the determination, the configuration signal indicating whether the cache memory is in the first or second configuration;
receiving a memory address;
transmitting the configuration signal to first and second comparators;
if the cache memory is of the first configuration, then enabling the first comparator to retrieve first tag data stored in the cache memory, and comparing the first tag data to the memory address using the first comparator; and
if the cache memory is of the second configuration, then enabling both the first and second comparators to retrieve first and second tag data, respectively, stored in the cache memory, and comparing the first and second tag data to the memory address using the first and second comparators, respectively. - View Dependent Claims (2, 3, 4)
-
-
5. A method of controlling a cache memory in a computer system, comprising:
-
determining in which of first and second cache configurations the cache memory is organized from a configuration signal that is determined during at least one of a plurality of power-on self-test and system initialization operations of the computer system;
based on the configuration signal, programming a cache configuration control circuit to set a configuration control mode of a cache controller;
receiving a memory address;
transmitting the configuration control mode to first and second comparators;
if the cache memory is organized in the first configuration, then;
enabling the first comparator to retrieve first tag data stored in the cache memory at a location corresponding with the memory address; and
comparing the first tag data using the first comparator to a first associated portion of the memory address;
if the cache memory is organized in the second configuration, then;
enabling both the first and second comparators to retrieve first and second tag data, respectively, stored in the cache memory at a location corresponding with the memory address; and
comparing the first and second tag data to a second associated portion of the memory address using the first and second comparators, respectively. - View Dependent Claims (6, 7, 8, 9, 10)
-
-
11. A method of controlling a cache memory in a computer system, comprising:
-
initiating at least one of a plurality of power-on self-test and system initialization operations of the computer system;
during at least one of the plurality of power-on self-test and system initialization operations, receiving a cache configuration signal having one of first and second states, one of the first and second states corresponding to a cache memory having a direct-mapped configuration and the other of the first and second states corresponding to a cache memory having a two-way set-associative configuration;
receiving a memory address;
if the cache memory is organized in the first configuration, then;
enabling a first comparator to retrieve first tag data stored in the cache memory at a location corresponding with the memory address; and
comparing the first tag data to a first associated portion of the memory address using the first comparator;
if the cache memory is organized in the second configuration, then;
enabling the first comparator to retrieve first tag data, and enabling a second comparator to retrieve second tag data, the first and second tag data being stored in the cache memory at a location corresponding with the memory address; and
comparing the first tag data using the first comparator, and comparing the second tag data using the second comparator, to first and second associated portions, respectively, of the memory address. - View Dependent Claims (12, 13)
transmitting an hit signal from the second comparator to a second control circuit; and
applying a stored data to a data bus.
-
-
13. A method according to claim 11 wherein if the cache configuration signal has the first state, and the first tag data match the first associated portion, the method also comprises:
-
transmitting an hit signal from the first comparator to a first control circuit; and
applying a stored data to a data bus.
-
-
14. A method of controlling a cache memory in a computer system, comprising:
-
initiating at least one of a plurality of power-on self-test and system initialization operations of the computer system;
during at least one of the plurality of power-on self-test and system initialization operations, determining a cache configuration signal, the cache configuration signal having first and second states, one of the first and second states corresponding to a cache memory having a direct-mapped configuration and the other of the first and second states corresponding to a cache memory having a two-way set-associative configuration;
receiving a memory address;
if the cache configuration signal has the first state, then enabling a first comparator to retrieve first tag data stored in the cache memory at a location corresponding with the memory address;
if the cache configuration signal has the first state, then enabling the first comparator to select a first portion of the memory address;
if the cache configuration signal has the first state, then enabling the first comparator to compare the first tag data to the first portion of the memory address;
if the cache configuration signal has the second state, then enabling first and second comparators to retrieve first and second tag data stored in the cache memory at a location corresponding with the memory address;
if the cache configuration signal has the second state, then enabling first and second comparators to select first and second portions, respectively, of the memory address; and
if the cache configuration signal has the second state, then enabling the first and second comparators to compare the first and second tag data to the first and second portions, respectively, of the memory address. - View Dependent Claims (15)
-
Specification