JPH0348932A - Memory access control method - Google Patents

Memory access control method

Info

Publication number
JPH0348932A
JPH0348932A JP1185036A JP18503689A JPH0348932A JP H0348932 A JPH0348932 A JP H0348932A JP 1185036 A JP1185036 A JP 1185036A JP 18503689 A JP18503689 A JP 18503689A JP H0348932 A JPH0348932 A JP H0348932A
Authority
JP
Japan
Prior art keywords
data
memory
read
controller
address
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
JP1185036A
Other languages
Japanese (ja)
Inventor
Toru Inoue
徹 井上
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP1185036A priority Critical patent/JPH0348932A/en
Publication of JPH0348932A publication Critical patent/JPH0348932A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To effectively utilize the function of a cache memory CM by executing a pre-read instruction to read the instruction or the data to access for the first time into the CM prior to the access. CONSTITUTION:When a mapped address serving as a pre-read instruction is sent to a pre-read controller 4 from a microprocessor 1, an address decoder 5 selects a chip and applies a selection signal (a) to the controller 4. A timing controller 6 of the controller 4 receives the signal (a) and starts a pre-read operation of a CM 3 to produce a timing signal (b). This signal (b) functions to hold an address to be pre-read and outputted to a data bus from the microprocessor 1 in an address register 7. The controller 6 produces a control signal (c) to the address which reads the instructions and the data out of a main memory 2. At the same time, the controller 6 produces a control signal (d) to write the instructions and data read out of the memory 2 into the CM 3 and reads them.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 この発明は、マイクロプロセッサと主メモリとの間のア
クセスを高速化するために用いられるキャッシュメモリ
に関連する技術であって、殊にこの発明は、キャッシュ
メモリへの命令やデータの読込みを制御するのに適用さ
れるメモリアクセス制御方法に関する。
Detailed Description of the Invention <Industrial Application Field> The present invention relates to a technology related to a cache memory used for speeding up access between a microprocessor and a main memory, and in particular the present invention relates to a memory access control method applied to control reading of instructions and data into a cache memory.

〈従来の技術〉 この種メモリシステムは、主メモリ上にある命令やデー
タを必要に応じて主メモリより高速なキャッシュメモリ
上に取り込むことにより、その後のメモリアクセスを高
速化してマイクロプロセッサの実行速度を向上させるも
のである。
<Prior art> This type of memory system speeds up subsequent memory access by loading instructions and data in main memory into cache memory, which is faster than main memory, as needed, thereby increasing the execution speed of the microprocessor. It is intended to improve

ところでキャッシュメモリ上に命令やデータが存在しな
い初期状態でメモリアクセスが行われると、キャッシュ
ミスが生じてマイクロプロセッサと主メモリとの間での
メモリアクセスに時間がかかり、キャッシュメモリによ
る効果を享受できない、キャッシュメモリは、−度読み
出された命令やデータはその後近い時点に再びアクセス
される可能性が高いという確率的事実に基づくものであ
るから、たとえキャッシュミスが生じても、その命令や
データが繰り返し使用されるときは、その後のメモリア
クセスが高速化されて、キャッシュメモリによる効果は
大きなものとなる。
By the way, if memory access is performed in the initial state where there are no instructions or data in the cache memory, a cache miss will occur and memory access between the microprocessor and main memory will take time, making it impossible to enjoy the effects of the cache memory. Cache memory is based on the probabilistic fact that instructions and data that have been read once are likely to be accessed again at some point in time, so even if a cache miss occurs, the instruction or data When the cache memory is used repeatedly, subsequent memory access becomes faster, and the effect of the cache memory becomes large.

〈発明が解決しようとする問題点〉 しかしながら例えば−度しか参照しないよ2うなデータ
などの場合は、主メモリよりそのデータなどをキャッシ
ュメモリ上に取り込むことが無駄となるばかりでなく、
キャッシュメモリの機能が有効に発揮されず、キャッシ
ュメモリを用いることによる効果が全く享受できないと
いう問題がある。
<Problems to be Solved by the Invention> However, for example, in the case of data that is referenced only - degrees, it is not only wasteful to import the data from the main memory into the cache memory;
There is a problem in that the function of the cache memory is not effectively demonstrated, and the effects of using the cache memory cannot be enjoyed at all.

この発明は、上記問題に着目してなされたもので、キャ
ッシュミスが生ずる前に命令やデータを予めキャッシュ
メモリへ読み込む方式を採用することにより、キャッシ
ュメモリの機能を有効に発揮させ、もってメモリアクセ
スの高速化を実現することを目的とする。
This invention was made with a focus on the above problem, and by adopting a method of loading instructions and data into the cache memory in advance before a cache miss occurs, the function of the cache memory is effectively utilized, thereby making it possible to access memory. The aim is to achieve faster speeds.

〈問題点を解決するための手段〉 上記目的を達成するため、この発明では、メモリアクセ
スを高速化するためのキャッシュメモリが用いられたシ
ステムにおいて、初めてアクセスすべき命令やデータを
、そのアクセスに先立ってキャッシュメモリへ読み込む
ための先読み命令を実行して、キャッシュメモリへ読み
込むようにしている。
<Means for Solving the Problems> In order to achieve the above object, in the present invention, in a system using a cache memory for speeding up memory access, instructions and data to be accessed for the first time are A prefetch instruction for reading into the cache memory is executed in advance, and the data is read into the cache memory.

く作用〉 はじめてアクセスすべき命令やデータにつき、キャッシ
ュミスが生ずる前に予めキャッシュメモリへ読み込んで
おくので、その命令やデータのメモリアクセスに際して
確実にキャツシュヒツトすることになる。このためその
命令やデータが繰り返し使用するか否かを問わず、キャ
ッシュメモリの機能が有効に発揮され、常にキャッシュ
メモリを用いることによる効果を享受できる。
Effect> Since instructions and data to be accessed for the first time are read into the cache memory in advance before a cache miss occurs, the instructions and data are reliably cached when accessing the memory. Therefore, regardless of whether the instructions or data are used repeatedly, the function of the cache memory is effectively exhibited, and the effects of using the cache memory can always be enjoyed.

〈実施例〉 第1図は、この発明を実施するためのメモリシステムの
概略構成を示すもので、マイクロプロセッサ1.主メモ
リ2.キャッシュメモリ3などの縦部の構成に加えて先
読みコントローラ4が設けである。
<Embodiment> FIG. 1 shows a schematic configuration of a memory system for implementing the present invention, in which a microprocessor 1. Main memory 2. In addition to the vertical structure such as the cache memory 3, a prefetch controller 4 is provided.

マイクロプロセッサ1は主メモリ4との間で命令やデー
タをアクセスするもので、このメモリアクセスを高速化
するために、主メモリ4上の命令やデータを主メモリ2
よりも高速なキャッシュメモリ3上へ取り込むようにな
っている。
The microprocessor 1 accesses instructions and data from the main memory 4. In order to speed up this memory access, the microprocessor 1 transfers instructions and data from the main memory 4 to the main memory 2.
The data is imported into the cache memory 3, which is faster than the previous version.

このキャッシュメモリ3は主メモリ2より小容量である
が、そのメモリアクセスは高速に行い得る。
This cache memory 3 has a smaller capacity than the main memory 2, but its memory access can be performed at high speed.

先読みコントローラ4は、マイクロプロセッサ1より与
えられるI10命令としての先読み命令に基づき、アク
セスすべき主メモリ2上の命令やデータをそのアクセス
に先立ってキャッシュメモリ3へ予め読み込むための動
作を行うもので、第2図に示すように、タイミングコン
トローラ6とアドレスレジスタ7とで構成されている。
The prefetch controller 4 operates to read instructions and data in the main memory 2 to be accessed into the cache memory 3 in advance of the access based on a prefetch instruction as an I10 instruction given by the microprocessor 1. , as shown in FIG. 2, consists of a timing controller 6 and an address register 7.

この実施例の場合、キャッシュメモリ3への先読み制御
は、マイクロプロセッサ1の決まったアドレスにマツピ
ングされたレジスタへ先読みすべき主メモリ2のアドレ
スを設定することにより行われるもので、これにより設
定されたアドレスが主メモリ2に与えられる共に、主メ
モリ2の対応するアドレスの命令やデータがキャッシュ
メモリ3へ送出されてキャッシュメモリ3に取り込まれ
ることになる。
In the case of this embodiment, prefetch control to the cache memory 3 is performed by setting the address of the main memory 2 to be prefetched in a register mapped to a fixed address of the microprocessor 1. The corresponding address is given to the main memory 2, and the instructions and data at the corresponding address in the main memory 2 are sent to the cache memory 3 and taken into the cache memory 3.

前記先読み命令は、例えばアセンブラ言語でrMOV 
Al、(AO) Jのように表されるもので、この先読
み命令の場合、マイクロプロセッサl内部のA1で示さ
れるレジスタAlの内容(先読みすべき主メモリ2のア
ドレス)をAOで示されるレジスタの内容が表すアドレ
スにセットするよう指示している。
The read-ahead instruction is, for example, rMOV in assembler language.
Al, (AO) J. In the case of this prefetch instruction, the contents of register Al (address of main memory 2 to be prefetched) indicated by A1 inside microprocessor l are transferred to the register indicated by AO. It instructs to set it to the address indicated by the contents of.

マイクロプロセッサlから先読みコントローラ4ヘマツ
ピングされたアドレスが送られると、アドレスデコーダ
5がチップセレクトして、選択信号aを先読みコントロ
ーラ4へ与える。
When the mapped address is sent from the microprocessor l to the pre-read controller 4, the address decoder 5 selects a chip and provides a selection signal a to the pre-read controller 4.

先読みコントローラ4のタイミングコントローラ6が、
この選択信号aを受は取ると、キャッシュメモリ3の先
読み動作を開始して、マイクロプロセッサlよりデータ
バスへ出力される先読みすべきア、、ドレスをアドレス
レジスタ7に保持するためのタイミング信号すを発生す
る。
The timing controller 6 of the look-ahead controller 4 is
When this selection signal a is received, a prefetch operation of the cache memory 3 is started, and a timing signal is sent to hold the address to be prefetched, which is output from the microprocessor l to the data bus, in the address register 7. occurs.

またこのタイミングコントローラ6は、主メモI72よ
り命令やデータを読み出すべきアドレスに対して制御信
号Cを発生すると共に、主メモ+72から読み出された
命令やデータをキャッシュメモリ3に書き込むための制
御信号dを発生する。
The timing controller 6 also generates a control signal C for the address at which instructions and data are to be read from the main memory I72, and a control signal for writing the instructions and data read from the main memory +72 into the cache memory 3. generate d.

第3図は、命令とデータとを同一バスでアクセスする場
合のマイクロプロセッサ1による命令やデータの読込み
タイミングを示している。
FIG. 3 shows the timing of reading instructions and data by the microprocessor 1 when the instructions and data are accessed through the same bus.

第3図(1)は、従来のメモリアクセス制御方法であっ
て、マイクロプロセッサが0〜9の命令を順次読み込み
、ついで初めてアクセスする0のデータを読み込んだと
ころでキャッシュミスが発生した状態を示している。そ
の結果、このキャッシュミスに続いて主メモリからキャ
ッシュメモリへ0のデータの読込みが行われると共に、
このデータがマイクロプロセッサに取り込まれることに
なる。
Figure 3 (1) shows a conventional memory access control method in which a microprocessor sequentially reads instructions 0 to 9, and then a cache miss occurs when it reads data 0, which is accessed for the first time. There is. As a result, following this cache miss, 0 data is read from the main memory to the cache memory, and
This data will be taken into the microprocessor.

第3図(2)は、この発明にかかるメモリアクセス制御
方法であって、マイクロプロセッサ1が00データをア
クセスするに先立ち、0のデータの先読み命令を実行し
てキャッシュメモリ3にこのデータを予め読み込んでい
る。
FIG. 3(2) shows a memory access control method according to the present invention, in which, before the microprocessor 1 accesses 00 data, it executes a prefetch instruction for 0 data and stores this data in the cache memory 3 in advance. Loading.

このデータの先読み処理は他の命令の読込みと並列的に
行われるもので、0〜9の命令が順次読み込まれた後、
0のデータがメモリアクセスされるときにはキャツシュ
ヒツトし、これによりキャッシュミスによる時間的損失
の発生が防止される。
This data prefetching process is performed in parallel with reading other instructions, and after instructions 0 to 9 are read in sequence,
When 0 data is accessed to the memory, it is cached, thereby preventing time loss due to a cache miss.

〈発明の効果〉 この発明は上記の如く、初めてアクセスすべき命令やデ
ータを、そのアクセスに先立ってキャッシュメモリへ読
み込むための先読み命令を実行してキャッシュメモリへ
読み込むようにしたから、その命令やデータのメモリア
クセスに際して確実にキャツシュヒツトし、常にキャッ
シュメモリの機能が有効に発揮されて、キャッシュメモ
リを用いることによる効果を享受できるなど、発明目的
を達成した顕著な効果を奏する。
<Effects of the Invention> As described above, the present invention executes a prefetch instruction to read an instruction or data to be accessed for the first time into the cache memory prior to the access. The purpose of the invention has been achieved, and the invention achieves remarkable effects, such as ensuring that data is cached when accessing the memory, the function of the cache memory being effectively exhibited at all times, and the effects of using the cache memory being enjoyed.

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

第1図はこの発明を実施するためのメモリシステムの概
略構成を示すブロック図、第2図は先読みコントローラ
の構成を示すブロック図、第3図は従来方法とこの発明
にかかる方法との比較例を示す説明図である。 l・・・・マイクロプロセッサ 2・・・・主メモリ  3・・・・キャッシュメモリ4
・・・・先読みコントローラ
FIG. 1 is a block diagram showing a schematic configuration of a memory system for carrying out the present invention, FIG. 2 is a block diagram showing the configuration of a read-ahead controller, and FIG. 3 is an example of comparison between a conventional method and a method according to the present invention. FIG. l...Microprocessor 2...Main memory 3...Cache memory 4
・・・・Lookahead controller

Claims (1)

【特許請求の範囲】 メモリアクセスを高速化するためのキャッシュメモリが
用いられたシステムにおいて、 初めてアクセスすべき命令やデータを、そのアクセスに
先立ってキャッシュメモリへ読み込むための先読み命令
を実行して、キャッシュメモリへ読み込むことを特徴と
するメモリアクセス制御方法。
[Claims] In a system using a cache memory for speeding up memory access, a prefetch instruction is executed to read instructions and data to be accessed for the first time into the cache memory prior to the access. A memory access control method characterized by reading into a cache memory.
JP1185036A 1989-07-18 1989-07-18 Memory access control method Pending JPH0348932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1185036A JPH0348932A (en) 1989-07-18 1989-07-18 Memory access control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1185036A JPH0348932A (en) 1989-07-18 1989-07-18 Memory access control method

Publications (1)

Publication Number Publication Date
JPH0348932A true JPH0348932A (en) 1991-03-01

Family

ID=16163667

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1185036A Pending JPH0348932A (en) 1989-07-18 1989-07-18 Memory access control method

Country Status (1)

Country Link
JP (1) JPH0348932A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120150672A1 (en) * 1997-03-21 2012-06-14 Walker Digital, Llc Method and apparatus for providing and processing installment plans at a terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5293243A (en) * 1976-01-31 1977-08-05 Nec Corp Data processing unit performing preceding control

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5293243A (en) * 1976-01-31 1977-08-05 Nec Corp Data processing unit performing preceding control

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120150672A1 (en) * 1997-03-21 2012-06-14 Walker Digital, Llc Method and apparatus for providing and processing installment plans at a terminal
US20120191555A1 (en) * 1997-03-21 2012-07-26 Walker Digital, Llc Method and apparatus for providing and processing installment plans at a terminal
US8566230B2 (en) * 1997-03-21 2013-10-22 Walker Digital, Llc Method and apparatus for providing and processing installment plans at a terminal
US8566199B2 (en) * 1997-03-21 2013-10-22 Walker Digital, Llc Method and apparatus for providing and processing installment plans at a terminal

Similar Documents

Publication Publication Date Title
JP3289661B2 (en) Cache memory system
JP2003504757A (en) Buffering system bus for external memory access
KR960007833B1 (en) Method and apparatus for fast page mode selection
JPH0348932A (en) Memory access control method
KR970076214A (en) Data interface method between microprocessor and memory
JPH0448358A (en) Cache memory control system
JP3039391B2 (en) Memory system
JPH09319657A (en) Processor provided with buffer for reading instruction
JPH0447350A (en) Main storage read/response control
JPH06161897A (en) Control method for disk cache device
JPH05257807A (en) Cache memory controller
JPH01251248A (en) Cache control system for stack data structure
JPH0469750A (en) Memory control system
JPH01129334A (en) Data control system for cache memory
JPH04125748A (en) Cache memory control system
JPH04188226A (en) Instruction pre-read controller
JPH06324940A (en) Method and device for controlling memory
JPS6215645A (en) Central processing unit
JPH07141174A (en) Register
JPH01230152A (en) Cache memory
JPH0594407A (en) Bus control system
JPH1145180A (en) Cache control system
JPS62197843A (en) File access system
JPH0934785A (en) Prefetch controller
JPH0675855A (en) Cache control system