JPH0210450A - Prefetch control system for cache memory - Google Patents

Prefetch control system for cache memory

Info

Publication number
JPH0210450A
JPH0210450A JP63159121A JP15912188A JPH0210450A JP H0210450 A JPH0210450 A JP H0210450A JP 63159121 A JP63159121 A JP 63159121A JP 15912188 A JP15912188 A JP 15912188A JP H0210450 A JPH0210450 A JP H0210450A
Authority
JP
Japan
Prior art keywords
processor
access
data
instruction
block
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
JP63159121A
Other languages
Japanese (ja)
Inventor
Osamu Nishii
修 西井
Kunio Uchiyama
邦男 内山
Hirokazu Aoki
郭和 青木
Yasushi Nagashima
永島 靖
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP63159121A priority Critical patent/JPH0210450A/en
Publication of JPH0210450A publication Critical patent/JPH0210450A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To increase the processing speed of a processor by taking actions of access such as direct increase and repetition into consideration and executing prefetch at the time of profiting from application of prefetch. CONSTITUTION:A processor 10 which controls and executes operation is provided with an instruction decoding part 13 which reads out an instruction to decode the meaning of the instruction and an instruction executing part 19 which executes the instruction in accordance with the decoded results. A cache memory 11 includes an address array 16, a data array 17, and a control logic 19, and the access type of a control logic 19 is detected by a signal which is outputted form the processor 10 and indicates the classification of access, and a prefetch start circuit 24 is started in accordance with the detection result.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプロセッサ、キャッシュメモリ、主記憶装置を
有する情報処理装置におけるブロック先行フェッチ方式
に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a block advance fetch method in an information processing apparatus having a processor, a cache memory, and a main storage device.

〔従来の技術〕[Conventional technology]

キャッシュメモリについてはコンピューター・サーベイ
第14巻3号473−530ページ(Collpute
r 5urveys、Vol、14.&3.pp473
−530)で詳しく論じられている。キャッシュメモリ
とは主記憶に比べ、容量は小さいが、高速のアクセス(
読み書き)が可能なメモリであり、プロセッサの内部な
いしは近くにおき、プロセッサのアクセスを高速に行う
目的でおかれる。主記憶とプロセッサの間のデータの転
送時間はプロセッサの内部処理時間の数倍になるため、
処理に必要な命令。
Regarding cache memory, see Computer Survey, Vol. 14, No. 3, pp. 473-530.
r 5urveys, Vol, 14. &3. pp473
-530) is discussed in detail. Cache memory has a smaller capacity than main memory, but provides high-speed access (
A memory that can be read and written (read and write), and is placed inside or near the processor for the purpose of speeding up access by the processor. The data transfer time between main memory and the processor is several times the processor's internal processing time, so
Instructions required for processing.

データを実行のつと読みだしていたのでは、処理の高速
化は望めない。一方プロセッサは主記憶全体をアクセス
の対象としているが、ごく短時間の間にはそのうちのご
く一部分にアクセスは集中している。そこで主記憶の情
報の一部をキャッシュメモリにコピーし、プロセッサの
アクセスのほとんどをキャッシュメモリとの間で行うよ
うにすると、平均アクセス時間を短縮することが可能と
なる。
If data is read every time it is executed, it is not possible to speed up processing. On the other hand, a processor accesses the entire main memory, but accesses are concentrated on a small portion of the main memory over a very short period of time. Therefore, by copying part of the information in the main memory to the cache memory and making most of the processor accesses to and from the cache memory, the average access time can be shortened.

キャッシュメモリは記憶をブロックという適当な大きさ
を単位にして管理する。各ブロックはそれぞれ主記憶の
ある箇所と対応し、その箇所のデータの写しを保持して
いる。この記憶部分をデータアレイとよぶ。加えて各ブ
ロックが主記憶のどの箇所に対応しているかはもちろん
動的に変化することが可能であり、その情報もキャッシ
ュメモリに保持されている。この記憶部分をアドレスア
レイとよぶ。
Cache memory manages storage in units of appropriate size called blocks. Each block corresponds to a location in the main memory and holds a copy of the data at that location. This storage part is called a data array. In addition, it is of course possible to dynamically change which location in the main memory each block corresponds to, and this information is also held in the cache memory. This memory portion is called an address array.

プロセッサのアクセスのほとんどをキャッシュメモリと
の間で行うようにするためには、最近にひんばんにアク
セスされたデータはキャッシュ内におかれるべきである
し、その反対に最近に全くアクセスされていないデータ
は必ずしもキャッシュ内におかれるべきでない、キャッ
シュメモリは上に述べた要求を満たすような制御を行う
。それをリード時を例にとって説明すると次のようにな
る。
In order for most of the processor's accesses to be made to and from cache memory, data that has been accessed frequently recently should be placed in the cache, and vice versa. Data does not necessarily have to be placed in the cache; the cache memory provides control to meet the above requirements. This can be explained using the example of reading as follows.

キャッシュ内のデータをアクセスしたときにはそのデー
タの属するブロックを保持し続け、キャッシュ内にない
データをアクセスしたときには、その主記憶上のデータ
を含む1ブロツクをキャッシュ内に転送し、その代わり
にキャッシュ内で最近値われていない1ブロツクを追い
出す6次にキャッシュメモリの制御に重要な先行フェッ
チについて説明する。先行フェッチとは、プロセッサが
アクセスしたデータの属するブロックの次ブロックをキ
ャッシュメモリが自動的に主記憶から転送する機能をい
う。近い将来にプロセッサが次ブロックを必要とする可
能性は一般に大きいので、プロセッサの要求を先回りす
ることによって主記憶とのデータ転送のための待ち時間
を短縮し、高速化に役立つものとなる。
When data in the cache is accessed, the block to which the data belongs continues to be held; when data that is not in the cache is accessed, one block containing the data in main memory is transferred to the cache, and the block containing the data is transferred to the cache instead. Next, we will explain advance fetching, which is important for cache memory control. Advance fetching refers to a function in which the cache memory automatically transfers from the main memory the next block after the block to which the data accessed by the processor belongs. Generally, there is a high possibility that the processor will need the next block in the near future, so by anticipating the processor's request, the waiting time for data transfer with the main memory can be shortened, helping to increase speed.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

この先行フェッチ機能を使用すると、プロセッサのアク
セスがキャッシュ内にヒツトするヒツト率が高くなり、
主記憶からのデータ転送により発生する時間遅延は減少
するが、同時にデータアレイ周辺のバスの混雑度が上が
り、そのためにプロセッサのアクセスが遅らされ、かえ
って全体の処理速度が低下する場合も起こりうる。とこ
ろで、プロセッサのアクセスは命令であるかないかによ
ってアクセスするアドレスの挙動が異なる。具体的には
命令アクセスのアドレスは直線状に増加する場合が多い
のに対し、命令以外のアクセスについては必ずしも単調
に増大するとは限らない。このような場合には命令アク
セスにのみ先行フェッチを行いたいという要求が考えら
れる。いま述べたように先行フェッチの実施をきめ細か
く行うことは必要であるが、従来、先行フェッチの制御
において、プロセッサのアクセスの内容、すなわち命令
アクセスか命令以外の(データ)アクセスかによって異
なる制御を行う方法は用意されていなかった。
This proactive fetching feature increases the probability that processor accesses will hit the cache.
The time delay caused by data transfer from main memory is reduced, but at the same time the bus around the data array becomes more congested, which can delay processor access and slow down the overall processing speed. . By the way, the behavior of the address accessed by the processor differs depending on whether it is an instruction or not. Specifically, while addresses for instruction accesses often increase linearly, addresses for accesses other than instructions do not necessarily increase monotonically. In such a case, there may be a request to perform advance fetch only for instruction access. As just mentioned, it is necessary to perform advance fetch in detail, but conventionally, when controlling advance fetch, different controls are used depending on the content of the processor's access, that is, whether it is an instruction access or a non-instruction (data) access. No method was provided.

〔課題を解決するための手段〕[Means to solve the problem]

そこで、本発明においてはプロセッサからのアクセスの
種類をプロセッサが信号線を使って出力していることを
利用し、その信号をキャッシュメモリが検出し、その検
出結果によって先行フェッチの処理を行うかどうかを選
択する機構を設けた。
Therefore, the present invention utilizes the fact that the processor outputs the type of access from the processor using a signal line, the cache memory detects the signal, and determines whether to perform advance fetch processing based on the detection result. A mechanism has been established to select the

〔作用〕[Effect]

上に述べた手段をとることによって、従来は不可能であ
った命令アクセスのみについての先行フェッチ、または
反対に命令以外のアクセスのみについての先行フェッチ
を行うことが可能となった。
By taking the above-mentioned means, it has become possible to perform advance fetch only for instruction accesses, which was previously impossible, or, conversely, advance fetch only for accesses other than instructions.

〔実施例〕〔Example〕

以下、図を使用し本発明を実現した例を述べる。 An example of realizing the present invention will be described below using figures.

第1図は本情報処理装置の全体図を示す。10は演算を
制御・実行するプロセッサ、11はキャッシュメモリ、
12は主記憶装置である6プロセツサ10の内部は大別
すると命令を読みだし、その命令の意味を解釈する命令
解釈部13と、命令解釈部13の解釈結果に従い命令を
実行する命令実行部14とに分かれる。命令解釈部13
と命令実行部14はいずれもつながれているアドレス線
、データ線を使ってアクセスを行う。
FIG. 1 shows an overall diagram of this information processing apparatus. 10 is a processor that controls and executes calculations; 11 is a cache memory;
12 is a main storage device 6 The inside of the processor 10 can be roughly divided into an instruction interpreting section 13 that reads out an instruction and interprets the meaning of the instruction, and an instruction executing section 14 that executes the instruction according to the interpretation result of the instruction interpreting section 13. It is divided into Command interpretation section 13
and the instruction execution unit 14 perform access using address lines and data lines that are connected to each other.

アクセスタイプ線15はその時にアドレス線、データ線
を使ってアクセスを行っている主体が命令解釈部13と
命令実行部14のいずれであるかを示す信号線である。
The access type line 15 is a signal line indicating whether the entity that is accessing using the address line and data line at that time is the instruction interpreter 13 or the instruction execution unit 14.

アクセスタイプ信号15の従来における利用のされ方の
一例を挙げると、同じアドレスを命令とデータの2重の
意味に用い、命令とデータそれぞれに別のメモリを実装
してシステムを構成する場合、その2種類のメモリのい
ずれかを選択する信号線として用いられる使用法がある
To give an example of how the access type signal 15 has been used in the past, when the same address is used for dual meanings of instructions and data, and separate memories are implemented for each of the instructions and data to configure a system, There is a usage in which it is used as a signal line to select one of two types of memory.

キャッシュメモリ素子11の内部の各部分を以下に説明
する。アドレスアレイ16はプロセッサ側アドレス線を
介してプロセッサ10と、主記憶側アドレス線を介して
主記憶装置12とつながっている。データアレイ17は
プロセッサ側データ線を介してプロセッサ10と、主記
憶側データ線を介して主記憶装置12とつながっている
。アドレスアレイ16、データアレイ17は図に示すよ
うに列をなしているが、その列は下位アドレスによって
選択されるように構成されている。特に、下位アドレス
によって特定されるアドレスアレイおよびデータアレイ
が1列でなく複数列となる制御法をセットアソシアティ
ブ方式というが、本実施例においては、4列のセットア
ソシアティブ方式を行う。そのとき、アドレスアレイが
全部でN列あるとすると、−度のアクセスで第1列、第
(i + N / 4 )列、第(i+2N/4)列、
第(i+3N/4)列が同時に選択される。アドレスア
レイ16の各列は上位アドレスA、および2種類の1ビ
ツトのフラグ:有効フラグV、更新フラグUからなり、
データアレイ17の各列は1ブロック分のデータの記憶
部からなる。アドレスアレイ16の各列について上位ア
ドレスと下位アドレスの組合せによって1つのアドレス
が特定でき、主記憶上で該当アドレスから始まる1ブロ
ック分のデータが、対応する列のデータアレイ17に格
納されていることを示す、なお有効フラグVとは該当ア
ドレスについてデータアレイ17の情報は正しいことを
示すフラグであり、更新フラグUとは該当アドレスにつ
いてデータアレイ17の情報は正しいが主記憶12の情
報は正しくないことを示すフラグである。
Each internal portion of cache memory element 11 will be described below. The address array 16 is connected to the processor 10 via a processor side address line and to the main memory device 12 via a main memory side address line. The data array 17 is connected to the processor 10 via a processor side data line and to the main memory device 12 via a main memory side data line. The address array 16 and data array 17 are arranged in columns as shown in the figure, and the columns are configured to be selected by lower addresses. In particular, a control method in which the address array and data array specified by the lower address have multiple columns instead of one column is called a set associative method, and in this embodiment, a four column set associative method is used. At that time, if the address array has a total of N columns, the first column, (i + N / 4) column, (i + 2N / 4) column,
The (i+3N/4)th column is selected at the same time. Each column of the address array 16 consists of an upper address A and two types of 1-bit flags: a valid flag V and an update flag U.
Each column of data array 17 consists of a storage section for one block of data. For each column of the address array 16, one address can be specified by a combination of the upper address and the lower address, and one block of data starting from the corresponding address on the main memory is stored in the data array 17 of the corresponding column. The valid flag V is a flag that indicates that the information in the data array 17 is correct for the corresponding address, and the update flag U is a flag that indicates that the information in the data array 17 is correct for the corresponding address, but the information in the main memory 12 is incorrect. This is a flag indicating that

ブロックバッファ18は主記憶装置12からデータアレ
イ17にデータを転送するとき一時的にデータを蓄える
バッファ記憶であり、データアレイ17へのアクセスが
円滑に行われるようにする効果をもつ。コントロールロ
ジック19はプロセッサ側コントロール線を介してプロ
セッサ10と。
The block buffer 18 is a buffer memory that temporarily stores data when transferring data from the main memory device 12 to the data array 17, and has the effect of ensuring smooth access to the data array 17. The control logic 19 is connected to the processor 10 via a processor-side control line.

主記憶側コントロール線を介して主記憶装置12とつな
がっている。ここでプロセッサ側コントロール線の中に
アクセスタイプ線15が含まれる。
It is connected to the main memory device 12 via a main memory side control line. Here, an access type line 15 is included in the processor side control lines.

アクセスタイプ線15がコントロールロジック19に入
力されていることは重要である。20は後述するヒツト
判定を行うための比較器であり、21はアドレスカウン
タである。
It is important that the access type line 15 is input to the control logic 19. Reference numeral 20 is a comparator for making a hit determination which will be described later, and reference numeral 21 is an address counter.

コントロールロジック19の内部を説明する。The inside of the control logic 19 will be explained.

ここでは本発明を説明する上で重要なもののみを示しで
ある。アクセスタイプ検出部22はアクセスタイプ信号
15を入力とし、プロセッサ10のアクセスの種別を検
出する。先行フェッチ起動コントロール部23は先行フ
ェッチ要求信号28の制御を行う回路である。先行フェ
ッチ起動回路24は先行フェッチ動作の起動を行う回路
であり、命令アクセス検出部22の検出結果27と先行
フェッチ要求信号28とを入力とし、先行フェッチ起動
信号29をメモリアクセスコントロール部25に出力す
る。メモリアクセスコントロール部25はキャッシュメ
モリ11と主記憶装置12との間のアクセスのコントロ
ールを行う回路である。
Only those important for explaining the present invention are shown here. The access type detection unit 22 receives the access type signal 15 as input and detects the type of access by the processor 10 . The advance fetch activation control unit 23 is a circuit that controls the advance fetch request signal 28. The advance fetch activation circuit 24 is a circuit that activates the advance fetch operation, and receives the detection result 27 of the instruction access detection unit 22 and the advance fetch request signal 28 as input, and outputs the advance fetch activation signal 29 to the memory access control unit 25. do. The memory access control unit 25 is a circuit that controls access between the cache memory 11 and the main storage device 12.

ビット判定部26は比較器20の比較結果を入力とし、
ヒツト判定の結果を先行フェッチ要求コントロール部2
3とメモリアクセスコントロール部25に通知する。
The bit determination unit 26 inputs the comparison result of the comparator 20,
Advance fetch request control unit 2 for the result of hit determination
3 and the memory access control unit 25 is notified.

本装置におけるプロセッサ10からのアクセスの実現方
法について述べる。プロセッサ10がキャッシュメモリ
11に対しアクセス要求を出すと、コントロールロジッ
ク19は当該データがデータアレイ17に保持されてい
るかどうかを調べる。
A method for realizing access from the processor 10 in this device will be described. When processor 10 issues an access request to cache memory 11, control logic 19 checks whether the data in question is held in data array 17.

このとき、保持されている場合をヒツト、保持されてい
ない場合をミスとよぶ、ヒツトかどうかの判定は次のよ
うにして行う、プロセッサ10が出力した下位アドレス
によってアドレスアレイ16のうち検索する4列を定め
、各列でその列から読みだした上位アドレスAと、プロ
セッサ10の出力した上位アドレスを比較する。また、
各列の有効フラグVを調べる。そのとき、上位アドレス
が一致し、かつ有効フラグVが1であるという条件がい
ずれか1列で成立すればヒツトとなる。上位アドレスの
比較は比較器20で行い、その結果をヒツト判定部26
に通知する。
At this time, if it is held, it is called a hit, and if it is not held, it is called a miss.The determination of whether or not it is a hit is done as follows.The address array 16 is searched using the lower address output by the processor 10. A column is determined, and in each column, the upper address A read from that column is compared with the upper address outputted by the processor 10. Also,
Check the validity flag V of each column. At this time, if the conditions that the upper addresses match and the valid flag V is 1 are satisfied in any one column, it becomes a hit. Comparison of upper addresses is performed by a comparator 20, and the result is sent to a hit determination unit 26.
to notify.

キャッシュメモリを使用した装置において、ライトの方
法にはライトスルー法とコピーパック法の2通りがある
。ライトスルー法はライト時に常に主記憶に書き込む方
法であり、コピーパック法は主記憶には書き込まずデー
タアレイ17に書き込む方法である。コピーパック法で
は主記憶にデータを書き込まないため一時的に記憶内容
に不一致が生じるが、更新フラグUの使用と以下に述べ
る処理手順を行えば最終的にこの不一致は解消されるこ
とが理解できよう0本実施例においてはライトスルー法
とコピーバック法の両方が同時に使用でき、その両方を
アドレスの領域で分けている。
In devices using cache memory, there are two write methods: a write-through method and a copy pack method. The write-through method is a method in which data is always written to the main memory when writing, and the copy pack method is a method in which data is written to the data array 17 without being written to the main memory. In the copy pack method, data is not written to the main memory, so there is a temporary discrepancy in the stored contents, but it can be understood that by using the update flag U and following the processing steps described below, this discrepancy will eventually be resolved. In this embodiment, both the write-through method and the copy-back method can be used simultaneously, and both are separated by the address area.

プロセッサ10からのアクセスが発生したときの処理手
順について、第2図のフローチャートに従い説明する。
The processing procedure when an access from the processor 10 occurs will be explained according to the flowchart in FIG. 2.

なお、第2図でMPUはプロセッサ10、DAはデータ
アレイ17、BBはブロックバッファ18、MMは主記
憶袋[12、v、 uはそれぞれアドレスアレイ16内
の有効フラグ、更新フラグを示す。
In FIG. 2, MPU is the processor 10, DA is the data array 17, BB is the block buffer 18, MM is the main memory bag [12, v, and u are the valid flag and update flag in the address array 16, respectively.

(スタート):プロセッサ10からのアクセスが発生す
ると処理100へ。
(Start): When an access from the processor 10 occurs, the process advances to the process 100.

処理100ニアドレスカウンタ21にアドレス線のアド
レスを取り込む。アクセスが リードアクセスならば処理101へ。
Process 100 The address of the address line is taken into the near address counter 21. If the access is a read access, go to process 101.

ライトアクセスならば処理108へ。If it is a write access, go to process 108.

処理101:アクセスがキャッシュにヒツトしたならば
処理102へ。ミスしたなら ば処理103へ。
Process 101: If the access hits the cache, proceed to process 102. If a mistake is made, go to process 103.

処理102:データアレイ17がらプロセッサ10にア
クセスされたデータを転送 し終了。
Process 102: Transfer the accessed data from the data array 17 to the processor 10 and end.

処理103:アクセスされたデータを含む1ブロツクを
主記憶装置12から運んでく るために、代わりにデータアレイ 17の中で追い出さなければならな い1ブロツクを決定する。そのブロ ックの有効フラグVと、更新フラグ Uが共に1ならば処理104へ、そ うでなければ処理105へ。
Process 103: Determine which block in the data array 17 must be evicted in order to bring the block containing the accessed data from the main memory 12. If the valid flag V and update flag U of the block are both 1, the process goes to process 104; otherwise, the process goes to process 105.

処理104:追い出すべき1ブロツクをデータアレイ1
7から主記憶装置12へ転送 する。処理105へ。
Process 104: 1 block to be evicted is transferred to data array 1
7 to the main storage device 12. Proceed to process 105.

処理105:アクセスされたデータを含む1ブロツクを
主記憶装置12からブロック バッファ18に転送する。アクセス されたデータをブロックバッファ 18からプロセッサ10に転送する。
Process 105: Transfer one block containing the accessed data from the main storage device 12 to the block buffer 18. The accessed data is transferred from the block buffer 18 to the processor 10.

アクセスされたデータを含む1ブロ ツクをブロックバッファ18からデ ータアレイ17に転送する。データ アレイ17の転送した箇所に対応す るアドレスアレイ16の有効フラグ ■を1に、更新フラグUを0にする。1 block containing accessed data Deleting the block from block buffer 18 data array 17. data Corresponding to the transferred location of array 17 Valid flag of address array 16 Set ■ to 1 and update flag U to 0.

処理106へ。Go to process 106.

処理106:先行フェッチ起動信号29が1ならば処理
107へ。Oならば終了。
Process 106: If the advance fetch activation signal 29 is 1, go to process 107. If O, end.

処理107:アドレスカウンタ21の値を当初のアクセ
スアドレスに比べ1ブロツク の大きさだけ増やし処理101へ。
Process 107: Increase the value of the address counter 21 by one block compared to the initial access address, and proceed to process 101.

処理108:アクセスがキャッシュにヒツトしたならば
処理109へ。ミスしたなら ば処理112へ。
Process 108: If the access hits the cache, proceed to process 109. If a mistake is made, go to process 112.

処理109:アクセスされた領域がコピーパック領域な
ら処理110へ。そうでなけ れば処理111へ。
Process 109: If the accessed area is a copy pack area, go to process 110. If not, go to process 111.

処理110:プロセッサ10からデータアレイ17のヒ
ツトした箇所にデータを書 き込む。そして該当箇所に対応する アドレスアレイ16の更新フラグU を1にして、終了。
Process 110: Write data from the processor 10 to the hit location of the data array 17. Then, the update flag U of the address array 16 corresponding to the corresponding location is set to 1, and the process ends.

処理111:プロセッサlOからデータアレイ17のヒ
ツトした箇所、および主記 憶12にデータを書き込み、終了。
Process 111: Write data from the processor IO to the hit location of the data array 17 and the main memory 12, and end.

処理112:アクセスされた領域がコピーパック領域な
ら処理113へ、そうでなけ れば処理116へ。
Process 112: If the accessed area is a copy pack area, proceed to process 113; otherwise, proceed to process 116.

処理113:アクセスされたデータを含む1ブロツクを
主記憶袋[12から選んでく るために、代わりにデータアレイ 17の中で追い出さなければならな い1ブロツクを決定する。そのブロ ックの有効フラグVと、更新フラグ Uが共に1ならば処理114へ、そ うでなければ処理115八。
Process 113: In order to select one block containing the accessed data from the main memory bag [12], one block in the data array 17 that must be evicted is determined instead. If the valid flag V and update flag U of the block are both 1, go to process 114; otherwise, go to process 1158.

処理114:追い出すべき1ブロツクをデータアレイ1
7から主記憶装置12へ転送 する。処理115へ。
Process 114: 1 block to be evicted is transferred to data array 1
7 to the main storage device 12. Proceed to process 115.

処理115:アクセスされたデータを含む1ブロツクを
主記憶装置12からブロック バッファ18に転送する。アクセス されたデータを含む1ブロツクをブ ロックバッファ18からデータアレ イ17に転送する。プロセッサ10 からデータアレイ17の転送した箇 所にデータを書き込む。そして該当 箇所に対応するアドレスアレイ16 の有効フラグV、更新フラグUを共 に1にし、終了。
Process 115: Transfer one block containing the accessed data from the main storage device 12 to the block buffer 18. One block containing the accessed data is transferred from block buffer 18 to data array 17. Data is written to the location transferred from the processor 10 to the data array 17. Then, both the valid flag V and update flag U of the address array 16 corresponding to the corresponding location are set to 1, and the process ends.

処理116:プロセッサ10から主記憶装置12にデー
タを書き込み、終了。
Process 116: Write data from the processor 10 to the main storage device 12, and end.

なお、先行フェッチのデータはプロセッサ10が直接要
求したデータではないので処理107を行った後の処理
102、処理105に関してはプロセッサ10へのデー
タの転送は行われない。
Note that since the pre-fetch data is not data directly requested by the processor 10, no data is transferred to the processor 10 in processing 102 and processing 105 after processing 107 is performed.

リードのミス発生時から先行フェッチ動作に至るまでの
コントロールロジック19の内部の動作を説明する。処
理101においてリードのミスが発生したという情報を
ヒツト判定部26から受けると先行フェッチ要求コント
ロール部23は先行フェッチ要求信号28を出力する準
備をする。そして処理105が終了した時点で先行フェ
ッチ要求コントロール部23は先行フェッチ要求信号2
8をアサート(信号を1にすること)する。
The internal operation of the control logic 19 from the time when a read error occurs to the advance fetch operation will be explained. In process 101, upon receiving information from the hit determination unit 26 that a read error has occurred, the advance fetch request control unit 23 prepares to output the advance fetch request signal 28. Then, when the process 105 is completed, the advance fetch request control unit 23 sends the advance fetch request signal 2.
Assert 8 (set the signal to 1).

先行フェッチの動作は処理106内の先行フェッチ起動
信号によって起動する。本発明において先行フェッチ起
動信号を生成している先行フェッチ起動回路24の回路
図を第3図に示す。30゜31はそれぞれ命令アクセス
、命令以外のアクセスについて先行フェッチを行うこと
を指定するレジスタであり、それらのレジスタの内容は
プロセッサ10から設定することが可能である。アクセ
スタイプ検出結果27は、現在処理中のアクセスが命令
アクセスである間1となっている。32゜33、.34
は2人力のANDゲートであり、その出力値は2人力の
論理積となる。35は2人力のORゲートであり、その
出力値は2人力の論理和となる。36はNOTゲートで
あり、その出力値は入力の論理の反転値となる。
The pre-fetch operation is activated by a pre-fetch activation signal in process 106. FIG. 3 shows a circuit diagram of the advance fetch activation circuit 24 that generates the advance fetch activation signal in the present invention. Reference numerals 30 and 31 are registers that designate advance fetching for instruction access and non-instruction access, respectively, and the contents of these registers can be set from the processor 10. The access type detection result 27 is 1 while the access currently being processed is an instruction access. 32°33,. 34
is a two-manpower AND gate, and its output value is the logical product of the two manpower. 35 is an OR gate operated by two operators, and its output value is the logical sum of the two operators. 36 is a NOT gate, the output value of which is the inverted value of the logic of the input.

処理中のアクセスが命令アクセスであるときにはレジス
タ30の値が1であるときのみに先行フェッチ要求信号
28のアサートが先行フェッチ起動信号29に伝えられ
る。処理中のアクセスが命令アクセスでないときにはレ
ジスタ31の値が1であるときのみに先行フェッチ要求
信号28のアサートが先行フェッチ起動信号29に伝え
られる。
When the access being processed is an instruction access, assertion of the advance fetch request signal 28 is transmitted to the advance fetch activation signal 29 only when the value of the register 30 is 1. When the access being processed is not an instruction access, assertion of the advance fetch request signal 28 is transmitted to the advance fetch activation signal 29 only when the value of the register 31 is 1.

そして先行フェッチ起動信号29によってメモリアクセ
スコントロール部25は先行フェッチ動作に入る(処理
106→107)、次ブロックのヒツト判定を行い(処
理101)、次ブロックがミスしたという情報をヒツト
判定部26から受けると主記憶装置12に対し先行フェ
ッチアクセスを開始する(処理104または105)。
Then, the memory access control unit 25 enters the advance fetch operation in response to the advance fetch activation signal 29 (processing 106→107), performs a hit determination for the next block (processing 101), and receives information from the hit determination unit 26 that the next block has missed. When received, advance fetch access to the main storage device 12 is started (process 104 or 105).

以上によって先行フェッチの起動をプロセッサのアクセ
スが命令アクセスであるかどうかによって独立に設定す
ることかできることを説明できた。
As described above, it has been explained that the activation of advance fetch can be set independently depending on whether the processor access is an instruction access or not.

〔発明の効果〕〔Effect of the invention〕

この情報処理装置を使用することにより、ソフトウェア
の側から命令アクセスと命令以外のアクセスについて、
直接増加性や反復性といったアクセスの挙動を考慮し、
それぞれについて先行フェッチの適用により利得がある
場合に先行フェッチの実施を行い、それによりプロセッ
サの処理速度を−層高めることが可能となる。
By using this information processing device, command access and non-command access can be controlled from the software side.
Considering access behavior such as direct increase and repeatability,
Pre-fetching is performed when there is a gain by applying pre-fetching for each, thereby making it possible to increase the processing speed of the processor by one layer.

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

第1図は本発明で用いられる装置の全体図、第2図はプ
ロセッサからのアクセスの処理手順、第3図は第1図の
うち先行フェッチ起動回路の回路図である。 10・・・プロセッサ素子、11・・・キャッシュメモ
リ素子、12・・・主記憶装置、13・・・命令解釈部
、14・・・命令実行部、15・・・アクセスタイプ信
号。 16・・・アドレスアレイ、17・・・データアレイ、
18・・・ブロックバッファ、19・・・コントロール
ロジック、20・・・比較器、21・・・アドレスカウ
ンタ、22・・・アクセスタイプ検出部、23・・・先
行フエット要求コントロール部、24・・・先行フェッ
チ起動回路、25・・・メモリアクセスコントロール部
、26・・・ビット判定部、27・・・アクセスタイプ
検出結果、28・・・先行フェッチ要求信号、29・・
・先行フェッチ起動信号、30・・・命令アクセスにつ
いて先行フェッチを行うことを選択するレジスタ、31
・・・命令以外のアクセスについて先行フェッチを行う
ことを選択するレジスタ、32,33゜34・・・AN
Dゲート、35・・・ORゲート、36・・・第 凹
FIG. 1 is an overall diagram of the apparatus used in the present invention, FIG. 2 is a processing procedure for access from a processor, and FIG. 3 is a circuit diagram of the advance fetch activation circuit in FIG. 1. DESCRIPTION OF SYMBOLS 10... Processor element, 11... Cache memory element, 12... Main memory device, 13... Instruction interpreter, 14... Instruction execution unit, 15... Access type signal. 16... Address array, 17... Data array,
18...Block buffer, 19...Control logic, 20...Comparator, 21...Address counter, 22...Access type detection section, 23...Advanced fetish request control section, 24...・Advanced fetch activation circuit, 25...Memory access control unit, 26...Bit judgment unit, 27...Access type detection result, 28...Advanced fetch request signal, 29...
- Advance fetch activation signal, 30... register for selecting execution of advance fetch for instruction access, 31
...Register for selecting advance fetch for accesses other than instructions, 32, 33°34...AN
D gate, 35...OR gate, 36th... concave

Claims (1)

【特許請求の範囲】[Claims] 1、主記憶装置とブロック単位で情報の授受を行うキャ
ッシュメモリをもつ情報処理装置において、プロセッサ
からアクセスされたデータが属するブロックの次のブロ
ックがキャッシュメモリに存在しないときに上記次のブ
ロックを主記憶から転送する先行フェッチ機能をもつ場
合、プロセッサが信号線を使つて出力したアクセスの種
類に関する情報を検出し、先行フェッチを行うか行わな
いかの選択を、プロセッサの要求が命令アクセスである
か命令以外のアクセスであるかの2種類について、それ
ぞれ独立に設定する機能をもつことを特徴とするブロッ
ク先行フェッチ方式。
1. In an information processing device that has a cache memory that exchanges information with the main memory in block units, when the block next to the block to which the data accessed by the processor belongs does not exist in the cache memory, the next block is used as the main memory. When a pre-fetch function that transfers data from memory is provided, information regarding the type of access output by the processor is detected using a signal line, and the selection of whether or not to perform pre-fetch is made based on whether the processor's request is an instruction access or not. A block advance fetch method characterized by having a function to independently set two types of accesses, one for accesses other than instructions.
JP63159121A 1988-06-29 1988-06-29 Prefetch control system for cache memory Pending JPH0210450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63159121A JPH0210450A (en) 1988-06-29 1988-06-29 Prefetch control system for cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63159121A JPH0210450A (en) 1988-06-29 1988-06-29 Prefetch control system for cache memory

Publications (1)

Publication Number Publication Date
JPH0210450A true JPH0210450A (en) 1990-01-16

Family

ID=15686697

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63159121A Pending JPH0210450A (en) 1988-06-29 1988-06-29 Prefetch control system for cache memory

Country Status (1)

Country Link
JP (1) JPH0210450A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173392B1 (en) 1997-04-12 2001-01-09 Nec Corporation Prefetch controller automatically updating history addresses
US6341334B1 (en) 1998-03-24 2002-01-22 Mitsubishi Denki Kabushiki Kaisha Bridge method, bus bridge, and multiprocessor system
JP2007500402A (en) * 2003-05-07 2007-01-11 フリースケール セミコンダクター インコーポレイテッド Data processing system with peripheral device access protection
JP2012533811A (en) * 2009-07-20 2012-12-27 フリースケール セミコンダクター インコーポレイテッド Signal processing system and integrated circuit with prefetch module, and method therefor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173392B1 (en) 1997-04-12 2001-01-09 Nec Corporation Prefetch controller automatically updating history addresses
US6341334B1 (en) 1998-03-24 2002-01-22 Mitsubishi Denki Kabushiki Kaisha Bridge method, bus bridge, and multiprocessor system
JP2007500402A (en) * 2003-05-07 2007-01-11 フリースケール セミコンダクター インコーポレイテッド Data processing system with peripheral device access protection
JP2012533811A (en) * 2009-07-20 2012-12-27 フリースケール セミコンダクター インコーポレイテッド Signal processing system and integrated circuit with prefetch module, and method therefor

Similar Documents

Publication Publication Date Title
JP3577331B2 (en) Cache memory system and method for manipulating instructions in a microprocessor
US4831520A (en) Bus interface circuit for digital data processor
JP3285644B2 (en) Data processor with cache memory
KR100278328B1 (en) Cache miss buffer
KR100274327B1 (en) Methods and apparatus for providing multiple outstanding operations in a cache consistent multiple processor computer system
US5283883A (en) Method and direct memory access controller for asynchronously reading/writing data from/to a memory with improved throughput
US5696937A (en) Cache controller utilizing a state machine for controlling invalidations in a network with dual system busses
CA1300280C (en) Central processor unit for digital data processing system including write buffer management mechanism
KR20040045035A (en) Memory access latency hiding with hint buffer
CA1300279C (en) Central processor unit for digital data processing system including cache management mechanism
US5119484A (en) Selections between alternate control word and current instruction generated control word for alu in respond to alu output and current instruction
JPH03225542A (en) Memory of data and processing circuit for bit encode data
JPH06318174A (en) Cache memory system and method for performing cache for subset of data stored in main memory
US4648033A (en) Look-aside buffer LRU marker controller
JPH0210450A (en) Prefetch control system for cache memory
US4737908A (en) Buffer memory control system
JPH07234819A (en) Cache memory
KR20040047398A (en) Method for data access using cache memory
JPH0651982A (en) Arithmetic processing unit
JP2001229074A (en) Memory controller and information processor and memory control chip
JPH02259945A (en) Storing processing system
JPH086853A (en) Storage control method
JPS6410858B2 (en)
JPH06124235A (en) Cache control system
JPS6135583B2 (en)