JP2003015957A - Cache memory control system - Google Patents

Cache memory control system

Info

Publication number
JP2003015957A
JP2003015957A JP2001197708A JP2001197708A JP2003015957A JP 2003015957 A JP2003015957 A JP 2003015957A JP 2001197708 A JP2001197708 A JP 2001197708A JP 2001197708 A JP2001197708 A JP 2001197708A JP 2003015957 A JP2003015957 A JP 2003015957A
Authority
JP
Japan
Prior art keywords
cache memory
register
instruction
block
cache
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
JP2001197708A
Other languages
Japanese (ja)
Inventor
Takaya Sawai
孝哉 澤井
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2001197708A priority Critical patent/JP2003015957A/en
Publication of JP2003015957A publication Critical patent/JP2003015957A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a cache memory control system such that the continuous or alternative execution of a plurality of programs that cache arbitrary blocks does not leave only low substitution precedence blocks in the cache memory that result in a deadlock at worst. SOLUTION: A precedence register 14 holds a precedence for every corresponding block in the cache memory 20, if data not existing in the cache memory 20 is accessed by an instruction, or equivalently, if a cache miss hit occurs, and, if a substitution block determination device 15 determines that the every register in the precedence register 14 indicates 1, a corresponding PID register 18 substitutes the data read out from a main memory 21 for the block different from the process number of the instruction in execution.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、キャッシュメモリ
制御システムに関し、特に任意ブロックをキャッシング
する複数のプログラム(プロセス)を、連続あるいは交互
に実行した場合に、置換対象となるブロックが不足し、
最悪の場合にデッドロックに陥ることがないようにした
キャッシュメモリ制御システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory control system, and in particular, when a plurality of programs (processes) for caching arbitrary blocks are executed continuously or alternately, there are insufficient blocks to be replaced,
The present invention relates to a cache memory control system that prevents a deadlock in the worst case.

【0002】[0002]

【従来の技術】特開平7-182235号公報には、任意のブロ
ックをキャッシングすることが可能な技術が開示されて
いる。図2は従来例(特開平7-182235号公報)のブロッ
ク図である。図2に示すように、従来のキャッシュシス
テムは、複数ブロックで構成されるキャッシュメモリ1
01と、内部バス102と主記憶に接続してキャッシュ
メモリ101への入出力を制御するキャッシュ制御装置
103と、キャッシュメモリ101の各ブロックに対応
する複数レベルで構成され、キャッシュメモリ101の
対応するブロックに保持されているデータの置換優先順
位を含んでいる第1の保持装置(順位レジスタ)104
と、インストラクションにより値を設定する機構を有
し、第1の保持装置104の保持内容を変更する場合の
変更値を含んでいる第2の保持装置(指定順位保持装
置)105と、第1の保持装置104に接続して、該第
1の保持装置104に保持されている置換優先順位を用
いてキャッシュメモリ101の置換ブロックを判定する
置換ブロック判定装置108を備えてなる。
2. Description of the Related Art Japanese Patent Laid-Open No. 7-18235 discloses a technique capable of caching arbitrary blocks. FIG. 2 is a block diagram of a conventional example (Japanese Patent Laid-Open No. 7-182235). As shown in FIG. 2, the conventional cache system has a cache memory 1 composed of a plurality of blocks.
01, a cache controller 103 for controlling input / output to / from the cache memory 101 by connecting to the internal bus 102 and the main memory, and a plurality of levels corresponding to each block of the cache memory 101. A first holding device (rank register) 104 containing the replacement priority of the data held in the block
A second holding device (designated order holding device) 105 having a mechanism for setting a value by an instruction and including a changed value when changing the held content of the first holding device 104; A replacement block determination device 108 that is connected to the holding device 104 and determines a replacement block of the cache memory 101 using the replacement priority order held in the first holding device 104 is provided.

【0003】図中、106は命令レジスタ、107は命
令デコーダで或る命令レジスタ106は、プロセッサの
命令を保持するレジスタであり、プログラムされた命令
を順次取り込みそれを保持する。命令デコーダ107
は、命令レジスタ106に保持された命令を解釈し、プ
ロセッサ内の各ユニットに動作の詳細を指示する。本例
では解釈した命令が優先順位に指定する命令を含んでい
た場合、信号線aによりその順位を指定順位保持装置
(第2の保持装置)105に転送する。指定順位保持装
置105は信号線aから送られてきた順位を示す値を保
持する。なお、このとき保持された順位は、次に優先順
位を指定する命令が実行されるまで保持され続ける。
In the figure, reference numeral 106 is an instruction register, 107 is an instruction decoder, and the instruction register 106 is a register for holding instructions of a processor, which sequentially fetches programmed instructions and holds them. Instruction decoder 107
Interprets the instruction held in the instruction register 106 and instructs each unit in the processor of the operation details. In this example, when the interpreted instruction includes an instruction to be designated as a priority order, the order is transferred to the designated order holding device (second holding device) 105 through the signal line a. The designated rank holding device 105 holds the value indicating the rank sent from the signal line a. The rank held at this time is kept held until the next instruction for designating the priority rank is executed.

【0004】キャッシュ制御装置103は、プロセッサ
の読み出し指示に従い、信号線eを用いてキャッシュメ
モリ101に所望のデータが存在するかどうかを問い合
わせ、存在する場合にはキャッシュメモリ101からの
読み出し及び順位レジスタ104の更新の指示を実行
し、存在しない場合には主記憶109からの読み出し及
びキャッシュメモリ101のブロック置換を実行する。
本例では、プログラムされた命令により、ある任意の優
先順位が常に指定順位保持装置105に保持されてい
る。従って、順位レジスタ104の更新は、単に信号線
bが示すブロックに対して指定順位保持装置105の内
容を書き込むことで実現する。
The cache control unit 103 inquires whether the desired data exists in the cache memory 101 by using the signal line e in accordance with the read instruction from the processor, and if there is, reads from the cache memory 101 and the order register. The update instruction of 104 is executed, and if it does not exist, the reading from the main memory 109 and the block replacement of the cache memory 101 are executed.
In this example, a given order of priority is always held in the designated order holding device 105 by a programmed instruction. Therefore, the update of the rank register 104 is realized by simply writing the contents of the designated rank holding device 105 to the block indicated by the signal line b.

【0005】例を挙げて説明する。ただし、簡単のた
め、順位レジスタ104に保持する値は、優先順位を最
大とする場合は1、優先順位を最小とする場合は0、と
する。また、初期状態で順位レジスタ104の(C0,
C1,C2,C3)には(0,0,0,0)が入ってい
るものとする。或る命令B,C,Dを強制的にキャッシ
ュメモリに入れて、一定の十分に高速な環境で動作させ
た場合、本例では、命令Bの直前に優先順位を1にする
命令Aを入れ、命令Dの直後に優先順位を0にする命令
Eを入れる。
An example will be described. However, for simplification, the value held in the priority register 104 is set to 1 when the priority is maximized and 0 when the priority is minimized. Further, in the initial state, (C0,
It is assumed that (1, C2, C3) contains (0, 0, 0, 0). When a certain instruction B, C, D is forcibly put in the cache memory and is operated in a constant and sufficiently high-speed environment, in this example, the instruction A whose priority is 1 is inserted immediately before the instruction B. Immediately after the instruction D, the instruction E for setting the priority to 0 is inserted.

【0006】このときのプロセッサの動作は次のように
なる。まず命令Aを受け取った命令デコーダ107は、
信号線aを介して指定順位保持装置105に1を書き込
む。続けて実行される命令Bがメモリをアクセスし、仮
にそのデータがキャッシュメモリ101のB0に存在す
ると仮定すると、キャッシュ制御装置103は信号線b
を介して順位レジスタ104のC0を選択する信号を発
生する。指定順位保持装置105には先に命令Aで設定
した1が入っているので、順位レジスタ104のC0は
1になる。よって、順位レジスタ104は(1,0,
0,0)となる。B1,B2,B3に存在した場合も同
様で、C1,C2,C3のいずれかが1となる。
The operation of the processor at this time is as follows. First, the instruction decoder 107, which has received the instruction A,
1 is written to the designated order holding device 105 via the signal line a. Assuming that the instruction B to be executed subsequently accesses the memory and the data is present in B0 of the cache memory 101, the cache control device 103 uses the signal line b.
A signal for selecting C0 of the rank register 104 is generated via. Since the designated rank holding device 105 contains 1 previously set by the instruction A, C0 of the rank register 104 becomes 1. Therefore, the rank register 104 is (1, 0,
0,0). The same is true when they exist in B1, B2, and B3, and one of C1, C2, and C3 becomes 1.

【0007】命令Bがキャッシュメモリ101に存在し
ないデータをアクセスした場合、即ちキャッシュミスヒ
ットを起こした場合は、キャッシュ制御装置103は主
記憶109からデータを読み出し、キャッシュメモリ1
01の、対応する順位レジスタ104が0であるブロッ
クを読み出したデータで置換する。同時に置換されたブ
ロックに対応する順位レジスタ104には1が入れら
れ、結局命令Bの入っているブロックの優先順位は1と
なる。以下、命令C,Dも同様にして順位レジスタ10
4の0の部分に入れられ、それぞれその値を1に設定し
ていく。よって、命令Dが終了した時点では、順位レジ
スタ104の4つのレジスタのうち3つが1になる。次
の命令Eで指定順位保持装置105は0に戻されるた
め、以降の命令は全て残った0のブロックを置換し、そ
のブロックに0を書き込むという動作を繰り返す。即
ち、命令B,C,Dは常にキャッシュメモリ上に保持さ
れることになる。
When the instruction B accesses data that does not exist in the cache memory 101, that is, when a cache mishit occurs, the cache control device 103 reads the data from the main memory 109, and the cache memory 1
The block of 01, in which the corresponding rank register 104 is 0, is replaced with the read data. At the same time, 1 is placed in the order register 104 corresponding to the blocks replaced at the same time, and the priority order of the block containing the instruction B becomes 1. Hereinafter, the instructions C and D are similarly processed in the order register 10
It is put in the 0 part of 4, and its value is set to 1 respectively. Therefore, when the instruction D is completed, three of the four registers of the rank register 104 become 1. The designated order holding device 105 is returned to 0 by the next instruction E, so that the subsequent instructions repeat the operation of replacing the remaining block of 0 and writing 0 to the block. That is, the instructions B, C and D are always held in the cache memory.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、この従
来技術は、次のような問題点があった。問題点は、任意
ブロックをキャッシングする複数のプログラム(プロセ
ス)を、連続あるいは交互に実行した場合、置換順位が
低いブロックばかりとなり、置換対象となるブロックが
不足し、最悪の場合デッドロックに陥ることである。そ
の理由は、置換対象ブロックが不足した場合の対策が盛
り込まれていないためである。
However, this conventional technique has the following problems. The problem is that when multiple programs (processes) that cache arbitrary blocks are executed consecutively or alternately, only the blocks with a low replacement order are available, the blocks to be replaced are insufficient, and in the worst case, a deadlock occurs. Is. The reason is that no measures are taken when the replacement target blocks are insufficient.

【0009】そこで本発明の課題は、任意ブロックをキ
ャッシングする複数のプログラム(プロセス)を、連続あ
るいは交互に実行した場合、置換順位が低いブロックば
かりとなり、置換対象となるブロックが不足し、最悪の
場合デッドロックに陥ることがないようにしたキャッシ
ュメモリ制御システムを提供することである。
Therefore, the problem of the present invention is that, when a plurality of programs (processes) for caching arbitrary blocks are executed continuously or alternately, only the blocks having a low replacement order are provided, and the blocks to be replaced are insufficient, which is the worst case. In this case, it is to provide a cache memory control system that prevents a deadlock.

【0010】[0010]

【課題を解決するための手段】前記課題を解決するため
に本発明は、複数ブロックで構成したキャッシュメモリ
における、対応するブロック毎に優先処理順位を順位レ
ジスタに保持しておき、或る命令が前記キャッシュメモ
リに対しキャッシュミスヒットし、且つ前記順位レジス
タのデータが全て同一状態値である場合には、実行中の
命令のプロセス番号と異なるブロックを、主記憶から読
み出したデータで置換することを特徴とする。
In order to solve the above-mentioned problems, according to the present invention, in a cache memory composed of a plurality of blocks, a priority processing order is held in a priority register for each corresponding block, and a certain instruction is stored. When there is a cache miss in the cache memory and all the data in the rank register have the same state value, a block different from the process number of the instruction being executed is replaced with the data read from the main memory. Characterize.

【0011】このようにすれば、任意のブロックの置換
順位の判定に、命令実行時のプロセス番号も用いている
ので、任意のブロックをキャッシング可能とする複数の
プログラムを連続実行することができる。従って、任意
ブロックをキャッシングする複数のプログラム(プロセ
ス)を、連続あるいは交互に実行した場合、置換順位が
低いブロックばかりとなり、置換対象となるブロックが
不足し、最悪の場合デッドロックに陥ることがない。
With this configuration, since the process number at the time of executing an instruction is also used to determine the replacement order of an arbitrary block, it is possible to continuously execute a plurality of programs capable of caching an arbitrary block. Therefore, when multiple programs (processes) that cache arbitrary blocks are executed consecutively or alternately, only blocks with a low replacement order will run short of blocks to be replaced, and in the worst case, deadlock will not occur. .

【0012】[0012]

【発明の実施の形態】(I)概要説明 実施例の説明に先立ち、本発明の概要を、図1を参照し
つつ説明する。本発明によるキャッシュシステムは、複
数プログラム(プロセス)実行時にインストラクションに
より設定された置換優先順位を用いる置換ブロック判定
において、プロセス番号も用いることでデッドロックを
防ぎ円滑な置換ブロック判定を行うものである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS (I) Outline Description Prior to the description of the embodiments, the outline of the present invention will be described with reference to FIG. The cache system according to the present invention prevents deadlock and makes a smooth replacement block judgment by using the process number in the replacement block judgment using the replacement priority order set by the instruction when a plurality of programs (processes) are executed.

【0013】図1において、順位レジスタ14はキャッ
シュメモリ20に対応するブロック毎に順位を保持して
おり、或る命令がキャッシュメモリ20に存在しないデ
ータをアクセスした場合、即ちキャッシュミスヒットを
起こした場合は、キャッシュ制御装置19は主記憶21
からデータを読み出し、キャッシュメモリ20の何れか
のブロックを読み出したデータで置換するが、置換ブロ
ック判定装置15において順位レジスタ14が全て1で
あると判定した場合、対応するPIDレジスタ18が実
行中の命令のプロセス番号と異なるブロックを、主記憶
21から読み出したデータで置換する。
In FIG. 1, the rank register 14 holds the rank for each block corresponding to the cache memory 20, and when an instruction accesses data that does not exist in the cache memory 20, that is, a cache mishit occurs. In this case, the cache control device 19 uses the main memory 21.
Data is read from the cache memory 20 and any block of the cache memory 20 is replaced with the read data. When the replacement block determination device 15 determines that the rank registers 14 are all 1, the corresponding PID register 18 is executing. The block different from the process number of the instruction is replaced with the data read from the main memory 21.

【0014】このようにすれば、任意のブロックの置換
順位の判定に、命令実行時のプロセス番号も用いている
ので、任意ブロックをキャッシングする複数のプログラ
ム(プロセス)を、連続あるいは交互に実行した場合に、
置換順位が低いブロックばかりとなり、置換対象となる
ブロックが不足し、最悪の場合にデッドロックに陥るこ
とがない。
In this way, since the process number at the time of executing an instruction is also used to determine the replacement order of an arbitrary block, a plurality of programs (processes) for caching an arbitrary block are executed continuously or alternately. In case,
Only the blocks with a low replacement order are available, the blocks to be replaced are insufficient, and deadlock does not occur in the worst case.

【0015】(II)実施例の説明 以下、本発明を図示の実施例に基づいて説明する。図1
は本実施例のブロック図である。命令レジスタ11は、
プロセッサの命令を保持するレジスタであり、プログラ
ムされた命令を順次取り込みそれを保持する。命令デコ
ーダ12は、命令レジスタ11に保持された命令を解釈
し、プロセッサ内の各ユニットに動作の詳細を指示す
る。ここで、解釈した命令が優先順位を指定する命令を
含んでいた場合、命令デコーダ12は信号線aによりそ
の順位を順位保持装置13に転送する。順位保持装置1
3は、信号線aから送られてきた順位を示す値を保持す
る。なお、このとき保持された順位は、次に優先順位を
指定する命令が実行されるまで保持され続ける。
(II) Description of Embodiments The present invention will be described below with reference to illustrated embodiments. Figure 1
Is a block diagram of the present embodiment. The instruction register 11 is
It is a register that holds the instructions of the processor and sequentially takes in programmed instructions and holds them. The instruction decoder 12 interprets the instruction held in the instruction register 11 and instructs each unit in the processor in detail of the operation. Here, if the interpreted instruction includes an instruction designating the priority order, the instruction decoder 12 transfers the order to the order holding device 13 through the signal line a. Rank holding device 1
3 holds a value indicating the order sent from the signal line a. The rank held at this time is kept held until the next instruction for designating the priority rank is executed.

【0016】プロセス管理TBL(プロセス管理テーブ
ル)16は、命令レジスタ11に取り込まれた命令が含
まれる実行中プログラムのプロセス管理情報を保持する
テーブル(table)である。PID生成装置17は、プ
ロセス管理TBL16に保持されたプロセス管理情報の
中からPID(プロセス番号)を生成し保持する。キャッ
シュ制御装置19は、プロセッサの読み出し指示に従
い、信号線eを用いてキャッシュメモリ20に所望のデ
ータが存在するかどうかを問い合わせ、存在する場合に
はキャッシュメモリ20からの読み出し、および順位レ
ジスタ14とPIDレジスタ18の更新の指示を実行
し、存在しない場合には主記憶21からデータの読み出
し、およびキャッシュメモリ20のブロック置換を実行
する。
The process management TBL (process management table) 16 is a table (table) for holding process management information of an executing program including an instruction fetched in the instruction register 11. The PID generation device 17 generates and holds a PID (process number) from the process management information held in the process management TBL 16. In accordance with the read instruction from the processor, the cache control device 19 inquires whether or not the desired data exists in the cache memory 20 using the signal line e, and if it exists, reads from the cache memory 20 and the order register 14 An instruction to update the PID register 18 is executed, and if it does not exist, data is read from the main memory 21 and block replacement of the cache memory 20 is executed.

【0017】ここで、プログラムされた命令により、あ
る任意の優先順位が常に順位保持装置13に保持されて
いる。さらに、実行中の命令が含まれるプログラムのP
IDが常にPID生成装置17に保持されている。従っ
て、順位レジスタ14とPIDレジスタ18の更新は、
単に信号線bが示すブロックに対して、それぞれ順位保
持装置13の内容とPID生成装置18の内容を書き込
むことで実現する。
Here, according to the programmed instruction, an arbitrary priority is always held in the order holding device 13. Furthermore, the P of the program containing the instruction being executed is included.
The ID is always held in the PID generation device 17. Therefore, the update of the order register 14 and the PID register 18 is
It is realized by simply writing the contents of the rank holding device 13 and the contents of the PID generation device 18 into the block indicated by the signal line b.

【0018】置換ブロック判定装置15は、キャッシュ
制御装置19がキャッシュメモリ20に存在しないデー
タを主記憶21から読み出しキャッシュメモリ20のブ
ロック置換を行う場合に、順位レジスタ14から順位情
報を取り出し、低順位のブロックを判定し信号線cを用
いてキャッシュ制御装置19へ通知し、低順位ブロック
が見つからない場合には、PIDレジスタ18からPI
D情報を取り出しPID生成装置17が保持する実行中
のPIDと一致しないブロックを判定し、信号線cを用
いてキャッシュ制御装置19へ通知する。
When the cache control unit 19 reads out the data that does not exist in the cache memory 20 from the main memory 21 and performs the block replacement of the cache memory 20, the replacement block determination unit 15 extracts the order information from the order register 14 and outputs the low order. Block is determined and notified to the cache control device 19 using the signal line c. If no low-order block is found, the PID register 18 sends PI
A block that does not match the PID being executed, which is taken out of the D information and held by the PID generation device 17, is determined, and is notified to the cache control device 19 using the signal line c.

【0019】次に、図1のブロック図を元に、例を挙げ
て動作を説明する。ただし、簡単のため、順位レジスタ
14に保持する値は、優先順位を最大とする場合は「同
一状態値」として1、優先順位を最小とする場合は0、
とし、初期状態で順位レジスタ14の(C0、C1、C
2、C3)には(0、0、1、1)が入っているものと
する。さらに、初期状態でPIDレジスタ18の(P
0、P1、P2、P3)には、(0、0、3、3)が入
っているものとする。或る命令B、C、Dを強制的にキ
ャッシュメモリに入れて、一定の十分に高速な環境で動
作させたい場合、本例では、命令Bの直前に優先順位を
1にする命令Aを入れ、命令Dの直後に優先順位を0に
する命令Eを入れる。また、命令A、B、C、D、Eを
実行する場合のプロセス管理TBL16から生成される
PIDは2だとする。
Next, based on the block diagram of FIG. 1, the operation will be described with an example. However, for the sake of simplicity, the value held in the priority register 14 is 1 as the "same state value" when the priority is the maximum, and 0 when the priority is the minimum.
In the initial state, (C0, C1, C
(2, C3) contains (0, 0, 1, 1). Further, in the initial state, the (P
It is assumed that (0, P1, P2, P3) contains (0, 0, 3, 3). In order to forcibly insert a certain instruction B, C, D into the cache memory and operate it in a constant and sufficiently high-speed environment, in this example, the instruction A whose priority is 1 is inserted immediately before the instruction B. Immediately after the instruction D, the instruction E for setting the priority to 0 is inserted. Further, the PID generated from the process management TBL 16 when executing the instructions A, B, C, D, and E is 2.

【0020】このときのプロセッサの動作は次のように
なる。まず命令Aを受け取った命令デコーダ12は、信
号線aを介して順位保持装置13に1を書き込む。同時
にPID生成装置17は、プロセス管理TBL16から
読み出したプロセス管理情報からPIDとして2を生成
し保持する。以降本例では、命令B、C、D、Eの実行
全てにおいてPID生成装置17が保持するPIDは2
となる。
The operation of the processor at this time is as follows. First, the instruction decoder 12, which has received the instruction A, writes 1 in the rank holding device 13 via the signal line a. At the same time, the PID generation device 17 generates and holds 2 as PID from the process management information read from the process management TBL 16. Thereafter, in this example, the PID held by the PID generation device 17 is 2 in all executions of the instructions B, C, D, and E.
Becomes

【0021】続けて実行される命令Bがメモリをアクセ
スし、仮にそのデータがキャッシュメモリ20のB0に
存在すると仮定すると、キャッシュ制御装置19は、信
号線bを介して順位レジスタ14のC0およびPIDレ
ジスタ18のP0を選択する信号を発生する。順位保持
装置13には先に命令Aで設定した1が入っているの
で、順位レジスタ14のC0は1になる。同時に、PI
D生成装置17には2が保持されているので、PIDレ
ジスタ18のP0は2になる。よって、順位レジスタ1
4は(1、0、1、1)となり、PIDレジスタ18は
(2、0、3、3)となる。B1、B2、B3に存在し
た場合も同様で、C1、C2、C3の何れかが1とな
り、P1、P2、P3の何れかが2となる。
Assuming that the instruction B to be executed subsequently accesses the memory and that data is present in B0 of the cache memory 20, the cache controller 19 sends the C0 and PID of the rank register 14 via the signal line b. A signal for selecting P0 of the register 18 is generated. Since the rank holding device 13 contains 1 previously set by the instruction A, C0 of the rank register 14 becomes 1. At the same time, PI
Since 2 is held in the D generation device 17, P0 of the PID register 18 becomes 2. Therefore, the rank register 1
4 becomes (1, 0, 1, 1), and the PID register 18 becomes (2, 0, 3, 3). The same is true when they exist in B1, B2, and B3, and any one of C1, C2, and C3 becomes 1, and any one of P1, P2, and P3 becomes 2.

【0022】一方、命令Bがキャッシュメモリ20に存
在しないデータをアクセスした場合、即ちキャッシュミ
スヒットを起こした場合は、キャッシュ制御装置19は
主記憶21からデータを読み出し、キャッシュメモリ2
0の対応する順位レジスタ14が0であるブロックを読
み出したデータで置換する。同時に置換されたブロック
に対する順位レジスタ14には1が入れられ、命令Bの
入っているブロックの優先順位は1となり、対応するP
IDレジスタ18には2が入れられる。この場合も、順
位レジスタ14は(1、0、1、1)となり、PIDレ
ジスタ18は(2、0、3、3)となる。
On the other hand, when the instruction B accesses data that does not exist in the cache memory 20, that is, when a cache mishit occurs, the cache control device 19 reads the data from the main memory 21 and the cache memory 2
A block in which the corresponding rank register 14 of 0 is 0 is replaced with the read data. At the same time, 1 is put in the order register 14 for the blocks replaced, and the priority order of the block containing the instruction B becomes 1, and the corresponding P
2 is stored in the ID register 18. Also in this case, the order register 14 becomes (1, 0, 1, 1) and the PID register 18 becomes (2, 0, 3, 3).

【0023】次に、命令Cもキャッシュヒットあるいは
キャッシュミスヒットに関わらず同様にして順位レジス
タ14の0の部分に入れられ、順位レジスタ14は
(1、1、1、1)となり、PIDレジスタ18は
(2、2、3、3)となる。
Next, the instruction C is similarly put into the 0 portion of the rank register 14 regardless of the cache hit or the cache miss, the rank register 14 becomes (1, 1, 1, 1), and the PID register 18 Becomes (2, 2, 3, 3).

【0024】次に、命令Dがキャッシュメモリ20に存
在しないデータをアクセスした場合は、キャッシュ制御
装置19は主記憶21からデータを読み出し、キャッシ
ュメモリ20の対応する順位レジスタ14が0のブロッ
クが存在しないため、置換ブロック判定装置15は、P
ID生成装置17から命令DのPID、ここでは2を受
け取り、PIDレジスタ18が2以外のブロックを置換
する。同時に置換されたブロックに対する順位レジスタ
には1が入れられ、命令Dの入っているブロックの優先
順位は1となり、対応するPIDレジスタ18には2が
入れられる。よって、順位レジスタ104は(1、1、
1、1)となり、PIDレジスタ18は(2、2、2、
1)となる。
Next, when the instruction D accesses data that does not exist in the cache memory 20, the cache control device 19 reads the data from the main memory 21, and there is a block in which the corresponding rank register 14 of the cache memory 20 is 0. Since the replacement block determination device 15 does not
The PID of the instruction D, here, 2 is received from the ID generation device 17, and the PID register 18 replaces blocks other than 2. At the same time, the order register for the blocks replaced is set to 1, the priority of the block containing the instruction D is set to 1, and the corresponding PID register 18 is set to 2. Therefore, the rank register 104 is (1, 1,
1, 1, and the PID register 18 becomes (2, 2, 2,
It becomes 1).

【0025】次の命令Eで順位保持装置14は0に戻さ
れるため、以降の命令は全て残った0のブロックを置換
し、そのブロックに0を書き込むという動作を繰り返
す。即ち、命令B、C、Dは常にキャッシュメモリ上に
保持されることになる。しかし、順位レジスタ104に
おいて0のブロックが存在しない場合は、先の命令Dの
動作説明と同様に、PIDレジスタ18が読み出し実行
中のPIDと異なるブロックを置換する。同時に、置換
されたブロックに対応する順位レジスタ104とPID
レジスタの更新を行う。
Since the rank holding device 14 is returned to 0 at the next instruction E, the subsequent instructions repeat the operation of replacing the remaining block of 0 and writing 0 to the block. That is, the instructions B, C and D are always held in the cache memory. However, if there is no block of 0 in the order register 104, the PID register 18 replaces a block different from the PID being read and executed, as in the operation description of the instruction D. At the same time, the rank register 104 and the PID corresponding to the replaced block are
Update the register.

【0026】以上の動作によると、キャッシュメモリの
容量を考慮してプログラムを作成することにより、任意
の命令およびそのデータをキャッシュ内に強制的に保持
することが可能となり、しかも、同様な作りをした複数
のプログラムを連続あるいは交互に実行することが可能
となる。
According to the above operation, by creating a program in consideration of the capacity of the cache memory, it becomes possible to forcibly hold an arbitrary instruction and its data in the cache, and to make a similar construction. It is possible to continuously or alternately execute the plurality of programs.

【0027】[0027]

【発明の効果】以上説明したように本発明によれば、以
下の効果を発揮することができる。第1の効果は、任意
のブロックをキャッシング可能とする複数のプログラム
を連続実行できるという効果がある。その理由は、任意
のブロックの置換順位の判定に、命令実行時のプロセス
番号も用いているためである。
As described above, according to the present invention, the following effects can be exhibited. The first effect is that a plurality of programs capable of caching arbitrary blocks can be continuously executed. The reason is that the process number at the time of instruction execution is also used to determine the replacement order of an arbitrary block.

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

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】従来例のブロック図である。FIG. 2 is a block diagram of a conventional example.

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

11 命令レジスタ 12 命令でコーダ 13 順位保持装置 14 順位レジスタ 15 置換ブロック判定装置 16 プロセス管理テーブル 17 PID生成装置 18 PIDレジスタ 19 キャッシュ制御装置 20 キャッシュメモリ 21 主記憶 22 内部バス 11 Instruction register 12 instructions coder 13 Rank holding device 14 rank register 15 Substitution block determination device 16 Process management table 17 PID generator 18 PID register 19 Cache controller 20 cache memory 21 main memory 22 Internal bus

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数ブロックで構成したキャッシュメモ
リにおける、対応するブロック毎に優先処理順位を順位
レジスタに保持しておき、 或る命令が前記キャッシュメモリに対しキャッシュミス
ヒットし、且つ前記順位レジスタのデータが全て同一状
態値である場合には、 実行中の命令のプロセス番号と異なるブロックを、主記
憶から読み出したデータで置換することを特徴とするキ
ャッシュメモリ制御システム。
1. A priority processing order is held in a priority register for each corresponding block in a cache memory composed of a plurality of blocks, an instruction causes a cache miss to the cache memory, and A cache memory control system that replaces a block different from the process number of the instruction being executed with the data read from the main memory when all the data have the same state value.
【請求項2】 複数ブロックで構成されるキャッシュメ
モリと、 該キャッシュメモリに対応するブロック毎に優先処理順
位を保持する順位レジスタと、 命令レジスタに取り込まれた実行中プログラムのプロセ
ス管理情報を保持するプロセス管理テーブルと、 該プロセス管理テーブルに保持されたプロセス管理情報
の中からPID(プロセス番号)を生成し保持するPID
生成保持手段と、 前記順位レジスタが保持するデータが全て同一状態値で
あるか否かを判定する置換ブロック判定装置と、 内部バスと主記憶に接続して前記キャッシュメモリへの
入出力を制御するキャッシュ制御装置とを備えてなり、 前記キャッシュ制御装置は、 或る命令がキャッシュメモリに存在しないデータをアク
セスした際に、置換ブロック判定装置が順位レジスタの
データが全て同一状態値であると判定した場合には、 順位レジスタに対応するPID生成保持手段が実行中の
命令のプロセス番号と異なるブロックを、主記憶から読
み出したデータで置換することを特徴とするキャッシュ
メモリ制御システム。
2. A cache memory composed of a plurality of blocks, a priority register for holding a priority processing priority for each block corresponding to the cache memory, and a process management information of an executing program fetched in an instruction register. A PID that generates and holds a PID (process number) from the process management table and the process management information held in the process management table
Generation / holding means, a replacement block determination device for determining whether or not all data held by the rank register have the same state value, and an internal bus and a main memory are connected to control input / output to / from the cache memory. And a cache control unit, wherein when a certain instruction accesses data that does not exist in the cache memory, the replacement block determination unit determines that all the data in the rank register have the same state value. In this case, the cache memory control system is characterized in that the PID generating and holding means corresponding to the rank register replaces a block different from the process number of the instruction being executed with the data read from the main memory.
【請求項3】 前記同一状態値は、1であることを特徴
とする請求項1または請求項2記載のキャッシュメモリ
制御システム。
3. The cache memory control system according to claim 1, wherein the same-state value is 1.
JP2001197708A 2001-06-29 2001-06-29 Cache memory control system Pending JP2003015957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001197708A JP2003015957A (en) 2001-06-29 2001-06-29 Cache memory control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001197708A JP2003015957A (en) 2001-06-29 2001-06-29 Cache memory control system

Publications (1)

Publication Number Publication Date
JP2003015957A true JP2003015957A (en) 2003-01-17

Family

ID=19035262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001197708A Pending JP2003015957A (en) 2001-06-29 2001-06-29 Cache memory control system

Country Status (1)

Country Link
JP (1) JP2003015957A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100953986B1 (en) 2008-08-26 2010-04-21 재단법인서울대학교산학협력재단 Method and apparatus for utilizing latency of cache miss using priority based excution
US8555001B2 (en) 2008-08-25 2013-10-08 Nec Corporation Cache memory, including miss status/information and a method using the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8555001B2 (en) 2008-08-25 2013-10-08 Nec Corporation Cache memory, including miss status/information and a method using the same
KR100953986B1 (en) 2008-08-26 2010-04-21 재단법인서울대학교산학협력재단 Method and apparatus for utilizing latency of cache miss using priority based excution

Similar Documents

Publication Publication Date Title
JPH10187533A (en) Cache system, processor, and method for operating processor
US5727227A (en) Interrupt coprocessor configured to process interrupts in a computer system
JP3760041B2 (en) Information processing device for branch prediction
JPH03129433A (en) Device and method for parallel processing
KR950010525B1 (en) Cache memory unit
JPS62245442A (en) Information processor
CA2016532C (en) Serializing system between vector instruction and scalar instruction in data processing system
JP2002024205A (en) Vector scatter instruction control circuit and vector type information processor
US6078993A (en) Data supplying apparatus for independently performing hit determination and data access
JP3304444B2 (en) Vector processing equipment
JP5128382B2 (en) Method and apparatus for executing multiple load instructions
US4967339A (en) Operation control apparatus for a processor having a plurality of arithmetic devices
JP2003015957A (en) Cache memory control system
JP2000330791A (en) Computer system and its operating method
JP2004326175A (en) Processor, cache system, and cache memory
JP2009505178A (en) Apparatus and method for storing data and / or instructions in a computer system comprising at least two instruction execution units and at least a first storage device or storage area for data and / or instructions
JP2004240616A (en) Memory controller and memory access control method
JP2004005710A (en) Information processor
JP4111645B2 (en) Memory bus access control method after cache miss
JP2005038203A (en) Memory control method and device
JPH06324861A (en) System and method for controlling cpu
JP2011118744A (en) Information processor
JP3217348B2 (en) Information processing system
JPH06149669A (en) System and device for transferring cache data
JPH076037A (en) Instruction decoding device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040720

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041124