JPH1011360A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH1011360A
JPH1011360A JP8163246A JP16324696A JPH1011360A JP H1011360 A JPH1011360 A JP H1011360A JP 8163246 A JP8163246 A JP 8163246A JP 16324696 A JP16324696 A JP 16324696A JP H1011360 A JPH1011360 A JP H1011360A
Authority
JP
Japan
Prior art keywords
data
flag
line
bit
written
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP8163246A
Other languages
Japanese (ja)
Inventor
Kenju Osanai
建樹 小山内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP8163246A priority Critical patent/JPH1011360A/en
Publication of JPH1011360A publication Critical patent/JPH1011360A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To optmize access width regardless of an instruction when data including monotonous bit information is read and written and to save power consumption by setting the contents of the state flag of a flag possessing part to a new value at the time of refilling and also writing only a part of 0 and 1 mixing data within required data in a data storage part. SOLUTION: A tag possessing part 202 and the flag possessing part 1 are accessed concerning a selected tag and a state flag in order to designate an index and the contents of the state flag read from the flag possessing part 1 are transmitted to an encoder 6. Then, at the time of tag checking and hitting, the new state flag is written in an area which is designated by the applying index and writing is executed only to a cell which executes updating to data being 'whole are not 0 nor 1'. In the meantime, at the time of missing, an operation becomes the refilling one, refill data is stored in the latch of a latch circuit 20A with a 0-string/1-string restoring function and updating is processed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロプロセッ
サ等に搭載されるキャッシュメモリに関する。
The present invention relates to a cache memory mounted on a microprocessor or the like.

【0002】[0002]

【従来の技術】マイクロプロセッサに搭載されたキャッ
シュメモリは、CPUとメインメモリ(主記憶装置)と
の間に置かれ、アクセス頻度の高い情報をメインメモリ
から移してきて、プロセッサが行うメインメモリとの読
み書きを代行する高速の緩衝記憶装置として知られてい
る。
2. Description of the Related Art A cache memory mounted on a microprocessor is located between a CPU and a main memory (main storage device). The cache memory transfers frequently accessed information from the main memory to the main memory. It is known as a high-speed buffer storage device for reading and writing data.

【0003】このようなキャッシュメモリを、各ビット
に2本の相補的なビット線を持つ記憶手段、例えばスタ
テックRAM(以下、単にSRAMという)で構成した
場合を例にとって説明する。
An example will be described in which such a cache memory is constituted by storage means having two complementary bit lines for each bit, for example, a static RAM (hereinafter simply referred to as SRAM).

【0004】図6は、SRAMの1ビット分の構成例を
示す図であり、図7は、図6に示したSRAMの1ビッ
ト分の動作を示す波形図である。
FIG. 6 is a diagram showing a configuration example of one bit of the SRAM, and FIG. 7 is a waveform diagram showing an operation of one bit of the SRAM shown in FIG.

【0005】このSRAMでは、読み出し/書き込みの
いずれにおいても、まず、プリチャージ・アンド・イコ
ライズ・イネーブルPREが“L”レベルとなって、P
チャネルMOSトランジスタ(以下、P−MOSとい
う)101,102,103がオンとなり、ビット線B
it,Bitバーが電源電位Vccにプリチャージされ
る。この時、ワード線WDは“L”レベルとなってお
り、NチャネルMOSトランジスタ(以下、N−MOS
という)104,105はオフしており、フリップフロ
ップ106にはビット線Bit、Bitバーの電位は伝
わらない。
In this SRAM, in both reading and writing, first, the precharge and equalize enable PRE becomes "L" level,
The channel MOS transistors (hereinafter, referred to as P-MOS) 101, 102, and 103 are turned on, and the bit line B
It and Bit bars are precharged to the power supply potential Vcc. At this time, the word line WD is at the “L” level, and an N-channel MOS transistor (hereinafter referred to as an N-MOS
) 104 and 105 are off, and the potential of the bit lines Bit and Bit bar is not transmitted to the flip-flop 106.

【0006】次にイネーブルPREが“H”レベルとな
って、P−MOS101,102,103がオフし、ビ
ット線Bit,Bitバーは、電源電位Vccに保持さ
れたままとなる。このように、プリチャージ動作は読み
出し/書き込みのいずれの場合にも、必す行なわれる
(図7参照)。
Next, the enable PRE goes to "H" level, the P-MOSs 101, 102 and 103 are turned off, and the bit lines Bit and Bit bar are kept at the power supply potential Vcc. As described above, the precharge operation is inevitably performed in both read / write operations (see FIG. 7).

【0007】読み出しの時は、この後、ワード線WDが
“H”レベルとなってN−MOS104,105がオン
し、フリップフロップ106の電位がビット線Bit,
Bitバーへ伝えられる。この時、ビット線Bit,B
itバーの電位の変化は、読み出し手段(センスアン
プ)107により加速される。ビット線Bit,Bit
バーはフリップフロップ106の内容により、必ずいず
れか一方が“H”レベルで他方が“L”レベルとなる。
従って、ビット線Bit,Bitバーのいずれか一方
は、必ず“H”レベルから“L”レベルへの遷移を行
う。なお、図7に示す例では、ビット線Bit側が
“L”レベル、ビット線Bitバー側が“H”レベルで
ある場合を示している。
At the time of reading, thereafter, the word line WD goes to "H" level, the N-MOSs 104 and 105 are turned on, and the potential of the flip-flop 106 is set to the bit line Bit,
It is transmitted to the Bit bar. At this time, the bit lines Bit, B
The change in the potential of the it bar is accelerated by the reading means (sense amplifier) 107. Bit line Bit, Bit
Depending on the contents of the flip-flop 106, one of the bars is always at "H" level and the other is at "L" level.
Therefore, one of the bit lines Bit and Bit bar always transitions from the “H” level to the “L” level. Note that the example shown in FIG. 7 shows a case where the bit line Bit side is at “L” level and the bit line Bit bar side is at “H” level.

【0008】書き込みの時は、ビット線Bit,Bit
バーのプリチャージ後に(この時P−MOS101,1
02,103はオフ)、書き込み手段(ライトアンプ)
108によりビット線Bit,Bitバーに書き込まれ
るデータが供給される。この書き込みデータは、ビット
線Bit,Bitバーのうち、必ずいずれか一方が
“H”レベルで他方が“L”レベルである。次にワード
線WDが“H”レベルとなってN−MOS104,10
5がオンし、ビット線Bit,Bitバーに載ったデー
タがフリップフロップ106へ伝えられる。
At the time of writing, bit lines Bit, Bit
After the bar is precharged (at this time, the P-MOS 101, 1
02 and 103 are off), writing means (write amplifier)
108 supplies data to be written to the bit lines Bit and Bit bar. In the write data, one of the bit lines Bit and Bit bar is always at "H" level and the other is at "L" level. Next, the word line WD goes to “H” level, and the N-MOSs 104 and 10
5 is turned on, and the data on the bit lines Bit and Bit bar is transmitted to the flip-flop 106.

【0009】この時、ライトアンプ107により書き込
み加速が行われる。書き込みの時もやはり、ビット線の
うち必ず一方が“H”レベルから“L”レベルへの遷移
を行う。これはビット線Bit,Bitバーが相補的な
2本により構成されるためであり、データの内容には関
係がない。
At this time, write acceleration is performed by the write amplifier 107. Also at the time of writing, one of the bit lines always transitions from "H" level to "L" level. This is because the bit lines Bit and Bit bar are constituted by two complementary lines, and have no relation to the data contents.

【0010】以上、SRAMを例に説明したように、各
ビットが相補的な2本のビット線を有する記憶手段で
は、読み出し及び書き込みとも、アクセスされるビット
の2本のビット線のうち一方が“H”レベルから“L”
レベルへ遷移をすることになり、アクセスを行なった場
合に該当ビットのビット線の遷移を止めることができな
い。特に、通常は1本のビット線に多数のフリップフロ
ップが接続される構成をとるため、ビット線の負荷容量
は非常に大きいものとなる。従って、ビット線の遷移
は、大きな負荷容量の充放電を伴っており、このような
記憶手段からなるキャッシュメモリの電力を増大させる
一因となっている。
As described above, in the case of the SRAM, in the storage means in which each bit has two complementary bit lines, one of the two bit lines of the accessed bit is used for both reading and writing. From “H” level to “L”
Since the transition to the level is made, the transition of the bit line of the corresponding bit cannot be stopped when the access is performed. In particular, since a configuration in which many flip-flops are usually connected to one bit line is used, the load capacity of the bit line becomes very large. Therefore, the transition of the bit line is accompanied by charging / discharging of a large load capacity, which is one of the causes for increasing the power of the cache memory including such storage means.

【0011】図8は、従来のキャッシュメモリの一構成
例を示すブロック図である(第1の従来例)。
FIG. 8 is a block diagram showing a configuration example of a conventional cache memory (first conventional example).

【0012】このキャッシュメモリでは、アドレスがタ
グ部200a、インデックス部200b、及びオフセッ
ト部200cに分解されている。タグ部200aはメイ
ンメモリ中の位置を表し、インデックス部200bはラ
インの指定を、オフセット部200cはライン内のデー
タ位置を表す。インデックス部200bは、デコーダ2
01でデコードされ、タグ保有部202及びメモリセル
アレイ203の1ラインを指定する。
In this cache memory, addresses are decomposed into a tag section 200a, an index section 200b, and an offset section 200c. The tag section 200a indicates a position in the main memory, the index section 200b indicates designation of a line, and the offset section 200c indicates a data position within the line. The index unit 200b is a decoder 2
01, and designates one line of the tag holding unit 202 and the memory cell array 203.

【0013】読み出し時は一般に、選択されたセルアレ
イ203のラインにラインサイズの幅でアクセスし、読
み出されたデータはラッチ204に入る。オフセットは
デコーダ205にてデコードされ、マルチプレクサ(m
ux)206によって、ラッチ204内のデータのうち
オフセットが指定するデータを読み出し、ポート207
へ送る。また、タグは比較器208においてプログラム
指定のタグとキャッシュメモリ保有のタグとが比較さ
れ、ヒット/ミスの判定がなされる。一致の場合、ヒッ
トとして、ポート207からデータが外部バス209へ
出力される。
At the time of reading, generally, a line of the selected cell array 203 is accessed with a line size width, and the read data enters the latch 204. The offset is decoded by the decoder 205 and the multiplexer (m
ux) 206, reads out the data designated by the offset from the data in the latch 204,
Send to The tag is compared in the comparator 208 with the tag designated by the program and the tag held in the cache memory, and a hit / miss determination is made. If they match, data is output from the port 207 to the external bus 209 as a hit.

【0014】一方、書き込みの場合は、書き込みポート
207に入っているデータを、オフセットがデコーダ2
05を通じてコントロールするデマルチプレクサ(de
mux)206を経て、ラッチ204のうちのオフセッ
トが指定する領域に入れる。比較器208によるヒット
チェックでヒット判定の場合、ラッチ204のデータは
メモリセルアレイ203に書き込まれる。この時、ラッ
チ204にデータが入っていない部分に関しては、メモ
リセルアレイ203の該当ビットを書き込み禁止状態に
する制御を行なうため、書き込みポート207からラッ
チ204へ送られたデータのみがメモリセルアレイ20
3に書き込まれる。
On the other hand, in the case of writing, the data input to the write port 207 is transferred to the decoder 2 with the offset.
05 through the demultiplexer (de
mux) 206, and enters the area of the latch 204 specified by the offset. In the case of a hit determination by the hit check by the comparator 208, the data of the latch 204 is written to the memory cell array 203. At this time, for a portion where data is not stored in the latch 204, control is performed to set the corresponding bit of the memory cell array 203 to a write-inhibited state, so that only data sent from the write port 207 to the latch 204 is stored in the memory cell array 20.
3 is written.

【0015】比較器208によるヒットチェックでミス
判定の時は、リフィルに入る。リフィル時は、メインメ
モリからバス209及び書き込みポート207を通じて
ラッチ204にラインサイズ幅のデータが順次送られて
来る。ラッチ204にデータが揃ったら、メモリセルア
レイ203への書き込みを行なう。書き込み時にはバス
幅で、リフィル時にはラインサイズでアクセスが行なわ
れる。
When the hit check by the comparator 208 determines a miss, refilling is started. At the time of refilling, data of a line size width is sequentially sent from the main memory to the latch 204 via the bus 209 and the write port 207. When the data is stored in the latch 204, writing to the memory cell array 203 is performed. Access is performed with a bus width at the time of writing and with a line size at the time of refilling.

【0016】このように、上記キャッシュメモリの構成
では、読み出し時及びリフィル時にはラインサイズで一
律に、書き込み時にはバス幅単位で一律にメモリセルア
レイ203にアクセスしている。
As described above, in the configuration of the cache memory, the memory cell array 203 is accessed uniformly in the line size at the time of reading and refilling, and uniformly in the unit of the bus width at the time of writing.

【0017】これに対して、読み出し時、書き込み時及
びリフィル時において、共にバス幅でアクセスするキャ
ッシュメモリの一例を図9に示す(第2の従来例)。な
お、図8に示す上記キャッシュメモリが後述する実施の
形態に対応した従来構成であるのに対し、図9に示すも
のは、従来から一般的に知られた構成のキャッシュメモ
リである。
On the other hand, FIG. 9 shows an example of a cache memory which is accessed with a bus width at the time of reading, writing and refilling (second conventional example). Note that the cache memory shown in FIG. 8 has a conventional configuration corresponding to an embodiment to be described later, whereas that shown in FIG. 9 is a cache memory having a generally known configuration.

【0018】図9中の300a,300b,300c
は、図8中のタグ部200a、インデックス部200b
及びオフセット部200cにそれぞれ相当し、また、3
01は図8中のデコーダ201に、302はタグ保有部
202に、303はメモリセルアレイ203に、304
はデコーダ205、305はマルチプレクサ/デマルチ
プレクサ(mux/demux)206にそれぞれ相当
する構成要素である。
300a, 300b, 300c in FIG.
Are the tag section 200a and the index section 200b in FIG.
And the offset unit 200c, respectively.
8, reference numeral 01 denotes the decoder 201, reference numeral 302 denotes the tag holding unit 202, reference numeral 303 denotes the memory cell array 203, reference numeral 304
Are components corresponding to the decoders 205 and 305 and the multiplexer / demultiplexer (mux / demux) 206, respectively.

【0019】但し、デコーダ304は、図8のデコーダ
205と異なり、オフセットセレクト信号S200に相
当する信号S300を出力するだけでなく、オフセット
のデコード結果をメモリセルアレイ203へ供給する。
すなわち、デコーダ304によってオフセットがデコー
ドされて、メモリセルアレイ303中の指定位置を指す
ようになっている。
However, unlike the decoder 205 of FIG. 8, the decoder 304 not only outputs the signal S300 corresponding to the offset select signal S200, but also supplies the decoded result of the offset to the memory cell array 203.
That is, the offset is decoded by the decoder 304 to indicate a designated position in the memory cell array 303.

【0020】また、メモリセルアレイ303とマルチプ
レクサ/デマルチプレクサ305との間は、ラインサイ
ズではなくバス幅で接続され、図8のラッチ204に相
当する要素は除去されている。そして、マルチプレクサ
/デマルチプレクサ305は、センスアンプ307を介
してバス308に接続されると共に、ライトアンプ30
9を介してバス310に接続されている。このバス31
0には、データをメモリセルアレイ303へ供給するた
めのラッチ311が接続されている。
The memory cell array 303 and the multiplexer / demultiplexer 305 are connected not by a line size but by a bus width, and elements corresponding to the latch 204 in FIG. 8 are removed. The multiplexer / demultiplexer 305 is connected to the bus 308 via the sense amplifier 307, and
9 is connected to the bus 310. This bus 31
To 0, a latch 311 for supplying data to the memory cell array 303 is connected.

【0021】読み出し時においては、デコーダ304よ
り、オフセットのデコード結果がマルチプレクサ305
のみでなくメモリセルアレイ303にも供給され、ライ
ン中の読み出し位置(バス幅)が指定される。その結
果、その位置のみが活性化され、マルチプレクサ305
を通ってセンスアンプ307へ送られラッチされる。な
お、センスアンプ307は、動作のオン/オフが可能な
フリップフロップで構成され、センス動作はそれ自身が
データのラッチとなる。
At the time of reading, the decoder 304 outputs the result of offset decoding to the multiplexer 305.
Not only is supplied to the memory cell array 303 but also a read position (bus width) in a line is specified. As a result, only that position is activated and multiplexer 305
Is sent to the sense amplifier 307 and latched. Note that the sense amplifier 307 is configured by a flip-flop whose operation can be turned on / off, and the sense operation itself becomes a data latch.

【0022】一方、書き込み時では、書き込みデータが
デマルチプレクサ305を通ってメモリセルアレイ30
3の所定の位置に送られ、ライトアンプ309のライト
動作によって書き込まれる。その際、デコーダ304か
らのオフセットのデコード結果は、デマルチプレクサ3
05とメモリセルアレイ303へ送られ、メモリセルア
レイ303においてはバス幅で書き込み位置が活性化さ
れる。オフセットがメモリセルアレイ303の位置を指
定する動作自体がライトイネーブルを与えることにな
る。
On the other hand, at the time of writing, write data passes through the demultiplexer 305 and the memory cell array 30
3 and is written by the write operation of the write amplifier 309. At this time, the decoding result of the offset from the decoder 304 is
05 and the memory cell array 303, and the write position is activated by the bus width in the memory cell array 303. The operation itself in which the offset specifies the position of the memory cell array 303 gives the write enable.

【0023】リフィル時の動作は、書き込み時の動作と
同じであるが、メモリセルアレイ303とはバス幅でデ
ータをやりとりするので、ライン全てをリフィルするま
で書き込み動作を、ライン幅をバス幅で徐した(ライン
幅÷バス幅)値の回数だけ繰り返すことになる。
The operation at the time of refilling is the same as the operation at the time of writing. However, since data is exchanged with the memory cell array 303 by the bus width, the writing operation is performed until the entire line is refilled, and the line width is gradually reduced by the bus width. This is repeated the number of times (line width / bus width).

【0024】[0024]

【発明が解決しようとする課題】しかしながら、マイク
ロプロセッサのバス幅が大きくなるのに伴って、キャッ
シュメモリが扱うデータは、単調な“0”の列や単調な
“1”の列を含むものが多くなった。データがたまたま
そのような値になることはままあるが、特に、ソフトが
プロセッサのバス幅を使い切る必要がない場合などに顕
著である。
However, as the bus width of the microprocessor increases, data handled by the cache memory may include a monotonic "0" column or a monotonic "1" column. More. Although the data happens to have such a value, it is particularly remarkable when software does not need to use up the bus width of the processor.

【0025】このような場合、例えば上位数ビットには
単調な1の列や単調な0の列が置かれることになる。デ
ータにとって必要のないビットには符号拡張や0拡張が
行なわれて、プロセッサの動作上矛盾が生じないように
“0”の列や“1”の列で埋められるのである。
In such a case, for example, a monotonous sequence of 1s or a monotone sequence of 0s is placed in the upper several bits. Bits that are not necessary for the data are subjected to sign extension or 0 extension, and are filled with "0" columns or "1" columns so that no inconsistency occurs in the operation of the processor.

【0026】より具体的に説明する。マイクロプロセッ
サのバス幅が例えば64ビットであるとすると、実際の
ところ64ビット全てが使用されないケースが多い。そ
れは、プログラムの都合で使用するデータが8ビット、
16ビット及び32ビットであるケースが多いなどの事
情があるためで、これらの場合、符号拡張されたり、0
拡張されたりして、プロセッサ側が用意した64ビット
のデータ幅のうちプログラムが使用しない部分には「全
て0」または「全て1」が格納されることになる。ま
た、64ビット全て使用するソフトウェアであっても、
ビット列のうちのある部分全てが“0”または“1”で
あるデータが出てくるはずである。
This will be described more specifically. Assuming that the bus width of the microprocessor is, for example, 64 bits, there are many cases where all 64 bits are not actually used. That is, the data used for the convenience of the program is 8 bits,
This is because there are many cases such as 16 bits and 32 bits. In these cases, sign extension or 0
For example, "all 0s" or "all 1s" are stored in portions of the 64-bit data width prepared by the processor that are not used by the program. Also, even if the software uses all 64 bits,
Data in which all parts of the bit string are “0” or “1” should appear.

【0027】従来のキャッシュメモリでは、こうしたデ
ータに対しても、全ビットにアクセスしていた。すなわ
ち、第1の従来例(図8)においては、読み出し時やリ
フィル時はラインサイズの全ビットに、書き込み時はバ
ス幅全ビットにアクセスし、第2の従来例(図9)にお
いては、読み出し時、書き込み時及びリフィル時におい
てバス幅の全ビットにアクセスしている。その結果、単
調な“0”の列や単調な“1”の列という単調なビット
情報を含むデータを読み書きする時でも、消費電力を削
減できないという問題があった。
In the conventional cache memory, all bits are accessed for such data. That is, in the first conventional example (FIG. 8), all the bits of the line size are accessed at the time of reading or refilling, and all the bits of the bus width are accessed at the time of writing. In the second conventional example (FIG. 9), At the time of reading, writing and refilling, all bits of the bus width are accessed. As a result, there is a problem that power consumption cannot be reduced even when reading / writing data including monotonous bit information such as a monotonic “0” column and a monotonic “1” column.

【0028】また、キャッシュメモリに対するアクセス
時の消費電力削減という観点から、例えば、読み出し
時にメモリセルアレイをバイト単位でアクセスする方法
(構成は図9に示したものと同じ)、メモリセルアレ
イの特定のバイトのみにデータを書き込む方法、メモ
リセルアレイにバイト単位で書き込む方法、などが従来
より知られている。
From the viewpoint of reducing power consumption at the time of accessing the cache memory, for example, a method of accessing the memory cell array in byte units at the time of reading (the configuration is the same as that shown in FIG. 9), a specific byte of the memory cell array, Conventionally, a method of writing data only to a memory cell, a method of writing data to a memory cell array in byte units, and the like have been known.

【0029】前記方法は、「load byte」や
「load half word」などのようにプロセ
ッサに発行される命令においてアクセスの幅がバス幅よ
り小さく指定されたときだけ行われるもので、読み出し
時のアクセスビットを減らすことができる。また、前記
方法では、例えば、64ビットプロセッサでキャッシ
ュラインが32バイトであった場合に、「store
byte」命令によって1バイトが書き換わり、残りの
31バイトが元のままであるといったことになる。この
方法のキャッシュ動作の一例としては、バス幅でデー
タを一度読み込み、その内の所望の1バイトを新しいデ
ータに差し換え、バス幅でキャッシュメモリに書き込む
という「read modify write」が挙げ
られる。但し、これはキャッシュメモリへ送るアドレス
指定がバス幅単位になっている場合の動作である。前記
方法では、「store byte」のような命令の
時に行われ、バス幅アクセスよりも低消費電力となる。
The above method is performed only when the access width is specified to be smaller than the bus width in an instruction issued to the processor such as “load byte” or “load half word”. Bits can be reduced. Further, in the above method, for example, when a cache line is 32 bytes in a 64-bit processor, "store"
One byte is rewritten by the "byte" instruction, and the remaining 31 bytes remain unchanged. As an example of the cache operation of this method, there is a “read modify write” in which data is read once with a bus width, a desired one byte is replaced with new data, and the data is written into a cache memory with a bus width. However, this is an operation when the address specification to be sent to the cache memory is in the unit of the bus width. In the above method, the power consumption is lower than the bus width access, which is performed at the time of an instruction such as “store byte”.

【0030】しかし、これらの各方法,,では、
命令とは無関係にデータの内容に基づいてアクセス幅を
最適化して、消費電力削減を図ることはできない。
However, in each of these methods,
The power consumption cannot be reduced by optimizing the access width based on the content of the data regardless of the instruction.

【0031】本発明は、上述の如き従来の問題点を解決
するためになされたもので、その目的は、単調なビット
情報を含むデータを読み書きする場合において、命令と
は無関係にアクセス幅を最適化して消費電力の削減を可
能にしたキャッシュメモリを提供することである。また
その他の目的は、回路規模の増加を抑えつつ、上記の消
費電力の削減を可能にしたキャッシュメモリを提供する
ことである。さらにその他の目的は、高速化を図りつ
つ、上記の消費電力の削減を可能にしたキャッシュメモ
リを提供することである。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problems. An object of the present invention is to optimize an access width independently of an instruction when reading and writing data including monotonous bit information. It is an object of the present invention to provide a cache memory which can be reduced in power consumption. Another object is to provide a cache memory capable of reducing the above power consumption while suppressing an increase in circuit scale. Still another object is to provide a cache memory capable of reducing the power consumption while increasing the speed.

【0032】[0032]

【課題を解決するための手段】上記目的を達成するため
に、第1の発明の特徴は、ビット毎にメモリセルを備え
た複数のラインで構成され且つ前記各メモリセルがビッ
ト毎に2本の相補的なビット線に接続され、該ビット線
を通して選択的に前記メモリセルに対するデータの読み
出し/書き込みが行われるデータ記憶部と、外部の主記
憶装置中の位置を示すタグを保有するタグ保有部と、前
記タグ保有部中のタグとプログラム指定のタグとの一致
/不一致を比較してヒット/ヒットミスを判定するヒッ
ト判定部とを有し、前記判定部でヒット判定された場合
は、データ読み出し時に前記データ記憶部から所定のデ
ータを外部へ読み出すと共に、データ書き込み時に外部
からの書き込みデータを前記データ記憶部へ書き込み、
前記判定部でヒットミス判定された場合は、前記主記憶
装置からの所要のデータを前記データ記憶部へ書き込む
リフィルを行うキャッシュメモリにおいて、前記データ
記憶部における前記各ラインをN(正の整数)個のブロ
ックに分割すると共に、その各ブロックのメモリセルデ
ータが全て0データ、全て1データまたはそれ以外の0
及び1混合データであるという内容を表す状態フラグを
各ライン毎に保有するフラグ保有部を設け、前記データ
読み出し時には、読み出しラインに対応する前記フラグ
保有部中の状態フラグの内容を参照して、該読み出しラ
インにおける各ブロックのうち前記0及び1混合データ
を記憶するブロックのみにアクセスすると共に、その読
み出しデータに対して前記全て0データまたは前記全て
1データに対応する0データ列または1データ列を補っ
て外部へ読み出し、前記データ書き込み時には、書き込
み先ラインに対応する前記フラグ保有部中の状態フラグ
の内容と書き込みデータの内容とに基づいて前記フラグ
保有部の状態フラグの内容を新しい値にセットすると共
に、前記書き込みデータのうちの0及び1混合データの
みの部分を前記書き込み先ラインに書き込み、前記リフ
ィル時には、書き込むべき所要データの内容に基づいて
前記フラグ保有部の状態フラグの内容を新しい値にセッ
トすると共に、該所要データのうちの0及び1混合デー
タのみの部分を前記データ記憶部へ書き込むことにあ
る。
In order to achieve the above object, a first aspect of the present invention is characterized in that the memory cell comprises a plurality of lines each having a memory cell for each bit, and each of the memory cells has two lines for each bit. A data storage unit connected to a complementary bit line for selectively reading / writing data from / to the memory cell through the bit line, and a tag holding a tag indicating a position in an external main storage device And a hit judging unit for judging hit / hit / miss by comparing the match / mismatch between the tag in the tag holding unit and the tag specified by the program, and when the hit is judged by the judging unit, At the time of data reading, read out predetermined data from the data storage unit to the outside, and at the time of data writing, write externally written data to the data storage unit,
When a hit / miss determination is made by the determination unit, in the cache memory that performs refilling for writing required data from the main storage device to the data storage unit, each line in the data storage unit is set to N (a positive integer). And the memory cell data of each block is all 0 data, all 1 data, or other 0 data.
And a flag holding unit for holding a state flag representing the content of 1 mixed data for each line, and when reading the data, refer to the contents of the state flag in the flag holding unit corresponding to the read line, Only the block storing the mixed data of 0 and 1 among the blocks in the read line is accessed, and a 0 data string or 1 data string corresponding to the all 0 data or the all 1 data is read from the read data. In addition, at the time of data writing, the content of the status flag of the flag holding unit is set to a new value based on the content of the status flag in the flag holding unit corresponding to the write destination line and the content of the write data. At the same time, the portion of the write data which is a mixture of 0 and 1 data is At the time of the refill, the content of the status flag of the flag holding unit is set to a new value based on the content of the required data to be written, and a portion of only the mixed data of 0 and 1 of the required data is written. Is written in the data storage unit.

【0033】この第1の発明によれば、各ラインのN個
のブロックのうち、全て0データで構成されるブロック
や、全て1データで構成されるブロックにはアクセスし
ないようにする。すなわち、単調な0データの列、単調
な1データの列にはアクセスそのものを止めてしまい、
ビット線をスイングさせずに消費電力を削減する。デー
タ読み出し時は、状態フラグの内容によって、アクセス
するブロックが限定される。データ書き込み及びリフィ
ルの時は、書き込みデータのうち「0及び1混合デー
タ」の部分のみ書き込み、状態フラグの内容が書き込み
データの内容と元の状態フラグの内容とによって書き直
される。
According to the first aspect, of the N blocks on each line, a block composed of all 0 data and a block composed of all 1 data are not accessed. That is, the access itself is stopped for the monotonic 0 data column and the monotonic 1 data column,
Reduce power consumption without swinging bit lines. At the time of data reading, the block to be accessed is limited by the contents of the status flag. At the time of data writing and refilling, only the "0 and 1 mixed data" portion of the write data is written, and the contents of the state flag are rewritten by the contents of the write data and the contents of the original state flag.

【0034】第2の発明の特徴は、ビット毎にメモリセ
ルを備えた複数のラインで構成され且つ前記各メモリセ
ルがビット毎に2本の相補的なビット線に接続され、該
ビット線を通して選択的に前記メモリセルに対するデー
タの読み出し/書き込みが行われるデータ記憶部と、外
部の主記憶装置中の位置を示すタグを保有するタグ保有
部と、前記タグ保有部中のタグとプログラム指定のタグ
との一致/不一致を比較してヒット/ヒットミスを判定
するヒット判定部とを有し、前記判定部でヒット判定さ
れた場合は、データ読み出し時に前記データ記憶部から
所定のデータを外部へ読み出すと共に、データ書き込み
時に外部からの書き込みデータを前記データ記憶部へ書
き込み、前記判定部でヒットミス判定された場合は、前
記主記憶装置からの所要のデータを前記データ記憶部へ
書き込むリフィルを行うキャッシュメモリにおいて、前
記データ記憶部における前記各ラインをN(正の整数)
個のブロックに分割すると共に、そのうちのN個未満の
所定ブロックにおけるメモリセルデータが全て0デー
タ、全て1データまたはそれ以外の0及び1混合データ
であるという内容を表す状態フラグを各ライン毎に保有
するフラグ保有部を設け、前記データ読み出し時には、
読み出しラインに対応する前記フラグ保有部中の状態フ
ラグの内容を参照して、読み出しラインにおける前記所
定ブロックのうち前記0及び1混合データを記憶するブ
ロックのみにアクセスすると共に、該所定ブロックの読
み出しデータに対して前記全て0データまたは前記全て
1データに対応する0データ列または1データ列を補っ
て外部へ読み出し、前記データ書き込み時には、書き込
み先ラインに対応する前記フラグ保有部中の状態フラグ
の内容と該書き込み先ラインの前記所定ブロックに対す
る書き込みデータの内容とに基づいて、前記フラグ保有
部の状態フラグの内容を新しい値にセットすると共に、
書き込み先ラインの前記所定ブロックに対する書き込み
データのうち0及び1混合データのみの部分を該所定ブ
ロックへ書き込み、前記リフィル時には、前記所定ブロ
ックに対して書き込むべき所要データの内容に基づいて
前記フラグ保有部の状態フラグの内容を新しい値にセッ
トすると共に、前記所要データのうちの0及び1混合デ
ータのみの部分を前記所定ブロックへ書き込むことにあ
る。
A second aspect of the present invention is characterized in that the memory cell is constituted by a plurality of lines each having a memory cell for each bit, and each of the memory cells is connected to two complementary bit lines for each bit. A data storage unit for selectively reading / writing data to / from the memory cell, a tag holding unit holding a tag indicating a position in an external main storage device, a tag in the tag holding unit and a program designation A hit judging unit for judging hit / hit / miss by comparing match / mismatch with the tag, and when a hit is judged by the judging unit, predetermined data is sent from the data storage unit to the outside at the time of data reading. In addition to reading, when writing data, external write data is written to the data storage unit, and when a hit / miss determination is made by the determination unit, the data is read from the main storage device. In the cache memory to perform the refill writing the required data to the data storage unit, the respective lines in the data storage unit N (a positive integer)
And a status flag indicating that the memory cell data in less than N of the predetermined blocks is all 0 data, all 1 data, or other mixed data of 0 and 1 is provided for each line. A flag holding unit is provided, and at the time of reading the data,
Referring to the contents of the status flag in the flag holding unit corresponding to the read line, access is made to only the block storing the 0 and 1 mixed data among the predetermined blocks in the read line, and the read data of the predetermined block is read. In response to the above, all the 0 data or all the 1 data are supplemented with the 0 data string or the 1 data string and read out to the outside, and at the time of writing the data, the contents of the status flag in the flag holding unit corresponding to the write destination line And setting the content of the status flag of the flag holding unit to a new value based on and the content of the write data for the predetermined block of the write destination line,
A portion of only the mixed data of 0 and 1 in the write data for the predetermined block of the write destination line is written to the predetermined block, and at the time of the refill, the flag holding unit is set based on the content of the required data to be written to the predetermined block. Is set to a new value, and a portion of only the mixed data of 0 and 1 of the required data is written to the predetermined block.

【0035】この第2の発明によれば、各ラインを分割
して形成したN個のブロックうち所定ブロックに対して
のみ、上記第1の発明と同様の作用効果を奏する。
According to the second aspect, the same operation and effect as those of the first aspect can be obtained only for a predetermined block out of N blocks formed by dividing each line.

【0036】第3の発明の特徴は、上記第1及び第2の
発明において、前記複数のラインのラインサイズと外部
バスのバス幅を等しくし、前記データ書き込み時には、
書き込み先ラインの前記状態フラグの内容を解読せず
に、書き込みデータの内容に基づいて前記フラグ保有部
の状態フラグの内容を新しい値にセットすることにあ
る。
According to a third aspect of the present invention, in the first and second aspects, a line size of the plurality of lines is equal to a bus width of an external bus.
The content of the status flag of the flag holding unit is set to a new value based on the content of the write data without decoding the content of the status flag of the write destination line.

【0037】この第3の発明によれば、データ書き込み
時に、書き込み先ラインの状態フラグの内容を解読しな
くても済むため、構成が単純化され、高速動作が可能と
なる。
According to the third aspect, at the time of writing data, it is not necessary to decode the contents of the status flag of the write destination line, so that the configuration is simplified and high-speed operation is possible.

【0038】第4の発明の特徴は、上記第1乃至第3の
発明において、前記状態フラグの表す内容を、前記各ブ
ロック内のメモリセル中のデータが全て0データまたは
それ以外のデータ、あるいは全て1データまたはそれ以
外のデータとしたことにある。
According to a fourth aspect of the present invention, in the first to third aspects, the content represented by the status flag is set such that all data in the memory cells in each block is 0 data or other data, or All data is one data or other data.

【0039】この第4の発明によれば、状態フラグのビ
ット数を小さくすることができる。更に状態フラグは1
ライン当たりブロックの分割数と同じビットとなるた
め、構成が簡素化されるだけでなく、書き込み時に、状
態フラグへのアクセス幅を書き込みデータ幅に対応した
フラグ幅に限定できる。
According to the fourth aspect, the number of bits of the status flag can be reduced. Furthermore, the status flag is 1
Since the number of bits is the same as the number of divisions of the block per line, not only the configuration is simplified, but also at the time of writing, the access width to the status flag can be limited to the flag width corresponding to the write data width.

【0040】第5の発明の特徴は、上記第1乃至第4の
発明において、前記各ラインの各ブロックまたは所定ブ
ロック毎に設けられる前記状態フラグは、それぞれ2ビ
ットで構成したフラグデータとしたことにある。
According to a fifth aspect of the present invention, in the first to fourth aspects, the status flag provided for each block or each predetermined block of each line is flag data composed of 2 bits. It is in.

【0041】この第5の発明によれば、構成が簡素化さ
れ、さらに書き込み時に、状態フラグへのアクセス幅を
書き込みデータ幅に対応したフラグ幅に限定できる。
According to the fifth aspect of the invention, the configuration is simplified, and at the time of writing, the access width to the status flag can be limited to the flag width corresponding to the write data width.

【0042】[0042]

【発明の実施の形態】以下、本発明の実施形態を図面に
基づいて説明する。図1は、本発明のキャッシュメモリ
の第1実施形態を示す構成ブロック図であり、上記図8
と共通の要素には同一の符号が付されている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a first embodiment of the cache memory of the present invention.
The same reference numerals are given to the common elements.

【0043】本実施形態のキャッシュメモリは、バス幅
64ビットのマイクロプロセッサに搭載されているもの
とする。当該キャッシュメモリのラインサイズは、例え
ば128ビットとし、各ラインを32ビットのブロック
(以下、細胞という)4つに分割している。このデータ
幅の分割イメージを図2に示す。
It is assumed that the cache memory of this embodiment is mounted on a microprocessor having a bus width of 64 bits. The line size of the cache memory is, for example, 128 bits, and each line is divided into four 32-bit blocks (hereinafter referred to as cells). FIG. 2 shows an image obtained by dividing the data width.

【0044】図1に示すように、このキャッシュメモリ
は、従来のキャッシュメモリ(図8)の構成に対して、
フラグ保有部1、フラグ内容のデコーダ2、マルチプレ
クサ(mux)3,4、データのデコーダ5、及びエン
コーダ6が追加されている。さらに、本実施形態のメモ
リセルアレイ203Aとデータをやりとりするラッチ回
路204Aには、「全て0」の部分及び「全て1」の部
分のデータを復元する機構(0列/1列復元機構)を備
えている。また、メモリセルアレイ203Aは、ライン
アクセス時に指定された細胞にアクセスしない機構を備
えている。
As shown in FIG. 1, this cache memory is different from the configuration of the conventional cache memory (FIG. 8).
A flag holding unit 1, a flag content decoder 2, multiplexers (muxes) 3, 4, a data decoder 5, and an encoder 6 are added. Further, the latch circuit 204A for exchanging data with the memory cell array 203A of the present embodiment includes a mechanism (0 column / 1 column restoration mechanism) for restoring the data of “all 0s” and “all 1s”. ing. In addition, the memory cell array 203A has a mechanism that does not access a cell specified at the time of line access.

【0045】具体的には、フラグ保有部1は、各細胞内
部のデータが「全て0」、「全て1」あるいは「全て0
でも全て1でもない(0及び1混合データ)」という内
容を表す状態フラグを各ライン毎に持つ。そして、デコ
ーダ2は、フラグ保有部1中の状態フラグをデコード
し、制御信号S1,S2を生成する。マルチプレクサ
(mux)3は、制御信号S2とデコーダ5から出力さ
れる制御信号S3とを一旦記憶し一時点にそのうちの1
つを選んで4ビットの制御信号S5として出力する。同
様に、マルチプレクサ(mux)4は、制御信号S1と
デコーダ5から出力される制御信号S4とのいずれか1
つを選んで4ビットの制御信号S6として出力する。
Specifically, the flag holding unit 1 determines that the data inside each cell is “all 0”, “all 1”, or “all 0”.
However, each line has a status flag representing the content of "but not all 1 (mixed data of 0 and 1)". Then, the decoder 2 decodes the state flag in the flag holding unit 1 and generates control signals S1 and S2. The multiplexer (mux) 3 temporarily stores the control signal S2 and the control signal S3 output from the decoder 5, and temporarily stores one of the control signal S2 and the control signal S3.
One is selected and output as a 4-bit control signal S5. Similarly, the multiplexer (mux) 4 outputs one of the control signal S 1 and the control signal S 4 output from the decoder 5.
One is selected and output as a 4-bit control signal S6.

【0046】さらに、デコーダ5は、ラッチ回路204
A内の書き込みデータをデコードし、制御信号S3,S
4を生成し、エンコーダ6は、フラグ保有部1の内容と
書き込みデータの内容から新しい状態フラグを生成し
て、フラグ保有部1の内容を更新する。また、メモリセ
ルアレイ203Aは、各ビットに2本の相補的なビット
線を持ち、例えば各ビットが図6に示す構成のSRAM
で構成されている。
The decoder 5 further includes a latch circuit 204
The write data in A is decoded, and the control signals S3 and S
4, the encoder 6 generates a new state flag from the contents of the flag holding unit 1 and the contents of the write data, and updates the contents of the flag holding unit 1. The memory cell array 203A has two complementary bit lines for each bit, and for example, each bit has an SRAM having a configuration shown in FIG.
It is composed of

【0047】図3は、図1中のメモリセルアレイ203
Aと、0列/1列復元機能付きラッチ回路204Aの具
体的構成を示す図である。
FIG. 3 shows the memory cell array 203 shown in FIG.
9A is a diagram showing a specific configuration of a latch circuit 204A with a 0-column / 1-column restoration function. FIG.

【0048】本実施形態のメモリセルアレイ203A
は、各ラインr−1,r−2,…,r−nが32ビット
の細胞21,22,23,24に分割され、その各細胞
21〜24に対応して、それぞれ2入力NANDゲート
31,32,33,34が設けられている。
The memory cell array 203A of the present embodiment
, Rn are divided into 32-bit cells 21, 22, 23, and 24, and two-input NAND gates 31 corresponding to the cells 21 to 24, respectively. , 32, 33, 34 are provided.

【0049】NANDゲート31〜34は、ラインアク
セス時に指定された細胞にアクセスしない機構として機
能し、各一方入力端にはクロックCLKが共通して供給
され、その各他方入力端には4ビットの制御信号S6の
うちの1ビットが割り当てられて供給される。これによ
って、制御信号S6の各ビットは、4つの細胞21〜2
4へのクロックCLK供給のイネーブル信号となる。
The NAND gates 31 to 34 function as a mechanism that does not access the designated cell at the time of line access. A clock CLK is commonly supplied to one input terminal, and a 4-bit signal is supplied to the other input terminal. One bit of the control signal S6 is allocated and supplied. As a result, each bit of the control signal S6 has four cells 21 to 2
4 is an enable signal for supplying the clock CLK to the control signal No. 4.

【0050】一方、0列/1列復元機能付きラッチ回路
204Aは、マルチプレクサ/デマルチプレクサ13,
14,15,16と、ラッチ11,12とで構成されて
いる。マルチプレクサ/デマルチプレクサ13,14
は、それぞれ32ビットバスを介してラッチ11の上位
ビット側及び下位ビット側に接続され、同様にマルチプ
レクサ/デマルチプレクサ15,16は、それぞれ32
ビットバスを介してラッチ12の上位ビット側及び下位
ビット側に接続されている。さらに、これら32ビット
バスは、合わせて128ビットの書き込みデータ用バス
として、デコーダ5及びエンコーダ6に接続されてい
る。
On the other hand, the latch circuit 204A with the 0 column / 1 column restoring function includes the multiplexer / demultiplexer 13,
14, 15 and 16 and latches 11 and 12. Multiplexer / Demultiplexer 13, 14
Are respectively connected to the upper bit side and the lower bit side of the latch 11 via a 32-bit bus. Similarly, the multiplexer / demultiplexers 15 and 16
The latch 12 is connected to the upper bit side and the lower bit side of the latch 12 via a bit bus. Further, these 32-bit buses are connected to the decoder 5 and the encoder 6 as a 128-bit write data bus.

【0051】マルチプレクサ/デマルチプレクサ13〜
16は、それぞれ制御信号S5により制御され、32ビ
ットの“0”の列(電源で構成する)と、32ビットの
“1”の列(アースで構成する)と、細胞21〜24に
各々接続されている32ビットバスとのいずれか1つを
選択するようになっている。そして、ラッチ11,12
の各々の64ビットバスが、当該ラッチ回路204Aの
外部のマルチプレクサ/デマルチプレクサ206に接続
されている。
Multiplexer / Demultiplexer 13-
Numeral 16 is controlled by a control signal S5, and is connected to a 32-bit “0” column (configured with a power supply), a 32-bit “1” column (configured with a ground), and cells 21 to 24, respectively. One of the 32-bit buses. And latches 11 and 12
Are connected to a multiplexer / demultiplexer 206 external to the latch circuit 204A.

【0052】次に、以上のように構成される本実施形態
の動作(A),(B)を説明する。 (A)読み出し動作 まず、インデックスの指定を行うべく、アドレスのイン
デックス部200bをデコーダ201でデコードして、
タグと状態フラグとデータ(各細胞全て)を選択する。
次に、選択されたタグと状態フラグについてのみアクセ
スし、選択されたデータについてはまだアクセスしない
でおく。
Next, the operations (A) and (B) of the present embodiment configured as described above will be described. (A) Read operation First, in order to specify an index, the index part 200b of the address is decoded by the decoder 201.
Select tags, status flags, and data (all cells).
Next, only the selected tag and the status flag are accessed, and the selected data is not yet accessed.

【0053】フラグ保有部1をアクセスして読み出され
た状態フラグの内容は、デコーダ2でデコードされ、制
御信号S1,S2に変換される。制御信号S1は、マル
チプレクサ4を通り、制御信号S6となり、制御信号S
2は、マルチプレクサ3を通り制御信号S5となる。さ
らに、4ビットから成る制御信号S6は、その各ビット
が4つの細胞21〜24へのクロックCLK供給のイネ
ーブル信号となる。
The content of the status flag read by accessing the flag holding unit 1 is decoded by the decoder 2 and converted into control signals S1 and S2. The control signal S1 passes through the multiplexer 4 to become a control signal S6, and the control signal S6
2 passes through the multiplexer 3 and becomes the control signal S5. Further, the control signal S6 composed of 4 bits, each bit of which serves as an enable signal for supplying the clock CLK to the four cells 21 to 24.

【0054】選択された状態フラグの内容により、4つ
の細胞21〜24のうち「全て0」または「全て1」で
あることが分かった細胞には、制御信号S6の4ビット
のうち、対応するビットが“L”レベルになり、クロッ
クCLKが供給されない。キャッシュメモリのセルアレ
イ203Aへのアクセス動作、すなわち、プリチャージ
・アンド・イコライズから始まる一連の動作を司る制御
信号は、全てクロックCLKから生成されるため、クロ
ックCLKが供給されなければ、全く動作しない。
According to the contents of the selected state flag, a cell which is found to be "all 0s" or "all 1s" among the four cells 21 to 24 corresponds to the cell among the four bits of the control signal S6. The bit becomes "L" level, and clock CLK is not supplied. Since the control signal for controlling the access operation to the cell array 203A of the cache memory, that is, the series of operations starting from precharge and equalization, is generated from the clock CLK, it does not operate at all unless the clock CLK is supplied.

【0055】また、選択された状態フラグの内容により
「全て0でも全て1でもない」と分かった細胞には、制
御信号S6のうち対応するビットが“H”レベルにな
り、クロックCLKが供給される。
Further, to the cell which is determined by the contents of the selected status flag to be "not all 0 or all 1", the corresponding bit of the control signal S6 becomes "H" level and the clock CLK is supplied. You.

【0056】これにより、4つの細胞21〜24のう
ち、「全て0でも全て1でもない」細胞のみアクセスが
行われ、「全て0」の部分や「全て1」の部分にはアク
セスが行われない。また、「全て0」の部分や「全て
1」の部分は、クロックCLKも停止しているため、消
費電力が削減される。
As a result, of the four cells 21 to 24, only the cell “all 0 or not all 1” is accessed, and the “all 0” or “all 1” part is accessed. Absent. In addition, since the clock CLK is stopped in the “all 0s” and the “all 1s”, power consumption is reduced.

【0057】また、制御信号S5はラッチ回路204A
内のマルチプレクサ13〜16の制御信号として用いら
れ、4つの細胞21〜24のうち、「全て0」の細胞で
は32ビットの“0”の列を、「全て1」の細胞では3
2ビットの“1”の列を、「全て0でも全て1でもな
い」細胞ではメモリセルアレイ203Aからの出力をそ
れぞれ選択してラッチ11,12に格納する。
The control signal S5 is supplied to the latch circuit 204A.
Among the four cells 21 to 24, a “0” column of 32 bits for “all 0” cells, and 3 bits for “all 1” cells among the four cells 21 to 24.
In the case of a cell of "1" of 2 bits and "all 0 or neither 1", the output from the memory cell array 203A is selected and stored in the latches 11 and 12, respectively.

【0058】読み出されたタグは、比較器208へ送ら
れてヒット判定される。ヒットの場合、デコーダ205
からのオフセットセレクト信号S200により、ラッチ
回路204A内のラッチ11,12中の各64ビットデ
ータのうちの一方が選択されて、読み出しポート207
に入る。
The read tag is sent to the comparator 208 for hit determination. In the case of a hit, the decoder 205
, One of the 64-bit data in each of the latches 11 and 12 in the latch circuit 204A is selected, and the read port 207 is selected.
to go into.

【0059】(B)書き込み動作 まず、インデックスの指定を行うべく、アドレスのイン
デックス部200bをデコーダ201でデコードして、
タグと状態フラグとデータ(各細胞全て)を選択する。
次に、選択されたタグと状態フラグにつき、タグ保有部
202及びフラグ保有部1にアクセスし、選択されたデ
ータについては、まだメモリセルアレイ203Aのアク
セスを行わないでおく。フラグ保有部1より読み出され
た状態フラグの内容はエンコーダ6へ送られる。
(B) Write Operation First, in order to designate an index, the index part 200b of the address is decoded by the decoder 201.
Select tags, status flags, and data (all cells).
Next, the tag holding unit 202 and the flag holding unit 1 are accessed for the selected tag and status flag, and the selected data is not yet accessed in the memory cell array 203A. The content of the status flag read from the flag holding unit 1 is sent to the encoder 6.

【0060】一方、書き込みデータは、書き込みポート
207からデマルチプレクサ206を通過してラッチ回
路204A内のラッチ11,12に入り、エンコーダ6
とデコーダ5へ送られる。エンコーダ6では、状態フラ
グの内容とデータの内容から新しい状態フラグを生成す
る。また、デコーダ5では、メモリセルアレイ203A
のクロックイネーブル信号である制御信号S4を生成
し、マルチプレクサ4を通して制御信号S6としてメモ
リセルアレイ203Aへ供給する。
On the other hand, the write data passes through the demultiplexer 206 from the write port 207 and enters the latches 11 and 12 in the latch circuit 204A.
Is sent to the decoder 5. The encoder 6 generates a new status flag from the content of the status flag and the content of the data. In the decoder 5, the memory cell array 203A
, And supplies the control signal S6 to the memory cell array 203A as the control signal S6 through the multiplexer 4.

【0061】クロックCLKは、上述の読み出し動作と
同様、「全て0」または「全て1」に更新する細胞へ供
給せず、「全て0でも全て1でもない」データに更新す
る細胞へ供給する。同時に、デコーダ5で制御信号S3
を生成し、マルチプレクサ3を通して制御信号S5とし
て、ラッチ回路204A内のデマルチプレクサ13〜1
6へ供給する。
The clock CLK is not supplied to the cells to be updated to "all 0s" or "all 1s", but is supplied to the cells to be updated to "neither all 0s nor all 1s" data. At the same time, the control signal S3
Is generated as a control signal S5 through the multiplexer 3 and the demultiplexers 13 to 1 in the latch circuit 204A.
Supply to 6.

【0062】このデマルチプレクサ13〜16のうち、
「全て0でも全て1でもない」更新データに対応するデ
マルチプレクサは、制御信号S5のコントロールにより
メモリセルアレイ203Aに接続される。
Of the demultiplexers 13 to 16,
The demultiplexer corresponding to the update data “not all 0s or all 1s” is connected to the memory cell array 203A under the control of the control signal S5.

【0063】このようにタグチェックしてヒットの場合
は、新らしい状態フラグを、該当インデックスが指定す
る領域に書き込み、「全て0でも全て1でもない」デー
タに更新する細胞へのみ書き込みを行う。これにより、
「全て0」の部分や「全て1」の部分にはアクセスが行
なわれず、また、クロックも停止しているため、消費電
力が削減される。
As described above, if the tag check results in a hit, a new state flag is written in the area specified by the corresponding index, and writing is performed only on cells that are updated to “all 0s and all 1s” data. This allows
No access is made to the “all 0s” and “all 1s” parts, and the clock is stopped, so that power consumption is reduced.

【0064】一方、タグチェックしてミスたった場合は
リフィル動作に入るが、リフィルの際は、リフィルデー
タを0列/1列復元機能付ラッチ回路204Aのラッチ
11,12に格納し、その後にエンコーダ6によって状
態フラグを生成し、デコーダ5によって制御信号S3を
生成する。後は書き込みと同じ動作である。
On the other hand, if a mistake is found in the tag check, the refill operation is started. At the time of refill, the refill data is stored in the latches 11 and 12 of the latch circuit 204A having the 0-column / 1-column restoration function. 6 generates a state flag, and the decoder 5 generates a control signal S3. The rest is the same operation as writing.

【0065】また、1ラインのうち、データバス幅1つ
分のデータのみ書き換えたい場合は、残りの書き換えな
い領域については、ビット線コントロールを非活性化状
態にしておいて、アクセスそのものを行なわないように
制御するのが一般的である。そのような制御をすれば、
1ラインのうち書さ換え対象でない部分については、そ
もそもアクセスをしないため、書き換え対象でない部分
を構成する細胞が「全て0」、「全て1」、「全て0で
も全て1でもない」のどれに当たるかを調べる必要がな
い。すなわち、データ更新する部分のみ「全て0」、
「全て1」、及び「全て0でも全て1でもない」の分類
を行なえばよいので、制御信号S3は書き込まれるデー
タのみから作成することが可能で、状態フラグの内容と
の合成が不要である。
When it is desired to rewrite only the data of one data bus width in one line, the bit line control is inactivated for the remaining non-rewritten area, and the access itself is not performed. It is common to control as follows. With such control,
Since a portion of one line that is not to be rewritten is not accessed in the first place, the cells constituting the portion that is not to be rewritten correspond to any of "all 0", "all 1", "all 0 and neither all 1". There is no need to find out. That is, only the part to be updated is "all 0s",
Since the classification of "all 1s" and "all 0s and neither 1s" may be performed, the control signal S3 can be created only from the data to be written, and does not need to be combined with the contents of the status flag. .

【0066】図4は、本発明のキャッシュメモリの第2
実施形態を示す構成ブロック図であり、上記図1と共通
の要素には同一の符号が付されている。
FIG. 4 shows a second example of the cache memory of the present invention.
FIG. 2 is a configuration block diagram showing the embodiment, and the same reference numerals are given to the same elements as those in FIG.

【0067】本実施形態は、上記第1実施形態の構成に
おいて、メモリセルアレイのラインサイズをバス幅と同
じにしたものである。この場合、書き込み時でも、0列
/1列復元機能付ラッチ回路のデータ内容だけで状態フ
ラグをセットするのに必要な情報は全て得られるため、
データ書き込み時に書き込み先ラインの状態フラグをデ
コードせずに済み、且つエンコーダが単純化される。
In this embodiment, the line size of the memory cell array is the same as the bus width in the configuration of the first embodiment. In this case, even at the time of writing, all the information necessary to set the status flag can be obtained only from the data content of the latch circuit with the 0 column / 1 column restoring function.
It is not necessary to decode the status flag of the write destination line when writing data, and the encoder is simplified.

【0068】具体的に説明すると、上記第1実施形態で
は、ラインサイズがバス幅よりも大きく、かつ高度なエ
ンコーダ6を用いて状態フラグのビット数を減らしてい
るが、この場合、データ書き込みに際して状態フラグの
内容を更新する必要がある。それは、状態フラグにはラ
イン中の被書き込み部分以外のビットの状態も含めてラ
イン全てのビットの状態を表すデータをセットしなけれ
ばならない一方で、復元機能付ラッチ回路204Aの中
には書き込みデータしかないからである。すなわち、状
態フラグをまず読んでラインのビットの状態を知り、そ
れと復元機能付ラッチ回路204Aの内容から、データ
書き込み後のビットの状態を計算して状態フラグの内容
を生成する。そのため、エンコーダ6には、フラグ保有
部1からの信号線と復元機能付ラッチ回路204Aから
の信号線が必要であった。
More specifically, in the first embodiment, the line size is larger than the bus width, and the number of bits of the status flag is reduced by using the advanced encoder 6. In this case, when writing data, It is necessary to update the contents of the status flag. That is, while the status flag must be set to data representing the status of all the bits of the line including the status of the bits other than the portion to be written in the line, the write data is stored in the latch circuit with restoration function 204A. Because there is only. That is, the state flag is read first to know the state of the bit on the line, and from the contents of the latch circuit with restoration function 204A, the state of the bit after data writing is calculated to generate the contents of the state flag. Therefore, the encoder 6 needs a signal line from the flag holding unit 1 and a signal line from the latch circuit with restoration function 204A.

【0069】これに対して、本実施形態のようにライン
サイズをバス幅と同じにした場合は、データ書き込み後
のビットの状態は0列/1列復元機能付ラッチ回路のデ
ータ内容と同じであるため、状態フラグを読む必要がな
く、従って本実施形態のエンコーダ6Aは、フラグ保有
部1からの入力が省略されている。
On the other hand, when the line size is the same as the bus width as in the present embodiment, the state of the bits after data writing is the same as the data content of the latch circuit with the 0 column / 1 column restoring function. Therefore, there is no need to read the status flag, and therefore, the input from the flag holding unit 1 is omitted in the encoder 6A of the present embodiment.

【0070】このように本実施形態のエンコーダ6A
は、上記実施形態に比べて単純化した構成となり、さら
に本実施形態では、ラインサイズがバス幅と等しいメモ
リセルアレイ203Bに対応して構成が簡素化された0
列/1列復元機能付ラッチ回路204Bを備えるほか、
アドレスのオフセット部200c、デコーダ205、及
びマルチプレクサ/デマルチプレクサ206が不要とな
るため、高速動作が可能となる。
As described above, the encoder 6A of the present embodiment
Has a simplified configuration as compared with the above-described embodiment, and furthermore, in this embodiment, the configuration is simplified corresponding to the memory cell array 203B whose line size is equal to the bus width.
In addition to a latch circuit 204B with a column / single column restoration function,
Since the address offset unit 200c, the decoder 205, and the multiplexer / demultiplexer 206 are not required, high-speed operation is possible.

【0071】図5は、本発明のキャッシュメモリの第3
実施形態を示す要部構成ブロック図であり、上記図3と
共通の要素には同一の符号が付されている。
FIG. 5 shows a third example of the cache memory of the present invention.
FIG. 4 is a block diagram of a main part configuration showing the embodiment, and the same reference numerals are given to the same elements as those in FIG.

【0072】本実施形態では、上記第1実施形態におい
て、各ラインを分割して形成したN個の細胞のうち一部
の細胞にのみ本発明の構成をとるようにしたものであ
る。上記第1実施形態で明らかなように本発明は回路規
模を増すので、プログラムの性質上効果のある細胞にの
み本発明を適用し、そうでない細胞には従来の構成を用
いれば、回路規模の増加を抑えることができる。
In the present embodiment, the configuration of the present invention is applied to only some of the N cells formed by dividing each line in the first embodiment. As is clear from the first embodiment, the present invention increases the circuit scale. Therefore, the present invention is applied only to cells that are effective due to the nature of the program, and if the conventional configuration is used for cells that are not effective, the circuit scale is increased. The increase can be suppressed.

【0073】本実施形態の具体的な構成は、図5に示す
ように、バス幅は64ビット及びラインサイズは128
ビットとし、各ダブルワードのうち下位32ビットに本
発明のデータ圧縮方式を適用せず、上位32ビットのみ
に適用している。すなわち、各々のダブルワードのうち
下位32ビットは従来の構成と同じものであり、上位3
2ビットは本発明のデータ圧縮を行う構成になってい
る。
As shown in FIG. 5, the specific configuration of this embodiment is such that the bus width is 64 bits and the line size is 128 bits.
The data compression method of the present invention is not applied to the lower 32 bits of each double word, but is applied to only the upper 32 bits. That is, the lower 32 bits of each double word are the same as the conventional configuration,
Two bits are configured to perform data compression according to the present invention.

【0074】これにより、本実施形態の0列/1列復元
機能付きラッチ回路204Cは、図3に示す下位32ビ
ットに対応するマルチプレクサ/デマルチプレクサ1
4,16を省略したものとなり、また、本実施形態のメ
モリセルアレイ203Cは、図3に示すクロックCLK
停止用NANDゲート32,34を省略したものとな
る。
As a result, the latch circuit 204C with the 0-column / 1-column restoring function of the present embodiment uses the multiplexer / demultiplexer 1 corresponding to the lower 32 bits shown in FIG.
4 and 16 are omitted, and the memory cell array 203C of the present embodiment has the clock CLK shown in FIG.
The stop NAND gates 32 and 34 are omitted.

【0075】このような構成であっても、図1に示した
接続構成には変化はないが、当然、制御信号S5,S6
のビット幅を4ビットから2ビットに、デコーダ5及び
エンコーダ6への入力信号のビット幅を128ビットか
ら64ビットに小さくでき、フラグ保有部1のビット幅
や制御信号S1,S2,S3,S4も小さくすることが
できる。さらには、デコーダ2,5及びエンコーダ6の
論理ゲート量も小さくなる。
Even with such a configuration, there is no change in the connection configuration shown in FIG.
Can be reduced from 4 bits to 2 bits, the bit width of the input signal to the decoder 5 and the encoder 6 can be reduced from 128 bits to 64 bits, and the bit width of the flag holding unit 1 and the control signals S1, S2, S3, S4 Can also be reduced. Further, the logic gate amounts of the decoders 2 and 5 and the encoder 6 are also reduced.

【0076】また、本発明のタグの内容及び構成はメモ
リセルアレイ203Cの細胞分割と無関係であり、フラ
グ保有部1は本発明のデータ圧縮を行う細胞についての
み結線すればよい(当然、従来の同じ構成をとる細胞の
ビット情報はフラグ保有部1に格納しない)。
Further, the contents and configuration of the tag of the present invention are irrelevant to the cell division of the memory cell array 203C, and the flag holding unit 1 only needs to connect the cells to be subjected to the data compression of the present invention (of course, the same as in the conventional case). The bit information of the cell having the configuration is not stored in the flag holding unit 1).

【0077】このように構成される本実施形態の動作
は、上位32ビットについては上記第1実施形態で述べ
たもの、下位32ビットについては図8の従来例で述べ
たものを、それぞれ並行して行う。読み出し時では、各
々独立して読んできた値を最後に連結すればよいし、書
き込み時ではメモリセルアレイ203Cが分離している
ので、独立に並行して各々へのアクセスを行えることは
明らかである。
The operation of the present embodiment thus configured is the same as that described in the first embodiment for the upper 32 bits and that described in the conventional example of FIG. Do it. At the time of reading, it is only necessary to concatenate the values read independently of each other at the end, and at the time of writing, since the memory cell array 203C is separated, it is apparent that each can be independently accessed in parallel. .

【0078】なお、本発明は、図示の上記第1〜第3実
施形態に限定されず種々の変形が可能である。例えばそ
の変形例としては次のようなものがある。
The present invention is not limited to the above-described first to third embodiments, and various modifications are possible. For example, there are the following modifications.

【0079】(1)状態フラグの持つ情報を「全て0」
または「それ以外」か、「全て1」または「それ以外」
のどちらかにすると、状態フラグのビット数が小さくて
済む。更に状態フラグは1ライン当たり細胞の分割数と
同じビットとなるため、エンコード、デコードが簡単に
なるたけでなく、書き込み時に状態フラグへのアクセス
幅を、書き込みデータ幅に対応したフラグ幅に限定でき
る。
(1) The information of the status flag is set to “all 0s”
Or "Other" or "All 1" or "Other"
In either case, the number of bits of the status flag can be small. Further, since the state flag has the same number of bits as the number of cell divisions per line, not only can encoding and decoding be simplified, but also the access width to the state flag at the time of writing can be limited to a flag width corresponding to the writing data width.

【0080】(2)細胞の状態を「全て0」、「全て
1」、「全て0でも全て1でもない」に分類する場合
に、状態フラグを各ラインの各細胞毎に2ビットずつ持
つようにすれば、エンコード、デコードが簡単になるた
けでなく、書き込み時に状態フラグへのアクセス幅を、
書き込みデータ幅に対応したフラグ幅に限定できる。
(2) When classifying the state of cells into "all 0s", "all 1s", and "all 0s and not all 1s", a state flag is set so that each cell in each line has 2 bits. Not only makes encoding and decoding easier, but also increases the access width to the status flag during writing.
It can be limited to the flag width corresponding to the write data width.

【0081】(3)上記実施形態よりもメモリアレイの
分割数と状態フラグのビット数を増してゆくことが可能
であることは言うまでもない。
(3) It goes without saying that the number of divisions of the memory array and the number of bits of the status flag can be increased as compared with the above embodiment.

【0082】(4)上記実施形態では、アクセスしなか
った「全て0」または「全て1」の細胞に対応する
“0”の列または“1”の列の補充機能を0列/1列復
元機能付きラッチ回路で実現したが、この機能は、マイ
クロプロセッサに既設されている符号拡張器の機能と兼
用するようにしてもよい。
(4) In the above embodiment, the replenishment function of the “0” column or the “1” column corresponding to the “all 0” or “all 1” cell that has not been accessed is restored to 0 column / 1 column. Although the function is realized by the latch circuit with the function, this function may be used also as the function of the sign extender already provided in the microprocessor.

【0083】(5)上記実施形態において、バス209
を、読み出し用、書き込み用及びリフィル用に分離した
構成であってもよい。
(5) In the above embodiment, the bus 209
May be separated for reading, writing, and refilling.

【0084】(6)上記実施形態において、読み出しデ
ータの出力先がバスでない構成であってもよい。但し、
このバスとは、複数の用途に信号線が用いられるという
狭い意味である。
(6) In the above embodiment, the output destination of the read data may not be a bus. However,
The bus has a narrow meaning that signal lines are used for a plurality of purposes.

【0085】[0085]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、単調な0データの列や単調な1データの列と
いう単調なビット情報を含むデータを読み書きする時
に、命令とは無関係にデータの内容に基づいてアクセス
幅の最適化を行い、消費電力の削減を図ることができ
る。特に、例えば本発明のキャッシュメモリをマイクロ
プロセッサに搭載した場合においてマイクロプロセッサ
のバス幅よりも小さいデータが多用されるプログラムの
実行時や、データの中に偶然入ってきた単調な0データ
の列や単調な1データの列が多いプログラムの実行時
に、消費電力削減効果が顕著となる。
As described above in detail, according to the first aspect, when reading / writing data including monotonous bit information such as a monotonic sequence of 0 data and a monotonous sequence of 1 data, the instruction Irrespective of this, the access width can be optimized based on the contents of the data, and the power consumption can be reduced. In particular, for example, when the cache memory of the present invention is mounted on a microprocessor, when a program in which data smaller than the bus width of the microprocessor is frequently used is executed, or a sequence of monotonous 0 data that accidentally enters data, When a program having many monotonous data strings is executed, the effect of reducing power consumption becomes remarkable.

【0086】第2の発明によれば、各ラインを分割して
形成したN個のブロックうち所定ブロックに対しての
み、上記第1の発明と同様の効果を奏することができ
る。これにより、回路規模の増加を抑えることが可能と
なる。
According to the second aspect, the same effect as that of the first aspect can be obtained only for a predetermined block out of N blocks formed by dividing each line. This makes it possible to suppress an increase in circuit scale.

【0087】第3の発明によれば、上記第1及び第2の
発明において、複数のラインのラインサイズと外部バス
のバス幅を等しくし、データ書き込み時には、書き込み
先ラインの状態フラグの内容を解読せずに、書き込みデ
ータの内容に基づいて前記フラグ保有部の状態フラグの
内容を新しい値にセットするようにしたので、データ書
き込み時に書き込み先ラインの状態フラグの内容が不要
となるため、構成が単純化され、高速動作が可能とな
る。
According to the third invention, in the first and second inventions, the line size of the plurality of lines and the bus width of the external bus are equalized, and when writing data, the contents of the status flag of the write destination line are changed. Since the content of the status flag of the flag holding unit is set to a new value based on the content of the write data without decoding, the content of the status flag of the write destination line is not required at the time of data writing, so the configuration Is simplified, and high-speed operation becomes possible.

【0088】第4の発明によれば、上記第1乃至第3の
発明において、状態フラグの表す内容を、各ブロック内
のメモリセル中のデータが全て0データまたはそれ以外
のデータ、あるいは全て1データまたはそれ以外のデー
タとしたので、状態フラグのビット数を小さくすること
が可能となる。さらに状態フラグは1ライン当たりブロ
ックの分割数と同じビットとなるため、構成が簡素化さ
れるだけでなく、書き込み時に、状態フラグへのアクセ
ス幅を書き込みデータ幅に対応したフラグ幅に限定する
ことができる。
According to the fourth invention, in the first to third inventions, the contents represented by the status flag are set such that the data in the memory cells in each block is all 0 data, other data, or all 1 data. Since the data is data or other data, the number of bits of the status flag can be reduced. Further, since the status flag has the same number of bits as the number of block divisions per line, not only the configuration is simplified, but also at the time of writing, the access width to the status flag is limited to a flag width corresponding to the write data width. Can be.

【0089】第5の発明によれば、上記第1乃至第4の
発明において、各ラインの各ブロックまたは所定ブロッ
ク毎に設けられる状態フラグは、それぞれ2ビットで構
成したフラグデータとしたので、構成が簡素化され、さ
らに書き込み時に状態フラグへのアクセス幅を書き込み
データ幅に対応したフラグ幅に限定できる。
According to the fifth aspect, in the first to fourth aspects, the status flag provided for each block of each line or for each predetermined block is flag data composed of 2 bits. Can be simplified, and the access width to the status flag at the time of writing can be limited to the flag width corresponding to the writing data width.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のキャッシュメモリの第1実施形態を示
す構成ブロック図である。
FIG. 1 is a configuration block diagram showing a first embodiment of a cache memory of the present invention.

【図2】第1実施形態のデータ幅の分割イメージを示す
図である。
FIG. 2 is a diagram illustrating a divided image of a data width according to the first embodiment.

【図3】図1中のメモリセルアレイ203Aと、0列/
1列復元機能付きラッチ回路204Aの具体的構成を示
す図である。
FIG. 3 shows a memory cell array 203A in FIG.
FIG. 9 is a diagram showing a specific configuration of a latch circuit with one-column restoration function 204A.

【図4】本発明のキャッシュメモリの第2実施形態を示
す構成ブロック図である。
FIG. 4 is a configuration block diagram showing a second embodiment of the cache memory of the present invention.

【図5】本発明のキャッシュメモリの第3実施形態を示
す要部構成ブロック図である。
FIG. 5 is a block diagram showing a main part of a cache memory according to a third embodiment of the present invention.

【図6】SRAMの1ビット分の構成例を示す図であ
る。
FIG. 6 is a diagram illustrating a configuration example of one bit of an SRAM.

【図7】図6に示したSRAMの1ビット分の動作を示
す波形図である。
7 is a waveform chart showing an operation for one bit of the SRAM shown in FIG. 6;

【図8】従来のキャッシュメモリ(第1の従来例)の構
成を示すブロック図である。
FIG. 8 is a block diagram showing a configuration of a conventional cache memory (first conventional example).

【図9】従来のキャッシュメモリ(第2の従来例)の構
成を示すブロック図である。
FIG. 9 is a block diagram showing a configuration of a conventional cache memory (second conventional example).

【符号の説明】[Explanation of symbols]

1 フラグ保有部 2,5 デコーダ 3,4 マルチプレクサ(mux) 6 エンコーダ 201,205 デコーダ 202 タグ保有部 203A,203B,203C メモリセルアレイ 204A,204B,204C 0列/1列復元機能付
きラッチ回路 206 マルチプレクサ/デマルチプレクサ 207 読み出し/書き込みポート 208 比較器 209 外部バス
DESCRIPTION OF SYMBOLS 1 Flag holding | maintenance part 2,5 decoder 3,4 Multiplexer (mux) 6 Encoder 201,205 Decoder 202 Tag holding | maintenance part 203A, 203B, 203C Memory cell array 204A, 204B, 204C Latch circuit 206 with 0 column / 1 column restoration function 206 multiplexer / Demultiplexer 207 Read / write port 208 Comparator 209 External bus

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ビット毎にメモリセルを備えた複数のラ
インで構成され且つ前記各メモリセルがビット毎に2本
の相補的なビット線に接続され、該ビット線を通して選
択的に前記メモリセルに対するデータの読み出し/書き
込みが行われるデータ記憶部と、外部の主記憶装置中の
位置を示すタグを保有するタグ保有部と、前記タグ保有
部中のタグとプログラム指定のタグとの一致/不一致を
比較してヒット/ヒットミスを判定するヒット判定部と
を有し、前記判定部でヒット判定された場合は、データ
読み出し時に前記データ記憶部から所定のデータを外部
へ読み出すと共に、データ書き込み時に外部からの書き
込みデータを前記データ記憶部へ書き込み、前記判定部
でヒットミス判定された場合は、前記主記憶装置からの
所要のデータを前記データ記憶部へ書き込むリフィルを
行うキャッシュメモリにおいて、 前記データ記憶部における前記各ラインをN(正の整
数)個のブロックに分割すると共に、その各ブロックの
メモリセルデータが全て0データ、全て1データまたは
それ以外の0及び1混合データであるという内容を表す
状態フラグを各ライン毎に保有するフラグ保有部を設
け、 前記データ読み出し時には、読み出しラインに対応する
前記フラグ保有部中の状態フラグの内容を参照して、該
読み出しラインにおける各ブロックのうち前記0及び1
混合データを記憶するブロックのみにアクセスすると共
に、その読み出しデータに対して前記全て0データまた
は前記全て1データに対応する0データ列または1デー
タ列を補って外部へ読み出し、 前記データ書き込み時には、書き込み先ラインに対応す
る前記フラグ保有部中の状態フラグの内容と書き込みデ
ータの内容とに基づいて前記フラグ保有部の状態フラグ
の内容を新しい値にセットすると共に、前記書き込みデ
ータのうちの0及び1混合データのみの部分を前記書き
込み先ラインに書き込み、 前記リフィル時には、書き込むべき所要データの内容に
基づいて前記フラグ保有部の状態フラグの内容を新しい
値にセットすると共に、該所要データのうちの0及び1
混合データのみの部分を前記データ記憶部へ書き込むこ
とを特徴とするキャッシュメモリ。
1. A memory system comprising: a plurality of lines each having a memory cell for each bit; each of said memory cells being connected to two complementary bit lines for each bit; A data storage unit for reading / writing data from / to a tag, a tag holding unit holding a tag indicating a position in an external main storage device, and matching / mismatch between a tag in the tag holding unit and a tag specified by a program And a hit judging unit for judging hit / hit / miss by comparing the data. When a hit is judged by the judging unit, predetermined data is read out from the data storage unit to the outside at the time of data reading, and at the time of data writing. When write data from the outside is written to the data storage unit and the hit / miss determination is made by the determination unit, the required data from the main storage device is written to the data storage unit. In a cache memory for refilling data to be written into a data storage unit, each line in the data storage unit is divided into N (positive integer) blocks, and memory cell data in each block is all 0 data and all 1 data Alternatively, a flag holding unit for holding a state flag representing the content of mixed 0 and 1 data for each line is provided, and at the time of reading the data, the content of the state flag in the flag holding unit corresponding to the read line , The above-mentioned 0 and 1 of each block in the read line
Only the block storing the mixed data is accessed, and the read data is read out to the outside by supplementing the 0 data string or the 1 data string corresponding to the all 0 data or the all 1 data. Based on the content of the status flag in the flag holding unit corresponding to the previous line and the content of the write data, the content of the status flag of the flag holding unit is set to a new value, and 0 and 1 of the write data are set. The mixed data only portion is written to the write destination line. At the time of the refill, the content of the status flag of the flag holding unit is set to a new value based on the content of the required data to be written, and 0 of the required data is set. And 1
A cache memory in which a portion including only mixed data is written to the data storage unit.
【請求項2】 ビット毎にメモリセルを備えた複数のラ
インで構成され且つ前記各メモリセルがビット毎に2本
の相補的なビット線に接続され、該ビット線を通して選
択的に前記メモリセルに対するデータの読み出し/書き
込みが行われるデータ記憶部と、外部の主記憶装置中の
位置を示すタグを保有するタグ保有部と、前記タグ保有
部中のタグとプログラム指定のタグとの一致/不一致を
比較してヒット/ヒットミスを判定するヒット判定部と
を有し、前記判定部でヒット判定された場合は、データ
読み出し時に前記データ記憶部から所定のデータを外部
へ読み出すと共に、データ書き込み時に外部からの書き
込みデータを前記データ記憶部へ書き込み、前記判定部
でヒットミス判定された場合は、前記主記憶装置からの
所要のデータを前記データ記憶部へ書き込むリフィルを
行うキャッシュメモリにおいて、 前記データ記憶部における前記各ラインをN(正の整
数)個のブロックに分割すると共に、そのうちのN個未
満の所定ブロックにおけるメモリセルデータが全て0デ
ータ、全て1データまたはそれ以外の0及び1混合デー
タであるという内容を表す状態フラグを各ライン毎に保
有するフラグ保有部を設け、 前記データ読み出し時には、読み出しラインに対応する
前記フラグ保有部中の状態フラグの内容を参照して、読
み出しラインにおける前記所定ブロックのうち前記0及
び1混合データを記憶するブロックのみにアクセスする
と共に、該所定ブロックの読み出しデータに対して前記
全て0データまたは前記全て1データに対応する0デー
タ列または1データ列を補って外部へ読み出し、 前記データ書き込み時には、書き込み先ラインに対応す
る前記フラグ保有部中の状態フラグの内容と該書き込み
先ラインの前記所定ブロックに対する書き込みデータの
内容とに基づいて、前記フラグ保有部の状態フラグの内
容を新しい値にセットすると共に、書き込み先ラインの
前記所定ブロックに対する書き込みデータのうち0及び
1混合データのみの部分を該所定ブロックへ書き込み、 前記リフィル時には、前記所定ブロックに対して書き込
むべき所要データの内容に基づいて前記フラグ保有部の
状態フラグの内容を新しい値にセットすると共に、前記
所要データのうちの0及び1混合データのみの部分を前
記所定ブロックへ書き込むことを特徴とするキャッシュ
メモリ。
2. A memory system comprising: a plurality of lines each having a memory cell for each bit, wherein each memory cell is connected to two complementary bit lines for each bit, and selectively connected to the memory cell through the bit line. A data storage unit for reading / writing data from / to a tag, a tag holding unit holding a tag indicating a position in an external main storage device, and matching / mismatch between a tag in the tag holding unit and a tag specified by a program And a hit judging unit for judging hit / hit / miss by comparing the data. When a hit is judged by the judging unit, predetermined data is read out from the data storage unit to the outside at the time of data reading, and at the time of data writing. When write data from the outside is written to the data storage unit and the hit / miss determination is made by the determination unit, the required data from the main storage device is written to the data storage unit. In a cache memory for performing a refill to be written to a data storage unit, each of the lines in the data storage unit is divided into N (positive integer) blocks, and all the memory cell data in a predetermined block less than N is 0. A flag holding unit for holding, for each line, a status flag indicating that the data is all 1 data or other mixed 0 and 1 data; and when reading the data, the flag holding unit corresponding to the read line is provided. With reference to the contents of the status flag, only the block storing the mixed data of 0 and 1 among the predetermined blocks on the read line is accessed, and the all 0 data or the all Complement 0 data string or 1 data string corresponding to 1 data When the data is written, the state of the flag holding unit is determined based on the contents of the status flag in the flag holding unit corresponding to the writing destination line and the contents of the write data for the predetermined block of the writing destination line. The content of the flag is set to a new value, and a portion of only the mixed data of 0 and 1 among the write data for the predetermined block of the write destination line is written to the predetermined block. At the time of the refill, the data should be written to the predetermined block. A cache, wherein the content of the status flag of the flag holding unit is set to a new value based on the content of the required data, and a portion of only the mixed data of 0 and 1 of the required data is written to the predetermined block. memory.
【請求項3】 前記複数のラインのラインサイズと外部
バスのバス幅を等しくし、 前記データ書き込み時には、書き込み先ラインの前記状
態フラグの内容を解読せずに、書き込みデータの内容に
基づいて前記フラグ保有部の状態フラグの内容を新しい
値にセットすることを特徴とする請求項1または請求項
2記載のキャッシュメモリ。
3. The method according to claim 1, wherein the line size of the plurality of lines is equal to the bus width of an external bus, and at the time of data writing, the content of the status flag of the write destination line is not decoded, 3. The cache memory according to claim 1, wherein the content of the status flag of the flag holding unit is set to a new value.
【請求項4】 前記状態フラグの表す内容を、前記各ブ
ロック内のメモリセル中のデータが全て0データまたは
それ以外のデータ、あるいは全て1データまたはそれ以
外のデータとしたことを特徴とする請求項1乃至請求項
3記載のキャッシュメモリ。
4. The method according to claim 1, wherein the contents represented by the status flags are all 0 data or other data, or all 1 data or other data in the memory cells in each of the blocks. The cache memory according to any one of claims 1 to 3.
【請求項5】 前記各ラインの各ブロックまたは所定ブ
ロック毎に設けられる前記状態フラグは、それぞれ2ビ
ットで構成したフラグデータであることを特徴とする請
求項1乃至請求項4記載のキャッシュメモリ。
5. The cache memory according to claim 1, wherein the status flag provided for each block or each predetermined block of each line is flag data composed of two bits.
JP8163246A 1996-06-24 1996-06-24 Cache memory Pending JPH1011360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8163246A JPH1011360A (en) 1996-06-24 1996-06-24 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8163246A JPH1011360A (en) 1996-06-24 1996-06-24 Cache memory

Publications (1)

Publication Number Publication Date
JPH1011360A true JPH1011360A (en) 1998-01-16

Family

ID=15770142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8163246A Pending JPH1011360A (en) 1996-06-24 1996-06-24 Cache memory

Country Status (1)

Country Link
JP (1) JPH1011360A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327065B2 (en) 2008-12-27 2012-12-04 Kabushiki Kaisha Toshiba Memory system, controller, and method of controlling memory system
JP2019507436A (en) * 2016-03-03 2019-03-14 クアルコム,インコーポレイテッド Power saving techniques for memory systems

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327065B2 (en) 2008-12-27 2012-12-04 Kabushiki Kaisha Toshiba Memory system, controller, and method of controlling memory system
JP2019507436A (en) * 2016-03-03 2019-03-14 クアルコム,インコーポレイテッド Power saving techniques for memory systems
JP2022040150A (en) * 2016-03-03 2022-03-10 クアルコム,インコーポレイテッド Power saving techniques for memory systems

Similar Documents

Publication Publication Date Title
US5202969A (en) Single-chip-cache-buffer for selectively writing write-back and exclusively writing data-block portions to main-memory based upon indication of bits and bit-strings respectively
US5321651A (en) Read and write circuitry for a memory
CN101346772B (en) Memory circuit and method for controlling the memory circuit
JPH04233825A (en) Programmable logic device, circuit block used in this device, method for determining whether input to aforesaid device is used in logic function and method for making input buffer of aforesaid device unusable
JPH05314779A (en) Associative memory cell and associative memory circuit
JP4445081B2 (en) Cache memory
JPH0757469A (en) Memory circuit
US4949242A (en) Microcomputer capable of accessing continuous addresses for a short time
US20020029321A1 (en) Cache system with limited number of tag memory accesses
US5588133A (en) Register block circuit for central processing unit of microcomputer
US5179676A (en) Address selection circuit including address counters for performing address selection
JPH1011360A (en) Cache memory
JP2008077768A (en) Semiconductor memory device
US6055606A (en) Writeback cache cell with a dual ported dirty bit cell and method for operating such a cache cell
US5001629A (en) Central processing unit with improved stack register operation
US7486542B2 (en) General purpose register circuit
JP2004046593A (en) Cache memory and method for controlling it
JPS6329298B2 (en)
JP2537489B2 (en) Semiconductor memory device
JP2003015952A (en) Data write circuit
JPH0772879B2 (en) Cache memory device
JPH0729378A (en) Memory and its control circuit
JP3061835B2 (en) Memory circuit
JP3360049B2 (en) Semiconductor memory
JPH07141880A (en) Memory device and data processing device