JPH01258154A - Control system for micro instruction execution - Google Patents

Control system for micro instruction execution

Info

Publication number
JPH01258154A
JPH01258154A JP63085431A JP8543188A JPH01258154A JP H01258154 A JPH01258154 A JP H01258154A JP 63085431 A JP63085431 A JP 63085431A JP 8543188 A JP8543188 A JP 8543188A JP H01258154 A JPH01258154 A JP H01258154A
Authority
JP
Japan
Prior art keywords
page number
page
cpu
microinstruction
execution
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
JP63085431A
Other languages
Japanese (ja)
Inventor
Isao Sakuma
佐久間 功
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
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP63085431A priority Critical patent/JPH01258154A/en
Priority to US07/329,210 priority patent/US5151982A/en
Publication of JPH01258154A publication Critical patent/JPH01258154A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To considerably reduce the execution waiting cycle of a CPU by storing several page numbers out of page numbers of pages, for which write requests newly occur, out of pages existing in a main storage in the CPU to judge whether a required page exists in the main storage or not. CONSTITUTION:A holding means 11 holds page numbers of written pages in a virtual space, and a comparing means 17 compares all effective page numbers 18, which are held in the holding means 11 and are indicated by a display means, with the page number indicated by a virtual address and informs a control means 20 of the comparison result. The control means 20 operates a micro instruction execution wait generating function only when coincidence is not detected by the comparing means 17. Thus, the occurrence of the waiting cycle of the CPU is reduced.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は仮想記憶機構を有する計算システムのマイクロ
命令実行lll11方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a microinstruction execution method for a computing system having a virtual storage mechanism.

(従来の技術) 従来この種の計算機システムにおいて、仮想記憶機構は
、比較的小容量の主記憶装置と大容量の外部記憶装置を
用いて、プログラムをあたかも大容量の主記憶装置が存
在するがごとくに実行させるための、重要な機構である
。仮想記憶機構は、プログラムが使用する仮想アドレス
と実際の主記憶上の位置を示す物理アドレスとの間の対
応づけを行なうアドレス変換機構を必要とする。このア
ドレス変換機構は、一般に第3図の4に示すように、主
記憶装置2を制御するメモリコントロールユニット(H
CU)3内に置かれている。仮想アドレスによって指し
示される仮想空間と主記憶装置の物理空間は、ともにペ
ージと呼ばれる一定の大きざのブロックに分割され、仮
想アドレスから物理アドレスへのアドレス交換は、この
ページを単位として行なわれるのが一般的である。アド
レス変換の過程で、必要な仮想アドレスを含むページが
主記憶上に存在しない場合には、CPU1に対してペー
ジフォルト信号が送られる。CPU1は、主記憶装置2
への讃込み要求時には、続出し要求時とは異なり、主記
憶装置2からデータが返されるのを待つ必要がないため
、次のマイクロ命令の実行に進む方式を取ることが可能
である。しかし、この方式では、書込み要求に対してペ
ージフォルトが発生した場合に、CPU1の状態が書込
み要求が発生したときのものから変化しているため、外
部記1!装置6から必要なページを入出力処理袋@7を
介して主記憶装置2に読み込むページイン操作の11命
令再実行が困難になる。
(Prior Art) Conventionally, in this type of computer system, a virtual storage mechanism uses a relatively small-capacity main storage device and a large-capacity external storage device to store programs as if a large-capacity main storage device existed. This is an important mechanism for making each process work. A virtual storage mechanism requires an address translation mechanism that establishes a correspondence between a virtual address used by a program and a physical address indicating an actual location in main memory. This address translation mechanism generally includes a memory control unit (H
CU) 3. Both the virtual space pointed to by a virtual address and the physical space of the main storage device are divided into blocks of a fixed size called pages, and address exchange from virtual addresses to physical addresses is performed in units of pages. is common. In the process of address translation, if a page containing the necessary virtual address does not exist in the main memory, a page fault signal is sent to the CPU 1. The CPU 1 is the main storage device 2
Unlike when requesting continuous output, there is no need to wait for data to be returned from the main memory device 2 when a request is made for a write-in, so it is possible to proceed with execution of the next microinstruction. However, in this method, when a page fault occurs in response to a write request, the state of CPU1 has changed from the state when the write request occurred, so external memory 1! It becomes difficult to re-execute the 11th instruction of the page-in operation for reading the necessary page from the device 6 into the main storage device 2 via the input/output processing bag @7.

このため、従来は書込み要求時に、メモリコントロール
ユニット3からの応答によって正常に書込みが終了した
か、ページフォルトが発生したかが明らかになるまで、
CPUIが次のマイクロ命令の実行に移らないように待
機させるため、CPUI内部にマイクロ命令実行待ち発
生回路5が設けられていた。
For this reason, conventionally, when a write request is made, the response from the memory control unit 3 indicates that the write has been completed normally or that a page fault has occurred.
A micro-instruction execution wait generation circuit 5 is provided inside the CPU to cause the CPU to wait so as not to move on to executing the next micro-instruction.

ところが、このような方式では、書込み要求が発生する
ごとに必ずCPU1に待ちサイクルが発生して処理が停
止するために、CPU1の処理性能が低下するという問
題がある。
However, in such a system, a waiting cycle is always generated in the CPU 1 every time a write request is generated, and the processing is stopped, so there is a problem that the processing performance of the CPU 1 is degraded.

一方、書込み要求が発生した時点でCPUIの状態を保
存した優に次のマイクロ命令の実行に移り、ページフォ
ルトが発生した場合には、保存してあったCPUIの状
態を復元して命令の再実行を行なうという方式も知られ
ている。
On the other hand, when a write request occurs, the state of the CPUI is saved and the next microinstruction is executed, and if a page fault occurs, the saved state of the CPUI is restored and the instruction is restarted. A method of carrying out the execution is also known.

この方式ではCPU1の待ちは発生しないが、CPU1
の状態を保存、復元するための処理が複雑でハードウェ
アの量も、増大するという問題点がおる。
This method does not cause CPU1 to wait, but CPU1
There are problems in that the processing for saving and restoring the state of the system is complicated and the amount of hardware increases.

(発明が解決しようとする課題) 上記の如〈従来の仮想記憶機構を持った計算機システム
では、主記憶への書込み要求時に、メモリコントロール
ユニット3からの応答によって正常に書込みが終了した
か、ページフォルトが発生したかが明らかになるまで、
CPUIが次のマイクロ命令の実行に移らないように待
機させるため、CPU1内部にマイクロ命令実行待ち発
生回路5が設けられている。このため、書込み要求が発
生するごとに必ずCPUIに待ちサイクルが発生して処
理が停止するために、cpuiの処理能力が低下すると
いう不都合があった。
(Problems to be Solved by the Invention) As described above, in a computer system having a conventional virtual memory mechanism, when a write request is made to the main memory, a response from the memory control unit 3 indicates whether the write has been completed normally or whether the page until it becomes clear that a fault has occurred.
A micro-instruction execution wait generation circuit 5 is provided inside the CPU 1 in order to cause the CPU to wait so that it does not move on to executing the next micro-instruction. For this reason, each time a write request occurs, a wait cycle occurs in the CPUI and the processing is stopped, resulting in an inconvenience that the processing capacity of the CPUI is reduced.

そこで、上記マイクロ命令実行待ち発生回路を設けず、
書込み要求が発生した時点でCPUの状態を保存した後
に次のマイクロ命令の実行に移り、ページフォルトが発
生した場合に、保存してあったCPUの状態を復元して
命令の再実行を行なうというシステムもあるが、CPU
の状態を保存、復元するための処理が複雑で、ハードウ
ェアの量も増大するという不都合があった。
Therefore, the above microinstruction execution wait generation circuit is not provided, and
When a write request occurs, the CPU state is saved and the next microinstruction is executed, and if a page fault occurs, the saved CPU state is restored and the instruction is re-executed. There is also a system, but the CPU
The process of saving and restoring the state of the system is complicated, and the amount of hardware required increases.

本発明は上記の欠点を除去するもので、主記憶への書込
み要求時マイクロ命令実行待ち発生回路によるCPUの
待ちサイクルを簡単なハードウェア構成にて減少させて
CPUの能力の低下を防止することができるマイクロ命
令実行制御方式を提供することを目的としている。
The present invention eliminates the above-mentioned drawbacks, and aims to prevent a decrease in CPU performance by reducing the number of CPU wait cycles caused by a microinstruction execution wait generation circuit when a write request is made to main memory using a simple hardware configuration. The purpose of this project is to provide a microinstruction execution control system that can perform the following tasks.

[発明の構成] (課題を解決するための手段) 本発明は、ベージング方式による仮想記憶機構を有し、
且つ、主記憶への書き込みが正常に終了したかページフ
ォルトが発生したかが明らかになるまでCPUが次のマ
イクロ命令の実行に移らないようにするマイクロ命令の
実行待ち発生機能を有した計算機システムにおいて、書
き込みを行なった仮想空間中のページのページ番号を保
持する保持手段と、この保持手段に保持されたページ番
号が有効か否かを示す表示手段と、前記保持手段によっ
て保持され、且つ前記表示手段が示す有効な全てのペー
ジ番号と仮想アドレスによって示されるページ番号とが
一致するか否かを比較する比較手段と、この比較手段に
よって前記一致が検出されない時のみマイクロ命令の実
行待ち発生機能を動作させる制御手段とを具備した方式
を採用している。
[Structure of the Invention] (Means for Solving the Problems) The present invention has a virtual storage mechanism using a paging method,
In addition, a computer system having a microinstruction execution wait generation function that prevents the CPU from proceeding to execution of the next microinstruction until it becomes clear whether writing to main memory has completed normally or a page fault has occurred. a holding means for holding a page number of a page in the virtual space to which writing has been performed; a display means for indicating whether or not the page number held in the holding means is valid; Comparison means for comparing all valid page numbers indicated by the display means with the page number indicated by the virtual address, and a function for generating a microinstruction execution wait only when the comparison means does not detect a match. The system is equipped with a control means for operating the system.

(作用) 本発明のマイクロ命令実行制御方式において、保持手段
は書き込みを8行なった仮想空間中のページのページ番
号を保持する。比較手段は前記保持手段によって保持さ
れ且つ表示手段が示す有効な全てのページ番号と仮想ア
ドレスによって示されるページ番号とが一致するか否か
を比較して、その結果を制御手段に知らせる。制御手段
は前記比較手段によって前記一致が検出されない時のみ
マイクロ命令の実行待ち発生機能を動作させる。これに
より、CPUの待ちサイクル発生を低減させることがで
きる。
(Operation) In the microinstruction execution control system of the present invention, the holding means holds the page number of the page in the virtual space that has been written 8 times. The comparison means compares all valid page numbers held by the holding means and indicated by the display means to see if they match the page number indicated by the virtual address, and notifies the control means of the result. The control means operates the microinstruction execution wait generating function only when the matching is not detected by the comparison means. This makes it possible to reduce the occurrence of CPU wait cycles.

(実施例) 以下、本発明の一実施例を図面を参照して説明する。(Example) Hereinafter, one embodiment of the present invention will be described with reference to the drawings.

第1図は本発明のマイクロ命令実行制御方式を適用した
CPUの一実施例を示したブロック図である。プログラ
ムの使用する仮想アドレスは、一般に11の仮想アドレ
スレジスタ内部に保持され、その仮想アドレスが含まれ
る仮想空間中のページを指し示すページ番@12と、ペ
ージ内部での位置を示すページ内相対アドレス13から
成る。、14は過去に書き込みを行なった仮想空間中の
ページのページ番号を保持するためのページ番号レジス
タ群である。ページ番号レジスタ群14の個々のページ
番号レジスタ15は、そのページ番号レジスタの保持し
ているページ番号が有効であるかどうかを示す有効ビッ
ト16を持っている。17はページ番号レジスタ群14
の保持するすべてのページ番号18と、CPUが書込み
要求を発生した仮想アドレスのページ番号12とを比較
する比較器である。比較器17の比較出力信号19は、
入力されるページ番号が有効であって、かつ比較の結果
が一致した場合のみ、論理値“1″をとるものである。
FIG. 1 is a block diagram showing an embodiment of a CPU to which the microinstruction execution control system of the present invention is applied. Virtual addresses used by programs are generally held within 11 virtual address registers, with a page number @12 pointing to the page in the virtual space that includes the virtual address, and an intra-page relative address 13 indicating the position within the page. Consists of. , 14 are a group of page number registers for holding page numbers of pages in the virtual space that have been written in the past. Each page number register 15 of the page number register group 14 has a valid bit 16 indicating whether the page number held by that page number register is valid. 17 is page number register group 14
This is a comparator that compares all page numbers 18 held by the CPU with the page number 12 of the virtual address to which the CPU has issued a write request. The comparison output signal 19 of the comparator 17 is
The logic value "1" is taken only when the input page number is valid and the comparison results match.

比較出力信号19は、20のマイクロ命令実行待ち発生
回路に入力される。
The comparison output signal 19 is input to a microinstruction execution wait generation circuit 20.

マイクロ命令実行待ち発生回路20は、17の比較器が
、ページ番号レジスタ群14に保持されているページ番
号18中に、仮想アドレスレジスタ11に示されるペー
ジ番号12と一致する有効なページ番号を検出できなか
った場合に、CPUが次のマイクロ命令の実行を開始し
ないようにするためのものである。なお、この第1図に
示した回路は計算機システムを構成するCPUの内部に
設けられている。
In the microinstruction execution wait generation circuit 20, the comparator 17 detects a valid page number that matches the page number 12 indicated in the virtual address register 11 from among the page numbers 18 held in the page number register group 14. This is to prevent the CPU from starting execution of the next microinstruction if the microinstruction cannot be executed. Note that the circuit shown in FIG. 1 is provided inside a CPU that constitutes a computer system.

次に本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

最初に、ページ番号レジスタ群14のすべてのページ番
号レジスタ15の持つ有効ビット1Bは、ページ番号レ
ジスタ15の内容が無効であることを示す値、すなわち
論理値“O″に設定される。CPUにおいて主記憶への
書込み要求が発生すると、書込み要求の発生した仮想ア
ドレスのページ番号12が、比較器17によってページ
番号レジスタ群14の保持しているすべてのページ番号
18と比較される。比較の結果、一致するものが存在し
ない場合は、ページフォルトが発生する可能性があるこ
とをしめし、このとき、比較器17の比較出力信@19
は論理値“Onをとる。これによりマイクロ命令実行待
ち発生回路20はCPUが次のマイクロ命令の実行を開
始しないようにし、図示されない主記憶を制御するメモ
リコントロールユニットから正常に書込みが終了したか
、あるいはページフォルトが発生したかを示す応答が返
るまで、CPUの処理に待ちを発生させる。一致が検出
されなかった場合、仮想アドレスのページ@@12は、
ページ番号レジスタ群14のページ番号レジスタ15の
うち有効ビット16が“0”であるページ番号レジスタ
15のうちの一つを選んでその中に保持される。このと
き、そのページ番号レジスタ15に対応する有効ビット
は1″に設定される。有効ビット16が“Oeeである
ようなページ番号レジスタ15が存在しない場合には、
すべてのページ番号レジスタ15の有効ビットを“0゛
とした後、ページ番号レジスタ15の一つを選んでペー
ジ番号を書き込み、そのページ番号レジスタの有効ビッ
トを“1°′にする。主記憶からページを外部記憶に追
い出すロールアウトの処理を行なう場合には、そのペー
ジに対応するページ番号がページ番号レジスタ群14の
ページ番号レジスタ15の中に保持されているかどうか
を検査し、もし保持されている場合にはそのページ番号
を保持しているベージlt@レジスタの有効ビット16
を“0″にする。これにより、ページ番号レジスタ群1
4のページ番号レジスタ15のうち、有効ビット16が
、41パであるページ番号レジスタ15が保持している
ページ番号は、主記憶中に存在するページのページ番号
であることが保証される。書込み要求の発生した仮想ア
ドレスのページ番号12と同じページ番号が、ページ番
号レジスタ群14のページ番号レジスタ15のうちの有
効ビット16が“1′″であるページ番号レジスタの保
持しているページ番号18の中に存在するとき、ページ
番号に対応するページが主記憶中に存在することを意味
する。このとき比較器17の比較出力信号19が論理値
“1″をとり、この結果、マイクロ命令実行待ち発生回
路20はCPtJの実行サイクル中に持ちを発生させず
、即座に次のマイクロ命令の実行が開始される。なお、
マイクロ命令実行持ち発生回路20内には、比較器17
からの比較出力信号19が論理値“0″の時に本回路を
起動させ、論理値“′1″の時に本回路の動作を停止さ
せる制御回路が設けられている。
First, the valid bits 1B of all the page number registers 15 of the page number register group 14 are set to a value indicating that the contents of the page number registers 15 are invalid, that is, the logical value "O". When a write request to the main memory occurs in the CPU, the page number 12 of the virtual address where the write request occurred is compared by the comparator 17 with all the page numbers 18 held in the page number register group 14. If there is no match as a result of the comparison, this indicates that a page fault may occur, and in this case, the comparison output signal of the comparator 17 @19
takes the logical value "On."As a result, the microinstruction execution wait generation circuit 20 prevents the CPU from starting execution of the next microinstruction, and the memory control unit (not shown) that controls the main memory instructs the CPU to determine whether the writing has been completed normally. , or causes the CPU to wait until a response is returned indicating whether a page fault has occurred.If no match is found, the page @@12 at the virtual address is
Among the page number registers 15 of the page number register group 14, one of the page number registers 15 whose valid bit 16 is "0" is selected and held therein. At this time, the valid bit corresponding to the page number register 15 is set to 1''. If there is no page number register 15 whose valid bit 16 is ``Oee'', then
After the valid bits of all page number registers 15 are set to "0", one of the page number registers 15 is selected and a page number is written, and the valid bit of that page number register is set to "1". When performing rollout processing to drive a page from main memory to external memory, it is checked whether the page number corresponding to that page is held in the page number register 15 of the page number register group 14, and if If held, valid bit 16 of the page lt@ register holding the page number.
Set to “0”. As a result, page number register group 1
4, the page number held by the page number register 15 whose valid bit 16 is 41 is guaranteed to be the page number of a page existing in the main memory. The same page number as page number 12 of the virtual address where the write request occurred is the page number held by the page number register whose valid bit 16 of the page number register 15 of the page number register group 14 is "1'". 18, it means that the page corresponding to the page number exists in main memory. At this time, the comparison output signal 19 of the comparator 17 takes the logical value "1", and as a result, the microinstruction execution wait generating circuit 20 does not generate a hold during the execution cycle of CPtJ, and immediately executes the next microinstruction. is started. In addition,
A comparator 17 is included in the microinstruction execution generation circuit 20.
A control circuit is provided which activates this circuit when the comparison output signal 19 from the 19 is a logic value of "0" and stops the operation of this circuit when it has a logic value of "'1".

本実施例によれば、仮想アドレスのページ番号12と同
一のページ番号がページ番号レジスタ群14の保持して
いるすべてのページ番号の中にない場合、即ちページフ
ォルトが発生する可能性がある場合にのみ、マイクロ命
令実行待ち発生回路20を動作させて、メモリコントロ
ールユニットからの正常書き込みの終了又はページフォ
ルトの発生を示す応答があるまで、CPUの処理待ちを
発生させ、伯の場合はCPIJの実行サイクル中に待ち
を発生させないようにして、直ちに次のマイクロ命令の
実行を行なうため、マイクロ命令実行待ち発生回路20
によるCPUの待ちサイクルを著しく削減することがで
き、この分CPUの能力の低下を防止することができる
。又、上記効果をもたらすための構成は比較器17等の
若干のハードウェアを付加した簡単なもので実現するこ
とができ、CPUのコストの上昇を防止することができ
る。
According to this embodiment, when the same page number as the page number 12 of the virtual address is not among all the page numbers held in the page number register group 14, that is, when there is a possibility that a page fault will occur. In this case, the microinstruction execution wait generation circuit 20 is activated to cause the CPU to wait for processing until there is a response from the memory control unit indicating the completion of normal writing or the occurrence of a page fault. In order to immediately execute the next microinstruction without causing a wait during the execution cycle, a microinstruction execution wait generation circuit 20 is used.
It is possible to significantly reduce the number of CPU waiting cycles caused by the CPU, thereby preventing a decrease in CPU performance. Further, the configuration for bringing about the above effects can be realized with a simple configuration by adding some hardware such as the comparator 17, and an increase in the cost of the CPU can be prevented.

第2図は、本発明の他の実施例を示したものである。第
2図において、構成要素が第1図と同じものである場合
には、第1図と同じ番号をつけである。本実施例におい
て前実施例と異なる点は、ページ番号を比較する比較器
17がページ番号レジスタ15と同数存在しており、こ
れら比較器17の出力の論理和をとるORゲート32が
設けられていることと、ページ番号レジスタ群14の各
ページ番号レジスタ15ごとに優先度レジスタ33が設
けられていることの2点である。ページ番号を比較する
比較器17は、対応するページ番号レジスタ15の保持
するページ番号が有効なものであって、しかも書込みの
発生した仮想アドレスのページ番号と一致している場合
に、その比較出力信号34が、論理値“1″をとり、そ
のほかの場合には論理値“O″をとる。ORゲート32
はすべての比較器17の出力の論理和を取ることによっ
て、ページ番号レジスタ15のどれかに書込みの発生し
た仮想アドレスのページ番号と同じ有効なページ番号が
保持されていることを検出するものであり、その場合に
のみ、ORゲートの出力35は論理値“1パをとる。こ
のORゲートの出力はマイクロ命令実行待ち発生回路2
0に入力される。優先度レジスタ33は、すべてのペー
ジ番号レジスタ15が有効なページ番号を保持している
ときに、それらのページ番号とは異なるページ番号を持
つ新たなページ番号に対して言込み要求が発生した場合
に、どのページ番号レジスタの内容を新しいページ番号
で置き換えるかを決定するための優先度を示す値を保持
するものである。
FIG. 2 shows another embodiment of the invention. In FIG. 2, if the components are the same as those in FIG. 1, they are numbered the same as in FIG. 1. This embodiment differs from the previous embodiment in that there are the same number of comparators 17 for comparing page numbers as there are page number registers 15, and an OR gate 32 is provided to take the logical sum of the outputs of these comparators 17. The second point is that a priority register 33 is provided for each page number register 15 of the page number register group 14. A comparator 17 that compares page numbers outputs a comparison output when the page number held in the corresponding page number register 15 is valid and matches the page number of the virtual address where writing occurred. The signal 34 takes the logic value "1" and takes the logic value "O" in other cases. OR gate 32
By calculating the logical OR of the outputs of all the comparators 17, it is detected that any of the page number registers 15 holds a valid page number that is the same as the page number of the virtual address where writing occurred. Yes, only in that case, the output 35 of the OR gate takes a logic value of "1".The output of this OR gate is
It is input to 0. When all the page number registers 15 hold valid page numbers, the priority register 33 determines whether a request is made for a new page number that has a different page number from those page numbers. It also holds a value indicating the priority for determining which page number register's contents should be replaced with a new page number.

次に本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

最初に、ページ番号レジスタ群14のすべてのページ番
号レジスタ15の持つ有効ビット16は、ページ番号レ
ジスタ15の内容が無効であることを示す値、すなわち
論理値“0″に設定される。この時、優先度レジスタ3
3の値は何であってもよい。cPuにおいて主記憶への
書込み要求が発生すると、書込み要求の発生した仮想ア
ドレスのページ番号12が、各比較器17によってペー
ジ番号レジスタ群14の保持しているすべてのページ番
号18と比較される。
First, the valid bits 16 of all the page number registers 15 of the page number register group 14 are set to a value indicating that the contents of the page number registers 15 are invalid, that is, a logical value of "0". At this time, priority register 3
The value of 3 may be any value. When a write request to the main memory occurs in the cPu, the page number 12 of the virtual address where the write request occurred is compared by each comparator 17 with all page numbers 18 held in the page number register group 14.

比較の結果、一致するものが存在しない場合は、ページ
フォルトが発生する可能性があることを示す。このとき
、すべての比較器17の比較出力信号34は論理値“O
atをとり、したがってORゲートの出力は論理値゛0
゛′をとる。これによりマイクロ命令実行待ち発生回路
20はCPIJが次のマイクロ命令の実行を開始しない
ようにし、図示されない主記憶を制御するメモリコント
ロールユニットから正常に書込みが終了したか、あるい
はページフォルトが発生したかを示す応答が返るまで、
CPUの処理に待ちを発生させる。一致が検出されなか
った場合、仮想アドレスのページ番号12は、ページ番
号レジスタ群14のページ番号レジスタ15のうち、有
効ビット16が“0″であるページ番号レジスタのうち
の一つを選んでその中に保持される。
If there is no match as a result of the comparison, it indicates that a page fault may occur. At this time, the comparison output signals 34 of all the comparators 17 have the logical value "O".
at, and therefore the output of the OR gate is the logical value ``0''.
Take ゛′. As a result, the micro-instruction execution wait generating circuit 20 prevents the CPIJ from starting execution of the next micro-instruction, and determines whether the writing has been completed normally from the memory control unit that controls the main memory (not shown), or whether a page fault has occurred. until a response indicating
Generates a wait in CPU processing. If no match is detected, the page number 12 of the virtual address is determined by selecting one of the page number registers whose valid bit 16 is "0" among the page number registers 15 of the page number register group 14. held inside.

このとき、そのページ番号レジスタ15に対応する有効
ビットは“1′°に設定され、優先度レジスタ33の値
は、最も低い優先度を示す値に設定される。
At this time, the valid bit corresponding to the page number register 15 is set to "1'°," and the value of the priority register 33 is set to a value indicating the lowest priority.

そのほかのページ番号レジスタ15に対応する優先度レ
ジスタの値はそれまでより1だけ優先度の高い値に再設
定される。有効ビット16が“0”であるようなページ
番号レジスタ15が存在しない場合には、ページ番号レ
ジスタ15のうちで、対応する優先度レジスタ33が最
も高い優先度を示す値を持っているものを選択し、そこ
に新しいページ番号12を保持させる。主記憶からペー
ジを外部記憶に追い出すロールアウトの処理を行なう場
合には、そのページに対応するページ番号がページ番号
レジスタ群14のページ番号レジスタ15の中に保持さ
れているかどうかをチエツクする。もし保持されている
場合には、そのページ番号を保持しているページ番号レ
ジスタ15の有効ビット1Bを“0″にする。これによ
り、ページ番号レジスタ群14のページ番号レジスタ1
5のうち有効ビット16が“1″であるページ番号レジ
スタ15が保持しているページ番号は、主記憶中に存在
するページのページ番号であることが保証される。書込
み要求の発生した仮想アドレスのページ番号12と同じ
ページ番号が、ページ番号レジスタ群14のページ番号
レジスタ15のうちの有効ビット1Bが“1′′である
ページ番号レジスタの保持しているページ番号18の中
に存在するとき、ページ番号に対応するページが主記憶
中に存在することを意味する。このとき、ページ番号1
2と同じページ番号を保持しているページ番号レジスタ
15に対応する比較器17の比較出力34は論理値“1
″をとり、ORゲート32の出力は論理値゛1″をとる
。この結果、マイクロ命令実行待ち発生回路20はCP
Uの実行サイクル中に待ちを発生させず、即座に次のマ
イクロ命令の実行を開始させる。
The values of the priority registers corresponding to the other page number registers 15 are reset to values with higher priority by 1 than before. If there is no page number register 15 for which the valid bit 16 is "0", the page number register 15 whose corresponding priority register 33 has a value indicating the highest priority is selected. Select and keep the new page number 12 there. When performing a rollout process for expelling a page from the main memory to an external memory, it is checked whether the page number corresponding to the page is held in the page number register 15 of the page number register group 14. If the page number is held, the valid bit 1B of the page number register 15 holding the page number is set to "0". As a result, page number register 1 of page number register group 14
5, the page number held by the page number register 15 whose valid bit 16 is "1" is guaranteed to be the page number of a page existing in the main memory. The same page number as page number 12 of the virtual address where the write request occurred is the page number held by the page number register whose valid bit 1B of the page number register 15 of the page number register group 14 is "1''. 18, it means that the page corresponding to the page number exists in the main memory.In this case, page number 1
The comparison output 34 of the comparator 17 corresponding to the page number register 15 holding the same page number as 2 is the logical value "1".
'', and the output of the OR gate 32 takes a logic value of ``1''. As a result, the microinstruction execution wait generation circuit 20
To immediately start execution of the next microinstruction without causing a wait during the execution cycle of U.

本実施例も、ページフォルトが発生する可能性がある場
合にのみ、マイクロ命令実行待ち発生回路20を動作さ
せて、CPUの処理待ちを発生するため、前実施例と同
様にCPUの待ちサイクルを著しく削減することができ
る。特に各ページ番号レジスタ15毎に比較器17が設
けられているため、マイクロ命令実行待ち発生回路20
を起動するかしないかの判定を迅速に行なうことができ
る。なお、本構成は優先度レジスタ33を持っていない
前実施例に適用しても同様の効果がある。
In this embodiment as well, the microinstruction execution wait generating circuit 20 is operated to generate a CPU processing wait only when there is a possibility that a page fault may occur. can be significantly reduced. In particular, since a comparator 17 is provided for each page number register 15, the microinstruction execution wait generation circuit 20
It is possible to quickly decide whether to activate or not. Note that even if this configuration is applied to the previous embodiment that does not have the priority register 33, the same effect can be obtained.

[発明の効果] 以上記述した如く本発明のマイクロ命令実行制御方式に
よれば、仮想記憶機構を採用している計算機システムに
おいて、主記憶中に存在するページのうち、新たに書込
み要求の発生したページのページ番号のいくつかをCP
U内部で記憶しておくことによって、次に書込み要求が
発生したときに、記憶しておいたページ番号と比較する
ことで主記憶中に必要なページが存在するかどうかを判
断できるようにしたものである。この方式は、従来知ら
れていたCPUの状態の保存、回復による方式に比べて
、処理、ハードウェアともにはるかに単純でありながら
、書込み要求時に常に必要であったページフォルトの有
無の確認のためのCPUの実行待ちサイクルを大幅に低
減することができ、CPUの処理効率を向上させること
ができる。
[Effects of the Invention] As described above, according to the microinstruction execution control method of the present invention, in a computer system that employs a virtual memory mechanism, among pages existing in main memory, a new write request is generated. CP some of the page numbers of the pages
By storing it inside the U, the next time a write request occurs, it can be determined whether the required page exists in main memory by comparing it with the stored page number. It is something. This method is much simpler in terms of processing and hardware than the conventional method of saving and restoring the CPU state, but it also allows checking for the presence of page faults, which is always necessary at the time of a write request. The execution waiting cycles of the CPU can be significantly reduced, and the processing efficiency of the CPU can be improved.

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

第1図は本発明のマイクロ命令実行制御方式を適用した
CPUの一実施例を示したブロック図、第2図は本発明
の他の実施例を示したブロック図、第3図は従来のマイ
クロ命令実行制御方式を適石した計算機システムの一例
を示したブロック図である。 11・・・仮想アドレスレジスタ 14・・・ページ番号レジスタ群 17・・・比較器 20・・・マイクロ命令実行待ち発生回路32・・・O
Rゲート 代理人 弁理士  則 近 憲 缶 周  山王 − 第2図 第3図
FIG. 1 is a block diagram showing an embodiment of a CPU to which the micro-instruction execution control system of the present invention is applied, FIG. 2 is a block diagram showing another embodiment of the present invention, and FIG. 3 is a block diagram of a conventional CPU. FIG. 1 is a block diagram showing an example of a computer system with an appropriate instruction execution control method. 11...Virtual address register 14...Page number register group 17...Comparator 20...Micro instruction execution wait generation circuit 32...O
R Gate Agent Patent Attorney Nori Chika Ken Shu Kanshu Sanno - Figure 2 Figure 3

Claims (1)

【特許請求の範囲】[Claims] ページング方式による仮想記憶機能を有し、且つ、主記
憶への書き込みが正常に終了したかページフオルトが発
生したかが明らかになるまでCPUが次のマイクロ命令
の実行に移らないようにするマイクロ命令の実行待ち発
生機能を有した計算機システムにおいて、書き込みを行
なつた仮想空間中のページのページ番号を保持する保持
手段と、この保持手段に保持されたページ番号が有効か
否かを示す表示手段と、前記保持手段によって保持され
且つ前記表示手段が示す有効な全てのページ番号と仮想
アドレスによって示されるページ番号とが一致するか否
かを比較する比較手段と、この比較手段によって前記一
致が検出されない時のみマイクロ命令の実行待ち発生機
能を動作させる制御手段とを具備したことを特徴とする
マイクロ命令実行制御方式。
A microcontroller that has a virtual memory function using a paging method and prevents the CPU from moving on to executing the next microinstruction until it becomes clear whether writing to main memory has completed normally or a page fault has occurred. In a computer system having an instruction execution wait generation function, a holding means for holding a page number of a page in a virtual space to which writing has been performed, and a display indicating whether the page number held in the holding means is valid or not. a comparison means for comparing whether or not all valid page numbers held by the holding means and indicated by the display means match the page number indicated by the virtual address; 1. A microinstruction execution control method, comprising: a control means for operating a microinstruction execution wait generating function only when the microinstruction is not detected.
JP63085431A 1988-03-30 1988-04-08 Control system for micro instruction execution Pending JPH01258154A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP63085431A JPH01258154A (en) 1988-04-08 1988-04-08 Control system for micro instruction execution
US07/329,210 US5151982A (en) 1988-03-30 1989-03-27 Data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63085431A JPH01258154A (en) 1988-04-08 1988-04-08 Control system for micro instruction execution

Publications (1)

Publication Number Publication Date
JPH01258154A true JPH01258154A (en) 1989-10-16

Family

ID=13858654

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63085431A Pending JPH01258154A (en) 1988-03-30 1988-04-08 Control system for micro instruction execution

Country Status (1)

Country Link
JP (1) JPH01258154A (en)

Similar Documents

Publication Publication Date Title
US5297281A (en) Multiple sequence processor system
JPH0242569A (en) Context switching method and apparatus used for vector processing system
US5003458A (en) Suspended instruction restart processing system based on a checkpoint microprogram address
US4740889A (en) Cache disable for a data processor
JPH07219809A (en) Apparatus and method for data processing
US5363502A (en) Hot stand-by method and computer system for implementing hot stand-by method
JPH07311740A (en) Computer
JPS58121457A (en) Information processing device
US4124892A (en) Data processing systems
US4985826A (en) Method and device to execute two instruction sequences in an order determined in advance
IE61306B1 (en) Method and device to execute two instruction sequences in an order determined in advance
US5898867A (en) Hierarchical memory system for microcode and means for correcting errors in the microcode
JPH0789328B2 (en) Data processing device
US5673391A (en) Hardware retry trap for millicoded processor
JPH01258154A (en) Control system for micro instruction execution
JP2671160B2 (en) Exception handling method
JPH0133856B2 (en)
US5201052A (en) System for transferring first and second ring information from program status word register and store buffer
JP3507193B2 (en) Load / store instruction processor
JP2715988B2 (en) Program simulator device and program debugging method
JPH0368034A (en) Checkpoint retesting system
JPS59172044A (en) Instruction control system
JP2562838B2 (en) Processor and store buffer control method
JPS58154043A (en) Information processor
JPS61117635A (en) Virtual storage control system