Patent Document

FIELD OF THE INVENTION 
     The present invention relates to the field of microprocessor architecture, and in particular to a cache memory having multiple address ports and corresponding multiple tag ports. 
     BACKGROUND OF THE INVENTION 
     Microprocessor systems widely employ cache memories, both for storing data and for storing program instructions. As is well-known, the operating speed of a microprocessor system is enhanced by the use of data and/or instruction caches since the access time for the cache memory, typically implemented with high-speed SRAMs is much less than for the system&#39;s main memory, typically implemented with DRAMs. Still greater improvement is afforded by incorporating cache memories on the microprocessor chip itself. 
     In a multiprocessor environment, there is a need to maintain cache coherency. That is, the system must insure that data or instructions modified in a cache of one processor are not used in another processor in unmodified form. In order to prevent this from occurring, it is conventional to &#34;snoop&#34; in each cache to determine if a particular line is present when such line is being modified. If the line is found, the state of that cache line is modified in accordance with a cache coherency protocol implemented by the system. 
     Prior art caches are single ported so that any one cache cycle is devoted either to snooping or to a processor supported cycle. Snooping therefore generally exacts a performance penalty since some percentage of cache cycles must be dedicated to the snoop function. This reduces the effective access time for the cache and degrades overall system performance. 
     The present invention addresses this particular problem by providing a cache in which snooping for one address can be conducted concurrently with one or more references to different addresses in a single clock. 
     SUMMARY OF THE INVENTION 
     The present invention provides a cache memory having a plurality of address ports and a corresponding plurality of tag ports. One of the address ports is dedicated to snooping and the remaining address ports provide concurrent access to the cache for references to one or more independent addresses. A tag port is provided for each of the address ports to provide concurrent hit/miss status for each address. 
     In an exemplary embodiment, a data cache has a snoop address port and two additional address ports associated with two independent instruction pipelines. An instruction cache has a dedicated snoop address port and two additional address ports to facilitate access to two different cache lines in the same clock cycle. In each cache, the tags are triple ported. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 schematically illustrates a data cache of the present invention. 
     FIG. 2 schematically illustrates a code cache of the present invention. 
     FIG. 3 is a schematic diagram of a circuit for implementing the present invention. 
     FIG. 4 is illustrative of a cache line. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular circuits, circuit components, interfaces, techniques, etc. in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices and circuits are omitted so as to not obscure the description of the present invention with unnecessary detail. 
     The invention described herein is embodied in a microprocessor hereinafter referred to as the P5 microprocessor which is manufactured by Intel Corporation, the assignee of this application. The P5 is a superscalar microprocessor of degree two having dual instruction pipelines and is generally an improved version of Intel&#39;s popular Intel 486™ microprocessor. Details of the architecture and instruction set of the Intel 486™ microprocessor are described in numerous publications widely disseminated to those in the art. (Intel and 486 are trademarks of Intel Corporation.) Although frequent reference will be made to the P5 architecture in the specification, and examples will be provided in the context of instructions used by Intel&#39;s family of microprocessors, including the Intel 486™, it is to be understood that the present invention is not limited to these specific machines. 
     The functional unit of the P5 that includes the data cache is referred to as the K-unit. The K-unit can support a continuous rate of two data references per clock, one each from two integer pipelines, referred to as the u-pipe and the v-pipe. The K-unit is also responsible for detecting address collisions between requests in the two pipelines (e.g., concurrent u-pipe memory write and v-pipe memory read to the same location) and serializing those requested accesses. 
     The P5 implements a high performance data cache on chip with full support for multiprocessing consistency. The data cache can store 8 Kbytes of data. It is a two-way set associative cache organized as 128 sets, each set containing 2 lines. Each line contains 32 bytes of data. A 24 bit triple ported tag and two bits of triple ported status information are also associated with each line. The data array is single ported. Each cache line is physically organized as 8 banks of 4 consecutive bytes (see, for example FIG 4). This allows two simultaneous accesses to different banks in different lines with independent addresses from the u and v pipelines. The data cache is a write back cache with full support for multiprocessing data consistency. It can optionally be configured in write through mode on a line by line basis. 
     A cache consistency protocol insures that there is a coherency between the data and code caches, and further that there is coherency among the caches of all processors in a multiprocessor environment. 
     The porting of the data cache is illustrated in FIG. 1. Microprocessor 110 includes two pipelines, U pipe 100 and V pipe 101. Data cache 10 has three address ports 11, 12 and 13. These are dedicated to snooping, the u-pipe 100 and the v-pipe 101, respectively. Of course, the same concept would accommodate additional address ports as might be required, for example, in the case of a microprocessor having more than two instruction pipelines. Tag ports 14, 15 and 16 are associated with the three address ports 11, 12 and 13, respectively. Data cache 10 is provided with a single data port 17. 
     The K-unit can run various types of cycles through the data cache, one of which is an &#34;inquire&#34; cycle. The purpose of an inquire cycle (snooping) is to check whether the address being presented is contained within the caches in the P5. Snooping is performed to maintain cache coherency both among the various processors in a multiprocessing environment as well as among the various caches within a single processor. An inquire cycle is run through the data cache, and also the code cache as will be described below, through the dedicated snoop port to determine if the address is in the cache. If the address is not in the P5 cache, no action need be taken and there is no performance penalty since the snoop was conducted concurrently with activity on the other address ports. If the snooped address is in the P5 cache, an external pin (HIT#) is asserted. If the address hits a modified line in the data cache, an additional external pin (HITM#) is also asserted and the modified line is pushed out of the cache. Since snooping is a read only function, there is a one clock penalty if the cache contents must be changed. 
     The instruction or code cache of the P5 holds 8 Kbytes of instructions and is organized as a two-way set associative cache with 128 sets. Each cache line holds 32 bytes of optodes, 32 end bit markers and two parity bits. The code cache is ported in a manner analogous to the data cache. Referring to FIG. 2, code cache 20 is shown with address ports 21, 22 and 23. Address port 21 is dedicated to snooping, whereas ports 22 and 23 accommodate split-line accesses in support of branch cycles to the upper half of a cache line. The code cache is capable of retrieving the upper half of that line and the lower half of the next line, all in the same clock. As in the case of data cache 10, the tags of code cache 20 are triple ported at ports 24, 25 and 26. A single data port 27 feeds requested cache lines containing raw instruction opcodes to the P5 instruction decoder. 
     FIG. 3 illustrates triple tag porting of a single tag RAM cell as implemented in both the data and instruction caches. A single tag bit flip flop is shown at 39. Word lines for the three independent address ports are coupled to the gate terminals of respective transistors 30, 30&#39;, 32, 32&#39;, 34 and 34&#39;. The state of flip flop 39 is thus selectively gated onto the bit lines and complementary bit lines associated with each port. As illustrated in FIG. 3, ports 1 and 2 are read only and port 3 is a read-write port. 
     It will be recognized that the above described invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the disclosure. Thus, it is understood that the invention is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims.

Technology Category: g