JPH05204758A - Microprocessor and memory control method - Google Patents

Microprocessor and memory control method

Info

Publication number
JPH05204758A
JPH05204758A JP4013683A JP1368392A JPH05204758A JP H05204758 A JPH05204758 A JP H05204758A JP 4013683 A JP4013683 A JP 4013683A JP 1368392 A JP1368392 A JP 1368392A JP H05204758 A JPH05204758 A JP H05204758A
Authority
JP
Japan
Prior art keywords
cache memory
instruction
memory
data
access
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
JP4013683A
Other languages
Japanese (ja)
Inventor
Koji Ozawa
幸次 小沢
Takehiko Nishida
健彦 西田
Mamoru Sueoka
守 末岡
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 JP4013683A priority Critical patent/JPH05204758A/en
Publication of JPH05204758A publication Critical patent/JPH05204758A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable the high-speed processing of a program for generating/ executing a new instruction by providing the means for accessing data and instructions from one cache memory controller to the other cache memory. CONSTITUTION:When generating the new instruction, a logical data address 410 outputted from an arithmetic unit 401 is converted to a physical data address 414 by a data cache memory controller (MMU) 403. Then, write data are written in a data cache memory 407. When executing the instruction, a logical instruction address 409 is converted to a physical instruction address 413 by an instruction MMU 402. The instruction MMU 402 reads the instruction by retrieving the data cache memory 407. When reloading the instruction, a logical data address 410 is outputted for writing the instruction to be newly reloaded as data. The MMU 403 retrieves an instruction cache memory 406 and reloads the old instruction to the new instruction.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロプロセッサお
よびそのメモリ制御方法に係り、特にキャッシュメモリ
を有する場合に好適なものに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor and a memory control method thereof, and more particularly to a microprocessor suitable for use with a cache memory.

【0002】[0002]

【従来の技術】従来、キャッシュメモリを用いたマイク
ロプロセッサおよびそのメモリ制御方法に関するものと
して、例えば、日経エレクトロニクス(日経マグロウヒ
ル社)1989.6.26(no.476)号の131頁〜
140頁に記載のものが挙げられる。
2. Description of the Related Art Conventionally, as to a microprocessor using a cache memory and a memory control method thereof, see, for example, Nikkei Electronics (Nikkei McGraw-Hill Co.) 1989.6.26 (no. 476), page 131-.
The thing described in page 140 is mentioned.

【0003】上記従来技術では、処理の高速化をはかる
ために、キャッシュメモリを命令用とデータ用とに分
け、論理アドレスから物理アドレスへのアドレス変換、
及びキャッシュメモリへのアクセスを制御するメモリ制
御部(以下、MMUとも称す)も命令用とデータ用とに
分け、キャッシュメモリの更新方式としてコピーバック
方式を用いる。
In the above-mentioned conventional technique, in order to speed up the processing, the cache memory is divided into one for instructions and one for data, and address conversion from a logical address to a physical address is performed.
Also, a memory control unit (hereinafter, also referred to as MMU) that controls access to the cache memory is divided into an instruction memory and a data memory, and a copy-back method is used as the cache memory updating method.

【0004】[0004]

【発明が解決しようとする課題】上記従来技術では、キ
ャッシュメモリの更新方式がコピーバック方式であるた
め、アプリケーションプログラムによって新しい命令を
生成し、この新しい命令を実行しようとした場合、命令
に対応したデータが主記憶装置内にはないために、主記
憶装置内に記憶された古いデータが演算ユニットへ転送
され、以後のアプリケーションプログラムの実行が出来
なくなる。
In the above-mentioned prior art, since the cache memory update method is the copy-back method, when an application program generates a new instruction and attempts to execute this new instruction, the instruction is handled. Since the data does not exist in the main storage device, the old data stored in the main storage device is transferred to the arithmetic unit, and it becomes impossible to execute the application program thereafter.

【0005】これを解消するには、新しく生成した命令
を実行する前に、データキャッシュメモリに存在する新
しく生成された命令を、主記憶装置に書き込む操作(以
下キャッシュプッシュと称す)が必要となる。
In order to solve this, before the newly generated instruction is executed, the operation of writing the newly generated instruction existing in the data cache memory to the main memory (hereinafter referred to as cache push) is required. ..

【0006】しかし、このキャッシュプッシュを実行す
るためにはOSプログラムをコールする等のプログラム
をアプリケーションプログラム内に設けなければならな
い。以上のように、上記従来技術ではアプリケーション
プログラムにおいて、新しい命令を生成/実行させるた
めには、マイクロプロセッサのキャッシュメモリ等のハ
ードウェア及び、OSプログラムに対応した複雑なアプ
リケーションプログラムを作成する必要が有り、プログ
ラムの生産効率並びにプログラムの実行速度が低下する
という問題点がある。
However, in order to execute this cache push, a program for calling an OS program or the like must be provided in the application program. As described above, in the above-mentioned conventional technique, in order to generate / execute a new instruction in the application program, it is necessary to create a complicated application program corresponding to the hardware such as the cache memory of the microprocessor and the OS program. However, there is a problem that the production efficiency of the program and the execution speed of the program decrease.

【0007】本発明の目的は、新しい命令を生成/実行
させるプログラムの高速処理が可能なマイクロプロセッ
サおよびそのメモリ制御方法、更にこれを用いた情報処
理システムを提供することにある。
It is an object of the present invention to provide a microprocessor capable of high-speed processing of a program for generating / executing a new instruction, a memory control method thereof, and an information processing system using the same.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
の本発明の特徴は、演算ユニットと、命令用のキャッシ
ュメモリである命令キャッシュメモリと、データ用のキ
ャッシュメモリであるデータキャッシュメモリと、前記
命令キャッシュメモリへの前記演算ユニットからのアク
セスを制御する命令キャッシュメモリ制御装置と、前記
データキャッシュメモリへの前記演算ユニットからのア
クセスを制御するデータキャッシュメモリ制御装置と、
前記命令キャッシュメモリ制御装置から前記データキャ
ッシュメモリへのアクセスする手段と、前記データキャ
ッシュメモリ制御装置から前記命令キャッシュメモリへ
のアクセスする手段とを具備することである。
The features of the present invention for achieving the above object include an arithmetic unit, an instruction cache memory which is a cache memory for instructions, a data cache memory which is a cache memory for data, An instruction cache memory controller for controlling access from the arithmetic unit to the instruction cache memory; a data cache memory controller for controlling access from the arithmetic unit to the data cache memory;
It is provided with means for accessing the data cache memory from the instruction cache memory controller, and means for accessing the instruction cache memory from the data cache memory controller.

【0009】本発明の他の特徴は、論理アドレスを変換
テーブルを用いて物理アドレスへと変換処理し、前記物
理アドレスによってメモリ領域へアクセスを行うように
したものにおいて、前記変換テーブルに前記変換処理の
種別情報を記憶しておき、前記種別情報により前記アク
セスを制御することである。ここで、種別情報とは、例
えば命令キャッシュメモリへのアクセス及びデータキャ
ッシュメモリへのアクセスのいずれかを示す情報であ
る。
Another feature of the present invention is that a logical address is converted into a physical address by using a conversion table, and a memory area is accessed by the physical address. In the conversion table, the conversion processing is performed. Is stored, and the access is controlled by the type information. Here, the type information is, for example, information indicating either access to the instruction cache memory or access to the data cache memory.

【0010】本発明の更に他の特徴は、論理アドレスを
変換テーブルを用いて物理アドレスへと変換処理し、前
記物理アドレスによって記憶領域へアクセスを行うよう
にしたマイクロプロセッサのメモリ制御方法において、
前記変換処理時に割り当てられた前記記憶領域の領域種
別情報を前記変換テーブルに格納し、前記領域種別情報
により前記アクセスを制御することである。ここで、領
域種別情報とは、例えば前記変換時に割り当てられた主
記憶装置上のある大きさの領域が、命令アクセス領域で
あるか、データアクセス領域であるかを示す情報であ
る。
Still another feature of the present invention is a memory control method for a microprocessor, wherein a logical address is converted into a physical address by using a conversion table, and a storage area is accessed by the physical address.
The area type information of the storage area allocated at the time of the conversion processing is stored in the conversion table, and the access is controlled by the area type information. Here, the area type information is, for example, information indicating whether an area of a certain size on the main storage device allocated at the time of conversion is an instruction access area or a data access area.

【0011】本発明の別の特徴は、演算処理装置と、前
記演算処理装置より出力される論理アドレスを変換テー
ブルを用いて物理アドレスに変換するメモリ制御装置と
前記変換された物理アドレスによってアクセスされる命
令キャッシュメモリ装置とデータキャッシュメモリ装置
とを具備し、前記メモリ制御装置内に設けた前記演算処
理装置より入力したアクセス種別情報と前記変換テーブ
ルに格納されている領域種別情報とにより、前記命令キ
ャッシュメモリ及び前記データキャッシュメモリのいず
れをアクセスするか決定する手段を有することである。
Another feature of the present invention is that an arithmetic processing unit, a memory control unit for converting a logical address output from the arithmetic processing unit into a physical address using a conversion table, and an access by the converted physical address. The instruction cache memory device and the data cache memory device, and the instruction is executed by the access type information input from the arithmetic processing unit provided in the memory control unit and the area type information stored in the conversion table. And a means for determining which of the cache memory and the data cache memory is to be accessed.

【0012】[0012]

【作用】前記命令キャッシュメモリ制御装置から前記デ
ータキャッシュメモリへのアクセスする手段と、前記デ
ータキャッシュメモリ制御装置から前記命令キャッシュ
メモリへのアクセスする手段とを具備することにより、
命令またはデータのキャッシュメモリ内の所在に起因す
る問題点を解決できる。
By providing means for accessing the data cache memory from the instruction cache memory control device and means for accessing the instruction cache memory from the data cache memory control device,
It is possible to solve the problem caused by the location of the instruction or data in the cache memory.

【0013】主記憶領域上に存在する論理アドレスから
物理アドレスへ変換するための変換用テーブルに、命令
読みだし及びデータアクセスのいずれかを行う物理ペー
ジが命令用であるかデータ用であるかを示す領域種別情
報(属性情報とも称する。)を設け、OSプログラム
が、ページを割当する際に、参照することとする。ま
た、メモリ制御装置より命令キャッシュメモリ又はデー
タ用キャッシュメモリをアクセスする際は、アクセスす
るページが既に割り当てられていた場合、ページテーブ
ルに設定されている属性情報と同じキャッシュメモリを
アクセスするような手段を設ける。これにより、メモリ
制御装置において、ページテーブルに設定されている属
性情報に従って検索するキャッシュメモリを選択するこ
とが可能であるため、アプリケーションプログラムは、
マイクロプロセッサのキャッシュメモリ等のハードウェ
ア及び、OSプログラムに対応した複雑なアプリケーシ
ョンプログラムを作成する必要がなくなり、プログラム
の生産効率並びにプログラムの実行速度の低下するとい
う問題点がなくなる。
In the conversion table for converting the logical address existing in the main memory area to the physical address, it is determined whether the physical page for reading the instruction or accessing the data is for the instruction or for the data. Area type information (also referred to as attribute information) shown is provided, and is referred to when the OS program allocates a page. Further, when accessing the instruction cache memory or the data cache memory from the memory control device, if the page to be accessed has already been allocated, a means for accessing the same cache memory as the attribute information set in the page table To provide. This allows the memory control device to select the cache memory to be searched according to the attribute information set in the page table.
It is not necessary to create a complicated application program corresponding to the hardware such as the cache memory of the microprocessor and the OS program, and there is no problem that the production efficiency of the program and the execution speed of the program decrease.

【0014】[0014]

【実施例】本発明の実施例を以下に説明する。EXAMPLES Examples of the present invention will be described below.

【0015】図1のように、アプリケーションプログラ
ムの実行過程において、新しい命令を生成する場合、新
しく生成する命令をデータとして書き込むため、演算処
理装置101から出力された論理アドレス106とその
論理アドレス106がデータアドレスであることを示す
アクセス種別情報107は、メモリ制御装置102によ
り物理アドレス108に変換される。変換の際、メモリ
制御装置102内のページテーブルに、新規に割り当て
られたページがデータページであることを示す属性情報
を設定し、データキャッシュメモリ104を検索する。
ここで、キャッシュメモリの更新方法がコピーバック方
式であるため、キャッシュヒット(命令キャッシュメモ
リ104内に該当するエントリが存在する)時及びミス
ヒット(命令キャッシュメモリ104内に該当するエン
トリが存在しない)時ともに書き込みデータはデータキ
ャッシュメモリ104のみに書き込まれ、プロセスバス
110,111,112に対しては書き込みは行わな
い。従って、新しい命令は、データキャッシュメモリ1
04内のみに生成される。
As shown in FIG. 1, when a new instruction is generated in the process of executing an application program, since the newly generated instruction is written as data, the logical address 106 output from the arithmetic processing unit 101 and its logical address 106 are The access type information 107 indicating a data address is converted into a physical address 108 by the memory control device 102. At the time of conversion, attribute information indicating that the newly allocated page is a data page is set in the page table in the memory control device 102, and the data cache memory 104 is searched.
Here, since the update method of the cache memory is the copy-back method, there is a cache hit (the relevant entry exists in the instruction cache memory 104) and a mishit (the relevant entry does not exist in the instruction cache memory 104). At all times, the write data is written only in the data cache memory 104, and the process buses 110, 111, 112 are not written. Therefore, the new instruction is the data cache memory 1
It is generated only in 04.

【0016】新しい命令の生成が終了後にその生成した
命令を実行する場合、その命令を読み出すための演算処
理装置101から出力された論理アドレス106とその
論理アドレスが命令アドレスであることを示すアクセス
種別信号107は、メモリ制御装置102により物理ア
ドレス108に変換される。メモリ制御装置102内の
検索されるページテーブルには既に本ページがデータペ
ージであることを示す属性情報は設定されているため、
メモリ制御装置102は、データキャッシュメモリ10
4を検索することとなる。従って、データキャッシュメ
モリ104内に生成された命令を読み出すことができ
る。
When the generated instruction is executed after the generation of the new instruction is completed, the logical address 106 output from the arithmetic processing unit 101 for reading the instruction and the access type indicating that the logical address is the instruction address The signal 107 is translated by the memory controller 102 into a physical address 108. Since attribute information indicating that this page is a data page has already been set in the page table searched in the memory control device 102,
The memory control device 102 includes a data cache memory 10
4 will be searched. Therefore, the instruction generated in the data cache memory 104 can be read.

【0017】また、プログラム実行の過程において、命
令を書き替える場合、新しく書き替える命令をデータと
して書き込むため演算処理装置101から出力される論
理アドレス106及びその論理アドレス106データア
クセスであることを示すアドレス情報種別107は、メ
モリ制御装置102により、物理アドレス108に変換
される。その際、検索したメモリ制御装置102内のペ
ージテーブルに本ページが既に命令ページであることを
示す属性情報が設定されているので、メモリ制御装置1
02は、命令キャッシュメモリ103を検索することと
なり、命令キャッシュメモリ103内にある古い命令を
書き替えることができる。
Further, when an instruction is rewritten in the course of program execution, a logical address 106 output from the arithmetic processing unit 101 for writing a newly rewritten instruction as data and an address indicating the logical address 106 data access The information type 107 is converted into a physical address 108 by the memory control device 102. At that time, since the attribute information indicating that this page is already an instruction page is set in the page table in the searched memory control device 102, the memory control device 1
02 searches the instruction cache memory 103, and the old instruction in the instruction cache memory 103 can be rewritten.

【0018】次に、図2を用いて本明細書で使われるラ
イトスルー方式やコピーバック方式の用語について説明
する。図2は、キャッシュメモリだけでなく、論理アド
レスから物理アドレスへのアドレス変換、及びキャッシ
ュメモリへのアクセスを制御するメモリ制御部(以下、
MCUと略す)をも、命令用とデータ用とに分けた例で
ある。
Next, the terms of the write-through method and the copy-back method used in this specification will be described with reference to FIG. FIG. 2 shows a memory control unit (hereinafter, referred to as a cache control unit) that controls address conversion from a logical address to a physical address and access to the cache memory as well as the cache memory.
(Abbreviated as MCU) is also an example in which it is divided into one for instructions and one for data.

【0019】ライトスルー方式では、命令の読みだしは
次のように行われる。演算ユニット215より、命令を
読みだすために出力された命令論理アドレス208を命
令MCU201で、命令物理アドレス205に変換し、命令キ
ャッシュメモリ202を検索する。命令キャッシュメモ
リ202内に該当するエントリ(命令)が存在する場合
(以下、キャッシュヒットと称す)は、命令データバス
207を介して命令を演算ユニット215へ転送する。
命令キャッシュメモリ202内に該当するデータが存在
しない場合(以下、キャッシュミスヒットと称す)は、
バスコントローラ211を介し、主記憶装置(図示せ
ず。以下、MSと略す)へアクセスを行う。一方、デー
タの読みだし、及び、書き込みは、演算ユニット215
よりデータを書き込み又は読みだしのために出力された
データ論理アドレス209を用い、命令読みだし手順と
同様に行うことができる。
In the write through system, the reading of instructions is performed as follows. The instruction logical address 208 output to read the instruction from the arithmetic unit 215 is converted into the instruction physical address 205 by the instruction MCU 201, and the instruction cache memory 202 is searched. When a corresponding entry (instruction) exists in the instruction cache memory 202 (hereinafter referred to as cache hit), the instruction is transferred to the arithmetic unit 215 via the instruction data bus 207.
If the corresponding data does not exist in the instruction cache memory 202 (hereinafter referred to as a cache mishit),
A main memory (not shown, hereinafter abbreviated as MS) is accessed via the bus controller 211. On the other hand, the reading and writing of data is performed by the arithmetic unit 215.
By using the data logical address 209 output for writing or reading more data, the same procedure as the instruction reading procedure can be performed.

【0020】ここで、更に処理の高速化をはかるには、
コピーバック方式と呼ばれるキャッシュメモリの更新方
法を備えることが望ましい。コピーバック方式は、デー
タキャッシュメモリ204を書き換えるとただちにMS
の内容も更新するライトスルー方式とは異なり、データ
キャッシュメモリ204のみを書き換えておき、必要が
生じるまでMSの内容を更新しない方式である。この方
式によれば、データ書き込み時は、データキャッシュメ
モリ204のみを更新し、データキャッシュメモリ20
4よりも50〜60分の1もアクセス速度の遅いMSに
対する更新のためのアクセスを行わないため、高速処理
が可能である。
Here, in order to further speed up the processing,
It is desirable to provide a method of updating the cache memory called a copyback method. The copy-back method allows the MS to immediately update the data cache memory 204.
Unlike the write-through method in which the contents of the MS are also updated, only the data cache memory 204 is rewritten, and the contents of the MS are not updated until necessary. According to this method, when writing data, only the data cache memory 204 is updated, and the data cache memory 20 is updated.
Since the access for updating the MS whose access speed is slower than 50 to 1/60 is not performed, the high speed processing is possible.

【0021】図2に示すように、命令MCU201,命令キャ
ッシュメモリ202とデータMCU203,データキャッシュ
メモリ204を完全に独立している。この場合、図4に
示すように、命令用およびデータ用の間で、互いのキャ
ッシュメモリを参照する手段(例えば、命令MCU201から
データキャッシュメモリ204をアクセスする手段)持
つことによって次の効果がある。
As shown in FIG. 2, the instruction MCU 201, the instruction cache memory 202, the data MCU 203, and the data cache memory 204 are completely independent. In this case, as shown in FIG. 4, the following effects can be obtained by having a unit (for example, a unit for accessing the data cache memory 204 from the instruction MCU 201) that references each other's cache memory between the instruction and the data. ..

【0022】すなわち、プログラム実行過程において、
新しく命令を生成し、生成後その命令を実行するような
プログラムを実行させる場合、命令を生成することは、
命令のコードをデータとして、書き込むことであるか
ら、演算ユニット215より出力されたデータ論理アド
レス209をデータMCU203にてデータ物理アドレス206
にアドレス変換し、データキャッシュメモリ204内を
検索後、新しい命令をデータキャッシュメモリ204に
書き込む。次にその生成された命令を実行するには、演
算ユニット215より命令を読みだすために、出力され
た命令論理アドレスを命令MCU201にて命令物理アドレス
に変換し、命令キャッシュメモリ202を検索する。し
かし、命令キャッシュメモリ202内には、新しく生成
した命令がないため、命令キャッシュミスヒットとな
り、バスコントローラ211を介して、MSへアクセス
を行うが、キャッシュメモリの更新方式がコピーバック
方式であるため、新しく生成した命令はMS内にはな
く、古いデータが、演算ユニット215へ転送され、以
後、プログラムの実行は不可能となることが無い。
That is, in the program execution process,
When a new instruction is generated and a program that executes the instruction after the generation is executed, generating the instruction is
Since the instruction code is to be written as data, the data logical address 209 output from the arithmetic unit 215 is stored in the data MCU 203 as the data physical address 206.
After the address is converted to, and the data cache memory 204 is searched, a new instruction is written in the data cache memory 204. Next, in order to execute the generated instruction, in order to read the instruction from the arithmetic unit 215, the instruction MCU 201 converts the output instruction logical address into an instruction physical address, and searches the instruction cache memory 202. However, since there is no newly generated instruction in the instruction cache memory 202, an instruction cache mishit occurs and the MS is accessed via the bus controller 211, but the cache memory update method is the copy back method. The newly generated instruction is not in the MS, and the old data is transferred to the arithmetic unit 215, so that the program cannot be executed thereafter.

【0023】また、新しく生成した命令を実行する前
に、データキャッシュメモリ204に存在する新しく生
成された命令を、MSに書き込む操作(以下キャッシュ
プッシュと称す)が不要となる。
Further, before executing the newly generated instruction, the operation of writing the newly generated instruction existing in the data cache memory 204 to the MS (hereinafter referred to as cache push) becomes unnecessary.

【0024】また、このキャッシュプッシュは、アプリ
ケーションプログラムではできないため、アプリケーシ
ョンプログラムは、キャッシュプッシュを行うOSプロ
グラムをコールする等のプログラムをアプリケーション
プログラム内に設けなければならないが、その必要も無
くなる。
Further, since this cache push cannot be performed by the application program, the application program must provide a program for calling the OS program for performing the cache push in the application program, but this need is eliminated.

【0025】又、プログラムの実行過程において、自プ
ログラムの命令を書き換える場合、命令を書き換えるこ
とは、命令キャッシュメモリ202に存在する古い命令
を新しい命令に書き換えることであるが、演算ユニット
215からの処理は命令のコードをデータとして書き込
むことであるため、書き換える新しい命令は、データキ
ャッシュメモリ204のみに書き込まれる。従って、命
令キャッシュメモリ202内の古い命令は書き換えられ
ずそのまま存在するため、新しく書き換えた命令の実行
は出来ないが、これを解消する命令キャッシュメモリ2
02内の古い命令を無効にする処理(キャッシュパー
ジ)を行い、次にデータキャッシュプッシュ処理をわざ
わざ行う必要もない。
Further, in the process of executing a program, when rewriting an instruction of its own program, rewriting the instruction means rewriting an old instruction existing in the instruction cache memory 202 with a new instruction. Is to write the code of the instruction as data, the new instruction to be rewritten is written only in the data cache memory 204. Therefore, since the old instruction in the instruction cache memory 202 remains as it is without being rewritten, the newly rewritten instruction cannot be executed. However, the instruction cache memory 2 for eliminating this cannot be executed.
It is not necessary to perform the process (cache purge) of invalidating the old instruction in 02 and then the data cache push process.

【0026】図3は、情報処理システムの全体構成例で
ある。中央処理装置(CPU)301,外部キャッシュメモリ装
置(ECU)302,バス制御装置(BCU)303,主記憶装置(MS)30
4 ,ファイル制御装置(FCU)305,ディスク装置(DISK)30
6 ,グラフィック制御装置(GCU)307 ,グラフィックデ
ィスプレイ装置(GD)308より構成されていて、アドレス
線309,310,311,312、データ線313,
314,315,316,317、制御線318,31
9,320,321で接続されている。アドレス線30
9とデータ線313と制御線318とからプロセッサバ
スが構成され、アドレス線311とデータ線315と制
御線320とからシステムバスが構成されている。CPU3
01が実行するプログラムは、DISK306 の中に格納されて
おり、その一部がMS304にローディングされた後実
行される。ECU302にはMS304の記憶内容の一部のコ
ピーが格納されており、CPU301からの高速アクセスが可
能である。CPU301の実行結果は、GCU307にてグラフィッ
ク処理された後、GD308に表示される。システムバ
スには、上記以外に、インターフェースユニットを介し
て、キーボード,マウス等の入力装置が接続される(図
示せず)。
FIG. 3 shows an example of the overall configuration of the information processing system. Central processing unit (CPU) 301, external cache memory unit (ECU) 302, bus control unit (BCU) 303, main memory unit (MS) 30
4, file control unit (FCU) 305, disk unit (DISK) 30
6, a graphic control unit (GCU) 307, a graphic display unit (GD) 308, and address lines 309, 310, 311 and 312, data lines 313.
314, 315, 316, 317, control lines 318, 31
They are connected at 9,320,321. Address line 30
9, the data line 313 and the control line 318 form a processor bus, and the address line 311, the data line 315 and the control line 320 form a system bus. CPU3
The program executed by 01 is stored in the DISK 306, and a part of the program is loaded into the MS 304 and then executed. The ECU 302 stores a part of the stored contents of the MS 304, and the CPU 301 can access it at high speed. The execution result of the CPU 301 is graphically processed by the GCU 307 and then displayed on the GD 308. In addition to the above, input devices such as a keyboard and a mouse are connected to the system bus via an interface unit (not shown).

【0027】図4は、図3に示すCPU301と、それに接続
するプロセッサバス309,313,318の詳細説明
図である。処理の高速化のために、キャッシュメモリの
更新方式をコピーバック方式とし、又、キャッシュメモ
リだけでなく、MCUも命令用とデータ用とに分けた方
式において、ハードウェア構成および、MS304上に
存在するページテーブルフォーマット構成と、MCUを
アドレス変換部(以下、MMUと略す)と共に構成する
高速アドレス変換バッファ(以下TLBと略す)のフォー
マット構成を示した図である。
FIG. 4 is a detailed explanatory diagram of the CPU 301 shown in FIG. 3 and the processor buses 309, 313, 318 connected thereto. In order to speed up the processing, the cache memory update method is set to the copy back method, and in addition to the cache memory, the MCU has a hardware configuration and a method that exists on the MS 304 in a method in which the MCU is divided into data for instruction and data. FIG. 3 is a diagram showing a page table format configuration to be performed and a format configuration of a high-speed address translation buffer (hereinafter abbreviated as TLB) that configures an MCU together with an address translation unit (hereinafter abbreviated as MMU).

【0028】図5は、図3に示すハードウェア構成に基
づいた処理の概要を示すフローチャートである。
FIG. 5 is a flow chart showing an outline of the processing based on the hardware configuration shown in FIG.

【0029】通常、図5(a)に示すように、命令を読
み出すために演算ユニット401より出力された命令論
理アドレス409は、命令MMU402により、命令物理アド
レス413に変換される。この際、新しくページを割り
当てるため、ページテーブルAに前記ページが命令ペー
ジであることを示す属性情報を設定し、命令キャッシュ
メモリ406を検索する。キャッシュヒットの場合は、
命令キャッシュメモリ406より命令データ(バス)4
11を介し演算ユニット401へ命令が転送される。キ
ャッシュミスヒットの場合は、バスコントローラ408
を介して、プロセッサバス309,313,318にア
クセスし、MS304(図4に図示せず。図3参照。)
より該当するエントリを取り込み、命令データ(バス)4
11を介し、演算ユニット401へ命令を転送すると同
時に命令キャッシュメモリ406にも書き込む。演算ユ
ニット401では、取り込んだデータを解読,アドレス
計算,オペランドの読みだしを行い、最後に命令の実行
を行う。
Normally, as shown in FIG. 5A, the instruction logical address 409 output from the arithmetic unit 401 to read the instruction is converted into the instruction physical address 413 by the instruction MMU 402. At this time, in order to allocate a new page, attribute information indicating that the page is an instruction page is set in the page table A, and the instruction cache memory 406 is searched. In case of cache hit,
Instruction data (bus) 4 from the instruction cache memory 406
The instruction is transferred to the arithmetic unit 401 via 11. In the case of a cache miss, the bus controller 408
To access the processor buses 309, 313, 318 via the MS 304 (not shown in FIG. 4, see FIG. 3).
More relevant entry is fetched and instruction data (bus) 4
The instruction is transferred to the arithmetic unit 401 via 11 and simultaneously written in the instruction cache memory 406. The arithmetic unit 401 decodes the fetched data, calculates the address, reads the operand, and finally executes the instruction.

【0030】プログラムの実行の過程において、新しい
命令を生成する場合は、図5(b)に示すように、新し
く生成する命令をデータとして書き込むため、演算ユニ
ット401から出力されたデータ論理アドレス410
は、データMMU403により、データ物理アドレス414に
変換される。その際、新規にページを割り当てるため、
ページテーブルに本ページがデータページであることを
示す属性情報を設定し、データキャッシュメモリ407
を検索する。ここで、データキャッシュメモリ407は
更新方法がコピーバック方式であるため、キャッシュヒ
ット時およびキャッシュミスヒット時ともに書き込みデ
ータはデータキャッシュメモリ407にのみに書き込ま
れ、プロセッサバス309,313,318に対しては
書き込みは行わない。従って、新しい命令は、データキ
ャッシュメモリ407内のみに生成される。
When a new instruction is generated in the process of executing the program, as shown in FIG. 5B, since the newly generated instruction is written as data, the data logical address 410 output from the arithmetic unit 401 is written.
Is converted into a data physical address 414 by the data MMU 403. At that time, to allocate a new page,
Attribute information indicating that this page is a data page is set in the page table, and the data cache memory 407
To search. Here, since the update method of the data cache memory 407 is the copy back method, the write data is written only to the data cache memory 407 at both the cache hit and the cache miss hit, and is written to the processor buses 309, 313, 318. Does not write. Therefore, the new instruction is generated only in the data cache memory 407.

【0031】命令の生成が終了し、次にその生成した命
令を実行する場合、前記命令を読みだすために演算ユニ
ット401から出力された命令論理アドレス409は、
命令MMU402により命令物理アドレス413に変換され
る。その際、検索したページテーブルには既に前記ペー
ジがデータページであることを示す属性情報が設定され
ているため、命令MMU402は制御線417を介し、データ
MMU403にデータキャッシュメモリ407を検索すること
を伝え、データMMU403より許可を得た後、データキャッ
シュメモリ407を検索することによりデータキャッシ
ュメモリ内に生成された命令を読みだすことが出来る。
When the generation of the instruction is completed and the generated instruction is executed next, the instruction logical address 409 output from the arithmetic unit 401 to read the instruction is
It is converted into the instruction physical address 413 by the instruction MMU402. At that time, since attribute information indicating that the page is a data page has already been set in the retrieved page table, the command MMU402 transmits the data via the control line 417.
By instructing the MMU 403 to search the data cache memory 407 and obtaining permission from the data MMU 403, the data cache memory 407 can be searched to read the instruction generated in the data cache memory.

【0032】又、プログラムの実行過程において、命令
を書き換える場合、図5(c)に示すように、新しく書き
換える命令をデータとして書き込むため演算ユニット4
01から出力されたデータ論理アドレス410は、デー
タMMU403により、データ物理アドレス414に変換され
る。その際、検索したページテーブルに本ページが既に
命令ページであることを示す属性情報が設定されている
ため、データMMU403は制御線417を介し、命令MMU402
に命令キャッシュメモリを検索することを伝え、命令MM
U402より許可を得た後、命令キャッシュメモリ406を
検索することにより、古い命令を新しい命令に書き換え
ることが出来る。
When rewriting an instruction in the course of executing a program, as shown in FIG. 5C, the operation unit 4 is used to write a new rewriting instruction as data.
The data logical address 410 output from 01 is converted into the data physical address 414 by the data MMU 403. At this time, since the attribute information indicating that this page is already the instruction page is set in the retrieved page table, the data MMU 403 receives the instruction MMU 402 via the control line 417.
Tell MM to search the instruction cache memory
After obtaining the permission from U402, the old instruction can be rewritten to the new instruction by searching the instruction cache memory 406.

【0033】以上のように、プログラムの実行過程で、
新しく命令を生成し、生成後その命令を実行するアプリ
ケーションプログラム、又は、自プログラムの命令を書
き換えるプログラム等を作成する際、キャッシュメモリ
等のハードウェアを意識する必要がなく、かつ上記以外
のプログラムの処理を高速に行えるという効果がある。
As described above, in the process of executing the program,
It is not necessary to be aware of hardware such as cache memory when creating a new instruction and creating an application program that executes the instruction after it is generated, or a program that rewrites the instruction of its own program. The effect is that processing can be performed at high speed.

【0034】[0034]

【発明の効果】本発明によれば、新しい命令を生成/実
行させるプログラムの高速処理が可能なマイクロプロセ
ッサおよびそのメモリ制御方法、更にこれを用いた情報
処理システムを提供することができる。
According to the present invention, it is possible to provide a microprocessor capable of high-speed processing of a program for generating / executing a new instruction, a memory control method thereof, and an information processing system using the same.

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

【図1】本発明の一実施例の概要を示す図。FIG. 1 is a diagram showing an outline of an embodiment of the present invention.

【図2】ライトスルー方式及びコピーバック方式に関す
る説明図。
FIG. 2 is an explanatory diagram of a write-through method and a copy-back method.

【図3】本発明の一実施例の全体構成を示す図。FIG. 3 is a diagram showing the overall configuration of an embodiment of the present invention.

【図4】図3の中央処理装置(CPU)周辺の詳細構成
及びページテーブルフォーマット構成と、TLBのフォ
ーマット構成を示した図。
FIG. 4 is a diagram showing a detailed configuration around a central processing unit (CPU) and a page table format configuration in FIG. 3 and a TLB format configuration.

【図5】本発明の一実施例の処理の概要を示すフローチ
ャート。
FIG. 5 is a flowchart showing an outline of processing according to an embodiment of the present invention.

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

101…演算処理装置、102…メモリ制御装置、10
3…命令キャッシュメモリ、104…データキャッシュ
メモリ、105…バスコントローラ、106…論理アド
レス、107…アクセス種別情報、108…物理アドレ
ス、109…データ、110…アドレス、111…デー
タ、112…制御線、304…MS、309,313,
318…プロセッサバス、401…演算ユニット、40
2…命令MMU、406…命令キャッシュメモリ、40
8…バスコントローラ、409…命令論理アドレス、4
11…命令データ、413…命令物理アドレス。
101 ... Arithmetic processing device, 102 ... Memory control device, 10
3 ... Instruction cache memory, 104 ... Data cache memory, 105 ... Bus controller, 106 ... Logical address, 107 ... Access type information, 108 ... Physical address, 109 ... Data, 110 ... Address, 111 ... Data, 112 ... Control line, 304 ... MS, 309, 313
318 ... Processor bus, 401 ... Arithmetic unit, 40
2 ... Instruction MMU, 406 ... Instruction cache memory, 40
8 ... Bus controller, 409 ... Instruction logical address, 4
11 ... Command data, 413 ... Command physical address.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】演算ユニットと、 命令用のキャッシュメモリである命令キャッシュメモリ
と、 データ用のキャッシュメモリであるデータキャッシュメ
モリと、 前記命令キャッシュメモリへの前記演算ユニットからの
アクセスを制御する命令キャッシュメモリ制御装置と、 前記データキャッシュメモリへの前記演算ユニットから
のアクセスを制御するデータキャッシュメモリ制御装置
と、 前記命令キャッシュメモリ制御装置から前記データキャ
ッシュメモリへのアクセスする手段と、 前記データキャッシュメモリ制御装置から前記命令キャ
ッシュメモリへのアクセスする手段とを具備することを
特徴とするマイクロプロセッサ。
1. An arithmetic unit, an instruction cache memory that is a cache memory for instructions, a data cache memory that is a cache memory for data, and an instruction cache that controls access from the arithmetic unit to the instruction cache memory. A memory control device; a data cache memory control device for controlling access from the arithmetic unit to the data cache memory; a means for accessing the data cache memory from the instruction cache memory control device; Means for accessing the instruction cache memory from a device.
【請求項2】演算ユニットと、 前記演算ユニットより出力される論理アドレスを変換テ
ーブルを用いて物理アドレスに変換するメモリ制御装置
と、 前記変換された物理アドレスによってアクセスされる命
令キャッシュメモリとデータキャッシュメモリと、 前記変換テーブルに格納されている種別情報により、前
記命令キャッシュメモリ及び前記データキャッシュメモ
リのいずれをアクセスするか決定する手段を具備するこ
とを特徴とするマイクロプロセッサ。
2. An arithmetic unit, a memory controller for converting a logical address output from the arithmetic unit into a physical address using a conversion table, an instruction cache memory and a data cache accessed by the converted physical address. A microprocessor comprising: a memory; and means for determining which of the instruction cache memory and the data cache memory is to be accessed based on the type information stored in the conversion table.
【請求項3】請求項2において、 前記メモリ制御装置は、命令メモリ制御装置及びデータ
メモリ制御装置とからなることを特徴とするマイクロプ
ロセッサ。
3. The microprocessor according to claim 2, wherein the memory control device comprises an instruction memory control device and a data memory control device.
【請求項4】論理アドレスを変換テーブルを用いて物理
アドレスへと変換処理し、前記物理アドレスによってメ
モリ領域へアクセスを行う際に、前記変換テーブルに前
記変換処理の種別情報を記憶しておき、前記種別情報に
より前記アクセスを制御する機能を有するマイクロプロ
セッサと、 前記マイクロプロセッサの実行するプログラムを格納す
るディスク装置と、 前記プログラムの一部をローディングする主記憶装置
と、 前記主記憶装置の一部のコピーが格納された外部キャッ
シュメモリ装置と、 前記ディスク装置とシステムバスとの間の入出力制御す
るファイル制御装置と、 前記主記憶装置と前記プロセッサバスとシステムバスと
の間の入出力を制御するバス制御装置とより構成される
ことを特徴とする情報処理システム。
4. A logical address is converted into a physical address using a conversion table, and when the memory area is accessed by the physical address, type information of the conversion process is stored in the conversion table. A microprocessor having a function of controlling the access according to the type information, a disk device that stores a program executed by the microprocessor, a main storage device that loads a part of the program, and a part of the main storage device An external cache memory device that stores a copy of a file, a file controller that controls input / output between the disk device and the system bus, and an input / output between the main storage device, the processor bus, and the system bus An information processing system comprising: a bus control device that operates.
【請求項5】論理アドレスを変換テーブルを用いて物理
アドレスへと変換処理し、前記物理アドレスによってメ
モリ領域へアクセスを行うようにしたマイクロプロセッ
サにおいて、 前記変換テーブルに前記変換処理が命令用のメモリ領域
へのアクセス及びデータ用のメモリ領域へのアクセスの
いずれであるかを示す種別情報を記憶しておき、前記種
別情報により前記アクセスを制御することを特徴とする
マイクロプロセッサのメモリ制御方法。
5. A microprocessor for converting a logical address into a physical address by using a conversion table and accessing a memory area by the physical address, wherein the conversion table has a memory for instructions. A memory control method for a microprocessor, characterized in that type information indicating whether the access is to an area or a data memory area is stored and the access is controlled by the type information.
【請求項6】請求項5において、 前記メモリ領域は、コピーバック方式のメモリ更新を行
なう命令キャッシュメモリ及びデータキャッシュメモリ
であることを特徴とするマイクロプロセッサのメモリ制
御方法。
6. The memory control method for a microprocessor according to claim 5, wherein the memory area is an instruction cache memory and a data cache memory that perform a memory update by a copyback method.
【請求項7】請求項6において、 前記命令キャッシュメモリへのアクセスにおいてミスヒ
ットが発生したとき前記データキャッシュメモリへアク
セスすることを特徴とするマイクロプロセッサのメモリ
制御方法。
7. The memory control method according to claim 6, wherein the data cache memory is accessed when a mishit occurs in the access to the instruction cache memory.
【請求項8】演算ユニットから出力された論理アドレス
を、主記憶装置上の変換テーブルを用いて物理アドレス
へと変換し、前記変換した物理アドレスによってキャッ
シュメモリへのアクセスを行うものにおいて、 前記変換時に割り当てられた主記憶装置上のある大きさ
の領域が、命令アクセス領域であるか、データアクセス
領域であるかを示す領域種別情報を前記変換テーブルに
格納しておき、キャッシュメモリへのアクセス時に前記
領域種別情報により、キャッシュメモリへのアクセスを
制御することを特徴とするマイクロプロセッサのメモリ
制御方法。
8. A logical address output from an arithmetic unit is converted into a physical address by using a conversion table on a main storage device, and a cache memory is accessed by the converted physical address. Area conversion information indicating whether an area of a certain size on the main memory allocated at the time is an instruction access area or a data access area is stored in the conversion table, and when accessing the cache memory, A memory control method for a microprocessor, wherein access to the cache memory is controlled by the area type information.
【請求項9】請求項8において、 前記演算ユニットより出力される論理アドレスを入力
し、主記憶上の変換テーブルを用いて物理アドレスに変
換するメモリ制御装置及び、前記変換された物理アドレ
スによってアクセスされる命令用とデータ用の2つのキ
ャッシュメモリを有し、 メモリ制御装置が、前記領域種別情報により、命令キャ
ッシュメモリをアクセスするか、データキャッシュメモ
リをアクセスするかを決定することを特徴とするマイク
ロプロセッサのメモリ制御方法。
9. The memory control device according to claim 8, wherein a logical address output from said arithmetic unit is input and converted into a physical address by using a conversion table on a main memory, and access by said converted physical address. Two cache memories for instructions and data are provided, and the memory control device determines whether to access the instruction cache memory or the data cache memory based on the area type information. Memory control method for microprocessor.
【請求項10】請求項8において、 前記演算ユニットより出力される2つ以上の論理アドレ
スが、命令アクセス及びデータアクセスのいずれかを示
すアクセス種別情報を入力し、 前記変換された物理アドレスによってアクセスされる命
令キャッシュメモリとデータキャッシュメモリとを有
し、 前記アクセス種別情報と前記変換テーブルに格納されて
いる領域種別情報とにより、命令キャッシュメモリをア
クセスするか、データキャッシュメモリをアクセスする
かを決定することを特徴とするマイクロプロセッサのメ
モリ制御方法。
10. The access type information according to claim 8, wherein the two or more logical addresses output from the arithmetic unit are input with access type information indicating either an instruction access or a data access, and access is performed by the converted physical address. An instruction cache memory and a data cache memory, and determines whether to access the instruction cache memory or the data cache memory according to the access type information and the area type information stored in the conversion table. A memory control method for a microprocessor, comprising:
JP4013683A 1992-01-29 1992-01-29 Microprocessor and memory control method Pending JPH05204758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4013683A JPH05204758A (en) 1992-01-29 1992-01-29 Microprocessor and memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4013683A JPH05204758A (en) 1992-01-29 1992-01-29 Microprocessor and memory control method

Publications (1)

Publication Number Publication Date
JPH05204758A true JPH05204758A (en) 1993-08-13

Family

ID=11839987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4013683A Pending JPH05204758A (en) 1992-01-29 1992-01-29 Microprocessor and memory control method

Country Status (1)

Country Link
JP (1) JPH05204758A (en)

Similar Documents

Publication Publication Date Title
US5586283A (en) Method and apparatus for the reduction of tablewalk latencies in a translation look aside buffer
US6321314B1 (en) Method and apparatus for restricting memory access
US5852738A (en) Method and apparatus for dynamically controlling address space allocation
JP4162825B2 (en) Microprocessor
US20070283108A1 (en) Memory Management System
US4520441A (en) Data processing system
US10083126B2 (en) Apparatus and method for avoiding conflicting entries in a storage structure
KR20150034662A (en) Merged TLB Structure for Multiple Sequential Address Translations
JPH08272693A (en) Conversion table entry provided with cache possibility attribute bit regarding virtual address as well as method and apparatus for reference of said virtual address using said bit
JPH0711793B2 (en) Microprocessor
US8458438B2 (en) System, method and computer program product for providing quiesce filtering for shared memory
JP2575598B2 (en) Method and system for increasing concurrency of system memory in a multiprocessor computer system
JP2001222468A (en) Load/store instruction control circuit in microprocessor and method for controlling load/store instruction
JPH0520197A (en) Storage control system and microprocessor
JP2006318471A (en) Memory caching in data processing
JP2002032264A (en) Cache memory device and central processing unit using the same
US5619673A (en) Virtual access cache protection bits handling method and apparatus
JPH0327940B2 (en)
US6324635B1 (en) Method and apparatus for address paging emulation
JPH05204758A (en) Microprocessor and memory control method
JPH01288940A (en) Logical address cache control system
JP2535086B2 (en) Ring reduction logic device
US11314657B1 (en) Tablewalk takeover
JP2924708B2 (en) Information processing device
JP2637853B2 (en) Cache memory device