JPS601655B2 - Data prefetch method - Google Patents

Data prefetch method

Info

Publication number
JPS601655B2
JPS601655B2 JP52142631A JP14263177A JPS601655B2 JP S601655 B2 JPS601655 B2 JP S601655B2 JP 52142631 A JP52142631 A JP 52142631A JP 14263177 A JP14263177 A JP 14263177A JP S601655 B2 JPS601655 B2 JP S601655B2
Authority
JP
Japan
Prior art keywords
prefetch
operand
cache memory
instruction
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.)
Expired
Application number
JP52142631A
Other languages
Japanese (ja)
Other versions
JPS5475964A (en
Inventor
広幸 坂本
潔 森島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
NEC Corp
Original Assignee
Toshiba Corp
Nippon Electric Co 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 Toshiba Corp, Nippon Electric Co Ltd filed Critical Toshiba Corp
Priority to JP52142631A priority Critical patent/JPS601655B2/en
Publication of JPS5475964A publication Critical patent/JPS5475964A/en
Publication of JPS601655B2 publication Critical patent/JPS601655B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 本発明はキャシュメモリを有する情報処理装置における
データプリフェッチ方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a data prefetch method in an information processing apparatus having a cache memory.

従来、先行制御における命令のプリフェッチに関する技
術は多いが、オペランドのプリフヱッチに関する技術に
ついては極めて少ない。ところがキャシュメモリを有す
る情報処理装置では、データ処理の実行中に必要なオペ
ランドを、その都度主メモリとブロックで対応づけられ
ているキャシユメモリにアクセスするが、キャシュメモ
リにそのオペランドが存在しない場合には主メモリから
キャシュメモリーこブロック転送がなされ、この間処理
動作は特さたれてしまう。
Conventionally, there are many techniques related to prefetching of instructions in advance control, but there are very few techniques related to prefetching of operands. However, in an information processing device having a cache memory, necessary operands are accessed each time during execution of data processing from the cache memory, which is associated with the main memory in blocks, but if the operand does not exist in the cache memory, A block is transferred from the main memory to the cache memory, and processing operations are interrupted during this time.

この為、キャシュメモリを有する情報処理装置において
はキャシュメモリ内に必要なデータができるだけ多く記
憶していることが望ましいわけであり、これを実現する
方法として近い将釆必要と思われるデータをキヤシュメ
モリにブロック転送するプリフェッチ手段が必要とされ
る。本発明は上記プリフェツチの制御方式に関するもの
で、特に長いオペランドあるいは複数のオペランドの処
理を実行する命令で有効な情報処理装置におけるプリフ
ェッチ方式を提供することを目的とする。
For this reason, it is desirable for information processing devices with cache memory to store as much necessary data as possible in the cache memory, and one way to achieve this is to store data that will be necessary in the near future in the cache memory. A prefetch means is required for block transfer. The present invention relates to the above prefetch control method, and an object of the present invention is to provide a prefetch method for an information processing device that is particularly effective for instructions that process long operands or multiple operands.

そして、本発明では先行制御の状態に関係なく、現在実
行している命令のオペランドのプリフェッチを行なう特
徴を有する。
The present invention is characterized in that the operands of the currently executed instruction are prefetched regardless of the state of advance control.

また、本発明ではプリフェツチによる障害を取り除く機
能を有する。即ち、プリフェッチの実行中はプロセッサ
をストップしないため、プリフェッチの動作が完了する
前に同一ブロックに対して、新なREAD要求又はWR
ITE要求が発生する可能性がある。従って、前記RE
AD要求がプリフェッチの動作中に発生されると、主メ
モ,IJの同一ブロックに対し2重のアクセスが行なわ
れるため時間の無駄が生ずる。また、WRITE要求が
プリフェツチ中に行なわれると、主メモリとキャシュメ
モリの内容に矛盾をきたすことになる。そこで、本発明
では前記の障害の発生を防止するため、プリフェッチと
同一ブロックに対してデータ転送要求が発生した場合、
プリフェッチが終了するまで、前記データ転送要求の処
理を待機させる手段を具備するものである。
Furthermore, the present invention has a function of eliminating the trouble caused by prefetching. That is, since the processor is not stopped while prefetching is being performed, a new READ request or WR request is made to the same block before the prefetching operation is completed.
ITE requests may occur. Therefore, the RE
If an AD request is generated during a prefetch operation, the same block in the main memory and IJ will be accessed twice, resulting in wasted time. Additionally, if a WRITE request is made during prefetching, the contents of main memory and cache memory will be inconsistent. Therefore, in the present invention, in order to prevent the above-mentioned failure from occurring, when a data transfer request occurs for the same block as the prefetch,
The apparatus includes means for making the processing of the data transfer request wait until the prefetch is completed.

以下、図面を参照し本発明のデータプリフェッチ方式を
詳述する。
Hereinafter, the data prefetch method of the present invention will be described in detail with reference to the drawings.

第1図はキャシュ・メモリを有する情報処理装置の概略
構成を示したブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an information processing device having a cache memory.

同時において1川ま主メモリ、11は主メモリー0とブ
ロックで対応づけられたデータを保持するキャシュ・メ
モリ、なおキヤシユ・メモリ11は主メモリー0より高
速アクセス出来るメモリ素子によって構成されているこ
とは言うまでもない。12は演算を実行する演算制御部
、13は命令の解読、命令の分岐制御、オペランドのア
ドレス計算、オペランドアクセスなどを実行する命令制
御部、14は命令制御部13または演算制御部12とキ
ャシュ・メモリー1あるいは主メモリー0とのデータ転
送を制御するメモリアクセス制御部、15はマイクロプ
ログラム制御方式に必要な制御記憶部である。なお、第
1図ではマイクロプログラム制御による情報処理装置の
実施例を示したものであるが、本発明は制御記憶部15
を有しないハードウェア制御による情報処理装置であっ
ても十分実施し得るものである。第2図は、本発明のプ
リフェッチ方式が適用される命令形式の一実施例である
At the same time, 1 main memory, 11 is cache memory that holds data associated with main memory 0 in blocks, and cache memory 11 is composed of memory elements that can be accessed faster than main memory 0. Needless to say. 12 is an arithmetic control unit that executes arithmetic operations; 13 is an instruction control unit that executes instruction decoding, instruction branch control, operand address calculation, operand access, etc.; and 14 is an instruction control unit 13 or an arithmetic control unit 12 and a cache. A memory access control section 15 that controls data transfer with the memory 1 or the main memory 0 is a control storage section necessary for the microprogram control method. Although FIG. 1 shows an embodiment of the information processing device controlled by a microprogram, the present invention is based on the control storage unit 15.
The present invention can be implemented satisfactorily even with an information processing device controlled by hardware that does not have a hardware control system. FIG. 2 is an example of an instruction format to which the prefetch method of the present invention is applied.

同図で示されている命令語は命令コードとオペランド1
乃至オペランド3とによって構成されており、前記オペ
ランドー乃至オペランド3中のAI,A2,A3は各々
のアドレス部、T1,T2,T3は各々のデータタイプ
(1坊隼数の符号形式、1坊隼数または文字のビット長
を示す。)、N1,N2,N3は各々の10進数または
文字のオペランド長を示す。そして、この命令はオペラ
ンドーとオペランド2とのデータを演算し、結果をオペ
ランド3にストアする命令と仮定する。第3図は第1図
に示した情報処理装置において本発明のプリフェッチ方
式が適用される先行制御の深さを3段にした場合の実施
例を示したものである。
The instruction word shown in the figure is the instruction code and operand 1.
AI, A2, and A3 in the operands and operands 3 are the respective address parts, and T1, T2, and T3 are the respective data types (code format of 1-bod Hayabusa number, 1-bob Hayabusa code format, ), N1, N2, and N3 indicate the operand length of each decimal number or character. Assume that this instruction is an instruction that operates on the data of operand and operand 2, and stores the result in operand 3. FIG. 3 shows an embodiment in which the depth of advance control to which the prefetch method of the present invention is applied in the information processing apparatus shown in FIG. 1 is set to three stages.

同図において、命令制御部13で行なわれる処理動作を
1サイクルと称し、この1サイクルは命令の解読、オペ
ランドアドレスの計算、メモリコマンド発生、ページア
ドレスの実アドレスへの変換等を実行する。また、メモ
リアクセス制御部14、キャシュメモリ11、主メモリ
10で行なわれる処理動作をCサイクルと称し、このC
サイクルでは前記1サイクルで発生されたデータ転送要
求を受取り、キャシュメモリ11あるいは必要に応じて
主メモリー0のアクセスを行ない、必要ならばアクセス
したデータを演算制御部14へ転送する動作を行なう。
更に、演算制御部14で行なわれる処理動作をEサイク
ルと称し、このEサイクルはメモリアクセス制御部14
から転送されたデータを用いて演算の実行を行なう。さ
て、上託した第3図で示される3段の先行制御方式をと
り、第2図の命令を実行したときの処理動作を第4図の
タイミングチャートを参照し説明する。
In the figure, the processing operation performed by the instruction control unit 13 is called one cycle, and this one cycle executes decoding of an instruction, calculation of an operand address, generation of a memory command, conversion of a page address into a real address, etc. Furthermore, the processing operations performed in the memory access control unit 14, cache memory 11, and main memory 10 are referred to as a C cycle.
In the cycle, the data transfer request generated in the previous cycle is received, the cache memory 11 or the main memory 0 is accessed as necessary, and the accessed data is transferred to the arithmetic control section 14 if necessary.
Furthermore, the processing operation performed by the arithmetic control unit 14 is referred to as an E cycle, and this E cycle is performed by the memory access control unit 14.
The calculation is performed using the data transferred from. Now, with reference to the timing chart of FIG. 4, the processing operation when the three-stage advance control method shown in FIG. 3 is adopted and the instructions of FIG. 2 are executed will be explained.

第4図において、1,C,Eは第3図の1サイクル、C
サイクル、Eサイクルでの処理に対応する。そして、本
発明の先行制御を第2図の命令の実行に適用すると、先
ず11にて命令の最初の語、命令語がキャシュメモリ1
1のインストラクションバッフア(図示せず)から命令
制御部亀3に送られ、その命令の解読が行なわれる。こ
の11時点で命令制御部13は複数命令語である事、ま
たプリフェツチを行なう命令である事が判断される。次
に12では命令の次の語(オペランドーに関する諸)が
キャシュメモリ11から命令制御部13に送られ、オペ
ランドアドレス生成回路によってオペランド1のアドレ
スが計算される。
In Figure 4, 1, C, and E are 1 cycle in Figure 3, and C
It corresponds to processing in cycle and E cycle. When the advance control of the present invention is applied to the execution of the instruction shown in FIG.
The instruction is sent from the instruction buffer 1 (not shown) to the instruction control unit 3, and the instruction is decoded. At time point 11, the instruction control unit 13 determines that there are multiple instruction words and that the instruction is for prefetching. Next, at step 12, the next word of the instruction (related to the operand) is sent from the cache memory 11 to the instruction control section 13, and the address of operand 1 is calculated by the operand address generation circuit.

このオペランド1のアドレスはページアドレス変換回路
によってアドレス変換され、そのアドレスがメモリアド
レス制御部14に転送されると同時に、命令制御部13
内のメモリコマンド発生回路からブリフェツチ要求のコ
マンドをメリアクセス制御部14に転送する。次に13
では命令の次の語(オペランド2に関する諸)がキャシ
ュメモリ11から命令制御部13に転送され、上記と同
様にオペランドアドレス生成回路によってオペランド2
のアドレスが計算される。
The address of operand 1 is converted by the page address conversion circuit, and at the same time, the address is transferred to the memory address control unit 14, and at the same time, the address is transferred to the instruction control unit 13.
A briffet request command is transferred from the memory command generation circuit in the memory access control unit 14. Next 13
Then, the next word of the instruction (related to operand 2) is transferred from the cache memory 11 to the instruction control unit 13, and similarly to the above, the operand address generation circuit generates the operand 2.
address is calculated.

このオペランド2のアドレスもページアドレス変換回路
によってアドレスが変換され、そのアドレスとメモリコ
マンド発生回路からのプリフェッチ要求のコマンドをメ
モリアクセス制御部14に転送する。この13と同じタ
イミングにてCサイクルのCIが並列的に処理される。
即ち、CIでは12で発生したプリフェッチ要求を受取
ったメモリアクセス制御部14は要求されたアドレスを
有するブロックがキヤシユメモリ11に存在するかどう
かを調べ、もしキヤシユメモリ11に存在しない場合は
主メモリ10に対してブロック転送要求を発生する。こ
のブロック転送によるデー外まキャシュメモリ11の対
応するブロックに書込まれるが、演算制御部12には転
送されない。一方、要求されたアドレスを有するブロッ
クがキャシュメモリ11に存在するならばメモリアクセ
ス制御部14は、前記プリフェツチ要求に対して何の処
理も行なわれない。
The address of this operand 2 is also converted by the page address conversion circuit, and the address and the prefetch request command from the memory command generation circuit are transferred to the memory access control unit 14. CI of C cycle is processed in parallel at the same timing as this 13.
That is, in the CI, upon receiving the prefetch request generated in step 12, the memory access control unit 14 checks whether a block having the requested address exists in the cache memory 11, and if it does not exist in the cache memory 11, the block is sent to the main memory 10. A block transfer request is generated. The data resulting from this block transfer is written into the corresponding block of the cache memory 11, but is not transferred to the arithmetic control unit 12. On the other hand, if a block having the requested address exists in the cache memory 11, the memory access control unit 14 does not perform any processing in response to the prefetch request.

次に14では、命令のオペランド3に関する語がキヤシ
ュメモリ11から命令制御部13に送られ、オペランド
3のアドレス計算が行なわれる。
Next, in step 14, a word regarding operand 3 of the instruction is sent from cache memory 11 to instruction control section 13, and address calculation for operand 3 is performed.

オペランド3のアドレスはストアオペランドを示すもの
であるため、プリフェツチの必要はない。この14と同
じタイミングであるC2では、上記13で発生したオペ
ランド2のプリフェッチ要求の処理が行なわれる。この
プリフェツチ要求の処理は上記したCIで実行したオペ
ランド1のプリフェッチ要求と同一の処理が行なわれる
。そして、オペランド2に対するプリフェツチ要求した
アドレスを有するブロックがキャシュメモリ11に存在
しない場合は主メモリー0からブ。ック転送が行なわれ
、キャシュメモリ11に確保される。最後にEサイクル
で処理されるEI乃至ENでは実際の命令の実行が行な
われる。
Since the address of operand 3 indicates a store operand, there is no need for prefetching. At C2, which is the same timing as 14, the prefetch request for operand 2 generated in 13 above is processed. The processing of this prefetch request is the same as the prefetch request for operand 1 executed by the CI described above. If there is no block in the cache memory 11 that has the address requested for prefetching of operand 2, the block is read from main memory 0. A block transfer is performed and the data is secured in the cache memory 11. Finally, in EI to EN processed in the E cycle, actual instructions are executed.

即ち、上記12乃至14において計算されたアドレスで
オペランドァクセス、演算の実行、結果のストアを行な
つ。上記の実施例では、先行制御を初期の1サイクルの
段階でプリフェッチ要求を発生させるもので、第4図の
12および13にオペランド1およびオペランド2のプ
リフェッチ要求を示すコマンドを命令制御部13内のメ
モリコマンド発生回路からメモリアクセス制御部14に
発生していた。
That is, operand access, operation execution, and result storage are performed using the addresses calculated in steps 12 to 14 above. In the above embodiment, a prefetch request is generated at the initial stage of one cycle of advance control, and commands indicating prefetch requests for operands 1 and 2 are sent to 12 and 13 in FIG. 4 in the instruction control unit 13. This was generated from the memory command generation circuit to the memory access control unit 14.

しかしながら、プリフェツチ要求は上記実施例に限定さ
れるものではなく、例えば第1図の制御記憶部15にブ
リフェッチ要求を発生する機能を具備させてもさしつか
えない。なお、制御記憶部15を有しない情報処理装置
では第1図の演算制御部12にプリフェッチ要求を発生
する機能を具備させてもさしつかえない。さて、次に前
記した制御記憶部15にプリフェッチ要求を発生する機
能を具備せしめた場合の処理動作を第5図のタイミング
チャートを参照し説明する。
However, the prefetch request is not limited to the above embodiment; for example, the control storage unit 15 shown in FIG. 1 may be provided with a function of generating a prefetch request. Note that in an information processing apparatus that does not have the control storage section 15, the arithmetic control section 12 shown in FIG. 1 may be provided with a function of generating a prefetch request. Next, the processing operation when the control storage section 15 described above is provided with a function of generating a prefetch request will be explained with reference to the timing chart of FIG.

なお、第5図に示すタイミングチャートはオペレーティ
ングシステムなどで使用されている制御命令の実行を実
施例として示したものである。前記制御命令ではA,B
,C、の3つのオペランド‘こ対して前処理、オペラン
ドアクセス、演算処理が必要とされている命令であって
、この場合のプリフェッチを以下に説明する。先ず、1
サイクルでは命令の解読が行なわれる。
Note that the timing chart shown in FIG. 5 shows an example of the execution of control instructions used in an operating system or the like. In the above control command, A, B
, C, which requires preprocessing, operand access, and arithmetic processing for the three operands. Prefetch in this case will be explained below. First, 1
In the cycle, instructions are decoded.

次のCサイクルではオペランドアクセスが行なわれ、こ
の時プリフェツチは行なわれない。次のEサイクルでは
この命令の主な実行を行なう。即ち、EIの期間でオペ
ランドAに関する前処理が行なわれる。次にE2の期間
でオペランドBの前処理と同時にオペランドAのプリフ
ェッチが行なわれる。次にE3の期間でオペランドAの
アクセスと演算処理が行なわれる。このE3の段階では
前記E2にてオペランドAのプリフェツチが行なわれて
いるため、オペランドAのアクセスと演算処理が実行す
ることが出釆る。次にE4の期間でオペランドCの前処
理と同時にオペランドBのプリフエツチが行なわれる。
次にE5の期間ではオペランドBのアクセスと演算処理
が行なわれる。このE5の段階では前記E4にてオペラ
ンドBのプリフェツチが行なわれているため、オペラン
ドBのアクセスと演算処理が実行することが出来る。最
後にE6の期間ではオペランドCのアクセスと演算処理
が行なわれる。前記のようにオペランドアクセス以前に
必然的に行なうべき他の仕事があるとき、これを積極的
に前段にもってきて、且つ同時にプリフェツチを行なう
ことにより優れた効果を発揮することが出釆る。上記し
たプリフェッチ動作をより効果的に使用するためには「
プリフェッチによるブロック転送が完全に終了してから
実際のオペランドアクセスが行なわれた方がよい訳だが
、プリフェッチに対する主メモリ10のデータ転送が遅
れた時、またプリフヱッチ後のオペランドアクセスが命
令制御部13または演算制御部12から早い時期に出さ
れた時などは、プリフェツチが終了しないうちに新たな
オペランドアクセスが出る可能性がある。
Operand access is performed in the next C cycle, and no prefetch is performed at this time. In the next E cycle, this instruction is mainly executed. That is, preprocessing regarding operand A is performed during the EI period. Next, in period E2, operand A is prefetched at the same time as operand B is preprocessed. Next, during period E3, access and arithmetic processing of operand A are performed. At this stage of E3, since operand A has been prefetched at E2, access and arithmetic processing of operand A may be executed. Next, in period E4, prefetching of operand B is performed simultaneously with preprocessing of operand C.
Next, in period E5, access and arithmetic processing of operand B are performed. At this stage of E5, since operand B has been prefetched at E4, access and arithmetic processing of operand B can be executed. Finally, in period E6, access and arithmetic processing of operand C are performed. As mentioned above, when there is other work that must necessarily be done before operand access, excellent effects can be achieved by actively bringing it to the front stage and performing prefetching at the same time. In order to use the prefetch operation described above more effectively,
It is better to perform the actual operand access after the block transfer by prefetch is completely completed, but if the data transfer of the main memory 10 for prefetch is delayed, or if the operand access after prefetch is delayed by the instruction control unit 13 or If the arithmetic control unit 12 issues the operand at an early stage, there is a possibility that a new operand access will occur before the prefetch is completed.

つまり、プリフェッチが終了していないうちに同一フロ
ッ外こ対して新たなオペランドアクセスが行なわれた場
合、2重のデータ転送要求が主メモリの同一ブロックに
出力されることがあり得る。この様な状態になった時、
プリフェッチの効果がなくなるばかりでなく、後のオペ
ランドアクセスに遅れを生じさせることも起り得る。ま
た、何らかの原因でプリフェツチと同一ブロックに書き
込み要求が発生したとき、書き込み要求がプリフェッチ
終了以前に受けつけられると主メモリ10とキャシュメ
モリ11の内容に矛盾をきたすことになる。この場合は
プリフェツチによるキヤシュメモリ11の書き込みが終
了してから前記書き込み要求によるキャシュメモリへの
書き込みを行なわなければならない。本発明はキャシュ
ディレクトリ一に工夫をこらし、プリフェツチ要求のコ
マンド‘こよるデータ転送が完了しないうちにキャシュ
メモリの同一ブロックに対して新たなデータ転送要求が
発生した時に、主メモリの同一ブロックに対して2重の
アクセスを防止するための機能を有する。
That is, if a new operand access is made outside the same flop before prefetching is completed, double data transfer requests may be output to the same block of the main memory. When you are in a situation like this,
Not only will the effect of prefetching be lost, but it may also cause a delay in subsequent operand access. Further, when a write request is generated in the same block as the prefetch for some reason, if the write request is accepted before the prefetch is completed, the contents of the main memory 10 and the cache memory 11 will be inconsistent. In this case, it is necessary to write to the cache memory 11 according to the write request after the prefetch has finished writing to the cache memory 11. In the present invention, the cache directory is devised so that when a new data transfer request occurs to the same block in the cache memory before the data transfer caused by the prefetch request command is completed, the same block in the main memory is It has a function to prevent double access.

第6図は上記したキャシュディレクトリ一の実施例を示
すものである。
FIG. 6 shows an embodiment of the above cache directory.

同図において、AO乃至ANは仮想アドレス、VO乃至
VNはディレクトリ−の内容が有効かどうかを示すバリ
ディティビット、PO乃至PNはどのブロックを使用す
るかをそのアルゴリズムで決められるラワンド・ロビン
カウンタ以外にプリフェッチ要求によるデータ転送が完
了していないことを示すペンディングビット、RRは次
に使用されるブロック。ケーションを示す。この第6図
で示したキャシュディレクトリ−を用いたときの第1図
の情報処理装置におけるデータ転送の制御を第7図のフ
ロチャートを参照し以下に説明する。本発明ではデータ
転送要求が発生したとき前記ペンディングビットを調べ
、もし前記ペンディングビットがセットしていれば、以
前に同一ブロックに対してプリフィッチ要求が出力して
、前記ブロックの転送が終了していないことを意味し、
データ転送要求の処理は前記ペンディングビットがリセ
ット、即ちプリフエツチ動作が終了するまで待機される
。即ち、第7図において、命令制御部13または演算制
御部12からメモリアクセス制御部14にデータ転送要
求が転送されて来ると、メモリアクセス制御部14は対
応するブロックのペンディングビットをSIで調べる。
In the figure, AO to AN are virtual addresses, VO to VN are validity bits that indicate whether the contents of the directory are valid, and PO to PN are non-rawand robin counters that can determine which block to use using the algorithm. The pending bit indicates that the data transfer due to the prefetch request has not been completed, and the RR indicates the next block to be used. to show the application. The control of data transfer in the information processing apparatus of FIG. 1 when using the cache directory shown in FIG. 6 will be described below with reference to the flowchart of FIG. 7. In the present invention, when a data transfer request occurs, the pending bit is checked, and if the pending bit is set, a prefetch request was previously output for the same block and the transfer of the block has been completed. means no,
Processing of the data transfer request is awaited until the pending bit is reset, ie, the prefetch operation is completed. That is, in FIG. 7, when a data transfer request is transferred from the instruction control section 13 or the arithmetic control section 12 to the memory access control section 14, the memory access control section 14 checks the pending bit of the corresponding block using SI.

ペンディングビットが1で且つディレクトリ‐がビツト
した時は同一ブロックがプリフェッチにによるデータ転
送待ちであるため、ペンディングビットが0になるまで
前記データ転送要求は受けつけられない。ペンディング
ビットが0となりデータ転送要求が受けつけられると、
メモリコマンドのタイプがS2で調べられる。
When the pending bit is 1 and the directory is bit, the same block is waiting for data transfer by prefetch, so the data transfer request cannot be accepted until the pending bit becomes 0. When the pending bit becomes 0 and the data transfer request is accepted,
The type of memory command is checked in S2.

例えば前記メモリコマンドがライトコマンドであるなら
ば対応するブロックがキャシュメモリ11に存在するか
どうかをS3で調べられる。そして、対応するブロック
がキャシュメモリ11に存在(ヒット)する時はキャシ
ュメモリ11の対応するブロックにデータをS4で書き
込み、S5で主メモリー0に対してライトデータ転送要
求を出す。しかし対応するブロックがキャシュメモリ1
1に存在しない(ミスヒット)の時はキャシュメモリ1
1へのデータの書き込みは行なわず、S5で主メモリー
01こ対してライトデータ転送要求を出す。そしてライ
ト動作は終了する。次に、メモリコマンドのタイプがS
2で調べた時、リードコマンドであるならばS6にて普
通のリード要求か、あるいはプリフェツチ要求かを調べ
る。
For example, if the memory command is a write command, it is checked in S3 whether a corresponding block exists in the cache memory 11. When the corresponding block exists (hit) in the cache memory 11, data is written to the corresponding block in the cache memory 11 in S4, and a write data transfer request is issued to the main memory 0 in S5. However, the corresponding block is cache memory 1
If it does not exist in cache memory 1 (miss hit), cache memory 1
No data is written to the main memory 01, and a write data transfer request is issued to the main memory 01 in S5. The write operation then ends. Next, the type of memory command is S.
When checked in step 2, if it is a read command, it is checked in step S6 whether it is a normal read request or a prefetch request.

そして普通のリード要求のときは対応するフロックがキ
ャシュメモリ11に存在するかどうかをS7で調べ、存
在する(ヒット)時はS8にてキャシュメモリ11の対
応するブロックをアクセスし、その読み出したデータを
演算制御部12または命令制御部13に転送し終了する
。一方S7で調べた結果対応するブロックがキャシュメ
モリ11に存在しない(ミスヒット)の場合は、S9に
て演算制御部12命令制御部13の実行を停止せしめ、
SI川こて王〆モリ101こ対してリード要求を発生す
る。SIIでの主メモリ10からljードデータの転送
が完了すると、S12にてキャシュメモリ11の対応す
るブロックに前記リードデータを書き込み、更にSI3
にてディレクトリ−の対応するブロックのバリデイティ
ビツトをセットする。前記により対応するブロックがキ
ャシュメモリ11に確保されると、SI4にて前記リー
ドデータを演算制御部12または命令制御部13へ転送
され、S15にて演算制御部12、命令制御部13の実
行を再開し終了する。
In the case of a normal read request, it is checked in S7 whether the corresponding block exists in the cache memory 11, and if it exists (hit), the corresponding block in the cache memory 11 is accessed in S8, and the read data is is transferred to the arithmetic control unit 12 or instruction control unit 13, and the process ends. On the other hand, if the result of checking in S7 is that the corresponding block does not exist in the cache memory 11 (mishit), the execution of the arithmetic control unit 12 and instruction control unit 13 is stopped in S9,
A read request is issued to SI Kawakoteoh Shimori 101. When the transfer of the lj code data from the main memory 10 in the SII is completed, the read data is written in the corresponding block of the cache memory 11 in S12, and then the read data is written in the corresponding block of the cache memory 11 in S12.
sets the validity bit of the corresponding block in the directory. When the corresponding block is secured in the cache memory 11 as described above, the read data is transferred to the arithmetic control unit 12 or the instruction control unit 13 in SI4, and the execution of the arithmetic control unit 12 or instruction control unit 13 is performed in S15. Restart and end.

ところで、前記S6においてプリフェッチのコマ、ンド
であることを判断した時の処理はS16に進み、前記S
16にて対応するブロックがキャシュメモリ11に存在
するかどうかを調べる。そして、キャシュメモリ11に
対応するブロックが存在する(ヒット)時はプリフェッ
チコマンド}こ対し何の動作も行なわず終了する。しか
し、対応するブロックがキャシュメモリ11に存在しな
い(ミスヒット)場合はS17にてディレクトリ−の対
応するペンディングビットをセットし、更にS18にて
主メモリ1川こ対してリード要求を発生する。このリー
ド要求はS9乃至SI5に示した普通のリード要求処理
と異なり、演算制御部12、命令制御部13の実行動作
は停止されることなく続行されている。そして、SI9
での主メモリ10からのりードデータ転送が完了すると
、S20もこて前記リードデータはキャシュメモリ11
の対応するブロックに書き込まれる。この時点では演算
制御部12または命令制御部13への転送は行なわれな
い。次に、S21にてディレクトリ−の対応するブロッ
クのペンディングビットがリセットし、且つバリディビ
ットをセットして動作を終了する。
By the way, when it is determined in S6 that it is a prefetch command, the process proceeds to S16, and the S
At step 16, it is checked whether the corresponding block exists in the cache memory 11. Then, when the corresponding block exists in the cache memory 11 (hit), the process ends without performing any operation in response to the prefetch command. However, if the corresponding block does not exist in the cache memory 11 (mishit), the corresponding pending bit of the directory is set in S17, and a read request is issued to the main memory 1 in S18. This read request is different from the normal read request processing shown in S9 to SI5, in which the execution operations of the arithmetic control section 12 and instruction control section 13 are continued without being stopped. And SI9
When the read data transfer from the main memory 10 is completed in step S20, the read data is transferred to the cache memory 11.
is written to the corresponding block. At this point, the data is not transferred to the arithmetic control section 12 or instruction control section 13. Next, in S21, the pending bit of the corresponding block in the directory is reset, and the valid bit is set, and the operation ends.

以上、説明したように、本発明によれば以下に示す特徴
と効果を有するものである。第1に本発明はプリフェツ
チ要求発生のアルゴリズムは命令実行中の有効な時期に
現在実行中の命令が近い将来必要とされるオペランドも
こ対して発生される。
As described above, the present invention has the following features and effects. First, in the present invention, the algorithm for generating a prefetch request is generated at a valid time during instruction execution, also for operands that will be required in the near future by the currently executing instruction.

このため、将来の先行制御方式をとる情報処理装置の中
で行なわれる本来のプリフェッチあるいは先行制御の空
き時間を利用して行なうプリフェツチと異なり独自のも
のである。第2に長いオペランド、複数オペランドの命
令に対するプリフェッチに優れた効果を発揮する。即ち
、十進数命令、文字を扱う命令、オベレーテイングシス
テムで使用される制御命令などではオペランドに長く複
数にまたがることが多い。本発明はこのような命令の実
行中にプリフェッチ要求を出すタイミングを容易に選べ
ることができる。第3にプリフヱッチするオペランドの
長さを任意に選択できる。即ち、本発明では個々の命令
の実行中にプリフェツチ要求が出されるためその命令に
合った長さのオペランドをプリフェツチすることが可能
である。第4にプリフェッチされたデータが使用される
確率が極めて高い。
For this reason, this method is unique, unlike the original prefetch that will be performed in an information processing apparatus that employs a future advance control method or the prefetch that is performed using idle time of advance control. Second, it exhibits an excellent prefetch effect for instructions with long operands or multiple operands. That is, decimal instructions, instructions that handle characters, control instructions used in operating systems, etc. often have long operands spanning multiple operands. The present invention allows the timing of issuing a prefetch request to be easily selected during the execution of such an instruction. Third, the length of the operand to be prefetched can be arbitrarily selected. That is, in the present invention, since a prefetch request is issued during the execution of an individual instruction, it is possible to prefetch an operand of a length suitable for that instruction. Fourth, the probability that prefetched data will be used is extremely high.

従来の先行制御の中で行なわれるブリフェッチは分岐命
令による分岐が意に反した場合は、その以前に出された
プリフェツチが意味を持たなくなることがあり得る。し
かし本発明では、命令の実行中にその命令が近い将来必
要とされるべきデータに対してプリフェッチ要求が発生
されるため、プリフヱツチされたデータが使用される確
率は極めて高い。
In the case of a prefetch performed in conventional advance control, if a branch by a branch instruction is unexpected, the previously issued prefetch may become meaningless. However, in the present invention, since a prefetch request is generated for data that will be needed in the near future during the execution of an instruction, the probability that the prefetched data will be used is extremely high.

第5にプリフェッチ要求のコマンドもこよるデータ転送
が完了しないうちに、キャシュメモリの同一ブロックに
対して新たなデータ転送要求が発生したとしても、主メ
モリの同一ブロックに対する2重のアクセスは防止する
ことが出来る。
Fifth, even if a new data transfer request occurs to the same block in the cache memory before the data transfer is completed, which also involves a prefetch request command, double access to the same block in the main memory should be prevented. I can do it.

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

第1図は本発明のプリフェツチ動作を適用する情報処理
装置のブロック図、第2図は本発明のプリフヱッチ動作
を必要とする形式の一実施例を示す図、第3図は第1図
で示した情報処理装置を処理サイクル毎に分割したブロ
ック図、第4図は第2図に示した命令形式のプIJフェ
ッチ処理を説明するタイミング図、第5図は他のプリフ
ェッチ処理を説明するタイミング図、第6図は本発明の
プリフェッチ処理に適用するキャシュディレクトリ一の
実施例を示す図、第7図は第6図のキャシュディレクト
リ一を有する第1図の情報処理装置の動作手順を示した
フローチャートである。 10……主メモリ、11……キヤシユメモリ、12・・
・・・・演算制御部、13・・・・・・命令制御部、1
4..・.・・メモリアクセス制御部。 オー図 オZ図 グミ図 矛4図 次5図 次6図 次7図
FIG. 1 is a block diagram of an information processing device to which the prefetch operation of the present invention is applied, FIG. 2 is a diagram showing an embodiment of a format requiring the prefetch operation of the present invention, and FIG. 4 is a timing diagram illustrating pre-IJ fetch processing in the instruction format shown in FIG. 2, and FIG. 5 is a timing diagram illustrating other prefetch processing. , FIG. 6 is a diagram showing an embodiment of the cache directory 1 applied to the prefetch processing of the present invention, and FIG. 7 is a flowchart showing the operating procedure of the information processing apparatus of FIG. 1 having the cache directory 1 of FIG. 6. It is. 10...Main memory, 11...Cache memory, 12...
...Arithmetic control section, 13...Instruction control section, 1
4. ..・.. ...Memory access control unit. O figure O Z figure Gummy Zuko 4 figure next 5 figure next 6 figure next 7 figure

Claims (1)

【特許請求の範囲】[Claims] 1 主メモリと、この主メモリとブロツクで対応づけら
れたデータを保持するキヤツシユメモリと、長いオペラ
ンドあるいは複数ロケーシヨンに存在するオペランドの
処理を行う命令と、この命令の実行中に近い将来必要と
するオペランドのデータがキヤツシユメモリに存在しな
い場合、前記オペランドのデータを有する主メモリから
ブロツク転送によりキヤツシユメモリに格納するプリフ
エツチ手段と、前記プリフエツチ手段によるブロツク転
送が終了する前に同一ブロツクに対して新たなデータ転
送要求が発生した場合、前記プリフエツチ手段による前
記キヤツシユメモリへのブロツク転送が終了するまで前
記データ転送要求の処理を待たせる手段とを具備するこ
とを特徴とするデータプリフエツチ方式。
1. A main memory, a cache memory that stores data associated with this main memory in blocks, an instruction that processes long operands or operands that exist in multiple locations, and a If the data of the operand to be executed does not exist in the cache memory, a prefetch means stores the data of the operand from the main memory to the cache memory by block transfer; The data prefetch is characterized by comprising means for causing processing of the data transfer request to wait until block transfer to the cache memory by the prefetch means is completed when a new data transfer request is generated. method.
JP52142631A 1977-11-30 1977-11-30 Data prefetch method Expired JPS601655B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP52142631A JPS601655B2 (en) 1977-11-30 1977-11-30 Data prefetch method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP52142631A JPS601655B2 (en) 1977-11-30 1977-11-30 Data prefetch method

Publications (2)

Publication Number Publication Date
JPS5475964A JPS5475964A (en) 1979-06-18
JPS601655B2 true JPS601655B2 (en) 1985-01-16

Family

ID=15319824

Family Applications (1)

Application Number Title Priority Date Filing Date
JP52142631A Expired JPS601655B2 (en) 1977-11-30 1977-11-30 Data prefetch method

Country Status (1)

Country Link
JP (1) JPS601655B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6243060U (en) * 1985-09-03 1987-03-14

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5786180A (en) * 1980-11-17 1982-05-29 Hitachi Ltd Memory device having address converting mechanism
JPS62102344A (en) * 1985-10-29 1987-05-12 Fujitsu Ltd Buffer memory control system
JPS63110946U (en) * 1987-12-10 1988-07-16
US6912650B2 (en) 2000-03-21 2005-06-28 Fujitsu Limited Pre-prefetching target of following branch instruction based on past history
JP5593647B2 (en) * 2009-07-30 2014-09-24 日本電気株式会社 Information processing apparatus, load instruction delay determination method, load instruction delay determination program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6243060U (en) * 1985-09-03 1987-03-14

Also Published As

Publication number Publication date
JPS5475964A (en) 1979-06-18

Similar Documents

Publication Publication Date Title
US5016169A (en) Data processor capable of correctly re-executing instructions
JPS6161436B2 (en)
JPH0248931B2 (en)
JP2001290706A (en) Prefetch for tlb cache
JPS59231652A (en) Detection system for memory access overlap
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system
JPS601655B2 (en) Data prefetch method
US4124892A (en) Data processing systems
JP2783285B2 (en) Information processing device
JPS6410858B2 (en)
JP2671160B2 (en) Exception handling method
JPH0552539B2 (en)
JPS6136671B2 (en)
JP2915680B2 (en) RISC processor
JP2758624B2 (en) Speed control method of micro program
JPH0133856B2 (en)
JPS6149695B2 (en)
JP2806690B2 (en) Microprocessor
JPH02151930A (en) Storage buffer managing system
JPH01255933A (en) Sweeping-out control system
JPS6221130B2 (en)
JPS61133440A (en) Data processing unit
JPS5896346A (en) Hierarchical arithmetic system
JPH03164945A (en) Data processor
JPH02294829A (en) Memory operand takeout system