JPS62297955A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPS62297955A
JPS62297955A JP61141838A JP14183886A JPS62297955A JP S62297955 A JPS62297955 A JP S62297955A JP 61141838 A JP61141838 A JP 61141838A JP 14183886 A JP14183886 A JP 14183886A JP S62297955 A JPS62297955 A JP S62297955A
Authority
JP
Japan
Prior art keywords
cache
memory
state
data
cache memory
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
JP61141838A
Other languages
Japanese (ja)
Inventor
Toshiyuki Maekawa
俊行 前川
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.)
DIGITAL KK
Original Assignee
DIGITAL KK
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 DIGITAL KK filed Critical DIGITAL KK
Priority to JP61141838A priority Critical patent/JPS62297955A/en
Publication of JPS62297955A publication Critical patent/JPS62297955A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the malfunctions of a cache memory device by invalidating the cache hit which shows that no access is given as long as the state signal received from a CPU shown a user state and also the state signal in a protection memory shown a user state. CONSTITUTION:When a cache hit state is secured, a protection check circuit 31 decides the presence or absence a state, i.e., a protection state that receives no access as long as the state signal received from a CPU shows a use state and also the state signal in a protection memory 4 corresponding to the data to be read out shows a user state. When the protection state is confirmed, the circuit 31 produces a cache hit invalidating signal to send it to a cache controller 38. Thus the controller 38 proceeds to a cache writing action, e.g., an action to be carried out in a cache mistake mode. As a result, the wrong memory reference is avoided.

Description

【発明の詳細な説明】 3、発明の詳細な説明 (産業上の利用分野) 本発明は、キャッシュメモリを具えた情報処理装置、特
にメモリcA護を考慮したキャッシュメモリ装置に関す
るものである。
Detailed Description of the Invention 3. Detailed Description of the Invention (Field of Industrial Application) The present invention relates to an information processing device equipped with a cache memory, and particularly to a cache memory device that takes memory cA protection into consideration.

(従来の技術) 従来より、情報処理装置の処理速度を向上させる為、C
PUと主記憶装置との間に小容量ではあるが動作速度の
遠いメモリ即ちキャッシュメモリを配置することが行な
われている。
(Prior art) Conventionally, in order to improve the processing speed of information processing equipment, C
A memory that has a small capacity but a long operating speed, that is, a cache memory, is arranged between the PU and the main storage device.

キャッシュメモリ装置のシステム構成には種々のものが
あるが、本発明の対象とするシステムは第5図に示す如
く、(:PU(1)と主記憶装置(7)との間に、論理
アドレスを物理アドレスに変換するメモリ管理ユニット
(6)(以下、MMUという)を介装し、キャッシュメ
モリ(2)は論理アドレスによって参照されるものであ
る。
There are various system configurations for cache memory devices, but the system to which the present invention is applied is as shown in FIG. A memory management unit (6) (hereinafter referred to as MMU) that converts the data into a physical address is provided, and the cache memory (2) is referred to by a logical address.

M M U (6)と主記憶装置(7)とはシステムバ
ス(13)を介して連結されている。又、CPU(1)
とM M U (6)とキャッシュメモリ(2)とは論
理アドレスライン、データライン及び制御ラインから構
成されるローカルバス(51)によって連結され、MM
 U (6)とシステムバス(13)とは物理アドレス
ラ、イン、データライン及び制御ラインから構成される
ローカルバス(52)によって連結されている。
The MMU (6) and the main storage device (7) are connected via a system bus (13). Also, CPU (1)
, MMU (6), and cache memory (2) are connected by a local bus (51) consisting of a logical address line, a data line, and a control line.
The U (6) and the system bus (13) are connected by a local bus (52) consisting of physical address lines, input lines, data lines, and control lines.

斯種情報処理装置に於ては、キャッシュミスを起こさず
キャツシュヒツトが続く場合は、CPUはキャッシュメ
モリだけを参照してプログラムの実行を続けることが出
来、然も、キャッシュメモリ(2)は論理アドレスによ
って参照されるので、キャッシュメモリ(2)からデー
タを読出す際に論理アドレスを物理アドレスに変換する
必要がない。
In this type of information processing device, if the cache hit continues without causing a cache miss, the CPU can continue executing the program by referring only to the cache memory; Therefore, there is no need to convert a logical address into a physical address when reading data from the cache memory (2).

この結果、極めて高速のアクセスが可能となるのである
As a result, extremely high-speed access becomes possible.

尚、キャッシュメモリ(2)の動作は周知のキャッシュ
コントローラ(38)によって制御される。
Note that the operation of the cache memory (2) is controlled by a well-known cache controller (38).

MMU(6)は、上記アドレス変tA機能と共に、所謂
メモリ保護(me論ory protection)の
機能を有している。
The MMU (6) has a so-called memory protection function in addition to the address change tA function.

例えば、エラーが含まれているプログラムを実行した場
合、誤ってデータ領域にジャンプするとプログラムが暴
走する危険性がある。又、プログラム領域に書込みを行
なう虞れもあり、oS領域を破壊した場合には、システ
ムダウンを引き起こすことになる。これらの不具合は、
特にタイムシェアリングシステムやマルチユーザシステ
ムに於いては深刻である。
For example, when a program containing an error is executed, there is a risk that the program will run out of control if the program accidentally jumps to the data area. Furthermore, there is a risk of writing to the program area, and if the OS area is destroyed, the system will go down. These defects are
This is particularly serious in time-sharing systems and multi-user systems.

そこで、従来はMMU(6)にメモリ保護の機能を付与
し、これによって上記不具合の発生を防止しているので
ある。即ち、主記憶装置(7)の記憶領域には、ユーザ
が自由にアクセス出来るユーザ領域と、ユーザの自由な
アクセスが禁止されるスーパバイザ領域とを設ける0通
常、ユーザ領域とスーパバイザ領域は互いに一部が重複
しており、共有領域が存在する。
Therefore, conventionally, the MMU (6) is provided with a memory protection function to prevent the above-mentioned problem from occurring. That is, the storage area of the main storage device (7) is provided with a user area that can be freely accessed by the user and a supervisor area that is prohibited from being freely accessed by the user.Normally, the user area and the supervisor area are partially separated from each other. overlap, and a shared area exists.

一方、CPU(1)は、その動作モードが上位の特権状
態(スーパバイザ状態)であるか下位の特権状態(ユー
ザ状態)であるかを示す状態信号を作成してMMU(6
)へ送出し、MMtJ(6)は該状態信号に基づいてメ
モリ保護の為のセグメント違反信号を作成し、CPU(
1)へ返送するのである。この結果、CPU(1)の動
作モードがスーパバイザ状態であるときはスーパバイザ
領域にアクセスすることが許されるが、CPU(1)の
動作モードがユーザ状態であるときはスーパバイザ領域
へのアクセスが禁止される。
On the other hand, the CPU (1) creates a state signal indicating whether its operating mode is a higher privileged state (supervisor state) or a lower privileged state (user state), and
), MMtJ (6) creates a segment violation signal for memory protection based on the status signal, and sends it to the CPU (
1). As a result, when the operating mode of CPU (1) is the supervisor state, access to the supervisor area is allowed, but when the operating mode of CPU (1) is the user state, access to the supervisor area is prohibited. Ru.

又、キャッシュメモリ(2)についても同様にメモリ保
護を行なう必要があるため、キャッシュメモリ(2)の
記憶領域をスーパバイザ領域とユーザ領域とに区分する
ことが行なわれている。しかし、この場合、両頭域が互
いに完全に分割されていることに起因して、別の問題が
生じる。
Furthermore, since it is necessary to similarly protect the cache memory (2), the storage area of the cache memory (2) is divided into a supervisor area and a user area. However, in this case another problem arises due to the fact that both head regions are completely separated from each other.

(解決しようとする問題点) 論理アドレスによって参照されるキャッシュメモリ装置
に於いては、キャッシュメモリ(2)からのデータの読
出しがMMU(6)を介さずに行なわれる為、前記共有
領域のデータをアクセスする際に下記の如き不具合が生
じる。
(Problem to be Solved) In a cache memory device that is referenced by a logical address, since data is read from the cache memory (2) without going through the MMU (6), the data in the shared area When accessing, the following problem occurs.

即ち、キャッシュメモリく2)の所定番地Aに記憶され
ているデータX1を、先ずユーザ状態で読出した後、ス
ーパバイザ状態で同番地AにデータX2を書込み、更に
番地Aをユーザ状態で読出す場合、本来は最終的な読出
しデータはX2でなければならないところ、Xlとなり
、誤動作を起こすことになる。
That is, when data X1 stored at a predetermined address A in the cache memory 2) is first read in the user state, data X2 is written to the same address A in the supervisor state, and then address A is read out in the user state. Originally, the final read data should be X2, but it becomes Xl, which causes a malfunction.

通常、前記共有空間の設定は不可欠であるので、従来は
下記の如き対策を講じていた。
Normally, setting up the shared space is essential, so conventionally the following measures have been taken.

11似 キャッシュメモリに共有領域のデータが書込まれること
(ロード)を禁止するプログラムをMMU(6)に設定
する。
A program is set in the MMU (6) that prohibits writing (loading) of shared area data to the 11-like cache memory.

庄i唄 キャッシュメモリに共有領域のデータを書込む場合には
、同時にキャッシュメモリ(2)全体をクリア(無効化
)する。
When writing data in the shared area to the Sho Iuta cache memory, the entire cache memory (2) is cleared (invalidated) at the same time.

しかし、何れの対策によってもソフトウェア(プログラ
ム)の変更が必要となって、O8の標準化に逆行するこ
とになるばかりでなく、特に対策■による場合はキャッ
シュメモリのヒツト率が大幅に低下する問題を招来する
However, all of these measures require changes to the software (programs), which not only goes against the O8 standardization, but also, especially when using measure (2), there is a problem in which the hit rate of the cache memory decreases significantly. Invite.

(問題点を解決する為の手段) 本発明に係るキャッシュメモリ装置に於ては、キャッシ
ュメモリ(2)には、該キャッシュメモリに設けられた
複数の記憶領域ブロックの夫々に対応して、状態信号を
格納する為の複数のデータ格納部(40)を有する保護
メモリ(4)を連繋する。
(Means for solving the problem) In the cache memory device according to the present invention, the cache memory (2) has a state corresponding to each of a plurality of storage area blocks provided in the cache memory. A protection memory (4) having a plurality of data storage units (40) for storing signals is linked.

又、保護メモリ(4)及びキャッシュメモリ(2)には
ハードウェア回路からなる制御回路(3)を装備する。
Furthermore, the protection memory (4) and the cache memory (2) are equipped with a control circuit (3) consisting of a hardware circuit.

該制御回路(3)は、キャッシュメモリ(2)の動作を
直接に制御するキャッシュコントローラフ38)と、キ
ャッシュメモリ(2)の記憶領域ブロックにデータが書
込まれたとき、該ブロックに対応する保護メモリ(4)
内のデータ格納部(40)に状態信号を書込む記入手段
と、データ読出し動作にてキャッシュがヒツトした場合
に、CPU(1)からの状態信号がユーザ状態を示し且
つ読出されるべきデータに対応する保護メモリ(4)内
の状態信号がユーザ状態ではアクセスされていないこと
を示していときキャツシュヒツト無効化信号を作成して
キャッシュコントローラ(38)へ送る保護手段とを具
えている。
The control circuit (3) has a cache controller (38) that directly controls the operation of the cache memory (2), and when data is written to a storage area block of the cache memory (2), a control circuit that corresponds to the block. Protected memory (4)
a writing means for writing a status signal into a data storage section (40) in the CPU (1), and a writing means for writing a status signal into a data storage section (40) in the CPU (1); A protection means is provided for generating and sending a cash hit invalidation signal to the cache controller (38) when the status signal in the corresponding protection memory (4) indicates that it is not being accessed in the user state.

(作用) CPU(1)によって記憶装置がアクセスされると、キ
ャッシュコントローラ(38)は、CPU(1)からの
読出し書込み制御信号により記憶装置に対する指令がデ
ータの読出しであるのか書込みであるのかを検知する。
(Operation) When the storage device is accessed by the CPU (1), the cache controller (38) determines whether the command to the storage device is for reading or writing data based on the read/write control signal from the CPU (1). Detect.

指令がデータの註出しであるとき、キャッシュコントロ
ーラ(38)はキャッシュメモリ(2)がヒツトしたか
否かを検知する。
When the command is to annotate data, the cache controller (38) detects whether the cache memory (2) has been hit.

キャッシュミスの場合は、記憶装置の指定アドレスから
データが読出され、該データはCP U (1)へ送ら
れると共にキャッシュメモリ(2)に移される。
In the case of a cache miss, data is read from the specified address in the storage device, and the data is sent to the CPU (1) and moved to the cache memory (2).

又同時に、読出しアドレスに対応する保護メモリ(4)
内のデータ格納部に、CPU(1)から送られてくる状
態信号(スーパバイザ状態或はユーザ状態)が記入され
る。
At the same time, the protected memory (4) corresponding to the read address
A status signal (supervisor status or user status) sent from the CPU (1) is written in the data storage section in the CPU (1).

キャッシュがヒツトした場合、保護手段は、CPU(1
)からの状態信号がユーザ状態を示し且つ読出されるべ
きデータに対応する保護メモリ(4)内の状態信号がユ
ーザ状態でアクセスされていない状態−保護状態−であ
るか否かを判別する。
If the cache is hit, the protection measure is to
) indicates the user state, and it is determined whether the state signal in the protected memory (4) corresponding to the data to be read is in the user state and not accessed - the protected state.

ここで保護状態とは、キャッシュメモリ(2)の読出さ
れるべきデータ格納部(40)にはスーパバイザ状態で
書込まれたデータが格納されており、該データをユーザ
状態で読み出さんとしている状態を意味している。従っ
て、保護状態の場合にキャッシュメモリを参照すると、
前述の如く誤動作を起こすことなる。
The protected state here means that data written in the supervisor state is stored in the data storage section (40) of the cache memory (2) to be read, and the data is to be read out in the user state. means the state. Therefore, when referring to the cache memory in the protected state,
As mentioned above, this will cause malfunction.

しかし、本発明のキャッシュメモリ装置に於いては、保
護状態の場合、保護手段は、キャツシュヒツト無効化信
号を作成してキャッシュコントローラ(38)へ送り、
この結果、キャッシュコントローラ(38)はキャッシ
ュミスの場合の動作であるキャッシュ書込み動作(キャ
ッシュロード)に移る。従って、誤ったメモリ参照を起
こすことはない。
However, in the cache memory device of the present invention, in the protected state, the protection means creates a cache invalidation signal and sends it to the cache controller (38).
As a result, the cache controller (38) moves to a cache write operation (cache load), which is an operation in case of a cache miss. Therefore, no erroneous memory references occur.

保護状態でない場合は、キャツシュヒツトが有効化され
、キャッシュコントローラ(38)は通常のキャッシュ
読出し動作に移る。
If not, the cache hit is enabled and the cache controller (38) proceeds to normal cache read operations.

記憶装置に対する指令がデータ又はプログラムの読出し
である限り上記動作が繰り返され、キャッシュメモリ(
2)は適宜書き替えられつつ、CPU(1)によって参
照され、アクセスタイムの短縮が図られる。
As long as the instruction to the storage device is to read data or a program, the above operation is repeated, and the cache memory (
2) is referred to by the CPU (1) while being rewritten as appropriate, thereby shortening the access time.

CPU(1)からの指令がデータの書込みである場合は
、キャッシュメモリ内に該書込み指令のアドレスが存在
するときに限り、キャッシュコントローラ(38)に設
定された所定のキャッシュ修正動作(キャッシュモディ
ファイ)が行なわれる。
When the command from the CPU (1) is to write data, a predetermined cache modification operation (cache modification) set in the cache controller (38) is performed only when the address of the write command exists in the cache memory. will be carried out.

(発明の効果) 本発明に係るキャッシュメモリ装置に於いては、保護メ
モリ(4)は小容量のメモリ(例えば16にビットのス
タティックRAM)によって形成することが出来、又制
御回路(3)は論理回路素子等からなる簡易なハードウ
ェアによって構成することが出来るから、MMUは特殊
な機能を必要とせず、メモリ保護に伴う誤動作を防止す
る為のソフトウェアも不要である。
(Effects of the Invention) In the cache memory device according to the present invention, the protection memory (4) can be formed by a small capacity memory (for example, a 16-bit static RAM), and the control circuit (3) can be formed by a small capacity memory (for example, a 16-bit static RAM). Since the MMU can be configured with simple hardware consisting of logic circuit elements, etc., the MMU does not require any special functions, nor does it require software to prevent malfunctions associated with memory protection.

然も、従来のキャッシュメモリ装置に比べてヒツト率が
改善される。即ち、前記対策■を講じた従来装置に比べ
てもヒツト率が低下することはなく、又対策■を講じた
従来装置に比べれば、キャッシュメモリ全体がクリアさ
れる回数が減少するから、ヒツト率は向上する。
However, the hit rate is improved compared to conventional cache memory devices. In other words, the hit rate does not decrease compared to the conventional device that took the above measure (2), and compared to the conventional device that took the measure (2), the number of times the entire cache memory is cleared decreases, so the hit rate decreases. will improve.

(実施例) 第1図に示す如く、本発明に係る情報処理装置のシステ
ム構成は、CPU(1)と〜M U (6)とを連結す
る論理アドレスラインに、制御回路く3)によって制御
されるキャッシュメモリ(2)及び保護メモリ(4)を
接続したものである。
(Example) As shown in FIG. 1, the system configuration of the information processing apparatus according to the present invention is such that a logical address line connecting CPU (1) and ~M U (6) is connected to a control circuit 3) that is controlled by A cache memory (2) and a protection memory (4) are connected to each other.

尚、システムバス(5)には主記憶装置(7)の他に、
磁気ディスク装置等の2次記憶装置(図示省略)が必要
に応じて接続される。
In addition to the main storage device (7), the system bus (5) also has
A secondary storage device (not shown) such as a magnetic disk device is connected as necessary.

第2図は、キャッシュメモリ(2)、保護メモリ(4)
及び制御回路(3)の具体的な回路゛構成を示しており
、両メモリ(2)(4)は夫々スタティックRAMによ
って構成され、制御回路(3)は図示の如く論理回路素
子等からなる簡易なハードウェアによって構成されてい
る。
Figure 2 shows cache memory (2) and protection memory (4).
and the specific circuit configuration of the control circuit (3), both memories (2) and (4) are each configured by static RAM, and the control circuit (3) is a simple circuit consisting of logic circuit elements, etc. as shown in the figure. It is composed of hardware.

キャッシュメモリ(2)は第3図に示す如く、データの
有効性を判別する為のフラグ■が格納される管理情報l
 (21)と、論理アドレスのビット上位部Tが格納さ
れるアドレスタグi (20)と、記憶装置内のデータ
Dが格納されるデータ欄(22)とによって構成した多
数(N個)の記憶領域ブロックを具えている。
As shown in Figure 3, the cache memory (2) stores management information l in which a flag ■ for determining the validity of data is stored.
(21), an address tag i (20) in which the upper bit part T of the logical address is stored, and a data column (22) in which the data D in the storage device is stored. Contains area blocks.

保護メモリ(4)は、キャッシュメモリ(2)の各記憶
領域ブロックに対応して、多数(N個)のデータ格納部
(40)を具えている。各データ格納部(40)には、
キャッシュメモリ(2)に格納されているデータがユー
ザ領域のデータであるときは1”、スーパバイザ領域の
データであるときは“0”となる保護データPが格納さ
れる。
The protection memory (4) includes a large number (N) of data storage units (40) corresponding to each storage area block of the cache memory (2). Each data storage section (40) includes
Protected data P is stored which is 1" when the data stored in the cache memory (2) is data in the user area, and is 0 when it is data in the supervisor area.

キャッシュメモリ(2)及び保護メモリ(4)は、第2
図に示す如く論理アドレスラインA (Al〜An)(
54)の内、下位アドレスラインAL(A、〜Ak)(
55)によって参照される。
The cache memory (2) and the protection memory (4) are
As shown in the figure, logical address line A (Al~An) (
54), the lower address lines AL(A, ~Ak)(
55).

制御回路(3)は、従来装置に装備されているものと略
同−構成のキャッシュコントローラ(38)と、保護手
段となる保護チェック回路(31)を具えると共に、C
PUからの状態信号FCをバッファを介し保護メモリ(
4)のI10ポートへ接続して記入手段を構成している
The control circuit (3) includes a cache controller (38) having substantially the same configuration as that installed in a conventional device, a protection check circuit (31) serving as a protection means, and a C.
The status signal FC from the PU is sent to the protection memory (
4) is connected to the I10 port to constitute an entry means.

尚、状態信号FCは、“1”のときユーザ状態、“0”
のときスーパバイザ状態を示し、保護メモリ(4)に書
き込まれることにより前記保護データPとなる。
In addition, when the status signal FC is “1”, it is the user status, and “0” is the user status.
When , it indicates the supervisor state, and becomes the protected data P by being written to the protected memory (4).

論理アドレスラインA (54)及びデータライン(5
3)は、キャッシュコントローラ(38)を介してキャ
ッシュメモリ(2)及び保護メモリ(4)に接続されて
いる。
Logical address line A (54) and data line (5
3) is connected to the cache memory (2) and the protection memory (4) via the cache controller (38).

又、CPUからの状態信号に基づいてM M U (6
)が作成した前記セグメント違反信号ERは、キャッシ
ュコントローラ(38)を介してキャッシュメモリ(2
)の管理情報欄(21)に接続されている。該違反信号
ERは、MMU(6)によって不当なアクセスが検出さ
れたときは、“0″の値をとる。
Also, based on the status signal from the CPU, M M U (6
) The segment violation signal ER generated by the cache memory (2) is transmitted via the cache controller (38) to the cache memory (2
) is connected to the management information column (21). The violation signal ER takes a value of "0" when an illegal access is detected by the MMU (6).

更に、キャッシュコントローラ(38)にはCPUから
の読出し書込み制御信号WR及びバスサイクル終了確認
信号DTが入力されている。信号WRは“1”のとき読
出しす°イクルであることを示し、“0パのとき書込み
サイクルであることを示す。又、信号DTは、1”のと
きバスサイクルが終了したことを示す。
Furthermore, a read/write control signal WR and a bus cycle end confirmation signal DT from the CPU are input to the cache controller (38). Signal WR indicates a read cycle when it is "1", and indicates a write cycle when it is "0". Signal DT indicates that the bus cycle has ended when it is "1".

保護チェック回路(31)は、CPUからの状π信号F
Cが“1”(ユーザ状態)であり且つ保護メモリ(4)
から出力される保護データPが°°0”(スーパバイザ
状態)であるとき、キャツシュヒツトを無効化する信号
“0”を出力し、それ以外の場合はキャツシュヒツトを
有効化する信号“1”を出力する。
The protection check circuit (31) receives the state π signal F from the CPU.
C is “1” (user state) and protected memory (4)
When the protected data P output from .

キャツシュヒツトは、上位アドレスライン(56)とキ
ャッシュメモリ(2)のタグ欄(20)とが接続された
コンパレータ(30)によって検出される。該コンパレ
ータ(30)の出力信号とキャッシュメモリ(2)の管
理情報n (21)からの信号はアントゲ−) (32
)を経てヒツト信号Hに変換され、更に該ヒツト信号H
は、読出し書込み制御信号WR及び保護チェック回路(
31)の出力信号と共に、ナントゲート(33)へ入力
され、有効なヒツトを示すヒツト信号H′に変換される
A cash hit is detected by a comparator (30) connected between the upper address line (56) and the tag field (20) of the cache memory (2). The output signal of the comparator (30) and the signal from the management information n (21) of the cache memory (2) are
) is converted into a hit signal H, and then the hit signal H is converted into a hit signal H.
is the read/write control signal WR and protection check circuit (
31) is input to a Nant gate (33) and converted into a hit signal H' indicating a valid hit.

前記読出し書込み制御信号ER及びバスサイクル終了確
認信号DTは、図示の如くヒツト信号H等と共にアンド
ゲート(34)及び(35)へ入力される。
The read/write control signal ER and the bus cycle end confirmation signal DT are inputted to the AND gates (34) and (35) together with the hit signal H and the like as shown in the figure.

アンドゲート(34)の出力信号L0が“1”のときキ
ャッシュ書込み動作に移行すべきことを示し、アンドゲ
ート(35)の出力信号M0が“1″のときキャッシュ
修正動作に移行すべきことを示す。
When the output signal L0 of the AND gate (34) is "1", it indicates that the cache write operation should be started, and when the output signal M0 of the AND gate (35) is "1", it indicates that the shift should be made to the cache modification operation. show.

前記ヒツト信号H′とノアゲート(36)の出力信号と
は入出力制御部(37)に接続され、これによってキャ
ッシュメモリ(2)のデータ欄(22)に対するデータ
の書込み、読出しが制御される。
The hit signal H' and the output signal of the NOR gate (36) are connected to an input/output control section (37), which controls writing and reading of data to and from the data column (22) of the cache memory (2).

以下、第2図に示す制御回路(3)の回路動作を第4図
のフローチャートに基づいて説明する。但し、制御回路
(3)はハードウェア回路であって、フローチャートは
回路動作の説明に便宜上使用するものにすぎず、フロー
チャート上の動作順序は実際の回路動作の順序を示すも
のではない。
Hereinafter, the circuit operation of the control circuit (3) shown in FIG. 2 will be explained based on the flowchart of FIG. 4. However, the control circuit (3) is a hardware circuit, and the flowchart is only used for convenience in explaining circuit operations, and the order of operations on the flowchart does not indicate the actual order of circuit operations.

f二叉1此し咋 読出し書込み制御信号WRは“1”に設定されており、
これによってキャッシュコントローラ(38)は主記憶
装置(7)への指令がデータの読出しであることを検知
する(第4図(8))。
The f-fork 1 read/write control signal WR is set to "1",
As a result, the cache controller (38) detects that the command to the main storage device (7) is to read data ((8) in FIG. 4).

アドレスライン(54)によって指定されるキャッシュ
メモリ(2)のタグ欄(20)の内容T(アドレス)と
、上位アドレスラインA H(56)の値とが一致して
いるかどうかがコンパレータ(3o)によって判別され
る(第4図(81))。
A comparator (3o) checks whether the content T (address) of the tag column (20) of the cache memory (2) specified by the address line (54) matches the value of the upper address line A H (56). (Fig. 4 (81)).

両アドレスが一致しないキャッシュミスの場合は、後述
のキャッシュ書込み動作(第4図(91)が実行される
In the case of a cache miss in which the two addresses do not match, a cache write operation (FIG. 4 (91)), which will be described later, is executed.

両アドレスが一致してコンパレータ(30)の出力が“
0”となり且つキャッシュメモリ(2)の管理情報1f
i (21)の出力(フラグ■)が“1”のとき、アン
ドゲート(32)の出力信号Hはキャツシュヒツトを表
わす“1゛となる(第4図(82))。
Both addresses match and the output of the comparator (30) becomes “
0” and management information 1f of cache memory (2)
When the output (flag -) of i (21) is "1", the output signal H of the AND gate (32) becomes "1" representing a cash hit (FIG. 4 (82)).

CPUからの状態信号FCが“0パであり(第4図(8
3))、若しくは保護メモリ(4)内の保護データPが
“1”であるときく第4図(84))、保護チェック回
路(31)の出力は1″となる。これによってナンドゲ
ー) (33)への入力信号が全て“1”となったとき
、ナントゲート(33)の出力H′は“0”となり、デ
ータライン(53)に介装された入出力制御部(37)
へデータ読出し指令として送られる。
The status signal FC from the CPU is “0” (Fig. 4 (8)).
3)), or when the protection data P in the protection memory (4) is "1" (Fig. 4 (84)), the output of the protection check circuit (31) becomes 1". As a result, the output of the protection check circuit (31) becomes 1". When all the input signals to 33) become "1", the output H' of the Nant gate (33) becomes "0", and the input/output control section (37) interposed in the data line (53)
is sent as a data read command.

尚、アンドゲート(34)の出力信号L0及びアンドゲ
ート(35)の出力信号B0は共に“0”を示し、ノア
ゲート(36)の出力信号は、“1”となる。
Note that the output signal L0 of the AND gate (34) and the output signal B0 of the AND gate (35) both indicate "0", and the output signal of the NOR gate (36) becomes "1".

この結果、入出力制御部(3))はCPUへ向かう方向
のゲートが開放され、キャッシュメモリ(2)のデータ
! (22)内のデータはデータライン(53)を経て
cpuへ送出(第4図(9))される。
As a result, the gate of the input/output control unit (3) in the direction toward the CPU is opened, and the data in the cache memory (2) is opened! The data in (22) is sent to the CPU via the data line (53) ((9) in FIG. 4).

CPUからの状態信号FCが“1”であり、且つ保護メ
モリ(4)内の保護データPが“0”のときは、キャッ
シュミスの場合の動作であるキャッシュ書込み動作(第
4図(91))に移行する。
When the status signal FC from the CPU is "1" and the protected data P in the protected memory (4) is "0", the cache write operation (FIG. 4 (91) ).

キャッシュ書込み動作に於いては、アントゲ−) (3
4)の出力信号L0は“1”、アンドゲート(35)の
出力信号B。は“0”を示し、ノアゲート(36)の出
力信号は“0”となる。
In the cache write operation, Antogame) (3
The output signal L0 of 4) is "1", and the output signal B of the AND gate (35). indicates "0", and the output signal of the NOR gate (36) becomes "0".

この結果、入出力制御部(37)はキャッシュメモリ(
2)へ向かう方向のゲートが開放し、主記憶装置からデ
ータライン(53)を経て送られてくるデータがデータ
欄(22)の指定番地に書き込まれると共に、アドレス
ラインA L (55)によって指定される保護メモリ
(4)内のデータ格納部り40)へ状態信号FCが記入
される。又同時に、主記憶装置から送られてくるデータ
はCPUへ転送される。
As a result, the input/output control unit (37) has a cache memory (
2) is opened, and the data sent from the main memory via the data line (53) is written to the specified address in the data field (22), and the data specified by the address line A L (55) is written. A status signal FC is written into the data storage section 40) in the protected memory (4). At the same time, data sent from the main memory is transferred to the CPU.

例えば、前記(解決しようとする問題点)で挙げたメモ
リ保護に伴う誤動作例については、本発明の装置では下
記の如く誤動作が防止される。
For example, regarding the example of malfunction associated with memory protection cited above (problems to be solved), the device of the present invention prevents malfunction as described below.

即ち、スーパバイザ状態で書込まれた共有領域のデータ
をユーザ状態で読出す際、CPUからの状態信号FCは
ユーザ状態を表わす“l”を示し、且つ保護メモリ(4
)内の保護データPはスーパバイザ状態を表わす“0”
を示しているから、保護チェック回路(31)の出力は
“0′°となってキャツシュヒツトが無効化され、キャ
ッシュミスの場合のキャッシュ書込み動作に移行する。
That is, when data in the shared area written in the supervisor state is read out in the user state, the state signal FC from the CPU indicates "l" representing the user state, and the protection memory (4
) The protected data P is “0” indicating the supervisor status.
Therefore, the output of the protection check circuit (31) becomes "0'°, the cache hit is invalidated, and a transition is made to the cache write operation in the case of a cache miss."

従って、メモリ保護に伴う誤動作は起こらない。Therefore, malfunctions associated with memory protection do not occur.

デ:ノJJみ贋− 読出し書込み信号WRが“0”の場合、書込み指定アド
レスのデータがキャッシュメモリ(2)内に存在すると
きは、CPUからのデータが主記憶装置に書込まれると
同時に、該データに基づいてキャッシュメモリ(2)が
修正(キャッシュモディファイ)され、保護メモリ(4
)の修正も同時に行なわれる(第4図(92))。
When the read/write signal WR is "0" and the data at the address specified for writing exists in the cache memory (2), the data from the CPU is written to the main memory at the same time. , the cache memory (2) is modified (cache modified) based on the data, and the protected memory (4) is modified (cache modified) based on the data.
) is also corrected at the same time (FIG. 4 (92)).

書込み指定アドレスのデータがキャッシュメモリ(2)
内に存在しないときは、キャッシュメモリ(2)に変化
はない。
Data at write address is cache memory (2)
If the cache memory (2) does not exist, there is no change in the cache memory (2).

上記キャッシュメモリ装置に於いては、キャッシュメモ
リ(2)及び保護メモリ(4)は高速小容量のRAMに
よって形成出来、然も制御回路(3)は論理回路素子を
中心に構成されている。又、両メモリ(2)(4)は論
理アドレスによって参照され、データ読出し動作にMM
Uによるアドレス変換は介在しない、従って、データの
書込み及び読出しに伴う処理は極めて高速で行なわれ、
充分にキャッシュメモリの性能が発揮される。然も、本
発明の構成に於いて、正常なメモリ保護の為にプログラ
ムを変更する必要は全く無く、標準O8の移植も容易で
ある。
In the above cache memory device, the cache memory (2) and the protection memory (4) can be formed by high-speed, small-capacity RAM, and the control circuit (3) is mainly composed of logic circuit elements. Also, both memories (2) and (4) are referenced by logical addresses, and MM is used for data read operations.
Address conversion by U is not involved, therefore, processing associated with writing and reading data is performed at extremely high speed.
The performance of the cache memory is fully demonstrated. However, in the configuration of the present invention, there is no need to change the program for normal memory protection, and standard O8 porting is easy.

尚、本発明の各部構成は上記実施例に限らず、特許請求
の範囲に記載の技術的範囲内で種々の変形が可能である
Note that the configuration of each part of the present invention is not limited to the above-mentioned embodiments, and various modifications can be made within the technical scope of the claims.

例えば、保護メモリ(4)は上記実施例では各データ格
納部(40)が1ビツトで構成されているが、複数ビッ
トで構成しても可いのは勿論である。例えば2ビツトの
場合は、ユーザ領域及びスーパバイザ領域を更にデータ
領域とプログラム領域に分けることが出来、これによっ
て多様なモード制御が可能となる。
For example, in the above embodiment, each data storage section (40) of the protection memory (4) is composed of one bit, but it goes without saying that it may be composed of a plurality of bits. For example, in the case of 2 bits, the user area and supervisor area can be further divided into a data area and a program area, thereby making it possible to control various modes.

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

第1図は本発明に係るキャッシュメモリ装置を具えた情
報処理装置のシステム構成図、第2図はキャッシュメモ
リ装置の回路構成図、第3図はメモリ構造の説明図、第
4図は制御回路の動作を説明するフローチャート、第5
図は従来装置のシステム構成図である。
FIG. 1 is a system configuration diagram of an information processing device equipped with a cache memory device according to the present invention, FIG. 2 is a circuit configuration diagram of the cache memory device, FIG. 3 is an explanatory diagram of the memory structure, and FIG. 4 is a control circuit. Flowchart explaining the operation of
The figure is a system configuration diagram of a conventional device.

Claims (1)

【特許請求の範囲】[Claims] [1]CPU(1)と記憶装置との間に、CPU(1)
の動作モードが上位の特権状態(スーパバイザ状態)で
あるか下位の特権状態(ユーザ状態)であるかを示す状
態信号に基づいてメモリ保護を行なうメモリ管理ユニッ
ト(6)を介装すると共に、CPU(1)とメモリ管理
ユニット(6)とを連結する論理アドレスラインには、
キャッシュコントローラ(38)によって制御されるキ
ャッシュメモリ(2)を接続した情報処理装置に於て、
キャッシュメモリ(2)には、該キャッシュメモリに設
けられた複数の記憶領域ブロックの夫々に対応して、前
記状態信号を格納する為の複数のデータ格納部(40)
を有する保護メモリ(4)を連繋すると共に、該保護メ
モリ(4)及びキャッシュメモリ(2)に制御回路(3
)を装備して構成され、該制御回路(3)は、前記キャ
ッシュコントローラ(38)と、キャッシュメモリ(2
)の記憶領域ブロックにデータが書込まれたとき該ブロ
ックに対応する保護メモリ(4)内のデータ格納部(4
0)に状態信号を書込む記入手段と、データ読出し動作
にてキャッシュがヒットした場合に、CPU(1)から
の状態信号がユーザ状態を示し且つ読出されるべきデー
タに対応する保護メモリ(4)内の状態信号がユーザ状
態ではアクセスされていないことを示しているときキャ
ッシュヒット無効化信号を作成してキャッシュコントロ
ーラ(38)へ送る保護手段とを具えていることを特徴
とするキャッシュメモリ装置。
[1] Between the CPU (1) and the storage device, the CPU (1)
A memory management unit (6) is provided which performs memory protection based on a status signal indicating whether the operating mode of the CPU is a higher privileged state (supervisor state) or a lower privileged state (user state). The logical address line connecting (1) and memory management unit (6) includes
In an information processing device connected to a cache memory (2) controlled by a cache controller (38),
The cache memory (2) includes a plurality of data storage units (40) for storing the status signals corresponding to each of the plurality of storage area blocks provided in the cache memory.
A control circuit (3) is connected to the protection memory (4) and the cache memory (2).
), and the control circuit (3) includes the cache controller (38) and the cache memory (2).
) When data is written to the storage area block of the data storage section (4) in the protected memory (4) corresponding to the block
writing means for writing a status signal into the protected memory (4), in which the status signal from the CPU (1) indicates the user status and corresponds to the data to be read when the cache is hit in a data read operation; ) A cache memory device characterized by comprising a protection means for generating a cache hit invalidation signal and sending it to the cache controller (38) when the status signal in the user status indicates that the cache hit invalidation signal is not being accessed in the user status. .
JP61141838A 1986-06-17 1986-06-17 Cache memory device Pending JPS62297955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61141838A JPS62297955A (en) 1986-06-17 1986-06-17 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61141838A JPS62297955A (en) 1986-06-17 1986-06-17 Cache memory device

Publications (1)

Publication Number Publication Date
JPS62297955A true JPS62297955A (en) 1987-12-25

Family

ID=15301320

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61141838A Pending JPS62297955A (en) 1986-06-17 1986-06-17 Cache memory device

Country Status (1)

Country Link
JP (1) JPS62297955A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5710842A (en) * 1980-05-23 1982-01-20 Ibm Multiple programming data processing system
JPS62121559A (en) * 1985-11-22 1987-06-02 Hitachi Ltd Calculator system
JPS62145342A (en) * 1985-12-20 1987-06-29 Fujitsu Ltd Cache memory system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5710842A (en) * 1980-05-23 1982-01-20 Ibm Multiple programming data processing system
JPS62121559A (en) * 1985-11-22 1987-06-02 Hitachi Ltd Calculator system
JPS62145342A (en) * 1985-12-20 1987-06-29 Fujitsu Ltd Cache memory system

Similar Documents

Publication Publication Date Title
JP4395425B2 (en) Data processing apparatus and method for processing corrupted data values
JPS6046744B2 (en) Computer operating system security devices
US4701846A (en) Computer system capable of interruption using special protection code for write interruption region of memory device
JPH041374B2 (en)
US10824560B2 (en) Using a memory safety violation indicator to detect accesses to an out-of-bounds or unallocated memory area
US3986169A (en) Device protection method and apparatus
US5701437A (en) Dual-memory managing apparatus and method including prioritization of backup and update operations
JP3995883B2 (en) Memory protection system for multitasking systems
US6584580B1 (en) Processor and multiprocessor system
JPS62297955A (en) Cache memory device
JPS6342294B2 (en)
JPS63317975A (en) Right protecting mechanism for magnetic disk device
JPH1078919A (en) Device for preventing illegal access
JPS6250863B2 (en)
JPH01123342A (en) Writing protecting circuit for memory
JP2656558B2 (en) Cache memory control circuit
JPS6118054A (en) Memory protection system
JPS6043542B2 (en) information processing equipment
JPS63129440A (en) Store through buffer device
JPS6226490B2 (en)
JPH01258054A (en) Access control system for storage device
JPH056706B2 (en)
JPH024016B2 (en)
JPH04233052A (en) Duplex memory device
JPS6346549A (en) Debug device