[go: up one dir, main page]

JPH01217535A - How to control the additional processor unit - Google Patents

How to control the additional processor unit

Info

Publication number
JPH01217535A
JPH01217535A JP4198388A JP4198388A JPH01217535A JP H01217535 A JPH01217535 A JP H01217535A JP 4198388 A JP4198388 A JP 4198388A JP 4198388 A JP4198388 A JP 4198388A JP H01217535 A JPH01217535 A JP H01217535A
Authority
JP
Japan
Prior art keywords
processor
additional processor
additional
layer
main
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
JP4198388A
Other languages
Japanese (ja)
Inventor
Yoichi Takeuchi
洋一 竹内
Kousuke Sakota
迫田 行介
Yoshihiro Tanaka
田中 吉廣
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 JP4198388A priority Critical patent/JPH01217535A/en
Publication of JPH01217535A publication Critical patent/JPH01217535A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は計算機システムに係り、特に、主プロセッサユ
ニットにPROLOG、 L I S P等のAI言語
の専用プロセッサユニットを付加するシステムにおける
付加プロセッサユニットの制御方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a computer system, and particularly to an additional processor unit in a system in which a dedicated processor unit for an AI language such as PROLOG or LISP is added to a main processor unit. Regarding the control method.

〔従来の技術〕[Conventional technology]

従来、AI言語を処理する方式としては、(1)AI言
語を汎用プロセッサのマシン語に変換して、直接実行す
る方式、(2)AI言語を該AI言語に適した中間語に
変換し、該中間語をインタープリタによって解釈実行す
る方式等が挙げられる。
Conventionally, methods for processing AI language include (1) converting the AI language into machine language on a general-purpose processor and directly executing it; (2) converting the AI language into an intermediate language suitable for the AI language; Examples include a method in which the intermediate language is interpreted and executed by an interpreter.

方式(2)は方式(1)と比べて、プログラムの変換に
要する処理量が少ない、変換後のプログラムの容量が小
さい等の利点を有する。
Method (2) has advantages over method (1), such as a smaller amount of processing required for program conversion and a smaller program capacity after conversion.

また、方式(2)におけるインタープリタの処理速度を
向上させる手段として、(3)インタープリタの処理を
専用プロセッサ上で行なう方式が提案されている。該専
用プロセッサは方式(2)における中間語をマシン語と
して、該マシン語をマイクロプログラム制御の下で実行
する。方式(3)は方式(2)の上記の利点を保持した
上で、命令フェッチのためのメモリのアクセス回数が減
少する。マイクロ命令のフィールド単位の並列処理が行
なわれる等の特性により、方式(2)よりも処理速度の
向上がはかれる。
Further, as a means for improving the processing speed of the interpreter in method (2), a method (3) has been proposed in which the interpreter processing is performed on a dedicated processor. The dedicated processor uses machine language as the intermediate word in method (2), and executes the machine language under microprogram control. Method (3) maintains the above advantages of method (2) and reduces the number of memory accesses for fetching instructions. Due to characteristics such as parallel processing of microinstructions on a field-by-field basis, processing speed is improved over method (2).

AI言語の処理システムの中で方式(3)を採るものに
は、例えば、情報処理学会記号処理研究会23−1 (
1983年)第1頁から第8頁に記されるシステムが挙
げられる。
AI language processing systems that adopt method (3) include, for example, the Information Processing Society of Japan's Symbol Processing Study Group 23-1 (
(1983), pages 1 to 8.

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

上記の専用プロセッサを利用した方式(3)のAI言語
処理システムにおいては、専用プロセッサの規模や複雑
さ等を抑えるために、通常は、割込処理や入出力処理等
の一部を主プロセッサが分担せざるを得ない。
In the above AI language processing system using a dedicated processor (3), in order to reduce the size and complexity of the dedicated processor, the main processor usually performs some of the interrupt processing, input/output processing, etc. I have no choice but to share.

この場合、主プロセッサと専用プロセッサとの間で、パ
ラメータの引き渡し、プログラムの起動制御等が必要と
なり、主プロセッサの側では、プログラムの変更箇所が
、osの入出カ管理部、プロセス管理部等多岐に及ぶこ
とが問題点であった。
In this case, it is necessary to pass parameters, control program startup, etc. between the main processor and the dedicated processor, and on the main processor side, there are many changes to the program, such as the input/output management section of the OS, the process management section, etc. The problem was that it extended to

本発明の目的は、上記のようにAI言語の専用プロセッ
サを付加プロセッサとして利用する場合、主プロセッサ
側のプログラムの変更が容易となるよう、プロセッサの
変更箇所を局所化するような付加プロセッサの制御方式
を提供することにある。
An object of the present invention is to control the additional processor to localize changes in the processor so that when a dedicated processor for AI language is used as an additional processor as described above, it is easy to change the program on the main processor side. The goal is to provide a method.

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

上記目的は、 (1)主プロセッサとAI言語を処理する付加プロセッ
サとをバスを介して結合し、バス制御ユニットによって
、付加プロセッサへ優先的にバスマスタ権を割り当てる
こと、 (2)主プロセッサから付加プロセッサを、osのドラ
イバ層、又は、アプリケーション層における特権モード
のプログラムによって起動すること、 (:3)付加プロセッサが動作中に、主プロセッサによ
る処理を要求する場合、該要求処理の種別等を主メモリ
、または付加プロセッサユニット内のレジスタ中に設定
して、動作を停止すること、 (4)付加プロセッサが動作中に、割込要求、またはバ
スエラー信号等を入力した場合に、停止要因を主メモリ
、または付加プロセッサユニット内のレジスタ中に設定
して、動作を停止すること (5)付加プロセッサが動作を停止した場合、主プロセ
ッサが、O5のドライバ層、又は、アプリケーション層
における特権モードのプログラムによって、上記の停止
要因、要求処理の種別等を判定し、必要なプログラムへ
分岐すること 等により、達成される。
The above objectives are: (1) to connect the main processor and an additional processor that processes AI language via a bus, and to assign bus mastership priority to the additional processor by the bus control unit; The processor is started by a privileged mode program in the driver layer of the OS or the application layer. (:3) When an additional processor requests processing by the main processor while it is operating, the type of request processing etc. (4) If an interrupt request, bus error signal, etc. is input while the additional processor is operating, the main cause of the stop is determined. (5) When the attached processor stops operating, the main processor sets it in the memory or a register in the attached processor unit to stop its operation. This is achieved by determining the cause of the stop, the type of requested processing, etc., and branching to the necessary program.

〔作用〕[Effect]

主プロセッサがosのドライバ層、またはアプリケーシ
ョン層における特権モードのプログラムから付加プロセ
ッサを起動すると、付加プロセッサは、バス制御ユニッ
トに対して、バスマスタ権を要求する。
When the main processor starts up the attached processor from a privileged mode program in the driver layer of the OS or the application layer, the attached processor requests bus mastership from the bus control unit.

バスマスタ権の割り当ての優先度は付加プロセッサの側
が高く設定されているため、バス制御ユニットは主プロ
セッサからバスマスタ権を付加プロセッサへ移す。
Since the bus mastership assignment priority is set high for the attached processor, the bus control unit transfers the bus mastership from the main processor to the attached processor.

この結果、付加プロセッサは動作を開始し、−方、主プ
ロセッサは。Sのドライバ層、またはアプリケーション
層における特権モードのプログラム中で動作の中断状態
となる。
As a result, the additional processor starts operating, while the main processor. The operation of a privileged mode program in the S driver layer or application layer is suspended.

次いで、付加プロセッサによって、AI言語のプログラ
ムの処理が行なわれる。
Next, the additional processor processes the AI language program.

この間に、主プロセッサによる処理が必要となった場合
、付加プロセッサは処理の種別や引数等を主メモリ、ま
たは付加プロセッサユニット内のレジスタ(以下、要求
エリアと記す)中に設定して、動作を停止する。また、
割込要求や、バスエラー信号を入力した場合、それらの
種別を主メモリ、または付加プロセッサユニット内のレ
ジスタ(以下、停止要因エリアと記す)中に設定して、
動作を停止する。
During this time, if processing by the main processor is required, the additional processor sets the type of processing, arguments, etc. in the main memory or a register (hereinafter referred to as the request area) in the additional processor unit, and starts the operation. Stop. Also,
When an interrupt request or a bus error signal is input, the type is set in the main memory or a register in the additional processor unit (hereinafter referred to as the stop cause area).
Stop operation.

付加プロセッサが動作を停止すると、バスマスタ権は主
プロセッサに割り当てられる。この結果、主プロセッサ
は、上記の動作の中断点(osのドライバ層、またはア
プリケーション層における特権モードのプログラム内)
から処理を再開する。
When the additional processor ceases operation, bus mastership is assigned to the main processor. As a result, the main processor is unable to perform any of the above operations at any of the interruption points (in the driver layer of the OS, or in a privileged mode program in the application layer).
Resume processing from.

ここで、該プログラムにおいて、付加プロセッサの起動
処理の後に、該停止要因エリアの内容の判定処理、該要
求エリアの内容の判定処理を連ねることによって、必要
な処理に分岐することができる。処理後、該プログラム
を再実行することにより、付加プロセッサの動作を停止
点から再開し。
Here, in the program, after the process of starting up the additional processor, the process of determining the contents of the stop cause area and the process of determining the contents of the request area are performed in succession, thereby allowing branching to necessary processes. After processing, the program is re-executed to restart the operation of the attached processor from the point where it stopped.

AI言語の処理を継続する。Continue processing AI language.

以上のように、主プロセッサのプログラムの内で、付加
プロセッサの動作に関連する部分は、osのドライバ層
、またはアプリケーション層における特権モードのプロ
グラムに限られる。これらのプログラムは既存のプログ
ラムに容易に追加することが可能であり、主プログラム
の変更は容易化される。
As described above, the portions of the main processor's program that are related to the operation of the additional processor are limited to privileged mode programs in the driver layer of the OS or the application layer. These programs can be easily added to existing programs, and changes to the main program are facilitated.

〔実施例〕〔Example〕

以下、本発明の一実施例(実施例1)を第1〜8図によ
り説明する。実施例1は、本発明により成る計算機シス
テム上の論理型言語処理システムに関するものである。
Hereinafter, one embodiment (Example 1) of the present invention will be described with reference to FIGS. 1 to 8. Embodiment 1 relates to a logical language processing system on a computer system according to the present invention.

本システムは論理型言語のソースプログラムを中間語プ
ログラムに変換して。
This system converts a logical language source program into an intermediate language program.

解釈実行するインタープリタ方式のシステムであり、マ
ルチプロセス機能を有するオペレーティングシステム(
以後、osと記す)上で動作する。
It is an interpreter-based system that performs interpretation and execution, and is an operating system with multi-process functionality (
(hereinafter referred to as OS).

まず、本システムのハードウェア構成について第1図に
より説明する。
First, the hardware configuration of this system will be explained with reference to FIG.

本システムにおいては、CPUl0I 、付加プロセッ
サユニット(以後、APUと記す)102.バス洞停ユ
ニット103.メモリ管理ユニット104゜主メモリ1
05および入出力制御ユニット106がバス110を介
して結合しており、入出力制御ユニット106には補助
メモリ107が接続している。また、外部からCPUl
0Iへは割込線111が。
In this system, CPU10I, additional processor unit (hereinafter referred to as APU) 102. Bus stop unit 103. Memory management unit 104゜main memory 1
05 and an input/output control unit 106 are coupled via a bus 110, and an auxiliary memory 107 is connected to the input/output control unit 106. Also, from outside the CPU
There is an interrupt line 111 to 0I.

CPUl0IからAPU102へは割込線112が入っ
ている。
An interrupt line 112 is connected from the CPU 10I to the APU 102.

メモリ管理ユニット104から主メモリ105へは制御
線113が、バス調停ユニット103へはバスエラー信
号を伝える信号線114が入っている。バス調停ユニッ
ト103からCPUl0IとAPU102へは、それぞ
れ、バスエラー信号を伝える信号線115.116が入
っている。 CPUl0I内には割込マスク120を設
けている。割込マスク120は割込線111からの割込
要求をCPU 101が受け付けるか否かを定める機能
を有する。
A control line 113 is connected from the memory management unit 104 to the main memory 105, and a signal line 114 for transmitting a bus error signal is connected to the bus arbitration unit 103. Signal lines 115 and 116 are connected from the bus arbitration unit 103 to the CPU 10I and the APU 102, respectively, for transmitting bus error signals. An interrupt mask 120 is provided within CPUl0I. The interrupt mask 120 has a function of determining whether or not the CPU 101 accepts an interrupt request from the interrupt line 111.

第4図はAPU102のハードウェア構成を示すブロッ
ク図である。APU102の内部は実行部401.順序
制御部402.制御メモリ403.バス制御部404に
分れる。
FIG. 4 is a block diagram showing the hardware configuration of the APU 102. Inside the APU 102 is an execution unit 401. Order control unit 402. Control memory 403. It is divided into a bus control section 404.

制御メモリ403内には実行部401の動作を定めるマ
イクロプログラムが菩わえられる。順序制御部402は
データ線423を介して、制御メモリ403より該マイ
クロプログラムを読み出し。
A microprogram that determines the operation of the execution unit 401 is stored in the control memory 403. The order control unit 402 reads the microprogram from the control memory 403 via the data line 423.

制御線422を介して、実行部401の動作を制御する
The operation of the execution unit 401 is controlled via a control line 422 .

順序制御部402内にはコントロールレジスタ411と
ステータスレジスタ412.プロセス番号レジスタ41
3を設けている。コントロールレジスタ411はAPU
’102の動作を制御するためのものである0本レジス
タのある1ビツト(以後、スタートビットと記す)に1
′ を書き込むと、順序制御部402はバス調停ユニッ
ト103に対してバス110のマスタ権の割り当てを要
求し、該マスタ権を獲得後、実行部401の動作を開始
する。ステータスレジスタ412はAPU102の実行
状態を表わすためのものである。第8図にステータスレ
ジスタ412のビット構成を示す。ビット801は割込
線112からの割込要求を順序制御部411が受け付け
た場合、1′となる(以後。
The order control unit 402 includes a control register 411 and a status register 412 . Process number register 41
There are 3. Control register 411 is APU
There is a 1 bit in the 0 register (hereinafter referred to as the start bit) that is used to control the operation of the '102.
When ' is written, the order control unit 402 requests the bus arbitration unit 103 to allocate mastership of the bus 110, and after acquiring the mastership, the execution unit 401 starts operating. The status register 412 is for indicating the execution state of the APU 102. FIG. 8 shows the bit configuration of the status register 412. Bit 801 becomes 1' when sequence control unit 411 accepts an interrupt request from interrupt line 112 (hereinafter referred to as 1').

割込ビットと記す)、ビット802は信号線116から
のバスエラー信号を順序制御部411が受け付けた場合
、1′となる(以後、バスエラービットと記す)6ビツ
ト803はAPU102がマイクロプログラムの命令に
よって動作を停止した場合、1′となる(以後、終了ビ
ットと記す)。
bit 802 becomes 1' when the sequence control unit 411 receives a bus error signal from the signal line 116 (hereinafter referred to as bus error bit), bit 803 indicates that the APU 102 executes the microprogram. When the operation is stopped by an instruction, it becomes 1' (hereinafter referred to as the end bit).

プロセス番号レジスタ413には、cputotによっ
てプロセス番号が書き込まれる。
A process number is written into the process number register 413 by cputot.

実行部401内には作業用のデータ等を蓄わえるための
レジスタファイル410を設けている。
A register file 410 is provided within the execution unit 401 to store work data and the like.

バス制御部404はデータ線420,421を介して実
行部401 、 、wi序制御部402とバス110と
の間のデータの受け渡しを行なう。
The bus control unit 404 transfers data between the execution units 401 , 402 , and the order control unit 402 and the bus 110 via data lines 420 and 421 .

CPLIIOIからはバス制御部404を通して、レジ
スタファイル410.コントロールレジスタ411゜ス
テータスレジスタ412.プロセス番号レジスタ413
にアクセスする。
From CPLIIOI, register file 410 . Control register 411° Status register 412. Process number register 413
access.

次に、本システムのハードウェアの動作について説明す
る。
Next, the operation of the hardware of this system will be explained.

まず、APU102の起動制御について記す。First, startup control of the APU 102 will be described.

CPUl0Iが動作中に、コントロールレジスタ411
のスタートビットに1′ を書き込むと、APU102
は、バス調停ユニット103に対して、バス110のマ
スタ権の割り当てを要求する。バス調停ユニット103
は該マスタ権の割り当ての優先度を、CPUl0Iより
APU]02の方を高くしており、直ちに該マスタ権を
^PU102へ割り当てる。この結果。
While CPUl0I is operating, the control register 411
When 1' is written to the start bit of APU102
requests the bus arbitration unit 103 to allocate mastership of the bus 110. Bus arbitration unit 103
gives a higher priority in assigning the master right to APU]02 than CPU10I, and immediately assigns the master right to ^PU102. As a result.

CPUl0Iは命令のフェッチができなくなり、動作を
中断し、八PU102は動作を開始する。
The CPU 10I becomes unable to fetch instructions and interrupts its operation, and the 8PU 102 starts its operation.

以上のように、APU102は常に、CPUl0Iが動
作を中断した状態で、動作する。このため、APUt0
2が動作を停止して、該マスタ権を放棄すると、CPU
l0Iは該マスタ権を獲得して動作を再開する。
As described above, the APU 102 always operates while the CPU 10I suspends its operation. For this reason, APUt0
2 stops operating and relinquishes the mastership, the CPU
L0I acquires the master right and resumes operation.

次いで、APt!102が動作している間に、外部から
の割込要求が発生した場合の動作について記す。
Next, APt! The operation when an interrupt request is generated from the outside while 102 is operating will be described.

外部からの割込要求は割込線111からCPUl0Iへ
入る。APUl、02の動作中1割込マスク120は割
込要求が受け付けられる状態にしてあり、CPUl0I
は該割込要求を直ちに受け付けて、割込要求を割込線1
12を介してAPU102へ出力する。
An interrupt request from the outside enters the CPUl0I through an interrupt line 111. During the operation of APU1, 02, the interrupt mask 120 is in a state where interrupt requests can be accepted, and CPU10I
immediately accepts the interrupt request and sends the interrupt request to interrupt line 1.
12 to the APU 102.

APU102は動作中に割込線112から割込要求を受
けると、ステータスレジスタ412の割込ビット801
を′1′として、バス110を解放し、動作を停止する
When the APU 102 receives an interrupt request from the interrupt line 112 during operation, it sets the interrupt bit 801 of the status register 412.
is set to '1', the bus 110 is released, and the operation is stopped.

これに伴なって、CPUl0Iは中断していた動作を再
開して、割込例外処理を行なう。該割込要求がタイマー
割込の場合には、引き続いて、osの制御の下にプロセ
ス切換処理を行なう。該割込要求がシグナル割込の場合
には、引き続いて、osの制御の下に、割込ハンドラ処
理用のプログラムを起動する。
Along with this, CPUl0I resumes the suspended operation and performs interrupt exception processing. If the interrupt request is a timer interrupt, process switching processing is subsequently performed under the control of the OS. If the interrupt request is a signal interrupt, then an interrupt handler processing program is started under the control of the OS.

次いで、APU102の動作中に、主メモリ105にお
いてページフォールトが発生した場合の動作について記
す。
Next, the operation when a page fault occurs in the main memory 105 during the operation of the APU 102 will be described.

主メモリ105において、ページフォールトが発生する
と、メモリ管理ユニット104はバスエラー信号を信号
線114を介して、バス調停ユニット103へ送る。バ
ス調停ユニット103は信号線114からバスエラー信
号を入力すると、信号線115、あるいは116を介し
てCPUl0IとAPU102の内でバス110のマス
タ権を保持する側へ、バスエラー信号を送る。
When a page fault occurs in the main memory 105, the memory management unit 104 sends a bus error signal to the bus arbitration unit 103 via the signal line 114. When the bus arbitration unit 103 receives a bus error signal from the signal line 114, it sends the bus error signal to the side of the CPU 10I and the APU 102 that holds the mastership of the bus 110 via the signal line 115 or 116.

この場合、バス110のマスタ権はAPU102が保持
しているため、バスエラー信号はAPU102へ送られ
る。 APU102は信号線116からバスエラー信号
を受けると、ステータスレジスタ412のバスエラービ
ット802を′1′として、動作を停止する。
In this case, since the APU 102 holds mastership of the bus 110, the bus error signal is sent to the APU 102. When the APU 102 receives a bus error signal from the signal line 116, it sets the bus error bit 802 of the status register 412 to '1' and stops operating.

次いで、CPUl0Iは動作を再開し、O5の制御の下
に、主メモリ105と補助メモリ107どの間のページ
スワップ処理を行なう。この場合、補助メモリ107に
は入出力制御ユニット106を介してアクセスする。
Next, CPU10I resumes operation and performs page swap processing between main memory 105 and auxiliary memory 107 under the control of O5. In this case, auxiliary memory 107 is accessed via input/output control unit 106.

以上が、本システムのハードウェアの動作である。The above is the operation of the hardware of this system.

次に、本システムのソフトウェア構成について記す。Next, the software configuration of this system will be described.

第3図(1)は主メモリ105内のエリアの構成を表わ
す図である。主メモリ105内のエリアは、アプリケー
ション層301 r o sのカーネル層302、およ
び、osのドライバ層303に分けられる。
FIG. 3(1) is a diagram showing the configuration of areas within the main memory 105. The area within the main memory 105 is divided into an application layer 301 r os kernel layer 302 and an OS driver layer 303 .

アプリケーション層301の構成を第3図(2)に示す
。メインプログラム311はcputotによって実行
され、論理型言語のソースプログラムを中間語プログラ
ムに変換して、主メモリ105へ出力する、APU10
2を0動する等の処理を行なう。組込述語A312はC
PUl0Iにより実行される組込述語の中で、メインプ
ログラム311から呼出されるものである。割込ハンド
ラA313は本システムの備える割込ハンドラの中で、
CPUl0Iにより実行されるものである。中間語プロ
グラム314は、メインプログラム311によって、ソ
ースプログラムを変換して作成されるものである。AP
U102上のインタープリタの処理の対象となる。内部
ステート退避エリア315はAPU102の実行状態を
表わすデータが退避されるエリアである。要求エリア 
The configuration of the application layer 301 is shown in FIG. 3 (2). The main program 311 is executed by cputot, converts a logical language source program into an intermediate language program, and outputs it to the main memory 105.
Perform processing such as moving 2 to 0. Built-in predicate A312 is C
Among the built-in predicates executed by PUl0I, these are called from the main program 311. Interrupt handler A313 is one of the interrupt handlers provided in this system.
This is executed by CPUl0I. The intermediate language program 314 is created by the main program 311 by converting the source program. AP
It is subject to processing by the interpreter on U102. The internal state save area 315 is an area where data representing the execution state of the APU 102 is saved. request area
.

316はドライバ層303のアプリケーション層301
のプログラムに対する処理の要求が書き込まれるエリア
である。
316 is the application layer 301 of the driver layer 303
This is the area where processing requests for the program are written.

O5のカーネル層302の構成を第3図(3)に示す。The configuration of the O5 kernel layer 302 is shown in FIG. 3 (3).

入出力管理プログラム321はドライバプログラム33
1の起動処理9割込ハンドラA313の起動処理等を行
なうものである。割込例外処理プログラム322.プロ
セス切換プログラム323は、それぞれ割込例外処理、
プロセス切換処理を行なうものである。ページ管理プロ
グラム324は主メモリ105と補助メモリ107の間
のページスワップ処理を行なうものである。シグナルエ
リアに325はシグナル割込要求の発生時に1割込例外
処理プログラム322によってシグナルの種別が登録さ
れるエリアである。テーブルに326は割込ハンドラA
313内のプログラムの処理を要求するシグナルの種別
と対応するプログラムのアドレスを保持するテーブルで
ある。プロセス管理テーブル327は現在実行中、待ち
状態のプロセス番号を保持するテーブルである。
The input/output management program 321 is the driver program 33
1 start-up processing 9 Start-up processing of the interrupt handler A313, etc. are performed. Interrupt exception handling program 322. The process switching program 323 includes interrupt exception handling,
It performs process switching processing. The page management program 324 performs page swap processing between the main memory 105 and the auxiliary memory 107. A signal area 325 is an area in which the type of signal is registered by the 1-interrupt exception handling program 322 when a signal interrupt request occurs. 326 in the table is interrupt handler A
This table holds the types of signals that request processing of programs in 313 and the addresses of the corresponding programs. The process management table 327 is a table that holds the numbers of currently executing and waiting processes.

osのドライバ層303の構成を第3図(4)に示す、
ドライバプログラム331はAPU102の起動処理等
を行なうものであり、 CPUl0Iにより実行される
。組込述語D332はcputotにより実行される組
込述語の中でドライバプログラム331から呼出される
ものである。
The configuration of the OS driver layer 303 is shown in FIG. 3 (4).
The driver program 331 performs startup processing of the APU 102, etc., and is executed by the CPU I0I. The built-in predicate D332 is called from the driver program 331 among the built-in predicates executed by cputot.

第6図はAPU102内の制御メモリ403中のマイク
ロプログラムの構成を表わす図である。
FIG. 6 is a diagram showing the configuration of the microprogram in the control memory 403 in the APU 102.

インタープリタ601は主メモリ105内の中間語プロ
グラム314を解釈実行するものである。
The interpreter 601 interprets and executes the intermediate language program 314 in the main memory 105.

組込述語M602は本システムの備える組込述語の中で
APU102により実行されるものである。割込ハンド
ラM603は本システムの備える割込ハンドラの中でA
PUI02により実行されるものである。
The built-in predicate M602 is executed by the APU 102 among the built-in predicates included in this system. Interrupt handler M603 is A among the interrupt handlers provided in this system.
This is executed by PUI02.

第5図はAPU102内のレジスタファイル410のエ
リアの構成を表わす図である。
FIG. 5 is a diagram showing the configuration of the area of the register file 410 within the APU 102.

シグナルエリアM501は、割込ハンドラM603の処
理を要求するシグナルの発生時に、該シグナルの種別が
5thされろエリアである。テーブルM502は割込ハ
ンドラM603の処理を要求するシグナルの種別と対応
するプログラムのアドレスを保持するテーブルである。
The signal area M501 is an area where, when a signal requesting processing by the interrupt handler M603 is generated, the type of the signal is 5th. Table M502 is a table that holds addresses of programs corresponding to types of signals requesting processing by interrupt handler M603.

要求エリアM503はAPU102のCPUl0Iに対
する要求処理が書き込まれるエリアである。ワーキング
エリア504はインタープリタ601の動作時に作業用
に用いられるエリアである。
The request area M503 is an area in which request processing for the CPU 10I of the APU 102 is written. The working area 504 is an area used for work when the interpreter 601 is operating.

次に、第2図、および第7図によって本システムの処理
フローについて説明する。
Next, the processing flow of this system will be explained with reference to FIGS. 2 and 7.

第2図(a)、(b)の処理フローは次の4つの部分に
分れる。第1はステップ201〜206であり、これら
はアプリケーション層301内のプログラムによるCP
Ul0Iの処理フローを表わす。
The processing flow shown in FIGS. 2(a) and 2(b) is divided into the following four parts. The first step is steps 201 to 206, which are executed by the program in the application layer 301.
It represents the processing flow of Ul0I.

第2はステップ211〜213であり、これらはosの
カーネル層302内のプログラムによるCPUl0Iの
処理フローを表わす、第3はステップ221〜236で
あり、これらはosのドライバ層303内のプログラム
によるcput旧の処理フローを表わす。第4はステッ
プ240であり。
The second step is steps 211 to 213, which represent the CPU10I processing flow by the program in the kernel layer 302 of the OS, and the third step is steps 221 to 236, which represent the CPU processing flow by the program in the driver layer 303 of the OS. Represents the old processing flow. The fourth step is step 240.

APυ102の制御メモリ403中のマイクロプログラ
ムによる処理を表わす。
It represents the processing by the microprogram in the control memory 403 of the APυ102.

まず、第1にアプリケーション層301内のプログラム
によるCPUl0Iの処理フロー(ステップ201〜2
06)について説明する。
First, the processing flow of CPUl0I by the program in the application layer 301 (steps 201 to 2)
06) will be explained.

ステップ201〜205はメインプログラム311の処
理フローである。以下にその内容を記す。
Steps 201 to 205 are the processing flow of the main program 311. The contents are described below.

ステップ201:本システムの初期化を行なった後、論
理型言語のソースプログラ ムを入力して、中間語プログラム 314を作成し、主メモリ105 へ出力する。
Step 201: After initializing this system, a logic language source program is input, an intermediate language program 314 is created, and the intermediate language program 314 is output to the main memory 105.

ステップ202:主メモリ105内の内部ステート退避
エリア315にAPU102の初期状態を表わす値を書
き込む。
Step 202: Write a value representing the initial state of the APU 102 to the internal state save area 315 in the main memory 105.

ステップ203:ioコマンドを発行して、osのカー
ネル層302の入出力管理 プログラム321を呼び出す(ス テップ211へ進む)。
Step 203: Issue an io command to call the input/output management program 321 of the kernel layer 302 of the OS (proceed to step 211).

ステップ204:osのドライバ層303からの要求を
要求エリアA316から読 み出して、該要求がシステムの終 了要求であれば終了し、さもなけ れば次ステツプへ進む。
Step 204: A request from the OS driver layer 303 is read from the request area A316, and if the request is a system termination request, the process ends; otherwise, the process proceeds to the next step.

ステップ205:該要求に応じて、組込述語A312の
実行等を行なった後、ステップ 2.03へ戻る。
Step 205: After executing the built-in predicate A312 in response to the request, the process returns to step 2.03.

以上がメインプログラム311の処理フローである。The above is the processing flow of the main program 311.

ステップ206は割込ハンドラA313の処理を表わす
。割込ハンドラA313は入出力管理ブログラム321
によって起動され、処理の終了後、メインプログラム3
11へ制御を戻す(ステップ204へ進む)。
Step 206 represents the processing of interrupt handler A313. Interrupt handler A313 is input/output management program 321
After the processing is completed, the main program 3
11 (proceed to step 204).

次に、OSのカーネル層302内のプログラムによるc
puloiの処理フロー(ステップ211〜214)に
ついて説明する。
Next, a program in the kernel layer 302 of the OS
The processing flow of puloi (steps 211 to 214) will be explained.

まず、入出力管理プログラム321の処理フローについ
て記す。
First, the processing flow of the input/output management program 321 will be described.

ステップ211 : CPUl0I内の割込マスク12
0を割込要求が受け付けられないよう に設定し、ドライバプログラム 331を呼出す(ステップ221 へ進む)。
Step 211: Interrupt mask 12 in CPUl0I
0 so that no interrupt request is accepted, and the driver program 331 is called (proceed to step 221).

ステップ212ニドライバブログラム331の終了後、
シグナルエリアに325を 参照して、シグナルが登録されて いれば、テーブルに326より、 対応する割込ハンドラA313内 のプログラムのアドレスを求めて。
Step 212 After finishing the Nidriver program 331,
Refer to 325 in the signal area, and if the signal is registered, use 326 in the table to find the address of the program in the corresponding interrupt handler A313.

該プログラムを起動する(ステツ プ206へ進む)、さもなければ。Start the program (steps) (Proceed to step 206), otherwise.

メインプログラム311ヘリター ンする(ステップ204へ進む)。Main program 311 helicopter (proceed to step 204).

上記のいずれの場合にも、ステップ212の終了時に、
割込マスク120を割込要求の受け付けが可能となるよ
うに設定する。
In any of the above cases, at the end of step 212,
The interrupt mask 120 is set so that it can accept interrupt requests.

以上が、入出力管理プログラム321の処理フローであ
る。
The above is the processing flow of the input/output management program 321.

ステップ213は割込例外処理プログラム322の処理
を表わす。該プログラム322はCPUl0Iが割込線
111からの割込要求を受け付けた場合に起動され、該
割込要求がシグナル割込要求の場合にはシグナルの種別
をシグナルエリアに325に登録する。処理終了後、割
込要求の受け付は時点の状態から、CPUl0Iの処理
を再開する。
Step 213 represents the processing of the interrupt exception handling program 322. The program 322 is activated when the CPU 10I receives an interrupt request from the interrupt line 111, and when the interrupt request is a signal interrupt request, the type of signal is registered in the signal area 325. After the processing is completed, the reception of the interrupt request resumes the processing of CPUl0I from the current state.

次に、OSのドライバ層303内のドライバプログラム
331によるCPUl0Iの処理フロー(ステップ22
1〜236)について説明する。ドライバプログラム3
31はAPU102の起動処理と、その後のAPU10
2からの要求や1割込要求に対する処理を以下の手順で
行なう。
Next, the processing flow of CPU10I by the driver program 331 in the driver layer 303 of the OS (step 22
1 to 236) will be explained. Driver program 3
31 is the startup process of the APU 102 and the subsequent APU 10
Processing for requests from 2 and interrupt requests 1 is performed in the following steps.

ステップ221:プロセス管理テーブル327内の現プ
ロセス番号と、APU102内のプロセス番号レジスタ
413の値 を読み出して、それらが一致しな い場合、主メモリ105内の内部 ステート退避エリア315の内容 を、APU102内のレジスタファイル410へ書き込
む。
Step 221: Read the current process number in the process management table 327 and the value of the process number register 413 in the APU 102. If they do not match, the contents of the internal state save area 315 in the main memory 105 are read out. Write to register file 410.

ステップ222:割込マスク120を割込要求の受け付
けが可能となるように設定 し、APU102内のコントロールレジスタ411内の
スタートビットを ′1′とする。この結果、APU102は実行状態(ス
テップ240)と なる。
Step 222: Set the interrupt mask 120 so that it can accept an interrupt request, and set the start bit in the control register 411 in the APU 102 to '1'. As a result, the APU 102 enters the execution state (step 240).

ステップ223 : APU102の動作停止後1割込
マスク120を割込要求の受け付けが 不可能となるように設定し、ステ ータスレジスタ412の割込ピッ ト801が11′である場合、ス テップ231へ、バスエラーピッ ト802が11′である場合、ス テップ235へ、終了ビット803 が51′である場合、次ステツプ へ進む。いずれのビットもマ1マで ない場合には本ステップを繰り返 す。
Step 223: After the operation of the APU 102 is stopped, the 1-interrupt mask 120 is set so that it is impossible to accept an interrupt request, and if the interrupt pit 801 of the status register 412 is 11', the process proceeds to step 231, and a bus error is detected. If the pit 802 is 11', the process proceeds to step 235; if the end bit 803 is 51', the process proceeds to the next step. If none of the bits is a mama or mama, repeat this step.

ステップ224ニレジスタフアイル410内の要求エリ
アM503から、AP旧02の CPUl0Iに対する要求ヲ読み出し、該要求がドライ
バプログラム331 内で処理可能な場合、次ステツプ へ、処理不可能な場合、ステップ 229へ進む。
Step 224 Read the request for CPUl0I of AP old 02 from the request area M503 in the second register file 410. If the request can be processed within the driver program 331, proceed to the next step. If it cannot be processed, proceed to step 229. .

ステップ225:該要求がプロセス切換を許す処理であ
る場合、ステップ227へ、 許さない処理である場合1次ステ ツブへ進む。
Step 225: If the request is a process that allows process switching, proceed to step 227; if the request is a process that does not permit, proceed to the first step.

ステップ226:該要求に対する処理(組込述語D33
2の実行等)を行ない、ス テップ222へ戻る。
Step 226: Processing for the request (built-in predicate D33
2) and returns to step 222.

ステップ227:プロセス管理テーブル327内の現プ
ロセス番号をプロセス番号 レジスタ413へ、レジスタファ イル410内のAPU102の実行状態を表わす値を主
メモリ105内の 内部ステート退避エリア315へ 書き込む。
Step 227: Write the current process number in the process management table 327 to the process number register 413, and write the value representing the execution state of the APU 102 in the register file 410 to the internal state save area 315 in the main memory 105.

ステップ228:要求エリア間503内の要求に対する
処理(組込述語D332の 実行等)を行なう。この間、割込 マスク120を割込要求の受け付 けが可能な状態に設定する。処理 後、ステップ221へ戻る。
Step 228: Processing for the request within the request area 503 (execution of built-in predicate D332, etc.) is performed. During this time, the interrupt mask 120 is set to a state where it can accept interrupt requests. After processing, the process returns to step 221.

ステップ229:要求エリアM503の内容を要求エリ
アA316へ書き込む。
Step 229: Write the contents of request area M503 to request area A316.

ステップ230:プロセス管理テーブル327内の現プ
ロセス番号をプロセス番号 レジスタ413へ、レジスタファ イル410内のAPU102の実行状態を表わす値を内
部ステート退避エ リア315へ書き込み、入出力管 環プログラム321ヘリターンす る(ステップ212へ進む)。
Step 230: Write the current process number in the process management table 327 to the process number register 413, write the value representing the execution state of the APU 102 in the register file 410 to the internal state save area 315, and return to the input/output control program 321 (step (Proceed to 212).

ステップ231:シグナルエリアに325を参照して、
シグナルの種別が書き込ま れていない(すなわち1割込要求 の要因がタイマー割込である)場 合、ステップ233へ進む。シブ ナルの種別が書き込まれており、 該種別がテーブルに326に登録 されている(すなわち、割込ハン ドラA312内のプログラムの処 理が要求されている)場合、ステ ツブ230へ進む。その他の(す なわち、APU102による割込ハンドラM603内の
プログラムの処理 が要求されている)場合、次ステ ツブへ進む。
Step 231: Refer to 325 in the signal area,
If the type of signal is not written (that is, the cause of one interrupt request is a timer interrupt), the process advances to step 233. If the type of signal has been written and is registered in the table 326 (that is, processing of the program in interrupt handler A 312 is requested), the process advances to step 230. In other cases (that is, processing of the program in the interrupt handler M603 by the APU 102 is requested), the process advances to the next step.

ステップ232:シグナルエリアに325の内容をレジ
スタファイル410内のシ グナルエリアM501へ書き込み、 ステップ222へ戻る。
Step 232: Write the contents of signal area 325 to signal area M501 in register file 410, and return to step 222.

ステップ233:プロセス管理テーブル327内の現プ
ロセス番号をプロセス番号 レジスタ413へ、レジスタファ イル410内のAPU+02の実行状態を表わす値を内
部ステート退避エ リア315へ書き込む。
Step 233: Write the current process number in the process management table 327 to the process number register 413, and write the value representing the execution state of APU+02 in the register file 410 to the internal state save area 315.

ステップ234:osのカーネル層302のプロセス切
換プログラム323を呼び 出して、プロセス切換処理を行な う。該プログラムの終了後、ステ ツブ221へ戻る。
Step 234: Call the process switching program 323 of the kernel layer 302 of the OS to perform process switching processing. After the program ends, the process returns to step 221.

ステップ235:プロセス管理テーブル327内の現プ
ロセス番号をプロセス番号 レジスタ413へ、レジスタファ イル410内のAPU102の実行状態を表わす値を内
部ステート退避エ リア315へ書き込む。
Step 235: Write the current process number in the process management table 327 to the process number register 413, and write the value representing the execution state of the APU 102 in the register file 410 to the internal state save area 315.

ステップ236 : o sのカーネル層302のペー
ジ管理プログラム324を呼び出 して、主メモリ105と補助メモ リ107の間のページスワップ処 理を行なう、該プログラムの終了 後、ステップ221へ戻る。
Step 236: The page management program 324 of the OS kernel layer 302 is called to perform page swap processing between the main memory 105 and the auxiliary memory 107. After the program ends, the process returns to step 221.

以上が、ドライバプログラム331の処理フローである
。この中で、ステップ222の処理によってAPU10
2が動作状態になると、CPUl0Iは動作を中断する
。その後、APU102のvノ作が終了するとCPUl
0Iはステップ223より動作を再開する。ただし、シ
グナル割込は割込線1.1.1,112よりCl301
01とAPU102の両者に入るため、シグナル割込の
発生時にはAPUt02の動作終了後、C1)υ101
は割込例外処理プロゲラ・ム322を実行して(ステッ
プ213)から、ステップ223の処理に移る。
The above is the processing flow of the driver program 331. In this process, the APU 10
When CPU10I becomes active, CPU10I suspends operation. After that, when the APU102's vno work is finished, the CPU1
0I resumes operation from step 223. However, the signal interrupt is from interrupt line 1.1.1, 112 to Cl301.
01 and APU102, so when a signal interrupt occurs, after the operation of APUt02 is completed, C1) υ101
executes the interrupt exception handling program 322 (step 213), and then proceeds to the process of step 223.

次に、APU102の処理(ステップ240)のフロー
について、第7図によって説明する。
Next, the flow of the process (step 240) of the APU 102 will be explained with reference to FIG.

APU102は、コントロールレジスタ411のスタ−
トビットに11′が書き込まれると動作状態となり、イ
ンタープリタ601の実行を開始する。
The APU 102 controls the start of the control register 411.
When 11' is written to the bit, the interpreter 601 enters the operating state and starts executing the interpreter 601.

インタープリンタ601の処理フローを以下に示す。The processing flow of the interprinter 601 is shown below.

ステップ701:シグナルエリア間501内に、シグナ
ルの種別が書き込まれてい る場合、テーブルM502を参照 して、対応する割込ハンドラM603 内のプログラムのアドレスを求め、 該プログラムを呼び出す(ステッ プ705へ進む)。さもなければ、 次ステツプへ進む。
Step 701: If the type of signal is written in the signal area 501, refer to table M502, find the address of the program in the corresponding interrupt handler M603, and call the program (proceed to step 705). ). Otherwise, proceed to the next step.

ステップ702:中間語プログラム314内の中間語を
読み出す、該中間語が CPUl0Iに対する処理要求(すなわち、システムの
終了要求、または 組込述語A312.組込述語D332 の処理要求)である場合、ステッ プ704へ、さもなければ1次ス テップへ進む。
Step 702: Read the intermediate language in the intermediate language program 314. If the intermediate language is a processing request to CPUl0I (that is, a system termination request or a processing request for built-in predicate A312 and built-in predicate D332), step 704 , otherwise proceed to the first step.

ステップ703:上記中間語を解釈実行し、ステップ7
02へ戻る。
Step 703: Interpret and execute the above intermediate word, Step 7
Return to 02.

ステップ704:要求エリアM503へCPUl0Iに
対する処理要求を書き込んで、動 作を停止する。
Step 704: Writes a processing request to CPUl0I to request area M503 and stops operation.

この場合、ステータスレジスタ 411の終了ビット803がマ1マ に設定される。In this case, the status register The end bit 803 of 411 is is set to

以上がインタープリタ601の処理フローである。The above is the processing flow of the interpreter 601.

ステップ705は割込ハンドラM603内のプログラム
の処理を表わす。該プログラムはインタープリタ601
から呼び出され、処理終了後はインタープリタ601ヘ
リターンする(ステップ702へ進む)。
Step 705 represents processing of the program within the interrupt handler M603. The program is an interpreter 601
After the processing is completed, the process returns to the interpreter 601 (proceeds to step 702).

以上が、八PU102の処理フローである。The above is the processing flow of the eight PUs 102.

最後に、APtJ102が動作中に割込要求、あるいは
、バスエラー信号を受け付けた場合の処理について補足
する。
Finally, we will supplement the processing when the APtJ 102 receives an interrupt request or a bus error signal during operation.

まず、割込線112からの割込要求を受け付けた場合、
APu102はステータスレジスタ411の割込ビット
801を1′にして動作を終了する。
First, when an interrupt request is received from the interrupt line 112,
The APu 102 sets the interrupt bit 801 of the status register 411 to 1' and ends the operation.

また、信号線116からのバスエラー信号を受け付けた
場合、APU102はステータスレジスタ411のバス
エラービット802を1′にして動作を終了する。
Further, when receiving a bus error signal from the signal line 116, the APU 102 sets the bus error bit 802 of the status register 411 to 1' and ends the operation.

以上が、実施例1についての説明である。The above is the description of the first embodiment.

次に実施例1のシステムの一部を変形したシステムの例
(実施例2〜実施例8)を示す。
Next, examples of systems (Example 2 to Example 8) that are partially modified from the system of Example 1 will be shown.

実施例2は、実施例1においてドライバ層303内で行
なった処理をアプリケーション層301において特権モ
ードに移って実行する方式のシステムである。
The second embodiment is a system in which the processing performed in the driver layer 303 in the first embodiment is executed in the application layer 301 in a privileged mode.

実施例1では、アプリケーション層301のメインプロ
グラム311中のステップ203においてioコマンド
を発行し、ドライバプログラムに制御を移したのに対し
て1水力式では、同ステップにおいて、asコマンドに
よって特権モードに移ってから、APU102の制御用
プログラムを呼び出す。
In the first embodiment, the io command is issued in step 203 of the main program 311 of the application layer 301 to transfer control to the driver program, whereas in the 1-hydro type, in the same step, the as command is used to shift to the privileged mode. After that, the control program for the APU 102 is called.

該制御用プログラムでは、ドライバ層303のドライバ
プログラム311(ステップ221〜236)、および
組込述語D332と同様の処理を行なう。
This control program performs the same processing as the driver program 311 (steps 221 to 236) of the driver layer 303 and the built-in predicate D332.

また、割込要求を受け付けてAPu102が動作を終了
した場合、主プロセッサ101はカーネル層302内の
割込例外処理プログラム322において、プロセス切替
処理を行なわず、該制御用プログラムの動作中断箇所(
ステップ223)の実行に移るものとする。
Furthermore, when the APu 102 ends its operation after accepting an interrupt request, the main processor 101 does not perform process switching processing in the interrupt exception handling program 322 in the kernel layer 302, and instead
Let us proceed to step 223).

実施例3は、実施例2において、特権モードに移って行
なわれる処理を、通常のアプリケーション層の実行モー
ドで行なう方式のシステムである。
The third embodiment is a system in which the processing performed in the privileged mode in the second embodiment is performed in the normal application layer execution mode.

本方式はAPU102内のレジスタ類を、ユーザ用のア
ドレス空間に置いた場合、またはメモリ空間がプロテク
トされていない場合に用いることができる。
This method can be used when the registers in the APU 102 are placed in a user address space or when the memory space is not protected.

実施例4は、実施例1におけるドライバ層303内の処
理を、カーネル層302内で行なう方式のシステムであ
る。すなわち、本方式ではドライバプログラム331と
組込述語D332を含むようにosのカーネル層302
のプログラムを変更する。
The fourth embodiment is a system in which the processing in the driver layer 303 in the first embodiment is performed in the kernel layer 302. That is, in this method, the kernel layer 302 of the OS includes the driver program 331 and the built-in predicate D332.
change the program.

実施例5は、実施例1においてプロセス番号レジスタ4
13にプロセス番号を記憶する点を変更して、OSのカ
ーネルM302内にプロセス番号を記憶する方式のシス
テムである。
In the fifth embodiment, the process number register 4 in the first embodiment is
In this system, the process number is stored in the kernel M302 of the OS, with the exception of storing the process number in the OS kernel M302.

実施例6は、実施例1においてAPU102の動作終了
後のステップ227、または230,233゜235内
で現プロセス番号をプロセス番号レジスタ413に記憶
する点を変更して、該処理をAPU102の起動前のス
テップ221内で行なう方式のシステムである。
Embodiment 6 differs from Embodiment 1 in that the current process number is stored in the process number register 413 in step 227 after the operation of the APU 102 or in steps 230, 233 and 235, and the processing is performed before the APU 102 is started. This is a system in which the process is performed within step 221 of the process.

実施例7は、実施例1においてAPU102がマルチプ
ロセスによって利用される点を変更して。
The seventh embodiment differs from the first embodiment in that the APU 102 is used by multiple processes.

APU102を利用するプロセスをシングルプロセスに
限定する方式のシステムである0水力式ではAPU10
2をあるプロセスが利用している間に、他のプロセスが
APU102を利用することを禁止する機構を備える。
APU10 is a system that limits the process using APU102 to a single process.
A mechanism is provided for prohibiting other processes from using the APU 102 while a certain process is using the APU 102.

一方、プロセスの切替に伴う八PU102の実行状態を
表すす値の主メモリへの退避処理、主メモリからの回復
処理は不要である。すなわち、ドライバプログラム33
1におけるステップ221、および227,230,2
33,235が省略される。また、主メモリ105上の
内部ステート退避エリア315 、 APU102内の
プロセス番号レジスタ413も省略される。
On the other hand, it is not necessary to save the value representing the execution state of the eight PUs 102 to the main memory and to recover it from the main memory when the process is switched. That is, the driver program 33
Step 221 in 1, and 227, 230, 2
33,235 is omitted. Furthermore, the internal state save area 315 on the main memory 105 and the process number register 413 in the APU 102 are also omitted.

実施例8は、実施例7のシステムにおいて、APU10
2の動作中にプロセスの切替を禁止する方式のシステム
である。本方式では、実施例7の場合と比較して、ドラ
イバプログラム331中のステップ234(プロセス切
替プログラム323の呼び出し処理)が省略される。
In the eighth embodiment, in the system of the seventh embodiment, the APU 10
This is a system that prohibits process switching during the operation of 2. In this method, step 234 (calling process of the process switching program 323) in the driver program 331 is omitted compared to the case of the seventh embodiment.

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

本発明によれば、AI言語の専用プロセッサを計算機シ
ステムに付加する場合、主プロセッサの側のプログラム
の変更箇所は局所化される。この結果、該専用プロセッ
サを付加することが容易化し、該専用プロセッサを付加
するか否かをオプション化することも可能となる。
According to the present invention, when a dedicated processor for AI language is added to a computer system, changes in the program on the main processor side are localized. As a result, it becomes easy to add the dedicated processor, and it becomes possible to make it optional whether or not to add the dedicated processor.

また、AI言語の処理中に発生する割込処理。Also, interrupt processing that occurs during AI language processing.

入出力処理等の一部を、主プロセッサの側で処理しうる
ので、該専用プロセッサの構造を簡素化することができ
る。
Since a part of the input/output processing etc. can be processed on the main processor side, the structure of the dedicated processor can be simplified.

また、仮想メモリ方式で、マルチプロセス動作が行なね
れる場合、プロセスの切り換えの際に、専用プロセッサ
のレジスタ類の値をアプリケーションプログラム領域(
すなわち、仮想アドレス領域)内に退避することが可能
となり、主メモリの使用量を低減する効果がある。
In addition, when multi-process operation cannot be performed using the virtual memory method, when switching processes, register values of the dedicated processor can be transferred to the application program area (
In other words, it becomes possible to save the data into the virtual address area (virtual address area), which has the effect of reducing the amount of main memory used.

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

第1図は本発明の一実施例(実施例1)の計算機システ
ムのハードウェア構成を表わすブロック図、第2図(a
)、(b)はCPUl0Iの動作を表わすフロー図、第
3図は主メモリ105のエリアの構成を表わす図、第4
図は付加プロセッサユニット102のハードウェア構成
を表わすブロック図、第5図はレジスタファイル402
のエリアの構成を表わす図、第6図は制御メモリ403
内のマイクロプログラムの構成を表わす図、第7図は実
行ユニット401の動作を表わすフロー図、第8図はス
テータスレジスタ412内のビットの構成を表わす図で
ある。
FIG. 1 is a block diagram showing the hardware configuration of a computer system according to an embodiment (Embodiment 1) of the present invention, and FIG.
), (b) are flow diagrams showing the operation of CPUl0I, FIG. 3 is a diagram showing the configuration of the area of the main memory 105, and FIG.
The figure is a block diagram showing the hardware configuration of the additional processor unit 102, and FIG.
FIG. 6 is a diagram showing the configuration of the area of the control memory 403.
7 is a flowchart showing the operation of the execution unit 401, and FIG. 8 is a diagram showing the structure of the bits in the status register 412.

Claims (1)

【特許請求の範囲】 1、バスを介して結合される主プロセッサユニット、付
加プロセッサユニット、バス制御ユニット、メモリ管理
ユニットおよびメモリから構成され、付加プロセッサユ
ニットが内蔵するマイクロプログラムを実行して、メモ
リ内のAI言語のプログラムを処理する計算機システム
において、 該付加プロセッサのバスマスタ権の割り当ての優先度を
該主プロセッサのそれよりも高く設定し、 各プロセッサからのバスマスタ権の割り当ての要求に対
して、該優先度にもとづいて、各プロセッサへバスマス
タ権を割り当て、 該付加プロセッサがバスマスタ権を放棄して動作を停止
した場合、バスマスタ権を失つて、実行を中断している
状態にある該主プロセッサが動作を中断箇所から再開す
る ことを特徴とする付加プロセッサユニットの制御方法。 2、メモリ管理ユニットにおいて、論理アドレスの指定
によるメモリのアクセス要求を受け取り指定されたアド
レスに該実メモリが割り当てられていれば、該メモリを
アクセスし、割り当てられていなければ、バスエラー信
号を該バス制御ユニットへ出力し、 該バス制御ユニットにおいて、該メモリ管理ユニットか
ら入力した該バスエラー信号を、主プロセッサと付加プ
ロセッサの内でバスマスタ権を保持する側へ出力する ことを特徴とする特許請求の範囲第1項記載の付加プロ
セッサユニットの制御方法。 3、付加プロセッサにおいて、メモリ管理ユニットから
バスエラー信号を入力した場合、バスマスタ権を放棄し
て動作を停止する ことを特徴とする特許請求の範囲第二項記載の付加プロ
セッサユニットの制御方法。 4、主プロセッサと付加プロセッサへ直接的に、共通の
割込要求を入力するかあるいは、該主プロセッサを介し
て、間接的に付加プロセッサに該主プロセッサと共通の
割込要求を入力し、該付加プロセッサにおいて、該割込
要求を入力した場合、バスマスタ権を放棄して動作を停
止する ことを特徴とする特許請求の範囲第1項記載の付加プロ
セッサユニットの制御方法。 5、主プロセッサにおいて、 マルチプロセス動作を実行し、 付加プロセッサが動作を停止した場合、主メモリ中、あ
るいは該付加プロセッサユニット内のレジスタ中に、現
プロセスの識別子を書き込み、該付加プロセッサの実行
状態を示すレジスタ類の値を該主メモリ上に退避し、 該付加プロセッサを再起動する際に、該主メモリ中、あ
るいは該付加プロセッサユニット内のレジスタ中に書き
込まれているプロセスの識別子と、現プロセスの識別子
とを比較して、それらが一致しない場合のみ、該主メモ
リ上に退避されているレジスタ類の値を回復する ことを特徴とする特許請求の範囲第1項記載の付加プロ
セッサユニットの制御方法。 6、主プロセッサにおいて、 オペレーティングシステム(os)の制御下で、アプリ
ケーション層のプログラムを実行しアプリケーション層
から特権モードに移つて、付加プロセッサを起動し、 該付加プロセッサの起動に伴つてバスマスタ権が該付加
プロセッサへ移動したために実行を中断している状態に
おいて、該付加プロセッサがバスマスタ権を放棄して動
作を終了した場合、再度、バスマスタ権を獲得して、特
権モードの実行を中断箇所から再開する ことを特徴とする特許請求の範囲第1項記載の付加プロ
セッサユニットの制御方法。 7、主プロセッサにおいて、 カーネル層とドライバ層から成るオペレーティングシス
テム(os)の制御下で、アプリケーション層のプログ
ラムを実行し、 アプリケーション層からカーネル層のプログラムの実行
を介してドライバ層を起動し、ドライバ層の実行の中で
付加プロセッサを起動し、該付加プロセッサの起動に伴
つてバスマスタ権が該付加プロセッサへ移動したために
実行を中断している状態において、該付加プロセッサが
バスマスタ権を放棄して動作を終了した場合、再度、バ
スマスタ権を獲得して、ドライバ層の実行を中断箇所か
ら再開する ことを特徴とする特許請求の範囲第1項記載の付加プロ
セッサユニットの制御方法。 8、主プロセッサのカーネル層において、カーネル層と
ドライバ層が動作する間は、主プロセッサに対する割込
要求がマスクされるようにマスクレジスタの値を設定し
、 ドライバ層において、付加プロセッサを起動する時点で
、該割込要求のマスクが解除されるように該マスクレジ
スタの値を変更し、該付加プロセッサが動作を停止した
場合、該割込要求がマスクされるように該マスクレジス
タの値を変更する ことを特徴とする特許請求の範囲第7項記載の付加プロ
セッサユニットの制御方法。 9、主プロセッサのカーネル層において、マルチプロセ
ス動作を実行し、 付加プロセッサにおいて、主プロセッサに対して処理を
要求して、動作を停止し、 該主プロセッサにおいて、該付加プロセッサが動作を停
止した場合、該付加プロセッサの該主プロセッサに対す
る要求処理の種別に応じて、次の(a)〜(d)の動作 (a)ドライバ層において該要求処理を行なつた後、該
付加プロセッサの動作を停止箇所より再開する、 (b)ドライバ層において該付加プロセッサの動作状態
を保持するレジスタ類の値を主メモリ上に退避し、該要
求処理を行なつた後、該レジスタ類の値を回復し、該付
加プロセッサの動作を停止箇所より再開する、 (c)ドライバ層において該付加プロセッサの動作状態
を保持するレジスタ類の値を主メモリ上に退避し、カー
ネル層において、プロセススイッチを発行し、同プロセ
スの再開後、ドライバ層において該レジスタ類の値を回
復し、該付加プロセッサの動作を停止箇所より再開する
、 (d)ドライバ層において該付加プロセッサの動作状態
を保持するレジスタ類の値を主メモリ上に退避し、アプ
リケーション層において、該要求処理を行なつた後、ド
ライバ層において該レジスタ類の値を回復し、該付加プ
ロセッサの動作を停止箇所より再開する、 を行なうことを特徴とする特許請求の範囲第7項記載の
付加プロセッサユニットの制御方法。 10、主プロセッサにおいて、アプリケーション層にお
いて主プロセッサと付加プロセッサに共通に入力される
割込要求に対する割込ハンドラ処理を行ない、 該割込要求を入力して該付加プロセッサが動作を停止し
た場合、カーネル層において、該割込要求が発生したこ
とを記憶するシグナルを立ててから、ドライバ層の動作
を中断箇所から再開し、ドライバ層において、該シグナ
ルが立つている場合、カーネル層にリターンし、カーネ
ル層において、アプリケーション層の該割込ハンドラ処
理を起動する ことを特徴とする特許請求の範囲第四、八項記載の付加
プロセッサユニットの制御方法。11、付加プロセッサ
において、主プロセッサと付加プロセッサに共通に入力
される割込要求に対する割込ハンドラ処理を行ない、 主プロセッサにおいて、該割込要求を入力して該付加プ
ロセッサが動作を停止した場合、カーネル層において、
該割込要求が発生したことを記憶するシグナルを立てて
から、ドライバ層の動作を中断箇所から再開し、 ドライバ層において、該シグナルが立つている場合、該
割込ハンドラ処理を実行するように該付加プロセッサを
起動する ことを特徴とする特許請求の範囲第4項又は第8項記載
の付加プロセッサユニットの制御方法。
[Scope of Claims] 1. Consists of a main processor unit, an additional processor unit, a bus control unit, a memory management unit, and a memory that are connected via a bus, and the additional processor unit executes a built-in microprogram to In a computer system that processes a program in an AI language, the priority of bus mastership assignment of the additional processor is set higher than that of the main processor, and in response to requests for bus mastership assignment from each processor, Bus mastership is assigned to each processor based on the priority, and when the additional processor relinquishes bus mastership and stops operating, the main processor, which has lost bus mastership and is suspending execution, A method for controlling an additional processor unit, characterized in that the operation is restarted from the interrupted point. 2. The memory management unit receives a memory access request by specifying a logical address, and if the real memory is allocated to the specified address, accesses the memory; if not, sends a bus error signal to the specified address. A patent claim characterized in that the bus error signal is output to a bus control unit, and in the bus control unit, the bus error signal input from the memory management unit is output to the side that holds bus mastership among the main processor and the additional processor. A method for controlling an additional processor unit according to item 1. 3. The method of controlling an additional processor unit according to claim 2, wherein when the additional processor receives a bus error signal from the memory management unit, the additional processor relinquishes bus mastership and stops operation. 4. Directly input a common interrupt request to the main processor and the additional processor, or indirectly input the interrupt request common to the main processor to the additional processor via the main processor, and 2. The method of controlling an additional processor unit according to claim 1, wherein when the interrupt request is input in the additional processor, the bus mastership is relinquished and the operation is stopped. 5. If the main processor executes a multi-process operation and the attached processor stops operating, write the identifier of the current process in the main memory or a register in the attached processor unit, and check the execution state of the attached processor. When the attached processor is restarted, the process identifier written in the main memory or the register in the attached processor unit and the current The additional processor unit according to claim 1, wherein the additional processor unit compares the process identifier with the process identifier, and restores the values of the registers saved in the main memory only if they do not match. Control method. 6. In the main processor, under the control of the operating system (OS), execute the application layer program, move from the application layer to a privileged mode, start the additional processor, and as the additional processor starts, the bus mastership is granted. If execution is suspended due to transfer to an attached processor, and the attached processor relinquishes bus mastership and terminates its operation, it will acquire bus mastership again and resume execution in privileged mode from the point where it was interrupted. 2. A method for controlling an additional processor unit according to claim 1. 7. In the main processor, the application layer program is executed under the control of the operating system (OS) consisting of the kernel layer and the driver layer, and the driver layer is started through the execution of the kernel layer program from the application layer. When an additional processor is activated during execution of a layer, and the execution is suspended because the bus mastership is transferred to the additional processor as the additional processor is activated, the additional processor relinquishes the bus mastership and operates. 2. The method of controlling an additional processor unit according to claim 1, further comprising acquiring bus mastership again and restarting execution of the driver layer from the interrupted point. 8. In the kernel layer of the main processor, set the value of the mask register so that interrupt requests to the main processor are masked while the kernel layer and driver layer are operating, and in the driver layer, when starting the additional processor. , change the value of the mask register so that the interrupt request is unmasked, and when the attached processor stops operating, change the value of the mask register so that the interrupt request is masked. 8. A method for controlling an additional processor unit according to claim 7. 9. When the kernel layer of the main processor executes a multi-process operation, and the additional processor requests processing to the main processor and stops its operation, and the additional processor stops operating in the main processor. , the following operations (a) to (d) are performed depending on the type of request processing of the additional processor to the main processor: (a) After the request processing is performed in the driver layer, the operation of the additional processor is stopped; (b) Saving the values of registers that hold the operating state of the additional processor in the driver layer to main memory, and restoring the values of the registers after performing the request processing; (c) In the driver layer, save the values of registers that hold the operating state of the attached processor in the main memory, and in the kernel layer, issue a process switch and restart the operation of the attached processor from the point where it stopped. After restarting the process, the driver layer restores the values of the registers and restarts the operation of the attached processor from the point where it was stopped. (d) The driver layer restores the values of the registers that maintain the operating state of the attached processor After saving in memory and processing the request in the application layer, the values of the registers are restored in the driver layer, and the operation of the additional processor is resumed from the point where it was stopped. A method for controlling an additional processor unit according to claim 7. 10. The main processor performs interrupt handler processing for interrupt requests that are commonly input to the main processor and additional processors in the application layer, and if the additional processor stops operating after inputting the interrupt request, the kernel The layer sets a signal to remember that the interrupt request has occurred, and then resumes the operation of the driver layer from the point where it was interrupted.If the signal is set, the driver layer returns to the kernel layer, and the kernel 9. The method of controlling an additional processor unit according to claim 4, wherein the interrupt handler processing of the application layer is activated in the application layer. 11. If the additional processor performs interrupt handler processing for an interrupt request that is commonly input to the main processor and the additional processor, and the main processor inputs the interrupt request and the additional processor stops operating, At the kernel layer,
After setting a signal to remember that the interrupt request has occurred, restart the operation of the driver layer from the point where it was interrupted, and in the driver layer, if the signal is set, execute the interrupt handler processing. 9. The method of controlling an additional processor unit according to claim 4, further comprising activating the additional processor.
JP4198388A 1988-02-26 1988-02-26 How to control the additional processor unit Pending JPH01217535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4198388A JPH01217535A (en) 1988-02-26 1988-02-26 How to control the additional processor unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4198388A JPH01217535A (en) 1988-02-26 1988-02-26 How to control the additional processor unit

Publications (1)

Publication Number Publication Date
JPH01217535A true JPH01217535A (en) 1989-08-31

Family

ID=12623437

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4198388A Pending JPH01217535A (en) 1988-02-26 1988-02-26 How to control the additional processor unit

Country Status (1)

Country Link
JP (1) JPH01217535A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03269663A (en) * 1990-03-20 1991-12-02 Fujitsu Ltd Dedicated processor connection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03269663A (en) * 1990-03-20 1991-12-02 Fujitsu Ltd Dedicated processor connection method

Similar Documents

Publication Publication Date Title
JP3546678B2 (en) Multi-OS configuration method
US6711605B2 (en) Multi OS configuration method and computer system
US5706514A (en) Distributed execution of mode mismatched commands in multiprocessor computer systems
US6314515B1 (en) Resetting multiple processors in a computer system
JPH0430053B2 (en)
CN114077379A (en) Computer equipment, exception handling method and interrupt handling method
KR20010070469A (en) Device and method for performing high-speed low overhead context switch
JPS6055467A (en) Data processing system for main frame emulation realized by multi-microprocessor
US7546600B2 (en) Method of assigning virtual process identifier to process within process domain
JP4026667B2 (en) Multi-OS configuration method
JPH0232659B2 (en)
JP5131269B2 (en) Multi-processing system
US11385927B2 (en) Interrupt servicing in userspace
JP2001216172A (en) Multi-OS configuration method
JPH01217535A (en) How to control the additional processor unit
JPS6049352B2 (en) data processing equipment
WO1998029807A1 (en) Real time services in backwardly compatible operating systems
JPS603229B2 (en) Information processing method
JPS61101865A (en) Multi-microprocessor system
JPH0567973B2 (en)
JPH0133856B2 (en)
JP2004038995A (en) Multi-OS configuration method
JPS62125437A (en) Additional processor control method
JPH01316851A (en) Channel control system
JPH0290331A (en) Interprocessor communication instruction processing device for virtual computer system