Method and apparatus to use hardware alias detection and management in a virtually indexed physically tagged cache
First Claim
1. An apparatus comprising:
- a cache comprising slots, wherein each of the slots comprises one or more ways and one or more tags; and
a controller coupled with the cache, wherein the controller is configured to;
receive a cache request that specifies a virtual address, the virtual address comprising a virtual page number and a page offset,access, concurrently, (i) one or more primary tags in a slot of the slots corresponding to a primary cache index that is based on a portion of the page offset and a portion of the virtual page number and (ii) one or more secondary tags in one or more slots of the slots corresponding to one or more secondary cache indices that are based on the portion of the page offset and one or more variations of the portion of the virtual page number,determine a physical page number that is associated with the virtual page number,compare the physical page number to the one or more primary tags to determine whether there is a primary matching way,compare the physical page number to the one or more secondary tags to determine whether there are one or more secondary matching ways,if the cache request is associated with a load instruction, return read data from the primary matching way or the one or more secondary matching ways, andif the cache request is associated with a store instruction, write store data to the primary matching way if it exists and perform an alias management operation if the one or more secondary matching ways exist.
4 Assignments
0 Petitions
Accused Products
Abstract
Systems and techniques relating to hardware alias detection and management in caches are described. A cache controller can receive a cache request that specifies a virtual address, which includes a virtual page number (VPN) and a page offset; access, concurrently, one or more primary tags in a slot of the cache corresponding to a primary cache index that is based on a portion of the page offset and a portion of the VPN and one or more secondary tags in one or more slots corresponding to one or more secondary cache indices that are based on the portion of the page offset and one or more variations of the portion of the VPN; and determine whether there are any primary or secondary matching ways. The controller can write store data to a primary matching way if it exists and perform an alias management operation if any secondary matching ways exist.
11 Citations
20 Claims
-
1. An apparatus comprising:
-
a cache comprising slots, wherein each of the slots comprises one or more ways and one or more tags; and a controller coupled with the cache, wherein the controller is configured to; receive a cache request that specifies a virtual address, the virtual address comprising a virtual page number and a page offset, access, concurrently, (i) one or more primary tags in a slot of the slots corresponding to a primary cache index that is based on a portion of the page offset and a portion of the virtual page number and (ii) one or more secondary tags in one or more slots of the slots corresponding to one or more secondary cache indices that are based on the portion of the page offset and one or more variations of the portion of the virtual page number, determine a physical page number that is associated with the virtual page number, compare the physical page number to the one or more primary tags to determine whether there is a primary matching way, compare the physical page number to the one or more secondary tags to determine whether there are one or more secondary matching ways, if the cache request is associated with a load instruction, return read data from the primary matching way or the one or more secondary matching ways, and if the cache request is associated with a store instruction, write store data to the primary matching way if it exists and perform an alias management operation if the one or more secondary matching ways exist. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method comprising:
-
receiving, at a controller associated with a cache, a cache request that specifies a virtual address, the virtual address comprising a virtual page number and a page offset, the cache comprising slots, wherein each of the slots comprises one or more ways and one or more tags; accessing, concurrently, (i) one or more primary tags in a slot of the slots corresponding to a primary cache index that is based on a portion of the page offset and a portion of the virtual page number and (ii) one or more secondary tags in one or more slots of the slots corresponding to one or more secondary cache indices that are based on the portion of the page offset and one or more variations of the portion of the virtual page number; determining a physical page number that is associated with the virtual page number; comparing the physical page number to the one or more primary tags to determine whether there is a primary matching way; comparing the physical page number to the one or more secondary tags to determine whether there are one or more secondary matching ways; if the cache request is associated with a load instruction, returning read data from the primary matching way or the one or more secondary matching ways; and if the cache request is associated with a store instruction, writing store data to the primary matching way if it exists and perform an alias management operation if the one or more secondary matching ways exist. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A system comprising:
-
a cache comprising slots, wherein each of the slots comprises one or more ways and one or more tags; circuitry configured to receive a cache request that specifies a virtual address, the virtual address comprising a virtual page number and a page offset; circuitry configured to access one or more primary tags in a slot of the slots corresponding to a primary cache index that is based on a portion of the page offset and a portion of the virtual page number; circuitry configured to access one or more secondary tags in one or more slots of the slots corresponding to one or more secondary cache indices that are based on the portion of the page offset and one or more variations of the portion of the virtual page number; circuitry configured to compare a physical page number that is associated with the virtual page number to the one or more primary tags to determine whether there is a primary matching way; circuitry configured to compare the physical page number to the one or more secondary tags to determine whether there are one or more secondary matching ways; circuitry configured to return, if the cache request is associated with a load instruction, read data from the primary matching way or the one or more secondary matching ways; and circuitry configured to write, if the cache request is associated with a store instruction, store data to the primary matching way if it exists and perform an alias management operation if the one or more secondary matching ways exist. - View Dependent Claims (18, 19, 20)
-
Specification