Abstract:
A cache memory device having circuitry for controlling operation of a sense amplifier for accessing an array in the data processing system including a cache memory device includes circuitry for enabling the sense amplifier when there is a hit in the array as a result of a read request and disables the sense amplifier when there is a miss in the array as a result of the read request. The cache memory device may receives an address associated with the read request, and compares the address to addresses associated with entries in the array, wherein a hit results when the received address matches at least one of the addresses associated with the entries in the array, and wherein a miss results when the received address does not match at least one of the addresses associated with the entries in the array. The address associated with the read request and the addresses associated with entries in the array are effective addresses. The cache memory device may enable the sense amp only when the array is being accessed by the read request, and only after an entire address associated with the read request has been received.

Description:
TECHNICAL FIELD 
     The present invention relates in general to data processing systems, and in particular, to reading and writing data in a cache memory. 
     BACKGROUND INFORMATION 
     Caches are an integral part of a microprocessor. The speed of a microprocessor is dependent upon how fast a cache can be accessed. Level 1 (L1 or primary) and Level 2 (L2 or secondary) caches are becoming faster and their array sizes are growing bigger and more complex. 
     A sense amplifier (&#34;amp&#34;) is a crucial part of the cache. If the sense amp does not work properly, the cache will send wrong data or instructions which can be a catastrophe within the running of a program. Consequently, due to the many different modes of operation of the cache, it becomes very important to have an effective sense enable generator circuit to properly control the sense amp operation. 
     It is also important that operation of the sense amp be utilized only when required to access information stored in the cache, since the continual activation of the sense amps generates undesirable heat, which then needs to be dissipated. Therefore, there is a need in the art for an effective, efficient and reliable sense enable generator for a cache. 
     SUMMARY OF THE INVENTION 
     The previously mentioned needs are fulfilled with the present invention. Accordingly, there is provided, a cache memory device having circuitry for controlling operation of a sense amp for accessing an array in the cache memory device, the circuitry comprising circuitry for enabling the sense amp when there is a hit on the array as a result of a read request and circuitry for disabling the sense amp when there is a miss on the array as a result of the read request. The read request is received from a processor coupled to the cache memory device. 
     In one embodiment the cache memory device further comprises circuitry for receiving address bits associated with the fetch (read) request. These address bits are issued by the processor as effective addresses. If these effective address bits are identical to the content of the effective content address memory (ECAM), then it is a &#34;HIT&#34; in the cache. If one or multiple address bits are not identical then it is a &#34;MISS&#34; in the cache. 
     In another embodiment, the address associated with the read request and the addresses associated with entries in the array are effective addresses. 
     The cache memory device may further include circuitry for enabling the sense amp only when the array is being accessed by the read request, and circuitry for enabling the sense amp only after an entire address associated with the read request has been received and if there is an ECAM HIT. 
     One advantage of the present invention is that if there is a miss in the cache, the sense enable signal will be low. If the sense enable signal is not dependent upon a determination of whether or not there is a hit in the cache, then the sense amp will keep firing every read cycle. If there is a miss in the cache, then the wordline is low and the bit line pairs (bit line true and complement) will be at a precharge level of VDD. The data line pair, which is input to the sense amp, will follow the bit lines and will be at a VDD level. When the sense amp enable signal goes high, the output of the sense amp will go to an undetermined state because there is no differential voltage on the input of the sense amp. After some delay, the sense amp will resolve itself by going to some known state. During the undetermined state, the sense amp will burn a lot of power (there will be a DC path from VDD to ground). Since there may be 332 sense amps in the cache, there will be a lot of power transferred to ground. The ground level will rise and will effect the functionality of the other circuits in the cache. The present invention relieves the foregoing problem by preventing this problem in the cache by deactivating the sense amp when there is a miss in the cache. 
     The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which: 
     FIG. 1 illustrates a data processing system configurable in accordance with the present invention; 
     FIG. 2 illustrates a more detailed block diagram of the processor illustrated in FIG. 1; 
     FIG. 3 illustrates a more detailed block diagram of a cache array; and 
     FIG. 4 comprises FIGS. 4A and 4B, wherein FIGS. 4A and 4B illustrate a portion of logic circuitry implemented within said read control block 312 illustrated in FIG. 3; 
     FIG. 5 illustrates logic circuitry for producing dummy word line signals; 
     FIG. 6 illustrates logic circuitry for producing a C1 13  CLK --  BUF signal to be received by NAND gate 320 illustrated in FIG. 3 and 
     FIG. 7 illustrates a timing diagram of internal clocks used in circuits of the present invention. 
    
    
     DETAILED DESCRIPTION 
     In the following description, numerous specific details are set forth such as specific word or byte lengths, etc. to provide a thorough understanding of the present invention. However, it will be obvious to those skilled in the art that the present invention may be practiced without such specific details. In other instances, well-known circuits have been shown in block diagram form in order not to obscure the present invention in unnecessary detail. For the most part, details concerning timing considerations and the like have been omitted inasmuch as such details are not necessary to obtain a complete understanding of the present invention and are within the skills of persons of ordinary skill in the relevant art. 
     Refer now to the drawings wherein depicted elements are not necessarily shown to scale and wherein like or similar elements are designated by the same reference numeral through the several views. 
     A representative hardware environment for practicing the present invention is depicted in FIG. 1, which illustrates a typical hardware configuration of workstation 100 in accordance with the subject invention having central processing unit (CPU) 110, such as a conventional microprocessor, and a number of other units interconnected via system bus 112. Workstation 100 includes random access memory (RAM) 114, read only memory (ROM) 116, and input/output (I/O) adapter 118 for connecting peripheral devices such as disk units 120 and tape drives 140 to bus 112, user interface adapter 122 for connecting keyboard 124, mouse 126, speaker 128, microphone 132, and/or other user interface devices such as a touch screen device (not shown) to bus 112, communications adapter 134 for connecting workstation 100 to a data processing network, and display adapter 136 for connecting bus 112 to display device 138. CPU 110 may include other circuitry not shown herein, which will include circuitry commonly found within a microprocessor, e.g., execution unit, bus interface unit, arithmetic logic unit, etc. CPU 110 may also reside on a single integrated circuit. 
     Referring next to FIG. 2, there is illustrated a more detailed block diagram of CPU 110, which includes processor 201, L1 (primary) cache 202, and L2 (secondary) cache 203, which are coupled together and coupled to system bus 112. Note that L1 cache 202 may be an on-chip cache with processor 201, while L2 cache 203 may be an off-chip cache. 
     L1 cache 202 may include several sub-arrays (DCACHE, ICACHE, LRU, BAT, BTAG, etc.) 204, 205. Likewise, L2 cache 203 may include one or more arrays 206 and 207. 
     When the processor 201 needs the instruction for execution, it issues and effective address (EA) which is 64 bits wide for this microprocessor. The effective address is the address generated by the processor 201 for load or store of the instruction or for instruction fetch. The effective address is presented to the instruction L1 cache (ICACHE) 202 first. If the effective address bits match completely against the content of effective content address memory (ECAM) 308 (shown in FIG. 3), then ECAM --  Hit from ICACHE 202 will go high. This means that the instruction which the processor 201 requested is residing inside the ICACHE 202. If the effective address bits do not match the content of ECAM 308, then signal ECAM --  Hit will go low. This means that the requested instruction does not reside inside the ICACHE 202. If the requested instruction does not reside inside the ICACHE 202, then the effective address is presented to L2 cache 203. L2 cache 203 is bigger than L1 cache 202 in size and it can store more data and instructions than L1 cache 202. If neither of L1 cache 202 or L2 cache 203 contain the requested information, then the requested information may be retrieved from an external memory source via system bus 112, such as RAM 114 or hard disk 120. 
     Referring now to FIG. 3, there is an illustration of a more detailed picture of L1 cache 202. This ICACHE 202 has wordline driver 301 which is positioned in the middle. On the left side of the wordline driver 301 there is least recently used (LRU) 306, valid bit (VBIT) 307, effective content address memory (ECAM) 308 and array 309. The array 309 is 640 bits wide (in X direction) and 130 deep (in Y direction), ECAM 308 is 12 bits wide and 130 bits deep, VBIT 307 is 1 bit wide and 130 bits deep and LRU is 130 bits deep. On the right side of the wordline driver 301 there is 1 bit wide and 130 bits deep VBIT 303. Real content address memory (RCAM) 304 is 32 bits wide and 130 bits deep. The array 305 is the same size as the left side array 309 which is 640 bits wide and 130 bits deep. Both the VBIT&#39;s are identical (left and right side) and they hold the same values. 
     The purpose of the VBIT 307 is to determine if the particular line is valid or not. If the VBIT=1, then that particular line is valid. The instruction or the data can be read from that line and the contents of ECAM 308, RCAM 304 and the arrays 305, 309 are valid or good. Also, if VBIT=1, and if the instruction or data are brought from L2 cache 203 or main memory or I/O&#39;s for refill (write), it will be not written on that particular line because that line has valid information. That line cannot be modified. If VBIT=0, it means that the particular line is not valid. This means that the information will not be read from that line. A refill (write) operation can be performed on that line since it does not have valid information for a read operation. 
     The least recently used (LRU) 306 bit is used to replace (write) a line. Whenever there is a miss in the cache, the information is brought from L2 cache 203 or main memory or input/output devices. In this microprocessor 110, a token system is used to replace the line. Initially, when the processor 201 is powered up, the token is forced to sit on the first line of the cache. If that line is refilled (written), the VBIT is set to 1 and the token will jump to the second line. As the line in the cache is being refilled, the VBIT will be set to 1 and the token will keep jumping to the next line. If all the lines are filled (128 lines), then the token will go back to line 1 since that line was least recently used. If there is a request for refill (write) the line where the token is residing will be refilled (write). This way the LRU 306 works. 
     The effective address bits which are issued by the processor 201 also go to a segment address translation array (not shown). The segment address translation array outputs drive the virtual address translation. This virtual address translation drives the look up page table which generates the real address for ICACHE 202. If the real address bits (32 bits) match with the content of the real content address memory (RCAM) 304 then it is a real &#34;HIT&#34; in ICACHE 202. 
     Individual addresses within arrays 309 and 305 may be accessed by a plurality of column decoders 310, which are coupled to a plurality of sense amps 311. The wordline is accessed by EMATCH line (instruction fetch) or Refill (write) or Test mode (it can be read or write). The column decoder 310 is selected by decoding the address bits. The column decoder 310 is a 4:1 multiplexer, i.e., four pairs of bit lines are muxed to become one pair of data line&#39;s which is the input of the sense amp 311. Note, only one column decoder 310 and sense amp 311 is shown for reasons of clarity. Wordline driver 301 is also coupled to write control 302 and read control 312. Write control 302 operates to write information to arrays 309 and 305, while read control 312 has circuitry operable for reading information from arrays 309 and 305. Further discussion of blocks 301-307 is not provided, since such information is not essential to an understanding of the present invention. 
     Several signals are provided to and emanate from read control circuitry 312. FIGS. 4-6 further illustrate some of this circuitry. 
     The remaining discussion concerns the present invention, which provides for a means to activate sense amp 311 in a reliable and cost effective manner. Activation of sense amp 311 is performed by activating the signal SE --  ENB. 
     Referring next to FIGS. 4, 4A, 4B and 7, at the beginning of the clock cycle, signal C2 --  EARLY --  CLK toggles from a low to a high state, C1 --  CLK stays high and C2 --  CLK stays low. (Three clock signals are employed: C1 --  CLK and C2 --  CLK, which are complements of each other and C2 --  EARLY --  CLK which is 500 picoseconds earlier than C2 --  CLK.) This causes a high signal to be received at both inputs of NAND gate 402 (FIG. 4A). The result is that NAND gate 402 generates a reset (low) signal, which is received by PFETs P-channel field effect transistors) 403-405 to precharge nodes 406-408 high and this forces AIN --  INP to toggle low. Now the circuit illustrated in FIG. 4 is in the precharge mode. After 500 picoseconds, C2 --  CLK will go high and C1 --  CLK will go low. This action forces the output of NAND gate 402 to go high and puts the circuit of FIG. 4 in the evaluation mode. Now the input of the circuit will wait for the address bits to arrive. The last address bit will trigger this circuit. Please note that devices 412-417 act as keeper devices to maintain a specified output from inverters 409-411. 
     In the evaluation mode, either the true or complement of addresses a0-a6 (the complements are indicated by a bar over the address designation) will pulse high, when received from processor 201. Addresses a0-a6 are received by NFETs (N-channel field effect transistors) 418-420, 424-425, and 428-429, while the complements of these addresses are received by NFETs 421-423, 426-427, and 430-431. This will result in the pulling of nodes 406-408 to ground, which consequently results in NAND gate 432 producing a low signal, which results in a high signal for signal AIN --  INP from the output of inverter 433. If the array is not accessed, then the address bits will stay low and hence this will force signal AIN --  INP to be low. As a result, signal AIN --  INP is only activated when address signals are received from processor 201 by the array. 
     Referring next to FIG. 5, there is illustrated further circuitry located within read control 312. The inputs are REFILL, ARY --  SEL and the AIN --  INP signal generated in FIG. 4. If the signal REFILL is high, then the cache is in the write mode, and hence the sense amp 311 will be off. If the cache is in read mode, REFILL will go low and now it depends upon ARY --  SEL and AIN --  INP. Signal ARY --  SEL is a signal that is activated when the particular sub-array 204-207 is to be accessed for the read request. 
     If signals AIN --  INP and ARY --  SEL are high and REFILL is low, then this will result in signals DUM --  WL --  LEFT and DUM --  WL --  RIGHT to be forced high through inverters 501, 503, and 505-510 and NAND gates 502 and 504. These signals are also shown in FIG. 3. If any one of signals ARY --  SEL or AIN --  INP is low, then these DUM --  WL signals will be forced low. 
     Referring next to FIG. 6, there is shown further circuitry within read control 312. In the second half of the cycle, C1 --  CLK will go high and C2 --  CLK will go low. Signal C1 --  CLK and signal ECAM --  HIT are ANDed together by the circuitry comprising NAND gate 601 and inverter 602. If all the effective addresses match with the content of ECAM 308, then the ECAM --  HIT signal will be high, otherwise this signal will be pulled low, which means that there is an ECAM 308 miss. ECAM --  HIT may be produced in a well-known manner by comparing all of the contents of ECAM 308 with the received address from processor 201. The ECAM --  HIT signal will wait for signal C1 --  CLK to go high for evaluation. If there is a hit in the cache sub-array, then signal C1 --  CLK --  BUF will go high. 
     Returning to FIG. 3, it should be noted that the DUM --  WL signals drive the same number of memory cells as a regular wordline. If the C1 --  CLK --  BUF signal is high along with the DUM --  WL --  LEFT signal, then the combination of NAND gate 320 and inverter 321 will activate the sense enable signal SE --  ENB to activate sense amp 311. 
     As a result of the foregoing, the sense enable signal SE --  ENB is only activated if there is a hit within the sub-array 204-207. Otherwise, sense amp 311 is not activated, thus saving power consumption. 
     If the ECAM --  HIT signal is not used to generate SE --  ENB, then DL and DLB, which are the inputs of the sense amp 311, are sitting at a VDD level in the MISS case. When the sense amp enable signal goes high, the output of the sense amp will go to an undetermined state because there is no differential voltage on the input of the sense amp. After some delay, the sense amp will resolve itself by going to some known state. During the undetermined state, the sense amp will burn a lot of power (there will be a DC path from VDD to ground). Since there may be 332 sense amps in the cache, there will be a lot of power transferred to ground. The ground level will rise and will effect the functionality of the other circuits in the cache. The present invention relieves the foregoing problem by preventing this problem in the cache by deactivating the sense amp when there is a miss in the cache. 
     For a regular cycle, the read cycle begins as soon as the wordline is forced high, the valid data is not driven out from the sense amp until the second half (C1 --  CLK goes high) of the cycle. 
     The time between the turning on of the wordline to the turning on of the sense amp will increase independent of process variation. 
     The present invention reduces the sensitivity of the short channel effect in the sense amp. If the process speeds up due to short channel effects, and a cycle time stays the same, more signal margin will be available at the input of the sense amp. 
     The dummy wordline has the same equal loading as a regular wordline. Both of them will track each other. This will insure that the sense amp will never be on before the wordline driver. 
     If all the address bits are not arriving at the same time, then the last address bit will trigger the circuit illustrated in FIG. 1. This guarantees that the sense amp will be on after the wordline. 
     Although the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.