JPH04338862A - Computer system - Google Patents

Computer system

Info

Publication number
JPH04338862A
JPH04338862A JP11151491A JP11151491A JPH04338862A JP H04338862 A JPH04338862 A JP H04338862A JP 11151491 A JP11151491 A JP 11151491A JP 11151491 A JP11151491 A JP 11151491A JP H04338862 A JPH04338862 A JP H04338862A
Authority
JP
Japan
Prior art keywords
instruction
exception
signal line
processor
executed
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.)
Withdrawn
Application number
JP11151491A
Other languages
Japanese (ja)
Inventor
Makoto Higano
誠 日向野
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 JP11151491A priority Critical patent/JPH04338862A/en
Publication of JPH04338862A publication Critical patent/JPH04338862A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Multi Processors (AREA)

Abstract

PURPOSE:To constitute a multiprocessor computer system where the exception handling occurring in a sub-CPU is executed in a main CPU at a high speed. CONSTITUTION:If a first processor detects the occurrence of an exception by operation, an incorporated pipeline control circuit 40 receives this detection to continue execution of the instruction to be executed before the instruction, where the exception occurs, and reads out this instruction and the following instruction stored in a pipeline. Operation circuits output information required for exception detection to an exception detecting circuit. At the time of the occurrence of the exception, a second processor executes handling of the exception, which occurs in the first processor, and the following instruction if the pipeline control circuit incorporated in the first processor performs the execution processing of the instruction to be executed before the instruction where the exception occurs. Thus, the exception handling speed is increased.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】[発明の目的][Object of the invention]

【0002】0002

【産業上の利用分野】この発明は、例外処理の高速化を
はかったコンピュータシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system that speeds up exception processing.

【0003】0003

【従来の技術】コンピュータの分野において演算処理の
高速化のために、マルチプロセッサあるいは、命令フェ
ッチとその実行を並列に行うパイプライン制御を採用す
ることは常套手段である。パイプライン制御方式を採用
するコンピュータシステムにおいて、演算命令によって
例外が発生した場合、割り込みによってパイプラインを
止め、ソフトウェアによってパイプ内の命令を読みだし
、例外が発生した命令とその後続の命令の処理をソフト
ウェアエミュレーションすることにより処理していた。 ところが、この方式では例外処理に多大の時間を要す。 例を挙げると、ハードウェアによって拡張精度の演算を
実行することができない場合に例外が発生し、その時例
外が発生した命令はソフトウェアによってエミュレーシ
ョンが実行される。その例外を発生した命令の後続命令
がキュー内部にあるとき、その命令がハードウェアで実
行可能であってもソフトウェアエミュレーションを実行
しており、例外処理を遅延させる元凶となっていたもの
である。これを解消するために、例外が発生した場合、
例外を発生した命令はソフトウェアによってエミュレー
ションを実行し、その後続命令はソフトウェアによって
メモリ内部に再度格納し、通常の命令実行と同様命令キ
ューへ読み込み、ハードウェアの演算回路を使用して演
算を実行することによって例外処理の高速化を実現する
ものもあった。図3に、例外が発生した場合の従来例に
よる処理をフローチャートにて示してある。この例では
、マルチプロセッサ構成のコンピュータシステムにおい
て、サブCPUにて発生した例外はサブCPUが上述し
た手順にて処理している。
2. Description of the Related Art In the field of computers, it is common practice to employ multiprocessors or pipeline control that fetches and executes instructions in parallel in order to speed up arithmetic processing. In a computer system that uses a pipeline control method, when an exception occurs due to an arithmetic instruction, the pipeline is stopped by an interrupt, the instructions in the pipe are read by software, and the instruction in which the exception occurred and the instructions following it are processed. It was processed through software emulation. However, this method requires a large amount of time for exception handling. For example, an exception occurs when hardware cannot perform an extended precision operation, and the instruction in which the exception occurs is emulated by software. When an instruction following the instruction that caused the exception is in the queue, software emulation is executed even if the instruction is executable in hardware, which causes delays in exception handling. To resolve this, if an exception occurs,
The instruction that caused the exception is emulated by software, and the subsequent instructions are stored in memory again by software, loaded into the instruction queue in the same way as normal instruction execution, and executed using the hardware arithmetic circuit. In some cases, this speeds up exception handling. FIG. 3 is a flowchart showing a conventional process when an exception occurs. In this example, in a computer system with a multiprocessor configuration, an exception that occurs in a sub CPU is processed by the sub CPU according to the above-described procedure.

【0004】0004

【発明が解決しようとする課題】上述した従来例に従え
ば、サブCPUにて発生した例外はサブCPUが処理す
る方式となっているため、例外発生時、いずれも例外を
発生させた命令よりも先に実行すべき命令の実行完了ま
で例外処理を実行できない。従って、例外処理のために
多大の時間を要すといった不都合を有していた。
[Problem to be Solved by the Invention] According to the conventional example described above, exceptions that occur in the sub-CPU are handled by the sub-CPU, so when an exception occurs, the instruction that caused the exception is exception handling cannot be executed until the instruction that should be executed first is completed. Therefore, there is a disadvantage that a large amount of time is required for exception processing.

【0005】この発明は上記事情に鑑みてなされたもの
であり、マルチプロセッサ構成のコンピュータシステム
において、サブCPUで発生した例外処理を、メインC
PUにおいて高速に実行することのできるコンピュータ
シスタムを提供することを目的とする。
[0005] The present invention was made in view of the above circumstances, and in a computer system having a multiprocessor configuration, exception handling occurring in a sub CPU is carried out by the main CPU.
The object of the present invention is to provide a computer system that can be executed at high speed on a PU.

【0006】[発明の構成][Configuration of the invention]

【0007】[0007]

【課題を解決するための手段】本発明は、第1のプロセ
ッサにて例外が発生したとき、第2のプロセッサにてそ
の例外処理を実行するコンピユータシステムにおいて、
上記第1のプロセッサは、演算による例外を検出する回
路と、命令を保持するパイプラインと、例外が発生した
ときに、例外を発生した命令より前に実行すべき命令を
先に実行する制御を行ないながら、パイプライン内部に
ある例外を発生させた命令とその後続命令の情報を読み
出すパイプライン制御回路と、例外検出回路に例外情報
を供給する演算回路を有し、上記第1のプロセッサは、
第2のプロセッサで実行すべき命令を第2のプロセッサ
へ供給すると共に、第1のプロセツサにて例外が発生し
た場合、パイプライン制御回路が例外が発生した命令よ
り前に実行すべき命令の処理を行なっているときに、例
外の処理とその後続命令の実行を行なう命令実行制御回
路を具備することを特徴とする。
[Means for Solving the Problems] The present invention provides a computer system in which when an exception occurs in a first processor, a second processor executes the exception handling.
The first processor includes a circuit that detects an exception due to an operation, a pipeline that holds instructions, and a control that executes an instruction that should be executed before the instruction that generated the exception when an exception occurs. The first processor has a pipeline control circuit that reads information about the instruction that caused the exception and its successor instructions in the pipeline while executing the exception, and an arithmetic circuit that supplies exception information to the exception detection circuit.
A pipeline control circuit supplies instructions to be executed by the second processor to the second processor, and when an exception occurs in the first processor, the pipeline control circuit processes instructions to be executed before the instruction in which the exception has occurred. The present invention is characterized in that it includes an instruction execution control circuit that handles exceptions and executes subsequent instructions when the instruction is executed.

【0008】[0008]

【作用】上述したコンピュータシステムにおいて、第1
のプロセッサは、演算によって例外が発生した場合これ
を検出し、これを受けたパイプライン制御回路は、例外
が発生した命令よりも先に実行すべき命令の実行を継続
し、例外を発生させた命令とパイプライン内に格納され
ているその例外を発生させた命令の後続の命令を読み出
す。第1のプロセッサ内蔵の演算回路は例外検出回路に
対し例外を検出するのに必要に情報を出力する。第2の
プロセッサは、例外が発生した場合第1のプロセッサ内
蔵のパイプライン制御回路が例外が発生した命令より前
に実行すべき命令を実行する処理を行っているときに第
1のプロセッサで発生した例外の処理とその後続命令を
実行する。第1のプロセッサにて例外が発生した場合、
その例外を発生させた命令よりも先に実行すべき命令を
第1のプロセッサ内部で実行しているときに、その終了
を持たずに第2のプロセッサによって例外の処理を行な
うことにより、例外処理の高速化がはかれる。
[Operation] In the computer system described above, the first
The processor detects when an exception occurs due to an operation, and upon receiving this, the pipeline control circuit continues execution of the instruction that should be executed before the instruction that caused the exception. Reads the instruction and the instructions subsequent to the instruction that caused the exception stored in the pipeline. The arithmetic circuit built into the first processor outputs information necessary for detecting an exception to the exception detection circuit. When an exception occurs in the second processor, the exception occurs in the first processor while the built-in pipeline control circuit of the first processor executes an instruction that should be executed before the instruction in which the exception occurred. handle the exception and execute the subsequent instruction. If an exception occurs in the first processor,
When an instruction that should be executed before the instruction that caused the exception is being executed inside the first processor, the exception is handled by the second processor without the instruction ending. The speed can be increased.

【0009】[0009]

【実施例】図1は本発明の実施例を示すブロック図であ
る。図において、符号1はメモリであり、プログラム、
データを格納する。符号2は入出力ポートであり、ユー
ザーが使用する入出力装置が接続される。この入出力ポ
ートからの入力によって、命令の実行が開始される。符
号3はメインCPU(第2プロセッサ)であり、メモリ
1、入出力ポート2、及びサブCPU(第1プロセッサ
)に対してデータ、命令等の入出力を行う。メインCP
U3は、自身で実行すべき命令を除く命令、即ち、サブ
CPU4で実行すべき命令はサブCPU4へ送出し、サ
ブCPU4で例外が発生した場合、その処理を実行する
機能を持つ。符号4はサブCPUであり、メインCPU
3よりサブCPU4で実行すべき命令を受け取りその実
行を行う。例外が発生した場合は、メインCPU3へそ
の情報を伝達させ、サブCPU3が必要とする情報をサ
ブCPU3へ送出する。例外が発生した場合は、例外が
発生した命令よりも前に実行すべき命令よりも実行すべ
き命令の実行をメインCPU3による例外処理に阻害さ
れずに、継続して実行する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing an embodiment of the present invention. In the figure, numeral 1 is a memory, and a program,
Store data. Reference numeral 2 is an input/output port, to which an input/output device used by the user is connected. Execution of an instruction is started by input from this input/output port. Reference numeral 3 denotes a main CPU (second processor), which inputs and outputs data, instructions, etc. to the memory 1, input/output port 2, and sub CPU (first processor). Main CP
U3 has a function of sending instructions other than those to be executed by itself, that is, instructions to be executed by the sub-CPU 4, to the sub-CPU 4, and executing the process when an exception occurs in the sub-CPU 4. Code 4 is the sub CPU, which is the main CPU
3 receives instructions to be executed by the sub CPU 4 and executes them. When an exception occurs, the information is transmitted to the main CPU 3, and the information required by the sub CPU 3 is sent to the sub CPU 3. When an exception occurs, instructions that should be executed before the instruction in which the exception occurs are continuously executed without being hindered by the exception handling by the main CPU 3.

【0010】符号30はデータバスである。データバス
30はメインCPU3がメモリ1や入出力ポート2との
データの受け渡しを行うときに使用する。符号39はア
ドレス/コントロール信号線であり、メインCPU3が
メモリ1や入出力ポート2のアドレスを指定したり、リ
ード/ライトの制御をするときに使用する。符号31は
信号線であり、メインCPU3がサブCPU4にサブC
PU4で実行する命令を送出するときに、この信号線を
介して命令の受け渡しを行う。符号32は信号線であり
、メインCPU3がサブCPU4との間で演算用データ
の受け渡しを行うときに、その制御を行うための信号が
転送される。符号33はデータ線であり、メインCPU
3がサブCPU4との間で、演算用データ、演算結果の
入出力を行う。データ線33のデータの方向等の制御は
、メインCPU3が信号線32を使用して行う。符号3
4は信号線であり、メインCPU3が信号線31を通し
てサブCPU4にサブCPU4で実行する命令を送った
ときにこの信号をアクティブにする。符号35は信号線
であり、現在、メインCPU4が演算用データ、演算結
果の入出力を行えないことをこの信号線35を使用して
メインCPU3へ通知する。符号36は信号線であり、
サブCPU4が現在新しい命令を信号線31を介して、
受け取ることができないことを、この信号線36を介し
てメインCPU3へ通知する。符号37は信号線であり
、メインCPU4が例外を検出した際にこの信号線37
を使用して、例外発生等の例外に関する情報をメインC
PU3に通知する。
Reference numeral 30 is a data bus. The data bus 30 is used when the main CPU 3 exchanges data with the memory 1 and the input/output port 2. Reference numeral 39 is an address/control signal line, which is used when the main CPU 3 specifies addresses of the memory 1 and input/output ports 2, and controls read/write. Reference numeral 31 is a signal line, which connects the main CPU 3 to the sub CPU 4.
When sending an instruction to be executed by the PU 4, the instruction is exchanged via this signal line. Reference numeral 32 denotes a signal line, through which signals for control are transferred when the main CPU 3 exchanges calculation data with the sub CPU 4. Reference numeral 33 is a data line, which connects the main CPU.
3 inputs and outputs calculation data and calculation results to and from the sub CPU 4. The main CPU 3 controls the direction of data on the data line 33 using the signal line 32 . code 3
4 is a signal line, and this signal is activated when the main CPU 3 sends an instruction to be executed by the sub CPU 4 to the sub CPU 4 through the signal line 31. Reference numeral 35 is a signal line, and the signal line 35 is used to notify the main CPU 3 that the main CPU 4 is currently unable to input or output calculation data or calculation results. Reference numeral 36 is a signal line;
The sub CPU 4 currently sends a new command via the signal line 31.
The main CPU 3 is notified via this signal line 36 that it cannot be received. Reference numeral 37 is a signal line, and when the main CPU 4 detects an exception, this signal line 37
is used to send information about exceptions such as the occurrence of an exception to the main C
Notify PU3.

【0011】符号40はパイプライン制御回路であり、
サブCPU4に内蔵されたパイプラインの制御を行う。 例外が発生した場合は、その例外が発生した命令よりも
前に実行の制御を継続して行う。同時に、サブCPU3
が例外を発生させた命令とその後続命令を読み出す制御
も実行する。符号410は命令キュー1(Q1)であり
、メインCPU3から信号線31を通して送出されてき
た命令を始めに受け取る1段目の命令キューである。 符号401はサブCPU4によって生成されるラッチイ
ネーブル信号を転送する信号線である。符号411は信
号線410を転送される情報を出力する信号線である。 符号420は命令キュー2(Q2)であり、命令キュー
410から信号線411を通して送出された命令をラッ
チする2段目の命令キューである。符号402はサブC
PU4が生成するラッチイネーブル信号(信号線420
)である。符号421は信号線420を介して転送され
る情報を出力する信号である。符号430は命令キュー
3(Q3)であり、命令キュー420から信号線421
を通して送出された命令をラッチする3段目の命令キュ
ーである。符号440は命令キュー(Q4)であり、命
令キュー430から信号線431を通して送出された命
令をラッチする4段目の命令キューである。符号403
はサブCPU4が生成するラッチイネーブル信号(信号
線430)である。符号431は命令キュー430の情
報を出力する信号線である。符号450は命令キュー(
Q5)であり、命令キュー440から信号線441を通
して送出された命令をラッチする5段目の命令キューで
ある。符号404はサブCPU4が出力した命令キュー
440のラッチイネーブル信号である。符号441は命
令キュー440の情報を出力する信号である。
Reference numeral 40 is a pipeline control circuit;
Controls the pipeline built into the sub CPU 4. When an exception occurs, execution continues to be controlled prior to the instruction in which the exception occurred. At the same time, sub CPU3
also executes control to read the instruction that caused the exception and its successor instructions. Reference numeral 410 denotes an instruction queue 1 (Q1), which is a first-stage instruction queue that first receives instructions sent from the main CPU 3 through the signal line 31. Reference numeral 401 is a signal line that transfers a latch enable signal generated by the sub CPU 4. Reference numeral 411 is a signal line that outputs information transferred through the signal line 410. Reference numeral 420 denotes an instruction queue 2 (Q2), which is a second-stage instruction queue that latches the instructions sent from the instruction queue 410 through the signal line 411. Code 402 is sub-C
The latch enable signal (signal line 420) generated by PU4
). Reference numeral 421 is a signal that outputs information transferred via the signal line 420. Reference numeral 430 is instruction queue 3 (Q3), and signal line 421 is connected from instruction queue 420 to instruction queue 3 (Q3).
This is the third stage instruction queue that latches instructions sent through the . Reference numeral 440 denotes an instruction queue (Q4), which is a fourth-stage instruction queue that latches the instructions sent from the instruction queue 430 through the signal line 431. code 403
is a latch enable signal (signal line 430) generated by the sub CPU 4. Reference numeral 431 is a signal line that outputs information of the instruction queue 430. Reference numeral 450 is an instruction queue (
Q5), which is the fifth stage instruction queue that latches the instruction sent from the instruction queue 440 through the signal line 441. Reference numeral 404 is a latch enable signal for the instruction queue 440 output by the sub CPU 4. Reference numeral 441 is a signal that outputs information on the instruction queue 440.

【0012】符号50は演算回路1であり、信号線41
1を介して受け取った命令キュー410の情報に基づい
て演算を実行する。ここでは被演算データの読み込み、
被演算データのチェックを行う。符号501は信号線で
あり、演算回路1(50)の演算結果に関する情報をこ
の信号線に出力する。符号502は信号線であり、演算
回路50はこの信号線に例外に関する情報を出力する。 符号503は信号線であり、演算回路50はこの信号線
に被演算データの選択に関する情報を出力する。符号5
04は信号線であり、演算回路1(50)はこの信号線
のデータを被演算データとして読み込む。符号60は演
算回路2であり、421より受け取った420の情報と
、信号線501より受け取った演算回路1(50)の情
報に基づいて、演算回路1(50)に継続して演算を実
行する。符号601は信号線であり、演算回路2(60
)の演算結果に関する情報をこの信号線に出力する。 符号602は信号線であり、演算回路2(60)はこの
信号線に例外に関する情報を出力する。符号70は演算
回路3であり、信号線431を介して受け取った命令キ
ュー430の情報と、信号線601を介して受け取った
演算回路2(60)の情報に基づいて、演算回路2(6
0)に継続して演算を実行する。符号701は信号線で
あり、演算回路3(70)は自身の演算結果に関する情
報をこの信号線に出力する。符号80は演算回路4であ
り、信号線441を介して受け取った命令キュー440
の情報と、信号線701を介して受け取った演算回路3
(70)の情報に基づいて、演算回路3(70)に継続
して演算を実行する。演算回路4(80)は演算結果を
出力する。演算回路1、2、3、4(それぞれ50、6
0、70、80)は、4個一組で演算を実行するもので
ある。
Reference numeral 50 indicates an arithmetic circuit 1, and a signal line 41
The instruction queue 410 information received through the instruction queue 410 is used to execute operations. Here, reading the operand data,
Checks the operand data. Reference numeral 501 is a signal line, and information regarding the calculation result of the calculation circuit 1 (50) is output to this signal line. Reference numeral 502 is a signal line, and the arithmetic circuit 50 outputs information regarding the exception to this signal line. Reference numeral 503 is a signal line, and the arithmetic circuit 50 outputs information regarding selection of data to be operated on to this signal line. code 5
04 is a signal line, and the arithmetic circuit 1 (50) reads data on this signal line as data to be operated on. Reference numeral 60 is an arithmetic circuit 2, which executes an arithmetic operation following the arithmetic circuit 1 (50) based on the information of the arithmetic circuit 1 (50) received from the signal line 501 and the information of the arithmetic circuit 1 (50) received from the signal line 501. . Reference numeral 601 is a signal line, which connects the arithmetic circuit 2 (60
) is output to this signal line. Reference numeral 602 is a signal line, and the arithmetic circuit 2 (60) outputs information regarding the exception to this signal line. Reference numeral 70 denotes the arithmetic circuit 3, which executes the arithmetic circuit 2 (60) based on the information of the instruction queue 430 received via the signal line 431 and the information of the arithmetic circuit 2 (60) received via the signal line 601.
Continuing from step 0), the calculation is executed. Reference numeral 701 is a signal line, and the arithmetic circuit 3 (70) outputs information regarding its own arithmetic results to this signal line. Reference numeral 80 is an arithmetic circuit 4, which receives an instruction queue 440 via a signal line 441.
information and the arithmetic circuit 3 received via the signal line 701.
Based on the information in (70), the calculation circuit 3 (70) continues to perform calculations. Arithmetic circuit 4 (80) outputs a calculation result. Arithmetic circuits 1, 2, 3, 4 (50, 6 respectively)
0, 70, 80), the calculation is executed in a set of four.

【0013】符号801は信号線であり、演算回路4(
80)が演算の結果発生した例外を検出するための情報
をこの信号線に出力する。符号802は信号線であり、
演算回路4(80)が演算を実行した結果を格納するた
めの制御信号をここに出力する。符号803は信号線で
あり、演算回路4(80)の演算結果をここに出力する
。符号90はレジスタファイルであり、演算に必要にデ
ータを格納し、また、演算結果を格納する。レジスタフ
ァイル90内部には、デコーダ、セレクタや1以上のレ
ジスタがあり、各部の制御によってデータの入力、保持
、出力が可能である。レジスタファイル90は、入力専
用のポートとその制御入力、出力専用のよってポートと
その制御入力、双方向性の入出力ポートとその制御入力
をそれぞれ一個ずつ持ち、それぞれ信号線504、50
3、803、802、33、32に接続されている。
Reference numeral 801 is a signal line, which connects the arithmetic circuit 4 (
80) outputs information for detecting an exception occurring as a result of the operation to this signal line. Reference numeral 802 is a signal line;
A control signal for storing the result of the calculation performed by the calculation circuit 4 (80) is output here. Reference numeral 803 is a signal line to which the calculation result of the calculation circuit 4 (80) is output. Reference numeral 90 is a register file, which stores data necessary for calculations and also stores calculation results. Inside the register file 90, there are a decoder, a selector, and one or more registers, and data can be input, held, and output by controlling each part. The register file 90 has one input-only port and its control input, one output-only port and its control input, and one bidirectional input/output port and its control input, and has signal lines 504 and 50, respectively.
3, 803, 802, 33, and 32.

【0014】符号100は例外検出回路1であり、演算
回路1(50)が出力した信号線502の情報を入力し
、その情報より例外が検出された場合、信号線101を
通して、パイプライン制御回路40へ例外の発生を通知
する。符号110は例外検出回路2であり、演算回路2
(60)が出力した信号線602の情報を入力し、その
情報より例外が検出された場合に、信号線111を通し
て、パイプライン制御回路40へ例外の発生を通知する
。符号120は例外検出回路3であり、演算回路4(8
0)が出力した信号線801の情報を入力し、その情報
より検出された場合に、信号線121を通して、パイプ
ライン制御回路40へ例外の発生を通知する。符号13
0はセレクターであり、信号線411、421、451
を通して命令キュー410、420、450のデータを
入力し、信号線38を通してメインCPU3へ出力する
。どのデータを選択するかの制御は、パイプライン制御
回路40が信号線406を通して出力した制御信号によ
って制御する。符号301は信号線であり、メインCP
U3が例外処理を実行し、命令キュー40から命令を読
み出すときに使用する信号線である。
Reference numeral 100 denotes an exception detection circuit 1, which inputs the information of the signal line 502 outputted by the arithmetic circuit 1 (50), and when an exception is detected from the information, the signal is sent to the pipeline control circuit through the signal line 101. 40 of the occurrence of the exception. Reference numeral 110 is an exception detection circuit 2, which is an arithmetic circuit 2.
(60) is inputted to the signal line 602, and when an exception is detected from the information, the pipeline control circuit 40 is notified of the occurrence of the exception through the signal line 111. Reference numeral 120 is the exception detection circuit 3, and the arithmetic circuit 4 (8
0) is input to the signal line 801, and when detected based on the information, the occurrence of an exception is notified to the pipeline control circuit 40 through the signal line 121. code 13
0 is a selector, and signal lines 411, 421, 451
The data of the instruction queues 410, 420, and 450 is inputted through the signal line 38, and is outputted to the main CPU 3 through the signal line 38. Control of which data is selected is controlled by a control signal outputted by the pipeline control circuit 40 through the signal line 406. Reference numeral 301 is a signal line, and the main CP
This is a signal line used when U3 executes exception processing and reads instructions from the instruction queue 40.

【0015】図2は本発明実施例の動作概略を示すフロ
ーチャートである。具体的には、一つの命令をメモリか
らリードして実行終了するまでの流れを示す。図中、符
号S0は開始を示す。入出力ポート2を通してメインC
PU3に命令の読み込み指示があった場合や、前に実行
した命令に引き続いて次の命令を実行するときにこの処
理の開始となる。符号S1はメインCPU3が命令をリ
ードするステップであり、メインCPU3はアドレスや
リード/ライトの制御信号をメモリ1に出力して命令を
読み込む。符号S2はステップS1で読み込んだ命令が
メインCPU3で実行する命令かサブCPU4で実行す
る命令かを判断するステップである。符号S3はステッ
プS1で読み込んだ命令をメインCPU3が実行するス
テップである。符号S4はメインCPU3がステップS
1で読み込んだ命令を、サブCPU4に送出するステッ
プであり、サブCPU4はこの命令を実行するために受
け取る。符号S5はサブCPU4がステップS4でメイ
ンCPU3より受け取った命令を実行するステップであ
る。符号S6はステップS5で実行した演算による例外
を検出するステップである。符号S7は例外処理を実行
するステップであり、例外を発生させた命令よりも先に
実行すべき命令をサブCPU4内部で実行しながら、メ
インCPU3が例外を発生させた命令とその後続の命令
をサブCPU4から読み出して、メインCPU3で実行
する。符号S8は一つの命令の実行の終りを示すステッ
プである。
FIG. 2 is a flowchart showing an outline of the operation of the embodiment of the present invention. Specifically, the flow from reading one instruction from memory to completing execution is shown. In the figure, the symbol S0 indicates the start. Main C through input/output port 2
This process is started when the PU 3 receives an instruction to read an instruction or when executing the next instruction following the previously executed instruction. Reference numeral S1 is a step in which the main CPU 3 reads an instruction, and the main CPU 3 outputs an address and a read/write control signal to the memory 1 to read the instruction. Reference numeral S2 is a step for determining whether the instruction read in step S1 is an instruction to be executed by the main CPU 3 or an instruction to be executed by the sub CPU 4. Reference numeral S3 is a step in which the main CPU 3 executes the instruction read in step S1. The code S4 indicates that the main CPU 3 is in step S.
This step is to send the instruction read in step 1 to the sub CPU 4, and the sub CPU 4 receives this instruction in order to execute it. Reference numeral S5 is a step in which the sub CPU 4 executes the instruction received from the main CPU 3 in step S4. Reference numeral S6 is a step for detecting an exception due to the operation executed in step S5. Reference numeral S7 is a step for executing exception handling, in which the main CPU 3 executes the instruction that caused the exception and its subsequent instructions while executing the instruction that should be executed before the instruction that caused the exception in the sub CPU 4. It is read from the sub CPU 4 and executed by the main CPU 3. Reference numeral S8 is a step indicating the end of execution of one instruction.

【0016】以下、本発明実施例の動作について詳細に
説明する。まず、通常のパイプラインの動作から説明す
る。まず、始め装置全体は待ちの状態にある。メインC
PU3は信号線39に制御信号を出力して、入出力ポー
ト2に動作の開始の入力がされることを、データ線30
を通してモニタしている。入出力ポート2に開始の入力
があると、メインCPU3は命令のリードを開始する。 メインCPU3は命令をリードするために、信号線39
にメモリ1から内容を取り出すための制御信号を出力す
る。次にメモリ1からデータ線30に出力された命令を
メインCPU3が読み込む。メインCPU3が読み込ん
だ命令が、メインCPU3で実行すべき命令であればメ
インCPU3がその命令の実行を行う。本発明実施例で
は、メインCPU3は、データ等のロード/ストア命令
や整数演算命令を実行し、サブCPU4は浮動小数点演
算の実行を行うものとする。従って、命令が浮動小数点
演算命令であれば、メインCPU3は信号線31を通し
てサブCPU4内部の命令キュー1(符号410)に命
令を送付する。そのとき同時にメインCPU3は信号線
34に浮動小数点命令(サブCPUで実行する命令)を
送付したことを通知する。この時、もし命令キュー1(
410)が新しい命令をリードできない状態であれば信
号線35を通してパイプライン制御回路40が新しい命
令をメインCPU3より受け取れないという情報を、メ
インCPU3に伝えている。この場合、メインCPU3
は、信号線35の情報を読み込み、信号線401を介し
て新しい命令を受け付けられる状態になるまで、命令を
命令キューQ1(410)に送る動作を継続する。この
動作の詳細は後述する。
The operation of the embodiment of the present invention will be explained in detail below. First, we will explain the operation of a normal pipeline. Initially, the entire device is in a waiting state. Main C
The PU3 outputs a control signal to the signal line 39 to indicate to the data line 30 that an operation start input is input to the input/output port 2.
It is monitored through. When a start input is received at the input/output port 2, the main CPU 3 starts reading instructions. The main CPU 3 uses a signal line 39 to read instructions.
A control signal for retrieving the contents from memory 1 is output. Next, the main CPU 3 reads the command output from the memory 1 to the data line 30. If the instruction read by the main CPU 3 is an instruction that should be executed by the main CPU 3, the main CPU 3 executes the instruction. In the embodiment of the present invention, the main CPU 3 executes data load/store instructions and integer operation instructions, and the sub CPU 4 executes floating point operations. Therefore, if the instruction is a floating point arithmetic instruction, the main CPU 3 sends the instruction to the instruction queue 1 (reference numeral 410) inside the sub CPU 4 through the signal line 31. At the same time, the main CPU 3 notifies the signal line 34 that a floating point instruction (an instruction to be executed by the sub CPU) has been sent. At this time, if instruction queue 1 (
410) is in a state where it cannot read a new instruction, it transmits information to the main CPU 3 through the signal line 35 that the pipeline control circuit 40 cannot receive a new instruction from the main CPU 3. In this case, main CPU3
continues the operation of reading the information on the signal line 35 and sending instructions to the instruction queue Q1 (410) until a new instruction can be accepted via the signal line 401. Details of this operation will be described later.

【0017】次に、命令キュー)410は、上述により
入力され情報を信号線411を通して、パイブライン制
御回路40、命令キュー2(420)、演算回路1(5
0)、130へ送出する。演算回路1(50)は信号線
411を介して到来するデータを分析し、信号線503
を通してレジスタファイル90のデータを演算回路1(
50)へ送出する。演算回路1(50)は、信号線50
4を通してレジスタファイル90より出力されたデータ
を信号線501に送出する。また、信号線411を転送
される命令の種類に関する情報を信号線502を通して
、例外検出回路1(100)へ送出する。例外検出回路
100は命令の種類について解析し例外の有無を調べる
。信号線502に送出された情報を基に、命令がパイプ
ライン制御回路40で実行できない場合、信号線101
をを通して例外が発生したことをパイプライン制御回路
40に通知する。
Next, the instruction queue 410 transmits the input information as described above through the signal line 411 to the pipeline control circuit 40, instruction queue 2 (420), and arithmetic circuit 1 (5).
0), 130. The arithmetic circuit 1 (50) analyzes the data arriving via the signal line 411 and sends it to the signal line 503.
The data in the register file 90 is passed through the arithmetic circuit 1 (
50). Arithmetic circuit 1 (50) is connected to signal line 50
4, the data output from the register file 90 is sent to the signal line 501. Further, information regarding the type of instruction transferred through the signal line 411 is sent to the exception detection circuit 1 (100) through the signal line 502. The exception detection circuit 100 analyzes the type of instruction and checks whether there is an exception. Based on the information sent to the signal line 502, if the instruction cannot be executed by the pipeline control circuit 40, the signal line 101
The pipeline control circuit 40 is notified of the occurrence of the exception through.

【0018】命令キュー2(420)は、パイプライン
制御回路40が生成し、制御信号402を介して転送さ
れる信号に従って信号線411に送出されている命令キ
ュー1(410)のデータを入力して保持し、そのデー
タを信号線421を通してパイプライン制御回路40、
命令キュー3(430)、演算回路2(60)、セレク
タ130に送出する。演算回路2(60)は、信号線5
01を通して演算回路1(50)より送付されたデータ
と、信号線420を通して送出された命令キュー2(4
20)のデータを基に演算を実行してその結果を信号線
601に送出する。また、演算回路2(60)は入力デ
ータの整合性に関する情報を信号線602を通して演算
回路2(60)から送られたデータについて解析する。 例外検出回路110は命令と入力データの整合性(X÷
0等)について例外が発生しているかどうかについて解
析する。そして例外発生の有無を、信号線111を通し
てパイプライン制御回路40へ送出する。
The instruction queue 2 (420) receives the data of the instruction queue 1 (410) which is generated by the pipeline control circuit 40 and sent to the signal line 411 in accordance with the signal transferred via the control signal 402. and holds the data through the signal line 421 to the pipeline control circuit 40,
It is sent to instruction queue 3 (430), arithmetic circuit 2 (60), and selector 130. Arithmetic circuit 2 (60) is connected to signal line 5
The data sent from the arithmetic circuit 1 (50) through the signal line 420 and the instruction queue 2 (4
20) and sends the result to the signal line 601. Further, the arithmetic circuit 2 (60) analyzes the data sent from the arithmetic circuit 2 (60) through the signal line 602 for information regarding the consistency of input data. The exception detection circuit 110 checks the consistency (X÷
0, etc.) to determine whether an exception has occurred. Then, whether or not an exception has occurred is sent to the pipeline control circuit 40 through the signal line 111.

【0019】命令キュー3(430)は、パイプライン
制御回路40が生成した制御信号(403)に従って信
号線421に送出されている命令キュー2(420)の
データを入力して保持し、そのデータを信号線431を
通してパイプライン制御回路40、命令キュー4(44
0)、演算回路3(70)に送出する。演算回路3(7
0)は、演算回路2(60)が信号線601を通して送
出したデータと、命令キュー3(430)が信号線43
1を通して送出したデータを基に演算回路2(60)に
引き続いて演算を実行する。命令キュー4(440)は
、パイプライン制御回路40が生成した制御信号(40
4)に従って信号線431に送出された命令キュー3(
430)のデータを入力して保持し、そのデータを信号
線441を通して、パイプライン制御回路40、命令キ
ュー5(450)、演算回路4(80)に送出する。 演算回路4(80)は、演算回路3(70)が信号線7
01を通して出力したデータと、信号線441を通して
命令キュー4(440)が出力したデータを基に演算回
路3(70)に継続して演算を実行する。その結果は、
信号線802を通して出力された制御信号に従って、レ
ジスタファイル90に書き込まれる。レジスタファイル
90に書き込まれるデータは、演算回路4(80)が信
号線803を通してレジスタファイル90に出力する。 更に、レジスタファイル90は演算結果に関する情報を
信号線801を介して例外検出回路3(120)に出力
する。例外検出回路3(120)は信号線801に送出
された情報を基に例外が発生しているかどうか調べ、例
外の有無を信号線121を通してパイプライン制御回路
40へ通知する。
The instruction queue 3 (430) inputs and holds the data of the instruction queue 2 (420) sent to the signal line 421 according to the control signal (403) generated by the pipeline control circuit 40, and stores the data. is connected to the pipeline control circuit 40 and the instruction queue 4 (44) through the signal line 431.
0) and is sent to the arithmetic circuit 3 (70). Arithmetic circuit 3 (7
0) is the data sent by the arithmetic circuit 2 (60) through the signal line 601 and the data sent by the instruction queue 3 (430) through the signal line 43.
The arithmetic circuit 2 (60) then executes arithmetic operations based on the data sent through the arithmetic circuit 2 (60). The instruction queue 4 (440) receives a control signal (40) generated by the pipeline control circuit 40.
4), the instruction queue 3 (
430) is input and held, and the data is sent to the pipeline control circuit 40, instruction queue 5 (450), and arithmetic circuit 4 (80) through a signal line 441. The arithmetic circuit 4 (80) is connected to the signal line 7 by the arithmetic circuit 3 (70).
Based on the data outputted through 01 and the data outputted from instruction queue 4 (440) through signal line 441, the operation circuit 3 (70) continues to execute the operation. The result is
The data is written to the register file 90 according to the control signal output through the signal line 802. The data written to the register file 90 is outputted to the register file 90 by the arithmetic circuit 4 (80) through the signal line 803. Further, the register file 90 outputs information regarding the calculation result to the exception detection circuit 3 (120) via the signal line 801. The exception detection circuit 3 (120) checks whether an exception has occurred based on the information sent to the signal line 801, and notifies the pipeline control circuit 40 of the presence or absence of an exception through the signal line 121.

【0020】信号線441に出力された命令キュー4(
440)の情報は、パイプライン制御回路40が信号線
406を通して出力される制御信号に従って、命令キュ
ー5(450)にラッチされる。信号線451を介して
出力される情報は信号線451を通してセレクター13
0に送出される。例外が発生しない場合は上述した各、
動作は継続して実施される。即ち、メインCPU3が連
続してサブCPU4で実行する命令を読み込んだ場合は
、ある命令が命令キュー5(450)にある場合、次の
命令が命令キュー4(440)に、更に、次の命令が命
令キュー3(430)に、更に次の命令が命令キュー2
(420)に、更に次の命令が命令キュー1(410)
に入っている。これらの命令は、パイプライン内部を進
むうちに演算が実行される。パイプライン内部の命令で
先に実行された命令の実行結果を後の命令のソースとし
て使用する場合には、その前の命令の結果がレジスタフ
ァイル90に書き込まれるまで、命令キュー1(410
)に保持し、制御を次段のキュー(420)に制御を移
さない。この時、パイプライン制御回路40は、信号線
35を通して新たに命令を受け付けられないことを通知
し、また、信号線401を通して命令キュー1(410
)のデータを保持し、また、信号線402を通して命令
キュー2(420)には新しいデータは入力しない制御
を行う。
The instruction queue 4 (
440) is latched into the instruction queue 5 (450) according to a control signal output by the pipeline control circuit 40 through the signal line 406. Information output through the signal line 451 is sent to the selector 13 through the signal line 451.
Sent to 0. If no exception occurs, each of the above,
The operation continues. That is, when the main CPU 3 successively reads instructions to be executed by the sub CPU 4, if a certain instruction is in the instruction queue 5 (450), the next instruction is placed in the instruction queue 4 (440), and then the next instruction is placed in the instruction queue 4 (440). is placed in instruction queue 3 (430), and the next instruction is placed in instruction queue 2 (430).
(420), the next instruction is placed in instruction queue 1 (410)
It's in. Operations are executed on these instructions as they progress through the pipeline. When using the execution result of an instruction executed earlier in the pipeline as a source for a later instruction, the instruction queue 1 (410
) and does not transfer control to the next queue (420). At this time, the pipeline control circuit 40 notifies you through the signal line 35 that no new instructions can be accepted, and also notifies you through the signal line 401 of the instruction queue 1 (410
) data is held, and new data is not input to the instruction queue 2 (420) through the signal line 402.

【0021】メインCPU3がサブCPU4のレジスタ
ファイル90のリード/ライト命令を入力した場合、メ
インCPU3は信号線32を通して、レジスタファイル
90のリード/ライトに関する制御信号(アドレス、リ
ード/ライト制御)をパイプライン制御回路40、レジ
スタファイル90に送出する。この時、そのアドレスで
指定されたデータが使用中の場合、パイプライン制御回
路40は信号線36を通してレジスタファイル90が使
用中であることを通知し、メインCPU3がレジスタフ
ァイル90に関するリード/ライトを実行することを禁
止する。この場合、メインCPU3はレジスタファイル
90が使用可能になるまでリード/ライト命令の実行を
保留して待ち状態となり、リード/ライトが実行可能に
なり次第実行する。
When the main CPU 3 inputs a read/write instruction for the register file 90 of the sub CPU 4, the main CPU 3 pipes a control signal (address, read/write control) regarding the read/write of the register file 90 through the signal line 32. It is sent to the line control circuit 40 and register file 90. At this time, if the data specified by the address is in use, the pipeline control circuit 40 notifies you through the signal line 36 that the register file 90 is in use, and the main CPU 3 requests read/write regarding the register file 90. Prohibited from execution. In this case, the main CPU 3 suspends the execution of the read/write command until the register file 90 becomes available and enters a waiting state, and executes the read/write as soon as it becomes executable.

【0022】ここで、レジスタファイル90が使用中で
あるということについての補足説明を行う。命令キュー
1(410)に格納されている命令の実行結果の格納先
のレジスタに対して、メインCPU3がリードを行おう
としたとき、命令キュー1(410)の命令が実行を終
了し、演算結果をレジスタファイル90に書き込む前に
読み出すとそのデータは誤ったデータとなる。そのため
、その命令が命令キュー5(450)に格納され、レジ
スタファイル90へのライトが終了した後にリード命令
を実行する必要がある。即ち、パイプライン制御回路4
0の命令キューの内部にある命令の被演算データを格納
しているレジスタと演算結果を格納するレジスタへ、メ
インCPU3がリード/ライトする場合には、パイプラ
イン制御回路40内部の命令キューの命令の被演算デー
タを格納したレジスタのリード、演算結果の格納が終了
した後に実行する。レジスタファイル90の中に複数の
レジスタがあり、上記のような重なりがない場合には、
メインCPU3がレジスタファイル90に対してリード
/ライトを実行することと、命令キューがリード/ライ
トを実行することは、並列して実行できる。
[0022] Here, a supplementary explanation will be given regarding the fact that the register file 90 is in use. When the main CPU 3 attempts to read the register where the execution results of the instructions stored in the instruction queue 1 (410) are stored, the instructions in the instruction queue 1 (410) have finished executing and the operation results are If the data is read before being written to the register file 90, the data will be incorrect. Therefore, it is necessary to store the instruction in the instruction queue 5 (450) and execute the read instruction after writing to the register file 90 is completed. That is, the pipeline control circuit 4
When the main CPU 3 reads/writes the register storing the operand data of the instruction inside the instruction queue 0 and the register storing the operation result, the instruction in the instruction queue inside the pipeline control circuit 40 Execute after reading the register storing the operand data and storing the operation result. If there are multiple registers in the register file 90 and there is no overlap as described above,
The main CPU 3 reading/writing the register file 90 and the instruction queue reading/writing can be performed in parallel.

【0023】以降、例外が発生した場合の動作について
詳細に説明する。まず、例外検出回路103が例外を検
出した場合、パイプライン制御回路40は、通常のパイ
プラインの動作を止め例外を処理するモードとなる。こ
のとき、命令キュー410〜440に命令が格納されて
あってもその動作は実行しないで、中断する。パイプラ
イン制御回路40は、信号線37を通してメインCPU
3へ例外検出回路120にて例外を検出したことを通知
し、また同時に信号線406を通してセレクタ130に
信号線451に出力されているデータを選択して、信号
線38を通してパイプライン制御回路40へ送出するこ
とを通知する。メインCPU3はこれによって例外処理
を開始する。セレクタ130はこれに従って命令キュー
5(450)の内容を信号線451を通して受け取り、
信号線38を通してメインCPU3へ送出する。メイン
CPU3はこの命令の例外処理を行う。
[0023] Hereinafter, the operation when an exception occurs will be explained in detail. First, when the exception detection circuit 103 detects an exception, the pipeline control circuit 40 stops normal pipeline operation and enters a mode for processing the exception. At this time, even if an instruction is stored in the instruction queues 410 to 440, the operation is not executed and is interrupted. The pipeline control circuit 40 connects the main CPU through the signal line 37.
3 that the exception detection circuit 120 has detected an exception, and at the same time selects the data output to the signal line 451 to the selector 130 through the signal line 406 and sends it to the pipeline control circuit 40 through the signal line 38. Notify of sending. The main CPU 3 thereby starts exception handling. The selector 130 receives the contents of the instruction queue 5 (450) through the signal line 451 in accordance with this, and
It is sent to the main CPU 3 through the signal line 38. The main CPU 3 performs exception processing for this instruction.

【0024】次に、例外を発生した命令の次の命令を継
続して実行する必要があれば、パイプライン制御回路4
0はパイプラインの動作を通常に戻し、上述した各動作
を行なう。例外を発生させた命令を実行する必要がなけ
れば、メインCPU3は信号線301を通してパイプラ
イン制御回路40へその情報を伝え、パイプライン制御
回路40はそれに基づいて、信号線401、402、4
03、404に制御信号を出力し、命令キュー(410
、420、430、440)の内容をキャンセルする。 そして、例外検出回路100にて例外を検出し、信号線
101にその旨信号が到来した場合、パイプライン制御
回路40は、その時に命令が命令キュー420、430
、440にあれば、その処理を上述と同様に実行する。 同様に、信号線411を通して出力された命令キュー4
10のデータを、メインCPU3が受け取り、メインC
PU3はこの命令の例外処理を行う。その後、次に実行
すべき命令について処理を継続する。例外検出回路11
0が例外を検出し、信号線111にその旨信号が出力さ
れた場合、パイプライン制御回路40は上記同様、命令
キュー2(420)、セレクタ130、信号線38を通
して命令キュー2(420)のデータをメインCPU3
に送り、メインCPU3は例外処理を行う。このとき、
命令キュー1(410)に命令があれば、命令キュー2
(420)の命令についての例外処理が終了するまで、
命令キュー1(410)はパイプライン制御回路40に
よって保持されるように制御されている。メインCPU
3で例外を発生した命令キュー2(420)の命令の例
外処理が終了した後、命令キュー1(410)の命令を
継続して実行する必要があれば実行し、必要がなければ
上記同様キャンセルする。´尚、複数の例外検出回路で
例外が同時に発生した場合は、命令キューの下の段にあ
る命令の例外処理を先に行う。例えば、例外検出回路1
00、110、120で同様に例外が検出された場合は
、はじめに命令キュー5(450)に格納されている命
令の例外処理を行う。命令キュー5(450)の命令の
例外処理を終了した後に後続の命令を実行する場合は、
次に命令キュー4(440)、命令キュー3(430)
の命令があれば、それを実行した後命令キュー2(42
0)の例外処理を行う。更にその命令キュー2(420
)の命令の後続の命令を実行する必要が有れば命令キュ
ー1(410)の命令の例外処理を行う。
Next, if it is necessary to continue executing the instruction following the instruction that caused the exception, the pipeline control circuit 4
0 returns the pipeline operation to normal and performs the operations described above. If there is no need to execute the instruction that caused the exception, the main CPU 3 transmits the information to the pipeline control circuit 40 through the signal line 301, and the pipeline control circuit 40 uses the signal lines 401, 402, 4 based on the information to be executed.
03, outputs a control signal to 404, and outputs a control signal to the instruction queue (410
, 420, 430, 440). When the exception detection circuit 100 detects an exception and a signal to that effect arrives on the signal line 101, the pipeline control circuit 40 detects that the instruction is sent to the instruction queues 420 and 430 at that time.
, 440, the process is executed in the same manner as described above. Similarly, the instruction queue 4 output through the signal line 411
The main CPU 3 receives the data of 10, and the main CPU 3 receives the data.
PU3 performs exception handling for this instruction. Thereafter, processing continues for the next instruction to be executed. Exception detection circuit 11
0 detects an exception and a signal to that effect is output to the signal line 111, the pipeline control circuit 40 controls the instruction queue 2 (420) through the instruction queue 2 (420), the selector 130, and the signal line 38, as described above. data to main CPU3
and the main CPU 3 performs exception handling. At this time,
If there is an instruction in instruction queue 1 (410), instruction queue 2
Until the exception handling for the instruction (420) is completed,
Instruction queue 1 (410) is controlled to be held by pipeline control circuit 40. Main CPU
After the exception handling of the instruction in instruction queue 2 (420) that caused an exception in step 3 is completed, if it is necessary to continue executing the instruction in instruction queue 1 (410), execute it, and if it is not necessary, cancel it as above. do. 'If exceptions occur simultaneously in a plurality of exception detection circuits, the exception handling for the instructions at the lower stage of the instruction queue is performed first. For example, exception detection circuit 1
If an exception is similarly detected at 00, 110, or 120, exception processing is first performed for the instruction stored in the instruction queue 5 (450). When executing the subsequent instruction after completing the exception handling of the instruction in instruction queue 5 (450),
Next, instruction queue 4 (440), instruction queue 3 (430)
If there is an instruction, after executing it, the instruction queue 2 (42
0). Furthermore, the instruction queue 2 (420
), if it is necessary to execute an instruction subsequent to the instruction in instruction queue 1 (410), exception handling is performed for the instruction in instruction queue 1 (410).

【0025】命令キュー5(450)に設定された命令
の例外処理を実行した後、その後続命令を実行する必要
がなければ、上記同様後続命令はキャンセルされる。従
って、例外を発生した命令キュー2(420)と命令キ
ュー1(410)の命令の例外処理は行われずにキャン
セルされ、その次に実行すべき命令を実行する。例外検
出回路100と110にて同時に例外が検出された場合
も同様であり、命令キュー2(420)の例外処理をま
ず先に実行し、必要があれば(命令キュー410の命令
をキャンセルしないならば)、次に命令キュー1(41
0)の命令の例外処理を実行する。
After executing the exception handling for the instruction set in the instruction queue 5 (450), if there is no need to execute the subsequent instruction, the subsequent instruction is canceled as described above. Therefore, the exception handling for the instructions in the instruction queue 2 (420) and instruction queue 1 (410) that have generated an exception is canceled without being performed, and the next instruction to be executed is executed. The same applies when exceptions are detected simultaneously in the exception detection circuits 100 and 110, and the exception handling for instruction queue 2 (420) is executed first, and if necessary (if the instruction in the instruction queue 410 is not canceled) ), then instruction queue 1 (41
Execute exception handling for the instruction 0).

【0026】[0026]

【発明の効果】以上説明のように本発明によれば、サブ
CPU内で例外が発生した場合、その例外を発生させた
命令よりも先に実行すべき命令をサブCPU内部で実行
しているときにその終了を待たずにメインCPUによっ
て例外の処理を行なうことができ、このことにより例外
処理の高速化をはかれる。
[Effects of the Invention] As explained above, according to the present invention, when an exception occurs within the sub CPU, the instruction that should be executed before the instruction that caused the exception is executed within the sub CPU. In some cases, the main CPU can handle exceptions without waiting for their completion, thereby speeding up exception handling.

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

【図1】本発明の実施例を示すブロック図。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】本発明実施例の動作概略を示すフローチャート
FIG. 2 is a flowchart showing an outline of the operation of the embodiment of the present invention.

【図3】従来例の動作概略を示すフローチャート。FIG. 3 is a flowchart showing an outline of the operation of the conventional example.

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

1………メモリ 2………入出力ポート 3………メインCPU 4………サブCPU 40………パイプライン制御回路 50、60,70,80…演算回路 90………レジスタファイル 100、110,120…例外検出回路130………セ
レクタ
1...Memory 2...Input/output port 3...Main CPU 4...Sub CPU 40...Pipeline control circuit 50, 60, 70, 80...Arithmetic circuit 90...Register file 100, 110, 120...Exception detection circuit 130...Selector

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  第1のプロセッサにて例外が発生した
とき、第2のプロセッサにてその例外処理を実行するコ
ンピユータシステムにおいて、上記第1のプロセッサは
、演算による例外を検出する回路と、命令を保持するパ
イプラインと、例外が発生したときに、例外を発生した
命令より前に実行すべき命令を先に実行する制御を行な
いながら、パイプライン内部にある例外を発生させた命
令とその後続命令の情報を読み出すパイプライン制御回
路と、例外検出回路に例外情報を供給する演算回路を有
し、上記第1のプロセッサは、第2のプロセッサで実行
すべき命令を第2のプロセッサへ供給すると共に、第1
のプロセツサにて例外が発生した場合、パイプライン制
御回路が例外が発生した命令より前に実行すべき命令の
処理を行なっているときに、例外の処理とその後続命令
の実行を行なう命令実行制御回路を具備することを特徴
とするコンピュータシステム。
1. A computer system in which when an exception occurs in a first processor, a second processor executes the exception handling, wherein the first processor includes a circuit for detecting an exception due to an operation, and an instruction. When an exception occurs, the instruction that caused the exception and its successors are controlled to be executed first. The first processor has a pipeline control circuit that reads instruction information and an arithmetic circuit that supplies exception information to an exception detection circuit, and the first processor supplies instructions to be executed by the second processor to the second processor. together with the first
When an exception occurs in the processor, the instruction execution control handles the exception and executes the subsequent instruction while the pipeline control circuit is processing an instruction that should be executed before the instruction in which the exception occurred. A computer system comprising a circuit.
JP11151491A 1991-05-16 1991-05-16 Computer system Withdrawn JPH04338862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11151491A JPH04338862A (en) 1991-05-16 1991-05-16 Computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11151491A JPH04338862A (en) 1991-05-16 1991-05-16 Computer system

Publications (1)

Publication Number Publication Date
JPH04338862A true JPH04338862A (en) 1992-11-26

Family

ID=14563246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11151491A Withdrawn JPH04338862A (en) 1991-05-16 1991-05-16 Computer system

Country Status (1)

Country Link
JP (1) JPH04338862A (en)

Similar Documents

Publication Publication Date Title
US4916652A (en) Dynamic multiple instruction stream multiple data multiple pipeline apparatus for floating-point single instruction stream single data architectures
US5257354A (en) System for monitoring and undoing execution of instructions beyond a serialization point upon occurrence of in-correct results
JPH0517588B2 (en)
US20100153786A1 (en) Processor, multiprocessor, and debugging method
US5029073A (en) Method for fast establishing a co-processor to memory linkage by main processor
JPH06195229A (en) Apparatus for interrupt handling in pipeline processor
US5179691A (en) N-byte stack-oriented CPU using a byte-selecting control for enhancing a dual-operation with an M-byte instruction word user program where M<N<2M
JPH0743648B2 (en) Information processing equipment
JPH04338862A (en) Computer system
JPS6161416B2 (en)
JPH06168263A (en) Vector processor
JPH0192843A (en) Data processing apparatus and method
JP3145545B2 (en) Memory access device
JPH06139071A (en) Parallel computers
JP2906958B2 (en) User program loading method
JP2622026B2 (en) Register writing control method in central processing unit
JP2520158B2 (en) Debugging method of digital signal processor
JP3328867B2 (en) Multiprocessor arithmetic device and programmable controller having the device
JPH07152598A (en) Incircuit emulator
JPH052485A (en) Pipeline control system
JP2920968B2 (en) Instruction processing order control method
JP2866143B2 (en) Dynamic pipeline processing unit
JP2506591B2 (en) Auxiliary processor
JPH02183342A (en) Interruption controller
JPH0279122A (en) Floating point arithmetic mechanism

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980806