JPH0621999B2 - Cache memory access device - Google Patents

Cache memory access device

Info

Publication number
JPH0621999B2
JPH0621999B2 JP62290220A JP29022087A JPH0621999B2 JP H0621999 B2 JPH0621999 B2 JP H0621999B2 JP 62290220 A JP62290220 A JP 62290220A JP 29022087 A JP29022087 A JP 29022087A JP H0621999 B2 JPH0621999 B2 JP H0621999B2
Authority
JP
Japan
Prior art keywords
data
cache memory
signal
access device
tag
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.)
Expired - Lifetime
Application number
JP62290220A
Other languages
Japanese (ja)
Other versions
JPH01131939A (en
Inventor
正博 伊藤
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP62290220A priority Critical patent/JPH0621999B2/en
Publication of JPH01131939A publication Critical patent/JPH01131939A/en
Publication of JPH0621999B2 publication Critical patent/JPH0621999B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 <産業上の利用分野> 本発明は、直接マッピング,ストア・スルー方式でキャ
ッシュ・メモリをアクセスするキャッシュ・メモリ・ア
クセス装置に関するものであり、特にその制御方式を改
善するものである。
TECHNICAL FIELD The present invention relates to a cache memory access device for accessing a cache memory by a direct mapping and store-through method, and particularly, to improve its control method. It is a thing.

<従来の技術> 直接マッピング,ストア・スルー方式によってキャッシ
ュ・メモリをアクセスする従来の装置の例を第2図に表
わす。
<Prior Art> FIG. 2 shows an example of a conventional device for accessing a cache memory by a direct mapping and store-through method.

この図において、1は全体を制御する中央処理装置CP
U、2はキャッシュ・メモリを制御するキャッシュ制御
部、3はCPU1から出力されたキャッシュ・メモリに
対するアドレスAのタグ部の有効/無効を記憶するタグ
・バリッド部TV、4は前回アクセスしたアドレスAの
タグを保持するタグ部、5は今回与えられたアドレスA
のタグとタグ部4に保持されている内容とを比較する比
較器であり、タグ・バリッド部TV3出力と比較器5出
力はアンド・ゲート回路Gに入力される。タグ・バリッ
ド・ビットTVが有効でかつ前回のタグと今回のタグが
等しい場合にキャッシュ・メモリ・ヒットとなる。
In this figure, 1 is a central processing unit CP for controlling the whole.
U, 2 are a cache control unit for controlling the cache memory, 3 is a tag valid unit TV for storing the validity / invalidity of the tag unit of the address A with respect to the cache memory output from the CPU 1, and 4 is the previously accessed address A. The tag part that holds the tag of 5 is the address A given this time.
Of the tag valid unit TV3 and the output of the comparator 5 are input to the AND gate circuit G. A cache memory hit occurs when the tag valid bit TV is valid and the previous tag and the current tag are equal.

更に、CPU1についてデータ・バスDBの幅が32ビ
ットの時、アクセス単位が8ビット(バイト)、16ビ
ット(ワード)、24ビット、32ビット(ロング・ワ
ード)に対応するために、タグ・バリッド・ビッドTV
の他に32ビット・データを構成する4個のバイト・デ
ータそれぞれについて有効/無効を示すデータ・バリッ
ド部(DV0,DV1,DV2,DV3)6,7,8,
9を設けている。
Further, for the CPU 1, when the width of the data bus DB is 32 bits, the access unit is 8 bits (byte), 16 bits (word), 24 bits, 32 bits (long word).・ Bid TV
In addition, data valid portions (DV0, DV1, DV2, DV3) indicating valid / invalid for each of the four byte data constituting 32-bit data 6, 7, 8,
9 is provided.

一方、キャッシュ制御部2はCPU1からリード/ライ
ト信号R/W、アクセスするデータの大きさ信号Sが与
えられ、データ大きさ指示信号M0,M1,M2,M3
を出力する。但し、この図において、各々の信号M0,
M1,M2,M3は“L”アクティブとする。各々の大
きさ信号M0,M1,M2,M3はそれぞれデータ・バ
リッド信号DV0,DV1,DV2,DV3とともにオ
ア・ゲート回路g1,g2,g3,g4に与えられ、オ
ア・ゲート回路g1,g2,g3,g4の出力はアンド
・ゲート回路Gに入力される。
On the other hand, the cache control unit 2 is provided with a read / write signal R / W and a data size signal S to be accessed from the CPU 1, and the data size instruction signals M0, M1, M2, M3.
Is output. However, in this figure, each signal M0,
M1, M2 and M3 are active "L". The respective magnitude signals M0, M1, M2, M3 are given to the OR gate circuits g1, g2, g3, g4 together with the data valid signals DV0, DV1, DV2, DV3, respectively, and the OR gate circuits g1, g2, g3. , G4 are input to the AND gate circuit G.

尚、10,11,12,13はアクセスする32ビット
・データが8ビット(1バイト)ずつ格納されるデータ
部である。
It is to be noted that reference numerals 10, 11, 12, and 13 are data portions in which 32-bit data to be accessed is stored in units of 8 bits (1 byte).

このようなキャッシュ・メモリ・アクセス装置は、タグ
・バリッド・ビットTV有効で、前回タグと今回タグ一
致をみて、かつアクセスするデータ大きさを決定するオ
ア・ゲート回路g1,g2,g3,g4の出力値が与え
られるアンド・ゲート回路Gの出力によってキャッシュ
・メモリに対するヒット/ミスを判定する。そしてCP
U1はデータ・レジスタ10,11,12,13に格納
されるデータについて読み出し/書き込みを行なう。
Such a cache memory access device is effective for the tag valid bit TV, and the OR gate circuits g1, g2, g3 and g4 which determine the size of the data to be accessed by checking the previous tag match with the current tag match. The hit / miss to the cache memory is judged by the output of the AND gate circuit G to which the output value is given. And CP
U1 reads / writes the data stored in the data registers 10, 11, 12, and 13.

<発明が解決しようとする問題点> 上記した従来のキャッシュ・メモリ・アクセス装置は、
アクセスするデータのバイト毎にデータ・バリッド・ビ
ットを設定しているため、バリッド・ビッドが多くなり
この分メモリ素子数が増え、またこのための制御回路が
複雑となり、データ・アクセス制御が繁雑になるという
欠点があった。
<Problems to be Solved by the Invention> The conventional cache memory access device described above is
Since the data valid bit is set for each byte of data to be accessed, the number of valid bids increases, the number of memory elements increases correspondingly, and the control circuit for this becomes complicated, and the data access control becomes complicated. There was a drawback that

本発明はこの欠点を解決するものであり、簡単な構成で
アクセス効率の良いキャッシュ・メモリ・アクセス装置
を実現することを目的とする。
The present invention solves this drawback, and an object of the present invention is to realize a cache memory access device with a simple configuration and high access efficiency.

<問題点を解決するための手段> 本発明は、直接マッピング,ストア・スルー方式で、今
回与えられたタグ部の有効/無効を判断するとともに前
回アクセスした読み出しアドレスのタグ部と今回与えら
れたタグ部とを比較してキャッシュ・メモリに対するヒ
ット/ミスを判定するキャッシュ・メモリ・アクセス装
置において、中央処理装置からの読み出し/書き込み信
号、アクセスするデータ大きさ信号と前記ヒット/ミス
情報を入力し、前記キャッシュ・メモリに対してデータ
読み出しの際に全データ幅によってアクセスする制御信
号を出力し、データ書き込みの際に書き込むデータが前
記全データ幅より小さい場合は主記憶のみに書き込み指
示信号を出力するアクセス制御部を備えたことを特徴と
するキャッシュ・メモリ・アクセス装置である。
<Means for Solving the Problems> The present invention uses the direct mapping and store-through method to determine the validity / invalidity of the tag portion given this time and the tag portion of the read address accessed last time and the present invention. In a cache memory access device for determining hit / miss to a cache memory by comparing with a tag part, a read / write signal from a central processing unit, a data size signal to be accessed and the hit / miss information are input. , Outputs a control signal for accessing the cache memory according to the full data width when reading data, and outputs a write instruction signal only to the main memory when the data to be written is smaller than the full data width when writing data Cache memory access device comprising an access control unit Is.

<作用> 本発明のキャッシュ・メモリ・アクセス装置は、中央処
理装置がデータ,プログラムを読み出す際、ヒットの時
は全データ幅で読み出してその内の必要なデータ幅のみ
を読み出し、ミスの時は主記憶からは全データ幅で読み
出してキャッシュ・メモリに書き込みタグ部のバリッド
・ビットを有効とする。中央処理装置がデータを書き込
む際、ヒットの時は中央処理装置の示す幅でキャッシュ
・メモリと主記憶に書き込み、ミスの時は中央処理装置
が全データ幅で書き込む場合はキャッシュ・メモリと主
記憶にこの幅で書き込み、全データ幅より小さい幅で書
き込む場合は主記憶のみに書き込む。
<Operation> In the cache memory access device of the present invention, when the central processing unit reads the data or program, when the data is hit, the full data width is read and only the necessary data width is read out, and when the data is missed, the miss is made. The data is read from the main memory with the full data width and written to the cache memory, and the valid bit of the tag section is validated. When the central processing unit writes data, it writes to the cache memory and the main memory with the width indicated by the central processing unit when there is a hit, and the cache memory and the main memory when the central processing unit writes with the full data width when there is a miss When writing with this width, and writing with a width smaller than the total data width, write only in the main memory.

<実施例> 第1図に本発明を実施したキャッシュ・メモリ・アクセ
ス装置をブロック図として表わす。
<Embodiment> FIG. 1 is a block diagram showing a cache memory access device embodying the present invention.

この図において、第2図に示す従来の装置と符号が同じ
ものは同じ機能を有する。
In this figure, the same reference numerals as those of the conventional device shown in FIG. 2 have the same functions.

本発明装置の特徴は、バイト単位に設けたデータ・バリ
ッド部及びデータ大きさを決定するオア・ゲート回路を
廃し、CPU1からのリード/ライト信号R/W、デー
タ大きさ信号S及びアンド・ゲート回路Gからのヒット
/ミス信号を入力して、新たにリード/ライト信号R/
W及びデータ大きさ信号S′を出力するアクセス制御部
14を設けた点にある。
The device of the present invention is characterized in that the data valid portion provided in byte units and the OR gate circuit for determining the data size are eliminated, and the read / write signal R / W, the data size signal S and the AND gate from the CPU 1 are eliminated. Input the hit / miss signal from the circuit G and newly read / write signal R /
The access control unit 14 that outputs W and the data size signal S'is provided.

このアクセス制御部14は、CPU1からデータ読み出
し信号が与えられた場合は、この時に指定されたデータ
大きさにかかわらず全データ幅(4バイト)のアクセス
信号を出力し、データ書き込み信号が与えられた場合
は、データ大きさがこの全データ幅より小さい場合に限
って主記憶だけにデータ書き込み信号を出力するもので
ある。
When a data read signal is given from the CPU 1, the access control section 14 outputs an access signal of the entire data width (4 bytes) regardless of the data size designated at this time, and is given a data write signal. If the data size is smaller than the total data width, the data write signal is output only to the main memory.

このようなアクセス制御部14を有する本発明装置は次
のように動作する。
The device of the present invention having such an access control unit 14 operates as follows.

(イ)データ,プログラム読み出し時 CPU1はアドレスAと、データまたはプログラム読み
出し信号R/Wとデータ大きさ信号Sを出力する。
(A) At the time of reading data and program The CPU 1 outputs the address A, the data or program read signal R / W and the data size signal S.

タグ・バリッド部3の出力が有効かつ比較器5の出力が
一致の場合(ヒット)、アクセス制御部14はCPU1
からのデータ大きさ信号Sの値1バイト,2バイト,3
バイト,4バイト)の大きさにかかわらず4バイト・ア
クセス信号S′を出力して主記憶にはアクセスせず、デ
ータ部10,11,12,13から4バイトのデータま
たはプログラムを読み出す。CPU1は読み出された4
バイト・データ内の、必要な大きさのデータを読み込め
ば良い。
When the output of the tag valid unit 3 is valid and the output of the comparator 5 is coincident (hit), the access control unit 14 determines that the CPU 1
Value of the data size signal S from 1 byte, 2 bytes, 3
(4 bytes, 4 bytes), the 4-byte access signal S'is output and main memory is not accessed, and 4-byte data or program is read from the data section 10, 11, 12, 13. CPU1 read 4
All that is necessary is to read the required amount of data in the byte data.

タグ・バリッド部3の出力が無効または比較器5の出力
が不一致の場合(ミス)、CPU1はアクセス制御部1
4によりアクセスするデータの大きさにかかわらず主記
憶から4バイトでデータを読み出し、同時にデータ部1
0,11,12,13に書き込む。その後CPU1はタ
グ・バリッド・ビットを有効とし、必要なデータ幅でデ
ータまたはプログラムを読む込む。
When the output of the tag valid unit 3 is invalid or the outputs of the comparator 5 do not match (miss), the CPU 1 determines that the access control unit 1
4 bytes of data are read from the main memory regardless of the size of the data to be accessed by 4
Write to 0, 11, 12, 13. After that, the CPU 1 validates the tag valid bit, and reads the data or program with the required data width.

このように、データ部10,11,12,13からデー
タまたはプログラムを読み出す時は、アクセス制御部1
4は常に全データ幅信号(4バイト)S′を出力してデ
ータ読み出し動作を補助し、CPU1は読み出された4
バイト・データの内必要なデータ・バイト数だけ読み取
る。
In this way, when reading data or programs from the data section 10, 11, 12, 13, the access control section 1
4 always outputs the full data width signal (4 bytes) S'to assist the data read operation, and the CPU 1 reads 4
Read the required number of data bytes out of the byte data.

(ロ)データ,プログラム書き込み時 ヒット時、アクセス制御部14は機能せず、CPU1か
らのリード/ライト信号R/W、データ大きさ信号Sを
そのまま出力し、書き込むデータの大きさが4バイトの
場合は4バイト、3バイトの場合は3バイト、2バイト
の場合は2バイト、1バイトの場合は1バイトの大きさ
でCPU1は主記憶とキャッシュ・メモリのデータ格納
部にデータを書き込む。
(B) At the time of writing data and program At the time of hit, the access control unit 14 does not function, and the read / write signal R / W and the data size signal S from the CPU 1 are output as they are, and the size of the data to be written is 4 bytes. In the case of 4 bytes, in the case of 3 bytes, it is 3 bytes, in the case of 2 bytes, it is 2 bytes, and in the case of 1 byte, it is 1 byte, and the CPU 1 writes the data in the data storage section of the main memory and the cache memory.

ミス時、CPU1が4バイト・アクセスの場合は、主記
憶とキャッシュ・メモリのデータ格納部に4バイト・デ
ータを書き込む。書き込むデータの大きさが1バイト,
2バイト,3バイトの場合は書き込むデータ以外のバイ
ト値が不定のため、、データ部10,11,12,13
には書き込まず、主記憶のみにこのデータ大きさに従っ
てデータを書き込む。
At the time of a miss, if the CPU 1 has a 4-byte access, the 4-byte data is written in the data storage units of the main memory and the cache memory. The size of the data to write is 1 byte,
In the case of 2 bytes and 3 bytes, the byte values other than the data to be written are undefined, so the data part 10, 11, 12, 13
Data is not written to the main memory but data is written only to the main memory according to this data size.

このようにキャッシュ・メモリからデータまたはプログ
ラムを読み出す場合は、ヒット/ミス、アクセスするデ
ータの大きさにかかわらず、アクセス制御部の出力によ
り常に全データ幅(4バイト)でデータにアクセスする
ため、バイト毎にデータ・バリッド判定部を設けること
なく、簡単な構成でキャッシュ・メモリ・アクセス装置
を構成することができる。
In this way, when reading data or programs from the cache memory, regardless of the hit / miss or the size of the data to be accessed, the data of the entire data width (4 bytes) is always accessed by the output of the access control unit. The cache memory access device can be configured with a simple configuration without providing a data valid determination unit for each byte.

<発明の効果> 以上述べたように、本発明のキャッシュ・メモリ・アク
セス装置は、従来バイト毎に設けていたデータの有効/
無効を表わすバリッド・ビットが不要なため、バリッド
・ビットが多くなりこの分メモリ素子数を減らすことが
でき、また制御回路が複雑となることなく、キャッシュ
・メモリ・アクセス装置を簡単に構成することができ、
アクセス効率も良い。
<Effects of the Invention> As described above, the cache memory access device of the present invention enables / disables data that is conventionally provided for each byte.
Since valid bits that indicate invalidity are unnecessary, the number of valid bits can be increased, the number of memory elements can be reduced accordingly, and the cache memory access device can be easily configured without complicating the control circuit. Can
Access efficiency is also good.

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

第1図は本発明を実施したキャッシュ・メモリ・アクセ
ス装置の構成図、第2図は従来のキャッシュ・メモリ・
アクセス装置の構成図である。 1……中央処理装置CPU、2……キャッシュ制御部、 3……タグ・バリッド部、4……タグ部、5……比較
器、 6,7,8,9……データ・バリッド部、 10,11,12,13……データ部、 G……アンド・ゲート回路、 g1,g2,g3,g4……オア・ゲート回路、 DB……データ・バス。
FIG. 1 is a block diagram of a cache memory access device embodying the present invention, and FIG. 2 is a conventional cache memory access device.
It is a block diagram of an access device. 1 ... Central processing unit CPU, 2 ... Cache control unit, 3 ... Tag valid unit, 4 ... Tag unit, 5 ... Comparator, 6,7,8,9 ... Data valid unit, 10 , 11, 12, 13 ... Data section, G ... AND gate circuit, g1, g2, g3, g4 ... OR gate circuit, DB ... Data bus.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】直接マッピング,ストア・スルー方式で、
今回与えられたタグ部の有効/無効を判断するとともに
前回アクセスした読み出しアドレスのタグ部と今回与え
られたタグ部とを比較してキャッシュ・メモリに対する
ヒット/ミスを判定するキャッシュ・メモリ・アクセス
装置において、中央処理装置からの読み出し/書き込み
信号、アクセスするデータ大きさ信号と前記ヒット/ミ
ス情報を入力し、前記キャッシュ・メモリに対してデー
タ読み出しの際に全データ幅によってアクセスする制御
信号を出力し、データ書き込みの際に書き込むデータが
前記全データ幅より小さい場合は主記憶のみに書き込み
指示信号を出力するアクセス制御部を備えたことを特徴
とするキャッシュ・メモリ・アクセス装置。
1. A direct mapping, store-through method,
A cache memory access device that determines the validity / invalidity of the tag unit given this time and determines the hit / miss to the cache memory by comparing the tag unit of the read address accessed last time with the tag unit given this time In, a read / write signal from the central processing unit, a data size signal to be accessed and the hit / miss information are input, and a control signal for accessing the cache memory by the entire data width is output. However, the cache memory access device is provided with an access control unit that outputs a write instruction signal only to the main memory when the data to be written when writing data is smaller than the full data width.
JP62290220A 1987-11-17 1987-11-17 Cache memory access device Expired - Lifetime JPH0621999B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62290220A JPH0621999B2 (en) 1987-11-17 1987-11-17 Cache memory access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62290220A JPH0621999B2 (en) 1987-11-17 1987-11-17 Cache memory access device

Publications (2)

Publication Number Publication Date
JPH01131939A JPH01131939A (en) 1989-05-24
JPH0621999B2 true JPH0621999B2 (en) 1994-03-23

Family

ID=17753310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62290220A Expired - Lifetime JPH0621999B2 (en) 1987-11-17 1987-11-17 Cache memory access device

Country Status (1)

Country Link
JP (1) JPH0621999B2 (en)

Also Published As

Publication number Publication date
JPH01131939A (en) 1989-05-24

Similar Documents

Publication Publication Date Title
JP3657622B2 (en) Conversion lookaside buffer with variable page dimensions per entry
JP2507756B2 (en) Information processing device
US20050198458A1 (en) Memory controller having a read-modify-write function
JPH0630075B2 (en) Data processing device having cache memory
JPS59213084A (en) Buffer store control system
JP2773471B2 (en) Information processing device
JPH01290050A (en) Buffer memory
JPH0724029B2 (en) Emulation device
JPH0621999B2 (en) Cache memory access device
JPS61500992A (en) Improvements in or relating to computer systems
JP2927160B2 (en) Register device
KR0184454B1 (en) Real time interfacing method between emulator and host
EP0598570A2 (en) Region configuration system and method for controlling memory subsystem operations by address region
JPH0690732B2 (en) Microprocessor
JP2522063B2 (en) Single-chip micro computer
JP3155840B2 (en) Microprocessor
JP2952884B2 (en) Cache controller
JP3147236B2 (en) Cache memory device
JPH0243692A (en) Microprocessor and its cache memory
JP3219422B2 (en) Cache memory control method
JPH0752423B2 (en) Data transfer control method
JPH024016B2 (en)
JPH08263367A (en) Integrated circuit
JPS63173146A (en) Cache memory control system
JPH0565895B2 (en)