WO2013098919A1 - データ処理装置 - Google Patents

データ処理装置 Download PDF

Info

Publication number
WO2013098919A1
WO2013098919A1 PCT/JP2011/080078 JP2011080078W WO2013098919A1 WO 2013098919 A1 WO2013098919 A1 WO 2013098919A1 JP 2011080078 W JP2011080078 W JP 2011080078W WO 2013098919 A1 WO2013098919 A1 WO 2013098919A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
data
tag
address information
ways
Prior art date
Application number
PCT/JP2011/080078
Other languages
English (en)
French (fr)
Inventor
トーマス エディソン チュア ユー
源 山下
雅之 伊藤
Original Assignee
ルネサスエレクトロニクス株式会社
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ルネサスエレクトロニクス株式会社 filed Critical ルネサスエレクトロニクス株式会社
Priority to CN201180075908.3A priority Critical patent/CN104011692B/zh
Priority to PCT/JP2011/080078 priority patent/WO2013098919A1/ja
Priority to EP11878346.3A priority patent/EP2799997B1/en
Priority to US14/367,925 priority patent/US9495299B2/en
Publication of WO2013098919A1 publication Critical patent/WO2013098919A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0864Addressing 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1064Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in cache or content addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • G06F12/127Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning using additional replacement algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1028Power efficiency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory
    • G06F2212/6032Way prediction in set-associative cache
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to a data processing apparatus including a set associative type cache memory, for example, a technique effective when applied to a microcomputer.
  • a cache memory is arranged between a large-capacity work memory and the CPU to enable high-speed access of the CPU to operand data and instructions.
  • a set associative cache memory (hereinafter also simply referred to as a set associative cache memory) is used as a circuit having a relatively small circuit scale and capable of obtaining a relatively high cache hit rate.
  • the set associative cache memory has a structure capable of storing a plurality of data with different tags in the same cache entry. When there are a plurality of pairs of tag ways and data ways and the number of cache entries of these ways is 256, for example, the cache entry of each way is selected by the index address information of the lower 8 bits of the address information.
  • tag address information of multiple bits on the upper side of the index address information is stored as a cache tag, and for the dataway, for each cache entry specified by the index address The data of the address specified by the index address information and the tag address information to be stored is stored.
  • all tag ways are read by the index address information of the access address, and when the read cache tag matches the tag address information of the access address information, the data way that forms a pair with the tag way The corresponding cache entry becomes an operation target by data read or data write.
  • the contents of the set associative cache memory described here are widely known.
  • Patent Document 1 tries to realize low power consumption by enabling switching between a direct map format and a set associative format. Further, Patent Document 2 determines the number of way divisions, accesses the ways in order, and eliminates the parallel index operation for a plurality of ways.
  • Patent Document 3 using a parity check eliminates the need for a parity check circuit for each memory array by performing a parity check on access address data, thereby reducing the number of parity check circuits. Try to achieve low power consumption.
  • Patent Document 3 only confirms whether there is an error in the access request address itself. It is not possible to expect a reduction in the circuit that detects the bit reversal error of the data to be held. Patent Document 1 does not consider a parity check for an undesired bit inversion error. Patent Document 2 considers error detection regarding the transfer timing of data read from the data array, and does not consider detection of an undesired bit inversion error in data held by the way.
  • An object of the present invention is to achieve low power consumption without sacrificing cache entry selection operation speed in terms of way selection in a set associative cache memory.
  • Another object of the present invention is to reduce the scale of a circuit that detects a bit inversion error of a way in a set associative cache memory.
  • a part of ways is selected from a plurality of ways according to the value of selection data generated based on tag address information that is part of address information, and the cache tag is read. Further, when performing cache fill, the cache memory performs cache fill on a cache entry selected from a part of ways corresponding to the value of the selected data.
  • parity data for tag address information is used as selection data used for way selection. Based on the value of the parity data, a way for reading a cache tag is selected, and further, a way for a cache entry for performing cache fill is selected. .
  • the scale of the circuit that detects the bit reversal error of the way in the set associative cache memory can be reduced.
  • FIG. 1 is a block diagram illustrating a microcomputer as an embodiment of a data processing apparatus.
  • FIG. 2 is a block diagram illustrating a schematic configuration of a memory mat when the function of the set associative cache memory is realized.
  • FIG. 3 is a block diagram illustrating a basic configuration of the parity function for the tag way of the cache memory.
  • FIG. 4 is a block diagram representatively showing a configuration focusing on a read operation system for a cache entry.
  • FIG. 5 is a flowchart illustrating a cache operation flow of a read operation system for a cache entry.
  • FIG. 6 is a block diagram illustrating a configuration focusing on a fill operation system combined with the configuration of the read operation system of FIG. FIG.
  • FIG. 7 is a flowchart illustrating a cache operation flow of a fill operation system for a cache entry.
  • FIG. 8 is a block diagram illustrating a configuration focusing on a read operation system for a cache entry when the parity check function can be selectively turned on / off.
  • FIG. 9 is a block diagram illustrating a configuration focusing on a fill operation system for a cache entry when the parity check function can be selectively turned on / off.
  • FIG. 10 is a block diagram showing an example in which a configuration using a plurality of bits of parity data is applied to the configuration focusing on the read operation system for the cache entry of FIG.
  • FIG. 11 is a block diagram illustrating a configuration focusing on the read operation system for a cache entry when two ways are stored for each memory block.
  • FIG. 12 is a block diagram illustrating a configuration focusing on a fill operation system for a cache entry when two ways are stored for each memory block.
  • FIG. 13 is an explanatory diagram exemplifying a configuration of a tag entry when a virtual CPU number (Virtual CPU ID) for performing processing of each thread is set as the information ⁇ when processing is performed in multithread.
  • FIG. 14 is a block diagram illustrating a configuration focusing on a read operation system for a cache entry when the tag entry of FIG. 13 is used.
  • FIG. 15 is a block diagram illustrating a configuration focusing on a fill operation system for a cache entry when the tag entry of FIG. 13 is used.
  • FIG. 16 is a block diagram showing a specific example of the memory blocks 16, 16A, 15, 15A.
  • FIG. 17 is an explanatory diagram illustrating the arrangement of tag entries stored in the memory cell array of TagWAY # 0 configured by the memory block 16 as an example of the tag way.
  • FIG. 18 is an explanatory diagram illustrating the arrangement of data entries stored in the memory cell array of DataWAY # 0 configured by the memory block 16 as an example of the data way.
  • FIG. 19 is an explanatory diagram illustrating the arrangement of tag entries stored in the memory cell arrays of TagWAY # 0 and TagWAY # 2 configured by the memory block 16A as another example of the tagway.
  • FIG. 20 is an explanatory diagram illustrating the arrangement of data entries stored in the memory cell arrays of DataWAY # 0 and DataWAY # 2 configured by the memory block 16 as an example of the data way.
  • FIG. 21 is an explanatory diagram illustrating the arrangement of LRU entries stored in the memory cell arrays of the LRU arrays 15 and 15A.
  • FIG. 22 is an explanatory diagram showing the main aspects of the index operation mode for the tagway as a summary.
  • a data processing apparatus (1) includes a set associative cache memory (3) that stores a plurality of cache entries in a plurality of ways.
  • the cache memory reads a cache tag, a value of selection data (PRTdat) generated based on tag address information (TAGadrs) which is a part of address information from the plurality of ways (12, 13).
  • PRTdat a value of selection data generated based on tag address information
  • TAGadrs tag address information
  • some ways are selected, and the cache tag is read from the selected ways using the index address in the address information.
  • the cache memory performs the cache fill on the cache entry (14) selected from some ways according to the value of the selected data.
  • the parity data that limits the range of the way to be used is used for replacement of the cache entry. Therefore, if it is assumed that there is no error in the address information supplied to the cache memory, the read target of the cache tag is a way corresponding to the value of the parity data related to the address information, so the parity bit is stored according to the cache entry. There is no need to do. Therefore, it is possible to suppress a malfunction in which a bit-reversed cache tag is erroneously processed as a normal cache tag without requiring a circuit for generating parity data for comparison from the read cache tag.
  • the way where the cache tag with the bit inversion is located does not become the original way according to the value of the parity data. It is not done.
  • the number of parity generation circuits can be halved while improving the reliability of bit inversion of the cache tag.
  • further lower power consumption can be achieved in that the number of parity generation circuits can be halved.
  • the cache memory compares each cache tag read from the way with the tag address, and determines whether the comparison results are all inconsistent, only one matched, or multiple matched. If a plurality of matches are determined, a cache error signal (41) is generated.
  • the tag address does not match due to bit inversion of the cache tag, it can be dealt with in the same way as a normal cache miss. Even if a cache entry having the same cache tag as the regular cache tag is apparently generated by the multi-bit inversion of the cache tag, such an abnormality can be dealt with by determining the plurality of matches.
  • Item 3 further includes an interrupt controller (9) for inputting the cache error signal as an exception factor or an interrupt factor.
  • the cache memory sets the cache entry of the cache tag related to the comparison result that is only one match as a data operation target.
  • the way includes a tag way (12) for storing the cache tag corresponding to the index address, and a data way (13) for storing data corresponding to the index address.
  • the cache entry includes the cache tag and data corresponding thereto, and each of the plurality of tag ways is constituted by a memory block (16) in which activation or deactivation is selected for each tag way.
  • the cache memory selects the part of tagways by activating a memory block using the selection data.
  • low power consumption can be realized by selectively deactivating a plurality of memory blocks in tagway units.
  • the selection data is 1-bit parity data PRTdat for all bits of the tag address information which is a part of the address information
  • the parity data of the first logical value is a selection of half of the plurality of memory blocks.
  • the parity data of the second logical value is used for selecting the remaining half of the plurality of memory blocks.
  • the selection data is a plurality of bits of parity data (PRTdat [1: 0]) including parity bits for each of a plurality of divided portions of the tag address information which is a part of the address information, and the value of the parity data Determines a tag way to select from among a plurality of tag ways.
  • the first mode is set when priority is given to low power consumption
  • the second mode is set when priority is given to a high cache hit rate.
  • the degree of freedom can be changed to a minimum as compared with the circuit configuration capable of only the first mode.
  • the way includes a tag way for storing the cache tag corresponding to the index address, and a data way for storing data corresponding to the index address.
  • the cache entry includes the cache tag and corresponding data.
  • the plurality of tagways are configured to be aggregated into one memory block (16A) every predetermined number, and the plurality of tagways configured in the same memory block are selected by mutually different selection data.
  • the cache memory reads a cache tag
  • the cache memory reads the cache tag using the selection data and the index address information.
  • the number of sense amplifiers and buffer amplifiers included in one memory block is one in one memory block.
  • the amount of leakage current such as sub-threshold leakage current in the inactive state is reduced as much as the total number of memory blocks is reduced, and this contributes to further lower power consumption. There are cases where it is possible.
  • the selection data is 1-bit parity data (PRTdat) for all bits of the tag address information which is a part of the address information.
  • the parity data of the first logical value is used for selecting one tag way in each of the memory blocks.
  • the parity data of the second logical value is used for selecting the other tag way in each of the memory blocks.
  • the selection data is a plurality of bits of parity data (PRTdat [1: 0]) including parity bits for each of a plurality of divided portions of the tag address information which is a part of the address information, and the value of the parity data Determines the tagway to be selected from each memory block.
  • LRU data array when the cache memory determines a cache entry to be cache filled, LRU data (LRU [1: 0], LRU [2: 0]) to store the LRU data array (15, 15A).
  • the LRU data array has an area for storing a plurality of bits of history data indicating a usage history for each way selected by the selection data for each index address for a cache entry.
  • the cache memory selects a cache entry for performing cache fill based on the history data read from the LRU data array using the index address information and the corresponding selection data.
  • the selection data is used together with the history data to select the cache entry for performing the cache fill, the number of bits of the history data can be reduced by the number of bits of the selection data. This contributes to circuit scale reduction and power consumption reduction.
  • each of the plurality of ways is configured by a memory block (16) in which activation or deactivation is selected for each tag way.
  • the cache memory reads a cache tag
  • the cache memory selects some ways by the selection data by activating the memory block using the selection data.
  • the cache memory performs a cache fill, among the cache entries indicated by the index address in each memory block, the history data (multiple bits) read from the LRU data array (15) based on the index address information ( LRU [1: 0]) and the selection data (PRTdat) generated based on the tag address are used to select a cache entry to be cache filled.
  • the plurality of ways are configured to be aggregated into one memory block (16A) for each predetermined plurality, and the plurality of ways configured in the same memory block are selected by different selection data.
  • the cache memory reads a cache tag, it is specified by the selection data which way in each activated memory block is selected, and which cache tag in the specified way is selected This is specified by the index address information in the address information.
  • the cache memory performs a cache fill, which memory block is selected is determined by history data (LRU [2: 0]) read from the LRU data array (15A) according to index address information. Designated, which way is selected from the designated memory block is designated by the selection data (PRTdat), and which cache entry is targeted for cache fill from the designated way , Specified by the index address (IDXadrs).
  • the value of the history data when storing the history data, may be determined according to the value of the selected data, and any cache entry of any memory block is selected for the value of the indexed history data. This may be determined by the value of the selected data and the index address information at that time.
  • a data processing apparatus (1) includes a set associative cache memory (3) that stores a plurality of cache entries in a plurality of ways.
  • a parity generated based on tag address information TAGadrs
  • TAGadrs tag address information
  • PRTdat value of data
  • the read cache tag is compared with the tag address, and it is determined whether the comparison results are all inconsistent, only one matched, or multiple matched, and when the multiple matched is determined, a cache error signal (41) is generated.
  • the cache memory performs a cache fill, the cache memory performs a cache fill on a cache entry selected from some ways according to the value of the selected data.
  • the correspondence between the way holding the cache tag to be read in the cache operation and the way selected by the selection data is easily maintained, contributing to low power consumption.
  • the tag address does not coincide with the bit inversion of the cache tag, it can be dealt with in the same way as a normal cache miss. Even if a cache entry having the same cache tag as the regular cache tag is apparently generated by the multi-bit inversion of the cache tag, such an abnormality can be dealt with by determining the plurality of matches.
  • a data processing apparatus (1) includes a set associative cache memory (3) for storing a plurality of cache entries in a plurality of ways.
  • a parity generated based on tag address information TAGadrs
  • TAGadrs tag address information
  • PRTdat the value of data
  • IDXadrs index address information
  • the read cache tag is compared with the tag address, and it is determined whether the comparison results are all inconsistent, only one matched, or multiple matched, and when the multiple matched is determined, a cache error signal (41) is generated.
  • LRU data LRU [1: 0], LRU [2: 0]
  • LRU data array 15, 15A
  • the LRU data array has an area for storing a plurality of bits of history data indicating a usage history for each way selected by parity data for each index address for a cache entry.
  • the cache memory selects a cache entry for performing cache fill based on the history data read from the LRU data array using the index address information and the corresponding selection data.
  • the correspondence between the way holding the cache tag to be read in the cache operation and the way selected by the selection data is easily maintained, contributing to low power consumption.
  • the tag address does not coincide with the bit inversion of the cache tag, it can be dealt with in the same way as a normal cache miss. Even if a cache entry having the same cache tag as the regular cache tag is apparently generated by the multi-bit inversion of the cache tag, such an abnormality can be dealt with by determining the plurality of matches.
  • the number of bits of the history data can be reduced by the number of bits of the selection data. This contributes to reducing the circuit scale of the data array and reducing power consumption in the data array.
  • a data processing apparatus (1) includes a set associative cache memory (3) that uses a plurality of ways to store a plurality of cache entries.
  • the cache memory operates a way based on address information
  • the cache memory operates from a part of ways corresponding to selection data (PRTdat) generated based on tag address information (TAGadrs) which is a part of the address information. Select the target cache entry.
  • the cache entry to be operated for cache tag read or cache fill may be selected from a part of ways corresponding to the value of the selected data, all ways are operated in parallel. It does not need to contribute to low power consumption. Since the cache entry to be operated is selected using the selected data, the correspondence between the wait from which the cache tag is read and the way to be cache filled can be easily maintained.
  • a data processing apparatus (1) includes a set associative cache memory (3) that uses a plurality of ways to store a plurality of cache entries.
  • the cache memory reads a cache tag to be compared with an address tag from some ways corresponding to selection data generated based on tag address information (TAGadrs) which is a part of address information, and cache Select the cache entry to be filled.
  • TAGadrs tag address information
  • the cache entry to be operated for the read or cache fill of the cache tag may be selected from some ways according to the value of the selected data, it is necessary to operate all the ways in parallel. It contributes to low power consumption. Since the cache entry to be operated is selected using the selected data, the correspondence between the wait from which the cache tag is read and the way to be cache filled can be easily maintained.
  • a data processing apparatus (1) includes a set associative cache memory (3) that uses a plurality of ways to store a plurality of cache entries.
  • the cache memory reads a cache tag, it selects which way of a plurality of ways to select from selection data (PRTdat) generated based on tag address information (TAGadrs) which is a part of address information. It is instructed according to the value, and which cache tag is to be read from the instructed way is instructed by the index address (IDXadrs) in the address information.
  • the usage history (LRU [1: 0], LRU [2: 0]) referred to by the index address unit for the cache entries of all ways and the selection data (PRTdat)
  • the cache entry to be cache filled is selected according to the combination with the value of.
  • the cache entry to be operated for the read or cache fill of the cache tag may be selected from some ways according to the value of the selected data, it is necessary to operate all the ways in parallel. It contributes to low power consumption. Since the cache entry to be operated is selected using the selected data, the correspondence between the wait from which the cache tag is read and the way to be cache filled can be easily maintained. Further, since the selection data is used together with the history data to select the cache entry for performing the cache fill, the number of bits of the history data can be reduced by the number of bits of the selection data. Contributes to scale reduction and power consumption reduction.
  • FIG. 1 illustrates a microcomputer (MCU) 1 as an embodiment of a data processing apparatus.
  • the microcomputer 1 shown in the figure is not particularly limited, but is formed on a single semiconductor substrate such as single crystal silicon by using a CMOS integrated circuit manufacturing technique.
  • the microcomputer 1 has a CPU (central processing unit) 2 that fetches and decodes an instruction, fetches necessary operand data according to the decoding result, and performs arithmetic processing, although not particularly limited.
  • a CPU central processing unit
  • the program execution form of the CPU 2 can be applied not only to a single thread but also to a multi-thread. When a single program is processed by a multi-thread, or a plurality of programs are multi-threaded as a program unit as a whole. Any of the cases where processing is performed may be used.
  • the internal bus 4 includes an interrupt controller (INTC) 9 representatively shown, a RAM 5 composed of a static random access memory (SRAM), a direct memory access controller (DMAC) 6, and an electrically rewritable flash memory. (FLASH) 7 and other peripheral circuit (PRPHRL) 8 are connected.
  • the peripheral circuit 8 includes a timer and an input / output port to the outside of the microcomputer 1.
  • the RAM 5 and the FLSH 7 are used for storing programs and data. For example, they are cached by the cache memory 3.
  • the cache memory 3 is not particularly limited, the cache memory 3 includes a cache control circuit (CACHCNT) 10 and a memory mat (MRYMAT) 11, and the function of the set associative cache memory is realized.
  • CACHCNT cache control circuit
  • MRYMAT memory mat
  • FIG. 2 illustrates a schematic configuration of the memory mat 11 when the function of the set associative cache memory is realized.
  • the set associative cache memory has a plurality of ways, and each way has a tag way (TagWAY) 12 and a data way (DataWAY) 13, and a plurality of cache entries (CachENTRY) 14 are formed in each way.
  • the tag way (TagWAY) 12 has a cache tag, a valid bit, a lock bit, and the like for each cache entry 14.
  • the data way (DataWAY) 13 holds cache data (a program executed by the CPU and operand data used by the CPU) corresponding to the cache tag for each cache entry 14.
  • an example is a 4-way set associative cache memory in which one data way (DataWAY) 14 holds 16-byte cache data and the number of cache entries (CachENTRY) 14 is 256 entries.
  • the least significant 4 bits are offset address information for selecting 32 bits (4 bytes) from the cache data of one data way (DataWAY) 13, its upper side
  • the 8 bits are index address information for selecting one cache entry (CachENTRY) 14, and the upper side is tag address information.
  • tag address information corresponding to the cache data of the corresponding cache entry 14 is used.
  • the LRU data array (LRUARY) 15 holds history data used as an index for selecting a cache entry (CachENTRY) 14 to be replaced.
  • the history data is information for specifying a cache entry having the same index address that has not been used recently.
  • the LRU data array (LRUARY) 15 has 256 pieces of history data, and the history data is accessed by index address information.
  • 20 is a write path for the cache entry 14 and 21 is a read path for the cache entry.
  • Reference numeral 22 denotes a selection path for selecting a way for the tag way 12 and the data way 13 and for indexing the way to be selected.
  • 23 is a history data write path to the LRU array 15, 24 is a history data read path, and 25 is a history data selection path.
  • the cache memory 3 has a parity function for the tagway, but simplification of the circuit scale and low power consumption are considered for the addition of the function.
  • simplification of the circuit scale and low power consumption are considered for the addition of the function.
  • FIG. 3 illustrates a basic configuration of the parity function for the tag way of the cache memory.
  • attention is paid to n tagways TagWAT # 0 to TagWAT # n-1 in the n-way set associative cache memory.
  • ACCadrs is access address information generated by the CPU.
  • TAGadrs is tag address information included in the access address information ACCadrs
  • IDXadrs is index address information included in the access address information ACCadrs.
  • PRTYG parity generation circuit
  • TAGCMP tag comparison circuit
  • MLTHIT multi-hit detection circuit
  • the parity generation circuit 30 generates, for example, one parity bit for all bits of the tag address information TAGadrs as parity data PRTYdat. Whether to use even parity or odd parity is specified by an even / odd selection signal (ODSEL) 42. Specifically, when the even / odd selection signal 42 has a logical value 1, the parity generation circuit performs an exclusive OR EXOR for all the bits of the tag address information TAGadrs, and performs logic operation when there is an even number of logical values 1 in all the bits. Parity data PRTdate having a value of 0 is output. When all the bits have an odd number of logical values 1, the parity data PRTdate having a logical value of 1 is output.
  • parity generation circuit When the even / odd selection signal 42 has a logical value of 0, the parity generation circuit performs an exclusive negative OR EXNOR for all the bits of the tag address information TAGadrs. Parity data PRTdate is output. When all the bits have an odd number of logical values 1, parity data PRTdate of logical value 0 is output.
  • Parity data PRTdat is supplied to the tagway 12.
  • the logical value 1 of the parity data PRTYdat indicates selection of a group of odd-numbered tagways TagWAY # 1, TagWAY # 3,... Instructs selection of a group of. Therefore, when performing the cache fill, the cache fill is performed on the cache entry selected from the tagway of one group corresponding to the value of the parity data PRTdat.
  • the tagway operation of one group is selected according to the value of the parity data PRTdat among the tagways TagWAY # 0 to TagWAY # n-1, and an index is selected from the selected ways.
  • the cache tag is read using the address IDXadrs.
  • one tagway TagWAY # 0 is used when the parity data PRTdat has a logical value 0
  • the other tagway TagWAY # 1 is used when the parity data PRTdat has a logical value 1.
  • the parity data PRTdat that limits the range of the way to be used is used for replacement of the cache entry by the cache fill. If it is assumed that there is no error in the access address information ACCADrs supplied to the cache memory 3, the cache tag read target is a way corresponding to the value of the parity data PRTdat related to the tag address information TAGadrs, so a cache entry (CashENTRY) It is not necessary to store parity bits according to 14. Therefore, it is possible to suppress a malfunction in which a bit-reversed cache tag is erroneously processed as a normal cache tag without requiring a circuit for generating parity data for comparison from the read cache tag.
  • the way where the cache tag with the bit inversion is located does not become the original way according to the value of the parity data PRTdat. Not targeted.
  • the number of parity generation circuits can be halved while improving the reliability of bit inversion of the cache tag. Further lower power consumption can be achieved in that the number of parity generation circuits can be halved.
  • the tags are illustrated as CTAG # 0 to CTAG # n / 2.
  • the output cache tags CTAG # 0 to CTAG # n / 2 are compared with the tag address TAGadrs by the tag comparison circuit 31, and the comparison result is associated with the corresponding tagway to indicate a signal indicating the match or mismatch of the comparison result (hit way Discrimination signal: HITWAY) 40 or the like is output.
  • the hit way determination signal 40 is supplied to the multi-hit detection circuit 32 and is used for selecting a cache entry indexed by the data way related to the hit, although not shown in FIG. Based on the hit way discrimination signal 40, the multi-hit detection circuit 32 discriminates whether the comparison results are all inconsistent, only one coincident, or plural coincidence. (CERR) 41 is generated. The discriminating result of all mismatches is a cache miss, and the discriminating result of only one match is a cache hit.
  • the hit way discrimination signal 40 and the cache error signal 41 By generating the hit way discrimination signal 40 and the cache error signal 41, when the comparison result with the tag address becomes inconsistent due to the bit inversion of the cache tag, it can be dealt with in the same way as a normal cache miss. Further, even if a cache entry having the same cache tag as the regular cache tag is apparently generated due to the multi-bit inversion of the cache tag, such an abnormality can be dealt with by determining the plurality of matches. For example, if the cache error signal 41 is given to the interrupt controller 9 as an exception factor or an interrupt factor, if the occurrence of the cache error is considered to be affected by the bit inversion, the CPU 2 performs processing corresponding to the situation. This can be performed flexibly through interrupt processing or exception processing.
  • FIG. 4 representatively shows a configuration focusing on a read operation system for a cache entry.
  • tagway TagWAY # 0 to TagWAY # 3 storing the cache tag corresponding to the index address IDXadrs and dataway DataWAY # 0 to DataWAY # 3 storing data corresponding to the index address IDXadrs.
  • Each is constituted by a memory block 16 in which activation or deactivation is selected for each tagway and dataway.
  • cen0 to cen3 are enable signals (block enable signals) of the memory block 16 for each way. When the corresponding block enable signals cen0 to cen3 are activated (for example, high level), the internal circuit of the memory block 16 is activated. Enabled.
  • the address amplification is performed in response to the input address signal to enable the sense amplification operation for the read data.
  • the parity data PRTdat is a logical value 0 (low level)
  • the tagway TagWAY # 0, TagWAY # 1 and the dataway DataWAY # 0, DataWAY # 1 are included.
  • One way group is activated.
  • the way of the activated way group is indexed by the index address information IDXadrs, and the cache entry is selected.
  • Reference numeral 52 conceptually shows a selection circuit that decodes the index address information IDXadrs and selects a corresponding cache line. In other figures, each way is described as including its function.
  • the cache tag output from the tag way for which the cache entry is selected is compared with the tag address information TAGadrs by the discrimination circuits 53 and 54, hit way discrimination signals 40a and 40b, hit signals 55a and 55b, and a plurality of ways according to the comparison result. Hit signals 56a and 56b are generated.
  • the discrimination circuits 53 and 54 have the functions of the tag comparison circuit 31 and the multi-hit detection circuit 32 described with reference to FIG.
  • the hit way discrimination signals 40a and 40b cause the selectors 57a and 57b to select the output data of the data way corresponding to the tag way related to the match.
  • the hit signals 55a and 55b are signals indicating whether or not one cache tag matches the tag address in each of the discrimination circuits 53 and 54.
  • the multi-way hit signals 56a and 56b are signals indicating whether or not both cache tags match the tag address in the discrimination circuits 53 and 54, respectively.
  • the selector 58 selects the output of the discrimination circuit 53 on the tagway side activated by the parity data PRTdat when the value is 0, and the discrimination on the tagway side activated by the parity data PRTdat when the parity data PRTdat is the value 1.
  • the output of the circuit 54 is selected.
  • the hit signal 55a or 55b selected by the selector 58 is ANDed with the read request signal RDreq and used as the cache hit signal CHIT.
  • the multiple way hit signal 56 a or 56 b selected by the selector 58 is used as the cache error signal 41.
  • the selector 59 selects the cache data to be selected and supplied on the data way DataWAY # 0, dataWAY # 1 side activated by the parity data PRTdat, and when the parity data PRTdat has the value 1
  • the cache data selected and supplied on the data way DataWAY # 2 and dataWAY # 3 side activated thereby is selected.
  • the data selected by the selector 59 is output to the CPU 2 as the cache data CDAT related to the cache hit.
  • the flip-flop (FF) 60 latches the input signal according to the memory cycle of the way, and secures a desired operation timing.
  • configurations other than TagWAT # 0 to TagWAY # 3, DataWAY # 0 to DataWAY3 are included in the cache control circuit 10, for example.
  • FIG. 4 illustrates the case of data read as a cache entry data operation related to a hit in the case of a cache hit, and the case where the data operation is a write is omitted, but the cache data CDAT is read. It should be understood that a writing path opposite to the path is provided.
  • FIG. 5 illustrates a read operation type cache operation flow for a cache entry.
  • the parity data PRTdat of the tag address information TAGadrs is generated from the access address information ACCADrs (S1). If the value of the generated parity data PRTdat is 0 (S2), the tag tags TagWAY # 0 and TagWAY # 1 cache tags are read (S3), and it is determined from the read result that neither cache tag is a hit. (S4) If the tagway TagWAY # 0 is a hit (S5), the corresponding cache entry of the dataway DataWAY # 0 is set as a read or write operation target (S6). If the tag way TagWAY # 1 is a hit (S7), the corresponding cache entry of the data way DataWAY # 1 is set as a read or write operation target (S8). In the case of step S7 or S8, if there is no cache hit and there is no hit in both tagway TagWAY # 0 and tagway TagWAY # 1, a cache miss is determined.
  • step S2 the cache tags of the tagways TagWAY # 2 and TagWAY # 3 are read (S9), and based on the read result, both cache tags are not hit (S10). If the tag way TagWAY # 2 is a hit (S11), the corresponding cache entry of the data way DataWAY # 2 is set as a read or write operation target (S12). If the tag way TagWAY # 3 is a hit (S13), the corresponding cache entry of the data way DataWAY # 3 is set as a read or write operation target (S14). In the case of step S12 or S14, if there is no cache hit and there is no hit in both tagway TagWAY # 2 and tagway TagWAY # 3, a cache miss is determined.
  • step S4 If a hit occurs in both tagways in step S4 or step S10, a cache error is assumed.
  • FIG. 6 illustrates a configuration focusing on the fill operation system combined with the configuration of the read operation system of FIG.
  • the LRU data array 15 stores LRU data LRUdat used as an index for specifying a cache entry to be cache filled by a pseudo LRU when the cache memory 3 determines a cache entry to be cache filled.
  • This LRU data array 15 has 2-bit history data LRU [1: 0] indicating the usage history for each way selected for each index address IDXadrs for the cache entry corresponding to the value of the parity data PRTdat (each Bits are represented as LRU [0] and LRU [1]).
  • the history data LRU [1: 0] is initialized to a logical value 0 by purging the cache entry.
  • the history data LRU [0] is a valid cache entry of either way # 0 (tagway TagWAY # 0 and dataway DataWAY # 0) or way # 1 (tagway TagWAY # 1 and dataway DataWAY # 1). Indicates whether to give priority to replacement.
  • the history data LRU [1] is a valid cache entry of either way # 2 (tagway TagWAY # 2 and dataway DataWAY # 2) or way # 3 (tagway TagWAY # 3 and dataway DataWAY # 3). Indicates whether to give priority to replacement.
  • LRU [0] stored in the LRU data array 15 corresponding to the index address information is inverted to the logical value 1 when the cache entry of the way # 1 corresponding to the index address information is used.
  • LRU [1] is inverted to logical value 1 when the cache entry of way # 3 corresponding to the index address information is used.
  • LRU [0] and LRU [1] for each bit of the history data LRU [0] and LRU [1], for example, when a logical value is 0, a way with a small way number is a replacement target, and when a logical value is 1, a way with a large way number is a replacement target. Each time replacement is performed, the corresponding history data bit is inverted and updated.
  • LRU [0] For example, for LRU [0], if the initial value is a logical value of 0, way # 0 is used for the next fill of initialization, and LRU [0] is inverted to a logical value of 1. In the next replacement, the way # 1 that has not been used recently is replaced with the replacement target, and LRU [0] is inverted to the logical value 0. LRU [0] may be toggled in the same manner.
  • Reference numeral 70 conceptually shows a selection circuit that decodes the index address information IDXadrs and selects the corresponding history data LRU [1: 0].
  • the LRU array 15 is described as including the function. Has been.
  • the way selection circuit 71 is a way selection circuit for cache fill.
  • the way selection circuit 71 selects the way used for the cache fill based on the history data LRU [1: 0] read from the LRU data array 15 using the index address information IDXadrs, the parity data PRTdat, the valid bit V, and the like.
  • a block selection signal is generated for this purpose.
  • the block selection signal corresponds to block enable signals cen0 to cen3 supplied to the memory block 16, respectively.
  • the selection logic of the block selection signal is as follows.
  • the way selection circuit 71 refers to the valid bit V of the cache entry indexed sequentially from the tag ways TagWAT # 0 and TagWAT # 1.
  • a cache entry in which the valid bit V is invalid is set as a cache fill target, and the way selection circuit 71 is adapted so that one tag way (either TagWAT # 0 or TagWAT # 1) to which the cache entry belongs is selected.
  • the block selection signal (one of cen0 and cen1) is set to the logical value 1.
  • the other three block selection signals indicate a logical value 0, and each corresponding tagway is in a non-selected state.
  • the way selection circuit 71 further updates the history data LRU [0] so that the priority of the non-selected way of the tag ways TagWAT # 0 and TagWAT # 1 becomes higher in the next cache fill. Do.
  • the way selection circuit 71 selects a block selection signal (cen0 or cen1) so that one of the prioritized ways is selected according to the value of the history data bit LRU [0]. Is the logical value 1 and the indexed cache entry is the target of the cache fill.
  • Each of the other three block selection signals puts the corresponding tagway into a non-selected state. In this case, the way selection circuit 71 performs an update that inverts the value of the history data LRU [0].
  • the history data is updated by, for example, rewriting history data with the update information 73.
  • the block selection signals cen0 to cen3 are supplied to the corresponding ways TagWAY # 0 to TagWAT # 3 and DataWAT # 0 to DataWAY # 3 via the AND gate 72 when the cache fill request signal FLreq is activated. .
  • each valid bit V indicates the validity of the corresponding cache entry.
  • These valid bits V are stored in a storage device (such as a flip-flop) (not shown) separate from the memory block 16.
  • a storage device such as a flip-flop
  • four valid bits V are identified from 1024 valid bits and supplied to the way selection circuit 71.
  • the way selection circuit 71 specifies two valid bits V to be referred to based on the parity data PRTdat. When the parity data PRTdat has a logical value of 0, two valid bits V corresponding to TagWAY # 0 and TagWAY # 1 are referred to. When the parity data PRTdat has a logical value of 1, 2 corresponding to TagWAY # 1 and TagWAY # 2 respectively. Two valid bits V are referenced.
  • FIG. 7 illustrates a cache operation flow of a fill operation system for a cache entry.
  • the parity data PRTdat of the tag address information TAGadrs is generated from the fill address information FLadrs corresponding to the access address information ACCADrs (S21). If the value of the generated parity data PRTdat is 0 (S22), if the way # 0 is empty (invalid by the valid bit V) (S23), a cache fill is performed on the way # 0 (S26). If the way # 0 is not empty and the way # 1 is empty instead (S24), a cache fill is performed on the way # 1 (S27). When both the way # 0 and the way # 1 are valid, the priority of the way is determined by the value of the history bit LRU [0] (S25).
  • the cache fill to the way # 0 is performed. If the way # 1 has priority, the cache fill is performed on the way # 1 (S27). After step S26 or S27, the history bit LRU [1] is updated as described above (S28).
  • step S21 If it is determined in step S21 that the value of the parity data PRTdat is 1, if the way # 2 is empty (invalid due to the valid bit V) (S29), a cache fill is performed on the way # 2 (S32). If the way # 2 is not empty and the way # 3 is empty instead (S30), a cache fill is performed on the way # 1 (S33). When both the way # 2 and the way # 3 are valid, the priority of the way is determined by the value of the history bit LRU [1] (S31). If the way # 3 has priority, the cache fill is performed on the way # 3 (S33). After step S32 or S33, the history bit LRU [1] is updated as described above (S34).
  • the number of bits of the history data is equal to the number of bits of the parity data PRTdat. In this respect, it contributes to the reduction in the circuit scale of the LRU data array 15 and the reduction in power consumption.
  • the cache control circuit 10 uses the tagway TagWAY # 0 to TagWAY # 3 and the dataway DataWAY # 0 to # 3. Except for the configuration shown in FIG. 4 and the configuration shown in FIG.
  • the method of supplying the block enable signal to each of the tag ways TagWAY # 0 to TagWAY # 3 and the data ways DataWAY # 0 to # 3 is as follows.
  • an OR operation is performed between the block enable signal cen0 input to the tagway TagWAY # 0 shown in FIG. 4 and the block enable signal cen0 input to the tagway TagWAY # 0 shown in FIG.
  • An OR circuit (not shown) that performs the operation and supplies the calculation result to the tagway TagWAY # 0 is provided corresponding to the tagway WAY # 0.
  • Tagway TagWAY # 0 receives a block enable signal of logical value 1 when tagway TagWAY # 0 is selected during a read operation and a fill operation.
  • an OR operation between the block enable signal cen0 input to the data way DataWAY # 0 shown in FIG. 4 and the block enable signal cen0 input to the data way DataWAY # 0 shown in FIG. 6 is performed.
  • An OR circuit (not shown) is provided that performs the operation and supplies the calculation result to the data way DataWAY # 0.
  • FIG. 8 illustrates a configuration focusing on the read operation system for the cache entry when the parity check function can be selectively turned on / off.
  • the mode signal MOD instructing selection / non-selection of the parity check function is input to FIG. 4, and the way activation control mode, the cache hit signal CHIT generation mode, and the cache data are selected according to the value of the mode signal MOD.
  • the output control form of CDAT is different.
  • FIG. 9 illustrates a configuration that focuses on a fill operation system for a cache entry when the parity check function described above can be selectively turned on / off.
  • FIG. 9 illustrates a configuration that focuses on a fill operation system for a cache entry when the parity check function described above can be selectively turned on / off.
  • FIGS. 4 and 6 shows a mode signal MOD for instructing selection / non-selection of the parity check function, and a cache fill target way by a pseudo LRU using a history data update function and history data according to the value of the mode signal MOD.
  • the selection function is different. These differences will be described below. Components having the same functions as those in FIGS. 4 and 6 are denoted by the same reference numerals, and detailed description thereof is omitted.
  • a logical value 1 of the mode signal MOD indicates that the parity check function is selected, and a logical value 0 of the mode signal MOD indicates that the parity check function is not selected.
  • An inverted signal of the mode signal MOD is supplied to one input side of an AND gate that receives inverted data or non-inverted data of the parity data PRTdat via an OR gate (OR gate) 82.
  • the cache error signal 41 is fixed at the inactive level.
  • the history bit LRU [0] indicates the priority between the way # 0 and the way # 1
  • the history bit LRU [1] indicates the priority between the way # E2 and the way # 3
  • the history bit LRU [ 2] indicates the priority between the ways # 0 and # 1 and the ways # 2 and # 3.
  • MOD 0, 3-bit history data LRU [2: 0] is significant.
  • the cache control circuit 10 uses the tagway TagWAY # 0 to TagWAY # 3 and the dataway DataWAY # 0 to Except for # 3, the configuration shown in FIG. 8 and the configuration shown in FIG. 9 are combined.
  • the method of supplying the block enable signals to the tagways TagWAY # 0 to TagWAY # 3 and the dataways DataWAY # 0 to # 3 is the same as in the case of FIG. 4 and FIG.
  • Multi-bit parity data A case where parity data is used for the multi-bit cache memory 3 will be described.
  • FIG. 10 shows an example in which the configuration using a plurality of bits of parity data is applied to the configuration focusing on the read operation system for the cache entry in FIG.
  • the parity data is 1-bit parity data for all the bits of the tag address information TAGadrs that are a part of the access address information ACCadrs, and the parity data with a logical value of 0 is half of the plurality of memory blocks 16 in all ways.
  • the parity data of logical value 1 was used to select the remaining half of the plurality of memory blocks 16 in all ways. As a result, the power consumption required to read the cache tag for address comparison can be roughly halved.
  • the number of ways is eight, that is, eight tag ways TagWAY # 0 to TagWAT # 7 and eight data ways DataWAY # 0 to DataWAT # 7 are each configured by a memory block 16c.
  • 2-bit parity data PRTdat [1: 0] is generated and used for way selection.
  • the first bit (PRTdat [0]) of the parity data PRTdat “1: 0” is the parity bit for the lower 10 bits of the tag address information TAGadrs
  • the second bit (PRTdat [1]) is the tag address information TAGadrs. This is a parity bit for the upper 10 bits.
  • the 2-bit parity data PRTdat [1: 0] is coded by the decoder 90, and a way to be selected from a plurality of ways is determined according to the decoding result.
  • PRTdat “1: 0” 10 activates the wayway # 4 and # 5 tagway and dataway memory blocks 16.
  • PRTdat “1: 0” 11 activates the wayway # 6 and # 7 tagway and dataway memory blocks 16. That is, the number of memory blocks activated by the cache read operation for tag comparison is reduced to 1 ⁇ 4 of the total, and further low power consumption is realized.
  • the cache tags indexed by the activated tag ways TagWAY # 0 to TagWAT # 7 are compared with the tag address information TAGadrs by the determination circuits 54, 54, 53A, 54A in the activation unit by the parity data PRTdat [1: 0]. 4, the comparison results 55a, 56a, 55b, 56b, 55aA, 56aA, 55bA, and 56bA are selected by the selector 58A according to the value of the parity data PRTdat [1: 0], A cache hit signal CHIT and a cache error signal 41 are formed. In the case of a cache hit, the data of the cache entry related to the hit is manipulated. In the case of the cache operation responding to the read access illustrated in FIG. 10, when a cache hit is made, the selection data on the data way related to the hit is selected via the selection circuits 57a, 57b, 57aA, 57bA and cached. Output as data CDAT.
  • the number of bits of the parity data PRTdat is not limited to 2 bits, and the number of divisions for tag address information may be increased to 3 bits or more as required.
  • FIG. 11 illustrates a configuration focusing on a read operation system for a cache entry when two ways are stored for each memory block.
  • FIG. 12 illustrates a configuration focusing on the fill operation system for a cache entry when two ways are stored for each memory block.
  • the difference from FIGS. 4 and 6 is that the number of memory blocks is halved, and accordingly, the selection control form of the cache entry to be operated and the discrimination control circuit for the cache tag are different.
  • the two aggregated ways are selected by different values of the parity data PRTdat.
  • the logical value 0 of the parity data PRTdat means way selection of way numbers # 0 and # 1
  • the logical value 1 of the parity data PRTdat means way selection of way numbers # 2 and # 3
  • the way numbers # 0 and # 2 are stored in the same memory block
  • the way numbers # 1 and # 3 are stored in the same memory block
  • a plurality of ways are not selected in one memory block.
  • tagway TagWAY # 0 and TagWAY # 2 are set as one set
  • tagway TagWAY # 1 and TagWAY # 3 are set as one set
  • dataway DataWAY # 0 and DataWAY # 2 are set as one set
  • DataWAY # 3 as a set, and each set is stored in a separate memory block 16A.
  • the number of entries held by one memory block 16A is 512 entries, which is twice that of 256 in the case of FIGS.
  • the lower bits addr [7: 0] are set as 7-bit index address information INDadrs ([1: 4]).
  • the most significant bit addr [8] is set as parity data PRTdat.
  • the parity data PRTdat that determines the most significant bit addr [8] has significance as a selection bit indicating which of the two ways to be collected in one memory block 16A is selected.
  • the read request signal RDreq can be used in common for the block enable signals cena and cenb of the four memory blocks 16A.
  • the circuit 100 for comparing the cache tag read from the two memory blocks with the tag address information TAGadrs for determination is configured to have the functions of the determination circuits 53 and 54 and the selection circuit 58 of FIG. Just do it.
  • the number of sense amplifiers SA included in each memory block 16A as an amplifier circuit for outputting cache tags and cache data indexed in the memory block 16A is equal to the number of sense amplifiers included in each memory block 16 in FIG. It is enough. In short, the total number of sense amplifiers included in all memory blocks 16A in the configuration of FIG. 11 is approximately half of the total number of sense amplifiers included in all memory blocks 16 in the configuration of FIG. Accordingly, the amount of standby current consumed by the sense amplifier is roughly halved.
  • the cache fill way selection circuit 71A has the same logic as the way selection circuit 71 described in FIG. 6 based on the parity data PRTdat, LRU [1: 0] and the valid bit V.
  • the way to perform cache fill is determined, but the output selection signal 101 is logical value 0 when the number # 0 or # 2 way is to be filled, and logical value when the number # 1 or # 3 way is to be filled. Set to 1.
  • the output selection signal 101 is set to complementary level block enable signals cena and cenb via the inverter 102 and the AND gate 103.
  • the block enable signal cena is a block enable signal for the two memory blocks 16A assigned to the tag way and data way of number # 0 or # 2, and the block enable signal cen is the tag way and data way of number # 1 or # 3.
  • This is a block enable signal for the two memory blocks 16A assigned to. Which way is selected in each memory block 16A is determined by using 1-bit parity data PRTdat as the address bit a [8] of the memory block 16A as described above.
  • the cache fill way selection result by the pseudo LRU is made exactly the same as in FIG. Since other configurations such as history data update by the update information 73 for the LRU array 15 and the meaning of the history data are the same as those in FIG. 6, detailed description thereof will be omitted.
  • the cache control circuit 10 uses the tagway TagWAY # 0 to TagWAY # 3 and the dataway DataWAY # 0 to Except for # 3, the configuration shown in FIG. 11 and the configuration shown in FIG.
  • the method of supplying the block enable signals to the tagways TagWAY # 0 to TagWAY # 3 and the dataways DataWAY # 0 to # 3 is the same as in the case of FIG. 4 and FIG.
  • the present invention can also be applied to the configuration using the parity bits.
  • the number of bits of the parity data PRTdat is not limited to 2 bits, and may be 3 bits or more.
  • tag address information is also a part of the physical address information. It goes without saying that the tag address information may be a part of the logical address information even when the address information is a logical address. However, in the case of a logical address, information necessary for converting the logical address into a physical address. In some cases, ( ⁇ ) may be included. In this case, it is a good idea to include information ⁇ as tag address information. Naturally, parity data is generated for tag address information including information ⁇ . For example, in the case of performing processing in multi-threads, the virtual CPU number (Virtual CPU ID) for processing each thread is used as the information ⁇ .
  • a tag entry includes a valid bit V indicating the validity of the cache entry, a lock bit L indicating whether or not replacement of the cache entry is prohibited, a Virtual CPU ID indicating a virtual CPU number, and a Logical indicating a logical address cache tag. Address [31:12].
  • FIG. 14 illustrates a configuration focusing on the read operation system for the cache entry when the tag entry of FIG. 13 is used.
  • the tag CPU's Virtual CPU ID and Logical Address [31:12] are stored in the illustrated tagway, and the valid bit V and the lock bit L are stored in another storage device (such as a flip-flop) not illustrated.
  • the parity generation circuit 30B generates parity data PRTdat using LogicalLogicAddress [31:12] and Virtual CPU ID [3: 0], and the determination circuits 53B and 54B have Logical Address [ 31:12] and Virtual CPU ID [3: 0] are set as tag address information TAGadrs, and are compared with the indexed cache tag.
  • FIG. 4 illustrates a configuration focusing on the read operation system for the cache entry when the tag entry of FIG. 13 is used.
  • the tag CPU's Virtual CPU ID and Logical Address [31:12] are stored in the illustrated tagway, and the valid bit V and the lock bit L are stored in another storage device (such
  • FIG. 15 shows the cache entry when using the tag entry of FIG. A configuration focusing on the fill operation system is exemplified.
  • the difference from FIG. 6 is that the entry information to be written as a cache tag is Virtual CPU ID [3: 0] and Logical Address [31:12] corresponding to the tag address information TAGadrs.
  • the cache control circuit 10 uses the tagway TagWAY # 0 to TagWAY # 3 and the dataway DataWAY # 0 to Except for # 3, the configuration shown in FIG. 13 and the configuration shown in FIG. 14 are combined.
  • the method of supplying the block enable signals to the tagways TagWAY # 0 to TagWAY # 3 and the dataways DataWAY # 0 to # 3 is the same as in the case of FIG. 4 and FIG.
  • FIG. 16 shows a specific example of the memory blocks 16, 16A, 15, 15A.
  • the memory blocks 16, 16A, 15, 15A are configured, for example, as static random access memories (SRAM), and a plurality of static memory cells MC (one representative is shown in the figure) in the memory array (MCA) 110. Are arranged in a matrix.
  • the selection terminal of the memory cell is connected to the word line WL shown representatively, and the data input / output terminal of the memory cell is connected to the complementary bit lines BLt and BLb shown representatively.
  • the word line WL is driven by a word driver (WDRV) 111.
  • the row address decoder (RDEC) 112 decodes the row address signal RAdd to generate a word line selection signal, and the word driver (WDRV) 111 drives the word line WL according to the selection level of the generated word line selection signal.
  • the plurality of complementary bit lines BLt and BLb are selected by the column switch circuit (CSW) 113 and made conductive to the sense amplifier (SA) 114 or the write amplifier (WA) 115.
  • the column address decoder (CDEC) 116 decodes the column address signal CAdd to generate a complementary bit line selection signal, and the column switch circuit 113 that receives the generated complementary bit line selection signal selects the complementary bit lines BLt and BLb.
  • Timing controller (TCNT) 117 receives block enable signal CEN, write enable signal WEN, and address signal Add from the outside.
  • the block enable signal CEN corresponds to the block enable signal cen described above.
  • the timing controller 117 is activated when the block enable signal CEN is set to a selection level. That is, upon receiving an address signal ADD input from the outside, the row address signal RAdd is supplied to the row address decoder 112 and the column address signal CAdd is supplied to the column address decoder 116, and the address decoders 111 and 116 can perform a selection operation. . Further, the sense amplifier 114 is activated in response to a read operation instruction by the write enable signal WEN, and the write amplifier 115 is activated in response to a write operation instruction by the write enable signal WEN.
  • the activated sense amplifier 114 amplifies weak read data transferred from the memory cell MC to the complementary bit lines BLt and BLb connected via the column switch 113, and generates a data signal Dout.
  • the activated write amplifier 115 transfers the input data Din to the complementary bit lines BLt and BLb connected via the column switch 113, and writes it to the memory cell MC selected by the word line WL.
  • the number of bits of the output data Dout and the input data Din is the number of bits corresponding to the number of bits of the tag entry in the case of the tagway, and the number of bits corresponding to the number of bits of the data entry in the case of the dataway.
  • FIG. 17 illustrates the arrangement of tag entries stored in the memory cell array (MCA) 110 of TagWAY # 0 configured by the memory block 16 as an example of the tagway.
  • the total number of tag entries is 256, and four tag entries are stored per row of the memory cell array, and the number of rows is 64.
  • One tag entry consists of M bits (M is an arbitrary integer), and FIG. 17 illustrates 20-bit tag address information ⁇ ⁇ ⁇ ⁇ [31:12]. That is, in FIG. 17, the tagways of FIGS. 4, 6, 8, 9, 14, and 15 are schematically represented.
  • one tag entry out of 256 is selected by the 8-bit address signal Add (index address information [11: 4]). Specifically, four tag entries on the word line are selected by the upper 6 bits (row address) of the address signal Add signal, and one of the four tag entries is selected by the column switch by the lower 2 bits (column address).
  • the complementary bit lines BLt and BLb of one selected tag entry are electrically coupled to the sense amplifier 114.
  • TagWAT # 1 to TagWAY # 3 including the memory block 16 are the same.
  • FIG. 18 exemplifies the arrangement of data entries stored in the memory cell array (MCA) 110 of DataWAY # 0 configured by the memory block 16 as an example of the data way.
  • the total number of data entries is 256, and four data entries are stored per row of the memory cell array, and the number of rows is 64.
  • One data entry, that is, one line of the data way consists of L bits.
  • L is an arbitrary integer, which is larger than the tagway entry size.
  • one of 256 data entries is selected by an 8-bit address signal Add (index address information [11: 4]).
  • four data entries on the word line are selected by the upper 6 bits (row address) of the address signal Add signal, and one of the four data entries is selected by the column switch by the lower 2 bits (column address).
  • the complementary bit lines BLt and BLb of one selected data entry are electrically coupled to the sense amplifier 114.
  • FIG. 19 illustrates the arrangement of tag entries stored in the memory cell array (MCA) 110 of TagWAY # 0 and TagWAY # 2 configured by the memory block 16A as another example of the tagway.
  • the total number of tag entries is 512, and four tag entries are stored per row of the memory cell array, and the number of rows is 128.
  • One tag entry consists of M bits (M is an arbitrary integer), and FIG. 19 illustrates 20-bit tag address information [31:12]. That is, in FIG. 19, the tagways of FIGS. 11 and 12 are schematically represented.
  • one tag entry out of 512 is selected by 8-bit address signal Add (index address information [11: 4]) and 1-bit parity data PRTdat (addr [8]).
  • TagWAT # 1 and TagWAY # 3 configured by the memory block 16A are the same.
  • the 20 exemplifies the arrangement of data entries stored in the memory cell array (MCA) 110 of DataWAY # 0 and DataWAY # 2 configured by the memory block 16 as an example of the data way.
  • the total number of data entries is 512, and four data entries are stored per row of the memory cell array, and the number of rows is 128.
  • One data entry, that is, one line of the data way consists of L bits.
  • L is an arbitrary integer, which is larger than the tagway entry size.
  • one tag entry out of 512 is selected by 8-bit address signal Add (index address information [11: 4]) and 1-bit parity data PRTdat (addr [8]).
  • FIG. 21 illustrates the arrangement of LRU entries stored in the memory cell array (MCA) 110 of the LRU arrays 15 and 15A.
  • the total number of LRU entries is 256, and four LRU entries are stored per row of the memory cell array, and the number of rows is 64.
  • One LRU entry consists of 2 bits or 3 bits. 9 bits are required in the case of FIG.
  • one of the 256 LRU entries is selected by the 8-bit address signal Add (index address information [11: 4]). Specifically, four LRU entries on the word line are selected by the upper 6 bits (row address) of the address signal Add signal, and one of the four LRU entries is selected by the column switch by the lower 2 bits (column address).
  • the complementary bit lines BLt and BLb of one selected LRU entry are electrically coupled to the sense amplifier 114.
  • FIG. 22 summarizes the main aspects of the index operation mode for the tagway.
  • An operation for four tagways TagWAY # 0 to TagWAY # 3 is taken as an example.
  • the four memory blocks 16 are accessed at the same time, so that the power consumption is the largest compared to the following operation forms.
  • the number of memory blocks 16 used for storing the tagways TagWAY # 0 to TagWAY # 3 is as described above.
  • the number of memory blocks 16 to be operated when detecting a cache hit or cache miss is two.
  • Tagways assigned to one memory block 16A are tagways that are not simultaneously selected according to the value of parity data PRTdat. That is, tagway TagWAY # 0 and TagWAY # 1 are set as one pair, and tagway TagWAY # 2 and TagWAY # 3 are set as the other pair.
  • the parity data PRTdat 0, the two memory blocks 16A storing the tag ways TagWAY # 0 and TagWAY # 2 are simultaneously accessed to select a required tagway from one of the memory blocks.
  • the two memory blocks 16A in which the tag ways TagWAY # 1 and TagWAY # 3 are stored are simultaneously accessed to select a desired tagway from one of the memory blocks. Since there are two memory blocks to be operated and each memory block 16A has twice the storage capacity of the memory block 16, the power consumption is expected to be almost the same as the selection mode in which the memory blocks are selected in units of ways. Therefore, it is considered that the overall power consumption is smaller than that of the selection mode in which all memory blocks in units of ways are selected. The power consumption greatly affects the sense amplifier operation and particularly the standby current electricity such as the subthreshold leakage current.
  • the tagway and the dataway have been described as being indexed in parallel, but the present invention is not limited to this.
  • the selection data is not limited to parity data, and a specific bit of index address information may be used when the parity check function is unnecessary.
  • the data configuration of the cache entry, the data configuration of the tag entry, the number of bits thereof, and the like can be changed as appropriate.
  • the tag address information is not limited to the virtual CPU number / logical address pair of FIG. 13, but the CPU's virtual address space row configuration and data processing thread such as an address space number (ASID) / logical address pair. It can be appropriately changed according to the configuration.
  • the microcomputer is not limited to a single CPU core, but can be applied to a multi-CPU core.
  • index address information may be configured using a virtual CPU number corresponding to a multi-thread for each CPU core.
  • the cache memory may be any of an instruction cache, a data cache, and a unified cache, and is applicable to either a primary cache or a secondary cache.
  • parity data is generated for the tag address TAGadrs, one or more tagways and corresponding dataways are selected from a plurality of tagways based on the parity data, and other tagways and corresponding dataways are non- Although it is selected, low power consumption is realized even if data for selecting a tag way is generated from the tag address TAGadrs by an arbitrary method. For example, as a simple method, any one of the 20 bits of the tag address TAGadrs can be used as a way selection signal.
  • the present invention is widely applied to a semiconductor integrated circuit that performs caching using a set associative method, a microcomputer having a primary or secondary cache, a semiconductor integrated circuit such as a system-on-chip so-called SoC, a modularized semiconductor device, and the like. can do.
  • Microcomputer 2 CPU (Central Processing Unit) 3 Cache memory (CACHMRY) 4 Internal bus 9 Interrupt controller (INTC) 5 Random access memory (RAM) 6 Direct memory access controller (DMAC) 7 Flash memory (FLASH) 8 Other peripheral circuits (PRPHRL) 10 Cache control circuit (CACHCNT) 11 Memory mat (MRYMAT) 12 Tagway (TagWAY) 13 Dataway (DataWAY) 14 Cache entry (CachENTRY) 15 LRU data array (LRUARY) 16 Memory block TagWAT # 0 to TagWAT # n-1 Tagway ACCadrs Access address information TAGadrs Tag address information IDXadrs Index address information 30 Parity generation circuit (PRTYG) 31 Tag comparison circuit (TAGCMP) 32 Multi-hit detection circuit (MLTHIT) PRTdat Parity data cen0 to cen3 cena, cenb enable signal (block enable signal)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 複数のウェイの中からアドレス情報の一部であるタグアドレス情報に基づいて生成される選択データの値に応じて一部のウェイを選択して、キャッシュタグをリードする。また、キャッシュメモリはキャッシュフィルを行うとき、前記選択データの値に応ずる一部のウェイの中から選んだキャッシュエントリにキャッシュフィルを行う。ウェイの選択に用いる選択データには例えばタグアドレス情報に対するパリティデータを用い、パリティデータの値に基づいてキャッシュタグをリードするウェイの選択、更には,キャッシュフィルを行うキャッシュエントリのウェイの選択を行う。

Description

データ処理装置
 本発明はセットアソシアティブ型のキャッシュメモリを含むデータ処理装置に関し、例えばマイクロコンピュータに適用して有効な技術に関する。
 オペランドデータや命令に対するCPUの高速アクセスを可能にするために大容量のワークメモリとCPUとの間にキャッシュメモリが配置される。比較的回路規模が小さく比較的高いキャッシュヒット率を得ることができるものとしてセットアソシアティブ型のキャッシュメモリ(以下単にセットアソシアティブキャッシュメモリとも称する)が用いられている。セットアソシアティブキャッシュメモリは、同一のキャッシュエントリに異なるタグのデータを複数格納することができる構造を有する。タグウェイとデータウェイとのペアを複数個備え、それらウェイのキャッシュエントリを例えば256種類とする場合にはアドレス情報の下位側8ビットのインデックスアドレス情報によって各ウェイのキャッシュエントリを選択する。タグウェイにはインデックスアドレスで指定されるキャッシュエントリ毎に、当該インデックスアドレス情報の上位側複数ビットのタグアドレス情報がキャッシュタグとして格納され、データウェイにはインデックスアドレスで指定されるキャッシュエントリ毎に、対応するインデックスアドレス情報及びタグアドレス情報によって特定されるアドレスのデータが格納される。CPUによるリードアクセス又はライトアクセスでは、そのアクセスアドレスのインデックスアドレス情報によって全てのタグウェイがリードされ、リードされたキャッシュタグがアクセスアドレス情報のタグアドレス情報に一致するとき、当該タグウェイとペアを成すデータウェイの対応するキャッシュエントリがデータリード又はデータライトによる操作の対象になる。ここで説明したセットアソシアティブキャッシュメモリについての内容は広く知られていることである。
 上述に代表されるように複数個のタグウェイを持つキャッシュメモリにおいては全てのタグウェイから同時にキャッシュタグを読み出して、逸早くキャッシュタグとタグアドレスとの一致不一致を判別することが行われているが、その場合には全てのタグウェイが並列に活性化されるので電力消費が増大する。この点について、特許文献1はダイレクトマップ形式とセットアソシアティブ形式とを切り換える可能にすることによって低消費電力化を実現しよとする。また、特許文献2はウェイの分割数を定めて、順番にウェイをアクセスするようにし、複数のウェイに対する並列的なインデックス動作を不用とするものである。
 また、キャッシュメモリについてもその記憶情報が宇宙線(α線、β線)等の影響によって不所望に反転するビット反転エラー(ソフトエラー)を生ずる場合がある。そのようなビット反転エラーはパリティビットを用いて検出することができる。特に、パリティチェックを用いた特許文献3はアクセスアドレスデータに対してパリティチェックを行うことにより、メモリアレイ毎のパリティチェック回路を不要とするものであり、これによってパリティチェック回路の数か減ることにより低消費電力を実現しようとする。
特開2002-236616号公報 特開2010-26716号公報 特開2000-132460号公報
 セットアソシアティブキャッシュメモリについての本発明者による低消費電力化の検討によれば、特許文献1の場合はダイレクトマップ形式を選択して低消費電力とするときキャッシュヒット率を犠牲にしなければならない。特許文献2の場合にはキャッシュメモリ動作の遅延が余儀なくされる。特許文献3の場合にはパリティチェック回路の数を減らすことによるものであり、それ以上を期待することはできない。
 更にセットアソシアティブキャッシュメモリに対する本発明者によるビット反転エラーを検出する回路規模の縮小についての検討によれば、特許文献3はアクセス要求アドレスそれ自体にエラーがあったかどうかの確認に止むもので、ウェイが保持するデータのビット反転エラーを検出する回路に対する縮小を期待することはできない。特許文献1は不所望なビット反転エラーに対するパリティチェックについて考慮していない。特許文献2はデータアレイから読み出されたデータの転送タイミングについての誤り検出について考慮され、ウェイが保持するデータの不所望なビット反転エラーの検出については考慮されていない。
 本発明の目的はセットアソシアティブキャッシュメモリにおいてウェイの選択という点でキャッシュエントリの選択動作速度を犠牲にすることなく低消費電力を図ることである。
 本発明の別の目的はセットアソシアティブキャッシュメモリにおいてウェイのビット反転エラーを検出する回路の規模を縮小することである。
 本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。
 本願において開示される発明のうち代表的なものについて簡単に説明すれば下記のとおりである。
 すなわち、複数のウェイの中からアドレス情報の一部であるタグアドレス情報に基づいて生成される選択データの値に応じて一部のウェイを選択して、キャッシュタグをリードする。また、キャッシュメモリはキャッシュフィルを行うとき、前記選択データの値に応ずる一部のウェイの中から選んだキャッシュエントリにキャッシュフィルを行う。
 ウェイの選択に用いる選択データには例えばタグアドレス情報に対するパリティデータを用い、パリティデータの値に基づいてキャッシュタグをリードするウェイの選択、更には,キャッシュフィルを行うキャッシュエントリのウェイの選択を行う。
 本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。
 すなわち、セットアソシアティブキャッシュメモリにおいてウェイの選択という点でキャッシュエントリの選択動作速度を犠牲にすることなく低消費電力を図ることができる。
 セットアソシアティブキャッシュメモリにおいてウェイのビット反転エラーを検出する回路の規模を縮小することができる。
図1はデータ処理装置の一実施の形態としてマイクロコンピュータを例示するブロック図である。 図2はセットアソシアティブキャッシュメモリの機能が実現される場合におけるメモリマットの概略的な構成を例示するブロック図である。 図3はキャッシュメモリのタグウェイに対するパリティ機能の基本的な構成を例示するブロック図である。 図4はキャッシュエントリに対するリード動作系に着目した構成を代表的に示すブロック図である。 図5はキャッシュエントリに対するリード動作系のキャッシュ動作フローを例示するフローチャートである。 図6は図4のリード動作系の構成に組み合わせられるフィル動作系に着目した構成を例示するブロック図である。 図7はキャッシュエントリに対するフィル動作系のキャッシュ動作フローを例示するフローチャートである。 図8はパリティチェック機能を選択的にオン/オフできるようにした場合におけるキャッシュエントリに対するリード動作系に着目した構成を例示するブロック図である。 図9はパリティチェック機能を選択的にオン/オフできるようにした場合におけるキャッシュエントリに対するフィル動作系に着目した構成を例示するブロック図である。 図10は複数ビットのパリティデータを用いる構成を図4のキャッシュエントリに対するリード動作系に着目した構成に適用した例を示すブロック図である。 図11はメモリブロック毎に2個のウェイを格納するようにした場合におけるキャッシュエントリに対するリード動作系に着目した構成を例示するブロック図である。 図12はメモリブロック毎に2個のウェイを格納するようにした場合におけるキャッシュエントリに対するフィル動作系に着目した構成を例示するブロック図である。 図13はマルチスレッドで処理を行う場合に夫々のスレッドの処理を行うバーチャルCPU番号(Virtual CPU ID)が上記情報αとされる場合におけるタグエントリの構成を例示する説明図である。 図14は図13のタグエントリを用いる場合におけるキャッシュエントリに対するリード動作系に着目した構成を例示するブロック図である。 図15は図13のタグエントリを用いる場合におけるキャッシュエントリに対するフィル動作系に着目した構成を例示するブロック図である。 図16はメモリブロック16,16A,15,15Aの具体例を示すブロック図である。 図17はタグウェイの一例としてメモリブロック16で構成されるTagWAY#0のメモリセルアレイに記憶されるタグエントリの配置を例示する説明図である。 図18はデータウェイの一例としてメモリブロック16で構成されるDataWAY#0のメモリセルアレイに記憶されるデータエントリの配置を例示する説明図である。 図19はタグウェイの別の例としてメモリブロック16Aで構成されるTagWAY#0及びTagWAY#2のメモリセルアレイに記憶されるタグエントリの配置を例示する説明図である。 図20はデータウェイの一例としてメモリブロック16で構成されるDataWAY#0及びDataWAY#2のメモリセルアレイに記憶されるデータエントリの配置を例示する説明図である。 図21はLRUアレイ15,15Aのメモリセルアレイに記憶されるLRUエントリの配置を例示する説明図である。 図22はタグウェイに対するインデックス動作形態の主な態様をまとめとして示す説明図である。
1.実施の形態の概要
 先ず、本願において開示される発明の代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面中の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
 〔1〕<アドレス情報に基づいて一部のウェイを選択>
 本発明の代表的な実施の形態に係るデータ処理装置(1)は、複数のウェイに複数のキャッシュエントリを格納するセットアソシアティブ型のキャッシュメモリ(3)を含む。前記キャッシュメモリはキャッシュタグをリードするとき、前記複数のウェイ(12,13)の中から、アドレス情報の一部であるタグアドレス情報(TAGadrs)に基づいて生成される選択データ(PRTdat)の値に応じて一部のウェイを選択し、選択したウェイの中から、前記アドレス情報の中のインデックスアドレスを用いてキャッシュタグをリードする。また、前記キャッシュメモリはキャッシュフィルを行うとき、前記選択データの値に応ずる一部のウェイの中から選んだキャッシュエントリ(14)にキャッシュフィルを行う。
 これによれば、キャッシュタグをリードするとき選択データの値に応じて一部のタグウェイだけを選択して、その中からキャッシュタグをインデックスすればよく、すべてのタグウェイを並列的に動作させることを要さず、低消費電力に寄与する。キャッシュフィルの対象とするキャッシュエントリについても選択データの示すウェイに属するキャッシュエントリとするから、キャッシュ動作でリードすべきキャッシュタグを保有するウェイと選択データで選択されるウェイとの対応関係を容易に維持することができ、上記低消費電力が保証される。
 〔2〕<パリティデータを選択データに用いる>
 項1において、前記キャッシュメモリは、前記アドレス情報の一部であるタグアドレス情報に対するパリティデータ(PRTdat)を生成して前記選択データとする。
 これによれば、キャッシュエントリのリプレースメントには、少なくとも、使用するウェイの範囲を限定するパリティデータを用いることになる。したがって、キャッシュメモリに供給されるアドレス情報に誤りが無いともの仮定すれば、キャッシュタグのリード対象はそのアドレス情報に関するパリティデータの値に応ずるウェイになるので、キャッシュエントリに応じてパリティビットを保存することを要しない。したがって、リードされたキャッシュタグから、比較のためにパリティデータを生成する回路を必要とせずに、ビット反転したキャッシュタグを誤って正規のキャッシュタグとして処理する誤動作を抑制することができる。即ち、パリティデータの値が反転するようなビット反転がキャッシュタグに生じても、当該ビット反転したキャッシュタグが所在するウェイはそのパリティデータの値に従った本来のウェイにならないから、インデックスの対象にされない。これにより、キャッシュタグのビット反転に対する信頼性を向上させながら、パリティ生成回路の数を半減させることができる。更に、パリティ生成回路の数を半減させることができるという点で、更なる低消費電力も達成することができる。
 〔3〕<複数ヒットでキャッシュエラー>
 項1において、前記キャッシュメモリは、前記ウェイからリードされた夫々のキャッシュタグを前記タグアドレスと比較し、それらの比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、前記複数一致を判別したときはキャッシュエラー信号(41)を生成する。
 これによれば、キャッシュタグのビット反転によってタグアドレスと不一致になった場合には通常のキャッシュミスと同様に対処すればよい。キャッシュタグの複数ビット反転によって正規のキャッシュタグと同じキャッシュタグを有するキャッシュエントリが見かけ上発生しても、上記複数の一致を判別することによって、そのような異常に対処することができる。
 〔4〕<キャッシュエラーを例外要因又は割込み要因とする>
 項3において、前記キャッシュエラーの信号を例外要因又は割込み要因として入力する割込みコントローラ(9)をさらに有する。
 これによれば、そのようなキャッシュエラーの発生をビット反転の影響が大きくなったと考えるときには、その状況に応じた処理を割込み処理又は例外処理を介して柔軟に行うことが可能になる。
 〔5〕<データ操作対象とするキャッシュエントリ>
 項3において、前記キャッシュメモリは、前記一つだけ一致である比較結果に係るキャッシュタグのキャッシュエントリをデータ操作の対象とする。
 これによれば、通常のキャッシュヒットに応ずるキャッシュエントリのデータ操作に容易に移行することができる。
 〔6〕<ウェイ毎のメモリブロックに対する活性/非活性制御>
 項1において、前記ウェイは前記インデックスアドレスに対応して前記キャッシュタグを格納するタグウェイ(12)と、前記インデックスアドレスに対応してデータを格納するデータウェイ(13)とを有する。キャッシュエントリは前記キャッシュタグとそれに対応するデータを含み、前記複数のタグウェイのそれぞれはタグウェイ毎に活性又は非活性が選択されるメモリブロック(16)によって構成される。前記キャッシュメモリはキャッシュタグをリードするとき、前記選択データを用いたメモリブロックの活性化によって前記一部のタグウェイの選択を行う。
 これによれば、タグウェイ単位の複数のメモリブロックに対する選択的な非活性化によって低消費電力を実現することができる。
 〔7〕<1ビットパリティデータ>
 項6において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の全ビットに対する1ビットのパリティデータPRTdatであり、第1の論理値のパリティデータは前記複数のメモリブロックの半分の選択に用い、第2の論理値のパリティデータは前記複数のメモリブロックの残りの半分の選択に用いる。
 これにより、アドレス比較のためのキャッシュタグの読み出しに要する電力消費をおおよそ半減することができる。
 〔8〕<複数ビットパリティデータ>
 項6において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の複数分割部分毎のパリティビットから成る複数ビットのパリティデータ(PRTdat[1:0])であり、前記パリティデータの値は複数のタグウェイの中から選択するタグウェイを決める。
 これによれば、比較的容易な構成によって、アドレス比較のためのキャッシュタグの読み出しに必要な電力消費を更に低減することが可能になる。
 〔9〕<インデックスするタグウェイの選択機能をオン/オフ>
 項6において、前記キャッシュメモリは、前記複数のウェイの中から前記選択データにより一部のタグウェイを選択してキャッシュタグをリードする第1モード(PBS=on)と、キャッシュタグをリードする対象タグウェイをすべてのタグウェイとする第2モード(PBS=off)とを有し、前記第1モード又は第2モードを選択するモード選択信号(MOD)を入力する。
 これによれば、1ウェイ・1メモリブロックの構成を前提とするから、低消費電力を優先させたい場合には第1モード、高いキャッシュヒット率を優先させたい場合には第2モードを設定するという自由度を、第1モードだけが可能な回路構成に比べて構成の変更を最小限に実現することが可能になる。
 〔10〕<複数ウェイ毎のメモリブロックに対する活性/非活性制御>
 項1において、前記ウェイは前記インデックスアドレスに対応して前記キャッシュタグを格納するタグウェイと、前記インデックスアドレスに対応してデータを格納するデータウェイとを有する。キャッシュエントリは前記キャッシュタグとそれに対応するデータを含む。前記複数のタグウェイは所定複数個毎に一つのメモリブロック(16A)に集約されて構成され、同一メモリブロックに構成される複数のタグウェイは相互に異なる選択データによって選択される。前記キャッシュメモリはキャッシュタグをリードするとき、前記選択データと前記インデックスアドレス情報とを用いてキャッシュタグをリードする。
 これによれば、1個のメモリブロックには同時に選択されることの無い複数のタグウェイが集約されるから、1個のメモリブロックが備えるセンスアンプやバッファアンプの数は1個のメモリブロックに1個のタグウェイを備えるものと凡そ等しくなり、全メモリブロックの数が少なくなる分だけ、非活性状態におけるサブスレッショルドリーク電流のようなリーク電流が少なくなり、この点で更なる低消費電力に寄与することができる場合がある。
 〔11〕<1ビットパリティデータ>
 項10において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の全ビットに対する1ビットのパリティデータ(PRTdat)である。第1の論理値のパリティデータは夫々の前記メモリブロックの中の一方のタグウェイの選択に用いる。第2の論理値のパリティデータは夫々の前記メモリブロックの中の他方のタグウェイの選択に用いる。
 これにより、アドレス比較のためのキャッシュタグの読み出しに要する電力消費をおおよそ半減することができる。
 〔12〕<複数ビットパリティデータ>
 項10において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の複数分割部分毎のパリティビットから成る複数ビットのパリティデータ(PRTdat[1:0])であり、前記パリティデータの値は夫々のメモリブロックの中から選択するタグウェイを決める。
 これによれば、比較的容易な構成によって、アドレス比較のためのキャッシュタグの読み出しに必要な電力消費を更に低減することが可能になる。
 〔13〕<LRUデータアレイ>
 項1において、前記キャッシュメモリがキャッシュフィルを行うキャッシュエントリを決めるとき、キャッシュフィル対象とするキャッシュエントリを疑似LRUにより特定するための指標として用いるLRUデータ(LRU[1:0]、LRU[2:0])を格納するLRUデータアレイ(15,15A)を有する。前記LRUデータアレイは、キャッシュエントリに対するインデックスアドレス毎に、選択データで選択される一部のウェイ毎の利用履歴を示す複数ビットの履歴データを格納する領域を有する。前記キャッシュメモリは、インデックスアドレス情報を用いてLRUデータアレイから読み出した前記履歴データと、対応する選択データとに基づいてキャッシュフィルを行うキャッシュエントリを選ぶ。
 これによれば、キャッシュフィルを行うキャッシュエントリを選ぶのに履歴データに選択データを併用するので、選択データのビット数分だけ履歴データのビット数を減らすことができ、この点でLRUデータアレイの回路規模縮小とそれにおける電力消費の低減とに寄与する。
 〔14〕<ウェイ毎のメモリブロックに対応するLRU>
 項13において、前記複数のウェイのそれぞれはタグウェイ毎に活性又は非活性が選択されるメモリブロック(16)によって構成される。前記キャッシュメモリはキャッシュタグをリードするとき、前記選択データを用いたメモリブロックの活性化によって前記選択データによる一部のウェイの選択を行う。前記キャッシュメモリはキャッシュフィルを行うとき、夫々のメモリブロックにおいて前記インデックスアドレスが指し示すキャッシュエントリの内、インデックスアドレス情報に基づいて前記LRUデータアレイ(15)から読み出された複数ビットの前記履歴データ(LRU[1:0])と、前記タグアドレスに基づいて生成される前記選択データ(PRTdat)とによって、キャッシュフィルを行うキャッシュエントリを選択する。
 これによれば、履歴データを格納するときは選択データの値に応じて履歴データの値を決めればよく、インデックスされた履歴データの値に対して何れのメモリブロックを活性化するかはそのときの選択データの値によって決めればよく、活性化されたメモリブロックからキャッシュエントリを選択するために用いるアドレス情報はインデックスアドレス情報だけでよい。
 〔15〕<複数ウェイ毎のメモリブロックに対応するLRU>
 項13において、前記複数のウェイは所定複個毎に一つのメモリブロック(16A)に集約されて構成され、同一メモリブロックに構成される複数のウェイは相互に異なる選択データによって選択される。前記キャッシュメモリはキャッシュタグをリードするとき、活性化された夫々のメモリブロックの中の何れのウェイを選択するかを前記選択データによって指定され、指定されたウェイの中のいずれのキャッシュタグを選択するかを前記アドレス情報の中のインデックスアドレス情報によって指定される。前記キャッシュメモリはキャッシュフィルを行うとき、いずれのメモリブロックを選択するかを、前記LRUデータアレイ(15A)からインデックスアドレス情報によって読み出された複数ビットの履歴データ(LRU[2:0」)によって指定され、指定されたメモリブロックの中から何れのウェイを選択するかを、前記選択データ(PRTdat)によって指定され、指定されたウェイの中から何れのキャッシュエントリをキャッシュフィルの対象とするかを、前記インデックスアドレス(IDXadrs)によって指定される。
 これによれば、履歴データを格納するときは選択データの値に応じて履歴データの値を決めればよく、インデックスされた履歴データの値に対して何れのメモリブロックの何れのキャッシュエントリを選択するかは、そのときの選択データの値とインデックスアドレス情報とによって決めればよい。
 〔16〕<パリティデータを用いてウェイを選択>
 本発明の別の実施の形態に係るデータ処理装置(1)は、複数ウェイに複数のキャッシュエントリを格納するセットアソシアティブ型のキャッシュメモリ(3)を含む。前記キャッシュメモリはキャッシュタグをリードするとき、前記複数のウェイの中から何れの一部のウェイを選択するかを、アドレス情報の一部であるタグアドレス情報(TAGadrs)に基づいて生成されるパリティデータ(PRTdat)の値に応じて指定され、指定されたウェイの中から何れのキャッシュタグをリードするかを、前記アドレス情報の中のインデックスアドレス情報によって指定される。リードされたキャッシュタグを前記タグアドレスと比較し、それらの比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、前記複数一致を判別したときはキャッシュエラー信号(41)を生成する。前記キャッシュメモリはキャッシュフィルを行うとき、前記選択データの値に応ずる一部のウェイの中から選んだキャッシュエントリにキャッシュフィルを行う。
 これによれば、項1と同様に、キャッシュ動作でリードすべきキャッシュタグを保有するウェイと選択データで選択されるウェイとの対応関係を容易に維持して、低消費電力に寄与する。更に、項2同様に、キャッシュエントリに対応してパリティビットを保存することを要せず、キャッシュタグのビット反転に対する信頼性を向上させながら、パリティ生成回路の数を半減させることができる。また、項3同様に、キャッシュタグのビット反転によってタグアドレスと不一致になった場合には通常のキャッシュミスと同様に対処すればよい。キャッシュタグの複数ビット反転によって正規のキャッシュタグと同じキャッシュタグを有するキャッシュエントリが見かけ上発生しても、上記複数の一致を判別することによって、そのような異常に対処することができる。
 〔17〕<パリティデータを用いてウェイを選択>
 本発明の更に別の実施の形態に係るデータ処理装置(1)は、複数にウェイに複数のキャッシュエントリを格納するセットアソシアティブ型のキャッシュメモリ(3)を含む。前記キャッシュメモリはキャッシュタグをリードするとき、前記複数のウェイの中から何れの一部のウェイを選択するかを、アドレス情報の一部であるタグアドレス情報(TAGadrs)に基づいて生成されるパリティデータ(PRTdat)の値に応じて指定され、指定されたウェイの中から何れのキャッシュタグをリードするかを、前記アドレス情報の中のインデックスアドレス情報(IDXadrs)によって指定される。リードされたキャッシュタグを前記タグアドレスと比較し、それらの比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、前記複数一致を判別したときはキャッシュエラー信号(41)を生成する。前記キャッシュメモリは、キャッシュフィルを行うキャッシュエントリを決めるとき、キャッシュフィルの対象とするキャッシュエントリを疑似LRUにより特定するための指標として用いるLRUデータ(LRU[1:0],LRU[2:0])を格納するLRUデータアレイ(15,15A)を有する。前記LRUデータアレイは、キャッシュエントリに対するインデックスアドレス毎に、パリティデータで選択される一部のウェイ毎の利用履歴を示す複数ビットの履歴データを格納する領域を有する。前記キャッシュメモリは、インデックスアドレス情報を用いてLRUデータアレイから読み出した前記履歴データと、対応する選択データとに基づいてキャッシュフィルを行うキャッシュエントリを選ぶ。
 これによれば、項1と同様に、キャッシュ動作でリードすべきキャッシュタグを保有するウェイと選択データで選択されるウェイとの対応関係を容易に維持して、低消費電力に寄与する。更に、項2同様に、キャッシュエントリに対応してパリティビットを保存することを要せず、キャッシュタグのビット反転に対する信頼性を向上させながら、パリティ生成回路の数を半減させることができる。また、項3同様に、キャッシュタグのビット反転によってタグアドレスと不一致になった場合には通常のキャッシュミスと同様に対処すればよい。キャッシュタグの複数ビット反転によって正規のキャッシュタグと同じキャッシュタグを有するキャッシュエントリが見かけ上発生しても、上記複数の一致を判別することによって、そのような異常に対処することができる。また、項13と同様に、キャッシュフィルを行うキャッシュエントリを選ぶのに履歴データに選択データを併用するので、選択データのビット数分だけ履歴データのビット数を減らすことができ、この点でLRUデータアレイの回路規模縮小とそれにおける電力消費の低減とに寄与する。
 〔18〕<一部のウェイの中から操作対象のキャッシュエントリを選ぶ>
 本発明の更に別の実施の形態に係るデータ処理装置(1)は、複数のウェイを複数のキャッシュエントリの格納に用いるセットアソシアティブ型のキャッシュメモリ(3)を含む。前記キャッシュメモリはアドレス情報に基づいてウェイを操作するとき、前記アドレス情報の一部であるタグアドレス情報(TAGadrs)に基づいて生成される選択データ(PRTdat)に応ずる一部のウェイの中から操作対象とするキャッシュエントリを選ぶ。
 これによれば、キャッシュタグのリード又はキャッシュフィルのための操作対象とするキャッシュエントリは、選択データの値に応ずる一部のウェイから選べばよいので、すべてのウェイを並列的に動作させることを要さず、低消費電力に寄与する。操作対象のキャッシュエントリは選択データを用いて選択されるから、キャッシュタグがリードされるウェイトとキャッシュフィルの対象とされるウェイとの対応関係を容易に維持することができる。
 〔19〕<一部のウェイの中からキャッシュタグリード又はキャッシュフィル対象のキャッシュエントリを選ぶ>
 本発明の更に別の実施の形態に係るデータ処理装置(1)は、複数のウェイを複数のキャッシュエントリの格納に用いるセットアソシアティブ型のキャッシュメモリ(3)を含む。前記キャッシュメモリは、アドレス情報の一部であるタグアドレス情報(TAGadrs)に基づいて生成される選択データに応ずる一部のウェイの中から、アドレスタグと比較するキャッシュタグをリードし、且つ、キャッシュフィルを行うキャッシュエントリを選ぶ。
 これによれば、キャッシュタグのリード又はキャッシュフィルの操作対象とするキャッシュエントリは、選択データの値に応ずる一部のウェイから選べばよいので、すべてのウェイを並列的に動作させることを要さず、低消費電力に寄与する。操作対象のキャッシュエントリは選択データを用いて選択されるから、キャッシュタグがリードされるウェイトとキャッシュフィルの対象とされるウェイとの対応関係を容易に維持することができる。
 〔20〕<選択データを用いてキャッシュタグをリードするウェイの選択と、使用履歴に従ったキャッシュフィルを行うキャッシュエントリの選択とを行う>
 本発明の更に別の実施の形態に係るデータ処理装置(1)は、複数のウェイを複数のキャッシュエントリの格納に用いるセットアソシアティブ型のキャッシュメモリ(3)を含む。前記キャッシュメモリはキャッシュタグをリードするとき、複数のウェイの内のどのウェイを選択するかを、アドレス情報の一部であるタグアドレス情報(TAGadrs)に基づいて生成される選択データ(PRTdat)の値に応じて指示され、指示されたウェイの中から何れのキャッシュタグをリードするかを、前記アドレス情報の中のインデックスアドレス(IDXadrs)によって指示される。前記キャッシュメモリはキャッシュフィルを行うとき、全てのウェイのキャッシュエントリについての前記インデックスアドレス単位で参照される使用履歴(LRU[1:0],LRU[2:0])と前記選択データ(PRTdat)の値との組み合わせにしたがって、キャッシュフィルを行うキャッシュエントリの選択を行う。
 これによれば、キャッシュタグのリード又はキャッシュフィルの操作対象とするキャッシュエントリは、選択データの値に応ずる一部のウェイから選べばよいので、すべてのウェイを並列的に動作させることを要さず、低消費電力に寄与する。操作対象のキャッシュエントリは選択データを用いて選択されるから、キャッシュタグがリードされるウェイトとキャッシュフィルの対象とされるウェイとの対応関係を容易に維持することができる。さらに、キャッシュフィルを行うキャッシュエントリを選ぶのに履歴データに選択データを併用するので、選択データのビット数分だけ履歴データのビット数を減らすことができ、この点で履歴データを保持する回路の規模縮小とそれにおける電力消費の低減とに寄与する。
 2.実施の形態の詳細
 実施の形態について更に詳述する。なお、発明を実施するための形態を説明するための全図において、同一の機能を有する要素には同一の符号を付して、その繰り返しの説明を省略する。
 ≪1.マイクロコンピュータ≫
 図1にはデータ処理装置の一実施の形態としてマイクロコンピュータ(MCU)1が例示される。同図に示されるマイクロコンピュータ1は、特に制限されないが、単結晶シリコンのような1個の半導体基板にCMOS集積回路製造技術を用いて形成される。
 マイクロコンピュータ1は、特に制限されないが、命令をフェッチして解読し、解読結果にしたがって、必要なオペランドデータをフェッチして、演算処理を行うCPU(中央処理装置)2を有する。図ではCPU2はシングルコアのように図示されているが、マルチコア構成であってよいことは言うまでもない。また、CPU2のプログラム実行形態はシングルスレッドだけでなく、マルチスレッドにも適用可能になっており、一つのプログラムをマルチスレッドで処理する場合、或いは複数のプログラムをプログラム単位のスレッドとして全体としてマルチスレッドで処理する場合の何れであってもよい。
 3はキャッシュメモリ(CACHMRY)であり、内部バス4とCPU2との間に配置される。図ではCPUが実行する命令及び命令実行に用いるオペランドや演算データなどのデータは共に一次的にキャッシュメモリ3に配置される。内部バス4には代表意的に示された割込みコントローラ(INTC)9、スタティックランダムアクセスメモリ(SRAM)などで構成されたRAM5、ダイレクトメモリアクセスコントローラ(DMAC)6、電気的に書き換え可能なフラッシュメモリ(FLASH)7、及びその他周辺回路(PRPHRL)8が接続される。その他周辺回路8はタイマやマイクロコンピュータ1の外部への入出力ポートなどを含む。特に制限されないが、RAM5やFLSH7はプログラムやデータの格納に用いられ、例えば、それらはキャッシュメモリ3によるキャッシュの対象にされる。
 キャッシュメモリ3は、特に制限されないが、キャッシュ制御回路(CACHCNT)10とメモリマット(MRYMAT)11を有し、セットアソシアティブキャッシュメモリの機能が実現されている。
 図2にはセットアソシアティブキャッシュメモリの機能が実現される場合におけるメモリマット11の概略的な構成が例示される。セットアソシアティブキャッシュメモリは複数のウェイを有し、夫々のウェイはタグウェイ(TagWAY)12とデータウェイ(DataWAY)13を有し、各ウェイに複数のキャッシュエントリ(CachENTRY)14が形成される。タグウェイ(TagWAY)12はキャッシュエントリ14毎にキャッシュタグ、バリッドビット、及びロックビットなどを有する。データウェイ(DataWAY)13はキャッシュエントリ14毎にキャッシュタグに対応するキャッシュデータ(CPUが実行するプログラムやCPUが用いるオペランドデータ)を保有する。
 ここでは、一つのデータウェイ(DataWAY)14が16バイトのキャッシュデータを保有し、キャッシュエントリ(CachENTRY)14の数が256エントリとする、4ウェイ・セットアソシアティブキャッシュメモリを一例とする。この場合、CPU2が生成する複数ビットのアドレス情報の内、最下位4ビットは一つのデータウェイ(DataWAY)13のキャッシュデータから32ビット(4バイト)を選択するためのオフセットアドレス情報、その上位側8ビットは一つのキャッシュエントリ(CachENTRY)14を選択するためのインデックスアドレス情報、更にその上位側はタグアドレス情報とされる。キャッシュタグには対応するキャッシュエントリ14のキャッシュデータに応ずるタグアドレス情報が用いられる。
 LRUデータアレイ(LRUARY)15はリプレースするキャッシュエントリ(CachENTRY)14を選択する指標として用いる履歴データを保有する。履歴データは同じインデックスアドレスのキャッシュエントリに関し、最近使用されていないものを特定するための情報とされる。この例ではLRUデータアレイ(LRUARY)15は256個の履歴データを有し、履歴データはインデックスアドレス情報によってアクセスされる。
 図2において20はキャッシュエントリ14の書き込み経路、21はキャッシュエントリの読み出し経路である。22はタグウェイ12及びデータウェイ13に対するウェイの選択及び選択するウェイに対してインデックスを行う選択経路である。23はLRUアレイ15に対する履歴データの書き込み、経路、24は履歴データの読み出し経路、25は履歴データの選択経路である。
 キャッシュメモリ3はタグウェイに対するパリティ機能を備えるが、その機能追加に対して回路規模の簡素化と低消費電力が考慮されている。以下、その点についてキャッシュメモリの詳細を説明する。
 ≪2.タグウェイに対するパリティ機能≫
 図3にはキャッシュメモリのタグウェイに対するパリティ機能の基本的な構成が例示される。ここではnウェイ・セットアソシアティブキャッシュメモリにおけるn個のタグウェイTagWAT#0~TagWAT#n-1に着目する。
 ACCadrsはCPUが生成するアクセスアドレス情報である。TAGadrsはアクセスアドレス情報ACCadrsに含まれるタグアドレス情報、IDXadrsはアクセスアドレス情報ACCadrsに含まれるインデックスアドレス情報である。図に示されるパリティ生成回路(PRTYG)30、タグ比較回路(TAGCMP)31及びマルチヒット検出回路(MLTHIT)32などはキャッシュ制御回路10によって構成される。
 パリティ生成回路30は例えばタグアドレス情報TAGadrsの全ビットに対する1ビットのパリティビットをパリティデータPRTYdatとして生成する。偶数パリティ又は奇数パリティの何れを用いるかは偶奇選択信号(ODSEL)42で指定される。具体的には偶奇選択信号42が論理値1の場合、パリティ生成回路は、タグアドレス情報TAGadrsの全ビットについて排他的論理和EXORを行い、当該全ビット中に論理値1が偶数個あるとき論理値0のパリティデータPRTdateを出力し、当該全ビット中に論理値1が奇数個あるとき論理値1のパリティデータPRTdateを出力する。偶奇選択信号42が論理値0の場合、パリティ生成回路は、タグアドレス情報TAGadrsの全ビットについて排他的否定論理和EXNORを行い、当該全ビット中に論理値1が偶数個あるとき論理値1のパリティデータPRTdateを出力し、当該全ビット中に論理値1が奇数個あるとき論理値0のパリティデータPRTdateを出力する。
 パリティデータPRTdatはタグウェイ12に供給される。パリティデータPRTYdatの論理値1は奇数番号のタグウェイTagWAY#1、TagWAY#3、…のグループの選択を指示し、パリティデータPRTYdatの論理値0は0及び偶数番号のタグウェイTagWAY#0、TagWAY#2、…のグループの選択を指示する。したがって、キャッシュフィルを行うときは、前記パリティデータPRTdatの値に応ずる一方のグループのタグウェイの中から選ばれたキャッシュエントリにキャッシュフィルを行う。また、キャッシュタグをリードするときは、タグウェイTagWAY#0~TagWAY#n-1のうちパリティデータPRTdatの値に応じて一方のグループのタグウェイの動作が選択され、選択されたウェイの中から、インデックスアドレスIDXadrsを用いてキャッシュタグをリードする。例えばウェイの数が2個の場合、パリティデータPRTdatが論理値0のときは一方のタグウェイTagWAY#0が利用され、パリティデータPRTdatが論理値1のときは他方のタグウェイTagWAY#1が利用される。
 これによれば、キャッシュタグをリードするときパリティデータPRTdataの値に応じて一部のタグウェイだけを選択して、その中からキャッシュタグをインデックスすればよく、すべてのタグウェイを並列的に動作させることを要さず、その点で低消費電力が実現される。このとき、キャッシュフィルの対象とされるキャッシュエントリもパリティデータPRTdaの値に応ずるウェイに属するキャッシュエントリとされているから、キャッシュ動作でリードすべきキャッシュタグを保有するウェイとパリティデータPRTdaで選択されるウェイとの対応関係が維持されているから、上記低消費電力が保証される。
 さらに、キャッシュフィルによるキャッシュエントリのリプレースメントには、少なくとも、使用するウェイの範囲を限定するパリティデータPRTdatを用いることになる。キャッシュメモリ3に供給されるアクセスアドレス情報ACCadrsに誤りが無いともの仮定すれば、キャッシュタグのリード対象はそのタグアドレス情報TAGadrsに関するパリティデータPRTdatの値に応ずるウェイになるので、キャッシュエントリ(CashENTRY)14に応じてパリティビットを保存することを要しない。したがって、リードされたキャッシュタグから、比較のためにパリティデータを生成する回路を必要とせずに、ビット反転したキャッシュタグを誤って正規のキャッシュタグとして処理する誤動作を抑制することができる。即ち、パリティデータの値が反転するようなビット反転がキャッシュタグに生じても、当該ビット反転したキャッシュタグが所在するウェイはそのパリティデータPRTdatの値に従った本来のウェイにならないから、インデックスの対象にされない。これにより、キャッシュタグのビット反転に対する信頼性を向上させながら、パリティ生成回路の数を半減させることができる。パリティ生成回路の数を半減させることができるという点で、更なる低消費電力も達成することができる。
 パリティデータPRTdatの値に応じてタグウェイTagWAY#0~TagWAY#n-1の内の一方のグループから出力されるn/2個のキャッシュタグ、又は他方のグループから出力されるn/2個のキャッシュタグは、CTAG#0~CTAG#n/2として図示される。出力されたキャッシュタグCTAG#0~CTAG#n/2はタグ比較回路31でタグアドレスTAGadrsと比較され、その比較結果を対応するタグウェイに関連つけて比較結果の一致又は不一致を示す信号(ヒットウェイ判別信号:HITWAY)40などを出力する。ヒットウェイ判別信号40は、前記マルチヒット検出回路32に供給されると共に、図3には示していないが、ヒットに係るデータウェイでインデックスされたキャッシュエントリの選択に用いられる。マルチヒット検出回路32は、ヒットウェイ判別信号40に基づいて、比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、複数一致を判別したときはキャッシュエラー信号(CERR)41を生成する。すべて不一致の判別結果はキャッシュミス、一つだけ一致の判別結果はキャッシュヒットになる。
 ヒットウェイ判別信号40及びキャッシュエラー信号41を生成することにより、キャッシュタグのビット反転によってタグアドレスとの比較結果が不一致になった場合には通常のキャッシュミスと同様に対処することができる。更に、キャッシュタグの複数ビット反転によって正規のキャッシュタグと同じキャッシュタグを有するキャッシュエントリが見かけ上発生しても、上記複数の一致を判別することによって、そのような異常に対処することができる。例えば、前記キャッシュエラーの信号41を例外要因又は割込み要因として割込みコントローラ9に与えれば、そのキャッシュエラーの発生をビット反転の影響が大きくなったと考える場合には、その状況に応じた処理をCPU2による割込み処理又は例外処理を介して柔軟に行うことが可能になる。
 ≪3.ウェイ毎のメモリブロックをパリティデータで選択≫
 ここではパリティデータを用いてウェイ毎のメモリブロックに対する活性/非活性制御を行う場合について説明する。
 図4にはキャッシュエントリに対するリード動作系に着目した構成が代表的に示される。各ウェイにおけるキャッシュエントリは256エントリ、データウェイの1ラインを16バイト、とする4ウェイ・セットアソシアティブキャッシュメモリの構成を一例とする。
 この例では、インデックスアドレスIDXadrsに対応して前記キャッシュタグを格納するタグウェイTagWAY#0~TagWAY#3と、前記インデックスアドレスIDXadrsに対応してデータを格納するデータウェイDataWAY#0~DataWAY#3とのそれぞれはタグウェイ、データウェイ毎に活性又は非活性が選択されるメモリブロック16によって構成される。cen0~cen3はウェイ毎のメモリブロック16のイネーブル信号(ブロックイネーブル信号)であり、対応するブロックイネーブル信号cen0~cen3が活性化(例えばハイレベル)にされることによって当該メモリブロック16の内部回路が動作可能にされる。例えば、対応するブロックイネーブル信号cen0~cen3が活性化されることにより、入力アドレス信号に応答してアドレシングを行ってリードデータに対するセンス増幅動作が可能にされる。リードリクエスト信号RDreqのハイレベルによって読み出しが指示されたとき、パリティデータPRTdatが論理値0(ローレベル)であれば、タグウェイTagWAY#0,TagWAY#1及びデータウェイDataWAY#0,DataWAY#1を含む一方のウェイグループが活性化される。これに対して、リードリクエスト信号RDreqのハイレベルによって読み出しが指示されたとき、パリティデータPRTdatが論理値1(ハイレベル)であれば、タグウェイTagWAY#2,TagWAY#3及びデータウェイDataWAY#2,DataWAY#3を含む他方のウェイグループが活性化される。50はアンドゲート、51はインバータである。
 活性化されたウェイグループのウェイはインデックスアドレス情報IDXadrsによってインデックスされ、キャッシュエントリが選択される。52はインデックスアドレス情報IDXadrsをデコードして対応するキャッシュラインを選択する選択回路を概念的に示すものであり、他の図ではそれぞれのウェイにその機能が含まれるものとして説明されている。キャッシュエントリが選択されたタグウェイから出力されるキャッシュタグは判別回路53,54でタグアドレス情報TAGadrsと比較され、比較結果に応じたヒットウェイ判別信号40a,40b、ヒット信号55a、55b、及び複数ウェイヒット信号56a,56bを生成する。判別回路53,54は図3で説明したタグ比較回路31及びマルチヒット検出回路32の機能を有する。ヒットウェイ判別信号40a,40bは夫々の判別回路53,54で一つのキャッシュタグがタグアドレスに一致するとき、一致にかかるタグウェイに対応するデータウェイの出力データをセレクタ57a、57bに選択させる。ヒット信号55a、55bは夫々の判別回路53,54で一つのキャッシュタグがタグアドレスに一致するか否かを示す信号である。複数ウェイヒット信号56a,56bは夫々の判別回路53,54で双方のキャッシュタグがタグアドレスに一致するか否かを示す信号である。セレクタ58は、パリティデータPRTdatが値0のとき、それによって活性化されるタグウェイ側の判別回路53の出力を選択し、パリティデータPRTdatが値1のとき、それによって活性化されるタグウェイ側の判別回路54の出力を選択する。セレクタ58で選択されたヒット信号55a又は55bはリードリクエスト信号RDreqとの論理積が採られてキャッシュヒット信号CHITとして用いられる。セレクタ58で選択された複数ウェイヒット信号56a又は56bはキャッシュエラー信号41として用いられる。セレクタ59は、パリティデータPRTdatが値0のとき、それによって活性化されるデータウェイDataWAY#0,dataWAY#1側で選択されて供給されるキャッシュデータを選択し、パリティデータPRTdatが値1のとき、それによって活性化されるデータウェイDataWAY#2,dataWAY#3側で選択されて供給されるキャッシュデータを選択する。セレクタ59で選択されたデータはキャッシュヒットに係るキャッシュデータCDATとしてCPU2に向けて出力される。フリップフロップ(FF)60はウェイのメモリサイクルに応じて入力信号をラッチして所用の動作タイミングを確保する。尚、図4において、TagWAT#0~TagWAY#3,DataWAY#0~DataWAY3以外の構成は例えばキャッシュ制御回路10に含まれている。
 尚、図4ではキャッシュヒットの場合にヒットに係るキャッシュエントのデータ操作としてデータリードの場合が例示されており、データ操作が書き込みの場合については図示を省略してあるが、キャッシュデータCDATに読み出し経路とは逆の書き込み経路が設けられているものと理解されたい。
 図5にはキャッシュエントリに対するリード動作系のキャッシュ動作フローが例示される。
 アクセスアドレス情報ACCadrsからタグアドレス情報TAGadrsのパリティデータPRTdatを生成する(S1)。生成したパリティデータPRTdatの値が0の場合には(S2)、タグウェイTagWAY#0及びTagWAY#1のキャッシュタグがリードされ(S3)、リード結果から、双方のキャッシュタグがヒットでないことを条件に(S4)、タグウェイTagWAY#0でヒットであれば(S5)、データウェイDataWAY#0の対応するキャッシュエントリがリード又はライトの操作対象にされる(S6)。タグウェイTagWAY#1でヒットであれば(S7)、データウェイDataWAY#1の対応するキャッシュエントリがリード又はライトの操作対象にされる(S8)。ステップS7又はS8の場合はキャッシュヒット、タグウェイTagWAY#0とタグウェイTagWAY#1の双方でヒットがなければキャッシュミスとされる。
 ステップS2でパリティデータPRTdatの値が1の場合には、タグウェイTagWAY#2及びTagWAY#3のキャッシュタグがリードされ(S9)、リード結果から、双方のキャッシュタグがヒットでないことを条件に(S10)、タグウェイTagWAY#2でヒットであれば(S11)、データウェイDataWAY#2の対応するキャッシュエントリがリード又はライトの操作対象にされる(S12)。タグウェイTagWAY#3でヒットであれば(S13)、データウェイDataWAY#3の対応するキャッシュエントリがリード又はライトの操作対象にされる(S14)。ステップS12又はS14の場合はキャッシュヒット、タグウェイTagWAY#2とタグウェイTagWAY#3の双方でヒットがなければキャッシュミスとされる。
 ステップS4又はステップS10で双方のタグウェイで重ねてヒットが生じた場合にはキャッシュエラーとされる。
 図6には図4のリード動作系の構成に組み合わせられるフィル動作系に着目した構成が例示される。同図において各ウェイの構成は図4と同一である。LRUデータアレイ15はキャッシュメモリ3がキャッシュフィルを行うキャッシュエントリを決めるとき、キャッシュフィル対象とするキャッシュエントリを疑似LRUにより特定するための指標として用いるLRUデータLRUdatを格納する。このLRUデータアレイ15は、キャッシュエントリに対するインデックスアドレスIDXadrs毎に、パリティデータPRTdatの値に対応して選ばれる一部のウェイ毎の利用履歴を示す2ビットの履歴データLRU[1:0](各ビットをLRU[0],LRU[1]と表す)を格納するメモリ領域を有する。履歴データLRU[1:0]はキャッシュエントリに対するパージによって論理値0に初期化される。履歴データLRU[0]はウェイ#0(タッグウェイTagWAY#0及びデータウェイDataWAY#0)又はウェイ#1(タッグウェイTagWAY#1及びデータウェイDataWAY#1)の何れのウェイの有効なキャッシュエントリを優先してリプレースに用いるかを示す。履歴データLRU[1]はウェイ#2(タッグウェイTagWAY#2及びデータウェイDataWAY#2)又はウェイ#3(タッグウェイTagWAY#3及びデータウェイDataWAY#3)の何れのウェイの有効なキャッシュエントリを優先させてリプレースに用いるかを示す。例えば、インデックスアドレス情報に対応してLRUデータアレイ15に格納されるLRU[0]は、当該インデックスアドレス情報に応ずるウェイ#1のキャッシュエントリが用いられたとき論理値1に反転される。同様に、LRU[1]は、当該インデックスアドレス情報に応ずるウェイ#3のキャッシュエントリが用いられたとき論理値1に反転される。ここでは、履歴データLRU[0],LRU[1]の各ビットは、例えば論理値0の場合は小さなウェイ番号のウェイをリプレース対象とし、論理値1の場合は大きなウェイ番号のウェイをリプレース対象とし、リプレースを行う毎に対応する履歴データビットは反転して更新されるものとする。例えばLRU[0]について、初期値を論理値0とすると、初期化の次のフィルにはウェイ#0が用いられ、LRU[0]を論理値1に反転する。その次のリプレースでは、最近使用されていない方のウェイ#1をリプレース対象と、LRU[0]を論理値0に反転する。LRU[0]は以下同様にトグル操作されればよい。
 70はインデックスアドレス情報IDXadrsをデコードして対応する履歴データLRU[1:0]を選択する選択回路を概念的に示すものであり、他の図ではLRUアレイ15にその機能が含まれるものとして説明されている。
 71はキャッシュフィル用のウェイ選択回路である。ウェイ選択回路71は、インデックスアドレス情報IDXadrsを用いてLRUデータアレイ15から読み出した前記履歴データLRU[1:0]、及びパリティデータPRTdat及びバリッドビットVなどに基づいてキャッシュフィルに用いるウェイを選択するためのブロック選択信号を生成する。ブロック選択信号はメモリブロック16にそれぞれ供給するブロックイネーブル信号cen0~cen3に相当する。ブロック選択信号の選択論理は以下の通りである。
 ウェイ選択回路71は、例えば、パリティデータPRTdatが論理値0であればタグウェイTagWAT#0,TagWAT#1から順次インデックスされたキャッシュエントリのバリッドビットVを参照する。バリッドビットVが無効であるキャッシュエントリがキャッシュフィルの対象とされ、ウェイ選択回路71はそのキャッシュエントリの属する一つのタグウェイ(TagWAT#0及びTagWAT#1のいずれか)が選択されるように対応のブロック選択信号(cen0及びcen1のいずれか)を論理値1にする。他3つのブロック選択信号は論理値0を示しそれぞれ対応のタグウェイを非選択状態とする。ウェイ選択回路71は、さらに、履歴データLRU[0]に対して次のキャッシュフィルではタグウェイTagWAT#0,TagWAT#1のうちの選択されない側のウェイの優先度が高くなるように必要な更新を行う。バリッドビットVが双方ともに有効な場合には、ウェイ選択回路71は履歴データビットLRU[0]の値によって優先とされる方の一つのウェイが選択されるようにブロック選択信号(cen0又はcen1)を論理値1とし、インデックスされたキャッシュエントリをキャッシュフィルの対象にする。他3つのブロック選択信号はそれぞれ対応のタグウェイを非選択状態とする。この場合にはウェイ選択回路71は履歴データLRU[0]の値を反転させる更新を行う。履歴データの更新は例えば更新情報73による履歴データの書き換えによって行われる。尚、ブロック選択信号cen0~cen3はキャッシュフィルの要求信号FLreqが活性化されているときアンドゲート72を介して対応するウェイTagWAY#0~TagWAT#3、DataWAT#0~DataWAY#3に供給される。
 各キャッシュエントリに対応して256エントリ×4ウェイ=1024個のバリッドビットが設けられ、各バリッドビットVは対応するキャッシュエントリの有効性を示す。これらのバリッドビットVはメモリブロック16とは別の図示しない記憶装置(フリップフロップなど)に記憶される。インデックスアドレスIDXadrsに基づいて、1024個のバリッドビットの中から4つのバリッドビットV(4つのタグウェイにそれぞれに属する一つのキャッシュエントリに対応するもの)が特定され、ウェイ選択回路71に供給される。ウェイ選択回路71はパリティデータPRTdatに基づき、参照すべき2つのバリッドビットVを特定する。パリティデータPRTdatが論理値0のときTagWAY#0、TagWAY#1に対応するそれぞれ2つのバリッドビットVが参照され、パリティデータPRTdatが論理値1のときTagWAY#1、TagWAY#2に対応するそれぞれ2つのバリッドビットVが参照される。
 図7にはキャッシュエントリに対するフィル動作系のキャッシュ動作フローが例示される。
 アクセスアドレス情報ACCadrsに対応するフィルアドレス情報FLadrsからそのタグアドレス情報TAGadrsのパリティデータPRTdatを生成する(S21)。生成したパリティデータPRTdatの値が0の場合には(S22)、ウェイ#0が空き(バリッドビットVによる無効)であれば(S23)ウェイ#0にキャッシュフィルを行う(S26)。ウェイ#0が空きでなくその代わりにウェイ#1が空きの場合には(S24)、ウェイ#1にキャッシュフィルを行う(S27)。ウェイ#0とウェイ#1の双方が共に有効な場合には履歴ビットLRU[0]の値でウェイの優先度を判別し(S25)、ウェイ#0が優先であればウェイ#0にキャッシュフィルを行い(S26)、ウェイ#1が優先であればウェイ#1にキャッシュフィルを行う(S27)。ステップS26又はS27の後に上述の如く履歴ビットLRU[1]の更新を行う(S28)。
 ステップS21において、パリティデータPRTdatの値が1と判別された場合には、ウェイ#2が空き(バリッドビットVによる無効)であれば(S29)ウェイ#2にキャッシュフィルを行う(S32)。ウェイ#2が空きでなくその代わりにウェイ#3が空きの場合には(S30)、ウェイ#1にキャッシュフィルを行う(S33)。ウェイ#2とウェイ#3の双方が共に有効な場合には履歴ビットLRU[1]の値でウェイの優先度を判別し(S31)、ウェイ#2が優先であればウェイ#2にキャッシュフィルを行い(S32)、ウェイ#3が優先であればウェイ#3にキャッシュフィルを行う(S33)。ステップS32又はS33の後に上述の如く履歴ビットLRU[1]の更新を行う(S34)。
 上記キャッシュフィル動作系の構成によれば、キャッシュフィルを行うキャッシュエントリを選ぶのに履歴データLRU[1:0]にパリティデータPRTdatを併用するので、パリティデータPRTdatのビット数分だけ履歴データのビット数を減らすことができ、この点でLRUデータアレイ15の回路規模縮小とそれにおける電力消費の低減とに寄与する。
 なお説明の便宜上、リード動作系に関する構成及びのフィル動作系に関する構成は別々の図面で説明されたが、キャッシュ制御回路10が、タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3を除いて図4に示す構成及び図6に示す構成を併せもつ。タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3へのそれぞれブロックイネーブル信号の供給方法は次のとおりである。
 タグウェイWAY#0を例にとれば、図4に示されるタグウェイTagWAY#0に入力されるブロックイネーブル信号cen0と図6に示されるタグウェイTagWAY#0に入力されるブロックイネーブル信号cen0とのOR演算を行い、その演算結果をタグウェイTagWAY#0に供給するOR回路(図示せず)がタグウェイWAY#0に対応して設けられる。タグウェイTagWAY#0はリード動作時及びフィル動作時にタグウェイTagWAY#0が選択されたときに論理値1のブロックイネーブル信号を受ける。データウェイDataWAY#0についても、図4に示されるデータウェイDataWAY#0に入力されるブロックイネーブル信号cen0と図6に示されるデータウェイDataWAY#0に入力されるブロックイネーブル信号cen0とのOR演算を行い、その演算結果をデータウェイDataWAY#0に供給するOR回路(図示せず)が設けられる。
 タグウェイTagWAY#1~3、データウェイDataWAY#0~4についても同様であり、それぞれに対応するOR回路が設けられ、その出力をそれぞれブロックネーブル信号cen1~cen3としてタグウェイTagWAY#1~3、データウェイDataWAY#0~4に供給される。
 ≪4.パリティデータによるタグウェイ選択機能のオン/オフ≫
 次に、上述したパリティチェック機能(単にPBSとも記す)を選択的にオン/オフできるようにする場合について説明する。
 図8にはパリティチェック機能を選択的にオン/オフできるようにした場合におけるキャッシュエントリに対するリード動作系に着目した構成が例示される。図4とは、パリティチェック機能の選択/非選択を指示するモード信号MODを入力し、モード信号MODの値に応じて、ウェイの活性化制御形態、キャッシュヒット信号CHITの生成形態、及びキャッシュデータCDATの出力制御形態が相違される。図9には上述したパリティチェック機能を選択的にオン/オフできるようにした場合におけるキャッシュエントリに対するフィル動作系に着目した構成が例示される。図6とは、パリティチェック機能の選択/非選択を指示するモード信号MODを入力し、モード信号MODの値に応じて、履歴データの更新機能及び履歴データを用いた疑似LRUによるキャッシュフィル対象ウェイの選択機能が相違される。それら相違点について以下で説明するが、図4及び図6と同一機能を有する構成要素についてはそれと同一符号を付してその詳細な説明を省略する。
 図8において、モード信号MODの論理値1はパリティチェック機能選択、モード信号MODの論理値0はパルティチェック機能の非選択を指示する。パリティデータPRTdatの反転データ又は非反転データを受けるアンドゲートの一方の入力側に、オアゲート(論理和ゲート)82を介してモード信号MODの反転信号が供給される。81はモード信号MODを反転するインバータである。したがって、ウェイ#0~#3の選択はMOD=1のときは図4と同様にパリティデータPRTdatの値に応じてその半分とされ、MOD=1のときはすべてのウェイ#0~#3とされる。
 モード信号MODを受ける判別回路80は、MOD=1のとき図4で説明した判別回路53,54及び選択回路58による機能と同じ機能によってキャッシュヒット信号CHIT及びキャッシュエラー信号41を生成する。モード信号MOD=0のときは、パリティデータPRGTdatを使用せず、夫々のタグウェイTagWAY#1~TagWAY#3でインデックスされたキャッシュタグをタグアドレス情報TAGadrsと比較してキャッシュヒット信号CHITを生成する。この動作モードにおいてキャッシュエラー信号41はインアクティブレベルに固定される。
 LRUアレイ15Aは、MOD=1のときは図6で説明した通りパリティデータPRTdatを併用する関係から履歴データは2ビットあればよいが、MOD=0のときは3ビット必要意になる。パリティデータPRTdatを用いないので、それを代用するビットとして履歴ビットLRU[2]は追加されなければならない。したがって、LRUアレイ15Aはインデックスアドレス毎に3ビットの履歴データLRU[2:1]の格納領域を必要とする。履歴ビットLRU[0]はウェイ#0とウェイ#1との間の優先度を示し、履歴ビットLRU[1]はウェイ#E2とウェイ#3との間の優先度を示し、履歴ビットLRU[2]はウェイ#0、#1とウェイ#2、#3との間の優先度を示す。MOD=1のときは2ビットの履歴データLRU[1:0]が有意とされ、MOD=0のときは3ビットの履歴データLRU[2:0]が有意とされる。
 これによれば、1ウェイ・1メモリブロックの構成を前提とするから、図4及び図6の構成に対して少ない回路変更によってパリティチェックの有無を選択可能な構成を得ることができる。パリティチェック機能と低消費電力を優先させたい場合にはMOD=1による第1モード、高いキャッシュヒット率を優先させたい場合にはMOD=0による第2モードを設定するという自由度を得ることができる。
 なお、説明の便宜上、リード動作系に関する構成及びのフィル動作系に関する構成は別々の図面に記載にされたが、キャッシュ制御回路10が、タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3を除いて図8に示す構成及び図9に示す構成を併せもつ。タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3へのそれぞれブロックイネーブル信号の供給方法は、図4及び図6の場合と同じであるので説明を省略する。
 ≪5.複数ビットのパリティデータ≫
 複数ビットのキャッシュメモリ3にパリティデータを用いる場合について説明する。
 図10には複数ビットのパリティデータを用いる構成を図4のキャッシュエントリに対するリード動作系に着目した構成に適用した例が示される。
 図4の例ではパリティデータはアクセスアドレス情報ACCadrsの一部であるタグアドレス情報TAGadrsの全ビットに対する1ビットのパリティデータであり、論理値0のパリティデータは全ウェイの複数のメモリブロック16の半分の選択に用い、論理値1のパリティデータは全ウェイの複数のメモリブロック16の残りの半分の選択に用いた。これにより、アドレス比較のためのキャッシュタグの読み出しに要する電力消費をおおよそ半減することができる。
 これに対して図10の例では、ウェイの数を8個、すなわち、8個のタグウェイTagWAY#0~TagWAT#7と8個のデータウェイDataWAY#0~DataWAT#7をそれぞれメモリブロック16cで構成し、2ビットのパリティデータPRTdat[1:0]を生成してウェイの選択に用いる。パリティデータPRTdat「1:0」の第1ビット目(PRTdat[0])は、タグアドレス情報TAGadrsの下位10ビットに対するパリティビット、第2ビット目(PRTdat[1])は、タグアドレス情報TAGadrsの上位10ビットに対するパリティビットである。2ビットのパリティデータPRTdat[1:0]はデコーダ90でコードされ、そのデコード結果にしたがって複数のウェイの中から選択するウェイを決める。図10では、PRTdat「1:0」=00でウェイ番号#0、#1のタグウェイとデータウェイのメモリブロック16を活性化する。PRTdat「1:0」=01でウェイ番号#2、#3のタグウェイとデータウェイのメモリブロック16を活性化する。PRTdat「1:0」=10でウェイ番号#4、#5のタグウェイとデータウェイのメモリブロック16を活性化する。PRTdat「1:0」=11でウェイ番号#6、#7のタグウェイとデータウェイのメモリブロック16を活性化する。すなわち、タグ比較のためのキャッシュリード系動作で活性化されるメモリブロックの数は全体の1/4に低減され、更なる低消費電力が実現される。
 活性化されたタグウェイTagWAY#0~TagWAT#7でインデックスされたキャッシュタグは、パリティデータPRTdat[1:0]による活性化単位で判定回路54,54,53A,54Aによりタグアドレス情報TAGadrsと比較され、図4で説明したのと同様に比較結果55a,56a,55b,56b,55aA,56aA,55bA,56bAがパリティデータPRTdat[1:0]の値に応じてセレクタ58Aで選択されることにより、キャッシュヒット信号CHIT及びキャッシュエラー信号41が形成される。キャッシュヒットの場合にはヒットに係るキャッシュエントリのデータが操作される。図10に例示されるリードアクセスに応答するキャッシュ動作の場合にはキャッシュヒットにされると、ヒットに係るデータウェイでの選択データが選択回路57a,57b、57aA,57bAを介して選択されてキャッシュデータCDATとして出力される。
 尚、パリティデータPRTdatのビット数は2ビットに限定されず必定に応じてタグアドレス情報に対する分割数を増やして3ビット以上にしてもよい。
 そのほかの構成は図4と同じであるからその詳細な説明は省略する。キャッシュフィルの構成については図示を省略するが、図6の構成を主体に2ビットのパリティデータPRTdat[1:0]と2ビットのLRUデータLRU[1:0]を用いて8個のウェイのメモリブロックからキャッシュフィルの対象ウェイを選択するようにすればよい。特に図示はしないが、2ビットのパリティデータPRTdat[1:0]を用いる場合も図8及び図9で説明したPBSのオン/オフ選択機能につても容易に適用可能である。
 ≪6.複数ウェイ毎のメモリブロックに対する活性/非活性制御≫
 次に、メモリブロック毎に複数個のウェイを格納してウェイの選択を行う場合について説明する。図11にはメモリブロック毎に2個のウェイを格納するようにした場合におけるキャッシュエントリに対するリード動作系に着目した構成が例示される。図12にはメモリブロック毎に2個のウェイを格納するようにした場合におけるキャッシュエントリに対するフィル動作系に着目した構成が例示される。図4及び図6との相違点はメモリブロックの数が半減され、それに応じて操作対象とするキャッシュエントリの選択制御形態とキャッシュタグに対する判別制御回路が相違される。それら相違点について以下で説明するが、図4及び図6と同一機能を有する構成要素についてはそれと同一符号を付してその詳細な説明を省略する。
 1個のメモリブロック16Aには2個のウェイが集約されて格納されるが、集約される2個のウェイはパリティデータPRTdatの相互に異なる値によって選択されるものとする。例えば図4と同様にパリティデータPRTdatの論理値0はウェイ番号#0、#1のウェイ選択を意味し、パリティデータPRTdatの論理値1はウェイ番号#2、#3のウェイ選択を意味するとき、ウェイ番号#0と#2のウェイを同一のメモリブロックに格納し、ウェイ番号#1と#3のウェイを同一のメモリブロックに格納して、一つのメモリブロック内で複数のウェイが選択されないようにする。具体的には、タグウェイTagWAY#0とTagWAY#2を一組とし、タグウェイTagWAY#1とTagWAY#3を一組とし、データウェイDataWAY#0とDataWAY#2を一組とし、データウェイDataWAY#1とDataWAY#3を一組とし、各組を別々のメモリブロック16Aに格納する。
 これを実現するために1個のメモリブロック16Aが保有するエントリ数は図4及び図6の場合の256の2倍の512エントリとされる。それをインデックスするのに必定な8ビットのアドレス情報の内、下位ビットaddr[7:0]を、7ビットのインデックスアドレス情報INDadrs([1:4])とする。最上位ビットaddr[8]をパリティデータPRTdatとする。最上位ビットaddr[8]を決めるパリティデータPRTdatが、1個のメモリブロック16Aに集約される2個のウェイの何れを選択するかを示す選択ビットとしての意義を有することになる。4個のメモリブロック16Aのブロックイネーブル信号cena,cenbには例えばリードリクエスト信号RDreqを共通に用いることができる。この場合に、2個のメモリブロックから読み出されたキャッシュタグとタグアドレス情報TAGadrsとを比較して判別する回路100は図4の判別回路53,54と選択回路58の機能を備えて構成されればよい。
 メモリブロック16Aでインデックスされたキャッシュタグ、キャッシュデータを出力するための増幅回路としてそれぞれのメモリブロック16Aが持つセンスアンプSAの数は、図4のそれぞれのメモリブロック16が持つセンスアンプの数と等しければ十分である。要するに、図11の構成において全部のメモリブロック16Aが有するセンスアンプの合計個数は図4の構成において全部のメモリブロック16が有するセンスアンプの合計個数の大よそ半分になる。したがって、センスアンプで消費される待機電流の大きさも大よそ半分になる。
 図12に例示されるキャッシュフィル系では、キャッシュフィル用のウェイ選択回路71Aは、パリティデータPRTdat、LRU[1:0]及びバリッドビットVに基づき図6で説明したウェイ選択回路71と同じ論理をもってキャッシュフィルを行うウェイを決定するが、出力選択信号101は、番号#0又は#2のウェイをフィル対象とするとき論理値0、番号#1又は#3のウェイをフィル対象とするとき論理値1とする。キャッシュフィル要求信号Freqの論理値1によってキャッシュフィル動作が指示されているとき、出力選択信号101はインバータ102とアンドゲート103を介して、相補レベルのブロックイネーブル信号cenaとcenbにされる。ブロックイネーブル信号cenaとは番号#0又は#2のタグウェイとデータウェイに割り当てられた2個のメモリブロック16Aのブロックイネーブル信号であり、ブロックイネーブル信号cenbは番号#1又は#3のタグウェイとデータウェイに割り当てられた2個のメモリブロック16Aのブロックイネーブル信号である。各メモリブロック16Aにおいて何れのウェイを選ぶかは前述同様に1ビットのパリティデータPRTdatがメモリブロック16Aのアドレスビットa[8]として用いられることによって決まる。これにより疑似LRUによるキャッシュフィルのウェイ選択結果は図6と全く同じとされる。LRUアレイ15に対する更新情報73による履歴データの更新、履歴データの意味など、その他の構成は図6と同じであるからその詳細な説明は省略する。
 図11及び図12の構成によれば、動作電流に比べてセンスアンプなどの待機電流を問題視する場合には、図4及び図6の構成よりも低消費電力に寄与できる場合がある。すなわち、1個のメモリブロック16Aには同時に選択されることの無い複数のタグウェイが集約されるから、1個のメモリブロック16Aが備えるセンスアンプやバッファアンプの数は1個のメモリブロックに1個のタグウェイを備えるものと凡そ等しくなり、全メモリブロックの数が少なくなる分だけ、非活性状態におけるサブスレッショルドリーク電流のようなリーク電流が少なくなり、この点で更なる低消費電力を実現できる場合がある。
 なお、説明の便宜上、リード動作系に関する構成及びのフィル動作系に関する構成は別々の図面に記載にされたが、キャッシュ制御回路10が、タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3を除いて図11に示す構成及び図12に示す構成を併せもつ。タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3へのそれぞれブロックイネーブル信号の供給方法は、図4及び図6の場合と同じであるので説明を省略する。
 また、メモリブロック毎に複数個のウェイを格納してウェイの選択を行う図11及び図12の場合にも、特に図示はしないが、図10で説明したようにタグアドレス情報の複数分割部分毎のパリティビットを用いる構成にも適用可能であることは言うまでもない。パリティデータPRTdatのビット数も2ビットに限定されず3ビット以上であってもよい。
 ≪7.タグアドレス情報のバリエーション≫
 アドレス情報が物理アドレスであればタグアドレス情報もその物理アドレス情報の一部の情報とされる。アドレス情報が論理アドレスのときもタグアドレス情報はその論理アドレス情報の一部の情報とされてよいことは言うまでもないが、論理アドレス場合には論理アドレスを物理アドレスに変換するときに必要となる情報(α)が含まれる場合もあり、そのときは、タグアドレス情報として情報αを含めて考えることが得策であり、当然、情報αも含めたタグアドレス情報に対してパリティデータを生成する。例えばマルチスレッドで処理を行う場合には夫々のスレッドの処理を行うバーチャルCPU番号(Virtual CPU ID)が上記情報αとされる。図13にはその場合のタグエントリの構成が例示される。図13においてタグエントリは、当該キャッシュエントリの有効性を示すバリッドビットV、当該キャッシュエントリのリプレース禁止か否かを示すロックビットL、バーチャルCPU番号を示すVirtual CPU ID、論理アドレスキャッシュタグを示すLogical Address[31:12]を有する。
 図14には図13のタグエントリを用いる場合におけるキャッシュエントリに対するリード動作系に着目した構成が例示される。タグエントリのVirtual CPU ID及びLogical Address[31:12]が図示するタグウェイに格納され、バリッドビットV及びロックビットLは図示しない別の記憶装置(フリップフロップなど)に格納される。図4との相違点は、パリティ生成回路30BはLogical Address[31:12]とVirtual CPU ID[3:0]を用いてパリティデータPRTdatを生成し、また、判別回路53B,54BはLogical Address[31:12]とVirtual CPU ID[3:0]をタグアドレス情報TAGadrsとし、インデックスされたキャッシュタグとの比較対象とすることである図15には図13のタグエントリを用いる場合におけるキャッシュエントリに対するフィル動作系に着目した構成が例示される。図6との相違点はキャッシュタグとして書き込むエントリ情報はタグアドレス情報TAGadrsに対応するVirtual CPU ID[3:0]及びLogical Address[31:12]になることである。
 その他の構成については図4及び図6の構成と同じであるからその詳細な説明は省略する。また、TAGアドレス情報及びキャッシュタグにVirtual CPU IDを含める場合にも、図8及び図9で説明したPBSのオン/オフ選択機能、上記上位機図10で説明したパリティデータの複数ビット化、図11及び図12で説明した複数ウェイを同じメモリブロックへの集約、の夫々の構成に適用することが可能であることは言うまでもなく、その詳細については説明を省略する。
 なお、説明の便宜上、リード動作系に関する構成及びのフィル動作系に関する構成は別々の図面に記載にされたが、キャッシュ制御回路10が、タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3を除いて図13に示す構成及び図14に示す構成を併せもつ。タグウェイTagWAY#0~TagWAY#3及びデータウェイDataWAY#0~#3へのそれぞれブロックイネーブル信号の供給方法は、図4及び図6の場合と同じであるので説明を省略する。
 ≪8.メモリブロック≫
 図16にはメモリブロック16,16A,15,15Aの具体例が示される。メモリブロック16,16A,15,15Aは例えばスタティックランダムアクセスメモリ(SRAM)として構成され、メモリアレイ(MCA)110には複数のスタティック型のメモリセルMC(図には代表的に1個が図示される)がマトリクス配置される。メモリセルの選択端子は代表的に示されたワード線WLに接続され、メモリセルのデータ入出力端子は代表的示された相補ビット線BLt、BLbに接続される。
 ワード線WLはワードドライバ(WDRV)111で駆動される。ロウアドレスデコーダ(RDEC)112はロウアドレス信号RAddをデコードしてワード線選択信号を生成し、生成されたワード線選択信号の選択レベルによってワードドライバ(WDRV)111がワード線WLを駆動する。
 複数の相補ビット線BLt、BLbはカラムスイッチ回路(CSW)113で選択されてセンスアンプ(SA)114又は書き込みアンプ(WA)115に導通される。カラムアドレスデコーダ(CDEC)116はカラムアドレス信号CAddをデコードして相補ビット線選択信号を生成し、生成された相補ビット線選択信号を受けるカラムスイッチ回路113が相補ビット線BLt、BLbを選択する。
 タイミングコントローラ(TCNT)117は外部からブロックイネーブル信号CEN、ライトイネーブル信号WEN、及びアドレス信号Addを受ける。ブロックイネーブル信号CENは上述のブロックイネーブル信号cenに対応される。タイミングコントローラ117はブロックイネーブル信号CENが選択レベルにされることによって活性化される。すなわち、外部から入力されるアドレス信号ADDを受けてロウアドレス信号RAddをロウアドレスデコーダ112に、カラムアドレス信号CAddをカラムアドレスデコーダ116に供給するとともに、アドレスデコーダ111,116による選択動作を可能とする。更に、ライトイネーブル信号WENによる読み出し動作の指示に応答してセンスアンプ114を活性化し、ライトイネーブル信号WENによる書き込み動作の指示に応答してライトアンプ115を活性化する。
 活性化されたセンスアンプ114はカラムスイッチ113を介して接続される相補ビット線BLt、BLbにメモリセルMCから転送される微弱な読出しデータを増幅し、データ信号Doutを生成する。活性化されたライトアンプ115は入力データDinをカラムスイッチ113を介して接続される相補ビット線BLt、BLbへ転送し、ワード線WLで選択されたメモリセルMCに書き込む。
 出力データDout及び入力データDinのビット数はタグウェイの場合にはタグエントリのビット数に応ずるビット数とされ、データウェイの場合にはデータエントリのビット数に応ずるビット数とされる。
 図17にはタグウェイの一例としてメモリブロック16で構成されるTagWAY#0のメモリセルアレイ(MCA)110に記憶されるタグエントリの配置が例示される。タグエントリの数は全部で256個、メモリセルアレイの一行あたり4個のタグエントリが格納され行数は64行となる。一つのタグエントリはMビットからなり(Mは任意の整数)、図17では20ビットのタグアドレス情報 [31:12]を例示する。すなわち図17では図4、6,8,9,14,15のそれぞれタグウェイが模式的に表わされる。
 この例では、8ビットのアドレス信号Add(インデックスアドレス情報[11:4])により256個のうちの一つのタグエントリが選択される。具体的には、アドレス信号Add信号の上位6ビット(ロウアドレス)でワード線上の4個のタグエントリを選択し、下位2ビット(カラムアドレス)によりカラムスイッチで4個のタグエントリの内の一つを選択し、選択された一つのタグエントリの相補ビット線BLt、BLbがセンスアンプ114と電気的に結合する。
 特に図示はしないが、メモリブロック16で構成されるその他のタグウェイTagWAT#1~TagWAY#3も同様である。
 図18にはデータウェイの一例としてメモリブロック16で構成されるDataWAY#0のメモリセルアレイ(MCA)110に記憶されるデータエントリの配置が例示される。データエントリの数は全部で256個、メモリセルアレイの一行あたり4個のデータエントリが格納され行数は64行となる。一つのデータエントリ、すなわちデータウェイの1ラインはLビットからなる。Lは任意の整数であり、タグウェイのエントリサイズより大きい。図18では図4,図6,図8,図9,14,15のそれぞれデータウェイが模式的に表されており、エントリサイズは16バイト(L=128)とされる。この例では、8ビットのアドレス信号Add(インデックスアドレス情報[11:4])により256個のうちの一つのデータエントリが選択される。具体的には、アドレス信号Add信号の上位6ビット(ロウアドレス)でワード線上の4個のデータエントリを選択し、下位2ビット(カラムアドレス)によりカラムスイッチで4個のデータエントリの内の一つを選択し、選択された一つのデータエントリの相補ビット線BLt、BLbがセンスアンプ114と電気的に結合する。
 特に図示はしないが、メモリブロック16で構成されるその他のデータウェイDataWAT#1~DataWAY#3も同様である。
 図19にはタグウェイの別の例としてメモリブロック16Aで構成されるTagWAY#0及びTagWAY#2のメモリセルアレイ(MCA)110に記憶されるタグエントリの配置が例示される。タグエントリの数は全部で512個、メモリセルアレイの一行あたり4個のタグエントリが格納され行数は128行となる。一つのタグエントリはMビットからなり(Mは任意の整数)、図19では20ビットのタグアドレス情報 [31:12]を例示する。すなわち図19では図11、12のそれぞれタグウェイが模式的に表わされる。
 この例では、8ビットのアドレス信号Add(インデックスアドレス情報[11:4])と1ビットのパリティデータPRTdat(addr[8])により512個のうちの一つのタグエントリが選択される。
 特に図示はしないが、メモリブロック16Aで構成されるその他のタグウェイTagWAT#1及びTagWAY#3も同様である。
 図20にはデータウェイの一例としてメモリブロック16で構成されるDataWAY#0及びDataWAY#2のメモリセルアレイ(MCA)110に記憶されるデータエントリの配置が例示される。データエントリの数は全部で512個、メモリセルアレイの一行あたり4個のデータエントリが格納され行数は128行となる。一つのデータエントリ、すなわちデータウェイの1ラインはLビットからなる。Lは任意の整数であり、タグウェイのエントリサイズより大きい。図20では図11,12のそれぞれデータウェイが模式的に表されており、エントリサイズは16バイト(L=128)とされる。
 この例では、8ビットのアドレス信号Add(インデックスアドレス情報[11:4])と1ビットのパリティデータPRTdat(addr[8])により512個のうちの一つのタグエントリが選択される。
 特に図示はしないが、メモリブロック16Aで構成されるその他のデータウェイDataWAY#1及びDataWAY#3も同様である。
 図21にはLRUアレイ15,15Aのメモリセルアレイ(MCA)110に記憶されるLRUエントリの配置が例示される。LRUエントリの数は全部で256個、メモリセルアレイの一行あたり4個のLRUエントリが格納され行数は64行となる。一つのLRUエントリは、2ビット又は3ビットからなる。3ビット必要になるには図9の場合である。
 この例では、8ビットのアドレス信号Add(インデックスアドレス情報[11:4])により256個のうちの一つのLRUエントリが選択される。具体的には、アドレス信号Add信号の上位6ビット(ロウアドレス)でワード線上の4個のLRUエントリを選択し、下位2ビット(カラムアドレス)によりカラムスイッチで4個のLRUエントリの内の一つを選択し、選択された一つのLRUエントリの相補ビット線BLt、BLbがセンスアンプ114と電気的に結合する。
 ≪8.タグウェイに対するインデックス動作のまとめ≫
 図22にはタグウェイに対するインデックス動作形態の主な態様をまとめとして示す。4個のタグウェイTagWAY#0~TagWAY#3に対する動作を一例とする。インデックス動作でウェイ単位のメモリブロック(BLCK)16のすべてを活性化する形態では、4個のメモリブロック16を同時アクセスするからそれによる消費電力は以下の動作形態に比べて最も大きくなる。
 図4に代表されるようにパリティデータPRTdatの値に応じてタグウェイ単位にメモリブロック16を分割選択する場合には、タグウェイTagWAY#0~TagWAY#3の格納に用いるメモリブロック16の数は上記と同じ4個であるが、キャッシュヒット又はキャッシュミスを検出するときに動作させるメモリブロック16の数は2個になる。パリティデータPRTdat=0のときはタグウェイTagWAY#0,TagWAY#1が同時にアクセスされ、パリティデータPRTdat=1のときはタグウェイTagWAY#2,TagWAY#3が同時にアクセスされる。したがって、そのときの電力消費は上記に比べておおよそ半減する。
 図11に代表されるようにタグウェイを2個ずつ集約してメモリブロック16Aに格納して、必要なタグウェイを内部で選択する場合、メモリブロック16Aの1個あたりの記憶容量は上記メモリブロック16の2倍とされる。1個のメモリブロック16Aに割り当てられるタグウェイはパリティデータPRTdatの値に応じて同時に選択されないタグウェイ同士とされる。即ち、タグウェイTagWAY#0とTagWAY#1が一方のペアとされ、タグウェイTagWAY#2とTagWAY#3が他方のペアとされる。パリティデータPRTdat=0のときはタグウェイTagWAY#0とTagWAY#2が格納される2個のメモリブロック16Aを同時アクセスして一方のメモリブロックから所要のタグウェイを選択する。パリティデータPRTdat=1のときはタグウェイTagWAY#1とTagWAY#3が格納される2個のメモリブロック16Aを同時アクセスして一方のメモリブロックから所要のタグウェイを選択する。動作させるメモリブロックは2つであり、各メモリブロック16Aの記憶容量はメモリブロック16の2倍であるから、ウェイ単位のメモリブロックを分割選択する選択形態とほぼ同程度の消費電力を見込んでおり、ウェイ単位のメモリブロックを全選択する選択形態よりも全体的な電力消費は少ないと考えられる。消費電力はセンスアンプ動作と、特にサブスレッショルドリーク電流のような待機電流電に大きく影響する。動作するセンスアンプの数は、ウェイから読み出すキャッシュタグのビット数が同じであれば必要なセンスアンプの数はメモリブロック16と等しくて済むからである。しかも、カラム系周辺回路の回路規模もメモリブロック16とほぼ同じで済み、回路規模も小さくなり、この点でも低消費電力が実現される。
 以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。
 例えばタグウェイとデータウェイは並列してインデックスされる場合を説明したが、それに限定されない。選択データはパリティデータに限定されず、パリティチェック機能が不要の場合にはインデックスアドレス情報の特定ビットを用いてもよい。キャッシュエントリのデータ構成、タグエントリのデータ構成、それらのビット数などについては適宜変更可能である。また、タグアドレス情報は図13の仮想CPU番号と論理アドレスのペアに限定されず、アドレス空間番号(ASID)と論理アドレスとのペアなどのように、CPUの仮想アドレス空間行構成やデータ処理スレッドの構成に応じて適宜変更可能である。マイクロコンピュータはシングルCPUコアに限定されず、マルチCPUコアにも適用することができ、その場合でもCPUコア毎にマルチスレッドに応じた仮想CPU番号を用いてインデックスアドレス情報を構成してもよい。キャッシュメモリは命令キャッシュ、データキャッシュ、ユニファイドキャッシュの何れであってもよい、また、一次キャッシュであっても、二次キャッシュであっても適用可能である。
 また、タグアドレスTAGadrsについてパリティデータを生成し、そのパリティデータに基づき複数のタグウェイから一部の1以上のタグウェイ及びその対応するデータウェイを選択し、それ以外のタグウェイ及びその対応するデータウェイは非選択としたが、タグアドレスTAGadrsから任意の方法でタグウェイを選択するデータを生成しても低消費電力を実現する。例えば単純な方法としてはタグアドレスTAGadrs全20ビットのうちいずれか1ビットをウェイの選択信号に用いることができる。
 本発明はセットアソシアティブ方式を用いてキャッシングを行う半導体集積回路、1次または2次キャッシュを持つマイクロコンピュータやシステムオンチップの所謂SoCのような半導体集積回路、モジュール化された半導体装置などに広く適用することができる。
 1 マイクロコンピュータ(MCU)
 2 CPU(中央処理装置)
 3 キャッシュメモリ(CACHMRY)
 4 内部バス
 9 割込みコントローラ(INTC)
 5 ランダムアクセスメモリ(RAM)
 6 ダイレクトメモリアクセスコントローラ(DMAC)
 7 フラッシュメモリ(FLASH)
 8 その他周辺回路(PRPHRL)
 10 キャッシュ制御回路(CACHCNT)
 11 メモリマット(MRYMAT)
 12 タグウェイ(TagWAY)
 13 データウェイ(DataWAY)
 14 キャッシュエントリ(CachENTRY)
 15 LRUデータアレイ(LRUARY)
 16 メモリブロック
 TagWAT#0~TagWAT#n-1 タグウェイ
 ACCadrs アクセスアドレス情報
 TAGadrs タグアドレス情報
 IDXadrs インデックスアドレス情報
 30 パリティ生成回路(PRTYG)
 31 タグ比較回路(TAGCMP)
 32 マルチヒット検出回路(MLTHIT)
 PRTdat パリティデータ
 cen0~cen3 cena、cenb イネーブル信号(ブロックイネーブル信号)

Claims (20)

  1.  複数のウェイに複数のキャッシュエントリを格納するセットアソシアティブ型のキャッシュメモリを含むデータ処理装置であって、
     前記キャッシュメモリはキャッシュタグをリードするとき、前記複数のウェイの中から、アドレス情報の一部であるタグアドレス情報に基づいて生成される選択データの値に応じて一部のウェイを選択し、選択したウェイの中から、前記アドレス情報の中のインデックスアドレスを用いてキャッシュタグをリードし、
     前記キャッシュメモリはキャッシュフィルを行うとき、前記選択データの値に応ずる一部のウェイの中から選んだキャッシュエントリにキャッシュフィルを行う、データ処理装置。
  2.  請求項1において、前記キャッシュメモリは、前記アドレス情報の一部であるタグアドレス情報に対するパリティデータを生成して前記選択データとする、データ処理装置。
  3.  請求項1において、前記キャッシュメモリは、前記ウェイからリードされた夫々のキャッシュタグを前記タグアドレスと比較し、それらの比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、前記複数一致を判別したときはキャッシュエラー信号を生成する、データ処理装置。
  4.  請求項3において、前記キャッシュエラーの信号を例外要因又は割込み要因として入力する割込みコントローラをさらに有する、データ処理装置。
  5.  請求項3において、前記キャッシュメモリは、前記一つだけ一致である比較結果に係るキャッシュタグのキャッシュエントリをデータ操作の対象とする、データ処理装置。
  6.  請求項1において、前記ウェイは前記インデックスアドレスに対応して前記キャッシュタグを格納するタグウェイと、前記インデックスアドレスに対応してデータを格納するデータウェイとを有し、キャッシュエントリは前記キャッシュタグとそれに対応するデータを含み、前記複数のタグウェイのそれぞれはタグウェイ毎に活性又は非活性が選択されるメモリブロックによって構成され、
     前記キャッシュメモリはキャッシュタグをリードするとき、前記選択データを用いたメモリブロックの活性化によって前記一部のタグウェイの選択を行う、データ処理装置。
  7.  請求項6において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の全ビットに対する1ビットのパリティデータであり、第1の論理値のパリティデータは前記複数のメモリブロックの半分の選択に用い、第2の論理値のパリティデータは前記複数のメモリブロックの残りの半分の選択に用いる、データ処理装置。
  8.  請求項6において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の複数分割部分毎のパリティビットから成る複数ビットのパリティデータであり、前記パリティデータの値は複数のタグウェイの中から選択するタグウェイを決める、データ処理装置。
  9.  請求項6において、前記キャッシュメモリは、前記複数のウェイの中から前記選択データにより一部のタグウェイを選択してキャッシュタグをリードする第1モードと、キャッシュタグをリードする対象タグウェイをすべてのタグウェイとする第2モードとを有し、前記第1モード又は第2モードを選択するモード選択信号を入力する、データ処理装置。
  10.  請求項1において、前記ウェイは前記インデックスアドレスに対応して前記キャッシュタグを格納するタグウェイと、前記インデックスアドレスに対応してデータを格納するデータウェイとを有し、キャッシュエントリは前記キャッシュタグとそれに対応するデータを含み、前記複数のタグウェイは所定複数個毎に一つのメモリブロックに集約されて構成され、同一メモリブロックに構成される複数のタグウェイは相互に異なる選択データによって選択され、
     前記キャッシュメモリはキャッシュタグをリードするとき、前記選択データと前記インデックスアドレス情報とを用いてキャッシュタグをリードする、データ処理装置。
  11.  請求項10において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の全ビットに対する1ビットのパリティデータであり、第1の論理値のパリティデータは夫々の前記メモリブロックの中の一方のタグウェイの選択に用い、第2の論理値のパリティデータは夫々の前記メモリブロックの中の他方のタグウェイの選択に用いる、データ処理装置。
  12.  請求項10において、前記選択データは前記アドレス情報の一部であるタグアドレス情報の複数分割部分毎のパリティビットから成る複数ビットのパリティデータであり、前記パリティデータの値は夫々のメモリブロックの中から選択するタグウェイを決める、データ処理装置。
  13.  請求項1において、前記キャッシュメモリがキャッシュフィルを行うキャッシュエントリを決めるとき、キャッシュフィル対象とするキャッシュエントリを疑似LRUにより特定するための指標として用いるLRUデータを格納するLRUデータアレイを有し、
     前記LRUデータアレイは、キャッシュエントリに対するインデックスアドレス毎に、選択データで選択される一部のウェイ毎の利用履歴を示す複数ビットの履歴データを格納する領域を有し、
     前記キャッシュメモリは、インデックスアドレス情報を用いてLRUデータアレイから読み出した前記履歴データと、対応する選択データとに基づいてキャッシュフィルを行うキャッシュエントリを選ぶ、データ処理装置。
  14.  請求項13において、前記複数のウェイのそれぞれはタグウェイ毎に活性又は非活性が選択されるメモリブロックによって構成され、
     前記キャッシュメモリはキャッシュタグをリードするとき、前記選択データを用いたメモリブロックの活性化によって前記選択データによる一部のウェイの選択を行い、
     前記キャッシュメモリはキャッシュフィルを行うとき、夫々のメモリブロックにおいて前記インデックスアドレスが指し示すキャッシュエントリの内、インデックスアドレス情報に基づいて前記LRUデータアレイから読み出された複数ビットの前記履歴データと、前記タグアドレスに基づいて生成される前記選択データとによって、キャッシュフィルを行うキャッシュエントリを選択する、データ処理装置。
  15.  請求項13において、前記複数のウェイは所定複個毎に一つのメモリブロックに集約されて構成され、同一メモリブロックに構成される複数のウェイは相互に異なる選択データによって選択され、
     前記キャッシュメモリはキャッシュタグをリードするとき、活性化された夫々のメモリブロックの中の何れのウェイを選択するかを前記選択データによって指定され、指定されたウェイの中のいずれのキャッシュタグを選択するかを前記アドレス情報の中のインデックスアドレス情報によって指定され、
     前記キャッシュメモリはキャッシュフィルを行うとき、いずれのメモリブロックを選択するかを、前記LRUデータアレイからインデックスアドレス情報によって読み出された複数ビットの履歴データによって指定され、指定されたメモリブロックの中から何れのウェイを選択するかを、前記選択データによって指定され、指定されたウェイの中から何れのキャッシュエントリをキャッシュフィルの対象とするかを、前記インデックスアドレスによって指定される、データ処理装置。
  16.  複数ウェイに複数のキャッシュエントリを格納するセットアソシアティブ型のキャッシュメモリを含むデータ処理装置であって、
     前記キャッシュメモリはキャッシュタグをリードするとき、前記複数のウェイの中から何れの一部のウェイを選択するかを、アドレス情報の一部であるタグアドレス情報に基づいて生成されるパリティデータの値に応じて指定され、指定されたウェイの中から何れのキャッシュタグをリードするかを、前記アドレス情報の中のインデックスアドレス情報によって指定され、リードされたキャッシュタグを前記タグアドレスと比較し、それらの比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、前記複数一致を判別したときはキャッシュエラー信号を生成し、
     前記キャッシュメモリはキャッシュフィルを行うとき、前記選択データの値に応ずる一部のウェイの中から選んだキャッシュエントリにキャッシュフィルを行う、データ処理装置。
  17.  複数にウェイに複数のキャッシュエントリを格納するセットアソシアティブ型のキャッシュメモリを含むデータ処理装置であって、
     前記キャッシュメモリはキャッシュタグをリードするとき、前記複数のウェイの中から何れの一部のウェイを選択するかを、アドレス情報の一部であるタグアドレス情報に基づいて生成されるパリティデータの値に応じて指定され、指定されたウェイの中から何れのキャッシュタグをリードするかを、前記アドレス情報の中のインデックスアドレス情報によって指定され、リードされたキャッシュタグを前記タグアドレスと比較し、それらの比較結果が、全て不一致、一つだけ一致、又は複数一致の何れであるかを判別し、前記複数一致を判別したときはキャッシュエラー信号を生成し、
     前記キャッシュメモリは、キャッシュフィルを行うキャッシュエントリを決めるとき、キャッシュフィルの対象とするキャッシュエントリを疑似LRUにより特定するための指標として用いるLRUデータを格納するLRUデータアレイを有し、
     前記LRUデータアレイは、キャッシュエントリに対するインデックスアドレス毎に、パリティデータで選択される一部のウェイ毎の利用履歴を示す複数ビットの履歴データを格納する領域を有し、
     前記キャッシュメモリは、インデックスアドレス情報を用いてLRUデータアレイから読み出した前記履歴データと、対応する選択データとに基づいてキャッシュフィルを行うキャッシュエントリを選ぶ、データ処理装置。
  18.  複数のウェイを複数のキャッシュエントリの格納に用いるセットアソシアティブ型のキャッシュメモリを含むデータ処理装置であって、
     前記キャッシュメモリはアドレス情報に基づいてウェイを操作するとき、前記アドレス情報の一部であるタグアドレス情報に基づいて生成される選択データに応ずる一部のウェイの中から操作対象とするキャッシュエントリを選ぶ、データ処理装置。
  19.  複数のウェイを複数のキャッシュエントリの格納に用いるセットアソシアティブ型のキャッシュメモリを含むデータ処理装置であって、
     前記キャッシュメモリは、アドレス情報の一部であるタグアドレス情報に基づいて生成される選択データに応ずる一部のウェイの中から、アドレスタグと比較するキャッシュタグをリードし、且つ、キャッシュフィルを行うキャッシュエントリを選ぶ、データ処理装置。
  20.  複数のウェイを複数のキャッシュエントリの格納に用いるセットアソシアティブ型のキャッシュメモリを含むデータ処理装置であって、
     前記キャッシュメモリはキャッシュタグをリードするとき、複数のウェイの内のどのウェイを選択するかを、アドレス情報の一部であるタグアドレス情報に基づいて生成される選択データの値に応じて指示され、指示されたウェイの中から何れのキャッシュタグをリードするかを、前記アドレス情報の中のインデックスアドレスによって指示され、
     前記キャッシュメモリはキャッシュフィルを行うとき、全てのウェイのキャッシュエントリについての前記インデックスアドレス単位で参照される使用履歴と前記選択データの値との組み合わせにしたがって、キャッシュフィルを行うキャッシュエントリの選択を行う、データ処理装置。
PCT/JP2011/080078 2011-12-26 2011-12-26 データ処理装置 WO2013098919A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201180075908.3A CN104011692B (zh) 2011-12-26 2011-12-26 数据处理装置
PCT/JP2011/080078 WO2013098919A1 (ja) 2011-12-26 2011-12-26 データ処理装置
EP11878346.3A EP2799997B1 (en) 2011-12-26 2011-12-26 Data processing device
US14/367,925 US9495299B2 (en) 2011-12-26 2011-12-26 Data processing device utilizing way selection of set associative cache memory based on select data such as parity data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/080078 WO2013098919A1 (ja) 2011-12-26 2011-12-26 データ処理装置

Publications (1)

Publication Number Publication Date
WO2013098919A1 true WO2013098919A1 (ja) 2013-07-04

Family

ID=48696489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/080078 WO2013098919A1 (ja) 2011-12-26 2011-12-26 データ処理装置

Country Status (4)

Country Link
US (1) US9495299B2 (ja)
EP (1) EP2799997B1 (ja)
CN (1) CN104011692B (ja)
WO (1) WO2013098919A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017503298A (ja) * 2014-12-14 2017-01-26 ヴィア アライアンス セミコンダクター カンパニー リミテッド アドレス・タグ・ビットに基づく動的キャッシュ置換ウェイ選択
JP2017503299A (ja) * 2014-12-14 2017-01-26 ヴィア アライアンス セミコンダクター カンパニー リミテッド モードに応じてセットの1つ又は複数を選択的に選択するように動的に構成可能であるマルチモード・セット・アソシエイティブ・キャッシュ・メモリ
JP2017507442A (ja) * 2014-12-14 2017-03-16 ヴィア アライアンス セミコンダクター カンパニー リミテッド モードに応じてウェイの全部又はサブセットに選択的に割り当てるように動的に構成可能であるマルチモード・セット・アソシエイティブ・キャッシュ・メモリ

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101912910A (zh) * 2010-06-22 2010-12-15 武汉科技大学 一种低塑性、低硬化指数薄板的拉深方法
US9239797B2 (en) * 2013-08-15 2016-01-19 Globalfoundries Inc. Implementing enhanced data caching and takeover of non-owned storage devices in dual storage device controller configuration with data in write cache
US9846648B2 (en) * 2015-05-11 2017-12-19 Intel Corporation Create page locality in cache controller cache allocation
CN105335247B (zh) * 2015-09-24 2018-04-20 中国航天科技集团公司第九研究院第七七一研究所 高可靠系统芯片中Cache的容错结构及其容错方法
CN109074336B (zh) * 2016-02-29 2022-12-09 瑞萨电子美国有限公司 用于对微控制器内的数据传输进行编程的系统和方法
US10156887B2 (en) 2016-09-29 2018-12-18 Qualcomm Incorporated Cache memory clock generation circuits for reducing power consumption and read errors in cache memory
KR102321332B1 (ko) * 2017-05-30 2021-11-04 에스케이하이닉스 주식회사 반도체 장치 및 그의 구동 방법
US10564856B2 (en) * 2017-07-06 2020-02-18 Alibaba Group Holding Limited Method and system for mitigating write amplification in a phase change memory-based storage device
KR102593757B1 (ko) * 2018-09-10 2023-10-26 에스케이하이닉스 주식회사 메모리 시스템 및 메모리 시스템의 동작방법

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04205449A (ja) * 1990-11-30 1992-07-27 Matsushita Electric Ind Co Ltd キャッシュ装置
JPH07168760A (ja) * 1993-12-14 1995-07-04 Fujitsu Ltd キャッシュ制御装置
JP2000132460A (ja) 1998-10-21 2000-05-12 Hitachi Ltd 半導体集積回路装置
WO2002008911A1 (fr) * 2000-07-24 2002-01-31 Hitachi,Ltd Systeme de traitement de donnees
JP2002236616A (ja) 2001-02-13 2002-08-23 Fujitsu Ltd キャッシュメモリシステム
JP2010026716A (ja) 2008-07-17 2010-02-04 Toshiba Corp キャッシュメモリ制御回路及びプロセッサ

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5666513A (en) 1996-01-05 1997-09-09 Unisys Corporation Automatic reconfiguration of multiple-way cache system allowing uninterrupted continuing processor operation
JP2000200221A (ja) * 1998-10-30 2000-07-18 Nec Corp キャッシュメモリ装置及びその制御方法
US6708294B1 (en) * 1999-09-08 2004-03-16 Fujitsu Limited Cache memory apparatus and computer readable recording medium on which a program for controlling a cache memory is recorded
JP4753549B2 (ja) 2004-05-31 2011-08-24 パナソニック株式会社 キャッシュメモリおよびシステム
US7673102B2 (en) 2006-05-17 2010-03-02 Qualcomm Incorporated Method and system for maximum residency replacement of cache memory
US20080040576A1 (en) 2006-08-09 2008-02-14 Brian Michael Stempel Associate Cached Branch Information with the Last Granularity of Branch instruction in Variable Length instruction Set
CN101620572B (zh) * 2008-07-02 2011-06-01 上海华虹Nec电子有限公司 非易失性内存及控制方法
US8145985B2 (en) * 2008-09-05 2012-03-27 Freescale Semiconductor, Inc. Error detection schemes for a unified cache in a data processing system
US8549383B2 (en) * 2011-08-24 2013-10-01 Oracle International Corporation Cache tag array with hard error proofing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04205449A (ja) * 1990-11-30 1992-07-27 Matsushita Electric Ind Co Ltd キャッシュ装置
JPH07168760A (ja) * 1993-12-14 1995-07-04 Fujitsu Ltd キャッシュ制御装置
JP2000132460A (ja) 1998-10-21 2000-05-12 Hitachi Ltd 半導体集積回路装置
WO2002008911A1 (fr) * 2000-07-24 2002-01-31 Hitachi,Ltd Systeme de traitement de donnees
JP2002236616A (ja) 2001-02-13 2002-08-23 Fujitsu Ltd キャッシュメモリシステム
JP2010026716A (ja) 2008-07-17 2010-02-04 Toshiba Corp キャッシュメモリ制御回路及びプロセッサ

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017503298A (ja) * 2014-12-14 2017-01-26 ヴィア アライアンス セミコンダクター カンパニー リミテッド アドレス・タグ・ビットに基づく動的キャッシュ置換ウェイ選択
JP2017503299A (ja) * 2014-12-14 2017-01-26 ヴィア アライアンス セミコンダクター カンパニー リミテッド モードに応じてセットの1つ又は複数を選択的に選択するように動的に構成可能であるマルチモード・セット・アソシエイティブ・キャッシュ・メモリ
JP2017507442A (ja) * 2014-12-14 2017-03-16 ヴィア アライアンス セミコンダクター カンパニー リミテッド モードに応じてウェイの全部又はサブセットに選択的に割り当てるように動的に構成可能であるマルチモード・セット・アソシエイティブ・キャッシュ・メモリ
US9798668B2 (en) 2014-12-14 2017-10-24 Via Alliance Semiconductor Co., Ltd. Multi-mode set associative cache memory dynamically configurable to selectively select one or a plurality of its sets depending upon the mode
US10698827B2 (en) 2014-12-14 2020-06-30 Via Alliance Semiconductor Co., Ltd. Dynamic cache replacement way selection based on address tag bits
US10719434B2 (en) 2014-12-14 2020-07-21 Via Alliance Semiconductors Co., Ltd. Multi-mode set associative cache memory dynamically configurable to selectively allocate into all or a subset of its ways depending on the mode

Also Published As

Publication number Publication date
EP2799997A4 (en) 2015-12-09
US9495299B2 (en) 2016-11-15
EP2799997A1 (en) 2014-11-05
US20140359223A1 (en) 2014-12-04
CN104011692B (zh) 2017-03-01
EP2799997B1 (en) 2020-01-22
CN104011692A (zh) 2014-08-27

Similar Documents

Publication Publication Date Title
WO2013098919A1 (ja) データ処理装置
US9552256B2 (en) Semiconductor memory device including non-volatile memory, cache memory, and computer system
US8103830B2 (en) Disabling cache portions during low voltage operations
JP4989872B2 (ja) 半導体記憶装置および演算処理装置
US6006311A (en) Dynamic updating of repair mask used for cache defect avoidance
US6023746A (en) Dual associative-cache directories allowing simultaneous read operation using two buses with multiplexors, address tags, memory block control signals, single clock cycle operation and error correction
US20070079184A1 (en) System and method for avoiding attempts to access a defective portion of memory
US5958068A (en) Cache array defect functional bypassing using repair mask
JPH03286495A (ja) 半導体記憶装置
JPH03141443A (ja) データ格納方法及びマルチ・ウェイ・セット・アソシアチブ・キャッシュ記憶装置
US9081719B2 (en) Selective memory scrubbing based on data type
US6085288A (en) Dual cache directories with respective queue independently executing its content and allowing staggered write operations
US10528473B2 (en) Disabling cache portions during low voltage operations
JP2006059068A (ja) プロセッサ装置
US5883904A (en) Method for recoverability via redundant cache arrays
US5943686A (en) Multiple cache directories for non-arbitration concurrent accessing of a cache memory
US5867511A (en) Method for high-speed recoverable directory access
US7649764B2 (en) Memory with shared write bit line(s)
JP6149265B2 (ja) データ処理装置
US20140195733A1 (en) Memory Using Voltage to Improve Reliability for Certain Data Types
Wen et al. Read error resilient MLC STT-MRAM based last level cache
JPWO2013098919A1 (ja) データ処理装置
US9141451B2 (en) Memory having improved reliability for certain data types
JP2007080283A (ja) 半導体集積回路
JP3672695B2 (ja) 半導体記憶装置、マイクロコンピュータ、及びデータ処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11878346

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013551060

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2011878346

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14367925

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE