WO2003098440A1 - Antémémoire de compression - Google Patents

Antémémoire de compression Download PDF

Info

Publication number
WO2003098440A1
WO2003098440A1 PCT/JP2002/004844 JP0204844W WO03098440A1 WO 2003098440 A1 WO2003098440 A1 WO 2003098440A1 JP 0204844 W JP0204844 W JP 0204844W WO 03098440 A1 WO03098440 A1 WO 03098440A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
compression
line
cache device
compressor
Prior art date
Application number
PCT/JP2002/004844
Other languages
English (en)
French (fr)
Inventor
Haruyasu Ueda
Original Assignee
Fujitsu Limited
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 Fujitsu Limited filed Critical Fujitsu Limited
Priority to PCT/JP2002/004844 priority Critical patent/WO2003098440A1/ja
Publication of WO2003098440A1 publication Critical patent/WO2003098440A1/ja

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • 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/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/40Specific encoding of data in memory or cache
    • G06F2212/401Compressed data

Definitions

  • the present invention relates to a compression cache device provided between an arithmetic unit (CPU) and a storage device (memory) in a computer and compressing and writing and reading data as necessary.
  • the present invention relates to a compression cache device that can be realized with a smaller amount of hardware. Background art
  • CPUs usually have a built-in cache in the chip, and the built-in cache capacity tends to increase year by year.
  • the amount of hardware (in-chip area) that can be used in the internal cache is limited, so that it cannot have a larger capacity than the external cache.
  • the amount of hardware required to implement the cache is more than half of the entire chip. Therefore, a device that can achieve a large cache capacity with a small amount of hardware is required.
  • FIG. 15 is a block diagram showing an example of the configuration of a conventional cache device.
  • the cache device shown in Fig. 15 has a line 5a and a line 5b, a read line specifier 1 and a line selector 2 for selecting and outputting data obtained from the line, and a line for writing. It consists of a write line designator 3 and a write data generator 4 for selection.
  • a line stores data, and is composed of a flag, a tag, and data.
  • a cache device having two lines will be described as an example.
  • FIG. 16 is a block diagram showing an example of a configuration of a read line designator and a line selector in a conventional cache device.
  • read line designator 1 Comparators lla, 11b, AND operators 12a, 12b, and OR operator 13 power.
  • Line selector 2 is composed of switches 2la, 2lb.
  • line A shown in FIG. 16 is line 5a in FIG. 15, and line B shown in FIG. 16 is line 5b in FIG.
  • the cache device divides the address input from the outside into a tag part and an index part, and refers to the part corresponding to the index specified by the index part in all lines.
  • the comparator 1 1a compares the tag obtained from the line A with the tag of the address input from the outside, and if the comparison results are equal, true or not equal In this case, false is output to the AND operator 12a.
  • the AND operator 12a performs an AND operation on the output of the comparator 11a and the effective flag obtained from the line A, and outputs the result to the OR operator 13 and the line selector 2.
  • the effective flag stored in the line is often used as described above. In that case, the line whose valid flag is 0 is not compared with the tag.
  • the comparator 11b and the AND operation unit 12b perform the same operation on the line B as the comparator 11a and the AND operation unit 12a, and output the result to the OR operation unit 13 and the line selector 2.
  • the OR operator 13 performs an OR operation on the output of the AND operator 12a and the output of the AND operator 12b, and outputs the result as a hit signal to the outside. That is, the read line specifier 1 compares the tag obtained from each line with the address tag, and if there is a match, specifies the line to the line selector 2 and sends the hit signal to the outside. Output.
  • the switch 21a reads the data of the line A and outputs it as external data.
  • the switch 21b reads the data on the line B and outputs it as external data. The above is the data reading operation.
  • FIG. Fig. 17 shows the write line designator and write data generator in the conventional cache device. It is a block diagram showing an example of a composition.
  • a write signal indicating data writing is externally input to the write line designator 3
  • a recently unused flag is input from line A
  • a recently unused flag is input from line B.
  • the recently unused flag is a flag for indicating a line that has not been used recently.
  • the write line designator 3 preferentially selects a line that has not been used recently using, for example, a recently unused flag, and outputs the result to the write data generator 4 as a write signal.
  • the write signal of the selected line becomes true, and the other unselected write signals become false.
  • the write line designator 3 selects a line, for example, at random. This is equivalent to always setting the recently unused flag to true for all selected lines.
  • the write signal which is the output of the write line designator 3 is input to the write data generator 4, and the tag and the write data in the externally input address are input.
  • the tag and write data are branched and input for line A and line B, respectively.
  • the write data generator 4 adds the initial value of the flag before the tag, and outputs the write signal, the flag, the tag, and the write data to line A and line B, respectively. Lines A and B write data according to the write signal. The above is the data writing operation.
  • a technology related to increasing the apparent cache capacity is a compression cache technology for embedded systems.
  • a compression cache technology for embedded systems.
  • R OM Read Only Me mory
  • the present invention has been made in view of the above-described problems, and has as its object to provide a cache device that can realize the same cache capacity with a smaller amount of hardware while realizing the same interface as a conventional cache device. . Disclosure of the invention
  • the present invention provides a compression cache device that compresses external input data as necessary, writes data to a line, reads data from a line, decompresses data as needed, and outputs data to the outside.
  • At least one compressor that compresses the input data when the input data can be compressed and outputs the result as compressed data; and at least one decompressor that decompresses the compressed data.
  • Data selection means is provided.
  • the write data selection unit randomly selects one line from the plurality of lines. It is assumed that.
  • one line can be fairly selected from a plurality of lines that meet predetermined conditions.
  • the write data selection unit when data input to the compressor can be compressed, preferentially selects the compression line. Things.
  • the write data selection unit when the data input to the plurality of compressors can be compressed, sets the compression line based on a non-use state of the compression line. It is characterized by selection. Further, in the compressed cache device according to the present invention, the write data selecting means selects a compressed line in which the unused state has continued for a predetermined time.
  • the write data selection means is characterized by selecting a compression line in which the unused state has continued for the longest time. .
  • the write data selection means selects the compression line using any one of an approximate LRU method, a random selection method at random, or a FIFO method. Is what you do.
  • the activation rate of the compression line can be increased, and an efficient compression cache device can be realized.
  • FIG. 1 is a block diagram showing a basic configuration of a compression cache device of the present invention.
  • this compressed cache device is an uncompressed line in place of lines 5a and 5b in the conventional cache device shown in FIG. It has a line 30 and a compression line 40, a write line specifier 3a instead of the write line specifier 3, a write data generator 4a instead of the write data generator 4, and a compressor 1 0 and decompressor 20.
  • Compressed line 40 requires less mounting memory than uncompressed line 30.
  • the above-described write data selection means corresponds to the write line designator 3a and the write data generator 4a
  • the read data selection means corresponds to the read line designator 1 and the line selector 2.
  • the compressor 10 reduces the amount of data stored by compressing the write data so that the data can be stored in the compression line 40.
  • the compressor 10 outputs a compressible signal indicating whether the write data can be compressed or not.
  • the compressor 10 sets the compressible signal to true when the write data can be compressed, and sets the compressible signal to false when the write data cannot be compressed. If the amount of compressed data is within the size of the compression line 40, the compressor 10 compresses the write data, outputs the result to the write data generator 4a as compressed data, and outputs the write line. Outputs true as a compressible signal to designator 3a. If the data amount of the compressed data is not within the size of the compression line 40, the compressor 10 outputs false as a compressible signal.
  • the compression cache device of the present invention operates almost the same as a conventional cache device when writing data, but differs in the following three points.
  • the write line designator gives priority to the compression line for which the compressible signal is true. If there are multiple compressed lines for which the compressible signal is true, one of them is appropriately selected.
  • the write line designator always considers the compressible signal from the uncompressed line to be true, and if the compressible signals output from all the compressors are false, Select an uncompressed line. If there are multiple uncompressed lines, select one of them appropriately. The method of selecting an appropriate one will be described later.
  • FIG. 2 is a block diagram showing an example of a configuration of a write line designator and a write data generator in the compression cache device of the present invention.
  • the line A shown in FIG. 2 is the uncompressed line 30 in FIG. 1
  • the line B shown in FIG. 2 is the compressed line 40 in FIG.
  • a write signal is input to the write line designator 3a, and a recently unused flag obtained from line A and a recently unused flag obtained from line B are input.
  • the compressible signal for line A and the compressible signal for line B are input.
  • the compressible signal for line A which is the uncompressed line 30, is always true.
  • the write line designator 3a preferentially selects the compression line for which the compressible signal is true.
  • the compressible signal of the line B which is the compression line 40
  • the write line designator 3a selects the line B.
  • the write line designator 3a appropriately selects one of the plurality of compression lines, and determines the result. Output to the write data generator 4a as a write signal.
  • the write line designator 3a selects an uncompressed line. That is, if the compressible signal of line B is false in FIG. 2, line A is selected.
  • the write line designator 3a appropriately selects one of the plurality of uncompressed lines and outputs the result to the write data generator 4a as a write signal. .
  • an approximate LRU method As an example of a selection method for appropriately selecting one of a plurality of lines, an approximate LRU method will be described.
  • the latest unused flag is set to true if the line has not been used recently, and the latest unused flag is set to false if the line has been used recently. This recently unused flag is periodically set to true.
  • the write line designator 3a preferentially selects a line that has not been used recently, for example, according to a recently unused flag, and outputs the result to the write data generator 4a as a write signal.
  • Ma Another example of a selection method in which the write line designator 3a appropriately selects one of a plurality of lines is a method of randomly selecting a line regardless of a recently unused flag. This is equivalent to always setting the recently unused flag to true for all selected lines.
  • a write signal which is the output of the write line designator 3a, is input to the write data generator 4a. Is input, write data input from outside is input, and compressed data output from the compressor 10 is input.
  • the tag is branched and input for line A and line B
  • the write data is input for line A
  • the compressed data is input for line B.
  • the write data generator 4a adds the initial value of the flag before the tag, compresses the write signal, flag, tag, and write data of line A to line A, and compresses the write signal, flag, tag, and tag of line B. Output data to line B.
  • Line A and line B write data according to the write signal.
  • the decompressor 20 decompresses the compressed data obtained from the compression line 40, restores the original data from the compressed data, and outputs the result to the line selector 2 as uncompressed data.
  • the compression cache device of the present invention operates almost the same as a conventional cache device when reading data, but the only difference is that when the contents of a compression line are referred to, the decompressor 2 must be used. That is, conversion to uncompressed data with 0.
  • the read line designator 1 compares the tag obtained from the uncompressed line 30 and the tag obtained from the compressed line 40 with the address tag, and if there is a match, the line selector 2 Specify the line for and output a hit signal to the outside.
  • the line selector 2 reads the data in the same manner as the operation in FIG. According to the output of the embedding line designator 1, the data of the uncompressed line 30 or the compressed line 40 is read and output to the outside.
  • the above is the operation of the basic configuration of the compression cache device of the present invention.
  • the compression cache and the decompression device are provided for each of the compression lines.
  • each of the compressors uses a different compression method
  • each of the decompressors uses a decompression method corresponding to the compression method.
  • a compression line according to the type of data can be used by using a compression method according to the type of data.
  • the compression cache device shown in FIG. 3 has two compression lines 40a and 40b in place of the compression line 40 in the compression cache device shown in FIG. It has two compressors 10a and 10b, and has two decompressors 20a and 2Ob instead of the decompressor 20.
  • the same reference numerals as those in FIG. 1 denote the same or corresponding objects as those shown in FIG. 1, and a description thereof will be omitted. .
  • the compression lines can be switched according to the characteristics of the compressors by using different compression methods by the plurality of compressors. For example, if three compressors A, B, and C and three compression lines A, B, and C are provided, compressor A is a compressor specialized for the instruction word in the memory, and compressor B is specialized for the integer value data. Compressor C can be configured as a compressor specializing in floating point data, etc.Line A is a compression line for instruction words in memory, and Line B is a compression line for integer value data. Line and line C are compressed lines for floating point data.
  • the compressors 10a and 10b compress the write data using the respective compression methods.
  • Each of the compressors 10a and 10b outputs a compressible signal to the write line designator 3a, and outputs compressed data to the write data generator 4a.
  • the decompressor 20a when reading data, the decompressor 20a
  • the compressed data obtained from the compressed line 40a is decompressed according to the method, and the result is output to the line selector 2 as uncompressed data.
  • the decompressor 20b decompresses the compressed data obtained from the compression line 40b according to the compression method of the compressor 10b, and outputs the result to the line selector 2 as uncompressed data. Output.
  • the above is the operation of the compressor and decompressor provided for each compression line.
  • one compression unit and one decompression unit are provided for a plurality of the compression lines.
  • one compression unit is provided for a plurality of the compression lines.
  • one compression unit is provided for a plurality of the compression lines.
  • the number of compressors and decompressors can be reduced, and the amount of hardware can be reduced.
  • the compression cache device shown in FIG. 4 includes a compressor 10c in place of the compressor 10 in the compression cache device shown in FIG. 1, and two compression lines 40a and 40a instead of the compression line 40. 4 Ob, a decompressor 20 c instead of the decompressor 20, and a compression line selector 50.
  • the same reference numerals as those in FIG. 1 denote the same or corresponding objects as those shown in FIG. 1, and a description thereof will be omitted.
  • the compressor 10c performs compression of the write data on the compression lines 40a and 40b using the same compression method. That is, the compressor 10c outputs the same compressible signal to the write line designator 3a for the compression line 40a and the compression line 40b, and compresses the same compressed data for the compression line 40a. Output to write data generator 4a for line 40b.
  • the compression line selector 50 sets the corresponding compression line to 2 according to the line designation instruction output from the read line designator 1.
  • One of the compression lines 40a and 4Ob is selected, and the compressed data of the selected compression line is output to the decompressor 20c.
  • the decompressor 20c decompresses the compressed data output from the compressed line selector 50 and outputs the result to the line selector 2 as uncompressed data.
  • the above is the operation of the compressor and decompressor provided one for each of the plurality of compression lines.
  • FIG. 4 it may be configured to include only one compressor, or may be configured to include only one decompressor.
  • one compressor may be provided for a set of a plurality of compression lines, and a plurality of sets of this compression line may be provided.
  • one decompressor may be provided for a plurality of sets of compression lines, and a plurality of sets of this compression line may be provided.
  • the compressor compresses only data that appears at a predetermined frequency.
  • the compressor and the decompressor use a first frequency data table that associates the data that appears at the predetermined frequency.
  • the data compression method and the data decompression method are simple, the data can be compressed and decompressed with almost no extra time.
  • the compressor and decompressor record only general-purpose compression algorithms, such as the Lampel Zip 77 algorithm used in the gnu gzip command, the block algorithm used in the gnu bzip2 command, and the length of the same bit. It can be used by mounting it on hardware by a mounting method such as a run-length method, but a high-frequency data table can also be used as an easy mounting method.
  • general-purpose compression algorithms such as the Lampel Zip 77 algorithm used in the gnu gzip command, the block algorithm used in the gnu bzip2 command, and the length of the same bit. It can be used by mounting it on hardware by a mounting method such as a run-length method, but a high-frequency data table can also be used as an easy mounting method.
  • FIG. 5 is a block diagram showing an example of a configuration of a compressor and a decompressor configured using a high-frequency data table.
  • the above-mentioned first frequency data table corresponds to the high frequency data table.
  • Compressor 1 0 1 comprises a high-frequency data table 111, a plurality of comparators 112, an OR operator 113, and an encoder 114.
  • the input uncompressed data is 32 bits and the output compressed data is 9 bits. Therefore, there are 5 12 types of compressed data that can be represented by 9 bits.
  • the high-frequency data table 111 is prepared in advance by extracting 512 high-frequency data from a 32-bit data pattern.
  • uncompressed data is input to 512 comparators 112 corresponding to high-frequency data.
  • the respective comparators 1 1 and 2 compare the result of comparing the uncompressed data with the respective high-frequency data, and determine whether the result is true if they are equal, false if they are not equal, OR operator 1 1 3 and encoder 1 1 4 Output to
  • the OR calculator 113 performs an OR operation on the outputs of the plurality of comparators 112 and outputs the result as a compressible signal.
  • the encoder 1 14 outputs compressed data of 9 bits representing the number of the comparator 1 12 that has output true. As described above, 32 bits of uncompressed data can be represented by 9 bits when it corresponds to high-frequency data, and the same information can be stored with 28% of mounted memory.
  • the decompressor 201 consists of a high-frequency data table 211.
  • the high-frequency data table 211 used is the same as the high-frequency data table 111 used in the compressor 101.
  • the decompressor 201 can easily output 32 bit uncompressed data by searching the high frequency data table 211 using 9 bit compressed data as a high frequency data index.
  • the compressor 102 shown in FIG. 5 (b) is a block diagram showing an example of a specific mounting method of the compressor 101.
  • the high-frequency data table 1 1 1 and the comparator 1 1 2 are implemented by a PLA (Programmable Logic Array) 1 2 1, and the OR arithmetic unit 1 1 3 and the encoder 1 1 4 are implemented by a PL A 1 2 2.
  • the above-mentioned compression method using a high-frequency data table has the feature that the size of the compressed data does not change with uncompressed data, so that it is easy to implement on hardware and operates quickly.
  • the fact that the size of the compressed data is constant has an advantage that mounting is easy even when a compression method in small units described later is used.
  • the compressor may include a small unit input A plurality of small unit compressors for compressing the input data, dividing the input data into small units, and when all of the small unit compressors can compress, the outputs of all the small unit compressors And outputting the compressed data as compressed data.
  • the decompressor includes a plurality of small unit decompression units that decompress the small unit of compressed data. The compressed data is divided into small units, and the outputs of a plurality of small unit decompressors are combined and output.
  • the burst transfer means that data in a small unit is continuously input to the compression cache device.
  • the compression of the uncompressed data can be configured to be performed in small units, for example, in word units.
  • FIG. 6 is a block diagram showing an example of a configuration of a compressor having a plurality of small unit compressors and a decompressor having a plurality of small unit decompressors.
  • the compressor 103 in FIG. 6 (a) will be described.
  • the compressor 103 includes small unit compressors 131a, 131b, 131c, 131d, and an AND operation unit 132.
  • the uncompressed data is divided into four words using, for example, a distributor or the like, and input to the small unit compressors 131a, 131b, 131c, and 131d, respectively. .
  • the small-unit compressors 131a, 131b, 131c, and 131d compress the small-unit uncompressed data, output the small-unit compressed data, and output the compressible signal to the AND operation unit 132.
  • the outputs of the small unit compressors 131a, 131b, 131c, and 131d are combined using, for example, a combiner, and output to the outside as compressed data.
  • the AND operation unit 132 performs an AND operation on the compressible signals output from the small unit compressors 131 a, 131 b, 131 c, and 131 d, and outputs the result to the entire compressor. It can be output to the write line designator 3a as a compressible signal.
  • the decompressor 203 includes small unit decompressors 231a, 231b, 231c, and 23Id.
  • the compressed data is divided into four words using, for example, a distributor or the like, and input to the small unit decompressors 231a, 231b, 231c, 231d, respectively.
  • the small-unit decompressors 23 1a, 23 1b, 23 1c, and 23 1d decompress the input small-unit compressed data and output the result as small-unit uncompressed data. I do.
  • the outputs of the small unit decompressors 231a, 231b, 231c and 231d are combined using, for example, a combiner, and output to the outside as uncompressed data.
  • the above is the operation of the compressor and decompressor that perform compression in small units.
  • the compressor includes one small unit compressor that compresses small unit input data, stores an output of the small unit compressor, and stores the stored small unit. It is characterized in that the outputs of the compressor are combined and output as compressed data.
  • the size of the compressor can be reduced to one small unit compressor, so that the hardware amount can be reduced.
  • the decompressor includes one small-unit decompressor for decompressing the small-unit compressed data, and is provided for the small-unit compressed data specified from the outside. The decompression is performed by using the small unit decompressor, and output.
  • the size of the decompressor can be reduced to one small unit decompressor, so that the hardware amount can be reduced. Also, when only a part of the data in the line is referred to, the reading speed can be increased.
  • FIG. 7 (a) shows a conventional cache device having a word holding device outside the cache device.
  • the word holding device 70 shown in FIG. 7A includes a word switch 143 and a buffer 144.
  • the word switch 143 sequentially stores the burst-transferred data in the buffer 144 according to the word instruction. Buff After storing the burst-transferred data, the storage device outputs the stored data to the cache device as write data.
  • the word holding device may be provided outside the compression cache device. However, as in the compressor 104 shown in FIG. 7 (b), the word holding device is provided inside the compressor. It can also be provided.
  • the compressor 104 is composed of a small unit compressor 14 1, a decision unit 14 2 for judging that all the small units can be compressed, a word switching unit 14 3 and a buffer 14 4. Be composed.
  • burst-transferred data is input to the small unit compressor 141, and an externally input word instruction is input to the word switcher 144.
  • the small-unit compressor 14 1 compresses the burst-transferred data, outputs the result as small-unit compressed data to the word switch 14 3, and sends the compressible signal to the decision unit 14 2.
  • the word switcher 144 sequentially stores the compressed data in small units in the buffer 144 according to the word instruction. After storing the compressed data in small units, the buffer 144 outputs the stored data as compressed data to the write data generator 4a.
  • a burst start signal is input to the decision unit 142.
  • Judgment device 142 outputs a true compressible signal only when it can be compressed in all small units from the start to the end of burst transfer according to the burst start signal. As described above, only one small unit compressor is required in the compressor.
  • the compressed cache device of the present invention by providing the word holding device 70 on the input side of the non-compressed line, burst transfer can be performed even on the non-compressed line.
  • FIG. 8 is a block diagram showing an example of a configuration provided with a word selector in the compression cache device of the present invention.
  • the compression cache device shown in FIG. 8 includes a compressor 10d instead of the compressor 10 in the basic configuration example of the compression cache device shown in FIG. 1, and a decompressor instead of the decompressor 20. 20 d and a word selector 60.
  • the compressor 10d is composed of, for example, the compressor 103 shown in FIG. 6 (a), and compresses uncompressed data word by word.
  • Compressed line data is composed of a plurality of words, and similarly, uncompressed line data is composed of a plurality of words.
  • part of the address is used as a word specification, and the word specified by the word specification is output to the word selector 60 and the decompressor 20d as a word selection signal.
  • the word selector 60 outputs the word selected from the uncompressed data in the uncompressed line to the line selector 2 according to the word selection signal.
  • FIG. 9 is a block diagram showing an example of the configuration of a decompressor provided with one small-unit decompressor.
  • the compression angle eliminator 204 shown in FIG. 9 is composed of a word selector 241 and a small unit decompressor 242.
  • the compressed data is divided into four words using, for example, a distributor or the like, and is input to the word selector 241. Further, the word selection signal is input to the word selector 24 1.
  • the word selector 241 selects small unit of compressed data according to the word selection signal, and outputs the result to the small unit decompressor 242.
  • the small unit decompressor 242 decompresses the small unit compressed data output from the word selector 241 and outputs the result to the line selector 2 as uncompressed data. As described above, only one small-unit decompressor is required in the decompressor.
  • the compressor includes a plurality of small unit compressors for compressing small unit input data, divides the input data into small units, and When it is impossible to compress at most one small unit compressor among the unit compressors, the output of the small unit compressor that can be compressed is combined with the small unit uncompressed data to perform compression. It is characterized in that it is output as data.
  • the decompressor includes a plurality of small-unit decompressors for decompressing the compressed data in small units, and divides the compressed data into small units. The output of the small unit decompressor is combined with the small unit of uncompressed data and output.
  • the small unit compressor compresses only data that appears at a predetermined frequency.
  • the small unit compressor and the small unit decompressor use a second frequency data table that associates data that appears at the predetermined frequency. Things.
  • the second frequency data table corresponds to the above-mentioned high frequency data table.
  • FIG. 10 is a block diagram showing a configuration of a compressor and a decompressor permitting one word of uncompressed data, and an example of an extended small unit compressor and an extended small unit decompressor.
  • the compressor shown in FIG. 10 (a) is composed of extended small unit compressors 15 1 a, 15 1 b, 15 1 c, 15 1 d and a discriminator (only one at most It consists of 152, bit inverters 153a, 153b, 153c, 153d, and selector 154.
  • the uncompressed data is divided into four words using, for example, a distributor and the like, and the expanded small unit compressors 15 1a, 15 1b, 15 1c, 15 1 d and input to selector 1 54.
  • the extended small unit compressor 15 1 shown in Fig. 10) is composed of a small unit compressor 15 1 1 1, a word selector 15 12 and a data output unit 15 13.
  • the small-unit compressor 1511 compresses the small-unit uncompressed data, outputs a compressible signal to the decision unit 152 and the word selector 1512, and compresses the small-unit compressed data. Is output to the word selector 1 5 1 2.
  • the word selector 1 5 1 2 selects the output of the small unit compressor 1 5 1 1 if the input compressible signal is true, and the data output unit if the input compressible signal is false. Select the output of 1 5 1 3 and output the result as compressed data.
  • the small unit compressor can compress the uncompressed data to, for example, 255 kinds of values from 0 to 254, 0 to 254 use 255 as a compressed word and compressed data indicating an uncompressed word. Can be. That is, if compression is not possible with the small unit compressor 151, a false compressible signal is output, and at the same time, data indicating non-compression, for example, 255, is output as compressed data.
  • the decision unit 152 collects the compressible signals obtained from the extended small-unit compressors 15 1a, 15 1b, 15 1 c, and 15 1 d, and all are true. Only when there is at least one false signal, the compressible signal of the compressor 105 is set to true, and otherwise, false is output. Also, the compressible signals output from the extended small unit compressors 15 1 a, 15 1 b, 15 1 c and 15 1 d are bit inverters 1 53 a, 1 53 b and 1 53 c, respectively. , 153d, and then output to the selector 154. The selector 154 selects the uncompressed data corresponding to the small unit for which the output of the bit inverter is true from among the inputted small unit of uncompressed data, and outputs it as an uncompressed word.
  • the output of the extended small unit compressor 15 51 a, 15 1 b, 15 1 c, 15 1 d and the uncompressed word are combined using, for example, a combiner, etc. Output to a.
  • the compression line corresponding to the compressor 105 can accept one uncompressed word.
  • the decompressor 205 shown in FIG. 10 (c) is composed of extended small unit decompressors 251a, 251b, 251c and 251d.
  • the compressed data is divided into four words using, for example, a distributor or the like, and input to the small unit decompressors 251a, 251b, 251c, 251d, respectively.
  • the uncompressed words of the compressed data are input to all the small unit decompressors 25 1a, 25 1b, 25 1c, and 25 Id.
  • the extended small unit decompressor 251 shown in FIG. 10 (d) includes a data output unit 25 12, a comparator 25 13, and a word selector 25 14.
  • the divided compressed data is input to the small unit decompressor 2511 and the comparator 2513.
  • the uncompressed word is input to the word selector 25 14.
  • the small unit decompressor 25 1 1 Decompresses the data and outputs the result to the word selector 1 5 1 2.
  • the comparator 2513 compares the compressed data output from the data output unit 2512 with the divided compressed data, and if the comparison result is equal, the result is true. Is output to the word selector 2 5 1 4.
  • the word selector 2 5 1 4 selects an uncompressed word if the output of the comparator 2 5 1 3 is true, and the small unit compressor 2 5 1 1 if the output of the comparator 2 5 1 3 is false And outputs the result as uncompressed data.
  • the outputs of the small unit decompressors 25 1a, 25 1b, 25 1c, and 25 1 d are combined using, for example, a combiner, etc., and written as uncompressed data. Is output to the selector 2. As described above, one-word uncompressed data can be allowed when performing compression in small units.
  • FIG. 1 is a block diagram showing a basic configuration of a compression cache device of the present invention.
  • FIG. 2 is a block diagram showing an example of the configuration of a write line designator and a write data generator in the compression cache device of the present invention.
  • FIG. 3 is a block diagram showing a configuration example in which a compression cache and a decompression device are provided for each compression line in the compression cache device of the present invention.
  • FIG. 4 is a block diagram showing a configuration example in which one compression unit and one decompression unit are provided for a plurality of compression lines in the compression cache device of the present invention.
  • FIG. 5 is a block diagram showing an example of a configuration of a compressor and a decompressor provided with a high-frequency data table.
  • FIG. 6 is a block diagram showing an example of the configuration of a compressor having a plurality of small unit compressors and a decompressor having a plurality of small unit decompressors.
  • FIG. 7 is a block diagram showing an example of a configuration of a compressor including one small unit compressor.
  • FIG. 8 is a block diagram showing an example of a configuration including a word selector in the compression cache device of the present invention.
  • FIG. 9 is a block diagram showing an example of the configuration of a decompressor having one small unit decompressor.
  • FIG. 10 is a block diagram showing a configuration of a compressor and a decompressor that allow one word of uncompressed data, and an example of an extended small unit compressor and an extended small unit decompressor.
  • FIG. 11 is a block diagram showing a configuration of the compression cache device according to the first embodiment.
  • FIG. 12 is a block diagram showing an example of a configuration of a decompressor used in the compression cache device according to the first embodiment.
  • FIG. 13 is a block diagram showing a configuration of a compression cache device according to the second embodiment.
  • FIG. 14 is a block diagram showing an example of a configuration of a compressor used in the compression cache device according to the second embodiment.
  • FIG. 15 is a block diagram showing an example of the configuration of a conventional cache device.
  • FIG. 16 is a block diagram showing an example of the configuration of a read line designator and a line selector in a conventional cache device.
  • FIG. 17 is a block diagram showing an example of a configuration of a write line designator and a write data generator in a conventional cache device.
  • FIG. 11 is a block diagram showing a configuration of the compression cache device of the present invention in the first embodiment.
  • the compression cache device shown in FIG. 11 includes a compressor 10 e, a decompressor 20 e, a compression line selector 50, a word selector 60 a, 60 b, and two lines. Uncompressed lines 30a, 30b and two compressed lines 40a, 40b, a read line designator 1 for selecting and outputting data obtained from the lines, and a line selector 2 Also, it comprises a write line designator 3a for selecting a line at the time of writing and a write data generator 4a. All compressed lines allow one uncompressed word. In the present embodiment, word designation is used without using burst transfer.
  • Compressor 10 e uses the same compression method for compression lines 40 a and 40 b .
  • the compressor 10e is composed of the compressor 105 shown in FIG. 10 (a).
  • the compressor 102 shown in FIG. 5 (b) is used as the small unit compressor used in the extended small unit compressors 151a, 151b, 151c, and 151d.
  • the small-unit compressor uses a high-frequency data table and outputs a 32-bit high-frequency data pattern 51 as 9-bit compressed data if it has one word.
  • the decompressor 20e comprises a decompressor 206 shown in FIG.
  • the decompressor 206 includes a word selector 241 and an expanded small unit decompressor 251.
  • This configuration has an expanded small unit decompressor 251 shown in FIG. 10D instead of the small unit decompressor 242 in the decompressor 204 shown in FIG.
  • the decompressor 201 shown in Fig. 5 (c) is used as the small unit decompressor used in the extended small unit decompressor 251.
  • the compression line selector 50 selects the corresponding compression line from the compression lines 40a and 4Ob according to the line designation instruction output from the read line designation unit 1, and decompresses the compressed data of the selected compression line. Output to 20 e.
  • the decompressor 20e decompresses the word selected from the compressed data according to the word selection signal, and outputs the result to the line selector 2 as uncompressed data.
  • the word selector 60a outputs a word selected from the uncompressed data on the uncompressed line 30a to the line selector 2 according to the word selection signal.
  • the word selector 6 Ob outputs a word selected from the uncompressed data on the uncompressed line 30b to the line selector 2 according to the word selection signal.
  • the flag part of the uncompressed line and the compressed line uses 1 bit of only the valid flag.
  • the write line designator 3a has the same configuration as in FIG. 2, and preferentially selects a compressed line whose compressible signal is true, and selects an uncompressed line if there is no compressed line whose compressible signal is true.
  • an address is composed of a tag 13 bits, an index 15 bits, a word designation 2 bits, and a byte designation 2 bits.
  • the data part of the uncompressed line and the compressed line consists of 4 words, and one word is 32 bits (4 bytes). Also, the compression line allows one uncompressed word.
  • FIG. 13 is a block diagram showing a configuration of a compression cache device according to the second embodiment of the present invention.
  • the compression cache device shown in FIG. 13 has two compressors 10a and 10b instead of the compressor 10e in the compression cache device shown in FIG. 11, and has two compressors instead of the decompressor 20e.
  • a word holding device 70 is provided for an uncompressed line
  • an uncompressed line selector 80 for selecting an uncompressed line is provided.
  • each of the non-compression line 30, the compression line 40a, and the compression line 40b includes two lines.
  • the compressor 10a is a general-purpose compressor
  • the compression line 40a is a general-purpose compression line.
  • the compressor 10b is a compressor for floating-point numbers
  • the compression line 40b is a compression line for floating-point numbers. All compression lines allow one uncompressed word. In this embodiment, the burst transfer is used. And use word specification.
  • the compressors 10a and 10b are composed of the compressor 106 shown in FIG.
  • the compressor 106 shown in Fig. 14 is an extended small unit compressor 151, a decision unit 1442a, a bit inverter 1553, a selector 1554a, and word switching. And a buffer 144.
  • the extended small unit compressor 15 1 of FIG. 10 (b) is provided, and the decision unit 14 2
  • a decision unit 14 2a is provided, and the bit inverter 153 in FIG. 10 (a) and the selector 15 4a in place of the selector 15 54 in FIG. 10 (a) are provided. Is provided.
  • Judgment unit 142 a sets the compressible signal of compressor 105 to true only when there is at most one of the compressible signals from the start to the end of the burst transfer and there is no false signal. Will output false. If the output of the bit inverter corresponding to the input small unit of uncompressed data is true, the selector 154a outputs the input small unit of uncompressed data as an uncompressed word . The output of the buffer 144 and the non-compressed word are combined using, for example, a combiner or the like, and output as compressed data to the write data generator 4a.
  • Each of the decompressors 20a and 20b is constituted by the decompressor 206 described in the first embodiment.
  • the compression line selector 50a selects the corresponding compression line from the two compression lines 40a according to the line designation instruction output from the read line designation unit 1, and compresses the compressed data of the selected compression line. Output to canceler 20a.
  • the compression line selector 50b selects the corresponding compression line from the two compression lines 40b in accordance with the line designation instruction output from the read license designation unit 1, and selects the selected compression line. Output the compressed data to the decompressor 20b.
  • the uncompressed line selector 80 selects the corresponding uncompressed line from the two uncompressed lines 30 in accordance with the line designation instruction output from the read line designator 1, and selects the selected uncompressed line. The uncompressed data of the compressed line is output to the word selector 60.
  • the decompressors 20a and 20b decompress the word selected from the compressed data according to the word selection signal, and output the result to the line selector 2 as uncompressed data.
  • the word selector 60 outputs the word selected from the uncompressed data to the line selector 2 according to the word selection signal.
  • the flag part of the uncompressed line and the compressed line shall use 2 bits of a valid flag and a recently unused flag.
  • the write line designator 3a has the same configuration as that shown in Fig. 2, and preferentially selects a compressed line whose compressible signal is true, and selects an uncompressed line if there is no compressed line whose compressible signal is true. .
  • the address is composed of a tag 13b it; an index 15b it, a word designation 2b it, and a byte designation 2b it.
  • the data part of the uncompressed line and the compressed line consists of four words, and one word is 32bit (4byte). Also, the compression line allows one uncompressed word.
  • the present invention has been described with reference to a particularly preferred embodiment.
  • the configuration and operation of the compression cache device described above are examples for realizing the present invention. It goes without saying that other changes in form and detail are possible without departing from the spirit and scope of the invention, which is limited only by the scope of the invention.
  • the configuration of the compressor and the decompressor simply needs to be replaced with an implementation that calculates and outputs the run-length.
  • the same cache capacity can be implemented with a small amount of hardware. Also, since only the same I / O as the conventional cache device is required, this device can be used without change in devices such as the CPU that used the conventional cache device without any change. Can be

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

明 細 書 圧縮キャッシュ装置 技術分野
本発明は、 計算機における演算装置 (C P U) と記憶装置 (メモリ) の間に備 えられ、 必要に応じてデータを圧縮して書き込みと読み込みを行う圧縮キヤッシ ュ装置に関し、 特に、 同じキャッシュ容量をより少ないハードウェア量で実現す る圧縮キャッシュ装置に関するものである。 背景技術
現在の C P Uはチップ内にキャッシュを内蔵するのが普通となっており、 内蔵 されるキャッシュ容量は年々増える傾向にある。 し力 し、 内蔵キャッシュでは使 えるハードウェア量 (チップ内面積) に制限があるため、 外部キャッシュほど大 きな容量を持つことはできない。 すでにいくつかの C P Uにおいて、 キャッシュ を実装するために必要なハードウエア量はチップ全体の過半数を越えている。 そ のため、 少ないハードウエア量で多くのキャッシュ容量を実現する装置が必要で ある。
ここで、 従来のキャッシュ装置について説明する。 第 1 5図は、 従来のキヤッ シュ装置の構成の一例を示すブロック図である。 第 1 5図に示すキャッシュ装置 は、 ライン 5 aとライン 5 bと、 ラインから得られたデータを選択して出力する ための読み込みライン指定器 1とライン選択器 2、 また、 書き込み時にラインを 選択するための書き込みライン指定器 3と書き込みデータ作成器 4から構成され る。 ここでラインとはデータを格納するものであり、 フラグとタグとデータから 構成される。 ここでは 2つのラインを備えたキヤッシュ装置を例に挙げて説明す る。
まず、 データの読み込み時について第 1 6図を用いて説明する。 第 1 6図は、 従来のキヤッシュ装置における読み込みライン指定器とライン選択器の構成の一 例を示すブロック図である。 第 1 6図に示すように、 読み込みライン指定器 1は 、 比較器 l l a, 1 1 bと、 AND演算器 12 a, 1 2 bと、 OR演算器 13力、 らなり、 ライン選択器 2は、 スィッチ 2 l a, 2 l bからなる。 ここで説明のた めに、 第 16図に示すライン Aを第 15図のライン 5 aとし、 第 16図に示すラ イン Bを第 15図のライン 5 bとする。
まず、 キャッシュ装置は、 外部より入力されたアドレスをタグ部とインデック ス部に分け、 インデックス部で指定されたインデックスに該当する部分を全ての ラインで参照する。 次に、 読み込みライン指定器 1において、 比較器 1 1 aはラ イン Aから得られたタグと外部より入力されたァドレスのタグを比較し、 比較し た結果が等しい場合に真を、 等しくない場合に偽を、 AND演算器 12 aへ出力 する。
AND演算器 1 2 aは、 比較器 1 1 aの出力とライン Aから得られた有効フラ グとの AND演算を行い、 その結果を OR演算器 13とライン選択器 2へ出力す る。 ここで、 AND演算の際には、 上述したようにラインに蓄えられた有効フラ グを使うことも多い。 その場合、 有効フラグが 0のラインはタグの比較対象とは ならない。
一方、 比較器 1 1 bと AND演算器 12 bは、 ライン Bに関して比較器 1 1 a と AND演算器 12 aと同様の動作を行い、 その結果を OR演算器 13とライン 選択器 2へ出力する。 OR演算器 13は、 AND演算器 12 aの出力と AND演 算器 12 bの出力との OR演算を行い、 その結果をヒット信号として外部へ出力 する。 すなわち、 読み込みライン指定器 1は、 それぞれのラインから得られたタ グとアドレスのタグを比較した結果、 等しいものがあればライン選択器 2に対し てライン指定を行うとともに、 ヒット信号を外部へ出力する。
一方、 ライン選択器 2において、 スィッチ 21 aは AND演算器 12 aの出力 が真であれば、 ライン Aのデータを読み込みデータとして外部へ出力する。 同様 に、 スィッチ 21 bは AND演算器 1 2 bの出力が真であれば、 ライン Bのデー タを読み込みデータとして外部へ出力する。 以上がデータの読み込みの動作であ る。
次に、 データの書き込み時について第 1 7図を用いて説明する。 第 17図は、 従来のキャッシュ装置における書き込みライン指定器と書き込みデータ作成器の 構成の一例を示すブロック図である。 まず、 書き込みライン指定器 3には、 デー タの書き込みを表す書き込み信号が外部から入力され、 ライン Aから最近不使用 フラグが入力され、 ライン Bから最近不使用フラグが入力される。 最近不使用フ ラグとは、 最近使用していないラインを表すためのフラグである。
まず、 書き込みライン指定器 3は、 例えば最近不使用フラグを用いて最近使用 していないラインを優先して選び、 その結果を書き込み信号として書き込みデー タ作成器 4へ出力する。 ここで、 選択されたラインの書き込み信号は真となり、 選択されなかったその他の書き込み信号は偽となる。 また、 書き込みライン指定 器 3は、 ラインを例えばランダムに選択する。 この場合は、 選択される全てのラ ィンに関して最近不使用フラグを常に真にすることと等価である。
一方、 書き込みデータ作成器 4には、 書き込みライン指定器 3の出力である書 き込み信号が入力され、 外部より入力されたァドレスの中のタグと書き込みデー タが入力される。 ここで、 タグと書き込みデータはライン A用とライン B用に分 岐して入力される。 書き込みデータ作成器 4は、 タグの前にフラグの初期値を付 加し、 書き込み信号とフラグとタグと書き込みデータをそれぞれライン Aとライ ン Bへ出力する。 ライン Aとライン Bは、 書き込み信号に従ってデータの書き込 みを行う。 以上がデータの書き込みの動作である。
以上のような構成のキャッシュ装置に対するキャッシュ容量の増設は、 ほとん どの場合、 単純に、 チップ内に搭載されるトランジスタ数を増やすことによって のみ行われてきた。 これにより、 インデックスの数を増やしたり、 1つのライン に入れる実装メモリ量を増やしたり、 ライン数を增ゃしたりすることができる。 しかしながら、 キャッシュとして蓄えられるデータには多くの場合類似性が多く 、 冗長な情報を減らすことで、 蓄えるべき情報をより少ないキャッシュ容量で実 現することができる可能性がある。
見かけのキャッシュ容量を増やすことに関連する技術として、 組み込みシステ ムの圧縮キャッシュ技術がある。 例えば、 Larin, Sergei Yurie vichの博士論文 E xploiting Program Redundancy to Improve Periormance, uost ana Power Consumption in Embedded Systems, North Carolina State University Dep artment of Electrical and Computer Engineering, Aug. 2000に見られるよう に、 アクセスすべきメモリの内容をあらかじめ圧縮して R OM (Read Only Me mory) に納めておき、 キャッシュから参照するときにのみ圧縮解除して使う方 式力 sあ o。
しかしながら、 この組み込みシステムの圧縮キャッシュ技術は、 圧縮効率の高 い圧縮装置をソフトウエアとして実現することを前提としているため、 ハードウ エア中に圧縮装置を実現することが極めて難しい。 また、 圧縮後の内容が可変長 であるために、 圧縮解除する際に複雑な手続きが必要であり、 短時間での圧縮角军 除を難しく している。
従来のキヤッシュ装置では、 キヤッシュの内容を圧縮して見かけのキヤッシュ 容量を增やす試みはされてこなかった。 このため搭載すべきキヤッシュ容量が増 えるにつれ実装するためのハードウェアが必要となり、 実装メモリ量によってキ ャッシュ容量が規定されていた。 また、 組み込みシステムの圧縮キャッシュ技術 では、 圧縮する際に複雑なアルゴリズムを用いるため、 圧縮はあらかじめソフト ウェアで行う必要があり、 通常のキヤッシュ装置の様にハードウエア上に実装す ることはできなかった。
本発明は上述した課題に鑑みてなされたものであり、 従来のキヤッシュ装置と 同様のインターフェースを実現しつつ、 同じキャッシュ容量をより少ないハード ウェア量で実現できるキャッシュ装置を提供することを目的とする。 発明の開示
本発明は、 外部の入力データを必要に応じて圧縮してラインへ書き込みを行レ、 、 ラインからデータの読み込みを行って必要に応じて圧縮解除してデータを外部 へ出力する圧縮キャッシュ装置であって、 入力データの圧縮が可能である場合に 入力データの圧縮を行い、 その結果を圧縮データとして出力する少なくとも 1つ の圧縮器と、 圧縮データの圧縮解除を行う少なくとも 1つの圧縮解除器と、 圧縮 データを格納するラインである少なくとも 1つの圧縮ラインと、 入力データを格 納するラインである少なくとも 1つの非圧縮ラインと、 データの書き込みを行う ラインを予め定められた条件に従つて選択する書き込みデータ選択手段と、 デー タの読み込みを行うラインを予め定められた条件に従って選択する読み込みデー タ選択手段とを備えたことを特^ [とするものである。
このような構成によれば、 ラインに蓄えるデータを圧縮することにより、 同じ キャッシュ容量をより少なレ、ハードゥエァ量で実現することができる。
また、 本発明に係る圧縮キャッシュ装置において、 予め定められた条件に合致 した複数のラインが存在する場合、 前記書き込みデータ選択手段は、 複数のライ ンから 1つのラインをランダムに選択することを特徴とするものである。
このような構成によれば、 予め定められた条件に合致した複数のラインから、 公平に 1つのラインを選択することができる。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮器に入力されたデ ータの圧縮が可能である場合、 前記書き込みデータ選択手段は、 前記圧縮ライン を優先して選択することを特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 複数の前記圧縮器に入力さ れたデータの圧縮が可能である場合、 前記書き込みデータ選択手段は、 圧縮ライ ンの非使用状態に基づいて圧縮ラインを選択することを特徴とするものである。 また、 本発明に係る圧縮キャッシュ装置において、 前記書き込みデータ選択手 段は、 非使用状態が所定の時間にわたり継続している圧縮ラインを選択すること を特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 前記書き込みデータ選択手 段は、 非使用状態が最も長い時間にわたり継続している圧縮ラインを選択するこ とを特徴とすることを特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 前記書き込みデータ選択手 段は、 近似 L R U法、 ランダムに選択するランダム法、 または F I F O法のいず れかを用いて圧縮ラインを選択することを特徴とするものである。
このような構成によれば、 圧縮ラインの活性率を上げることができ、 効率的な 圧縮キヤッシュ装置を実現できる。
ここで、 本発明の圧縮キヤッシュ装置の基本構成について第 1図と第 2図を用 いて説明する。 第 1図は、 本発明の圧縮キヤッシュ装置の基本構成を示すプロッ ク図である。 第 1図に示すように、 この圧縮キャッシュ装置は、 第 1 5図に示し た従来のキャッシュ装置におけるライン 5 aとライン 5 bの代わりに非圧縮ライ ン 3 0と圧縮ライン 4 0を備え、 書き込みライン指定器 3の代わりに書き込みラ イン指定器 3 aを備え、 書き込みデータ作成器 4の代わりに書き込みデータ作成 器 4 aを備え、 さらに圧縮器 1 0と圧縮解除器 2 0を備える。 圧縮ライン 4 0は 非圧縮ライン 3 0に比べて必要な実装メモリ量は少ない。 ここで、 上述の書き込 みデータ選択手段は書き込みライン指定器 3 aと書き込みデータ作成器 4 aに相 当し、 読み込みデータ選択手段は読み込みライン指定器 1とライン選択器 2に相 当する。
なお、 本発明の圧縮キャッシュ装置においては、 圧縮器 1 0が書き込みデータ の圧縮に失敗した場合に備えて、 少なくとも一つの非圧縮ライン 3 0が必要であ る。 第 1図において、 第 1 5図と同一符号は第 1 5図に示された対象と同一又は 相当物を示しており、 ここでの説明を省略する。
まず、 データの書き込み時について第 1図を用いて説明する。 圧縮器 1 0は、 書き込みデータを圧縮することで蓄えるデータ量を減らし、 圧縮ライン 4 0に格 納できるようにする。 また、 圧縮器 1 0は、 書き込みデータの圧縮が可能か不可 能かを示す圧縮可能信号を出力する。 圧縮器 1 0は、 書き込みデータの圧縮が可 能な場合は圧縮可能信号を真とし、 不可能な場合は圧縮可能信号を偽とする。 圧 縮データのデータ量が圧縮ライン 4 0のサイズ以内であれば、 圧縮器 1 0は書き 込みデータの圧縮を行い、 その結果を圧縮データとして書き込みデータ作成器 4 aへ出力するとともに、 書き込みライン指定器 3 aへ圧縮可能信号として真を出 力する。 圧縮データのデータ量が圧縮ライン 4 0のサイズ以内でなければ、 圧縮 器 1 0は圧縮可能信号として偽を出力する。 本発明の圧縮キャッシュ装置は、 デ ータの書き込みの際には、 従来のキャッシュ装置とほとんど同じ動作をするが、 以下の 3点が異なる。
( 1 ) 圧縮ラインに格納すべきデータは圧縮器で一度圧縮する。
( 2 ) 書き込みライン指定器は、 圧縮可能信号が真の圧縮ラインを優先して選 択する。 なお、 圧縮可能信号が真の圧縮ラインが複数あればそのうちの一つを適 当に選択する。
( 3 ) 書き込みライン指定器は、 非圧縮ラインからの圧縮可能信号は常に真で あるとみなし、 全ての圧縮器から出力される圧縮可能信号が偽であつた場合に、 非圧縮ラインを選択する。 なお、 非圧縮ラインが複数あればそのうちの一つを適 当に選択する。 適当に選択する手法については後述する。
ここで、 最近不使用フラグを用いる書き込みライン指定器 3 aの動作について 第 2図を用いて説明する。 第 2図は、 本発明の圧縮キャッシュ装置における書き 込みライン指定器と書き込みデータ作成器の構成の一例を示すブロック図である 。 ここで説明のために、 第 2図に示すライン Aを第 1図の非圧縮ライン 3 0とし 、 第 2図に示すライン Bを第 1図の圧縮ライン 4 0とする。
第 2図に示すように、 書き込みライン指定器 3 aには、 書き込み信号が入力さ れ、 ライン Aから得られた最近不使用フラグとライン Bから得られた最近不使用 フラグが入力され、 さらにライン Aに関する圧縮可能信号とライン Bに関する圧 縮可能信号が入力される。 ここで非圧縮ライン 3 0であるライン Aに関する圧縮 可能信号は常に真である。
まず、 書き込みライン指定器 3 aは、 圧縮可能信号が真である圧縮ラインを優 先して選択する。 第 2図において圧縮ライン 4 0であるライン Bの圧縮可能信号 が真であれば書き込みライン指定器 3 aはライン Bを選択する。 ここで、 もし圧 縮ラインが複数備えられ、 圧縮可能信号が真である圧縮ラインが複数ある場合、 書き込みライン指定器 3 aは、 複数の圧縮ラインのうち 1つを適当に選び、 その 結果を書き込み信号として書き込みデータ作成器 4 aへ出力する。
もし、 圧縮ラインの圧縮可能信号が真でない場合、 書き込みライン指定器 3 a は非圧縮ラインを選択する。 すなわち、 第 2図においてライン Bの圧縮可能信号 が偽であればライン Aを選択する。 ここで、 もし非圧縮ラインが複数ある場合、 書き込みライン指定器 3 aは、 複数の非圧縮ラインのうち 1つを適当に選び、 そ の結果を書き込み信号として書き込みデータ作成器 4 aへ出力する。
複数のラインのうち 1つを適当に選ぶ選択方法の一例として、 近似 L R U法に ついて説明する。 近似 L R U法では、 そのラインを最近使用していない場合は最 近不使用フラグを真とし、 そのラインを最近使用した場合は最近不使用フラグを 偽とする。 この最近不使用フラグは定期的に真にされる。 書き込みライン指定器 3 aは、 例えば最近不使用フラグに従って最近使用していないラインを優先して 選び、 その結果を書き込み信号として書き込みデータ作成器 4 a へ出力する。 ま た、 書き込みライン指定器 3 aが複数のラインのうち 1つを適当に選ぶ選択方法 の他の一例として、 最近不使用フラグにかかわらずランダムに選択する方法があ る。 この場合は、 選択される全てのラインに関して最近不使用フラグを常に真に することと等価である。
この他に、 F I F O (First In First Out) 方式を用いる方法などさまざまな 選択方法があるが、 いずれの選択方法も圧縮可能信号が真のラインのみを対象と する変更を行うだけで、.容易に実現することができる。 また、 第 1図の構成では 非圧縮ラインと圧縮ラインは一つずつ備えてあるが、 それぞれ複数用いることが 可能である。 非圧縮ラインを複数持つことは従来のキャッシュ装置と同じである 書き込みデータ作成器 4 aには、 書き込みライン指定器 3 aの出力である書き 込み信号が入力され、 外部より入力されたアドレスの中のタグが入力され、 外部 より入力された書き込みデータが入力され、 圧縮器 1 0の出力である圧縮データ が入力される。 ここで、 タグはライン A用とライン B用に分岐して入力され、 書 き込みデータはライン A用に入力され、 圧縮データはライン B用に入力される。 書き込みデータ作成器 4 aは、 タグの前にフラグの初期値を付加し、 ライン Aの 書き込み信号とフラグとタグと書き込みデータをライン Aへ、 ライン Bの書き込 み信号とフラグとタグと圧縮データをライン Bへ出力する。 ライン Aとライン B は、 書き込み信号に従ってデータの書き込みを行う。
次に、 データの書き込み時について第 1図を用いて説明する。 圧縮解除器 2 0 は、 圧縮ライン 4 0から得られた圧縮データの圧縮解除を行い、 圧縮データから 元のデータを復元し、 その結果を非圧縮データとしてライン選択器 2へ出力する 。 本発明の圧縮キャッシュ装置は、 データの読み込みの際には、 従来のキヤッシ ュ装置とほとんど同じ動作をするが、 唯一の違いは、 圧縮ラインの内容を参照す る場合には必ず圧縮解除器 2 0で非圧縮データに変換することである。
読み込みライン指定器 1は、 第 1 6図における動作と同様に、 非圧縮ライン 3 0と圧縮ライン 4 0から得られたタグとァドレスのタグを比較した結果、 等しい ものがあればライン選択器 2に対してライン指定を行うとともに、 ヒット信号を 外部へ出力する。 また、 ライン選択器 2は、 第 1 6図における動作と同様に、 読 み込みライン指定器 1の出力に従って非圧縮ライン 3 0または圧縮ライン 4 0の データを読み込みデータとして外部へ出力する。 以上が、 本発明の圧縮キヤッシ ュ装置の基本構成の動作である。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮ライン毎に前記圧 縮器と前記圧縮解除器を備えたことを特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 各々の前記圧縮器は異なる 圧縮方法を用い、 各々の前記圧縮解除器は前記圧縮方法に対応する圧縮解除方法 を用いることを特徴とするものである。
このような構成によれば、 データの種類に応じた圧縮方法を用いることにより 、 データの種類に応じた圧縮ラインを用いることができる。
ここで、 複数の圧縮ラインを持っための構成として、 圧縮ライン毎に圧縮器と 圧縮解除器を備えた例について第 3図を用いて説明する。 第 3図に示す圧縮キヤ ッシュ装置は、 第 1図に示した圧縮キャッシュ装置における圧縮ライン 4 0の代 わりに 2つの圧縮ライン 4 0 a , 4 0 bを備え、 圧縮器 1 0の代わりに 2つの圧 縮器 1 0 a , 1 0 bを備え、 圧縮解除器 2 0の代わりに 2つの圧縮解除器 2 0 a , 2 O bを備える。 第 3図において、 第 1図と同一符号は第 1図に示された対象 と同一又は相当物を示しており、 ここでの説明を省略する。 .
第 3図に示す構成では、 複数の圧縮器が異なる圧縮方法を用いることにより、 圧縮器の特性に応じて圧縮ラインを切替えることができる。 例えば 3つの圧縮器 A, B , Cと 3つの圧縮ライン A, B , Cを備えた場合、 圧縮器 Aはメモリ中の 命令語に特化した圧縮器、 圧縮器 Bは整数値データに特化した圧縮器、 圧縮器 C は浮動小数点データに特ィ匕した圧縮器等と構成することができ、 ライン Aはメモ リ中の命令語用の圧縮ライン、 ライン Bは整数値データ用の圧縮ライン、 ライン Cは浮動小数点データ用の圧縮ラインとなる。
まず、 データの書き込み時において、 圧縮器 1 0 a , 1 0 bは、 それぞれの圧 縮方法を用いて書き込みデータの圧縮を行う。 圧縮器 1 0 a , 1 0 bはそれぞれ 、 圧縮可能信号を書き込みライン指定器 3 aへ出力し、 圧縮データを書き込みデ ータ作成器 4 aへ出力する。
一方、 データの読み込み時において、 圧縮解除器 2 0 aは圧縮器 1 0 aの圧縮 方法に応じて圧縮ライン 4 0 aから得られた圧縮データの圧縮解除を行い、 その 結果を非圧縮データとしてライン選択器 2へ出力する。 同様に、 圧縮解除器 2 0 bは圧縮器 1 0 bの圧縮方法に応じて圧縮ライン 4 0 bから得られた圧縮データ の圧縮解除を行い、 その結果を非圧縮データとしてライン選択器 2へ出力する。 以上が、 圧縮ライン毎に備えられた圧縮器と圧縮解除器の動作である。
また、 本発明に係る圧縮キャッシュ装置において、 複数の前記圧縮ラインに対 して 1つの前記圧縮器と 1つの前記圧縮解除器を備えたことを特徴とするもので ある。
また、 本発明に係る圧縮キャッシュ装置において、 複数の前記圧縮ラインに対 して 1つの前記圧縮器を備えたことを特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 複数の前記圧縮ラインに対 して 1つの前記圧縮解除器を備えたことを特徴とするものである。
このような構成によれば、 圧縮器や圧縮解除器の数を減らすことができ、 ハー ドウエア量を削減できる。
ここで、 複数の圧縮ラインを持っための他の構成として、 複数の圧縮ラインに 対して 1つの圧縮器と 1つの圧縮解除器を備えた例について第 4図を用いて説明 する。 第 4図に示す圧縮キャッシュ装置は、 第 1図に示した圧縮キャッシュ装置 における圧縮器 1 0の代わりに圧縮器 1 0 cを備え、 圧縮ライン 4 0の代わりに 2つの圧縮ライン 4 0 a , 4 O bを備え、 圧縮解除器 2 0の代わりに圧縮解除器 2 0 cを備え、 さらに圧縮ライン選択器 5 0を備える。 第 4図において、 第 1図 と同一符号は第 1図に示された対象と同一又は相当物を示しており、 ここでの説 明を省略する。
まず、 データの書き込み時において、 圧縮器 1 0 cは、 圧縮ライン 4 0 a , 4 0 bに対して同じ圧縮方法を使用して書き込みデータの圧縮を行う。 すなわち、 圧縮器 1 0 cは、 同じ圧縮可能信号を圧縮ライン 4 0 a用と圧縮ライン 4 0 b用 に書き込みライン指定器 3 aへ出力し、 同じ圧縮データを圧縮ライン 4 0 a用と 圧縮ライン 4 0 b用に書き込みデータ作成器 4 aへ出力する。
一方、 データの読み込み時において、 圧縮ライン選択器 5 0は、 読み込みライ ン指定器 1から出力されるライン指定の指示に従って、 該当する圧縮ラインを 2 つの圧縮ライン 4 0 a , 4 O bカゝら選択し、 選択された圧縮ラインの圧縮データ を圧縮解除器 2 0 cへ出力する。
圧縮解除器 2 0 cは、 圧縮ライン選択器 5 0から出力された圧縮データの圧縮 解除を行い、 その結果を非圧縮データとしてライン選択器 2へ出力する。 以上が 、 複数の圧縮ラインに対して 1つずつ備えられた圧縮器と圧縮解除器の動作であ る。
なお、 第 4図の構成において、 圧縮器だけ 1つ備えるように構成したり、 圧縮 解除器だけ 1つ備えるように構成することもできる。 また、 複数の圧縮ラインの 組に对して 1つの圧縮器が備えられ、 この圧縮ラインの組が複数備えられても良 い。 同様に、 複数の圧縮ラインの組に対して 1つの圧縮解除器が備えられ、 この 圧縮ラインの組が複数備えられても良い。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮器は、 所定の頻度 で出現するデータのみを圧縮することを特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮器と圧縮解除器は 、 前記所定の頻度で出現するデータの対応付けを行う第 1頻度データ表を用いる ことを特徴とするものである。
このような構成によれば、 データの圧縮方法および圧縮解除方法が単純である ため、 余分な時間をほとんど必要とせずにデータの圧縮および圧縮解除を行うこ とができる。
ここで、 高頻度データ表を用いて圧縮を行う圧縮器と圧縮解除器について第 5 図を用いて説明する。 圧縮器と圧縮解除器は、 汎用の圧縮アルゴリズム、 例えば gnu gzipコマンドで用いられている Lampel Zip 77ァノレゴリズム、 gnu bzip2コ マンドで用いられているブロックソ一トァルゴリズム、 同じビットが続く長さの みを記録するランレングス法などの実装方式によりハードウ-ァ上に実装して活 用することができるが、 容易な実装方式として高頻度データ表を用いることもで きる。
第 5図は、 高頻度データ表を用いて構成された圧縮器と圧縮解除器の構成の一 例を示すブロック図である。 ここで、 上述の第 1頻度データ表は高頻度データ表 に相当する。 まず、 第 5図 (a ) の圧縮器 1 0 1について説明する。 圧縮器 1 0 1は、 高頻度データ表 1 1 1と、 複数の比較器 1 1 2と、 O R演算器 1 1 3と、 エンコーダ 1 1 4から構成される。 ここでは説明のため、 入力される非圧縮デー タは 3 2 b i t、 出力される圧縮データは 9 b i tとする。 従って、 9 b i tで 表すことができる圧縮データの種類は 5 1 2個となる。 高頻度データ表 1 1 1は 、 3 2 b i tのデータパターンのうち、 5 1 2個の高頻度データを抽出して予め 作成されている。
まず圧縮器 1 0 1において非圧縮データは、 高頻度データに対応した 5 1 2個 の比較器 1 1 2へ入力される。 それぞれの比較器 1 1 2は、 非圧縮データとそれ ぞれの高頻度データを比較した結果が、 等しい場合に真を、 等しくない場合に偽 を、 O R演算器 1 1 3とエンコーダ 1 1 4へ出力する。 O R演算器 1 1 3は、 複 数の比較器 1 1 2の出力の O R演算を行い、 その結果を圧縮可能信号として出力 する。 エンコーダ 1 1 4は、 真を出力した比較器 1 1 2の番号を表す 9 b i tの 圧縮データを出力する。 以上により、 3 2 b i tの非圧縮データは、 高頻度デー タに相当する場合は 9 b i tで表現でき、 2 8 %の実装メモリ量で同じ情報を蓄 えることができる。
次に、 第 5図 (c ) の圧縮解除器の構成について説明する。 圧縮解除器 2 0 1 は、 高頻度データ表 2 1 1から構成される。 高頻度データ表 2 1 1は、 圧縮器 1 0 1で用いる高頻度データ表 1 1 1と同じものを用いる。 圧縮解除器 2 0 1は、 9 b i tの圧縮データを高頻度データインデックスとして高頻度データ表 2 1 1 を検索することで、 容易に 3 2 b i tの非圧縮データを出力することができる。 また、 第 5図 (b ) に示す圧縮器 1 0 2は、 圧縮器 1 0 1の具体的な実装方式 の一例を示すブロック図である。 高頻度データ表 1 1 1と比較器 1 1 2は P L A (Programmable Logic Array) 1 2 1で実装され、 O R演算器 1 1 3とェンコ ーダ 1 1 4は P L A 1 2 2で実装される。
上述した高頻度データ表を用いた圧縮方法では、 圧縮データのサイズが非圧縮 データによって変わらないため、 ハードウェア上の実装が容易で、 動作も速いと いう特徴がある。 また、 圧縮データのサイズが一定であることは、 後述する小単 位での圧縮方法を用いる場合も実装が容易となる利点を持つ。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮器は、 小単位の入 力データの圧縮を行う複数の小単位圧縮器を備え、 前記入力データを小単位に分 割し、 全ての前記小単位圧縮器において圧縮が可能である場合に、 全ての小単位 圧縮器の出力を結合して圧縮データとして出力することを特徴とするものである また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮解除器は、 小単位 の圧縮データの圧縮解除を行う複数の小単位圧縮解除器を備え、 前記圧縮データ を小単位に分割し、 複数の小単位圧縮解除器の出力を結合して出力することを特 徴とするものである。
このような構成によれば、 小さい圧縮器および圧縮解除器は一般的に高速であ るため、 長いデータを小単位に分割することにより高速に圧縮および圧縮解除を 行うことができる。
ここで、 小単位で圧縮を行う圧縮器と圧縮解除器について説明する。 最近のキ ャッシュ装置では、 書き込みデータをバースト転送により受け取るためや、 フラ グゃタグの相対的な量を減らすために、 一つのラインに複数の語をまとめて納め る方式が多く見られる。 ここでバースト転送とは、 小単位のデータが連続して圧 縮キャッシュ装置に入力されることである。 この場合、 非圧縮データの圧縮は小 単位、 例えば語単位で行うように構成することができる。
第 6図は、 複数の小単位圧縮器を備えた圧縮器と複数の小単位圧縮解除器を備 えた圧縮解除器の構成の一例を示すブロック図である。 まず、 第 6図 (a) の圧 縮器 103について説明する。 圧縮器 103は、 小単位圧縮器 131 a, 131 b, 1 31 c, 131 dと、 AND演算器 1 32から構成される。 まず、 圧縮器 103において、 非圧縮データは例えば分配器等を用いて 4語に分割されて、 そ れぞれ小単位圧縮器 131 a, 1 31 b, 1 31 c, 131 dへ入力される。 小 単位圧縮器 131 a, 131 b, 131 c, 131 dは、 小単位の非圧縮データ の圧縮を行い、 小単位の圧縮データを出力するとともに、 圧縮可能信号を AND 演算器 132へ出力する。 小単位圧縮器 131 a, 131 b, 131 c, 131 dの出力は例えば結合器等を用いて結合され、 外部へ圧縮データとして出力され る。 AND演算器 132は、 小単位圧縮器 131 a, 131 b, 131 c, 13 1 dから出力される圧縮可能信号の AND演算を行い、 その結果を圧縮器全体の 圧縮可能信号として書き込みライン指定器 3 aへ出力することができる。
次に、 第 6図 (b) の圧縮解除器 203について説明する。 圧縮解除器 203 は、 小単位圧縮解除器 23 1 a, 23 1 b, 23 1 c, 23 I dから構成される 。 圧縮解除器 203において、 圧縮データは例えば分配器等を用いて 4語に分割 されて、 それぞれ小単位圧縮解除器 23 1 a, 23 1 b, 23 1 c, 23 1 dへ 入力される。 小単位圧縮解除器 23 1 a, 2 3 1 b, 23 1 c, 23 1 dは、 入 力された小単位の圧縮データの圧縮解除を行い、 その結果を小単位の非圧縮デー タとして出力する。 小単位圧縮解除器 23 1 a, 23 1 b, 2 3 1 c, 2 3 1 d の出力は例えば結合器等を用いて結合され、 非圧縮データとして外部へ出力され る。 以上が、 小単位で圧縮を行う圧縮器と圧縮解除器の動作である。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮器は、 小単位の入 力データの圧縮を行う 1つの小単位圧縮器を備え、 小単位圧縮器の出力を格納し 、 格納した前記小単位圧縮器の出力を結合して圧縮データとして出力することを 特徴とするものである。
このような構成によれば、 圧縮器が小単位圧縮器 1つの規模で済むため、 ハ一 ドウエア量を削減できる。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮解除器は、 小単位 の圧縮データの圧縮解除を行う 1つの小単位圧縮解除器を備え、 外部から指定さ れた小単位の圧縮データに対して、 前記小単位圧縮解除器を用いて圧縮解除を行 い出力することを特徴とするものである。
このような構成によれば、 圧縮解除器が小単位圧縮解除器 1つの規模で済むた め、 ハードウェア量を削減できる。 また、 ラインにおけるデータの一部だけを参 照する場合に読み込みを高速化することができる。
ここで、 圧縮器を 1つの小単位圧縮器で構成する例について第 7図を用いて説 明する。 第 7図 (a) は、 語保持装置をキャッシュ装置の外に備えた従来のキヤ ッシュ装置を示す。 第 7図 (a) に示す語保持装置 70は、 語切替え器 1 43と バッファ 144から構成される。 まず、 バース ト転送されたデータと外部から入 力された語指示は語切替え器 143へ入力される。 語切替え器 143は、 語指示 に従って、 バース ト転送されたデータを順次バッファ 144へ格納する。 バッフ ァ 1 4 4は、 バースト転送されたデータを格納した後、 格納したデータを書き込 みデータとしてキャッシュ装置へ出力する。
上述したように、 語保持装置を圧縮キヤッシュ装置の外に備えて構成すること もできるが、 第 7図 (b ) に示す圧縮器 1 0 4のように、 語保持装置を圧縮器の 内部に備えて構成することもできる。 圧縮器 1 0 4は、 小単位圧縮器 1 4 1と、 全ての小単位で圧縮可能であった場合を判定する判定器 1 4 2と、 語切替え器 1 4 3とバッファ 1 4 4とから構成される。 まず、 バースト転送されたデータは小 単位圧縮器 1 4 1へ入力され、 外部から入力された語指示は語切替え器 1 4 3へ 入力される。 小単位圧縮器 1 4 1は、 バースト転送されたデータの圧縮を行い、 その結果を小単位の圧縮データとして語切替え器 1 4 3へ出力するとともに、 圧 縮可能信号を判定器 1 4 2へ出力する。 語切替え器 1 4 3は、 語指示に従って、 小単位の圧縮データを順次バッファ 1 4 4へ格納する。 ノ ッファ 1 4 4は、 小単 位の圧縮データを格納した後、 格納したデータを圧縮データとして書き込みデー タ作成器 4 aへ出力する。
一方、 判定器 1 4 2にはバースト開始信号が入力される。 判定器 1 4 2は、 バ ースト開始信号に従って、 バースト転送開始から終了までの全ての小単位で圧縮 可能であった場合のみ真の圧縮可能信号を出力する。 以上により、 圧縮器におけ る小単位圧縮器は一つで済ませることができる。
なお、 本発明の圧縮キャッシュ装置において、 非圧縮ラインの入力側に語保持 装置 7 0を備えることにより、 非圧縮ラインにおいてもバースト転送に対応する ことができる。
次に、 圧縮解除器を 1つの小単位圧縮解除器で構成する例について第 8図と第 9図を用いて説明する。 読み込みデータが複数の語単位で構成され、 アドレスの 一部を語指定として扱うような場合、 語選択器をライン選択器 2の前段に置くこ とにより、 圧縮解除器は 1つの小単位圧縮解除器で構成することができる。 第 8 図は、 本発明の圧縮キヤッシュ装置において語選択器を備えた構成の一例を示す ブロック図である。 第 8図に示す圧縮キャッシュ装置は、 第 1図の圧縮キヤッシ ュ装置の基本構成例における圧縮器 1 0の代わりに圧縮器 1 0 dを備え、 圧縮解 除器 2 0の代わりに圧縮解除器 2 0 dを備え、 さらに語選択器 6 0を備える。 ここで圧縮器 1 0 dは、 例えば第 6図 ( a ) の圧縮器 1 0 3で構成され、 語単 位で非圧縮データの圧縮を行う。 圧縮ラインのデータは複数の語単位で構成され 、 同様に非圧縮ラインのデータも複数の語単位で構成される。 一方、 アドレスの 一部は語指定として使用され、 語指定により指定された語は、 語選択信号として 語選択器 6 0と圧縮解除器 2 0 dへ出力される。 語選択器 6 0は、 語選択信号に 従って非圧縮ラインにおける非圧縮データのうち選択された語をライン選択器 2 へ出力する。
次に、 圧縮解除器 2 0 dについて第 9図を用いて説明する。 第 9図は、 1つの 小単位圧縮解除器を備えた圧縮解除器の構成の一例を示すプロック図である。 第 9図に示す圧縮角军除器 2 0 4は、 語選択器 2 4 1と小単位圧縮解除器 2 4 2力 ら 構成される。 圧縮解除器 2 0 4において、 圧縮データは例えば分配器等を用いて 4語に分割され、 語選択器 2 4 1へ入力される。 また、 語選択信号は語選択器 2 4 1へ入力される。 語選択器 2 4 1は、 語選択信号に従って小単位の圧縮データ を選択し、 その結果を小単位圧縮解除器 2 4 2へ出力する。 小単位圧縮解除器 2 4 2は、 語選択器 2 4 1から出力された小単位の圧縮データの圧縮解除を行い、 その結果を非圧縮データとしてライン選択器 2へ出力する。 以上により、 圧縮解 除器における小単位圧縮解除器は一つで済ませることができる。
また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮器は、 小単位の入 力データの圧縮を行う複数の小単位圧縮器を備え、 前記入力データを小単位に分 割し、 全ての前記小単位圧縮器のうち、 高々 1つの小単位圧縮器の圧縮が不可能 である場合に、 圧縮が可能である小単位圧縮器の出力と小単位の圧縮されていな いデータとを結合して圧縮データとして出力することを特徴とするものである。 また、 本発明に係る圧縮キャッシュ装置において、 前記圧縮解除器は、 小単位 の圧縮データの圧縮解除を行う複数の小単位圧縮解除器を備え、 前記圧縮データ を小単位に分割し、 複数の前記小単位圧縮解除器の出力と小単位の圧縮されてい ないデータとを結合して出力することを特徴とするものである。
このような構成によれば、 一部のデータで圧縮不能であることを許容する構成 をとることで、 圧縮不能信号が出る頻度を下げることができ、 その結果圧縮ライ ンの使用頻度を上げることができる。 また、 本発明に係る圧縮キャッシュ装置において、 前記小単位圧縮器は、 所定 の頻度で出現するデータのみを圧縮することを特徴とするものである。
また、 本発明に係る圧縮キャッシュ装置において、 前記小単位圧縮器と前記小 単位圧縮解除器は、 前記所定の頻度で出現するデータの対応付けを行う第 2頻度 データ表を用いることを特徴とするものである。 なお、 第 2頻度データ表は上述 した高頻度データ表に相当する。
このような構成によれば、 圧縮方法および圧縮解除方法が単純であるため、 余 分な時間をほとんど必要とせずに圧縮および圧縮解除を行うことができる。 ここで、 小単位での圧縮を行う場合に 1語の非圧縮データを許容する圧縮器に ついて説明する。 第 6図の構成では、 全ての小単位で圧縮が可能な時のみ圧縮可 能となるが、 それでは圧縮可能になるケースが少なくなって圧縮ラインの使用率 が下がる。 そこで、 小単位の 1語だけは圧縮不能でも圧縮ラインに入れられるよ う拡張することができる。 第 1 0図は、 1語の非圧縮データを許容する圧縮器と 圧縮解除器の構成、 及び拡張小単位圧縮器と拡張小単位圧縮解除器の一例を示す ブロック図である。
まず、 第 1 0図 (a) の圧縮器について説明する。 第 1 0図 (a) に示す圧縮 器 1 05は、 拡張小単位圧縮器 1 5 1 a, 1 5 1 b, 1 5 1 c, 1 5 1 dと、 判 定器 (高々一つしか 0がない場合を判定する) 1 52と、 ビット反転器 1 53 a , 1 5 3 b, 1 53 c, 1 53 dと、 選択器 1 54から構成される。 まず、 圧縮 器 1 05において、 非圧縮データは例えば分配器等を用いて 4語に分割されて、 それぞれ拡張小単位圧縮器 1 5 1 a, 1 5 1 b, 1 5 1 c, 1 5 1 dと選択器 1 54へ入力される。
ここで、 拡張小単位圧縮器について第 1 0図 (b) を用いて説明する。 第 1 0 図 ) に示す拡張小単位圧縮器 1 5 1は、 小単位圧縮器 1 5 1 1と、 語選択器 1 5 1 2と、 データ出力器 1 5 1 3から構成される。 まず、 小単位圧縮器 1 5 1 1は、 小単位の非圧縮データの圧縮を行い、 圧縮可能信号を判定器 1 52と語選 択器 1 5 1 2へ出力するとともに、 小単位の圧縮データを語選択器 1 5 1 2へ出 力する。 語選択器 1 5 1 2は、 入力された圧縮可能信号が真であれば小単位圧縮 器 1 5 1 1の出力を選択し、 入力された圧縮可能信号が偽であればデータ出力器 1 5 1 3の出力を選択し、 その結果を圧縮データとして出力する。 ここで、 小単 位圧縮器が、 例えば 0〜 254の 255種類の値に非圧縮データを圧縮できると き、 0〜 2 54までは圧縮語、 非圧縮語を示す圧縮データとして 255を使うこ とができる。 すなわち、 小単位圧縮器 1 5 1で圧縮できなかった場合、 偽の圧縮 可能信号を出力すると同時に、 非圧縮を示すデータ、 例えば 25 5を圧縮データ として出力する。
圧縮器 1 05において、 判定器 1 52は、 拡張小単位圧縮器 1 5 1 a, 1 5 1 b, 1 5 1 c, 1 5 1 dから得られた圧縮可能信号を集め、 全てが真であるか、 高々一つしか偽がないときに限って圧縮器 105の圧縮可能信号を真とし、 それ 以外では偽を出力する。 また、 拡張小単位圧縮器 1 5 1 a, 1 5 1 b, 1 5 1 c , 1 5 1 dから出力される圧縮可能信号は、 それぞれビット反転器 1 53 a, 1 53 b, 1 53 c, 1 53 dでビット反転された後、 選択器 1 54へ出力される 。 選択器 1 54は、 入力された小単位の非圧縮データのうち、 ビット反転器の出 力が真である小単位に対応する非圧縮データを選択し、 非圧縮語として出力する
。 拡張小単位圧縮器 1 5 1 a, 1 5 1 b, 1 5 1 c, 1 5 1 dの出力と非圧縮語 は、 例えば結合器等を用いて結合され、 圧縮データとして書き込みデータ作成器 4 aへ出力される。 これにより、 圧縮器 1 05に対応する圧縮ラインは 1語の非 圧縮語を許容することができる。
次に、 第 1 0図 (c) の圧縮解除器について説明する。 第 1 0図 (c) に示す 圧縮解除器 205は、 拡張小単位圧縮解除器 25 1 a, 25 1 b, 25 1 c, 2 5 1 dから構成される。 圧縮解除器 205において、 圧縮データは例えば分配器 等を用いて 4語に分割されて、 それぞれ小単位圧縮解除器 25 1 a, 25 1 b, 25 1 c, 25 1 dへ入力される。 また、 圧縮データのうち非圧縮語は全ての小 単位圧縮解除器 2 5 1 a, 25 1 b, 25 1 c, 25 I dへ入力される。
ここで、 拡張小単位圧縮解除器について第 1 0図 (d) を用いて説明する。 第 1 0図 (d) に示す拡張小単位圧縮解除器 25 1は、 データ出力器 25 1 2と、 比較器 25 1 3と、 語選択器 25 14力 ら構成される。 分割された圧縮データは 、 小単位圧縮解除器 25 1 1と比較器 25 1 3へ入力される。 また、 非圧縮語は 語選択器 25 1 4へ入力される。 小単位圧縮解除器 25 1 1は、 小単位の圧縮デ ータの圧縮解除を行い、 その結果を語選択器 1 5 1 2へ出力する。 一方、 比較器 2 5 1 3は、 データ出力器 2 5 1 2から出力される圧縮データと分割された圧縮 データとの比較を行い、 比較した結果が等しい場合に真を、 等しくない場合に偽 を、 語選択器 2 5 1 4へ出力する。 語選択器 2 5 1 4は、 比較器 2 5 1 3の出力 が真であれば非圧縮語を選択し、 比較器 2 5 1 3の出力が偽であれば小単位圧縮 器 2 5 1 1の出力を選択し、 その結果を非圧縮データとして出力する。
圧縮解除器 2 0 5において、 小単位圧縮解除器 2 5 1 a , 2 5 1 b , 2 5 1 c , 2 5 1 dの出力は例えば結合器等を用いて結合され、 非圧縮データとしてライ ン選択器 2へ出力される。 以上により、 小単位での圧縮を行う場合に 1語の非圧 縮データを許容することができる。 図面の簡単な説明
第 1図は、 本発明の圧縮キャッシュ装置の基本構成を示すプロック図である。 第 2図は、 本発明の圧縮キャッシュ装置における書き込みライン指定器と書き 込みデータ作成器の構成の一例を示すプロック図である。
第 3図は、 本発明の圧縮キャッシュ装置において圧縮ライン毎に圧縮器と圧縮 解除器を備えた構成例を示すプロック図である。
第 4図は、 本発明の圧縮キヤッシュ装置において複数の圧縮ラインに対して 1 つの圧縮器と 1つの圧縮解除器を備えた構成例を示すプロック図である。
第 5図は、 高頻度データ表を備えた圧縮器と圧縮解除器の構成の一例を示すブ 口ック図である。
第 6図は、 複数の小単位圧縮器を備えた圧縮器と複数の小単位圧縮解除器を備 えた圧縮解除器の構成の一例を示すプロック図である。
第 7図は、 1つの小単位圧縮器を備えた圧縮器の構成の一例を示すプロック図 である。
第 8図は、 本発明の圧縮キャッシュ装置において語選択器を備えた構成の一例 を示すブロック図である。
第 9図は、 1つの小単位圧縮解除器を備えた圧縮解除器の構成の一例を示すブ 口ック図である。 第 1 0図は、 1語の非圧縮データを許容する圧縮器と圧縮解除器の構成、 及び 拡張小単位圧縮器と拡張小単位圧縮解除器の一例を示すブロック図である。 第 1 1図は、 実施の形態 1における圧縮キャッシュ装置の構成を示すブロック 図である。
第 1 2図は、 実施の形態 1における圧縮キャッシュ装置で用いる圧縮解除器の 構成の一例を示すブロック図である。
第 1 3図は、 実施の形態 2における圧縮キヤッシュ装置の構成を示すプロック 図である。
第 1 4図は、 実施の形態 2における圧縮キャッシュ装置で用いる圧縮器の構成 の一例を示すブロック図である。
第 1 5図は、 従来のキャッシュ装置の構成の一例を示すブロック図である。 第 1 6図は、 従来のキャッシュ装置における読み込みライン指定器とライン選 択器の構成の一例を示すプロック図である。
第 1 7図は、 従来のキャッシュ装置における書き込みライン指定器と書き込み データ作成器の構成の一例を示すプロック図である。 発明を実施するための最良の形態
以下、 本発明の実施の形態を図を用いて詳細に説明する。
実施の形態 1 .
第 1 1図は、 実施の形態 1における本発明の圧縮キャッシュ装置の構成を示す ブロック図である。 第 1 1図に示す圧縮キャッシュ装置は、 圧縮器 1 0 eと、 圧 縮解除器 2 0 eと、 圧縮ライン選択器 5 0と、 語選択器 6 0 a , 6 0 bと、 2ラ インの非圧縮ライン 3 0 a, 3 0 bと 2ラインの圧縮ライン 4 0 a , 4 O bと、 ラインから得られたデータを選択して出力するための読み込みライン指定器 1と ライン選択器 2、 また、 書き込み時にラインを選択するための書き込みライン指 定器 3 aと書き込みデータ作成器 4 aから構成される。 全ての圧縮ラインは 1語 の非圧縮語を許容する。 本実施の形態では、 バースト転送は使用せず、 語指定を 使用する。
圧縮器 1 0 eは、 圧縮ライン 4 0 a, 4 0 bに対して同じ圧縮方法を使用する 。 圧縮器 10 eは第 10図 (a) の圧縮器 105で構成される。 拡張小単位圧縮 器 151 a, 151 b, 151 c, 151 dで用いる小単位圧縮器には第 5図 ( b) の圧縮器 102を用いる。 小単位圧縮器は、 高頻度データ表を用いて、 32 b i tの高頻度データパターン 51 1語であれば 9 b i tの圧縮データとして出 力する。 圧縮データは 0〜51 1で表され、 このうち 0〜510は圧縮語を表し 、 51 1は非圧縮語を表す圧縮データとする。 従って、 1つの小単位圧縮器は ( 32 b i t入力 * 51 1語) + O b i t出力 * 51 1語) の P LAで実装され 、 圧縮器全体の P L Aの規模は、 1つの拡張小単位圧縮器 * 4個 = 82 k b i t となる。
圧縮解除器 20 eは、 第 12図に示す圧縮解除器 206で構成される。 圧縮解 除器 206は、 語選択器 241と拡張小単位圧縮解除器 251で構成される。 こ の構成は、 第 9図の圧縮解除器 204における小単位圧縮解除器 242の代わり に第 10図 (d) の拡張小単位圧縮解除器 251を備えたものである。 拡張小単 位圧縮解除器 251で用いる小単位圧縮解除器には第 5図 (c) の圧縮解除器 2 01を用いる。 小単位圧縮解除器は 51 1語 * 32 b i t = 16 k b i tの RO Mで構成される。
圧縮ライン選択器 50は、 読み込みライン指定器 1から出力されるライン指定 の指示に従って、 該当する圧縮ラインを圧縮ライン 40 a, 4 O bから選択し、 選択した圧縮ラインの圧縮データを圧縮解除器 20 eへ出力する。
圧縮解除器 20 eは、 語選択信号に従って、 圧縮データのうち選択された語の 圧縮解除を行い、 その結果を非圧縮データとしてライン選択器 2へ出力する。 語 選択器 60 aは、 語選択信号に従って、 非圧縮ライン 30 aにおける非圧縮デー タのうち選択された語をライン選択器 2へ出力する。 同様に、 語選択器 6 O bは 、 語選択信号に従って、 非圧縮ライン 30 bにおける非圧縮データのうち選択さ れた語をライン選択器 2へ出力する。
なお、 非圧縮ラインと圧縮ラインのフラグ部分は有効フラグのみの 1 b i tを 使うものとする。 書き込みライン指定器 3 aは第 2図の構成と同様であり、 圧縮 可能信号が真の圧縮ラインを優先して選択し、 圧縮可能信号が真の圧縮ラインが なければ非圧縮ラインを選択する。 本実施の形態では、 アドレスは、 タグ 1 3 b i t、 インデックス 15 b i t、 語指定 2 b i t、 バイト指定 2 b i tから構成される。 非圧縮ラインと圧縮ライ ンのデータ部は 4語で構成され、 1語は 32 b i t (4 b y t e) とする。 また 、 圧縮ラインは 1語の非圧縮語を許容する。 見かけのキャッシュ容量は、 インデ ックス 32 k個 * 32 b i t *4語 *4ライン =16Mb i tとなる。
実現に必要な実装メモリ量は、 非圧縮ラインが (フラグ 1 b i t +タグ 1 3 b i t+データ 128 b i t) *インデックス 32 k個 =4. 4Mb i t , 圧縮ラ ィンが (圧縮語 (フラグ 1 b i t +タグ 13 b i t +データ 9 b i t ) * 4語 + 非圧縮語 32 b i t) *インデックス 32 k個 =2. 6Mb i tとなり、 合計は 4. 4Mb i t * 2つの非圧縮ライン + 2. 6 M b i t * 2つの圧縮ライン = 1 4. OMb i tとなる。 すなわち本実施の形態における構成の場合、 本来必要な キャッシュ容量 4. 4Mb i t * 4つの非圧縮ライン = 1 7. 6Mb i tと比べ て約 82 %の実装メモリ量で同じ見かけのキヤッシュ容量を実現できることにな る。 実施の形態 2.
第 1 3図は、 実施の形態 2における本発明の圧縮キャッシュ装置の構成を示す ブロック図である。 第 13図に示す圧縮キャッシュ装置は、 第 1 1図に示した圧 縮キャッシュ装置における圧縮器 10 eの代わりに 2つの圧縮器 10 a, 10 b を備え、 圧縮解除器 20 eの代わりに 2つの圧縮解除器 20 a, 20 bを備え、 圧縮ライン選択器 50の代わりに 2つの圧縮ライン選択器 50 a, 50 bを備え 、 2つの語選択器 60 a, 60 bの代わりに語選択器 60を備える。 さらに、 非 圧縮ライン用に語保持装置 70を備え、 非圧縮ラインを選択する非圧縮ライン選 択器 80を備える。
本実施の形態では、 非圧縮ライン 30と圧縮ライン 40 aと圧縮ライン 40 b は、 それぞれ 2ラインずつ備える。 圧縮器 10 aは汎用の圧縮器であり、 圧縮ラ イン 40 aは汎用の圧縮ラインとする。 また、 圧縮器 10 bは浮動小数用の圧縮 器であり、 圧縮ライン 40 bは浮動小数用の圧縮ラインとする。 全ての圧縮ライ ンは 1語の非圧縮語を許容する。 また、 本実施の形態では、 バースト転送を使用 し、 語指定を使用する。
圧縮器 1 0 a , 1 0 bは、 第 1 4図に示す圧縮器 1 0 6で構成される。 第 1 4 図に示す圧縮器 1 0 6は、 拡張小単位圧縮器 1 5 1と、 判定器 1 4 2 aと、 ビッ ト反転器 1 5 3と、 選択器 1 5 4 aと、 語切替え器 1 4 3と、 バッファ 1 4 4か ら構成される。 この構成は、 第 7図の圧縮器 1 0 4において、 小単位圧縮器 1 4 Ϊの代わりに第 1 0図 ( b ) の拡張小単位圧縮器 1 5 1を備え、 判定器 1 4 2の 代わりに判定器 1 4 2 aを備え、 さらに第 1 0図 (a ) のビッ ト反転器 1 5 3と 、 第 1 0図 (a ) の選択器 1 5 4に代わる選択器 1 5 4 aを備える。 判定器 1 4 2 aは、 バースト転送開始から終了までの全ての圧縮可能信号のうち、 高々一つ し力偽がないときに限って圧縮器 1 0 5の圧縮可能信号を真とし、 それ以外では 偽を出力する。 また、 選択器 1 5 4 aは、 入力された小単位の非圧縮データに対 応するビット反転器の出力が真であれば、 入力された小単位の非圧縮データを非 圧縮語として出力する。 バッファ 1 4 4の出力と非圧縮語は、 例えば結合器等を 用いて結合され、 圧縮データとして書き込みデータ作成器 4 aへ出力される。 圧縮解除器 2 0 a , 2 0 bはそれぞれ、 実施の形態 1で説明した圧縮解除器 2 0 6で構成される。
圧縮ライン選択器 5 0 aは、 読み込みライン指定器 1から出力されるライン指 定の指示に従って、 該当する圧縮ラインを 2つの圧縮ライン 4 0 aから選択し、 選択した圧縮ラインの圧縮データを圧縮解除器 2 0 aへ出力する。 同様に、 圧縮 ライン選択器 5 0 bは、 読み込みライシ指定器 1から出力されるライン指定の指 示に従って、 該当する圧縮ラインを 2つの圧縮ライン 4 0 bから選択し、 選択し た圧縮ラインの圧縮データを圧縮解除器 2 0 bへ出力する。 また、 非圧縮ライン 選択器 8 0は、 読み込みラィン指定器 1から出力されるライン指定の指示に従つ て、 該当する非圧縮ラインを 2つの非圧縮ライン 3 0から選択し、 選択した非圧 縮ラインの非圧縮データを語選択器 6 0へ出力する。
圧縮解除器 2 0 a , 2 0 bは、 語選択信号に従って、 圧縮データのうち選択さ れた語の圧縮解除を行い、 その結果を非圧縮データとしてライン選択器 2へ出力 する。 語選択器 6 0は、 語選択信号に従って、 非圧縮データのうち選択された語 をライン選択器 2へ出力する。 なお、 非圧縮ラインと圧縮ラインのフラグ部分は有効フラグと最近不使用フラ グの 2 b i tを使うものとする。 書き込みライン指定器 3 aは第 2図の構成と同 様であり、 圧縮可能信号が真の圧縮ラインを優先して選択し、 圧縮可能信号が真 の圧縮ラインがなければ非圧縮ラインを選択する。
本実施の形態では、 ァドレスは、 タグ 13 b i t;、 インデックス 15 b i t、 語指定 2 b i t、 バイ ト指定 2 b i tから構成される。 非圧縮ラインと圧縮ライ ンのデータ部は 4語で構成され、 1語は 32 b i t (4 b y t e) とする。 また 、 圧縮ラインは 1語の非圧縮語を許容する。 見かけのキャッシュ容量は、 インデ ックス 32 k個 * 32 k b i t *4語 *4ライン =16Mb i tとなる。
実現に必要な実装メモリ量は、 非圧縮ラインが (フラグ 2 b i t +タグ 13 b i t +データ 128 b i t) *インデックス 32 k個 =4. 6 Mb i t、 圧縮ラ ィンが (圧縮語 (フラグ 2 b i t +タグ 13 b i t +データ 9 b i t ) * 4語 + 非圧縮語 32 b i t) *インデックス 32 k個 = 2. 6Mb i tとなり、 合計は 、 4. 6Mb i t * 2つの非圧縮ライン + 2. 6Mb i t * 4つの圧縮ライン = 19. 3Mb i tとなる。 すなわち本実施の形態における構成の場合、 4つの非 圧縮ラインのメモリ 18. 4Mb i tとほとんど等しい実装メモリ量で、 見かけ のキャッシュ容量は 1. 5倍を実現することができる。
以上、 実施の形態 1と 2において、 本発明について特に好適実施例を参照して 説明したが、 上述した圧縮キャッシュ装置の構成と動作は、 本発明を実現するた めの一例であり、 特許請求の範囲によってのみ制限される本発明の趣旨と範囲か ら逸脱することなく、 形式、 詳細の面で他の変更が可能であることは言うまでも なレ、。 例えば、 圧縮方法をランレングス方式に変えた場合、 単に圧縮器と圧縮解 除器の構成を、 ランレングスを計算して出力する実装と置き換えるだけで良い。 産業上の利用の可能性
以上説明したように、 本発明によれば、 圧縮キャッシュ装置により保持すべき データが減るため、 少ないハードウェア量で同じキヤッシュ容量を実装すること ができる。 また、 従来のキャッシュ装置と同じ入出力しか必要としないため、 従 来のキャッシュ装置を用いていた C P Uなどの装置で、 変更なしに本装置を用レヽ ることができる。
以下、 具体的に数値を挙げて説明する。 例えば、 1語は 32 b i tとし、 イン デッタス 4 k個、 1ラインが 4語からなる、 4ラインの圧縮キャッシュ装置が構 成される場合、 データ部の b i t数は従来のキャッシュ装置では、 インデックス 4 k個 * 32 b i t * 4語 * 4ライン = 2Mb i t必要である。 これに対し、 3 ラインを圧縮ラインとして構成し、 各語が 512個の高頻度データ表に該当する 場合に圧縮可能とする圧縮キャッシュ装置として構成した場合、 非圧縮ラインに 必要な b i t数は、 インデックス 4 k個 * 32 b i t * 4語 * 1ライン =512 k b i tとなり、 圧縮ラインに必要な b i t数は、 インデックス 4 k個 * 8 b i t * 4語 * 3ライン = 384 k b i tとなるので、 合計は、 512 k b i t + 3 84 k b i t = 896 k b i tとなる。 すなわち、 約 21 %の実装メモリ量で同 じキヤッシュ容量を実装することができる。
また、 一部のデータで圧縮不能であることを許容する構成をとることで、 圧縮 不能信号が出る頻度を下げることができる。 例えば、 平均 20%の語が圧縮不能 であるとする。 4語からなる圧縮ラインで、 各語の圧縮不能を許容しない場合は 、 圧縮可能な確率は (1— 20%) 4 = 41 %、 圧縮不能な確率は 59 %となる 。 しかし、 1語が圧縮不能でも許容する場合、 圧縮可能な確率は (1— 20%) 3 = 51 %、 圧縮不能な確率は 49 %となり、 圧縮不能な確率を 10 %減らすこ とができる。 結果として、 圧縮ラインの使用頻度を上げることができる。

Claims

請 求 の 範 囲
1 . 外部の入力データを必要に応じて圧縮してラインへ書き込みを行い、 ラインからデータの読み込みを行って必要に応じて圧縮解除してデータを外部へ 出力する圧縮キヤッシュ装置であって、
入力データの圧縮が可能である場合に入力データの圧縮を行い、 その結果を圧 縮データとして出力する少なくとも 1つの圧縮器と、
圧縮データの圧縮解除を行う少なくとも 1つの圧縮解除器と、
圧縮データを格納するラインである少なくとも 1つの圧縮ラインと、 入力データを格納するラインである少なくとも 1つの非圧縮ラインと、 データの書き込みを行うラインを予め定められた条件に従って選択する書き込 みデータ選択手段と、
データの読み込みを行うラインを予め定められた条件に従って選択する読み込 みデータ選択手段と、
を備えたことを特徴とする圧縮キヤッシュ装置。
2 . 請求の範囲第 1項に記載の圧縮キヤッシュ装置において、
予め定められた条件に合致した複数のラインが存在する場合、 前記書き込みデ —タ選択手段は、 複数のラインからランダムに選択することを特徴とする圧縮キ ャッシュ装置。
3 . 請求の範囲第 1項に記載の圧縮キヤッシュ装置において、
前記圧縮器に入力されたデ一タの圧縮が可能である場合、 前記書き込みデータ 選択手段は、 前記圧縮ラインを優先して選択することを特徴とする圧縮キヤッシ
4 . 請求の範囲第 1項に記載の圧縮キヤッシュ装置において、
複数の前記圧縮器に入力されたデ一タの圧縮が可能である場合、 前記書き込み データ選択手段は、 圧縮ラインの非使用状態に基づいて圧縮ラインを選択するこ とを特徴とする圧縮キャッシュ装置。
5 . 請求の範囲第 4項に記載の圧縮キャッシュ装置にぉレ、て、
前記書き込みデータ選択手段は、 非使用状態が少なくとも所定の時間にわたり 継続している圧縮ライン、 又は非使用状態が最も長レ、時間にわたり継続している 圧縮ラインを選択することを特徴とする圧縮キャッシュ装置。
6 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
前記書き込みデータ選択手段は、 近似 L R U法、 ランダムに選択するランダム 法、 または F I F〇法のいずれかを用いて圧縮ラインを選択することを特徴とす る圧縮キャッシュ装置。
7 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
前記圧縮ライン毎に前記圧縮器と前記圧縮解除器を備えたことを特徴とする圧 縮キャッシュ装置。
8 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
各々の前記圧縮器は異なる圧縮方法を用い、 各々の前記圧縮解除器は前記圧縮 方法に対応する圧縮解除方法を用いることを特徴とする圧縮キヤッシュ装置
9 . 請求の範囲第 1項に記載の圧縮キヤッシュ装置において、
複数の前記圧縮ラインに対して 1つの前記圧縮器と 1つの前記圧縮解除器を備 えたことを特徴とする圧縮キャッシュ装置。
1 0 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
複数の前記圧縮ラインに対して 1つの前記圧縮器を備えたことを特徴とする圧 縮キャッシュ装置。
1 1 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、 複数の前記圧縮ラインに対して 1つの前記圧縮解除器を備えたことを特徴とす る圧縮キャッシュ装置。
1 2 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
前記圧縮器は、 所定の頻度で出現するデータのみを圧縮することを特徴とする 圧縮キャッシュ装置。
1 3 . 請求の範囲第 1 2項に記載の圧縮キャッシュ装置において、
前記圧縮器と圧縮解除器は、 前記所定の頻度で出現するデータの対応付けを行 う第 1頻度データ表を用いることを特徴とする圧縮キヤッシュ装置。
1 4 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
前記圧縮器は、 小単位の入力データの圧縮を行う複数の小単位圧縮器を備え、 前記入力データを小単位に分割し、 全ての前記小単位圧縮器において圧縮が可能 である場合に、 全ての小単位圧縮器の出力を結合して圧縮データとして出力する ことを特徴とする圧縮キャッシュ装置。
1 5 . 請求の範囲第 1 4項に記載の圧縮キャッシュ装置において、
前記圧縮解除器は、 小単位の圧縮データの圧縮解除を行う複数の小単位圧縮解 除器を備え、 前記圧縮データを小単位に分割し、 複数の小単位圧縮解除器の出力 を結合して出力することを特徴とする圧縮キヤッシュ装置。
1 6 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
前記圧縮器は、 小単位の入力データの圧縮を行う 1つの小単位圧縮器を備え、 小単位圧縮器の出力を格納し、 格納した前記小単位圧縮器の出力を結合して圧縮 データとして出力することを特徴とする圧縮キャッシュ装置。
1 7 . 請求の範囲第 1 4項に記載の圧縮キャッシュ装置において、
前記圧縮解除器は、 小単位の圧縮データの圧縮解除を行う 1つの小単位圧縮解 除器を備え、 外部から指定された小単位の圧縮データに対して、 前記小単位圧縮 解除器を用いて圧縮解除を行い出力することを特徴とする圧縮キャッシュ装置。
1 8 . 請求の範囲第 1項に記載の圧縮キャッシュ装置において、
前記圧縮器は、 小単位の入力データの圧縮を行う複数の小単位圧縮器を備え、 前記入力データを小単位に分割し、 全ての前記小単位圧縮器のうち、 高々 1つの 小単位圧縮器の圧縮が不可能である場合に、 圧縮が可能である小単位圧縮器の出 力と圧縮が不可能である小単位圧縮器の入力とを結合して圧縮データとして出力 することを特徴とする圧縮キヤッシュ装置。
1 9 . 請求の範囲第 1 8項に記載の圧縮キャッシュ装置において、
前記圧縮解除器は、 小単位の圧縮データの圧縮解除を行う複数の小単位圧縮解 除器を備え、 前記圧縮データを小単位に分割し、 複数の前記小単位圧縮解除器の 出力と小単位の圧縮されていないデータとを結合して出力することを特徴とする 圧縮キャッシュ装置。
2 0 . 請求の範囲第 1 4項に記載の圧縮キャッシュ装置において、
前記小単位圧縮器は、 所定の頻度で出現するデータのみを圧縮することを特徴 とする圧縮キャッシュ装置。
2 1 . 請求の範囲第 2 0項に記載の圧縮キャッシュ装置において、
前記小単位圧縮器と前記小単位圧縮解除器は、 前記所定の頻度で出現するデー タの対応付けを行う第 2頻度データ表を用いることを特徴とする圧縮キャッシュ
PCT/JP2002/004844 2002-05-20 2002-05-20 Antémémoire de compression WO2003098440A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2002/004844 WO2003098440A1 (fr) 2002-05-20 2002-05-20 Antémémoire de compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2002/004844 WO2003098440A1 (fr) 2002-05-20 2002-05-20 Antémémoire de compression

Publications (1)

Publication Number Publication Date
WO2003098440A1 true WO2003098440A1 (fr) 2003-11-27

Family

ID=29434524

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2002/004844 WO2003098440A1 (fr) 2002-05-20 2002-05-20 Antémémoire de compression

Country Status (1)

Country Link
WO (1) WO2003098440A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0362144A (ja) * 1989-04-13 1991-03-18 Bull Sa 情報処理システムのメモリアクセスを速くする方法及びこの方法を実施するためのシステム
JPH08235062A (ja) * 1995-02-22 1996-09-13 Kofu Nippon Denki Kk キャッシュメモリ

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0362144A (ja) * 1989-04-13 1991-03-18 Bull Sa 情報処理システムのメモリアクセスを速くする方法及びこの方法を実施するためのシステム
JPH08235062A (ja) * 1995-02-22 1996-09-13 Kofu Nippon Denki Kk キャッシュメモリ

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Heneshi et al., translated by MURAKAMI et al., "Computer, Architecture Sekkei, Jitsugen, Hyoka no Teiryoteki Approach", Nikkei Business Publications, Inc., 25 December, 1992 (25.12.92), pages 408 to 423 *
YANG et al., "Frequent Value Compression in Data Caches" In: Proceedings of 33rd IEEE/ACM annual International Symposium on Microarchitecture, Monterey, CA, IEEE/ACM, 2000, pages 258 to 265 *
ZHANG et al., "Frequent Value Locality and Value-Centric Data Cache Design" In: Proceedings of the 9th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-IX), Cambridge, MA, ACM, 2000, pages 150 to 159 *

Similar Documents

Publication Publication Date Title
JP3309028B2 (ja) 連想記憶メモリ内の複数辞書管理を改良したlempel−zivデータ圧縮のための装置、及び方法
US5373290A (en) Apparatus and method for managing multiple dictionaries in content addressable memory based data compression
US5243341A (en) Lempel-Ziv compression scheme with enhanced adapation
US20080133855A1 (en) Memory and method for data compression and management
US5699539A (en) Virtual memory management system and method using data compression
JP2534465B2 (ja) デ―タ圧縮装置および方法
US5617552A (en) Lossless data compression system and method
JP3399520B2 (ja) 圧縮メイン・メモリの仮想非圧縮キャッシュ
US5237460A (en) Storage of compressed data on random access storage devices
JP5629392B2 (ja) 記憶装置アクセス・システム
US7447814B1 (en) Method and apparatus for fast loss-less memory data compression wherein data corresponds to a cache line of data in cache
US6744388B1 (en) Hardware-friendly general purpose data compression/decompression algorithm
US6349375B1 (en) Compression of data in read only storage and embedded systems
KR980010784A (ko) 압축된 데이터 캐쉬 저장 시스템
WO2007107457A1 (en) Memory compression in information handling systems
DE60336929D1 (de) Verfahren und gerät für komprimierte machinen mit "morphing"-speicher
JPH06152435A (ja) 可変長符号の伸長装置および圧縮伸長装置
JPH10508170A (ja) 連想メモリを使用するlzwデータ圧縮
JPH0795093A (ja) 順次データ圧縮アルゴリズムを実行する装置及び方法
Rizzo A very fast algorithm for RAM compression
US6158046A (en) Computer device and method for processing data utilizing pseudoinstruction words
US11210032B1 (en) Storage device and data processing method
WO2003098440A1 (fr) Antémémoire de compression
JP7390251B2 (ja) ストレージシステム
JP3781224B2 (ja) 半導体装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

NENP Non-entry into the national phase

Ref country code: JP